From 7650ee64efa9ab46f55744574b382c262059ff77 Mon Sep 17 00:00:00 2001 From: "stripe-openapi[bot]" <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 16 Nov 2023 15:45:19 -0800 Subject: [PATCH] Update generated code (#2796) * Update generated code for v657 * Update generated code for v658 * Update generated code for v660 * Update generated code for v661 * Update generated code for v662 * Update generated code for v666 * Update generated code for v668 --------- Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> --- OPENAPI_VERSION | 2 +- .../AccountSettingsBacsDebitPayments.cs | 17 ++++++- .../Charges/ChargePaymentMethodDetailsCard.cs | 10 ++++ .../Sessions/SessionPaymentMethodOptions.cs | 3 ++ .../SessionPaymentMethodOptionsPaypal.cs | 48 +++++++++++++++++++ .../Issuing/Transactions/Transaction.cs | 6 +++ .../Transactions/TransactionNetworkData.cs | 16 +++++++ src/Stripe.net/Entities/Topups/Topup.cs | 4 +- ...AccountSettingsBacsDebitPaymentsOptions.cs | 20 ++++++++ .../Accounts/AccountSettingsOptions.cs | 6 +++ .../Checkout/Sessions/SessionListOptions.cs | 7 +++ .../CreditNotes/CreditNoteLineOptions.cs | 9 +++- .../CreditNoteLineTaxAmountOptions.cs | 27 +++++++++++ 13 files changed, 168 insertions(+), 7 deletions(-) create mode 100644 src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsPaypal.cs create mode 100644 src/Stripe.net/Entities/Issuing/Transactions/TransactionNetworkData.cs create mode 100644 src/Stripe.net/Services/Accounts/AccountSettingsBacsDebitPaymentsOptions.cs create mode 100644 src/Stripe.net/Services/CreditNotes/CreditNoteLineTaxAmountOptions.cs diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 341fbefcb5..f522f139de 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v655 \ No newline at end of file +v668 \ No newline at end of file diff --git a/src/Stripe.net/Entities/Accounts/AccountSettingsBacsDebitPayments.cs b/src/Stripe.net/Entities/Accounts/AccountSettingsBacsDebitPayments.cs index ed39a5a120..f2cd4c8147 100644 --- a/src/Stripe.net/Entities/Accounts/AccountSettingsBacsDebitPayments.cs +++ b/src/Stripe.net/Entities/Accounts/AccountSettingsBacsDebitPayments.cs @@ -6,10 +6,23 @@ namespace Stripe public class AccountSettingsBacsDebitPayments : StripeEntity { /// - /// The Bacs Direct Debit Display Name for this account. For payments made with Bacs Direct - /// Debit, this will appear on the mandate, and as the statement descriptor. + /// The Bacs Direct Debit display name for this account. For payments made with Bacs Direct + /// Debit, this name appears on the mandate as the statement descriptor. Mobile banking apps + /// display it as the name of the business. To use custom branding, set the Bacs Direct + /// Debit Display Name during or right after creation. Custom branding incurs an additional + /// monthly fee for the platform. The fee appears 5 business days after requesting Bacs. If + /// you don't set the display name before requesting Bacs capability, it's automatically set + /// as "Stripe" and the account is onboarded to Stripe branding, which is free. /// [JsonProperty("display_name")] public string DisplayName { get; set; } + + /// + /// The Bacs Direct Debit Service user number for this account. For payments made with Bacs + /// Direct Debit, this number is a unique identifier of the account with our banking + /// partners. + /// + [JsonProperty("service_user_number")] + public string ServiceUserNumber { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCard.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCard.cs index 3fa6eba1cb..b453029e96 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCard.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCard.cs @@ -1,7 +1,9 @@ // File generated from our OpenAPI spec namespace Stripe { + using System; using Newtonsoft.Json; + using Stripe.Infrastructure; public class ChargePaymentMethodDetailsCard : StripeEntity { @@ -18,6 +20,14 @@ public class ChargePaymentMethodDetailsCard : StripeEntity + /// When using manual capture, a future timestamp at which the charge will be automatically + /// refunded if uncaptured. + /// + [JsonProperty("capture_before")] + [JsonConverter(typeof(UnixDateTimeConverter))] + public DateTime CaptureBefore { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; + /// /// Check results by Card networks on Card address and CVC at time of payment. /// diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptions.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptions.cs index 27f80a5145..8b592dc2a9 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptions.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptions.cs @@ -71,6 +71,9 @@ public class SessionPaymentMethodOptions : StripeEntity + { + /// + /// Controls when the funds will be captured from the customer's account. + /// + [JsonProperty("capture_method")] + public string CaptureMethod { get; set; } + + /// + /// Preferred locale of the PayPal checkout page that the customer is redirected to. + /// + [JsonProperty("preferred_locale")] + public string PreferredLocale { get; set; } + + /// + /// A reference of the PayPal transaction visible to customer which is mapped to PayPal's + /// invoice ID. This must be a globally unique ID if you have configured in your PayPal + /// settings to block multiple payments per invoice ID. + /// + [JsonProperty("reference")] + public string Reference { get; set; } + + /// + /// Indicates that you intend to make future payments with this PaymentIntent's payment + /// method. + /// + /// Providing this parameter will attach the payment + /// method 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 attached to a Customer + /// after the transaction completes. + /// + /// When processing card payments, Stripe also uses setup_future_usage to dynamically + /// optimize your payment flow and comply with regional legislation and network rules, such + /// as SCA. + /// One of: none, or off_session. + /// + [JsonProperty("setup_future_usage")] + public string SetupFutureUsage { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Issuing/Transactions/Transaction.cs b/src/Stripe.net/Entities/Issuing/Transactions/Transaction.cs index 555b55b282..13d429df4c 100644 --- a/src/Stripe.net/Entities/Issuing/Transactions/Transaction.cs +++ b/src/Stripe.net/Entities/Issuing/Transactions/Transaction.cs @@ -249,6 +249,12 @@ public Dispute Dispute [JsonProperty("metadata")] public Dictionary Metadata { get; set; } + /// + /// Details about the transaction, such as processing dates, set by the card network. + /// + [JsonProperty("network_data")] + public TransactionNetworkData NetworkData { get; set; } + /// /// Additional purchase information that is optionally provided by the merchant. /// diff --git a/src/Stripe.net/Entities/Issuing/Transactions/TransactionNetworkData.cs b/src/Stripe.net/Entities/Issuing/Transactions/TransactionNetworkData.cs new file mode 100644 index 0000000000..5daa80d998 --- /dev/null +++ b/src/Stripe.net/Entities/Issuing/Transactions/TransactionNetworkData.cs @@ -0,0 +1,16 @@ +// File generated from our OpenAPI spec +namespace Stripe.Issuing +{ + using Newtonsoft.Json; + + public class TransactionNetworkData : StripeEntity + { + /// + /// The date the transaction was processed by the card network. This can be different from + /// the date the seller recorded the transaction depending on when the acquirer submits the + /// transaction to the network. + /// + [JsonProperty("processing_date")] + public string ProcessingDate { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Topups/Topup.cs b/src/Stripe.net/Entities/Topups/Topup.cs index a9aa11d813..e74c75fda7 100644 --- a/src/Stripe.net/Entities/Topups/Topup.cs +++ b/src/Stripe.net/Entities/Topups/Topup.cs @@ -125,9 +125,7 @@ public BalanceTransaction BalanceTransaction public Dictionary Metadata { get; set; } /// - /// For most Stripe users, the source of every top-up is a bank account. This hash is then - /// the source object describing - /// that bank account. + /// The source field is deprecated. It might not always be present in the API response. /// [JsonProperty("source")] public Source Source { get; set; } diff --git a/src/Stripe.net/Services/Accounts/AccountSettingsBacsDebitPaymentsOptions.cs b/src/Stripe.net/Services/Accounts/AccountSettingsBacsDebitPaymentsOptions.cs new file mode 100644 index 0000000000..9d52062b9b --- /dev/null +++ b/src/Stripe.net/Services/Accounts/AccountSettingsBacsDebitPaymentsOptions.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + + public class AccountSettingsBacsDebitPaymentsOptions : INestedOptions + { + /// + /// The Bacs Direct Debit Display Name for this account. For payments made with Bacs Direct + /// Debit, this name appears on the mandate as the statement descriptor. Mobile banking apps + /// display it as the name of the business. To use custom branding, set the Bacs Direct + /// Debit Display Name during or right after creation. Custom branding incurs an additional + /// monthly fee for the platform. If you don't set the display name before requesting Bacs + /// capability, it's automatically set as "Stripe" and the account is onboarded to Stripe + /// branding, which is free. + /// + [JsonProperty("display_name")] + public string DisplayName { get; set; } + } +} diff --git a/src/Stripe.net/Services/Accounts/AccountSettingsOptions.cs b/src/Stripe.net/Services/Accounts/AccountSettingsOptions.cs index 290280f226..d1cbde376c 100644 --- a/src/Stripe.net/Services/Accounts/AccountSettingsOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountSettingsOptions.cs @@ -5,6 +5,12 @@ namespace Stripe public class AccountSettingsOptions : INestedOptions { + /// + /// Settings specific to Bacs Direct Debit payments. + /// + [JsonProperty("bacs_debit_payments")] + public AccountSettingsBacsDebitPaymentsOptions BacsDebitPayments { get; set; } + /// /// Settings used to apply the account's branding to email receipts, invoices, Checkout, and /// other products. diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionListOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionListOptions.cs index 12268a36ab..1db17656f5 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionListOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionListOptions.cs @@ -29,6 +29,13 @@ public class SessionListOptions : ListOptions [JsonProperty("payment_link")] public string PaymentLink { get; set; } + /// + /// Only return the Checkout Sessions matching the given status. + /// One of: complete, expired, or open. + /// + [JsonProperty("status")] + public string Status { get; set; } + /// /// Only return the Checkout Session for the subscription specified. /// diff --git a/src/Stripe.net/Services/CreditNotes/CreditNoteLineOptions.cs b/src/Stripe.net/Services/CreditNotes/CreditNoteLineOptions.cs index 63c46492fe..ea6b2bcb50 100644 --- a/src/Stripe.net/Services/CreditNotes/CreditNoteLineOptions.cs +++ b/src/Stripe.net/Services/CreditNotes/CreditNoteLineOptions.cs @@ -32,9 +32,16 @@ public class CreditNoteLineOptions : INestedOptions [JsonProperty("quantity")] public long? Quantity { get; set; } + /// + /// A list of up to 10 tax amounts for the credit note line item. Cannot be mixed with + /// tax_rates. + /// + [JsonProperty("tax_amounts")] + public List TaxAmounts { get; set; } + /// /// The tax rates which apply to the credit note line item. Only valid when the type - /// is custom_line_item. + /// is custom_line_item and cannot be mixed with tax_amounts. /// [JsonProperty("tax_rates")] public List TaxRates { get; set; } diff --git a/src/Stripe.net/Services/CreditNotes/CreditNoteLineTaxAmountOptions.cs b/src/Stripe.net/Services/CreditNotes/CreditNoteLineTaxAmountOptions.cs new file mode 100644 index 0000000000..3cef18cde0 --- /dev/null +++ b/src/Stripe.net/Services/CreditNotes/CreditNoteLineTaxAmountOptions.cs @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + + public class CreditNoteLineTaxAmountOptions : INestedOptions + { + /// + /// The amount, in cents (or local equivalent), of the tax. + /// + [JsonProperty("amount")] + public long? Amount { get; set; } + + /// + /// The id of the tax rate for this tax amount. The tax rate must have been automatically + /// created by Stripe. + /// + [JsonProperty("tax_rate")] + public string TaxRate { get; set; } + + /// + /// The amount on which tax is calculated, in cents (or local equivalent). + /// + [JsonProperty("taxable_amount")] + public long? TaxableAmount { get; set; } + } +}