Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Updates #2513

Merged
merged 1 commit into from
Jun 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v157
v159
8 changes: 8 additions & 0 deletions src/Stripe.net/Entities/Accounts/AccountCapabilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,14 @@ public class AccountCapabilities : StripeEntity<AccountCapabilities>
[JsonProperty("paynow_payments")]
public string PaynowPayments { get; set; }

/// <summary>
/// The status of the promptpay payments capability of the account, or whether the account
/// can directly process promptpay charges.
/// One of: <c>active</c>, <c>inactive</c>, or <c>pending</c>.
/// </summary>
[JsonProperty("promptpay_payments")]
public string PromptpayPayments { get; set; }

/// <summary>
/// The status of the SEPA Direct Debits payments capability of the account, or whether the
/// account can directly process SEPA Direct Debits charges.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ public class ChargePaymentMethodDetails : StripeEntity<ChargePaymentMethodDetail
[JsonProperty("paynow")]
public ChargePaymentMethodDetailsPaynow Paynow { get; set; }

[JsonProperty("promptpay")]
public ChargePaymentMethodDetailsPromptpay Promptpay { get; set; }

[JsonProperty("sepa_debit")]
public ChargePaymentMethodDetailsSepaDebit SepaDebit { get; set; }

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// File generated from our OpenAPI spec
namespace Stripe
{
using Newtonsoft.Json;

public class ChargePaymentMethodDetailsPromptpay : StripeEntity<ChargePaymentMethodDetailsPromptpay>
{
/// <summary>
/// Bill reference generated by PromptPay.
/// </summary>
[JsonProperty("reference")]
public string Reference { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ public class CreditNoteLineItem : StripeEntity<CreditNoteLineItem>, IHasId, IHas
[JsonProperty("amount")]
public long Amount { get; set; }

/// <summary>
/// The integer amount in %s representing the amount being credited for this line item,
/// excluding all tax and discounts.
/// </summary>
[JsonProperty("amount_excluding_tax")]
public long? AmountExcludingTax { get; set; }

/// <summary>
/// Description of the item being credited.
/// </summary>
Expand Down Expand Up @@ -95,5 +102,12 @@ public class CreditNoteLineItem : StripeEntity<CreditNoteLineItem>, IHasId, IHas
/// </summary>
[JsonProperty("unit_amount_decimal")]
public decimal? UnitAmountDecimal { get; set; }

/// <summary>
/// The amount in %s representing the unit amount being credited for this line item,
/// excluding all tax and discounts.
/// </summary>
[JsonProperty("unit_amount_excluding_tax")]
public decimal? UnitAmountExcludingTax { get; set; }
}
}
7 changes: 7 additions & 0 deletions src/Stripe.net/Entities/CreditNotes/CreditNote.cs
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,13 @@ public Refund Refund
[JsonProperty("subtotal")]
public long Subtotal { get; set; }

/// <summary>
/// The integer amount in %s representing the amount of the credit note, excluding all tax
/// and invoice level discounts.
/// </summary>
[JsonProperty("subtotal_excluding_tax")]
public long? SubtotalExcludingTax { get; set; }

/// <summary>
/// The aggregate amounts calculated per tax rate for all line items.
/// </summary>
Expand Down
14 changes: 14 additions & 0 deletions src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ public class InvoiceLineItem : StripeEntity<InvoiceLineItem>, IHasId, IHasMetada
[JsonProperty("amount")]
public long Amount { get; set; }

/// <summary>
/// The integer amount in %s representing the amount for this line item, excluding all tax
/// and discounts.
/// </summary>
[JsonProperty("amount_excluding_tax")]
public long? AmountExcludingTax { get; set; }

/// <summary>
/// Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency
/// code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported
Expand Down Expand Up @@ -173,5 +180,12 @@ public List<Discount> Discounts
/// </summary>
[JsonProperty("type")]
public string Type { get; set; }

/// <summary>
/// The amount in %s representing the unit amount for this line item, excluding all tax and
/// discounts.
/// </summary>
[JsonProperty("unit_amount_excluding_tax")]
public decimal? UnitAmountExcludingTax { get; set; }
}
}
14 changes: 14 additions & 0 deletions src/Stripe.net/Entities/Invoices/Invoice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -800,6 +800,13 @@ public Subscription Subscription
[JsonProperty("subtotal")]
public long Subtotal { get; set; }

/// <summary>
/// The integer amount in %s representing the subtotal of the invoice before any invoice
/// level discount or tax is applied. Item discounts are already incorporated.
/// </summary>
[JsonProperty("subtotal_excluding_tax")]
public long? SubtotalExcludingTax { get; set; }

/// <summary>
/// The amount of tax on this invoice. This is the sum of all the tax amounts on this
/// invoice.
Expand Down Expand Up @@ -853,6 +860,13 @@ public TestHelpers.TestClock TestClock
[JsonProperty("total_discount_amounts")]
public List<InvoiceDiscountAmount> TotalDiscountAmounts { get; set; }

