From 06c20fefd4416f67ecdb16ec365fb7258e52a0b8 Mon Sep 17 00:00:00 2001 From: "stripe-openapi[bot]" <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 11 Oct 2023 16:54:23 +0000 Subject: [PATCH] Update generated code (#2778) * Update generated code for v584 * Update generated code for v585 * Update generated code for v587 * Update generated code for v588 * Update generated code for v589 * Update generated code for v592 * Update generated code for v595 * Update generated code for v596 --------- Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> --- OPENAPI_VERSION | 2 +- .../BalanceTransactions/BalanceTransaction.cs | 6 ++-- .../Entities/Checkout/Sessions/Session.cs | 31 +++++++++++++++++++ .../Checkout/Sessions/SessionCustomField.cs | 9 ------ .../AuthorizationVerificationData.cs | 7 +++++ .../PaymentLinks/PaymentLinkCustomField.cs | 9 ------ .../PaymentLinkPaymentIntentData.cs | 4 +-- .../PaymentLinkSubscriptionData.cs | 3 +- .../Terminal/Configurations/Configuration.cs | 3 ++ .../Configurations/ConfigurationOffline.cs | 15 +++++++++ .../Checkout/Sessions/SessionCreateOptions.cs | 25 +++++++++++++++ .../Invoices/InvoiceRenderingPdfOptions.cs | 5 +-- .../PaymentLinkPaymentIntentDataOptions.cs | 7 +++-- .../PaymentLinkSubscriptionDataOptions.cs | 5 +-- ...PaymentMethodConfigurationCreateOptions.cs | 5 +-- ...PaymentMethodConfigurationUpdateOptions.cs | 5 +-- .../SetupIntents/SetupIntentCancelOptions.cs | 2 +- .../SetupIntents/SetupIntentConfirmOptions.cs | 5 +-- .../SetupIntents/SetupIntentListOptions.cs | 2 +- .../ConfigurationCreateOptions.cs | 6 ++++ .../ConfigurationOfflineOptions.cs | 15 +++++++++ .../ConfigurationUpdateOptions.cs | 6 ++++ 22 files changed, 135 insertions(+), 42 deletions(-) create mode 100644 src/Stripe.net/Entities/Terminal/Configurations/ConfigurationOffline.cs create mode 100644 src/Stripe.net/Services/Terminal/Configurations/ConfigurationOfflineOptions.cs diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 849d00a97c..e6c86cecd6 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v582 \ No newline at end of file +v596 \ No newline at end of file diff --git a/src/Stripe.net/Entities/BalanceTransactions/BalanceTransaction.cs b/src/Stripe.net/Entities/BalanceTransactions/BalanceTransaction.cs index 9be9abeb3b..b4d5fe7aef 100644 --- a/src/Stripe.net/Entities/BalanceTransactions/BalanceTransaction.cs +++ b/src/Stripe.net/Entities/BalanceTransactions/BalanceTransaction.cs @@ -99,9 +99,9 @@ public class BalanceTransaction : StripeEntity, IHasId, IHas public long Net { get; set; } /// - /// Learn more about how [reporting categories] - /// (https://stripe.com/docs/reports/reporting-categories) can help you understand balance - /// transactions from an accounting perspective. + /// Learn more about how reporting categories can + /// help you understand balance transactions from an accounting perspective. /// [JsonProperty("reporting_category")] public string ReportingCategory { get; set; } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/Session.cs b/src/Stripe.net/Entities/Checkout/Sessions/Session.cs index 40c5bc9453..3fec0a35cf 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/Session.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/Session.cs @@ -86,6 +86,12 @@ public class Session : StripeEntity, IHasId, IHasMetadata, IHasObject [JsonProperty("client_reference_id")] public string ClientReferenceId { get; set; } + /// + /// Client secret to be used when initializing Stripe.js embedded checkout. + /// + [JsonProperty("client_secret")] + public string ClientSecret { get; set; } + /// /// Results of consent_collection for this session. /// @@ -386,6 +392,24 @@ public PaymentLink PaymentLink [JsonProperty("recovered_from")] public string RecoveredFrom { get; set; } + /// + /// Applies to Checkout Sessions with ui_mode: embedded. By default, Stripe will + /// always redirect to your return_url after a successful confirmation. If you set + /// redirect_on_completion: 'if_required', then we will only redirect if your user + /// chooses a redirect-based payment method. + /// One of: always, if_required, or never. + /// + [JsonProperty("redirect_on_completion")] + public string RedirectOnCompletion { get; set; } + + /// + /// Applies to Checkout Sessions with ui_mode: embedded. The URL to redirect your + /// customer back to after they authenticate or cancel their payment on the payment method's + /// app or site. + /// + [JsonProperty("return_url")] + public string ReturnUrl { get; set; } + #region Expandable SetupIntent /// @@ -508,6 +532,13 @@ public Subscription Subscription [JsonProperty("total_details")] public SessionTotalDetails TotalDetails { get; set; } + /// + /// The UI mode of the Session. Can be hosted (default) or embedded. + /// One of: embedded, or hosted. + /// + [JsonProperty("ui_mode")] + public string UiMode { get; set; } + /// /// The URL to the Checkout Session. Redirect customers to this URL to take them to /// Checkout. If you’re using { - /// - /// Configuration for type=dropdown fields. - /// [JsonProperty("dropdown")] public SessionCustomFieldDropdown Dropdown { get; set; } @@ -21,9 +18,6 @@ public class SessionCustomField : StripeEntity [JsonProperty("label")] public SessionCustomFieldLabel Label { get; set; } - /// - /// Configuration for type=numeric fields. - /// [JsonProperty("numeric")] public SessionCustomFieldNumeric Numeric { get; set; } @@ -34,9 +28,6 @@ public class SessionCustomField : StripeEntity [JsonProperty("optional")] public bool Optional { get; set; } - /// - /// Configuration for type=text fields. - /// [JsonProperty("text")] public SessionCustomFieldText Text { get; set; } diff --git a/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationVerificationData.cs b/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationVerificationData.cs index c6dc47ee3c..1d20a2c748 100644 --- a/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationVerificationData.cs +++ b/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationVerificationData.cs @@ -34,5 +34,12 @@ public class AuthorizationVerificationData : StripeEntity [JsonProperty("expiry_check")] public string ExpiryCheck { get; set; } + + /// + /// The postal code submitted as part of the authorization used for postal code + /// verification. + /// + [JsonProperty("postal_code")] + public string PostalCode { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkCustomField.cs b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkCustomField.cs index 2c9c1006c9..d38e11e4c4 100644 --- a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkCustomField.cs +++ b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkCustomField.cs @@ -5,9 +5,6 @@ namespace Stripe public class PaymentLinkCustomField : StripeEntity { - /// - /// Configuration for type=dropdown fields. - /// [JsonProperty("dropdown")] public PaymentLinkCustomFieldDropdown Dropdown { get; set; } @@ -21,9 +18,6 @@ public class PaymentLinkCustomField : StripeEntity [JsonProperty("label")] public PaymentLinkCustomFieldLabel Label { get; set; } - /// - /// Configuration for type=numeric fields. - /// [JsonProperty("numeric")] public PaymentLinkCustomFieldNumeric Numeric { get; set; } @@ -34,9 +28,6 @@ public class PaymentLinkCustomField : StripeEntity [JsonProperty("optional")] public bool Optional { get; set; } - /// - /// Configuration for type=text fields. - /// [JsonProperty("text")] public PaymentLinkCustomFieldText Text { get; set; } diff --git a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkPaymentIntentData.cs b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkPaymentIntentData.cs index ceaeb6c5fa..f53872017b 100644 --- a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkPaymentIntentData.cs +++ b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkPaymentIntentData.cs @@ -15,8 +15,8 @@ public class PaymentLinkPaymentIntentData : StripeEntity /// Set of key-value pairs that will set - /// metadata on [Payment Intents] (/docs/api/payment_intents) generated from this payment - /// link. + /// metadata on Payment Intents + /// generated from this payment link. /// [JsonProperty("metadata")] public Dictionary Metadata { get; set; } diff --git a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkSubscriptionData.cs b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkSubscriptionData.cs index e7be9b432e..3682d8014a 100644 --- a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkSubscriptionData.cs +++ b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkSubscriptionData.cs @@ -15,7 +15,8 @@ public class PaymentLinkSubscriptionData : StripeEntity /// Set of key-value pairs that will set - /// metadata on [Subscriptions] (/docs/api/subscriptions) generated from this payment link. + /// metadata on Subscriptions + /// generated from this payment link. /// [JsonProperty("metadata")] public Dictionary Metadata { get; set; } diff --git a/src/Stripe.net/Entities/Terminal/Configurations/Configuration.cs b/src/Stripe.net/Entities/Terminal/Configurations/Configuration.cs index cb582faa94..2e7a2f8376 100644 --- a/src/Stripe.net/Entities/Terminal/Configurations/Configuration.cs +++ b/src/Stripe.net/Entities/Terminal/Configurations/Configuration.cs @@ -43,6 +43,9 @@ public class Configuration : StripeEntity, IHasId, IHasObject [JsonProperty("livemode")] public bool Livemode { get; set; } + [JsonProperty("offline")] + public ConfigurationOffline Offline { get; set; } + [JsonProperty("tipping")] public ConfigurationTipping Tipping { get; set; } diff --git a/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationOffline.cs b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationOffline.cs new file mode 100644 index 0000000000..d8643eada5 --- /dev/null +++ b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationOffline.cs @@ -0,0 +1,15 @@ +// File generated from our OpenAPI spec +namespace Stripe.Terminal +{ + using Newtonsoft.Json; + + public class ConfigurationOffline : StripeEntity + { + /// + /// Determines whether to allow transactions to be collected while reader is offline. + /// Defaults to false. + /// + [JsonProperty("enabled")] + public bool? Enabled { get; set; } + } +} diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionCreateOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionCreateOptions.cs index faaa8267da..08b70063bf 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionCreateOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionCreateOptions.cs @@ -270,6 +270,24 @@ public class SessionCreateOptions : BaseOptions, IHasMetadata [JsonProperty("phone_number_collection")] public SessionPhoneNumberCollectionOptions PhoneNumberCollection { get; set; } + /// + /// This parameter applies to ui_mode: embedded. By default, Stripe will always + /// redirect to your return_url after a successful confirmation. If you set + /// redirect_on_completion: 'if_required', then we will only redirect if your user + /// chooses a redirect-based payment method. + /// One of: always, if_required, or never. + /// + [JsonProperty("redirect_on_completion")] + public string RedirectOnCompletion { get; set; } + + /// + /// The URL to redirect your customer back to after they authenticate or cancel their + /// payment on the payment method's app or site. This parameter is required if ui_mode is + /// embedded and redirect-based payment methods are enabled on the session. + /// + [JsonProperty("return_url")] + public string ReturnUrl { get; set; } + /// /// A subset of parameters to be passed to SetupIntent creation for Checkout Sessions in /// setup mode. @@ -322,5 +340,12 @@ public class SessionCreateOptions : BaseOptions, IHasMetadata /// [JsonProperty("tax_id_collection")] public SessionTaxIdCollectionOptions TaxIdCollection { get; set; } + + /// + /// ui_mode can be hosted or embedded. The default is hosted. + /// One of: embedded, or hosted. + /// + [JsonProperty("ui_mode")] + public string UiMode { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceRenderingPdfOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceRenderingPdfOptions.cs index edd99dd2e0..2401bb7f8c 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceRenderingPdfOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceRenderingPdfOptions.cs @@ -6,8 +6,9 @@ namespace Stripe public class InvoiceRenderingPdfOptions : INestedOptions { /// - /// Page size for invoice PDF. Can be set to a4, letter, or auto. If set to auto, page size - /// will be switched to a4 or letter based on customer locale. + /// Page size for invoice PDF. Can be set to a4, letter, or auto. If + /// set to auto, invoice PDF page size defaults to a4 for customers with + /// Japanese locale and letter for customers with other locales. /// One of: a4, auto, or letter. /// [JsonProperty("page_size")] diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkPaymentIntentDataOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkPaymentIntentDataOptions.cs index 33aff2e190..f063397fa8 100644 --- a/src/Stripe.net/Services/PaymentLinks/PaymentLinkPaymentIntentDataOptions.cs +++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkPaymentIntentDataOptions.cs @@ -15,9 +15,10 @@ public class PaymentLinkPaymentIntentDataOptions : INestedOptions, IHasMetadata /// /// Set of key-value pairs that will - /// declaratively set metadata on [Payment Intents] (/docs/api/payment_intents) generated - /// from this payment link. Unlike object-level metadata, this field is declarative. Updates - /// will clear prior values. + /// declaratively set metadata on Payment Intents generated from + /// this payment link. Unlike object-level metadata, this field is declarative. Updates will + /// clear prior values. /// [JsonProperty("metadata")] public Dictionary Metadata { get; set; } diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkSubscriptionDataOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkSubscriptionDataOptions.cs index e0f0820ead..44e703dc2f 100644 --- a/src/Stripe.net/Services/PaymentLinks/PaymentLinkSubscriptionDataOptions.cs +++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkSubscriptionDataOptions.cs @@ -15,8 +15,9 @@ public class PaymentLinkSubscriptionDataOptions : INestedOptions, IHasMetadata /// /// Set of key-value pairs that will - /// declaratively set metadata on [Subscriptions] (/docs/api/subscriptions) generated from - /// this payment link. Unlike object-level metadata, this field is declarative. Updates will + /// declaratively set metadata on Subscriptions generated from this + /// payment link. Unlike object-level metadata, this field is declarative. Updates will /// clear prior values. /// [JsonProperty("metadata")] diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationCreateOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationCreateOptions.cs index bb1e041b09..65e6cf21d7 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationCreateOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationCreateOptions.cs @@ -191,8 +191,9 @@ public class PaymentMethodConfigurationCreateOptions : BaseOptions /// /// JCB is a credit card company based in Japan. JCB is currently available in Japan to - /// businesses approved by JCB, and available to all businesses in the US, Canada, - /// Australia, New Zealand, UK, and Ireland. Check this page /// for more details. /// diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationUpdateOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationUpdateOptions.cs index 05ec08e0e3..eadd5e9959 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationUpdateOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationUpdateOptions.cs @@ -197,8 +197,9 @@ public class PaymentMethodConfigurationUpdateOptions : BaseOptions /// /// JCB is a credit card company based in Japan. JCB is currently available in Japan to - /// businesses approved by JCB, and available to all businesses in the US, Canada, - /// Australia, New Zealand, UK, and Ireland. Check this page /// for more details. /// diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentCancelOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentCancelOptions.cs index a7a12529f4..9390502d6e 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentCancelOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentCancelOptions.cs @@ -6,7 +6,7 @@ namespace Stripe public class SetupIntentCancelOptions : BaseOptions { /// - /// Reason for canceling this SetupIntent. Possible values are abandoned, + /// Reason for canceling this SetupIntent. Possible values are: abandoned, /// requested_by_customer, or duplicate. /// One of: abandoned, duplicate, or requested_by_customer. /// diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentConfirmOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentConfirmOptions.cs index 250b2261bf..a026f3e6f3 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentConfirmOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentConfirmOptions.cs @@ -8,9 +8,6 @@ public class SetupIntentConfirmOptions : BaseOptions [JsonProperty("client_secret")] public string ClientSecret { get; set; } - /// - /// This hash contains details about the Mandate to create. - /// [JsonProperty("mandate_data")] public SetupIntentMandateDataOptions MandateData { get; set; } @@ -30,7 +27,7 @@ public class SetupIntentConfirmOptions : BaseOptions public SetupIntentPaymentMethodDataOptions PaymentMethodData { get; set; } /// - /// Payment-method-specific configuration for this SetupIntent. + /// Payment method-specific configuration for this SetupIntent. /// [JsonProperty("payment_method_options")] public SetupIntentPaymentMethodOptionsOptions PaymentMethodOptions { get; set; } diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentListOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentListOptions.cs index b958a51380..f3c38dd64c 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentListOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentListOptions.cs @@ -24,7 +24,7 @@ public class SetupIntentListOptions : ListOptionsWithCreated public string Customer { get; set; } /// - /// Only return SetupIntents associated with the specified payment method. + /// Only return SetupIntents that associate with the specified payment method. /// [JsonProperty("payment_method")] public string PaymentMethod { get; set; } diff --git a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationCreateOptions.cs b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationCreateOptions.cs index 6ab557c3c4..7a5d3d1d53 100644 --- a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationCreateOptions.cs +++ b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationCreateOptions.cs @@ -11,6 +11,12 @@ public class ConfigurationCreateOptions : BaseOptions [JsonProperty("bbpos_wisepos_e")] public ConfigurationBbposWiseposEOptions BbposWiseposE { get; set; } + /// + /// Configurations for collecting transactions offline. + /// + [JsonProperty("offline")] + public ConfigurationOfflineOptions Offline { get; set; } + /// /// Tipping configurations for readers supporting on-reader tips. /// diff --git a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationOfflineOptions.cs b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationOfflineOptions.cs new file mode 100644 index 0000000000..414a8a666b --- /dev/null +++ b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationOfflineOptions.cs @@ -0,0 +1,15 @@ +// File generated from our OpenAPI spec +namespace Stripe.Terminal +{ + using Newtonsoft.Json; + + public class ConfigurationOfflineOptions : INestedOptions + { + /// + /// Determines whether to allow transactions to be collected while reader is offline. + /// Defaults to false. + /// + [JsonProperty("enabled")] + public bool? Enabled { get; set; } + } +} diff --git a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationUpdateOptions.cs b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationUpdateOptions.cs index 626a262a91..e17f9aa0cd 100644 --- a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationUpdateOptions.cs +++ b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationUpdateOptions.cs @@ -11,6 +11,12 @@ public class ConfigurationUpdateOptions : BaseOptions [JsonProperty("bbpos_wisepos_e")] public ConfigurationBbposWiseposEOptions BbposWiseposE { get; set; } + /// + /// Configurations for collecting transactions offline. + /// + [JsonProperty("offline")] + public ConfigurationOfflineOptions Offline { get; set; } + /// /// Tipping configurations for readers supporting on-reader tips. ///