/// <summary>
/// The integer amount in %s representing the total amount of the invoice including all
/// discounts but excluding all tax.
/// </summary>
[JsonProperty("total_excluding_tax")]
public long? TotalExcludingTax { get; set; }

/// <summary>
/// The aggregate amounts calculated per tax rate for all line items.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ public class PaymentIntentNextAction : StripeEntity<PaymentIntentNextAction>
[JsonProperty("paynow_display_qr_code")]
public PaymentIntentNextActionPaynowDisplayQrCode PaynowDisplayQrCode { get; set; }

[JsonProperty("promptpay_display_qr_code")]
public PaymentIntentNextActionPromptpayDisplayQrCode PromptpayDisplayQrCode { get; set; }

[JsonProperty("redirect_to_url")]
public PaymentIntentNextActionRedirectToUrl RedirectToUrl { get; set; }

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// File generated from our OpenAPI spec
namespace Stripe
{
using Newtonsoft.Json;

public class PaymentIntentNextActionPromptpayDisplayQrCode : StripeEntity<PaymentIntentNextActionPromptpayDisplayQrCode>
{
/// <summary>
/// The raw data string used to generate QR code, it should be used together with QR code
/// library.
/// </summary>
[JsonProperty("data")]
public string Data { get; set; }

/// <summary>
/// The URL to the hosted PromptPay instructions page, which allows customers to view the
/// PromptPay QR code.
/// </summary>
[JsonProperty("hosted_instructions_url")]
public string HostedInstructionsUrl { get; set; }

/// <summary>
/// The image_url_png string used to render QR code, can be used as &lt;img src="…" /&gt;.
/// </summary>
[JsonProperty("image_url_png")]
public string ImageUrlPng { get; set; }

/// <summary>
/// The image_url_svg string used to render QR code, can be used as &lt;img src="…" /&gt;.
/// </summary>
[JsonProperty("image_url_svg")]
public string ImageUrlSvg { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ public class PaymentIntentPaymentMethodOptions : StripeEntity<PaymentIntentPayme
[JsonProperty("paynow")]
public PaymentIntentPaymentMethodOptionsPaynow Paynow { get; set; }

[JsonProperty("promptpay")]
public PaymentIntentPaymentMethodOptionsPromptpay Promptpay { get; set; }

[JsonProperty("sepa_debit")]
public PaymentIntentPaymentMethodOptionsSepaDebit SepaDebit { get; set; }

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// File generated from our OpenAPI spec
namespace Stripe
{
using Newtonsoft.Json;

public class PaymentIntentPaymentMethodOptionsPromptpay : StripeEntity<PaymentIntentPaymentMethodOptionsPromptpay>
{
/// <summary>
/// Indicates that you intend to make future payments with this PaymentIntent's payment
/// method.
///
/// Providing this parameter will <a
/// href="https://stripe.com/docs/payments/save-during-payment">attach the payment
/// method</a> to the PaymentIntent's Customer, if present, after the PaymentIntent is
/// confirmed and any required actions from the user are complete. If no Customer was
/// provided, the payment method can still be <a
/// href="https://stripe.com/docs/api/payment_methods/attach">attached</a> to a Customer
/// after the transaction completes.
///
/// When processing card payments, Stripe also uses <c>setup_future_usage</c> to dynamically
/// optimize your payment flow and comply with regional legislation and network rules, such
/// as <a href="https://stripe.com/docs/strong-customer-authentication">SCA</a>.
/// </summary>
[JsonProperty("setup_future_usage")]
public string SetupFutureUsage { get; set; }
}
}
7 changes: 5 additions & 2 deletions src/Stripe.net/Entities/PaymentMethods/PaymentMethod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,9 @@ public Customer Customer
[JsonProperty("paynow")]
public PaymentMethodPaynow Paynow { get; set; }

[JsonProperty("promptpay")]
public PaymentMethodPromptpay Promptpay { get; set; }

/// <summary>
/// Options to configure Radar. See <a
/// href="https://stripe.com/docs/radar/radar-session">Radar Session</a> for more
Expand All @@ -179,8 +182,8 @@ public Customer Customer
/// <c>au_becs_debit</c>, <c>bacs_debit</c>, <c>bancontact</c>, <c>boleto</c>, <c>card</c>,
/// <c>card_present</c>, <c>customer_balance</c>, <c>eps</c>, <c>fpx</c>, <c>giropay</c>,
/// <c>grabpay</c>, <c>ideal</c>, <c>interac_present</c>, <c>klarna</c>, <c>konbini</c>,
/// <c>link</c>, <c>oxxo</c>, <c>p24</c>, <c>paynow</c>, <c>sepa_debit</c>, <c>sofort</c>,
/// <c>us_bank_account</c>, or <c>wechat_pay</c>.
/// <c>link</c>, <c>oxxo</c>, <c>p24</c>, <c>paynow</c>, <c>promptpay</c>,
/// <c>sepa_debit</c>, <c>sofort</c>, <c>us_bank_account</c>, or <c>wechat_pay</c>.
/// </summary>
[JsonProperty("type")]
public string Type { get; set; }
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// File generated from our OpenAPI spec
namespace Stripe
{
public class PaymentMethodPromptpay : StripeEntity<PaymentMethodPromptpay>
{
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ public class ReceivedCredit : StripeEntity<ReceivedCredit>, IHasId, IHasObject
[JsonProperty("network")]
public string Network { get; set; }

/// <summary>
/// Details describing when a ReceivedCredit may be reversed.
/// </summary>
[JsonProperty("reversal_details")]
public ReceivedCreditReversalDetails ReversalDetails { get; set; }

/// <summary>
/// Status of the ReceivedCredit. ReceivedCredits are created either <c>succeeded</c>
/// (approved) or <c>failed</c> (declined). If a ReceivedCredit is declined, the failure
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// File generated from our OpenAPI spec
namespace Stripe.Treasury
{
using System;
using Newtonsoft.Json;
using Stripe.Infrastructure;

public class ReceivedCreditReversalDetails : StripeEntity<ReceivedCreditReversalDetails>
{
/// <summary>
/// Time before which a ReceivedCredit can be reversed.
/// </summary>
[JsonProperty("deadline")]
[JsonConverter(typeof(UnixDateTimeConverter))]
public DateTime? Deadline { get; set; }

/// <summary>
/// Set if a ReceivedCredit cannot be reversed.
/// One of: <c>already_reversed</c>, <c>deadline_passed</c>, <c>network_restricted</c>,
/// <c>other</c>, or <c>source_flow_restricted</c>.
/// </summary>
[JsonProperty("restricted_reason")]
public string RestrictedReason { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ public class ReceivedDebit : StripeEntity<ReceivedDebit>, IHasId, IHasObject
[JsonProperty("network")]
public string Network { get; set; }

/// <summary>
/// Details describing when a ReceivedDebit might be reversed.
/// </summary>
[JsonProperty("reversal_details")]
public ReceivedDebitReversalDetails ReversalDetails { get; set; }

/// <summary>
/// Status of the ReceivedDebit. ReceivedDebits are created with a status of either
/// <c>succeeded</c> (approved) or <c>failed</c> (declined). The failure reason can be found
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ namespace Stripe.Treasury

public class ReceivedDebitLinkedFlows : StripeEntity<ReceivedDebitLinkedFlows>
{
/// <summary>
/// The DebitReversal created as a result of this ReceivedDebit being reversed.
/// </summary>
[JsonProperty("debit_reversal")]
public string DebitReversal { get; set; }

/// <summary>
/// Set if the ReceivedDebit is associated with an InboundTransfer's return of funds.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// File generated from our OpenAPI spec
namespace Stripe.Treasury
{
using System;
using Newtonsoft.Json;
using Stripe.Infrastructure;

public class ReceivedDebitReversalDetails : StripeEntity<ReceivedDebitReversalDetails>
{
/// <summary>
/// Time before which a ReceivedDebit can be reversed.
/// </summary>
[JsonProperty("deadline")]
[JsonConverter(typeof(UnixDateTimeConverter))]
public DateTime? Deadline { get; set; }

/// <summary>
/// Set if a ReceivedDebit can't be reversed.
/// One of: <c>already_reversed</c>, <c>deadline_passed</c>, <c>network_restricted</c>,
/// <c>other</c>, or <c>source_flow_restricted</c>.
/// </summary>
[JsonProperty("restricted_reason")]
public string RestrictedReason { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,12 @@ public class AccountCapabilitiesOptions : INestedOptions
[JsonProperty("paynow_payments")]
public AccountCapabilitiesPaynowPaymentsOptions PaynowPayments { get; set; }

/// <summary>
/// The promptpay_payments capability.
/// </summary>
[JsonProperty("promptpay_payments")]
public AccountCapabilitiesPromptpayPaymentsOptions PromptpayPayments { get; set; }

/// <summary>
/// The sepa_debit_payments capability.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// File generated from our OpenAPI spec
namespace Stripe
{
using Newtonsoft.Json;

public class AccountCapabilitiesPromptpayPaymentsOptions : INestedOptions
{
/// <summary>
/// Passing true requests the capability for the account, if it is not already requested. A
/// requested capability may not immediately become active. Any requirements to activate the
/// capability are returned in the <c>requirements</c> arrays.
/// </summary>
[JsonProperty("requested")]
public bool? Requested { get; set; }
}
}
6 changes: 6 additions & 0 deletions src/Stripe.net/Services/Invoices/InvoiceCreateOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,12 @@ public class InvoiceCreateOptions : BaseOptions, IHasMetadata
[JsonProperty("pending_invoice_items_behavior")]
public string PendingInvoiceItemsBehavior { get; set; }

/// <summary>
/// Options for invoice PDF rendering.
/// </summary>
[JsonProperty("rendering_options")]
public InvoiceRenderingOptionsOptions RenderingOptions { get; set; }

/// <summary>
/// Extra information about a charge for the customer's credit card statement. It must
/// contain at least one letter. If not specified and this invoice is part of a
Expand Down
Loading