From 9aa993d7a0ab97a4b4dff97109dafec8a4ac128a Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 12 Jun 2026 01:47:30 +0000 Subject: [PATCH 01/15] Update generated code for v2295 and 6f145c2614d8c9cc87bf358f4f93c44e3bd47fa4 --- CODEGEN_VERSION | 2 +- OPENAPI_VERSION | 2 +- .../PaymentIntentAdvancedFeatureDetails.cs | 4 ++ ...tentAdvancedFeatureDetailsForcedCapture.cs | 29 ++++++++++++++ ...aymentIntentPaymentDetailsMoneyServices.cs | 11 ++++++ ...ymentDetailsMoneyServicesAccountFunding.cs | 11 ------ ...DetailsMoneyServicesBeneficiaryDetails.cs} | 6 +-- ...MoneyServicesBeneficiaryDetailsAddress.cs} | 2 +- ...yServicesBeneficiaryDetailsDateOfBirth.cs} | 2 +- .../PaymentIntentPaymentMethodOptionsCard.cs | 1 + ...ntIntentPaymentMethodOptionsCardPresent.cs | 2 +- ...ymentIntentPaymentMethodOptionsSatispay.cs | 25 ++++++++++++ .../SetupAttemptPaymentMethodDetails.cs | 4 ++ ...etupAttemptPaymentMethodDetailsSatispay.cs | 12 ++++++ ...tailsMoneyServicesAccountFundingOptions.cs | 24 ------------ ...esBeneficiaryDetailsDateOfBirthOptions.cs} | 2 +- ...MoneyServicesBeneficiaryDetailsOptions.cs} | 4 +- ...ntentPaymentDetailsMoneyServicesOptions.cs | 26 ++++++++++++- ...ntIntentPaymentMethodOptionsCardOptions.cs | 1 + ...tailsMoneyServicesAccountFundingOptions.cs | 7 ---- ...oneyServicesAccountFundingWalletOptions.cs | 38 ------------------- ...dingWalletStagedPurchaseMerchantOptions.cs | 25 ------------ ...countFundingWalletStagedPurchaseOptions.cs | 18 --------- ...tPaymentMethodOptionsCardPresentOptions.cs | 2 +- ...tailsMoneyServicesAccountFundingOptions.cs | 7 ---- ...oneyServicesAccountFundingWalletOptions.cs | 38 ------------------- ...dingWalletStagedPurchaseMerchantOptions.cs | 25 ------------ ...countFundingWalletStagedPurchaseOptions.cs | 18 --------- ...tentPaymentMethodOptionsSatispayOptions.cs | 35 +++++++++++++++++ ...rdPaymentMethodDetailsCardChecksOptions.cs | 35 +++++++++++++++++ ...ntRecordPaymentMethodDetailsCardOptions.cs | 18 +++++++++ ...aymentRecordPaymentMethodDetailsOptions.cs | 8 ++++ .../CustomerEvaluationGetOptions.cs | 12 ++++++ .../CustomerEvaluationService.cs | 17 +++++++++ 34 files changed, 249 insertions(+), 224 deletions(-) create mode 100644 src/Stripe.net/Entities/PaymentIntents/PaymentIntentAdvancedFeatureDetailsForcedCapture.cs rename src/Stripe.net/Entities/PaymentIntents/{PaymentIntentPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetails.cs => PaymentIntentPaymentDetailsMoneyServicesBeneficiaryDetails.cs} (69%) rename src/Stripe.net/Entities/PaymentIntents/{PaymentIntentPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsAddress.cs => PaymentIntentPaymentDetailsMoneyServicesBeneficiaryDetailsAddress.cs} (89%) rename src/Stripe.net/Entities/PaymentIntents/{PaymentIntentPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsDateOfBirth.cs => PaymentIntentPaymentDetailsMoneyServicesBeneficiaryDetailsDateOfBirth.cs} (80%) create mode 100644 src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetailsSatispay.cs rename src/Stripe.net/Services/PaymentIntents/{PaymentIntentPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsDateOfBirthOptions.cs => PaymentIntentPaymentDetailsMoneyServicesBeneficiaryDetailsDateOfBirthOptions.cs} (87%) rename src/Stripe.net/Services/PaymentIntents/{PaymentIntentPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsOptions.cs => PaymentIntentPaymentDetailsMoneyServicesBeneficiaryDetailsOptions.cs} (82%) delete mode 100644 src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingWalletOptions.cs delete mode 100644 src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingWalletStagedPurchaseMerchantOptions.cs delete mode 100644 src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingWalletStagedPurchaseOptions.cs delete mode 100644 src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingWalletOptions.cs delete mode 100644 src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingWalletStagedPurchaseMerchantOptions.cs delete mode 100644 src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingWalletStagedPurchaseOptions.cs create mode 100644 src/Stripe.net/Services/PaymentRecords/PaymentRecordPaymentMethodDetailsCardChecksOptions.cs create mode 100644 src/Stripe.net/Services/PaymentRecords/PaymentRecordPaymentMethodDetailsCardOptions.cs create mode 100644 src/Stripe.net/Services/Radar/CustomerEvaluations/CustomerEvaluationGetOptions.cs diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index c3b520d074..86cb90fe5e 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -aa10ab9548143dbe396ae1e91e443c64473cbdc2 \ No newline at end of file +6f145c2614d8c9cc87bf358f4f93c44e3bd47fa4 \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 733547a80f..7b1ccaa049 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2294 \ No newline at end of file +v2295 \ No newline at end of file diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentAdvancedFeatureDetails.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentAdvancedFeatureDetails.cs index fba05df4b2..2056aefdfc 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentAdvancedFeatureDetails.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentAdvancedFeatureDetails.cs @@ -22,6 +22,10 @@ public class PaymentIntentAdvancedFeatureDetails : StripeEntity + { + /// + /// Timestamp at which the forced capture window expires. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(UnixDateTimeConverter))] + [STJS.JsonPropertyName("expires_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] + public DateTime? ExpiresAt { get; set; } + + /// + /// Indicates whether forced capture is supported. + /// One of: available, or unavailable. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentDetailsMoneyServices.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentDetailsMoneyServices.cs index 2db6f1ff66..e2e9ee5c00 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentDetailsMoneyServices.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentDetailsMoneyServices.cs @@ -12,6 +12,17 @@ public class PaymentIntentPaymentDetailsMoneyServices : StripeEntity + /// ID of the Account representing the beneficiary in this account funding transaction. + /// + [JsonProperty("beneficiary_account")] + [STJS.JsonPropertyName("beneficiary_account")] + public string BeneficiaryAccount { get; set; } + + [JsonProperty("beneficiary_details")] + [STJS.JsonPropertyName("beneficiary_details")] + public PaymentIntentPaymentDetailsMoneyServicesBeneficiaryDetails BeneficiaryDetails { get; set; } + /// /// The type of money services transaction. /// One of: account_funding, or debt_repayment. diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesAccountFunding.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesAccountFunding.cs index 218227c023..4d9f20d805 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesAccountFunding.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesAccountFunding.cs @@ -8,17 +8,6 @@ namespace Stripe [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class PaymentIntentPaymentDetailsMoneyServicesAccountFunding : StripeEntity { - /// - /// ID of the Account representing the beneficiary in this account funding transaction. - /// - [JsonProperty("beneficiary_account")] - [STJS.JsonPropertyName("beneficiary_account")] - public string BeneficiaryAccount { get; set; } - - [JsonProperty("beneficiary_details")] - [STJS.JsonPropertyName("beneficiary_details")] - public PaymentIntentPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetails BeneficiaryDetails { get; set; } - /// /// ID of the Account representing the sender in this account funding transaction. /// diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetails.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesBeneficiaryDetails.cs similarity index 69% rename from src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetails.cs rename to src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesBeneficiaryDetails.cs index 7c74ceb8d9..293999a91a 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetails.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesBeneficiaryDetails.cs @@ -6,15 +6,15 @@ namespace Stripe using STJS = System.Text.Json.Serialization; [STJS.JsonConverter(typeof(STJStripeEntityConverter))] - public class PaymentIntentPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetails : StripeEntity + public class PaymentIntentPaymentDetailsMoneyServicesBeneficiaryDetails : StripeEntity { [JsonProperty("address")] [STJS.JsonPropertyName("address")] - public PaymentIntentPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsAddress Address { get; set; } + public PaymentIntentPaymentDetailsMoneyServicesBeneficiaryDetailsAddress Address { get; set; } [JsonProperty("date_of_birth")] [STJS.JsonPropertyName("date_of_birth")] - public PaymentIntentPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsDateOfBirth DateOfBirth { get; set; } + public PaymentIntentPaymentDetailsMoneyServicesBeneficiaryDetailsDateOfBirth DateOfBirth { get; set; } /// /// Email address. diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsAddress.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesBeneficiaryDetailsAddress.cs similarity index 89% rename from src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsAddress.cs rename to src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesBeneficiaryDetailsAddress.cs index 1ac5547e69..77f7b0668a 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsAddress.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesBeneficiaryDetailsAddress.cs @@ -6,7 +6,7 @@ namespace Stripe using STJS = System.Text.Json.Serialization; [STJS.JsonConverter(typeof(STJStripeEntityConverter))] - public class PaymentIntentPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsAddress : StripeEntity + public class PaymentIntentPaymentDetailsMoneyServicesBeneficiaryDetailsAddress : StripeEntity { /// /// City, district, suburb, town, or village. diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsDateOfBirth.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesBeneficiaryDetailsDateOfBirth.cs similarity index 80% rename from src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsDateOfBirth.cs rename to src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesBeneficiaryDetailsDateOfBirth.cs index 0c7d4b8f0e..9b6387b550 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsDateOfBirth.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesBeneficiaryDetailsDateOfBirth.cs @@ -6,7 +6,7 @@ namespace Stripe using STJS = System.Text.Json.Serialization; [STJS.JsonConverter(typeof(STJStripeEntityConverter))] - public class PaymentIntentPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsDateOfBirth : StripeEntity + public class PaymentIntentPaymentDetailsMoneyServicesBeneficiaryDetailsDateOfBirth : StripeEntity { /// /// Day of birth, between 1 and 31. diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsCard.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsCard.cs index dabe4809aa..a93acc626b 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsCard.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsCard.cs @@ -25,6 +25,7 @@ public class PaymentIntentPaymentMethodOptionsCard : StripeEntity /// Controls when the funds will be captured from the customer's account. + /// One of: automatic_delayed, or manual. /// [JsonProperty("capture_method")] [STJS.JsonPropertyName("capture_method")] diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsCardPresent.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsCardPresent.cs index 91524369d2..224c8ed414 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsCardPresent.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsCardPresent.cs @@ -25,7 +25,7 @@ public class PaymentIntentPaymentMethodOptionsCardPresent : StripeEntity /// Controls when the funds will be captured from the customer's account. - /// One of: manual, or manual_preferred. + /// One of: automatic_delayed, manual, or manual_preferred. /// [JsonProperty("capture_method")] [STJS.JsonPropertyName("capture_method")] diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsSatispay.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsSatispay.cs index 22b31b6fda..2f5023893a 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsSatispay.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsSatispay.cs @@ -14,5 +14,30 @@ public class PaymentIntentPaymentMethodOptionsSatispay : StripeEntity + /// Indicates that you intend to make future payments with this PaymentIntent's payment + /// method. + /// + /// If you provide a Customer with the PaymentIntent, you can use this parameter to attach the payment method to + /// the Customer after the PaymentIntent is confirmed and the customer completes any + /// required actions. If you don't provide a Customer, you can still attach the payment method to a + /// Customer after the transaction completes. + /// + /// If the payment method is card_present and isn't a digital wallet, Stripe creates + /// and attaches a generated_card + /// payment method representing the card to the Customer instead. + /// + /// When processing card payments, Stripe uses setup_future_usage to help you comply + /// with regional legislation and network rules, such as SCA. + /// One of: none, off_session, or on_session. + /// + [JsonProperty("setup_future_usage")] + [STJS.JsonPropertyName("setup_future_usage")] + public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetails.cs b/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetails.cs index d2f88cbf28..862a50ed50 100644 --- a/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetails.cs +++ b/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetails.cs @@ -92,6 +92,10 @@ public class SetupAttemptPaymentMethodDetails : StripeEntity + { + } +} diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesAccountFundingOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesAccountFundingOptions.cs index c9cb4b37c9..f981f13e41 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesAccountFundingOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesAccountFundingOptions.cs @@ -8,36 +8,12 @@ namespace Stripe [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class PaymentIntentPaymentDetailsMoneyServicesAccountFundingOptions : INestedOptions, IHasSetTracking { - private PaymentIntentPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsOptions beneficiaryDetails; private PaymentIntentPaymentDetailsMoneyServicesAccountFundingSenderDetailsOptions senderDetails; [JsonIgnore] [STJS.JsonIgnore] internal SetTracker SetTracker { get; } = new SetTracker(); - /// - /// ID of the Account representing the beneficiary in this account funding transaction. - /// - [JsonProperty("beneficiary_account")] - [STJS.JsonPropertyName("beneficiary_account")] - public string BeneficiaryAccount { get; set; } - - /// - /// Inline identity details for the beneficiary of this account funding transaction. - /// - [JsonProperty("beneficiary_details", NullValueHandling = NullValueHandling.Ignore)] - [STJS.JsonPropertyName("beneficiary_details")] - [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] - public PaymentIntentPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsOptions BeneficiaryDetails - { - get => this.beneficiaryDetails; - set - { - this.beneficiaryDetails = value; - this.SetTracker.Track(); - } - } - /// /// ID of the Account representing the sender in this account funding transaction. /// diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsDateOfBirthOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesBeneficiaryDetailsDateOfBirthOptions.cs similarity index 87% rename from src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsDateOfBirthOptions.cs rename to src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesBeneficiaryDetailsDateOfBirthOptions.cs index 156b68b8a5..ec92728bc4 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsDateOfBirthOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesBeneficiaryDetailsDateOfBirthOptions.cs @@ -6,7 +6,7 @@ namespace Stripe using STJS = System.Text.Json.Serialization; [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] - public class PaymentIntentPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsDateOfBirthOptions : INestedOptions + public class PaymentIntentPaymentDetailsMoneyServicesBeneficiaryDetailsDateOfBirthOptions : INestedOptions { /// /// Day of birth, between 1 and 31. diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesBeneficiaryDetailsOptions.cs similarity index 82% rename from src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsOptions.cs rename to src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesBeneficiaryDetailsOptions.cs index a7eb1bb55e..55082c2f71 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesBeneficiaryDetailsOptions.cs @@ -6,7 +6,7 @@ namespace Stripe using STJS = System.Text.Json.Serialization; [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] - public class PaymentIntentPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsOptions : INestedOptions + public class PaymentIntentPaymentDetailsMoneyServicesBeneficiaryDetailsOptions : INestedOptions { /// /// Address. @@ -20,7 +20,7 @@ public class PaymentIntentPaymentDetailsMoneyServicesAccountFundingBeneficiaryDe /// [JsonProperty("date_of_birth")] [STJS.JsonPropertyName("date_of_birth")] - public PaymentIntentPaymentDetailsMoneyServicesAccountFundingBeneficiaryDetailsDateOfBirthOptions DateOfBirth { get; set; } + public PaymentIntentPaymentDetailsMoneyServicesBeneficiaryDetailsDateOfBirthOptions DateOfBirth { get; set; } /// /// Email address. diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesOptions.cs index af1469621a..a86beb6221 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesOptions.cs @@ -9,6 +9,7 @@ namespace Stripe public class PaymentIntentPaymentDetailsMoneyServicesOptions : INestedOptions, IHasSetTracking { private PaymentIntentPaymentDetailsMoneyServicesAccountFundingOptions accountFunding; + private PaymentIntentPaymentDetailsMoneyServicesBeneficiaryDetailsOptions beneficiaryDetails; private string transactionType; [JsonIgnore] @@ -16,7 +17,7 @@ public class PaymentIntentPaymentDetailsMoneyServicesOptions : INestedOptions, I internal SetTracker SetTracker { get; } = new SetTracker(); /// - /// Account funding transaction details including sender and beneficiary information. + /// Account funding transaction details including sender information. /// [JsonProperty("account_funding", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("account_funding")] @@ -31,6 +32,29 @@ public PaymentIntentPaymentDetailsMoneyServicesAccountFundingOptions AccountFund } } + /// + /// ID of the Account representing the beneficiary in this account funding transaction. + /// + [JsonProperty("beneficiary_account")] + [STJS.JsonPropertyName("beneficiary_account")] + public string BeneficiaryAccount { get; set; } + + /// + /// Inline identity details for the beneficiary of this transaction. + /// + [JsonProperty("beneficiary_details", NullValueHandling = NullValueHandling.Ignore)] + [STJS.JsonPropertyName("beneficiary_details")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] + public PaymentIntentPaymentDetailsMoneyServicesBeneficiaryDetailsOptions BeneficiaryDetails + { + get => this.beneficiaryDetails; + set + { + this.beneficiaryDetails = value; + this.SetTracker.Track(); + } + } + /// /// The type of money services transaction. /// One of: account_funding, or debt_repayment. diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardOptions.cs index c51d11adf1..34ef17b181 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardOptions.cs @@ -49,6 +49,7 @@ public class PaymentIntentPaymentMethodOptionsCardOptions : INestedOptions, IHas /// /// If capture_method is already set on the PaymentIntent, providing an empty value /// for this parameter unsets the stored value for this payment method type. + /// One of: automatic_delayed, or manual. /// [JsonProperty("capture_method", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("capture_method")] diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingOptions.cs index ef2f496346..84043e440f 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingOptions.cs @@ -16,12 +16,5 @@ public class PaymentIntentPaymentMethodOptionsCardPaymentDetailsMoneyServicesAcc [JsonProperty("digital_asset_category")] [STJS.JsonPropertyName("digital_asset_category")] public string DigitalAssetCategory { get; set; } - - /// - /// Details for a wallet funding transaction. - /// - [JsonProperty("wallet")] - [STJS.JsonPropertyName("wallet")] - public PaymentIntentPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingWalletOptions Wallet { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingWalletOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingWalletOptions.cs deleted file mode 100644 index c5f2601b77..0000000000 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingWalletOptions.cs +++ /dev/null @@ -1,38 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - using Newtonsoft.Json; - using Stripe.Infrastructure; - using STJS = System.Text.Json.Serialization; - - [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] - public class PaymentIntentPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingWalletOptions : INestedOptions, IHasSetTracking - { - private PaymentIntentPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingWalletStagedPurchaseOptions stagedPurchase; - - [JsonIgnore] - [STJS.JsonIgnore] - internal SetTracker SetTracker { get; } = new SetTracker(); - - /// - /// Details for a staged purchase. - /// - [JsonProperty("staged_purchase", NullValueHandling = NullValueHandling.Ignore)] - [STJS.JsonPropertyName("staged_purchase")] - [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] - public PaymentIntentPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingWalletStagedPurchaseOptions StagedPurchase - { - get => this.stagedPurchase; - set - { - this.stagedPurchase = value; - this.SetTracker.Track(); - } - } - - bool IHasSetTracking.IsPropertySet(string propertyName) - { - return this.SetTracker.IsSet(propertyName); - } - } -} diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingWalletStagedPurchaseMerchantOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingWalletStagedPurchaseMerchantOptions.cs deleted file mode 100644 index 39331d134a..0000000000 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingWalletStagedPurchaseMerchantOptions.cs +++ /dev/null @@ -1,25 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - using Newtonsoft.Json; - using Stripe.Infrastructure; - using STJS = System.Text.Json.Serialization; - - [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] - public class PaymentIntentPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingWalletStagedPurchaseMerchantOptions : INestedOptions - { - /// - /// The merchant category code of the merchant. - /// - [JsonProperty("mcc")] - [STJS.JsonPropertyName("mcc")] - public string Mcc { get; set; } - - /// - /// The merchant's name. - /// - [JsonProperty("name")] - [STJS.JsonPropertyName("name")] - public string Name { get; set; } - } -} diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingWalletStagedPurchaseOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingWalletStagedPurchaseOptions.cs deleted file mode 100644 index 161edd4186..0000000000 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingWalletStagedPurchaseOptions.cs +++ /dev/null @@ -1,18 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - using Newtonsoft.Json; - using Stripe.Infrastructure; - using STJS = System.Text.Json.Serialization; - - [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] - public class PaymentIntentPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingWalletStagedPurchaseOptions : INestedOptions - { - /// - /// The merchant where the staged wallet purchase is made. - /// - [JsonProperty("merchant")] - [STJS.JsonPropertyName("merchant")] - public PaymentIntentPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFundingWalletStagedPurchaseMerchantOptions Merchant { get; set; } - } -} diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardPresentOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardPresentOptions.cs index 0a45583139..4dc137fc59 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardPresentOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardPresentOptions.cs @@ -39,7 +39,7 @@ public class PaymentIntentPaymentMethodOptionsCardPresentOptions : INestedOption /// /// If capture_method is already set on the PaymentIntent, providing an empty value /// for this parameter unsets the stored value for this payment method type. - /// One of: manual, or manual_preferred. + /// One of: automatic_delayed, manual, or manual_preferred. /// [JsonProperty("capture_method")] [STJS.JsonPropertyName("capture_method")] diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingOptions.cs index 26a414e89e..e7bf0a1b85 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingOptions.cs @@ -16,12 +16,5 @@ public class PaymentIntentPaymentMethodOptionsCardPresentPaymentDetailsMoneyServ [JsonProperty("digital_asset_category")] [STJS.JsonPropertyName("digital_asset_category")] public string DigitalAssetCategory { get; set; } - - /// - /// Details for a wallet funding transaction. - /// - [JsonProperty("wallet")] - [STJS.JsonPropertyName("wallet")] - public PaymentIntentPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingWalletOptions Wallet { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingWalletOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingWalletOptions.cs deleted file mode 100644 index a96a36e277..0000000000 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingWalletOptions.cs +++ /dev/null @@ -1,38 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - using Newtonsoft.Json; - using Stripe.Infrastructure; - using STJS = System.Text.Json.Serialization; - - [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] - public class PaymentIntentPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingWalletOptions : INestedOptions, IHasSetTracking - { - private PaymentIntentPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingWalletStagedPurchaseOptions stagedPurchase; - - [JsonIgnore] - [STJS.JsonIgnore] - internal SetTracker SetTracker { get; } = new SetTracker(); - - /// - /// Details for a staged purchase. - /// - [JsonProperty("staged_purchase", NullValueHandling = NullValueHandling.Ignore)] - [STJS.JsonPropertyName("staged_purchase")] - [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] - public PaymentIntentPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingWalletStagedPurchaseOptions StagedPurchase - { - get => this.stagedPurchase; - set - { - this.stagedPurchase = value; - this.SetTracker.Track(); - } - } - - bool IHasSetTracking.IsPropertySet(string propertyName) - { - return this.SetTracker.IsSet(propertyName); - } - } -} diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingWalletStagedPurchaseMerchantOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingWalletStagedPurchaseMerchantOptions.cs deleted file mode 100644 index 8597f5b1b7..0000000000 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingWalletStagedPurchaseMerchantOptions.cs +++ /dev/null @@ -1,25 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - using Newtonsoft.Json; - using Stripe.Infrastructure; - using STJS = System.Text.Json.Serialization; - - [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] - public class PaymentIntentPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingWalletStagedPurchaseMerchantOptions : INestedOptions - { - /// - /// The merchant category code of the merchant. - /// - [JsonProperty("mcc")] - [STJS.JsonPropertyName("mcc")] - public string Mcc { get; set; } - - /// - /// The merchant's name. - /// - [JsonProperty("name")] - [STJS.JsonPropertyName("name")] - public string Name { get; set; } - } -} diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingWalletStagedPurchaseOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingWalletStagedPurchaseOptions.cs deleted file mode 100644 index 9edf221c15..0000000000 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingWalletStagedPurchaseOptions.cs +++ /dev/null @@ -1,18 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - using Newtonsoft.Json; - using Stripe.Infrastructure; - using STJS = System.Text.Json.Serialization; - - [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] - public class PaymentIntentPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingWalletStagedPurchaseOptions : INestedOptions - { - /// - /// The merchant where the staged wallet purchase is made. - /// - [JsonProperty("merchant")] - [STJS.JsonPropertyName("merchant")] - public PaymentIntentPaymentMethodOptionsCardPresentPaymentDetailsMoneyServicesAccountFundingWalletStagedPurchaseMerchantOptions Merchant { get; set; } - } -} diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsSatispayOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsSatispayOptions.cs index 582e277a09..e1a867e138 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsSatispayOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsSatispayOptions.cs @@ -9,6 +9,7 @@ namespace Stripe public class PaymentIntentPaymentMethodOptionsSatispayOptions : INestedOptions, IHasSetTracking { private string captureMethod; + private string setupFutureUsage; [JsonIgnore] [STJS.JsonIgnore] @@ -37,6 +38,40 @@ public string CaptureMethod } } + /// + /// Indicates that you intend to make future payments with this PaymentIntent's payment + /// method. + /// + /// If you provide a Customer with the PaymentIntent, you can use this parameter to attach the payment method to + /// the Customer after the PaymentIntent is confirmed and the customer completes any + /// required actions. If you don't provide a Customer, you can still attach the payment method to a + /// Customer after the transaction completes. + /// + /// If the payment method is card_present and isn't a digital wallet, Stripe creates + /// and attaches a generated_card + /// payment method representing the card to the Customer instead. + /// + /// When processing card payments, Stripe uses setup_future_usage to help you comply + /// with regional legislation and network rules, such as SCA. + /// One of: none, off_session, or on_session. + /// + [JsonProperty("setup_future_usage", NullValueHandling = NullValueHandling.Ignore)] + [STJS.JsonPropertyName("setup_future_usage")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] + public string SetupFutureUsage + { + get => this.setupFutureUsage; + set + { + this.setupFutureUsage = value; + this.SetTracker.Track(); + } + } + bool IHasSetTracking.IsPropertySet(string propertyName) { return this.SetTracker.IsSet(propertyName); diff --git a/src/Stripe.net/Services/PaymentRecords/PaymentRecordPaymentMethodDetailsCardChecksOptions.cs b/src/Stripe.net/Services/PaymentRecords/PaymentRecordPaymentMethodDetailsCardChecksOptions.cs new file mode 100644 index 0000000000..133199d116 --- /dev/null +++ b/src/Stripe.net/Services/PaymentRecords/PaymentRecordPaymentMethodDetailsCardChecksOptions.cs @@ -0,0 +1,35 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class PaymentRecordPaymentMethodDetailsCardChecksOptions : INestedOptions + { + /// + /// The result of the check on the cardholder's address line 1. + /// One of: fail, pass, unavailable, or unchecked. + /// + [JsonProperty("address_line1_check")] + [STJS.JsonPropertyName("address_line1_check")] + public string AddressLine1Check { get; set; } + + /// + /// The result of the check on the cardholder's postal code. + /// One of: fail, pass, unavailable, or unchecked. + /// + [JsonProperty("address_postal_code_check")] + [STJS.JsonPropertyName("address_postal_code_check")] + public string AddressPostalCodeCheck { get; set; } + + /// + /// The result of the check on the card's CVC. + /// One of: fail, pass, unavailable, or unchecked. + /// + [JsonProperty("cvc_check")] + [STJS.JsonPropertyName("cvc_check")] + public string CvcCheck { get; set; } + } +} diff --git a/src/Stripe.net/Services/PaymentRecords/PaymentRecordPaymentMethodDetailsCardOptions.cs b/src/Stripe.net/Services/PaymentRecords/PaymentRecordPaymentMethodDetailsCardOptions.cs new file mode 100644 index 0000000000..46d7a3a35c --- /dev/null +++ b/src/Stripe.net/Services/PaymentRecords/PaymentRecordPaymentMethodDetailsCardOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class PaymentRecordPaymentMethodDetailsCardOptions : INestedOptions + { + /// + /// Verification checks performed on the card. + /// + [JsonProperty("checks")] + [STJS.JsonPropertyName("checks")] + public PaymentRecordPaymentMethodDetailsCardChecksOptions Checks { get; set; } + } +} diff --git a/src/Stripe.net/Services/PaymentRecords/PaymentRecordPaymentMethodDetailsOptions.cs b/src/Stripe.net/Services/PaymentRecords/PaymentRecordPaymentMethodDetailsOptions.cs index c2802aa457..bfa685e896 100644 --- a/src/Stripe.net/Services/PaymentRecords/PaymentRecordPaymentMethodDetailsOptions.cs +++ b/src/Stripe.net/Services/PaymentRecords/PaymentRecordPaymentMethodDetailsOptions.cs @@ -15,6 +15,13 @@ public class PaymentRecordPaymentMethodDetailsOptions : INestedOptions [STJS.JsonPropertyName("billing_details")] public PaymentRecordPaymentMethodDetailsBillingDetailsOptions BillingDetails { get; set; } + /// + /// Information about the card payment method used to make this payment. + /// + [JsonProperty("card")] + [STJS.JsonPropertyName("card")] + public PaymentRecordPaymentMethodDetailsCardOptions Card { get; set; } + /// /// Information about the custom (user-defined) payment method used to make this payment. /// @@ -33,6 +40,7 @@ public class PaymentRecordPaymentMethodDetailsOptions : INestedOptions /// The type of the payment method details. An additional hash is included on the /// payment_method_details with a name matching this value. It contains additional /// information specific to the type. + /// One of: card, or custom. /// [JsonProperty("type")] [STJS.JsonPropertyName("type")] diff --git a/src/Stripe.net/Services/Radar/CustomerEvaluations/CustomerEvaluationGetOptions.cs b/src/Stripe.net/Services/Radar/CustomerEvaluations/CustomerEvaluationGetOptions.cs new file mode 100644 index 0000000000..8d6fb3ff29 --- /dev/null +++ b/src/Stripe.net/Services/Radar/CustomerEvaluations/CustomerEvaluationGetOptions.cs @@ -0,0 +1,12 @@ +// File generated from our OpenAPI spec +namespace Stripe.Radar +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class CustomerEvaluationGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/Radar/CustomerEvaluations/CustomerEvaluationService.cs b/src/Stripe.net/Services/Radar/CustomerEvaluations/CustomerEvaluationService.cs index 5f94cbd763..63793279b0 100644 --- a/src/Stripe.net/Services/Radar/CustomerEvaluations/CustomerEvaluationService.cs +++ b/src/Stripe.net/Services/Radar/CustomerEvaluations/CustomerEvaluationService.cs @@ -9,6 +9,7 @@ namespace Stripe.Radar public class CustomerEvaluationService : Service, ICreatable, + IRetrievable, IUpdatable { public CustomerEvaluationService() @@ -41,6 +42,22 @@ public virtual Task CreateAsync(CustomerEvaluationCreateOpti return this.RequestAsync(BaseAddress.Api, HttpMethod.Post, $"/v1/radar/customer_evaluations", options, requestOptions, cancellationToken); } + /// + ///

Retrieves an CustomerEvaluation object.

. + ///
+ public virtual CustomerEvaluation Get(string id, CustomerEvaluationGetOptions options = null, RequestOptions requestOptions = null) + { + return this.Request(BaseAddress.Api, HttpMethod.Get, $"/v1/radar/customer_evaluations/{WebUtility.UrlEncode(id)}", options, requestOptions); + } + + /// + ///

Retrieves an CustomerEvaluation object.

. + ///
+ public virtual Task GetAsync(string id, CustomerEvaluationGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.RequestAsync(BaseAddress.Api, HttpMethod.Get, $"/v1/radar/customer_evaluations/{WebUtility.UrlEncode(id)}", options, requestOptions, cancellationToken); + } + /// ///

Reports an event on a CustomerEvaluation object.

. ///
From 058bba32ae32a768256f617dfbc9bae504b2214a Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 12 Jun 2026 09:02:30 +0000 Subject: [PATCH 02/15] Update generated code for v2297 and 3111dcf5bcfa362f9fc8da776e0892504ed566d3 --- CODEGEN_VERSION | 2 +- OPENAPI_VERSION | 2 +- ...nCurrentAttemptPaymentMethodDetailsCard.cs | 12 ------- ...ionCryptoDisplayDetailsDepositAddresses.cs | 8 +++++ ...tailsDepositAddressesBaseSupportedToken.cs | 3 +- ...oDisplayDetailsDepositAddressesEthereum.cs | 33 +++++++++++++++++ ...sDepositAddressesEthereumSupportedToken.cs | 26 ++++++++++++++ ...toDisplayDetailsDepositAddressesPolygon.cs | 33 +++++++++++++++++ ...lsDepositAddressesPolygonSupportedToken.cs | 26 ++++++++++++++ ...ilsDepositAddressesSolanaSupportedToken.cs | 3 +- ...ailsDepositAddressesTempoSupportedToken.cs | 3 +- ...oneyServicesAccountFundingSenderDetails.cs | 15 +++++--- ...tDetailsMoneyServicesBeneficiaryDetails.cs | 15 +++++--- ...aymentMethodOptionsCryptoDepositOptions.cs | 2 +- ...ymentIntentPaymentMethodOptionsSatispay.cs | 25 ------------- src/Stripe.net/Entities/Products/Product.cs | 4 +++ .../Products/ProductManagedPayments.cs | 29 +++++++++++++++ ...oductManagedPaymentsIneligibilityReason.cs | 28 +++++++++++++++ .../SetupAttemptPaymentMethodDetails.cs | 4 --- ...etupAttemptPaymentMethodDetailsSatispay.cs | 12 ------- ...tailsMoneyServicesAccountFundingOptions.cs | 7 ---- ...vicesAccountFundingSenderDetailsOptions.cs | 15 +++++--- ...sMoneyServicesBeneficiaryDetailsOptions.cs | 23 +++++++++--- ...ntentPaymentDetailsMoneyServicesOptions.cs | 7 ---- ...ethodOptionsCryptoDepositOptionsOptions.cs | 2 +- ...tentPaymentMethodOptionsSatispayOptions.cs | 35 ------------------- ...ymentIntentSimulateCryptoDepositOptions.cs | 3 +- 27 files changed, 251 insertions(+), 126 deletions(-) create mode 100644 src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionCryptoDisplayDetailsDepositAddressesEthereum.cs create mode 100644 src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionCryptoDisplayDetailsDepositAddressesEthereumSupportedToken.cs create mode 100644 src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionCryptoDisplayDetailsDepositAddressesPolygon.cs create mode 100644 src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionCryptoDisplayDetailsDepositAddressesPolygonSupportedToken.cs create mode 100644 src/Stripe.net/Entities/Products/ProductManagedPayments.cs create mode 100644 src/Stripe.net/Entities/Products/ProductManagedPaymentsIneligibilityReason.cs delete mode 100644 src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetailsSatispay.cs diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index 86cb90fe5e..4cdf42b0f9 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -6f145c2614d8c9cc87bf358f4f93c44e3bd47fa4 \ No newline at end of file +3111dcf5bcfa362f9fc8da776e0892504ed566d3 \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 7b1ccaa049..ca72a77cb9 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2295 \ No newline at end of file +v2297 \ No newline at end of file diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionCurrentAttemptPaymentMethodDetailsCard.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionCurrentAttemptPaymentMethodDetailsCard.cs index 7c9e3eb87e..3ca3af03e4 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionCurrentAttemptPaymentMethodDetailsCard.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionCurrentAttemptPaymentMethodDetailsCard.cs @@ -8,18 +8,6 @@ namespace Stripe.Checkout [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class SessionCurrentAttemptPaymentMethodDetailsCard : StripeEntity { - /// - /// The brand of the card, accounting for customer's brand choice on dual-branded cards. - /// One of: accel, amex, carnet, cartes_bancaires, - /// conecs, diners, discover, eftpos_au, elo, - /// girocard, interac, jaywan, jcb, link, maestro, - /// mastercard, nyce, pulse, rupay, star, - /// unionpay, unknown, or visa. - /// - [JsonProperty("brand")] - [STJS.JsonPropertyName("brand")] - public string Brand { get; set; } - /// /// Two-letter ISO code representing the country of the card. You could use this attribute /// to get a sense of the international breakdown of cards you've collected. diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionCryptoDisplayDetailsDepositAddresses.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionCryptoDisplayDetailsDepositAddresses.cs index 4d90fceff0..d1ec98ac02 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionCryptoDisplayDetailsDepositAddresses.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionCryptoDisplayDetailsDepositAddresses.cs @@ -12,6 +12,14 @@ public class PaymentIntentNextActionCryptoDisplayDetailsDepositAddresses : Strip [STJS.JsonPropertyName("base")] public PaymentIntentNextActionCryptoDisplayDetailsDepositAddressesBase Base { get; set; } + [JsonProperty("ethereum")] + [STJS.JsonPropertyName("ethereum")] + public PaymentIntentNextActionCryptoDisplayDetailsDepositAddressesEthereum Ethereum { get; set; } + + [JsonProperty("polygon")] + [STJS.JsonPropertyName("polygon")] + public PaymentIntentNextActionCryptoDisplayDetailsDepositAddressesPolygon Polygon { get; set; } + [JsonProperty("solana")] [STJS.JsonPropertyName("solana")] public PaymentIntentNextActionCryptoDisplayDetailsDepositAddressesSolana Solana { get; set; } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionCryptoDisplayDetailsDepositAddressesBaseSupportedToken.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionCryptoDisplayDetailsDepositAddressesBaseSupportedToken.cs index e456f117c1..522739d20a 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionCryptoDisplayDetailsDepositAddressesBaseSupportedToken.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionCryptoDisplayDetailsDepositAddressesBaseSupportedToken.cs @@ -16,7 +16,8 @@ public class PaymentIntentNextActionCryptoDisplayDetailsDepositAddressesBaseSupp public string TokenContractAddress { get; set; } /// - /// The supported token currency. Supported token currencies include: usdc. + /// The supported token currency. + /// One of: usdc, usdg, or usdp. /// [JsonProperty("token_currency")] [STJS.JsonPropertyName("token_currency")] diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionCryptoDisplayDetailsDepositAddressesEthereum.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionCryptoDisplayDetailsDepositAddressesEthereum.cs new file mode 100644 index 0000000000..e64fc25836 --- /dev/null +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionCryptoDisplayDetailsDepositAddressesEthereum.cs @@ -0,0 +1,33 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using System.Collections.Generic; + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class PaymentIntentNextActionCryptoDisplayDetailsDepositAddressesEthereum : StripeEntity + { + /// + /// Address of the deposit address. + /// + [JsonProperty("address")] + [STJS.JsonPropertyName("address")] + public string Address { get; set; } + + /// + /// The wallet address that should receive refunds for deposits on this network. + /// + [JsonProperty("refund_address")] + [STJS.JsonPropertyName("refund_address")] + public string RefundAddress { get; set; } + + /// + /// The token currencies supported on this network. + /// + [JsonProperty("supported_tokens")] + [STJS.JsonPropertyName("supported_tokens")] + public List SupportedTokens { get; set; } + } +} diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionCryptoDisplayDetailsDepositAddressesEthereumSupportedToken.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionCryptoDisplayDetailsDepositAddressesEthereumSupportedToken.cs new file mode 100644 index 0000000000..5c5791b030 --- /dev/null +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionCryptoDisplayDetailsDepositAddressesEthereumSupportedToken.cs @@ -0,0 +1,26 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class PaymentIntentNextActionCryptoDisplayDetailsDepositAddressesEthereumSupportedToken : StripeEntity + { + /// + /// The on-chain contract address for the supported token currency on this specific network. + /// + [JsonProperty("token_contract_address")] + [STJS.JsonPropertyName("token_contract_address")] + public string TokenContractAddress { get; set; } + + /// + /// The supported token currency. + /// One of: usdc, usdg, or usdp. + /// + [JsonProperty("token_currency")] + [STJS.JsonPropertyName("token_currency")] + public string TokenCurrency { get; set; } + } +} diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionCryptoDisplayDetailsDepositAddressesPolygon.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionCryptoDisplayDetailsDepositAddressesPolygon.cs new file mode 100644 index 0000000000..653eea0523 --- /dev/null +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionCryptoDisplayDetailsDepositAddressesPolygon.cs @@ -0,0 +1,33 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using System.Collections.Generic; + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class PaymentIntentNextActionCryptoDisplayDetailsDepositAddressesPolygon : StripeEntity + { + /// + /// Address of the deposit address. + /// + [JsonProperty("address")] + [STJS.JsonPropertyName("address")] + public string Address { get; set; } + + /// + /// The wallet address that should receive refunds for deposits on this network. + /// + [JsonProperty("refund_address")] + [STJS.JsonPropertyName("refund_address")] + public string RefundAddress { get; set; } + + /// + /// The token currencies supported on this network. + /// + [JsonProperty("supported_tokens")] + [STJS.JsonPropertyName("supported_tokens")] + public List SupportedTokens { get; set; } + } +} diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionCryptoDisplayDetailsDepositAddressesPolygonSupportedToken.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionCryptoDisplayDetailsDepositAddressesPolygonSupportedToken.cs new file mode 100644 index 0000000000..850020da88 --- /dev/null +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionCryptoDisplayDetailsDepositAddressesPolygonSupportedToken.cs @@ -0,0 +1,26 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class PaymentIntentNextActionCryptoDisplayDetailsDepositAddressesPolygonSupportedToken : StripeEntity + { + /// + /// The on-chain contract address for the supported token currency on this specific network. + /// + [JsonProperty("token_contract_address")] + [STJS.JsonPropertyName("token_contract_address")] + public string TokenContractAddress { get; set; } + + /// + /// The supported token currency. + /// One of: usdc, usdg, or usdp. + /// + [JsonProperty("token_currency")] + [STJS.JsonPropertyName("token_currency")] + public string TokenCurrency { get; set; } + } +} diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionCryptoDisplayDetailsDepositAddressesSolanaSupportedToken.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionCryptoDisplayDetailsDepositAddressesSolanaSupportedToken.cs index ec88248471..ae65349de5 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionCryptoDisplayDetailsDepositAddressesSolanaSupportedToken.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionCryptoDisplayDetailsDepositAddressesSolanaSupportedToken.cs @@ -16,7 +16,8 @@ public class PaymentIntentNextActionCryptoDisplayDetailsDepositAddressesSolanaSu public string TokenContractAddress { get; set; } /// - /// The supported token currency. Supported token currencies include: usdc. + /// The supported token currency. + /// One of: usdc, usdg, or usdp. /// [JsonProperty("token_currency")] [STJS.JsonPropertyName("token_currency")] diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionCryptoDisplayDetailsDepositAddressesTempoSupportedToken.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionCryptoDisplayDetailsDepositAddressesTempoSupportedToken.cs index 5efce935ae..20e7522750 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionCryptoDisplayDetailsDepositAddressesTempoSupportedToken.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionCryptoDisplayDetailsDepositAddressesTempoSupportedToken.cs @@ -16,7 +16,8 @@ public class PaymentIntentNextActionCryptoDisplayDetailsDepositAddressesTempoSup public string TokenContractAddress { get; set; } /// - /// The supported token currency. Supported token currencies include: usdc. + /// The supported token currency. + /// One of: usdc, usdg, or usdp. /// [JsonProperty("token_currency")] [STJS.JsonPropertyName("token_currency")] diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesAccountFundingSenderDetails.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesAccountFundingSenderDetails.cs index 7968ff70ce..217137ae3d 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesAccountFundingSenderDetails.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesAccountFundingSenderDetails.cs @@ -24,11 +24,11 @@ public class PaymentIntentPaymentDetailsMoneyServicesAccountFundingSenderDetails public string Email { get; set; } /// - /// Full name. + /// Given name (first name). /// - [JsonProperty("name")] - [STJS.JsonPropertyName("name")] - public string Name { get; set; } + [JsonProperty("given_name")] + [STJS.JsonPropertyName("given_name")] + public string GivenName { get; set; } /// /// Phone number. @@ -36,5 +36,12 @@ public class PaymentIntentPaymentDetailsMoneyServicesAccountFundingSenderDetails [JsonProperty("phone")] [STJS.JsonPropertyName("phone")] public string Phone { get; set; } + + /// + /// Surname (last name). + /// + [JsonProperty("surname")] + [STJS.JsonPropertyName("surname")] + public string Surname { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesBeneficiaryDetails.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesBeneficiaryDetails.cs index 293999a91a..e98022a1bd 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesBeneficiaryDetails.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesBeneficiaryDetails.cs @@ -24,11 +24,11 @@ public class PaymentIntentPaymentDetailsMoneyServicesBeneficiaryDetails : Stripe public string Email { get; set; } /// - /// Full name. + /// Given name (first name). /// - [JsonProperty("name")] - [STJS.JsonPropertyName("name")] - public string Name { get; set; } + [JsonProperty("given_name")] + [STJS.JsonPropertyName("given_name")] + public string GivenName { get; set; } /// /// Phone number. @@ -36,5 +36,12 @@ public class PaymentIntentPaymentDetailsMoneyServicesBeneficiaryDetails : Stripe [JsonProperty("phone")] [STJS.JsonPropertyName("phone")] public string Phone { get; set; } + + /// + /// Surname (last name). + /// + [JsonProperty("surname")] + [STJS.JsonPropertyName("surname")] + public string Surname { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsCryptoDepositOptions.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsCryptoDepositOptions.cs index 9b1fb5b652..f162cab52c 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsCryptoDepositOptions.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsCryptoDepositOptions.cs @@ -13,7 +13,7 @@ public class PaymentIntentPaymentMethodOptionsCryptoDepositOptions : StripeEntit /// The blockchain networks to support for deposits. Learn more about supported /// networks and tokens. - /// One of: base, solana, or tempo. + /// One of: base, ethereum, polygon, solana, or tempo. /// [JsonProperty("networks")] [STJS.JsonPropertyName("networks")] diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsSatispay.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsSatispay.cs index 2f5023893a..22b31b6fda 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsSatispay.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsSatispay.cs @@ -14,30 +14,5 @@ public class PaymentIntentPaymentMethodOptionsSatispay : StripeEntity - /// Indicates that you intend to make future payments with this PaymentIntent's payment - /// method. - /// - /// If you provide a Customer with the PaymentIntent, you can use this parameter to attach the payment method to - /// the Customer after the PaymentIntent is confirmed and the customer completes any - /// required actions. If you don't provide a Customer, you can still attach the payment method to a - /// Customer after the transaction completes. - /// - /// If the payment method is card_present and isn't a digital wallet, Stripe creates - /// and attaches a generated_card - /// payment method representing the card to the Customer instead. - /// - /// When processing card payments, Stripe uses setup_future_usage to help you comply - /// with regional legislation and network rules, such as SCA. - /// One of: none, off_session, or on_session. - /// - [JsonProperty("setup_future_usage")] - [STJS.JsonPropertyName("setup_future_usage")] - public string SetupFutureUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/Products/Product.cs b/src/Stripe.net/Entities/Products/Product.cs index ccc36c6c9d..194dc75980 100644 --- a/src/Stripe.net/Entities/Products/Product.cs +++ b/src/Stripe.net/Entities/Products/Product.cs @@ -129,6 +129,10 @@ public Price DefaultPrice [STJS.JsonPropertyName("livemode")] public bool Livemode { get; set; } + [JsonProperty("managed_payments")] + [STJS.JsonPropertyName("managed_payments")] + public ProductManagedPayments ManagedPayments { get; set; } + /// /// A list of up to 15 marketing features for this product. These are displayed in pricing tables. diff --git a/src/Stripe.net/Entities/Products/ProductManagedPayments.cs b/src/Stripe.net/Entities/Products/ProductManagedPayments.cs new file mode 100644 index 0000000000..9ee21e34eb --- /dev/null +++ b/src/Stripe.net/Entities/Products/ProductManagedPayments.cs @@ -0,0 +1,29 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using System.Collections.Generic; + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class ProductManagedPayments : StripeEntity + { + /// + /// Whether this product is eligible for use with Managed Payments. Possible values are + /// eligible and ineligible. + /// One of: eligible, or ineligible. + /// + [JsonProperty("eligibility")] + [STJS.JsonPropertyName("eligibility")] + public string Eligibility { get; set; } + + /// + /// The reasons this product is ineligible for use with Managed Payments, if any. This field + /// isn't present if the product is eligible. + /// + [JsonProperty("ineligibility_reasons")] + [STJS.JsonPropertyName("ineligibility_reasons")] + public List IneligibilityReasons { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Products/ProductManagedPaymentsIneligibilityReason.cs b/src/Stripe.net/Entities/Products/ProductManagedPaymentsIneligibilityReason.cs new file mode 100644 index 0000000000..ae275fb525 --- /dev/null +++ b/src/Stripe.net/Entities/Products/ProductManagedPaymentsIneligibilityReason.cs @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class ProductManagedPaymentsIneligibilityReason : StripeEntity + { + /// + /// A code identifying the reason this product can't be used with Managed Payments. + /// Additional values might be added as Managed Payments evolves its eligibility criteria. + /// One of: ineligible_tax_code, or no_tax_code_specified. + /// + [JsonProperty("code")] + [STJS.JsonPropertyName("code")] + public string Code { get; set; } + + /// + /// A human-readable description of the reason this product can't be used with Managed + /// Payments. + /// + [JsonProperty("message")] + [STJS.JsonPropertyName("message")] + public string Message { get; set; } + } +} diff --git a/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetails.cs b/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetails.cs index 862a50ed50..d2f88cbf28 100644 --- a/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetails.cs +++ b/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetails.cs @@ -92,10 +92,6 @@ public class SetupAttemptPaymentMethodDetails : StripeEntity - { - } -} diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesAccountFundingOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesAccountFundingOptions.cs index f981f13e41..02fcd16fd0 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesAccountFundingOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesAccountFundingOptions.cs @@ -14,13 +14,6 @@ public class PaymentIntentPaymentDetailsMoneyServicesAccountFundingOptions : INe [STJS.JsonIgnore] internal SetTracker SetTracker { get; } = new SetTracker(); - /// - /// ID of the Account representing the sender in this account funding transaction. - /// - [JsonProperty("sender_account")] - [STJS.JsonPropertyName("sender_account")] - public string SenderAccount { get; set; } - /// /// Inline identity details for the sender of this account funding transaction. /// diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesAccountFundingSenderDetailsOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesAccountFundingSenderDetailsOptions.cs index c6211c1cca..9b79a355a4 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesAccountFundingSenderDetailsOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesAccountFundingSenderDetailsOptions.cs @@ -30,11 +30,11 @@ public class PaymentIntentPaymentDetailsMoneyServicesAccountFundingSenderDetails public string Email { get; set; } /// - /// Full name. + /// Given (first) name. /// - [JsonProperty("name")] - [STJS.JsonPropertyName("name")] - public string Name { get; set; } + [JsonProperty("given_name")] + [STJS.JsonPropertyName("given_name")] + public string GivenName { get; set; } /// /// Phone number. @@ -42,5 +42,12 @@ public class PaymentIntentPaymentDetailsMoneyServicesAccountFundingSenderDetails [JsonProperty("phone")] [STJS.JsonPropertyName("phone")] public string Phone { get; set; } + + /// + /// Surname (family name). + /// + [JsonProperty("surname")] + [STJS.JsonPropertyName("surname")] + public string Surname { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesBeneficiaryDetailsOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesBeneficiaryDetailsOptions.cs index 55082c2f71..6cf9e95f1d 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesBeneficiaryDetailsOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesBeneficiaryDetailsOptions.cs @@ -8,6 +8,14 @@ namespace Stripe [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class PaymentIntentPaymentDetailsMoneyServicesBeneficiaryDetailsOptions : INestedOptions { + /// + /// An opaque identifier for the beneficiary's account (e.g. bank account number, card + /// first6+last4, or other unique identifier). + /// + [JsonProperty("account_reference")] + [STJS.JsonPropertyName("account_reference")] + public string AccountReference { get; set; } + /// /// Address. /// @@ -30,11 +38,11 @@ public class PaymentIntentPaymentDetailsMoneyServicesBeneficiaryDetailsOptions : public string Email { get; set; } /// - /// Full name. + /// Given (first) name. /// - [JsonProperty("name")] - [STJS.JsonPropertyName("name")] - public string Name { get; set; } + [JsonProperty("given_name")] + [STJS.JsonPropertyName("given_name")] + public string GivenName { get; set; } /// /// Phone number. @@ -42,5 +50,12 @@ public class PaymentIntentPaymentDetailsMoneyServicesBeneficiaryDetailsOptions : [JsonProperty("phone")] [STJS.JsonPropertyName("phone")] public string Phone { get; set; } + + /// + /// Surname (family name). + /// + [JsonProperty("surname")] + [STJS.JsonPropertyName("surname")] + public string Surname { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesOptions.cs index a86beb6221..41dd9aff5b 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentDetailsMoneyServicesOptions.cs @@ -32,13 +32,6 @@ public PaymentIntentPaymentDetailsMoneyServicesAccountFundingOptions AccountFund } } - /// - /// ID of the Account representing the beneficiary in this account funding transaction. - /// - [JsonProperty("beneficiary_account")] - [STJS.JsonPropertyName("beneficiary_account")] - public string BeneficiaryAccount { get; set; } - /// /// Inline identity details for the beneficiary of this transaction. /// diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCryptoDepositOptionsOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCryptoDepositOptionsOptions.cs index 9e66b0d94f..d862e9e373 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCryptoDepositOptionsOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCryptoDepositOptionsOptions.cs @@ -13,7 +13,7 @@ public class PaymentIntentPaymentMethodOptionsCryptoDepositOptionsOptions : INes /// The blockchain networks to support for deposits. Learn more about supported /// networks and tokens. - /// One of: base, solana, or tempo. + /// One of: base, ethereum, polygon, solana, or tempo. /// [JsonProperty("networks")] [STJS.JsonPropertyName("networks")] diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsSatispayOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsSatispayOptions.cs index e1a867e138..582e277a09 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsSatispayOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsSatispayOptions.cs @@ -9,7 +9,6 @@ namespace Stripe public class PaymentIntentPaymentMethodOptionsSatispayOptions : INestedOptions, IHasSetTracking { private string captureMethod; - private string setupFutureUsage; [JsonIgnore] [STJS.JsonIgnore] @@ -38,40 +37,6 @@ public string CaptureMethod } } - /// - /// Indicates that you intend to make future payments with this PaymentIntent's payment - /// method. - /// - /// If you provide a Customer with the PaymentIntent, you can use this parameter to attach the payment method to - /// the Customer after the PaymentIntent is confirmed and the customer completes any - /// required actions. If you don't provide a Customer, you can still attach the payment method to a - /// Customer after the transaction completes. - /// - /// If the payment method is card_present and isn't a digital wallet, Stripe creates - /// and attaches a generated_card - /// payment method representing the card to the Customer instead. - /// - /// When processing card payments, Stripe uses setup_future_usage to help you comply - /// with regional legislation and network rules, such as SCA. - /// One of: none, off_session, or on_session. - /// - [JsonProperty("setup_future_usage", NullValueHandling = NullValueHandling.Ignore)] - [STJS.JsonPropertyName("setup_future_usage")] - [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] - public string SetupFutureUsage - { - get => this.setupFutureUsage; - set - { - this.setupFutureUsage = value; - this.SetTracker.Track(); - } - } - bool IHasSetTracking.IsPropertySet(string propertyName) { return this.SetTracker.IsSet(propertyName); diff --git a/src/Stripe.net/Services/TestHelpers/PaymentIntents/PaymentIntentSimulateCryptoDepositOptions.cs b/src/Stripe.net/Services/TestHelpers/PaymentIntents/PaymentIntentSimulateCryptoDepositOptions.cs index 10aef2df7b..fe7f3c6d82 100644 --- a/src/Stripe.net/Services/TestHelpers/PaymentIntents/PaymentIntentSimulateCryptoDepositOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/PaymentIntents/PaymentIntentSimulateCryptoDepositOptions.cs @@ -17,7 +17,7 @@ public class PaymentIntentSimulateCryptoDepositOptions : BaseOptions /// /// The blockchain network of the simulated crypto deposit. - /// One of: base, solana, or tempo. + /// One of: base, ethereum, polygon, solana, or tempo. /// [JsonProperty("network")] [STJS.JsonPropertyName("network")] @@ -25,6 +25,7 @@ public class PaymentIntentSimulateCryptoDepositOptions : BaseOptions /// /// The token currency of the simulated crypto deposit. + /// One of: usdc, usdg, or usdp. /// [JsonProperty("token_currency")] [STJS.JsonPropertyName("token_currency")] From 45112c0e156e062c598e0891c14a555c3bfc88a8 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 12 Jun 2026 17:47:00 +0000 Subject: [PATCH 03/15] Update generated code for v2299 and 161b47dfc5d5f9332c906a572b90ce8551a2f752 --- CODEGEN_VERSION | 2 +- OPENAPI_VERSION | 2 +- .../Charges/ChargePaymentMethodDetails.cs | 4 ++ .../ChargePaymentMethodDetailsTamara.cs | 18 +++++++++ .../ConfirmationTokenPaymentMethodPreview.cs | 8 +++- ...irmationTokenPaymentMethodPreviewTamara.cs | 12 ++++++ ...ntSettingsPaymentMethodOptionsWechatPay.cs | 10 ++++- ...aymentAttemptRecordPaymentMethodDetails.cs | 4 ++ ...AttemptRecordPaymentMethodDetailsTamara.cs | 18 +++++++++ .../Entities/PaymentIntents/PaymentIntent.cs | 4 +- .../PaymentIntents/PaymentIntentNextAction.cs | 4 ++ ...entNextActionWechatPayHandleAppRedirect.cs | 18 +++++++++ ...mentIntentPaymentMethodOptionsWechatPay.cs | 10 ++++- .../Entities/PaymentMethods/PaymentMethod.cs | 8 +++- .../PaymentMethods/PaymentMethodTamara.cs | 12 ++++++ .../PaymentRecordPaymentMethodDetails.cs | 4 ++ ...PaymentRecordPaymentMethodDetailsTamara.cs | 18 +++++++++ .../Entities/SetupIntents/SetupIntent.cs | 4 +- .../SetupIntents/SetupIntentNextAction.cs | 4 ++ ...entNextActionWechatPayHandleAppRedirect.cs | 18 +++++++++ .../GrantedTokenPaymentMethodDetails.cs | 8 +++- .../GrantedTokenPaymentMethodDetailsTamara.cs | 12 ++++++ ...rCapabilitiesCommercialCelticChargeCard.cs | 7 ++++ ...esCommercialCelticChargeCardProtections.cs | 18 +++++++++ ...CelticChargeCardProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...orCapabilitiesCommercialCelticSpendCard.cs | 7 ++++ ...iesCommercialCelticSpendCardProtections.cs | 18 +++++++++ ...lCelticSpendCardProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...itiesCommercialCrossRiverBankChargeCard.cs | 7 ++++ ...cialCrossRiverBankChargeCardProtections.cs | 18 +++++++++ ...erBankChargeCardProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...tiesCommercialCrossRiverBankPrepaidCard.cs | 7 ++++ ...ialCrossRiverBankPrepaidCardProtections.cs | 18 +++++++++ ...rBankPrepaidCardProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...litiesCommercialCrossRiverBankSpendCard.cs | 7 ++++ ...rcialCrossRiverBankSpendCardProtections.cs | 18 +++++++++ ...verBankSpendCardProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...abilitiesCommercialFifthThirdChargeCard.cs | 7 ++++ ...mmercialFifthThirdChargeCardProtections.cs | 18 +++++++++ ...hThirdChargeCardProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...orCapabilitiesCommercialLeadPrepaidCard.cs | 7 ++++ ...iesCommercialLeadPrepaidCardProtections.cs | 18 +++++++++ ...lLeadPrepaidCardProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...rCapabilitiesCommercialStripeChargeCard.cs | 7 ++++ ...esCommercialStripeChargeCardProtections.cs | 18 +++++++++ ...StripeChargeCardProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...CapabilitiesCommercialStripePrepaidCard.cs | 7 ++++ ...sCommercialStripePrepaidCardProtections.cs | 18 +++++++++ ...tripePrepaidCardProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...litiesConsumerCelticRevolvingCreditCard.cs | 7 ++++ ...merCelticRevolvingCreditCardProtections.cs | 18 +++++++++ ...olvingCreditCardProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...litiesConsumerCrossRiverBankPrepaidCard.cs | 7 ++++ ...merCrossRiverBankPrepaidCardProtections.cs | 18 +++++++++ ...rBankPrepaidCardProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...reatorCapabilitiesConsumerLeadDebitCard.cs | 7 ++++ ...ilitiesConsumerLeadDebitCardProtections.cs | 18 +++++++++ ...merLeadDebitCardProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...atorCapabilitiesConsumerLeadPrepaidCard.cs | 7 ++++ ...itiesConsumerLeadPrepaidCardProtections.cs | 18 +++++++++ ...rLeadPrepaidCardProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...ustomerCapabilitiesAutomaticIndirectTax.cs | 7 ++++ ...bilitiesAutomaticIndirectTaxProtections.cs | 18 +++++++++ ...maticIndirectTaxProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...ionMerchantCapabilitiesAchDebitPayments.cs | 7 ++++ ...CapabilitiesAchDebitPaymentsProtections.cs | 18 +++++++++ ...AchDebitPaymentsProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...onMerchantCapabilitiesAcssDebitPayments.cs | 7 ++++ ...apabilitiesAcssDebitPaymentsProtections.cs | 18 +++++++++ ...cssDebitPaymentsProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...ationMerchantCapabilitiesAffirmPayments.cs | 7 ++++ ...ntCapabilitiesAffirmPaymentsProtections.cs | 18 +++++++++ ...esAffirmPaymentsProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...antCapabilitiesAfterpayClearpayPayments.cs | 7 ++++ ...tiesAfterpayClearpayPaymentsProtections.cs | 18 +++++++++ ...ClearpayPaymentsProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...urationMerchantCapabilitiesAlmaPayments.cs | 7 ++++ ...hantCapabilitiesAlmaPaymentsProtections.cs | 18 +++++++++ ...tiesAlmaPaymentsProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...onMerchantCapabilitiesAmazonPayPayments.cs | 7 ++++ ...apabilitiesAmazonPayPaymentsProtections.cs | 18 +++++++++ ...mazonPayPaymentsProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...MerchantCapabilitiesAuBecsDebitPayments.cs | 7 ++++ ...abilitiesAuBecsDebitPaymentsProtections.cs | 18 +++++++++ ...ecsDebitPaymentsProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...onMerchantCapabilitiesBacsDebitPayments.cs | 7 ++++ ...apabilitiesBacsDebitPaymentsProtections.cs | 18 +++++++++ ...acsDebitPaymentsProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...nMerchantCapabilitiesBancontactPayments.cs | 7 ++++ ...pabilitiesBancontactPaymentsProtections.cs | 18 +++++++++ ...ncontactPaymentsProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...urationMerchantCapabilitiesBlikPayments.cs | 7 ++++ ...hantCapabilitiesBlikPaymentsProtections.cs | 18 +++++++++ ...tiesBlikPaymentsProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...ationMerchantCapabilitiesBoletoPayments.cs | 7 ++++ ...ntCapabilitiesBoletoPaymentsProtections.cs | 18 +++++++++ ...esBoletoPaymentsProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...urationMerchantCapabilitiesCardPayments.cs | 7 ++++ ...hantCapabilitiesCardPaymentsProtections.cs | 18 +++++++++ ...tiesCardPaymentsProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...hantCapabilitiesCartesBancairesPayments.cs | 7 ++++ ...itiesCartesBancairesPaymentsProtections.cs | 18 +++++++++ ...ancairesPaymentsProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...tionMerchantCapabilitiesCashappPayments.cs | 7 ++++ ...tCapabilitiesCashappPaymentsProtections.cs | 18 +++++++++ ...sCashappPaymentsProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...gurationMerchantCapabilitiesEpsPayments.cs | 7 ++++ ...chantCapabilitiesEpsPaymentsProtections.cs | 18 +++++++++ ...itiesEpsPaymentsProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...gurationMerchantCapabilitiesFpxPayments.cs | 7 ++++ ...chantCapabilitiesFpxPaymentsProtections.cs | 18 +++++++++ ...itiesFpxPaymentsProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...chantCapabilitiesGbBankTransferPayments.cs | 7 ++++ ...litiesGbBankTransferPaymentsProtections.cs | 18 +++++++++ ...TransferPaymentsProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...tionMerchantCapabilitiesGrabpayPayments.cs | 7 ++++ ...tCapabilitiesGrabpayPaymentsProtections.cs | 18 +++++++++ ...sGrabpayPaymentsProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...rationMerchantCapabilitiesIdealPayments.cs | 7 ++++ ...antCapabilitiesIdealPaymentsProtections.cs | 18 +++++++++ ...iesIdealPaymentsProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...gurationMerchantCapabilitiesJcbPayments.cs | 7 ++++ ...chantCapabilitiesJcbPaymentsProtections.cs | 18 +++++++++ ...itiesJcbPaymentsProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...chantCapabilitiesJpBankTransferPayments.cs | 7 ++++ ...litiesJpBankTransferPaymentsProtections.cs | 18 +++++++++ ...TransferPaymentsProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...ionMerchantCapabilitiesKakaoPayPayments.cs | 7 ++++ ...CapabilitiesKakaoPayPaymentsProtections.cs | 18 +++++++++ ...KakaoPayPaymentsProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...ationMerchantCapabilitiesKlarnaPayments.cs | 7 ++++ ...ntCapabilitiesKlarnaPaymentsProtections.cs | 18 +++++++++ ...esKlarnaPaymentsProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...tionMerchantCapabilitiesKonbiniPayments.cs | 7 ++++ ...tCapabilitiesKonbiniPaymentsProtections.cs | 18 +++++++++ ...sKonbiniPaymentsProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...ationMerchantCapabilitiesKrCardPayments.cs | 7 ++++ ...ntCapabilitiesKrCardPaymentsProtections.cs | 18 +++++++++ ...esKrCardPaymentsProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...urationMerchantCapabilitiesLinkPayments.cs | 7 ++++ ...hantCapabilitiesLinkPaymentsProtections.cs | 18 +++++++++ ...tiesLinkPaymentsProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...onMerchantCapabilitiesMobilepayPayments.cs | 7 ++++ ...apabilitiesMobilepayPaymentsProtections.cs | 18 +++++++++ ...obilepayPaymentsProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...nMerchantCapabilitiesMultibancoPayments.cs | 7 ++++ ...pabilitiesMultibancoPaymentsProtections.cs | 18 +++++++++ ...ltibancoPaymentsProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...chantCapabilitiesMxBankTransferPayments.cs | 7 ++++ ...litiesMxBankTransferPaymentsProtections.cs | 18 +++++++++ ...TransferPaymentsProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...ionMerchantCapabilitiesNaverPayPayments.cs | 7 ++++ ...CapabilitiesNaverPayPaymentsProtections.cs | 18 +++++++++ ...NaverPayPaymentsProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...urationMerchantCapabilitiesOxxoPayments.cs | 7 ++++ ...hantCapabilitiesOxxoPaymentsProtections.cs | 18 +++++++++ ...tiesOxxoPaymentsProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...gurationMerchantCapabilitiesP24Payments.cs | 7 ++++ ...chantCapabilitiesP24PaymentsProtections.cs | 18 +++++++++ ...itiesP24PaymentsProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...onMerchantCapabilitiesPayByBankPayments.cs | 7 ++++ ...apabilitiesPayByBankPaymentsProtections.cs | 18 +++++++++ ...ayByBankPaymentsProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...rationMerchantCapabilitiesPaycoPayments.cs | 7 ++++ ...antCapabilitiesPaycoPaymentsProtections.cs | 18 +++++++++ ...iesPaycoPaymentsProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...ationMerchantCapabilitiesPaynowPayments.cs | 7 ++++ ...ntCapabilitiesPaynowPaymentsProtections.cs | 18 +++++++++ ...esPaynowPaymentsProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...onMerchantCapabilitiesPromptpayPayments.cs | 7 ++++ ...apabilitiesPromptpayPaymentsProtections.cs | 18 +++++++++ ...romptpayPaymentsProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...nMerchantCapabilitiesRevolutPayPayments.cs | 7 ++++ ...pabilitiesRevolutPayPaymentsProtections.cs | 18 +++++++++ ...volutPayPaymentsProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...nMerchantCapabilitiesSamsungPayPayments.cs | 7 ++++ ...pabilitiesSamsungPayPaymentsProtections.cs | 18 +++++++++ ...msungPayPaymentsProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...antCapabilitiesSepaBankTransferPayments.cs | 7 ++++ ...tiesSepaBankTransferPaymentsProtections.cs | 18 +++++++++ ...TransferPaymentsProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...onMerchantCapabilitiesSepaDebitPayments.cs | 7 ++++ ...apabilitiesSepaDebitPaymentsProtections.cs | 18 +++++++++ ...epaDebitPaymentsProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...erchantCapabilitiesStripeBalancePayouts.cs | 7 ++++ ...bilitiesStripeBalancePayoutsProtections.cs | 18 +++++++++ ...peBalancePayoutsProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...rationMerchantCapabilitiesSwishPayments.cs | 7 ++++ ...antCapabilitiesSwishPaymentsProtections.cs | 18 +++++++++ ...iesSwishPaymentsProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...rationMerchantCapabilitiesTwintPayments.cs | 7 ++++ ...antCapabilitiesTwintPaymentsProtections.cs | 18 +++++++++ ...iesTwintPaymentsProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...chantCapabilitiesUsBankTransferPayments.cs | 7 ++++ ...litiesUsBankTransferPaymentsProtections.cs | 18 +++++++++ ...TransferPaymentsProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...gurationMerchantCapabilitiesZipPayments.cs | 7 ++++ ...chantCapabilitiesZipPaymentsProtections.cs | 18 +++++++++ ...itiesZipPaymentsProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...ecipientCapabilitiesBankAccountsInstant.cs | 7 ++++ ...abilitiesBankAccountsInstantProtections.cs | 18 +++++++++ ...kAccountsInstantProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...nRecipientCapabilitiesBankAccountsLocal.cs | 7 ++++ ...apabilitiesBankAccountsLocalProtections.cs | 18 +++++++++ ...ankAccountsLocalProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...onRecipientCapabilitiesBankAccountsWire.cs | 7 ++++ ...CapabilitiesBankAccountsWireProtections.cs | 18 +++++++++ ...BankAccountsWireProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...ConfigurationRecipientCapabilitiesCards.cs | 7 ++++ ...onRecipientCapabilitiesCardsProtections.cs | 18 +++++++++ ...apabilitiesCardsProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...ationRecipientCapabilitiesCryptoWallets.cs | 7 ++++ ...entCapabilitiesCryptoWalletsProtections.cs | 18 +++++++++ ...iesCryptoWalletsProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...urationRecipientCapabilitiesPaperChecks.cs | 7 ++++ ...pientCapabilitiesPaperChecksProtections.cs | 18 +++++++++ ...itiesPaperChecksProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...cipientCapabilitiesStripeBalancePayouts.cs | 7 ++++ ...bilitiesStripeBalancePayoutsProtections.cs | 18 +++++++++ ...peBalancePayoutsProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...apabilitiesStripeBalanceStripeTransfers.cs | 7 ++++ ...StripeBalanceStripeTransfersProtections.cs | 18 +++++++++ ...eStripeTransfersProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...rCapabilitiesConsumerHoldsCurrenciesUsd.cs | 7 ++++ ...esConsumerHoldsCurrenciesUsdProtections.cs | 18 +++++++++ ...ldsCurrenciesUsdProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...abilitiesFinancialAddressesBankAccounts.cs | 7 ++++ ...nancialAddressesBankAccountsProtections.cs | 18 +++++++++ ...ssesBankAccountsProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...bilitiesFinancialAddressesCryptoWallets.cs | 7 ++++ ...ancialAddressesCryptoWalletsProtections.cs | 18 +++++++++ ...sesCryptoWalletsProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...ionStorerCapabilitiesHoldsCurrenciesEur.cs | 7 ++++ ...pabilitiesHoldsCurrenciesEurProtections.cs | 18 +++++++++ ...ldsCurrenciesEurProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...ionStorerCapabilitiesHoldsCurrenciesGbp.cs | 7 ++++ ...pabilitiesHoldsCurrenciesGbpProtections.cs | 18 +++++++++ ...ldsCurrenciesGbpProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...ionStorerCapabilitiesHoldsCurrenciesUsd.cs | 7 ++++ ...pabilitiesHoldsCurrenciesUsdProtections.cs | 18 +++++++++ ...ldsCurrenciesUsdProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...onStorerCapabilitiesHoldsCurrenciesUsdc.cs | 7 ++++ ...abilitiesHoldsCurrenciesUsdcProtections.cs | 18 +++++++++ ...dsCurrenciesUsdcProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...apabilitiesInboundTransfersBankAccounts.cs | 7 ++++ ...InboundTransfersBankAccountsProtections.cs | 18 +++++++++ ...fersBankAccountsProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...apabilitiesOutboundPaymentsBankAccounts.cs | 7 ++++ ...OutboundPaymentsBankAccountsProtections.cs | 18 +++++++++ ...entsBankAccountsProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...StorerCapabilitiesOutboundPaymentsCards.cs | 7 ++++ ...ilitiesOutboundPaymentsCardsProtections.cs | 18 +++++++++ ...undPaymentsCardsProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...pabilitiesOutboundPaymentsCryptoWallets.cs | 7 ++++ ...utboundPaymentsCryptoWalletsProtections.cs | 18 +++++++++ ...ntsCryptoWalletsProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...litiesOutboundPaymentsFinancialAccounts.cs | 7 ++++ ...undPaymentsFinancialAccountsProtections.cs | 18 +++++++++ ...inancialAccountsProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...CapabilitiesOutboundPaymentsPaperChecks.cs | 7 ++++ ...sOutboundPaymentsPaperChecksProtections.cs | 18 +++++++++ ...mentsPaperChecksProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...pabilitiesOutboundTransfersBankAccounts.cs | 7 ++++ ...utboundTransfersBankAccountsProtections.cs | 18 +++++++++ ...fersBankAccountsProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...abilitiesOutboundTransfersCryptoWallets.cs | 7 ++++ ...tboundTransfersCryptoWalletsProtections.cs | 18 +++++++++ ...ersCryptoWalletsProtectionsPspMigration.cs | 37 +++++++++++++++++++ ...itiesOutboundTransfersFinancialAccounts.cs | 7 ++++ ...ndTransfersFinancialAccountsProtections.cs | 18 +++++++++ ...inancialAccountsProtectionsPspMigration.cs | 37 +++++++++++++++++++ .../CustomerPaymentMethodListOptions.cs | 4 +- ...ngsPaymentMethodOptionsWechatPayOptions.cs | 10 ++++- .../PaymentIntentConfirmOptions.cs | 8 ++-- .../PaymentIntentCreateOptions.cs | 8 ++-- .../PaymentIntentPaymentMethodDataOptions.cs | 12 +++++- ...entIntentPaymentMethodDataTamaraOptions.cs | 12 ++++++ ...entPaymentMethodOptionsWechatPayOptions.cs | 10 ++++- .../PaymentIntentUpdateOptions.cs | 8 ++-- .../PaymentMethodCreateOptions.cs | 12 +++++- .../PaymentMethodListOptions.cs | 4 +- .../PaymentMethodTamaraOptions.cs | 12 ++++++ .../SetupIntents/SetupIntentCreateOptions.cs | 4 +- .../SetupIntentPaymentMethodDataOptions.cs | 12 +++++- ...tupIntentPaymentMethodDataTamaraOptions.cs | 12 ++++++ .../SetupIntents/SetupIntentUpdateOptions.cs | 4 +- ...nfirmationTokenPaymentMethodDataOptions.cs | 12 +++++- ...tionTokenPaymentMethodDataTamaraOptions.cs | 12 ++++++ ...litiesCommercialCelticChargeCardOptions.cs | 7 ++++ ...rcialCelticChargeCardProtectionsOptions.cs | 18 +++++++++ ...hargeCardProtectionsPspMigrationOptions.cs | 18 +++++++++ ...ilitiesCommercialCelticSpendCardOptions.cs | 7 ++++ ...ercialCelticSpendCardProtectionsOptions.cs | 18 +++++++++ ...SpendCardProtectionsPspMigrationOptions.cs | 18 +++++++++ ...mmercialCrossRiverBankChargeCardOptions.cs | 7 ++++ ...ssRiverBankChargeCardProtectionsOptions.cs | 18 +++++++++ ...hargeCardProtectionsPspMigrationOptions.cs | 18 +++++++++ ...mercialCrossRiverBankPrepaidCardOptions.cs | 7 ++++ ...sRiverBankPrepaidCardProtectionsOptions.cs | 18 +++++++++ ...epaidCardProtectionsPspMigrationOptions.cs | 18 +++++++++ ...ommercialCrossRiverBankSpendCardOptions.cs | 7 ++++ ...ossRiverBankSpendCardProtectionsOptions.cs | 18 +++++++++ ...SpendCardProtectionsPspMigrationOptions.cs | 18 +++++++++ ...esCommercialFifthThirdChargeCardOptions.cs | 7 ++++ ...lFifthThirdChargeCardProtectionsOptions.cs | 18 +++++++++ ...hargeCardProtectionsPspMigrationOptions.cs | 18 +++++++++ ...ilitiesCommercialLeadPrepaidCardOptions.cs | 7 ++++ ...ercialLeadPrepaidCardProtectionsOptions.cs | 18 +++++++++ ...epaidCardProtectionsPspMigrationOptions.cs | 18 +++++++++ ...litiesCommercialStripeChargeCardOptions.cs | 7 ++++ ...rcialStripeChargeCardProtectionsOptions.cs | 18 +++++++++ ...hargeCardProtectionsPspMigrationOptions.cs | 18 +++++++++ ...itiesCommercialStripePrepaidCardOptions.cs | 7 ++++ ...cialStripePrepaidCardProtectionsOptions.cs | 18 +++++++++ ...epaidCardProtectionsPspMigrationOptions.cs | 18 +++++++++ ...onsumerCelticRevolvingCreditCardOptions.cs | 7 ++++ ...icRevolvingCreditCardProtectionsOptions.cs | 18 +++++++++ ...reditCardProtectionsPspMigrationOptions.cs | 18 +++++++++ ...onsumerCrossRiverBankPrepaidCardOptions.cs | 7 ++++ ...sRiverBankPrepaidCardProtectionsOptions.cs | 18 +++++++++ ...epaidCardProtectionsPspMigrationOptions.cs | 18 +++++++++ ...apabilitiesConsumerLeadDebitCardOptions.cs | 7 ++++ ...ConsumerLeadDebitCardProtectionsOptions.cs | 18 +++++++++ ...DebitCardProtectionsPspMigrationOptions.cs | 18 +++++++++ ...abilitiesConsumerLeadPrepaidCardOptions.cs | 7 ++++ ...nsumerLeadPrepaidCardProtectionsOptions.cs | 18 +++++++++ ...epaidCardProtectionsPspMigrationOptions.cs | 18 +++++++++ ...CapabilitiesAutomaticIndirectTaxOptions.cs | 7 ++++ ...sAutomaticIndirectTaxProtectionsOptions.cs | 18 +++++++++ ...directTaxProtectionsPspMigrationOptions.cs | 18 +++++++++ ...hantCapabilitiesAchDebitPaymentsOptions.cs | 7 ++++ ...itiesAchDebitPaymentsProtectionsOptions.cs | 18 +++++++++ ...tPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...antCapabilitiesAcssDebitPaymentsOptions.cs | 7 ++++ ...tiesAcssDebitPaymentsProtectionsOptions.cs | 18 +++++++++ ...tPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...rchantCapabilitiesAffirmPaymentsOptions.cs | 7 ++++ ...ilitiesAffirmPaymentsProtectionsOptions.cs | 18 +++++++++ ...mPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...bilitiesAfterpayClearpayPaymentsOptions.cs | 7 ++++ ...erpayClearpayPaymentsProtectionsOptions.cs | 18 +++++++++ ...yPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...MerchantCapabilitiesAlmaPaymentsOptions.cs | 7 ++++ ...abilitiesAlmaPaymentsProtectionsOptions.cs | 18 +++++++++ ...aPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...antCapabilitiesAmazonPayPaymentsOptions.cs | 7 ++++ ...tiesAmazonPayPaymentsProtectionsOptions.cs | 18 +++++++++ ...yPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...tCapabilitiesAuBecsDebitPaymentsOptions.cs | 7 ++++ ...esAuBecsDebitPaymentsProtectionsOptions.cs | 18 +++++++++ ...tPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...antCapabilitiesBacsDebitPaymentsOptions.cs | 7 ++++ ...tiesBacsDebitPaymentsProtectionsOptions.cs | 18 +++++++++ ...tPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...ntCapabilitiesBancontactPaymentsOptions.cs | 7 ++++ ...iesBancontactPaymentsProtectionsOptions.cs | 18 +++++++++ ...tPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...MerchantCapabilitiesBlikPaymentsOptions.cs | 7 ++++ ...abilitiesBlikPaymentsProtectionsOptions.cs | 18 +++++++++ ...kPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...rchantCapabilitiesBoletoPaymentsOptions.cs | 7 ++++ ...ilitiesBoletoPaymentsProtectionsOptions.cs | 18 +++++++++ ...oPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...MerchantCapabilitiesCardPaymentsOptions.cs | 7 ++++ ...abilitiesCardPaymentsProtectionsOptions.cs | 18 +++++++++ ...dPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...abilitiesCartesBancairesPaymentsOptions.cs | 7 ++++ ...rtesBancairesPaymentsProtectionsOptions.cs | 18 +++++++++ ...sPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...chantCapabilitiesCashappPaymentsOptions.cs | 7 ++++ ...litiesCashappPaymentsProtectionsOptions.cs | 18 +++++++++ ...pPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...nMerchantCapabilitiesEpsPaymentsOptions.cs | 7 ++++ ...pabilitiesEpsPaymentsProtectionsOptions.cs | 18 +++++++++ ...sPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...nMerchantCapabilitiesFpxPaymentsOptions.cs | 7 ++++ ...pabilitiesFpxPaymentsProtectionsOptions.cs | 18 +++++++++ ...xPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...pabilitiesGbBankTransferPaymentsOptions.cs | 7 ++++ ...bBankTransferPaymentsProtectionsOptions.cs | 18 +++++++++ ...rPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...chantCapabilitiesGrabpayPaymentsOptions.cs | 7 ++++ ...litiesGrabpayPaymentsProtectionsOptions.cs | 18 +++++++++ ...yPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...erchantCapabilitiesIdealPaymentsOptions.cs | 7 ++++ ...bilitiesIdealPaymentsProtectionsOptions.cs | 18 +++++++++ ...lPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...nMerchantCapabilitiesJcbPaymentsOptions.cs | 7 ++++ ...pabilitiesJcbPaymentsProtectionsOptions.cs | 18 +++++++++ ...bPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...pabilitiesJpBankTransferPaymentsOptions.cs | 7 ++++ ...pBankTransferPaymentsProtectionsOptions.cs | 18 +++++++++ ...rPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...hantCapabilitiesKakaoPayPaymentsOptions.cs | 7 ++++ ...itiesKakaoPayPaymentsProtectionsOptions.cs | 18 +++++++++ ...yPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...rchantCapabilitiesKlarnaPaymentsOptions.cs | 7 ++++ ...ilitiesKlarnaPaymentsProtectionsOptions.cs | 18 +++++++++ ...aPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...chantCapabilitiesKonbiniPaymentsOptions.cs | 7 ++++ ...litiesKonbiniPaymentsProtectionsOptions.cs | 18 +++++++++ ...iPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...rchantCapabilitiesKrCardPaymentsOptions.cs | 7 ++++ ...ilitiesKrCardPaymentsProtectionsOptions.cs | 18 +++++++++ ...dPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...MerchantCapabilitiesLinkPaymentsOptions.cs | 7 ++++ ...abilitiesLinkPaymentsProtectionsOptions.cs | 18 +++++++++ ...kPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...antCapabilitiesMobilepayPaymentsOptions.cs | 7 ++++ ...tiesMobilepayPaymentsProtectionsOptions.cs | 18 +++++++++ ...yPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...ntCapabilitiesMultibancoPaymentsOptions.cs | 7 ++++ ...iesMultibancoPaymentsProtectionsOptions.cs | 18 +++++++++ ...oPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...pabilitiesMxBankTransferPaymentsOptions.cs | 7 ++++ ...xBankTransferPaymentsProtectionsOptions.cs | 18 +++++++++ ...rPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...hantCapabilitiesNaverPayPaymentsOptions.cs | 7 ++++ ...itiesNaverPayPaymentsProtectionsOptions.cs | 18 +++++++++ ...yPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...MerchantCapabilitiesOxxoPaymentsOptions.cs | 7 ++++ ...abilitiesOxxoPaymentsProtectionsOptions.cs | 18 +++++++++ ...oPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...nMerchantCapabilitiesP24PaymentsOptions.cs | 7 ++++ ...pabilitiesP24PaymentsProtectionsOptions.cs | 18 +++++++++ ...4PaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...antCapabilitiesPayByBankPaymentsOptions.cs | 7 ++++ ...tiesPayByBankPaymentsProtectionsOptions.cs | 18 +++++++++ ...kPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...erchantCapabilitiesPaycoPaymentsOptions.cs | 7 ++++ ...bilitiesPaycoPaymentsProtectionsOptions.cs | 18 +++++++++ ...oPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...rchantCapabilitiesPaynowPaymentsOptions.cs | 7 ++++ ...ilitiesPaynowPaymentsProtectionsOptions.cs | 18 +++++++++ ...wPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...antCapabilitiesPromptpayPaymentsOptions.cs | 7 ++++ ...tiesPromptpayPaymentsProtectionsOptions.cs | 18 +++++++++ ...yPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...ntCapabilitiesRevolutPayPaymentsOptions.cs | 7 ++++ ...iesRevolutPayPaymentsProtectionsOptions.cs | 18 +++++++++ ...yPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...ntCapabilitiesSamsungPayPaymentsOptions.cs | 7 ++++ ...iesSamsungPayPaymentsProtectionsOptions.cs | 18 +++++++++ ...yPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...bilitiesSepaBankTransferPaymentsOptions.cs | 7 ++++ ...aBankTransferPaymentsProtectionsOptions.cs | 18 +++++++++ ...rPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...antCapabilitiesSepaDebitPaymentsOptions.cs | 7 ++++ ...tiesSepaDebitPaymentsProtectionsOptions.cs | 18 +++++++++ ...tPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...erchantCapabilitiesSwishPaymentsOptions.cs | 7 ++++ ...bilitiesSwishPaymentsProtectionsOptions.cs | 18 +++++++++ ...hPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...erchantCapabilitiesTwintPaymentsOptions.cs | 7 ++++ ...bilitiesTwintPaymentsProtectionsOptions.cs | 18 +++++++++ ...tPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...pabilitiesUsBankTransferPaymentsOptions.cs | 7 ++++ ...sBankTransferPaymentsProtectionsOptions.cs | 18 +++++++++ ...rPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...nMerchantCapabilitiesZipPaymentsOptions.cs | 7 ++++ ...pabilitiesZipPaymentsProtectionsOptions.cs | 18 +++++++++ ...pPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...tCapabilitiesBankAccountsInstantOptions.cs | 7 ++++ ...esBankAccountsInstantProtectionsOptions.cs | 18 +++++++++ ...tsInstantProtectionsPspMigrationOptions.cs | 18 +++++++++ ...entCapabilitiesBankAccountsLocalOptions.cs | 7 ++++ ...tiesBankAccountsLocalProtectionsOptions.cs | 18 +++++++++ ...untsLocalProtectionsPspMigrationOptions.cs | 18 +++++++++ ...ientCapabilitiesBankAccountsWireOptions.cs | 7 ++++ ...itiesBankAccountsWireProtectionsOptions.cs | 18 +++++++++ ...ountsWireProtectionsPspMigrationOptions.cs | 18 +++++++++ ...rationRecipientCapabilitiesCardsOptions.cs | 7 ++++ ...ientCapabilitiesCardsProtectionsOptions.cs | 18 +++++++++ ...tiesCardsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...cipientCapabilitiesCryptoWalletsOptions.cs | 7 ++++ ...bilitiesCryptoWalletsProtectionsOptions.cs | 18 +++++++++ ...toWalletsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...RecipientCapabilitiesPaperChecksOptions.cs | 7 ++++ ...pabilitiesPaperChecksProtectionsOptions.cs | 18 +++++++++ ...perChecksProtectionsPspMigrationOptions.cs | 18 +++++++++ ...tiesStripeBalanceStripeTransfersOptions.cs | 7 ++++ ...alanceStripeTransfersProtectionsOptions.cs | 18 +++++++++ ...TransfersProtectionsPspMigrationOptions.cs | 18 +++++++++ ...litiesConsumerHoldsCurrenciesUsdOptions.cs | 7 ++++ ...merHoldsCurrenciesUsdProtectionsOptions.cs | 18 +++++++++ ...enciesUsdProtectionsPspMigrationOptions.cs | 18 +++++++++ ...esFinancialAddressesBankAccountsOptions.cs | 7 ++++ ...AddressesBankAccountsProtectionsOptions.cs | 18 +++++++++ ...kAccountsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...sFinancialAddressesCryptoWalletsOptions.cs | 7 ++++ ...ddressesCryptoWalletsProtectionsOptions.cs | 18 +++++++++ ...toWalletsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...erCapabilitiesHoldsCurrenciesEurOptions.cs | 7 ++++ ...iesHoldsCurrenciesEurProtectionsOptions.cs | 18 +++++++++ ...enciesEurProtectionsPspMigrationOptions.cs | 18 +++++++++ ...erCapabilitiesHoldsCurrenciesGbpOptions.cs | 7 ++++ ...iesHoldsCurrenciesGbpProtectionsOptions.cs | 18 +++++++++ ...enciesGbpProtectionsPspMigrationOptions.cs | 18 +++++++++ ...erCapabilitiesHoldsCurrenciesUsdOptions.cs | 7 ++++ ...iesHoldsCurrenciesUsdProtectionsOptions.cs | 18 +++++++++ ...enciesUsdProtectionsPspMigrationOptions.cs | 18 +++++++++ ...rCapabilitiesHoldsCurrenciesUsdcOptions.cs | 7 ++++ ...esHoldsCurrenciesUsdcProtectionsOptions.cs | 18 +++++++++ ...nciesUsdcProtectionsPspMigrationOptions.cs | 18 +++++++++ ...tiesInboundTransfersBankAccountsOptions.cs | 7 ++++ ...TransfersBankAccountsProtectionsOptions.cs | 18 +++++++++ ...kAccountsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...tiesOutboundPaymentsBankAccountsOptions.cs | 7 ++++ ...dPaymentsBankAccountsProtectionsOptions.cs | 18 +++++++++ ...kAccountsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...apabilitiesOutboundPaymentsCardsOptions.cs | 7 ++++ ...OutboundPaymentsCardsProtectionsOptions.cs | 18 +++++++++ ...entsCardsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...iesOutboundPaymentsCryptoWalletsOptions.cs | 7 ++++ ...PaymentsCryptoWalletsProtectionsOptions.cs | 18 +++++++++ ...toWalletsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...utboundPaymentsFinancialAccountsOptions.cs | 7 ++++ ...entsFinancialAccountsProtectionsOptions.cs | 18 +++++++++ ...lAccountsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...itiesOutboundPaymentsPaperChecksOptions.cs | 7 ++++ ...ndPaymentsPaperChecksProtectionsOptions.cs | 18 +++++++++ ...perChecksProtectionsPspMigrationOptions.cs | 18 +++++++++ ...iesOutboundTransfersBankAccountsOptions.cs | 7 ++++ ...TransfersBankAccountsProtectionsOptions.cs | 18 +++++++++ ...kAccountsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...esOutboundTransfersCryptoWalletsOptions.cs | 7 ++++ ...ransfersCryptoWalletsProtectionsOptions.cs | 18 +++++++++ ...toWalletsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...tboundTransfersFinancialAccountsOptions.cs | 7 ++++ ...fersFinancialAccountsProtectionsOptions.cs | 18 +++++++++ ...lAccountsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...litiesCommercialCelticChargeCardOptions.cs | 7 ++++ ...rcialCelticChargeCardProtectionsOptions.cs | 18 +++++++++ ...hargeCardProtectionsPspMigrationOptions.cs | 18 +++++++++ ...ilitiesCommercialCelticSpendCardOptions.cs | 7 ++++ ...ercialCelticSpendCardProtectionsOptions.cs | 18 +++++++++ ...SpendCardProtectionsPspMigrationOptions.cs | 18 +++++++++ ...mmercialCrossRiverBankChargeCardOptions.cs | 7 ++++ ...ssRiverBankChargeCardProtectionsOptions.cs | 18 +++++++++ ...hargeCardProtectionsPspMigrationOptions.cs | 18 +++++++++ ...mercialCrossRiverBankPrepaidCardOptions.cs | 7 ++++ ...sRiverBankPrepaidCardProtectionsOptions.cs | 18 +++++++++ ...epaidCardProtectionsPspMigrationOptions.cs | 18 +++++++++ ...ommercialCrossRiverBankSpendCardOptions.cs | 7 ++++ ...ossRiverBankSpendCardProtectionsOptions.cs | 18 +++++++++ ...SpendCardProtectionsPspMigrationOptions.cs | 18 +++++++++ ...esCommercialFifthThirdChargeCardOptions.cs | 7 ++++ ...lFifthThirdChargeCardProtectionsOptions.cs | 18 +++++++++ ...hargeCardProtectionsPspMigrationOptions.cs | 18 +++++++++ ...ilitiesCommercialLeadPrepaidCardOptions.cs | 7 ++++ ...ercialLeadPrepaidCardProtectionsOptions.cs | 18 +++++++++ ...epaidCardProtectionsPspMigrationOptions.cs | 18 +++++++++ ...litiesCommercialStripeChargeCardOptions.cs | 7 ++++ ...rcialStripeChargeCardProtectionsOptions.cs | 18 +++++++++ ...hargeCardProtectionsPspMigrationOptions.cs | 18 +++++++++ ...itiesCommercialStripePrepaidCardOptions.cs | 7 ++++ ...cialStripePrepaidCardProtectionsOptions.cs | 18 +++++++++ ...epaidCardProtectionsPspMigrationOptions.cs | 18 +++++++++ ...onsumerCelticRevolvingCreditCardOptions.cs | 7 ++++ ...icRevolvingCreditCardProtectionsOptions.cs | 18 +++++++++ ...reditCardProtectionsPspMigrationOptions.cs | 18 +++++++++ ...onsumerCrossRiverBankPrepaidCardOptions.cs | 7 ++++ ...sRiverBankPrepaidCardProtectionsOptions.cs | 18 +++++++++ ...epaidCardProtectionsPspMigrationOptions.cs | 18 +++++++++ ...apabilitiesConsumerLeadDebitCardOptions.cs | 7 ++++ ...ConsumerLeadDebitCardProtectionsOptions.cs | 18 +++++++++ ...DebitCardProtectionsPspMigrationOptions.cs | 18 +++++++++ ...abilitiesConsumerLeadPrepaidCardOptions.cs | 7 ++++ ...nsumerLeadPrepaidCardProtectionsOptions.cs | 18 +++++++++ ...epaidCardProtectionsPspMigrationOptions.cs | 18 +++++++++ ...CapabilitiesAutomaticIndirectTaxOptions.cs | 7 ++++ ...sAutomaticIndirectTaxProtectionsOptions.cs | 18 +++++++++ ...directTaxProtectionsPspMigrationOptions.cs | 18 +++++++++ ...hantCapabilitiesAchDebitPaymentsOptions.cs | 7 ++++ ...itiesAchDebitPaymentsProtectionsOptions.cs | 18 +++++++++ ...tPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...antCapabilitiesAcssDebitPaymentsOptions.cs | 7 ++++ ...tiesAcssDebitPaymentsProtectionsOptions.cs | 18 +++++++++ ...tPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...rchantCapabilitiesAffirmPaymentsOptions.cs | 7 ++++ ...ilitiesAffirmPaymentsProtectionsOptions.cs | 18 +++++++++ ...mPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...bilitiesAfterpayClearpayPaymentsOptions.cs | 7 ++++ ...erpayClearpayPaymentsProtectionsOptions.cs | 18 +++++++++ ...yPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...MerchantCapabilitiesAlmaPaymentsOptions.cs | 7 ++++ ...abilitiesAlmaPaymentsProtectionsOptions.cs | 18 +++++++++ ...aPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...antCapabilitiesAmazonPayPaymentsOptions.cs | 7 ++++ ...tiesAmazonPayPaymentsProtectionsOptions.cs | 18 +++++++++ ...yPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...tCapabilitiesAuBecsDebitPaymentsOptions.cs | 7 ++++ ...esAuBecsDebitPaymentsProtectionsOptions.cs | 18 +++++++++ ...tPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...antCapabilitiesBacsDebitPaymentsOptions.cs | 7 ++++ ...tiesBacsDebitPaymentsProtectionsOptions.cs | 18 +++++++++ ...tPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...ntCapabilitiesBancontactPaymentsOptions.cs | 7 ++++ ...iesBancontactPaymentsProtectionsOptions.cs | 18 +++++++++ ...tPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...MerchantCapabilitiesBlikPaymentsOptions.cs | 7 ++++ ...abilitiesBlikPaymentsProtectionsOptions.cs | 18 +++++++++ ...kPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...rchantCapabilitiesBoletoPaymentsOptions.cs | 7 ++++ ...ilitiesBoletoPaymentsProtectionsOptions.cs | 18 +++++++++ ...oPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...MerchantCapabilitiesCardPaymentsOptions.cs | 7 ++++ ...abilitiesCardPaymentsProtectionsOptions.cs | 18 +++++++++ ...dPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...abilitiesCartesBancairesPaymentsOptions.cs | 7 ++++ ...rtesBancairesPaymentsProtectionsOptions.cs | 18 +++++++++ ...sPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...chantCapabilitiesCashappPaymentsOptions.cs | 7 ++++ ...litiesCashappPaymentsProtectionsOptions.cs | 18 +++++++++ ...pPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...nMerchantCapabilitiesEpsPaymentsOptions.cs | 7 ++++ ...pabilitiesEpsPaymentsProtectionsOptions.cs | 18 +++++++++ ...sPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...nMerchantCapabilitiesFpxPaymentsOptions.cs | 7 ++++ ...pabilitiesFpxPaymentsProtectionsOptions.cs | 18 +++++++++ ...xPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...pabilitiesGbBankTransferPaymentsOptions.cs | 7 ++++ ...bBankTransferPaymentsProtectionsOptions.cs | 18 +++++++++ ...rPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...chantCapabilitiesGrabpayPaymentsOptions.cs | 7 ++++ ...litiesGrabpayPaymentsProtectionsOptions.cs | 18 +++++++++ ...yPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...erchantCapabilitiesIdealPaymentsOptions.cs | 7 ++++ ...bilitiesIdealPaymentsProtectionsOptions.cs | 18 +++++++++ ...lPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...nMerchantCapabilitiesJcbPaymentsOptions.cs | 7 ++++ ...pabilitiesJcbPaymentsProtectionsOptions.cs | 18 +++++++++ ...bPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...pabilitiesJpBankTransferPaymentsOptions.cs | 7 ++++ ...pBankTransferPaymentsProtectionsOptions.cs | 18 +++++++++ ...rPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...hantCapabilitiesKakaoPayPaymentsOptions.cs | 7 ++++ ...itiesKakaoPayPaymentsProtectionsOptions.cs | 18 +++++++++ ...yPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...rchantCapabilitiesKlarnaPaymentsOptions.cs | 7 ++++ ...ilitiesKlarnaPaymentsProtectionsOptions.cs | 18 +++++++++ ...aPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...chantCapabilitiesKonbiniPaymentsOptions.cs | 7 ++++ ...litiesKonbiniPaymentsProtectionsOptions.cs | 18 +++++++++ ...iPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...rchantCapabilitiesKrCardPaymentsOptions.cs | 7 ++++ ...ilitiesKrCardPaymentsProtectionsOptions.cs | 18 +++++++++ ...dPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...MerchantCapabilitiesLinkPaymentsOptions.cs | 7 ++++ ...abilitiesLinkPaymentsProtectionsOptions.cs | 18 +++++++++ ...kPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...antCapabilitiesMobilepayPaymentsOptions.cs | 7 ++++ ...tiesMobilepayPaymentsProtectionsOptions.cs | 18 +++++++++ ...yPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...ntCapabilitiesMultibancoPaymentsOptions.cs | 7 ++++ ...iesMultibancoPaymentsProtectionsOptions.cs | 18 +++++++++ ...oPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...pabilitiesMxBankTransferPaymentsOptions.cs | 7 ++++ ...xBankTransferPaymentsProtectionsOptions.cs | 18 +++++++++ ...rPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...hantCapabilitiesNaverPayPaymentsOptions.cs | 7 ++++ ...itiesNaverPayPaymentsProtectionsOptions.cs | 18 +++++++++ ...yPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...MerchantCapabilitiesOxxoPaymentsOptions.cs | 7 ++++ ...abilitiesOxxoPaymentsProtectionsOptions.cs | 18 +++++++++ ...oPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...nMerchantCapabilitiesP24PaymentsOptions.cs | 7 ++++ ...pabilitiesP24PaymentsProtectionsOptions.cs | 18 +++++++++ ...4PaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...antCapabilitiesPayByBankPaymentsOptions.cs | 7 ++++ ...tiesPayByBankPaymentsProtectionsOptions.cs | 18 +++++++++ ...kPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...erchantCapabilitiesPaycoPaymentsOptions.cs | 7 ++++ ...bilitiesPaycoPaymentsProtectionsOptions.cs | 18 +++++++++ ...oPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...rchantCapabilitiesPaynowPaymentsOptions.cs | 7 ++++ ...ilitiesPaynowPaymentsProtectionsOptions.cs | 18 +++++++++ ...wPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...antCapabilitiesPromptpayPaymentsOptions.cs | 7 ++++ ...tiesPromptpayPaymentsProtectionsOptions.cs | 18 +++++++++ ...yPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...ntCapabilitiesRevolutPayPaymentsOptions.cs | 7 ++++ ...iesRevolutPayPaymentsProtectionsOptions.cs | 18 +++++++++ ...yPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...ntCapabilitiesSamsungPayPaymentsOptions.cs | 7 ++++ ...iesSamsungPayPaymentsProtectionsOptions.cs | 18 +++++++++ ...yPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...bilitiesSepaBankTransferPaymentsOptions.cs | 7 ++++ ...aBankTransferPaymentsProtectionsOptions.cs | 18 +++++++++ ...rPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...antCapabilitiesSepaDebitPaymentsOptions.cs | 7 ++++ ...tiesSepaDebitPaymentsProtectionsOptions.cs | 18 +++++++++ ...tPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...erchantCapabilitiesSwishPaymentsOptions.cs | 7 ++++ ...bilitiesSwishPaymentsProtectionsOptions.cs | 18 +++++++++ ...hPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...erchantCapabilitiesTwintPaymentsOptions.cs | 7 ++++ ...bilitiesTwintPaymentsProtectionsOptions.cs | 18 +++++++++ ...tPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...pabilitiesUsBankTransferPaymentsOptions.cs | 7 ++++ ...sBankTransferPaymentsProtectionsOptions.cs | 18 +++++++++ ...rPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...nMerchantCapabilitiesZipPaymentsOptions.cs | 7 ++++ ...pabilitiesZipPaymentsProtectionsOptions.cs | 18 +++++++++ ...pPaymentsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...tCapabilitiesBankAccountsInstantOptions.cs | 7 ++++ ...esBankAccountsInstantProtectionsOptions.cs | 18 +++++++++ ...tsInstantProtectionsPspMigrationOptions.cs | 18 +++++++++ ...entCapabilitiesBankAccountsLocalOptions.cs | 7 ++++ ...tiesBankAccountsLocalProtectionsOptions.cs | 18 +++++++++ ...untsLocalProtectionsPspMigrationOptions.cs | 18 +++++++++ ...ientCapabilitiesBankAccountsWireOptions.cs | 7 ++++ ...itiesBankAccountsWireProtectionsOptions.cs | 18 +++++++++ ...ountsWireProtectionsPspMigrationOptions.cs | 18 +++++++++ ...rationRecipientCapabilitiesCardsOptions.cs | 7 ++++ ...ientCapabilitiesCardsProtectionsOptions.cs | 18 +++++++++ ...tiesCardsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...cipientCapabilitiesCryptoWalletsOptions.cs | 7 ++++ ...bilitiesCryptoWalletsProtectionsOptions.cs | 18 +++++++++ ...toWalletsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...RecipientCapabilitiesPaperChecksOptions.cs | 7 ++++ ...pabilitiesPaperChecksProtectionsOptions.cs | 18 +++++++++ ...perChecksProtectionsPspMigrationOptions.cs | 18 +++++++++ ...tiesStripeBalanceStripeTransfersOptions.cs | 7 ++++ ...alanceStripeTransfersProtectionsOptions.cs | 18 +++++++++ ...TransfersProtectionsPspMigrationOptions.cs | 18 +++++++++ ...litiesConsumerHoldsCurrenciesUsdOptions.cs | 7 ++++ ...merHoldsCurrenciesUsdProtectionsOptions.cs | 18 +++++++++ ...enciesUsdProtectionsPspMigrationOptions.cs | 18 +++++++++ ...esFinancialAddressesBankAccountsOptions.cs | 7 ++++ ...AddressesBankAccountsProtectionsOptions.cs | 18 +++++++++ ...kAccountsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...sFinancialAddressesCryptoWalletsOptions.cs | 7 ++++ ...ddressesCryptoWalletsProtectionsOptions.cs | 18 +++++++++ ...toWalletsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...erCapabilitiesHoldsCurrenciesEurOptions.cs | 7 ++++ ...iesHoldsCurrenciesEurProtectionsOptions.cs | 18 +++++++++ ...enciesEurProtectionsPspMigrationOptions.cs | 18 +++++++++ ...erCapabilitiesHoldsCurrenciesGbpOptions.cs | 7 ++++ ...iesHoldsCurrenciesGbpProtectionsOptions.cs | 18 +++++++++ ...enciesGbpProtectionsPspMigrationOptions.cs | 18 +++++++++ ...erCapabilitiesHoldsCurrenciesUsdOptions.cs | 7 ++++ ...iesHoldsCurrenciesUsdProtectionsOptions.cs | 18 +++++++++ ...enciesUsdProtectionsPspMigrationOptions.cs | 18 +++++++++ ...rCapabilitiesHoldsCurrenciesUsdcOptions.cs | 7 ++++ ...esHoldsCurrenciesUsdcProtectionsOptions.cs | 18 +++++++++ ...nciesUsdcProtectionsPspMigrationOptions.cs | 18 +++++++++ ...tiesInboundTransfersBankAccountsOptions.cs | 7 ++++ ...TransfersBankAccountsProtectionsOptions.cs | 18 +++++++++ ...kAccountsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...tiesOutboundPaymentsBankAccountsOptions.cs | 7 ++++ ...dPaymentsBankAccountsProtectionsOptions.cs | 18 +++++++++ ...kAccountsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...apabilitiesOutboundPaymentsCardsOptions.cs | 7 ++++ ...OutboundPaymentsCardsProtectionsOptions.cs | 18 +++++++++ ...entsCardsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...iesOutboundPaymentsCryptoWalletsOptions.cs | 7 ++++ ...PaymentsCryptoWalletsProtectionsOptions.cs | 18 +++++++++ ...toWalletsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...utboundPaymentsFinancialAccountsOptions.cs | 7 ++++ ...entsFinancialAccountsProtectionsOptions.cs | 18 +++++++++ ...lAccountsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...itiesOutboundPaymentsPaperChecksOptions.cs | 7 ++++ ...ndPaymentsPaperChecksProtectionsOptions.cs | 18 +++++++++ ...perChecksProtectionsPspMigrationOptions.cs | 18 +++++++++ ...iesOutboundTransfersBankAccountsOptions.cs | 7 ++++ ...TransfersBankAccountsProtectionsOptions.cs | 18 +++++++++ ...kAccountsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...esOutboundTransfersCryptoWalletsOptions.cs | 7 ++++ ...ransfersCryptoWalletsProtectionsOptions.cs | 18 +++++++++ ...toWalletsProtectionsPspMigrationOptions.cs | 18 +++++++++ ...tboundTransfersFinancialAccountsOptions.cs | 7 ++++ ...fersFinancialAccountsProtectionsOptions.cs | 18 +++++++++ ...lAccountsProtectionsPspMigrationOptions.cs | 18 +++++++++ 774 files changed, 12426 insertions(+), 44 deletions(-) create mode 100644 src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsTamara.cs create mode 100644 src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewTamara.cs create mode 100644 src/Stripe.net/Entities/PaymentAttemptRecords/PaymentAttemptRecordPaymentMethodDetailsTamara.cs create mode 100644 src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionWechatPayHandleAppRedirect.cs create mode 100644 src/Stripe.net/Entities/PaymentMethods/PaymentMethodTamara.cs create mode 100644 src/Stripe.net/Entities/PaymentRecords/PaymentRecordPaymentMethodDetailsTamara.cs create mode 100644 src/Stripe.net/Entities/SetupIntents/SetupIntentNextActionWechatPayHandleAppRedirect.cs create mode 100644 src/Stripe.net/Entities/SharedPayment/GrantedTokens/GrantedTokenPaymentMethodDetailsTamara.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialCelticChargeCardProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialCelticChargeCardProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialCelticSpendCardProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialCelticSpendCardProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankChargeCardProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankChargeCardProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankPrepaidCardProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankPrepaidCardProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankSpendCardProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankSpendCardProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialFifthThirdChargeCardProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialFifthThirdChargeCardProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialLeadPrepaidCardProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialLeadPrepaidCardProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialStripeChargeCardProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialStripeChargeCardProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialStripePrepaidCardProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialStripePrepaidCardProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesConsumerCelticRevolvingCreditCardProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesConsumerCelticRevolvingCreditCardProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesConsumerCrossRiverBankPrepaidCardProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesConsumerCrossRiverBankPrepaidCardProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesConsumerLeadDebitCardProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesConsumerLeadDebitCardProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesConsumerLeadPrepaidCardProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesConsumerLeadPrepaidCardProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCustomerCapabilitiesAutomaticIndirectTaxProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCustomerCapabilitiesAutomaticIndirectTaxProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAchDebitPaymentsProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAchDebitPaymentsProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAcssDebitPaymentsProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAcssDebitPaymentsProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAffirmPaymentsProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAffirmPaymentsProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAfterpayClearpayPaymentsProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAfterpayClearpayPaymentsProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAlmaPaymentsProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAlmaPaymentsProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAmazonPayPaymentsProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAmazonPayPaymentsProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAuBecsDebitPaymentsProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAuBecsDebitPaymentsProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesBacsDebitPaymentsProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesBacsDebitPaymentsProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesBancontactPaymentsProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesBancontactPaymentsProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesBlikPaymentsProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesBlikPaymentsProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesBoletoPaymentsProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesBoletoPaymentsProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesCardPaymentsProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesCardPaymentsProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesCartesBancairesPaymentsProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesCartesBancairesPaymentsProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesCashappPaymentsProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesCashappPaymentsProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesEpsPaymentsProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesEpsPaymentsProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesFpxPaymentsProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesFpxPaymentsProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesGbBankTransferPaymentsProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesGbBankTransferPaymentsProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesGrabpayPaymentsProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesGrabpayPaymentsProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesIdealPaymentsProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesIdealPaymentsProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesJcbPaymentsProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesJcbPaymentsProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesJpBankTransferPaymentsProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesJpBankTransferPaymentsProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesKakaoPayPaymentsProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesKakaoPayPaymentsProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesKlarnaPaymentsProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesKlarnaPaymentsProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesKonbiniPaymentsProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesKonbiniPaymentsProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesKrCardPaymentsProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesKrCardPaymentsProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesLinkPaymentsProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesLinkPaymentsProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesMobilepayPaymentsProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesMobilepayPaymentsProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesMultibancoPaymentsProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesMultibancoPaymentsProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesMxBankTransferPaymentsProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesMxBankTransferPaymentsProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesNaverPayPaymentsProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesNaverPayPaymentsProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesOxxoPaymentsProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesOxxoPaymentsProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesP24PaymentsProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesP24PaymentsProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesPayByBankPaymentsProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesPayByBankPaymentsProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesPaycoPaymentsProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesPaycoPaymentsProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesPaynowPaymentsProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesPaynowPaymentsProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesPromptpayPaymentsProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesPromptpayPaymentsProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesRevolutPayPaymentsProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesRevolutPayPaymentsProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesSamsungPayPaymentsProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesSamsungPayPaymentsProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesSepaBankTransferPaymentsProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesSepaBankTransferPaymentsProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesSepaDebitPaymentsProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesSepaDebitPaymentsProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesStripeBalancePayoutsProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesStripeBalancePayoutsProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesSwishPaymentsProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesSwishPaymentsProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesTwintPaymentsProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesTwintPaymentsProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesUsBankTransferPaymentsProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesUsBankTransferPaymentsProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesZipPaymentsProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesZipPaymentsProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesBankAccountsInstantProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesBankAccountsInstantProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesBankAccountsLocalProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesBankAccountsLocalProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesBankAccountsWireProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesBankAccountsWireProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesCardsProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesCardsProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesCryptoWalletsProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesCryptoWalletsProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesPaperChecksProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesPaperChecksProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesStripeBalancePayoutsProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesStripeBalancePayoutsProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesStripeBalanceStripeTransfersProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesStripeBalanceStripeTransfersProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesConsumerHoldsCurrenciesUsdProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesConsumerHoldsCurrenciesUsdProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesFinancialAddressesBankAccountsProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesFinancialAddressesBankAccountsProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesFinancialAddressesCryptoWalletsProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesFinancialAddressesCryptoWalletsProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrenciesEurProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrenciesEurProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrenciesGbpProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrenciesGbpProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrenciesUsdProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrenciesUsdProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrenciesUsdcProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrenciesUsdcProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesInboundTransfersBankAccountsProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesInboundTransfersBankAccountsProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsBankAccountsProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsBankAccountsProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsCardsProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsCardsProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsCryptoWalletsProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsCryptoWalletsProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccountsProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccountsProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsPaperChecksProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsPaperChecksProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundTransfersBankAccountsProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundTransfersBankAccountsProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundTransfersCryptoWalletsProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundTransfersCryptoWalletsProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundTransfersFinancialAccountsProtections.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundTransfersFinancialAccountsProtectionsPspMigration.cs create mode 100644 src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataTamaraOptions.cs create mode 100644 src/Stripe.net/Services/PaymentMethods/PaymentMethodTamaraOptions.cs create mode 100644 src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataTamaraOptions.cs create mode 100644 src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataTamaraOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialCelticChargeCardProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialCelticChargeCardProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialCelticSpendCardProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialCelticSpendCardProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankChargeCardProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankChargeCardProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankPrepaidCardProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankPrepaidCardProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankSpendCardProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankSpendCardProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialFifthThirdChargeCardProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialFifthThirdChargeCardProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialLeadPrepaidCardProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialLeadPrepaidCardProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialStripeChargeCardProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialStripeChargeCardProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialStripePrepaidCardProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialStripePrepaidCardProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesConsumerCelticRevolvingCreditCardProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesConsumerCelticRevolvingCreditCardProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesConsumerCrossRiverBankPrepaidCardProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesConsumerCrossRiverBankPrepaidCardProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesConsumerLeadDebitCardProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesConsumerLeadDebitCardProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesConsumerLeadPrepaidCardProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesConsumerLeadPrepaidCardProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCustomerCapabilitiesAutomaticIndirectTaxProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCustomerCapabilitiesAutomaticIndirectTaxProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAchDebitPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAchDebitPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAcssDebitPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAcssDebitPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAffirmPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAffirmPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAfterpayClearpayPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAfterpayClearpayPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAlmaPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAlmaPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAmazonPayPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAmazonPayPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAuBecsDebitPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAuBecsDebitPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesBacsDebitPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesBacsDebitPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesBancontactPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesBancontactPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesBlikPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesBlikPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesBoletoPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesBoletoPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesCardPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesCardPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesCartesBancairesPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesCartesBancairesPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesCashappPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesCashappPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesEpsPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesEpsPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesFpxPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesFpxPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesGbBankTransferPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesGbBankTransferPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesGrabpayPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesGrabpayPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesIdealPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesIdealPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesJcbPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesJcbPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesJpBankTransferPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesJpBankTransferPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesKakaoPayPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesKakaoPayPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesKlarnaPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesKlarnaPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesKonbiniPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesKonbiniPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesKrCardPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesKrCardPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesLinkPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesLinkPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesMobilepayPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesMobilepayPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesMultibancoPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesMultibancoPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesMxBankTransferPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesMxBankTransferPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesNaverPayPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesNaverPayPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesOxxoPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesOxxoPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesP24PaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesP24PaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesPayByBankPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesPayByBankPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesPaycoPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesPaycoPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesPaynowPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesPaynowPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesPromptpayPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesPromptpayPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesRevolutPayPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesRevolutPayPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesSamsungPayPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesSamsungPayPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesSepaBankTransferPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesSepaBankTransferPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesSepaDebitPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesSepaDebitPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesSwishPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesSwishPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesTwintPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesTwintPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesUsBankTransferPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesUsBankTransferPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesZipPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesZipPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesBankAccountsInstantProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesBankAccountsInstantProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesBankAccountsLocalProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesBankAccountsLocalProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesBankAccountsWireProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesBankAccountsWireProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesCardsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesCardsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesCryptoWalletsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesCryptoWalletsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesPaperChecksProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesPaperChecksProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesStripeBalanceStripeTransfersProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesStripeBalanceStripeTransfersProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesConsumerHoldsCurrenciesUsdProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesConsumerHoldsCurrenciesUsdProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesFinancialAddressesBankAccountsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesFinancialAddressesBankAccountsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesFinancialAddressesCryptoWalletsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesFinancialAddressesCryptoWalletsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesEurProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesEurProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesGbpProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesGbpProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesUsdProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesUsdProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesUsdcProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesUsdcProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesInboundTransfersBankAccountsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesInboundTransfersBankAccountsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsBankAccountsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsBankAccountsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsCardsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsCardsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsCryptoWalletsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsCryptoWalletsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccountsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccountsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsPaperChecksProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsPaperChecksProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundTransfersBankAccountsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundTransfersBankAccountsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundTransfersCryptoWalletsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundTransfersCryptoWalletsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundTransfersFinancialAccountsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundTransfersFinancialAccountsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCelticChargeCardProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCelticChargeCardProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCelticSpendCardProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCelticSpendCardProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankChargeCardProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankChargeCardProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankPrepaidCardProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankPrepaidCardProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankSpendCardProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankSpendCardProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialFifthThirdChargeCardProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialFifthThirdChargeCardProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialLeadPrepaidCardProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialLeadPrepaidCardProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialStripeChargeCardProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialStripeChargeCardProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialStripePrepaidCardProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialStripePrepaidCardProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesConsumerCelticRevolvingCreditCardProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesConsumerCelticRevolvingCreditCardProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesConsumerCrossRiverBankPrepaidCardProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesConsumerCrossRiverBankPrepaidCardProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesConsumerLeadDebitCardProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesConsumerLeadDebitCardProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesConsumerLeadPrepaidCardProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesConsumerLeadPrepaidCardProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCustomerCapabilitiesAutomaticIndirectTaxProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCustomerCapabilitiesAutomaticIndirectTaxProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAchDebitPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAchDebitPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAcssDebitPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAcssDebitPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAffirmPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAffirmPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAfterpayClearpayPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAfterpayClearpayPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAlmaPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAlmaPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAmazonPayPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAmazonPayPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAuBecsDebitPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAuBecsDebitPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesBacsDebitPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesBacsDebitPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesBancontactPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesBancontactPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesBlikPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesBlikPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesBoletoPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesBoletoPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesCardPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesCardPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesCartesBancairesPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesCartesBancairesPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesCashappPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesCashappPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesEpsPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesEpsPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesFpxPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesFpxPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesGbBankTransferPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesGbBankTransferPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesGrabpayPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesGrabpayPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesIdealPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesIdealPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesJcbPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesJcbPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesJpBankTransferPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesJpBankTransferPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesKakaoPayPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesKakaoPayPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesKlarnaPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesKlarnaPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesKonbiniPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesKonbiniPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesKrCardPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesKrCardPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesLinkPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesLinkPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesMobilepayPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesMobilepayPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesMultibancoPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesMultibancoPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesMxBankTransferPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesMxBankTransferPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesNaverPayPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesNaverPayPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesOxxoPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesOxxoPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesP24PaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesP24PaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesPayByBankPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesPayByBankPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesPaycoPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesPaycoPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesPaynowPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesPaynowPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesPromptpayPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesPromptpayPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesRevolutPayPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesRevolutPayPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesSamsungPayPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesSamsungPayPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesSepaBankTransferPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesSepaBankTransferPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesSepaDebitPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesSepaDebitPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesSwishPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesSwishPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesTwintPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesTwintPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesUsBankTransferPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesUsBankTransferPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesZipPaymentsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesZipPaymentsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesBankAccountsInstantProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesBankAccountsInstantProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesBankAccountsLocalProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesBankAccountsLocalProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesBankAccountsWireProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesBankAccountsWireProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesCardsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesCardsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesCryptoWalletsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesCryptoWalletsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesPaperChecksProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesPaperChecksProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesStripeBalanceStripeTransfersProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesStripeBalanceStripeTransfersProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesConsumerHoldsCurrenciesUsdProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesConsumerHoldsCurrenciesUsdProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesFinancialAddressesBankAccountsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesFinancialAddressesBankAccountsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesFinancialAddressesCryptoWalletsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesFinancialAddressesCryptoWalletsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesEurProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesEurProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesGbpProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesGbpProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesUsdProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesUsdProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesUsdcProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesUsdcProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesInboundTransfersBankAccountsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesInboundTransfersBankAccountsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsBankAccountsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsBankAccountsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsCardsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsCardsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsCryptoWalletsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsCryptoWalletsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccountsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccountsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsPaperChecksProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsPaperChecksProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersBankAccountsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersBankAccountsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersCryptoWalletsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersCryptoWalletsProtectionsPspMigrationOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersFinancialAccountsProtectionsOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersFinancialAccountsProtectionsPspMigrationOptions.cs diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index 4cdf42b0f9..e2ada73c28 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -3111dcf5bcfa362f9fc8da776e0892504ed566d3 \ No newline at end of file +161b47dfc5d5f9332c906a572b90ce8551a2f752 \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index ca72a77cb9..e656cda126 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2297 \ No newline at end of file +v2299 \ No newline at end of file diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetails.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetails.cs index a2bd7ccd7a..1c3118588e 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetails.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetails.cs @@ -256,6 +256,10 @@ public class ChargePaymentMethodDetails : StripeEntity + { + /// + /// The Tamara transaction ID associated with this payment. + /// + [JsonProperty("transaction_id")] + [STJS.JsonPropertyName("transaction_id")] + public string TransactionId { get; set; } + } +} diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreview.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreview.cs index 4863958cbb..599b936dc0 100644 --- a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreview.cs +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreview.cs @@ -300,6 +300,10 @@ public Customer Customer [STJS.JsonPropertyName("swish")] public ConfirmationTokenPaymentMethodPreviewSwish Swish { get; set; } + [JsonProperty("tamara")] + [STJS.JsonPropertyName("tamara")] + public ConfirmationTokenPaymentMethodPreviewTamara Tamara { get; set; } + [JsonProperty("twint")] [STJS.JsonPropertyName("twint")] public ConfirmationTokenPaymentMethodPreviewTwint Twint { get; set; } @@ -320,8 +324,8 @@ public Customer Customer /// paynow, paypal, paypay, payto, pix, promptpay, /// qris, rechnung, revolut_pay, samsung_pay, satispay, /// scalapay, sepa_debit, shopeepay, sofort, - /// stripe_balance, sunbit, swish, twint, upi, - /// us_bank_account, wechat_pay, or zip. + /// stripe_balance, sunbit, swish, tamara, twint, + /// upi, us_bank_account, wechat_pay, or zip. /// [JsonProperty("type")] [STJS.JsonPropertyName("type")] diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewTamara.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewTamara.cs new file mode 100644 index 0000000000..9a882ff8f0 --- /dev/null +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewTamara.cs @@ -0,0 +1,12 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class ConfirmationTokenPaymentMethodPreviewTamara : StripeEntity + { + } +} diff --git a/src/Stripe.net/Entities/Orders/OrderPaymentSettingsPaymentMethodOptionsWechatPay.cs b/src/Stripe.net/Entities/Orders/OrderPaymentSettingsPaymentMethodOptionsWechatPay.cs index 27ce0f3736..8137903f1e 100644 --- a/src/Stripe.net/Entities/Orders/OrderPaymentSettingsPaymentMethodOptionsWechatPay.cs +++ b/src/Stripe.net/Entities/Orders/OrderPaymentSettingsPaymentMethodOptionsWechatPay.cs @@ -15,9 +15,17 @@ public class OrderPaymentSettingsPaymentMethodOptionsWechatPay : StripeEntity + /// The unique buyer ID for the app ID registered with WeChat Pay. Only required when client + /// is mini_program. + /// + [JsonProperty("buyer_id")] + [STJS.JsonPropertyName("buyer_id")] + public string BuyerId { get; set; } + /// /// The client type that the end customer will pay from. - /// One of: android, ios, or web. + /// One of: android, ios, mini_program, or web. /// [JsonProperty("client")] [STJS.JsonPropertyName("client")] diff --git a/src/Stripe.net/Entities/PaymentAttemptRecords/PaymentAttemptRecordPaymentMethodDetails.cs b/src/Stripe.net/Entities/PaymentAttemptRecords/PaymentAttemptRecordPaymentMethodDetails.cs index d10206b7b7..ec7108dc5a 100644 --- a/src/Stripe.net/Entities/PaymentAttemptRecords/PaymentAttemptRecordPaymentMethodDetails.cs +++ b/src/Stripe.net/Entities/PaymentAttemptRecords/PaymentAttemptRecordPaymentMethodDetails.cs @@ -286,6 +286,10 @@ public class PaymentAttemptRecordPaymentMethodDetails : StripeEntity + { + /// + /// The Tamara transaction ID associated with this payment. + /// + [JsonProperty("transaction_id")] + [STJS.JsonPropertyName("transaction_id")] + public string TransactionId { get; set; } + } +} diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntent.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntent.cs index 79161e07f4..cdc8775d45 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntent.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntent.cs @@ -327,8 +327,8 @@ public Customer Customer /// paynow, paypal, paypay, payto, pix, promptpay, /// qris, rechnung, revolut_pay, samsung_pay, satispay, /// scalapay, sepa_debit, shopeepay, sofort, - /// stripe_balance, sunbit, swish, twint, upi, - /// us_bank_account, wechat_pay, or zip. + /// stripe_balance, sunbit, swish, tamara, twint, + /// upi, us_bank_account, wechat_pay, or zip. /// [JsonProperty("excluded_payment_method_types")] [STJS.JsonPropertyName("excluded_payment_method_types")] diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextAction.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextAction.cs index 6d7cb3ad18..8c17d72859 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextAction.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextAction.cs @@ -104,6 +104,10 @@ public class PaymentIntentNextAction : StripeEntity [STJS.JsonPropertyName("wechat_pay_display_qr_code")] public PaymentIntentNextActionWechatPayDisplayQrCode WechatPayDisplayQrCode { get; set; } + [JsonProperty("wechat_pay_handle_app_redirect")] + [STJS.JsonPropertyName("wechat_pay_handle_app_redirect")] + public PaymentIntentNextActionWechatPayHandleAppRedirect WechatPayHandleAppRedirect { get; set; } + [JsonProperty("wechat_pay_redirect_to_android_app")] [STJS.JsonPropertyName("wechat_pay_redirect_to_android_app")] public PaymentIntentNextActionWechatPayRedirectToAndroidApp WechatPayRedirectToAndroidApp { get; set; } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionWechatPayHandleAppRedirect.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionWechatPayHandleAppRedirect.cs new file mode 100644 index 0000000000..db2834586e --- /dev/null +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionWechatPayHandleAppRedirect.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class PaymentIntentNextActionWechatPayHandleAppRedirect : StripeEntity + { + /// + /// Session ID of the WeChat Pay signing session. + /// + [JsonProperty("session_id")] + [STJS.JsonPropertyName("session_id")] + public string SessionId { get; set; } + } +} diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsWechatPay.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsWechatPay.cs index 243eadf73e..1fd3888999 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsWechatPay.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsWechatPay.cs @@ -15,9 +15,17 @@ public class PaymentIntentPaymentMethodOptionsWechatPay : StripeEntity + /// The unique buyer ID for the app ID registered with WeChat Pay. Only required when client + /// is mini_program. + ///
+ [JsonProperty("buyer_id")] + [STJS.JsonPropertyName("buyer_id")] + public string BuyerId { get; set; } + /// /// The client type that the end customer will pay from. - /// One of: android, ios, or web. + /// One of: android, ios, mini_program, or web. /// [JsonProperty("client")] [STJS.JsonPropertyName("client")] diff --git a/src/Stripe.net/Entities/PaymentMethods/PaymentMethod.cs b/src/Stripe.net/Entities/PaymentMethods/PaymentMethod.cs index 6a2fdbd562..75ccb490a3 100644 --- a/src/Stripe.net/Entities/PaymentMethods/PaymentMethod.cs +++ b/src/Stripe.net/Entities/PaymentMethods/PaymentMethod.cs @@ -380,6 +380,10 @@ public Customer Customer [STJS.JsonPropertyName("swish")] public PaymentMethodSwish Swish { get; set; } + [JsonProperty("tamara")] + [STJS.JsonPropertyName("tamara")] + public PaymentMethodTamara Tamara { get; set; } + [JsonProperty("twint")] [STJS.JsonPropertyName("twint")] public PaymentMethodTwint Twint { get; set; } @@ -400,8 +404,8 @@ public Customer Customer /// paynow, paypal, paypay, payto, pix, promptpay, /// qris, rechnung, revolut_pay, samsung_pay, satispay, /// scalapay, sepa_debit, shopeepay, sofort, - /// stripe_balance, sunbit, swish, twint, upi, - /// us_bank_account, wechat_pay, or zip. + /// stripe_balance, sunbit, swish, tamara, twint, + /// upi, us_bank_account, wechat_pay, or zip. /// [JsonProperty("type")] [STJS.JsonPropertyName("type")] diff --git a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodTamara.cs b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodTamara.cs new file mode 100644 index 0000000000..59c1d72143 --- /dev/null +++ b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodTamara.cs @@ -0,0 +1,12 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class PaymentMethodTamara : StripeEntity + { + } +} diff --git a/src/Stripe.net/Entities/PaymentRecords/PaymentRecordPaymentMethodDetails.cs b/src/Stripe.net/Entities/PaymentRecords/PaymentRecordPaymentMethodDetails.cs index 85eb68f1dd..6d6d445939 100644 --- a/src/Stripe.net/Entities/PaymentRecords/PaymentRecordPaymentMethodDetails.cs +++ b/src/Stripe.net/Entities/PaymentRecords/PaymentRecordPaymentMethodDetails.cs @@ -286,6 +286,10 @@ public class PaymentRecordPaymentMethodDetails : StripeEntity + { + /// + /// The Tamara transaction ID associated with this payment. + /// + [JsonProperty("transaction_id")] + [STJS.JsonPropertyName("transaction_id")] + public string TransactionId { get; set; } + } +} diff --git a/src/Stripe.net/Entities/SetupIntents/SetupIntent.cs b/src/Stripe.net/Entities/SetupIntents/SetupIntent.cs index 990b909eff..6990cd01b5 100644 --- a/src/Stripe.net/Entities/SetupIntents/SetupIntent.cs +++ b/src/Stripe.net/Entities/SetupIntents/SetupIntent.cs @@ -217,8 +217,8 @@ public Customer Customer /// paynow, paypal, paypay, payto, pix, promptpay, /// qris, rechnung, revolut_pay, samsung_pay, satispay, /// scalapay, sepa_debit, shopeepay, sofort, - /// stripe_balance, sunbit, swish, twint, upi, - /// us_bank_account, wechat_pay, or zip. + /// stripe_balance, sunbit, swish, tamara, twint, + /// upi, us_bank_account, wechat_pay, or zip. /// [JsonProperty("excluded_payment_method_types")] [STJS.JsonPropertyName("excluded_payment_method_types")] diff --git a/src/Stripe.net/Entities/SetupIntents/SetupIntentNextAction.cs b/src/Stripe.net/Entities/SetupIntents/SetupIntentNextAction.cs index 600f7bd269..dca1ce1f6b 100644 --- a/src/Stripe.net/Entities/SetupIntents/SetupIntentNextAction.cs +++ b/src/Stripe.net/Entities/SetupIntents/SetupIntentNextAction.cs @@ -51,5 +51,9 @@ public class SetupIntentNextAction : StripeEntity [JsonProperty("verify_with_microdeposits")] [STJS.JsonPropertyName("verify_with_microdeposits")] public SetupIntentNextActionVerifyWithMicrodeposits VerifyWithMicrodeposits { get; set; } + + [JsonProperty("wechat_pay_handle_app_redirect")] + [STJS.JsonPropertyName("wechat_pay_handle_app_redirect")] + public SetupIntentNextActionWechatPayHandleAppRedirect WechatPayHandleAppRedirect { get; set; } } } diff --git a/src/Stripe.net/Entities/SetupIntents/SetupIntentNextActionWechatPayHandleAppRedirect.cs b/src/Stripe.net/Entities/SetupIntents/SetupIntentNextActionWechatPayHandleAppRedirect.cs new file mode 100644 index 0000000000..a47fd83e47 --- /dev/null +++ b/src/Stripe.net/Entities/SetupIntents/SetupIntentNextActionWechatPayHandleAppRedirect.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class SetupIntentNextActionWechatPayHandleAppRedirect : StripeEntity + { + /// + /// Session ID of the WeChat Pay signing session. + /// + [JsonProperty("session_id")] + [STJS.JsonPropertyName("session_id")] + public string SessionId { get; set; } + } +} diff --git a/src/Stripe.net/Entities/SharedPayment/GrantedTokens/GrantedTokenPaymentMethodDetails.cs b/src/Stripe.net/Entities/SharedPayment/GrantedTokens/GrantedTokenPaymentMethodDetails.cs index 702c91a33d..11c90552d2 100644 --- a/src/Stripe.net/Entities/SharedPayment/GrantedTokens/GrantedTokenPaymentMethodDetails.cs +++ b/src/Stripe.net/Entities/SharedPayment/GrantedTokens/GrantedTokenPaymentMethodDetails.cs @@ -252,6 +252,10 @@ public class GrantedTokenPaymentMethodDetails : StripeEntitypaynow, paypal, paypay, payto, pix, promptpay, /// qris, rechnung, revolut_pay, samsung_pay, satispay, /// scalapay, sepa_debit, shopeepay, sofort, - /// stripe_balance, sunbit, swish, twint, upi, - /// us_bank_account, wechat_pay, or zip. + /// stripe_balance, sunbit, swish, tamara, twint, + /// upi, us_bank_account, wechat_pay, or zip. /// [JsonProperty("type")] [STJS.JsonPropertyName("type")] diff --git a/src/Stripe.net/Entities/SharedPayment/GrantedTokens/GrantedTokenPaymentMethodDetailsTamara.cs b/src/Stripe.net/Entities/SharedPayment/GrantedTokens/GrantedTokenPaymentMethodDetailsTamara.cs new file mode 100644 index 0000000000..0281ca6ef9 --- /dev/null +++ b/src/Stripe.net/Entities/SharedPayment/GrantedTokens/GrantedTokenPaymentMethodDetailsTamara.cs @@ -0,0 +1,12 @@ +// File generated from our OpenAPI spec +namespace Stripe.SharedPayment +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class GrantedTokenPaymentMethodDetailsTamara : StripeEntity + { + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialCelticChargeCard.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialCelticChargeCard.cs index a24a969b5d..1647503d13 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialCelticChargeCard.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialCelticChargeCard.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationCardCreatorCapabilitiesCommercialCelticChargeCard : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationCardCreatorCapabilitiesCommercialCelticChargeCardProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialCelticChargeCardProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialCelticChargeCardProtections.cs new file mode 100644 index 0000000000..7937dfbdc9 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialCelticChargeCardProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationCardCreatorCapabilitiesCommercialCelticChargeCardProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationCardCreatorCapabilitiesCommercialCelticChargeCardProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialCelticChargeCardProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialCelticChargeCardProtectionsPspMigration.cs new file mode 100644 index 0000000000..ed0242c2a8 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialCelticChargeCardProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationCardCreatorCapabilitiesCommercialCelticChargeCardProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialCelticSpendCard.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialCelticSpendCard.cs index 455732d89b..28c756ddf1 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialCelticSpendCard.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialCelticSpendCard.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationCardCreatorCapabilitiesCommercialCelticSpendCard : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationCardCreatorCapabilitiesCommercialCelticSpendCardProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialCelticSpendCardProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialCelticSpendCardProtections.cs new file mode 100644 index 0000000000..7a3316b167 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialCelticSpendCardProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationCardCreatorCapabilitiesCommercialCelticSpendCardProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationCardCreatorCapabilitiesCommercialCelticSpendCardProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialCelticSpendCardProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialCelticSpendCardProtectionsPspMigration.cs new file mode 100644 index 0000000000..31b4763cf7 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialCelticSpendCardProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationCardCreatorCapabilitiesCommercialCelticSpendCardProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankChargeCard.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankChargeCard.cs index 6dedafb9b3..9117c4addf 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankChargeCard.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankChargeCard.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankChargeCard : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankChargeCardProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankChargeCardProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankChargeCardProtections.cs new file mode 100644 index 0000000000..27cde7485a --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankChargeCardProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankChargeCardProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankChargeCardProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankChargeCardProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankChargeCardProtectionsPspMigration.cs new file mode 100644 index 0000000000..f746a52ac6 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankChargeCardProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankChargeCardProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankPrepaidCard.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankPrepaidCard.cs index ac2050d0f5..7bf6de19e6 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankPrepaidCard.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankPrepaidCard.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankPrepaidCard : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankPrepaidCardProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankPrepaidCardProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankPrepaidCardProtections.cs new file mode 100644 index 0000000000..871ff189e2 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankPrepaidCardProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankPrepaidCardProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankPrepaidCardProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankPrepaidCardProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankPrepaidCardProtectionsPspMigration.cs new file mode 100644 index 0000000000..b65380c262 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankPrepaidCardProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankPrepaidCardProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankSpendCard.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankSpendCard.cs index cc411875f1..7183458761 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankSpendCard.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankSpendCard.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankSpendCard : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankSpendCardProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankSpendCardProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankSpendCardProtections.cs new file mode 100644 index 0000000000..90a6d0ec40 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankSpendCardProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankSpendCardProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankSpendCardProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankSpendCardProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankSpendCardProtectionsPspMigration.cs new file mode 100644 index 0000000000..9f1e87f830 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankSpendCardProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankSpendCardProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialFifthThirdChargeCard.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialFifthThirdChargeCard.cs index 122cdfd5d5..4a4c8d1d8e 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialFifthThirdChargeCard.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialFifthThirdChargeCard.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationCardCreatorCapabilitiesCommercialFifthThirdChargeCard : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationCardCreatorCapabilitiesCommercialFifthThirdChargeCardProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialFifthThirdChargeCardProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialFifthThirdChargeCardProtections.cs new file mode 100644 index 0000000000..40c99f0429 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialFifthThirdChargeCardProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationCardCreatorCapabilitiesCommercialFifthThirdChargeCardProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationCardCreatorCapabilitiesCommercialFifthThirdChargeCardProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialFifthThirdChargeCardProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialFifthThirdChargeCardProtectionsPspMigration.cs new file mode 100644 index 0000000000..b10800a405 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialFifthThirdChargeCardProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationCardCreatorCapabilitiesCommercialFifthThirdChargeCardProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialLeadPrepaidCard.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialLeadPrepaidCard.cs index aac56cb154..d175a32d23 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialLeadPrepaidCard.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialLeadPrepaidCard.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationCardCreatorCapabilitiesCommercialLeadPrepaidCard : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationCardCreatorCapabilitiesCommercialLeadPrepaidCardProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialLeadPrepaidCardProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialLeadPrepaidCardProtections.cs new file mode 100644 index 0000000000..945be25c90 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialLeadPrepaidCardProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationCardCreatorCapabilitiesCommercialLeadPrepaidCardProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationCardCreatorCapabilitiesCommercialLeadPrepaidCardProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialLeadPrepaidCardProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialLeadPrepaidCardProtectionsPspMigration.cs new file mode 100644 index 0000000000..5fe254eb18 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialLeadPrepaidCardProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationCardCreatorCapabilitiesCommercialLeadPrepaidCardProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialStripeChargeCard.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialStripeChargeCard.cs index dab11ecae3..48f9bfdcf3 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialStripeChargeCard.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialStripeChargeCard.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationCardCreatorCapabilitiesCommercialStripeChargeCard : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationCardCreatorCapabilitiesCommercialStripeChargeCardProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialStripeChargeCardProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialStripeChargeCardProtections.cs new file mode 100644 index 0000000000..996f67ec6f --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialStripeChargeCardProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationCardCreatorCapabilitiesCommercialStripeChargeCardProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationCardCreatorCapabilitiesCommercialStripeChargeCardProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialStripeChargeCardProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialStripeChargeCardProtectionsPspMigration.cs new file mode 100644 index 0000000000..5a2cc5af02 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialStripeChargeCardProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationCardCreatorCapabilitiesCommercialStripeChargeCardProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialStripePrepaidCard.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialStripePrepaidCard.cs index 7916e5b401..52b5e51850 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialStripePrepaidCard.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialStripePrepaidCard.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationCardCreatorCapabilitiesCommercialStripePrepaidCard : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationCardCreatorCapabilitiesCommercialStripePrepaidCardProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialStripePrepaidCardProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialStripePrepaidCardProtections.cs new file mode 100644 index 0000000000..a0e0668a5b --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialStripePrepaidCardProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationCardCreatorCapabilitiesCommercialStripePrepaidCardProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationCardCreatorCapabilitiesCommercialStripePrepaidCardProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialStripePrepaidCardProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialStripePrepaidCardProtectionsPspMigration.cs new file mode 100644 index 0000000000..ec8cb7c5a8 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesCommercialStripePrepaidCardProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationCardCreatorCapabilitiesCommercialStripePrepaidCardProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesConsumerCelticRevolvingCreditCard.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesConsumerCelticRevolvingCreditCard.cs index 861cc047fb..0c880e2d11 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesConsumerCelticRevolvingCreditCard.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesConsumerCelticRevolvingCreditCard.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationCardCreatorCapabilitiesConsumerCelticRevolvingCreditCard : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationCardCreatorCapabilitiesConsumerCelticRevolvingCreditCardProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesConsumerCelticRevolvingCreditCardProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesConsumerCelticRevolvingCreditCardProtections.cs new file mode 100644 index 0000000000..1fda840bd9 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesConsumerCelticRevolvingCreditCardProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationCardCreatorCapabilitiesConsumerCelticRevolvingCreditCardProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationCardCreatorCapabilitiesConsumerCelticRevolvingCreditCardProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesConsumerCelticRevolvingCreditCardProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesConsumerCelticRevolvingCreditCardProtectionsPspMigration.cs new file mode 100644 index 0000000000..6586b987d5 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesConsumerCelticRevolvingCreditCardProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationCardCreatorCapabilitiesConsumerCelticRevolvingCreditCardProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesConsumerCrossRiverBankPrepaidCard.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesConsumerCrossRiverBankPrepaidCard.cs index 21a142011e..320c7b0985 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesConsumerCrossRiverBankPrepaidCard.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesConsumerCrossRiverBankPrepaidCard.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationCardCreatorCapabilitiesConsumerCrossRiverBankPrepaidCard : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationCardCreatorCapabilitiesConsumerCrossRiverBankPrepaidCardProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesConsumerCrossRiverBankPrepaidCardProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesConsumerCrossRiverBankPrepaidCardProtections.cs new file mode 100644 index 0000000000..3bbab49a85 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesConsumerCrossRiverBankPrepaidCardProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationCardCreatorCapabilitiesConsumerCrossRiverBankPrepaidCardProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationCardCreatorCapabilitiesConsumerCrossRiverBankPrepaidCardProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesConsumerCrossRiverBankPrepaidCardProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesConsumerCrossRiverBankPrepaidCardProtectionsPspMigration.cs new file mode 100644 index 0000000000..fc28c66464 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesConsumerCrossRiverBankPrepaidCardProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationCardCreatorCapabilitiesConsumerCrossRiverBankPrepaidCardProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesConsumerLeadDebitCard.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesConsumerLeadDebitCard.cs index 87100b82a9..5a7174e936 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesConsumerLeadDebitCard.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesConsumerLeadDebitCard.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationCardCreatorCapabilitiesConsumerLeadDebitCard : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationCardCreatorCapabilitiesConsumerLeadDebitCardProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesConsumerLeadDebitCardProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesConsumerLeadDebitCardProtections.cs new file mode 100644 index 0000000000..9b603208f0 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesConsumerLeadDebitCardProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationCardCreatorCapabilitiesConsumerLeadDebitCardProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationCardCreatorCapabilitiesConsumerLeadDebitCardProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesConsumerLeadDebitCardProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesConsumerLeadDebitCardProtectionsPspMigration.cs new file mode 100644 index 0000000000..2fa23958a6 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesConsumerLeadDebitCardProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationCardCreatorCapabilitiesConsumerLeadDebitCardProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesConsumerLeadPrepaidCard.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesConsumerLeadPrepaidCard.cs index da297ce93e..6c89b69132 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesConsumerLeadPrepaidCard.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesConsumerLeadPrepaidCard.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationCardCreatorCapabilitiesConsumerLeadPrepaidCard : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationCardCreatorCapabilitiesConsumerLeadPrepaidCardProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesConsumerLeadPrepaidCardProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesConsumerLeadPrepaidCardProtections.cs new file mode 100644 index 0000000000..80eadaab07 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesConsumerLeadPrepaidCardProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationCardCreatorCapabilitiesConsumerLeadPrepaidCardProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationCardCreatorCapabilitiesConsumerLeadPrepaidCardProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesConsumerLeadPrepaidCardProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesConsumerLeadPrepaidCardProtectionsPspMigration.cs new file mode 100644 index 0000000000..025de2866a --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCardCreatorCapabilitiesConsumerLeadPrepaidCardProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationCardCreatorCapabilitiesConsumerLeadPrepaidCardProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCustomerCapabilitiesAutomaticIndirectTax.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCustomerCapabilitiesAutomaticIndirectTax.cs index a22ad98d84..e6cd3b16e7 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCustomerCapabilitiesAutomaticIndirectTax.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCustomerCapabilitiesAutomaticIndirectTax.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationCustomerCapabilitiesAutomaticIndirectTax : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationCustomerCapabilitiesAutomaticIndirectTaxProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCustomerCapabilitiesAutomaticIndirectTaxProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCustomerCapabilitiesAutomaticIndirectTaxProtections.cs new file mode 100644 index 0000000000..650fb93d14 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCustomerCapabilitiesAutomaticIndirectTaxProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationCustomerCapabilitiesAutomaticIndirectTaxProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationCustomerCapabilitiesAutomaticIndirectTaxProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCustomerCapabilitiesAutomaticIndirectTaxProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCustomerCapabilitiesAutomaticIndirectTaxProtectionsPspMigration.cs new file mode 100644 index 0000000000..513f3cb1aa --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCustomerCapabilitiesAutomaticIndirectTaxProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationCustomerCapabilitiesAutomaticIndirectTaxProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAchDebitPayments.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAchDebitPayments.cs index 23a2e2d0dd..cbe500d1b7 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAchDebitPayments.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAchDebitPayments.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationMerchantCapabilitiesAchDebitPayments : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationMerchantCapabilitiesAchDebitPaymentsProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAchDebitPaymentsProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAchDebitPaymentsProtections.cs new file mode 100644 index 0000000000..a19ae1d78e --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAchDebitPaymentsProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesAchDebitPaymentsProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationMerchantCapabilitiesAchDebitPaymentsProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAchDebitPaymentsProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAchDebitPaymentsProtectionsPspMigration.cs new file mode 100644 index 0000000000..72b7f607a4 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAchDebitPaymentsProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesAchDebitPaymentsProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAcssDebitPayments.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAcssDebitPayments.cs index ef076bcb03..8425eed629 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAcssDebitPayments.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAcssDebitPayments.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationMerchantCapabilitiesAcssDebitPayments : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationMerchantCapabilitiesAcssDebitPaymentsProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAcssDebitPaymentsProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAcssDebitPaymentsProtections.cs new file mode 100644 index 0000000000..660f39dcc3 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAcssDebitPaymentsProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesAcssDebitPaymentsProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationMerchantCapabilitiesAcssDebitPaymentsProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAcssDebitPaymentsProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAcssDebitPaymentsProtectionsPspMigration.cs new file mode 100644 index 0000000000..f62f8cedff --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAcssDebitPaymentsProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesAcssDebitPaymentsProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAffirmPayments.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAffirmPayments.cs index 52c5f5051b..81deeb2821 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAffirmPayments.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAffirmPayments.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationMerchantCapabilitiesAffirmPayments : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationMerchantCapabilitiesAffirmPaymentsProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAffirmPaymentsProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAffirmPaymentsProtections.cs new file mode 100644 index 0000000000..289f1b14a5 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAffirmPaymentsProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesAffirmPaymentsProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationMerchantCapabilitiesAffirmPaymentsProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAffirmPaymentsProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAffirmPaymentsProtectionsPspMigration.cs new file mode 100644 index 0000000000..bdac85a2fc --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAffirmPaymentsProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesAffirmPaymentsProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAfterpayClearpayPayments.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAfterpayClearpayPayments.cs index 4a1b035313..c6ea113f9b 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAfterpayClearpayPayments.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAfterpayClearpayPayments.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationMerchantCapabilitiesAfterpayClearpayPayments : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationMerchantCapabilitiesAfterpayClearpayPaymentsProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAfterpayClearpayPaymentsProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAfterpayClearpayPaymentsProtections.cs new file mode 100644 index 0000000000..ca99569021 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAfterpayClearpayPaymentsProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesAfterpayClearpayPaymentsProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationMerchantCapabilitiesAfterpayClearpayPaymentsProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAfterpayClearpayPaymentsProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAfterpayClearpayPaymentsProtectionsPspMigration.cs new file mode 100644 index 0000000000..a294faf89c --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAfterpayClearpayPaymentsProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesAfterpayClearpayPaymentsProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAlmaPayments.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAlmaPayments.cs index f6c853663b..ef9d7ae4d1 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAlmaPayments.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAlmaPayments.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationMerchantCapabilitiesAlmaPayments : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationMerchantCapabilitiesAlmaPaymentsProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAlmaPaymentsProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAlmaPaymentsProtections.cs new file mode 100644 index 0000000000..e98348c506 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAlmaPaymentsProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesAlmaPaymentsProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationMerchantCapabilitiesAlmaPaymentsProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAlmaPaymentsProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAlmaPaymentsProtectionsPspMigration.cs new file mode 100644 index 0000000000..aa31381ba1 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAlmaPaymentsProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesAlmaPaymentsProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAmazonPayPayments.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAmazonPayPayments.cs index 3a0ef7faf5..66c0760506 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAmazonPayPayments.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAmazonPayPayments.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationMerchantCapabilitiesAmazonPayPayments : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationMerchantCapabilitiesAmazonPayPaymentsProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAmazonPayPaymentsProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAmazonPayPaymentsProtections.cs new file mode 100644 index 0000000000..db71c718d4 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAmazonPayPaymentsProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesAmazonPayPaymentsProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationMerchantCapabilitiesAmazonPayPaymentsProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAmazonPayPaymentsProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAmazonPayPaymentsProtectionsPspMigration.cs new file mode 100644 index 0000000000..063836e0e9 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAmazonPayPaymentsProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesAmazonPayPaymentsProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAuBecsDebitPayments.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAuBecsDebitPayments.cs index 0086f759e0..9ea35ad54a 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAuBecsDebitPayments.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAuBecsDebitPayments.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationMerchantCapabilitiesAuBecsDebitPayments : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationMerchantCapabilitiesAuBecsDebitPaymentsProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAuBecsDebitPaymentsProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAuBecsDebitPaymentsProtections.cs new file mode 100644 index 0000000000..5f887239f1 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAuBecsDebitPaymentsProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesAuBecsDebitPaymentsProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationMerchantCapabilitiesAuBecsDebitPaymentsProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAuBecsDebitPaymentsProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAuBecsDebitPaymentsProtectionsPspMigration.cs new file mode 100644 index 0000000000..53406c258b --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesAuBecsDebitPaymentsProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesAuBecsDebitPaymentsProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesBacsDebitPayments.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesBacsDebitPayments.cs index fd1fdc39db..9433bfb366 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesBacsDebitPayments.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesBacsDebitPayments.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationMerchantCapabilitiesBacsDebitPayments : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationMerchantCapabilitiesBacsDebitPaymentsProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesBacsDebitPaymentsProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesBacsDebitPaymentsProtections.cs new file mode 100644 index 0000000000..7c55fef374 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesBacsDebitPaymentsProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesBacsDebitPaymentsProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationMerchantCapabilitiesBacsDebitPaymentsProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesBacsDebitPaymentsProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesBacsDebitPaymentsProtectionsPspMigration.cs new file mode 100644 index 0000000000..94e367ee54 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesBacsDebitPaymentsProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesBacsDebitPaymentsProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesBancontactPayments.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesBancontactPayments.cs index e78f383b5e..2822685bdc 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesBancontactPayments.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesBancontactPayments.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationMerchantCapabilitiesBancontactPayments : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationMerchantCapabilitiesBancontactPaymentsProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesBancontactPaymentsProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesBancontactPaymentsProtections.cs new file mode 100644 index 0000000000..63c1b96076 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesBancontactPaymentsProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesBancontactPaymentsProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationMerchantCapabilitiesBancontactPaymentsProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesBancontactPaymentsProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesBancontactPaymentsProtectionsPspMigration.cs new file mode 100644 index 0000000000..c9360ea689 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesBancontactPaymentsProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesBancontactPaymentsProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesBlikPayments.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesBlikPayments.cs index 4388aa0834..22eecf35b1 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesBlikPayments.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesBlikPayments.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationMerchantCapabilitiesBlikPayments : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationMerchantCapabilitiesBlikPaymentsProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesBlikPaymentsProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesBlikPaymentsProtections.cs new file mode 100644 index 0000000000..f78a758f1c --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesBlikPaymentsProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesBlikPaymentsProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationMerchantCapabilitiesBlikPaymentsProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesBlikPaymentsProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesBlikPaymentsProtectionsPspMigration.cs new file mode 100644 index 0000000000..13c613d45e --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesBlikPaymentsProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesBlikPaymentsProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesBoletoPayments.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesBoletoPayments.cs index 0b395d5f1c..8d23ba2854 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesBoletoPayments.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesBoletoPayments.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationMerchantCapabilitiesBoletoPayments : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationMerchantCapabilitiesBoletoPaymentsProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesBoletoPaymentsProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesBoletoPaymentsProtections.cs new file mode 100644 index 0000000000..1553fbce67 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesBoletoPaymentsProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesBoletoPaymentsProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationMerchantCapabilitiesBoletoPaymentsProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesBoletoPaymentsProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesBoletoPaymentsProtectionsPspMigration.cs new file mode 100644 index 0000000000..03b7e99710 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesBoletoPaymentsProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesBoletoPaymentsProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesCardPayments.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesCardPayments.cs index 56669283c5..1d5ee1a7a0 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesCardPayments.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesCardPayments.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationMerchantCapabilitiesCardPayments : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationMerchantCapabilitiesCardPaymentsProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesCardPaymentsProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesCardPaymentsProtections.cs new file mode 100644 index 0000000000..5df1009c10 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesCardPaymentsProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesCardPaymentsProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationMerchantCapabilitiesCardPaymentsProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesCardPaymentsProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesCardPaymentsProtectionsPspMigration.cs new file mode 100644 index 0000000000..0be65e5d2d --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesCardPaymentsProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesCardPaymentsProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesCartesBancairesPayments.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesCartesBancairesPayments.cs index 8003cbe628..ab384c3276 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesCartesBancairesPayments.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesCartesBancairesPayments.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationMerchantCapabilitiesCartesBancairesPayments : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationMerchantCapabilitiesCartesBancairesPaymentsProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesCartesBancairesPaymentsProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesCartesBancairesPaymentsProtections.cs new file mode 100644 index 0000000000..88c1712bac --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesCartesBancairesPaymentsProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesCartesBancairesPaymentsProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationMerchantCapabilitiesCartesBancairesPaymentsProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesCartesBancairesPaymentsProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesCartesBancairesPaymentsProtectionsPspMigration.cs new file mode 100644 index 0000000000..b10cfe8d05 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesCartesBancairesPaymentsProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesCartesBancairesPaymentsProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesCashappPayments.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesCashappPayments.cs index 39f5e93cf6..015346e299 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesCashappPayments.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesCashappPayments.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationMerchantCapabilitiesCashappPayments : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationMerchantCapabilitiesCashappPaymentsProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesCashappPaymentsProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesCashappPaymentsProtections.cs new file mode 100644 index 0000000000..2a962dceb9 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesCashappPaymentsProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesCashappPaymentsProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationMerchantCapabilitiesCashappPaymentsProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesCashappPaymentsProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesCashappPaymentsProtectionsPspMigration.cs new file mode 100644 index 0000000000..4bc879d0db --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesCashappPaymentsProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesCashappPaymentsProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesEpsPayments.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesEpsPayments.cs index be10512a57..7a7b2f64af 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesEpsPayments.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesEpsPayments.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationMerchantCapabilitiesEpsPayments : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationMerchantCapabilitiesEpsPaymentsProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesEpsPaymentsProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesEpsPaymentsProtections.cs new file mode 100644 index 0000000000..1a48e4ff2d --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesEpsPaymentsProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesEpsPaymentsProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationMerchantCapabilitiesEpsPaymentsProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesEpsPaymentsProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesEpsPaymentsProtectionsPspMigration.cs new file mode 100644 index 0000000000..cfcb66d8d7 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesEpsPaymentsProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesEpsPaymentsProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesFpxPayments.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesFpxPayments.cs index 154d9aca3a..5fa3d2ecdc 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesFpxPayments.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesFpxPayments.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationMerchantCapabilitiesFpxPayments : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationMerchantCapabilitiesFpxPaymentsProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesFpxPaymentsProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesFpxPaymentsProtections.cs new file mode 100644 index 0000000000..9689d06b64 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesFpxPaymentsProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesFpxPaymentsProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationMerchantCapabilitiesFpxPaymentsProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesFpxPaymentsProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesFpxPaymentsProtectionsPspMigration.cs new file mode 100644 index 0000000000..66c46274f4 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesFpxPaymentsProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesFpxPaymentsProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesGbBankTransferPayments.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesGbBankTransferPayments.cs index 9975d02c08..ffaa62951c 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesGbBankTransferPayments.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesGbBankTransferPayments.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationMerchantCapabilitiesGbBankTransferPayments : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationMerchantCapabilitiesGbBankTransferPaymentsProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesGbBankTransferPaymentsProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesGbBankTransferPaymentsProtections.cs new file mode 100644 index 0000000000..661710c1d2 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesGbBankTransferPaymentsProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesGbBankTransferPaymentsProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationMerchantCapabilitiesGbBankTransferPaymentsProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesGbBankTransferPaymentsProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesGbBankTransferPaymentsProtectionsPspMigration.cs new file mode 100644 index 0000000000..66bdbb6384 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesGbBankTransferPaymentsProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesGbBankTransferPaymentsProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesGrabpayPayments.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesGrabpayPayments.cs index 9c2de9d410..fe52b2b2b2 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesGrabpayPayments.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesGrabpayPayments.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationMerchantCapabilitiesGrabpayPayments : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationMerchantCapabilitiesGrabpayPaymentsProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesGrabpayPaymentsProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesGrabpayPaymentsProtections.cs new file mode 100644 index 0000000000..ebd45b9527 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesGrabpayPaymentsProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesGrabpayPaymentsProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationMerchantCapabilitiesGrabpayPaymentsProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesGrabpayPaymentsProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesGrabpayPaymentsProtectionsPspMigration.cs new file mode 100644 index 0000000000..7c7bee1326 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesGrabpayPaymentsProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesGrabpayPaymentsProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesIdealPayments.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesIdealPayments.cs index 1cfaf939d0..c1304c2436 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesIdealPayments.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesIdealPayments.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationMerchantCapabilitiesIdealPayments : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationMerchantCapabilitiesIdealPaymentsProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesIdealPaymentsProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesIdealPaymentsProtections.cs new file mode 100644 index 0000000000..f5b3b7ad31 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesIdealPaymentsProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesIdealPaymentsProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationMerchantCapabilitiesIdealPaymentsProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesIdealPaymentsProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesIdealPaymentsProtectionsPspMigration.cs new file mode 100644 index 0000000000..ef682e159c --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesIdealPaymentsProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesIdealPaymentsProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesJcbPayments.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesJcbPayments.cs index caef2b2ce2..23b17d5e59 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesJcbPayments.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesJcbPayments.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationMerchantCapabilitiesJcbPayments : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationMerchantCapabilitiesJcbPaymentsProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesJcbPaymentsProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesJcbPaymentsProtections.cs new file mode 100644 index 0000000000..98567ee279 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesJcbPaymentsProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesJcbPaymentsProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationMerchantCapabilitiesJcbPaymentsProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesJcbPaymentsProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesJcbPaymentsProtectionsPspMigration.cs new file mode 100644 index 0000000000..d159e0c215 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesJcbPaymentsProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesJcbPaymentsProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesJpBankTransferPayments.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesJpBankTransferPayments.cs index db0c40375d..0e16ab558f 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesJpBankTransferPayments.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesJpBankTransferPayments.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationMerchantCapabilitiesJpBankTransferPayments : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationMerchantCapabilitiesJpBankTransferPaymentsProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesJpBankTransferPaymentsProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesJpBankTransferPaymentsProtections.cs new file mode 100644 index 0000000000..4273cc231f --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesJpBankTransferPaymentsProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesJpBankTransferPaymentsProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationMerchantCapabilitiesJpBankTransferPaymentsProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesJpBankTransferPaymentsProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesJpBankTransferPaymentsProtectionsPspMigration.cs new file mode 100644 index 0000000000..9375ff2d0a --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesJpBankTransferPaymentsProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesJpBankTransferPaymentsProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesKakaoPayPayments.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesKakaoPayPayments.cs index 47e17eaa1e..8f80d073c6 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesKakaoPayPayments.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesKakaoPayPayments.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationMerchantCapabilitiesKakaoPayPayments : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationMerchantCapabilitiesKakaoPayPaymentsProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesKakaoPayPaymentsProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesKakaoPayPaymentsProtections.cs new file mode 100644 index 0000000000..3b2124c979 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesKakaoPayPaymentsProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesKakaoPayPaymentsProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationMerchantCapabilitiesKakaoPayPaymentsProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesKakaoPayPaymentsProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesKakaoPayPaymentsProtectionsPspMigration.cs new file mode 100644 index 0000000000..9dadb519de --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesKakaoPayPaymentsProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesKakaoPayPaymentsProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesKlarnaPayments.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesKlarnaPayments.cs index c19477a444..0bf14d0356 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesKlarnaPayments.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesKlarnaPayments.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationMerchantCapabilitiesKlarnaPayments : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationMerchantCapabilitiesKlarnaPaymentsProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesKlarnaPaymentsProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesKlarnaPaymentsProtections.cs new file mode 100644 index 0000000000..7adfacd122 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesKlarnaPaymentsProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesKlarnaPaymentsProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationMerchantCapabilitiesKlarnaPaymentsProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesKlarnaPaymentsProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesKlarnaPaymentsProtectionsPspMigration.cs new file mode 100644 index 0000000000..216244114f --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesKlarnaPaymentsProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesKlarnaPaymentsProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesKonbiniPayments.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesKonbiniPayments.cs index e30f4a52a8..2743eb19bb 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesKonbiniPayments.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesKonbiniPayments.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationMerchantCapabilitiesKonbiniPayments : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationMerchantCapabilitiesKonbiniPaymentsProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesKonbiniPaymentsProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesKonbiniPaymentsProtections.cs new file mode 100644 index 0000000000..50d124ea9f --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesKonbiniPaymentsProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesKonbiniPaymentsProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationMerchantCapabilitiesKonbiniPaymentsProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesKonbiniPaymentsProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesKonbiniPaymentsProtectionsPspMigration.cs new file mode 100644 index 0000000000..fb4b6be3e9 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesKonbiniPaymentsProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesKonbiniPaymentsProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesKrCardPayments.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesKrCardPayments.cs index 3c20af67cd..b6533fb549 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesKrCardPayments.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesKrCardPayments.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationMerchantCapabilitiesKrCardPayments : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationMerchantCapabilitiesKrCardPaymentsProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesKrCardPaymentsProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesKrCardPaymentsProtections.cs new file mode 100644 index 0000000000..af689276cb --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesKrCardPaymentsProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesKrCardPaymentsProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationMerchantCapabilitiesKrCardPaymentsProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesKrCardPaymentsProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesKrCardPaymentsProtectionsPspMigration.cs new file mode 100644 index 0000000000..7c4683bd8a --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesKrCardPaymentsProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesKrCardPaymentsProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesLinkPayments.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesLinkPayments.cs index e46c94c95d..c36c38a017 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesLinkPayments.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesLinkPayments.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationMerchantCapabilitiesLinkPayments : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationMerchantCapabilitiesLinkPaymentsProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesLinkPaymentsProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesLinkPaymentsProtections.cs new file mode 100644 index 0000000000..ae1cddf51c --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesLinkPaymentsProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesLinkPaymentsProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationMerchantCapabilitiesLinkPaymentsProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesLinkPaymentsProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesLinkPaymentsProtectionsPspMigration.cs new file mode 100644 index 0000000000..48b4a291e1 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesLinkPaymentsProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesLinkPaymentsProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesMobilepayPayments.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesMobilepayPayments.cs index 64cd983765..13e29092d2 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesMobilepayPayments.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesMobilepayPayments.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationMerchantCapabilitiesMobilepayPayments : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationMerchantCapabilitiesMobilepayPaymentsProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesMobilepayPaymentsProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesMobilepayPaymentsProtections.cs new file mode 100644 index 0000000000..84185fa027 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesMobilepayPaymentsProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesMobilepayPaymentsProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationMerchantCapabilitiesMobilepayPaymentsProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesMobilepayPaymentsProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesMobilepayPaymentsProtectionsPspMigration.cs new file mode 100644 index 0000000000..58d1d35aa4 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesMobilepayPaymentsProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesMobilepayPaymentsProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesMultibancoPayments.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesMultibancoPayments.cs index 7babb09ac2..087064ff0a 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesMultibancoPayments.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesMultibancoPayments.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationMerchantCapabilitiesMultibancoPayments : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationMerchantCapabilitiesMultibancoPaymentsProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesMultibancoPaymentsProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesMultibancoPaymentsProtections.cs new file mode 100644 index 0000000000..440d65087f --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesMultibancoPaymentsProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesMultibancoPaymentsProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationMerchantCapabilitiesMultibancoPaymentsProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesMultibancoPaymentsProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesMultibancoPaymentsProtectionsPspMigration.cs new file mode 100644 index 0000000000..219db96fc5 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesMultibancoPaymentsProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesMultibancoPaymentsProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesMxBankTransferPayments.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesMxBankTransferPayments.cs index ed7209442b..bb44dc7a9d 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesMxBankTransferPayments.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesMxBankTransferPayments.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationMerchantCapabilitiesMxBankTransferPayments : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationMerchantCapabilitiesMxBankTransferPaymentsProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesMxBankTransferPaymentsProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesMxBankTransferPaymentsProtections.cs new file mode 100644 index 0000000000..b088f0036d --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesMxBankTransferPaymentsProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesMxBankTransferPaymentsProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationMerchantCapabilitiesMxBankTransferPaymentsProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesMxBankTransferPaymentsProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesMxBankTransferPaymentsProtectionsPspMigration.cs new file mode 100644 index 0000000000..36e3b6b086 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesMxBankTransferPaymentsProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesMxBankTransferPaymentsProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesNaverPayPayments.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesNaverPayPayments.cs index 2fe3f99709..c0ca3e6a11 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesNaverPayPayments.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesNaverPayPayments.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationMerchantCapabilitiesNaverPayPayments : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationMerchantCapabilitiesNaverPayPaymentsProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesNaverPayPaymentsProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesNaverPayPaymentsProtections.cs new file mode 100644 index 0000000000..c56941e8fa --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesNaverPayPaymentsProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesNaverPayPaymentsProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationMerchantCapabilitiesNaverPayPaymentsProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesNaverPayPaymentsProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesNaverPayPaymentsProtectionsPspMigration.cs new file mode 100644 index 0000000000..574c63bdb9 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesNaverPayPaymentsProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesNaverPayPaymentsProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesOxxoPayments.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesOxxoPayments.cs index a8fcef5a3c..eef5479924 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesOxxoPayments.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesOxxoPayments.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationMerchantCapabilitiesOxxoPayments : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationMerchantCapabilitiesOxxoPaymentsProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesOxxoPaymentsProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesOxxoPaymentsProtections.cs new file mode 100644 index 0000000000..dca7416df6 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesOxxoPaymentsProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesOxxoPaymentsProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationMerchantCapabilitiesOxxoPaymentsProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesOxxoPaymentsProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesOxxoPaymentsProtectionsPspMigration.cs new file mode 100644 index 0000000000..8b0a866afc --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesOxxoPaymentsProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesOxxoPaymentsProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesP24Payments.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesP24Payments.cs index e2fb539b70..2ca5eafdcd 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesP24Payments.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesP24Payments.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationMerchantCapabilitiesP24Payments : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationMerchantCapabilitiesP24PaymentsProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesP24PaymentsProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesP24PaymentsProtections.cs new file mode 100644 index 0000000000..e900f1e6ba --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesP24PaymentsProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesP24PaymentsProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationMerchantCapabilitiesP24PaymentsProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesP24PaymentsProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesP24PaymentsProtectionsPspMigration.cs new file mode 100644 index 0000000000..ea69db08be --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesP24PaymentsProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesP24PaymentsProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesPayByBankPayments.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesPayByBankPayments.cs index 754795898d..b9f6c0b4b6 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesPayByBankPayments.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesPayByBankPayments.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationMerchantCapabilitiesPayByBankPayments : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationMerchantCapabilitiesPayByBankPaymentsProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesPayByBankPaymentsProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesPayByBankPaymentsProtections.cs new file mode 100644 index 0000000000..8b9be2c85d --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesPayByBankPaymentsProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesPayByBankPaymentsProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationMerchantCapabilitiesPayByBankPaymentsProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesPayByBankPaymentsProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesPayByBankPaymentsProtectionsPspMigration.cs new file mode 100644 index 0000000000..609cfe7e33 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesPayByBankPaymentsProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesPayByBankPaymentsProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesPaycoPayments.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesPaycoPayments.cs index 0fd1e9b40f..e69f12e289 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesPaycoPayments.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesPaycoPayments.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationMerchantCapabilitiesPaycoPayments : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationMerchantCapabilitiesPaycoPaymentsProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesPaycoPaymentsProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesPaycoPaymentsProtections.cs new file mode 100644 index 0000000000..fdce117dde --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesPaycoPaymentsProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesPaycoPaymentsProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationMerchantCapabilitiesPaycoPaymentsProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesPaycoPaymentsProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesPaycoPaymentsProtectionsPspMigration.cs new file mode 100644 index 0000000000..85c9adb7ca --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesPaycoPaymentsProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesPaycoPaymentsProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesPaynowPayments.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesPaynowPayments.cs index d8523ac286..a3d8282846 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesPaynowPayments.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesPaynowPayments.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationMerchantCapabilitiesPaynowPayments : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationMerchantCapabilitiesPaynowPaymentsProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesPaynowPaymentsProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesPaynowPaymentsProtections.cs new file mode 100644 index 0000000000..6c8d706db0 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesPaynowPaymentsProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesPaynowPaymentsProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationMerchantCapabilitiesPaynowPaymentsProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesPaynowPaymentsProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesPaynowPaymentsProtectionsPspMigration.cs new file mode 100644 index 0000000000..284421a4df --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesPaynowPaymentsProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesPaynowPaymentsProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesPromptpayPayments.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesPromptpayPayments.cs index 1fbec2bc34..57a4655b88 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesPromptpayPayments.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesPromptpayPayments.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationMerchantCapabilitiesPromptpayPayments : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationMerchantCapabilitiesPromptpayPaymentsProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesPromptpayPaymentsProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesPromptpayPaymentsProtections.cs new file mode 100644 index 0000000000..03e5f95143 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesPromptpayPaymentsProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesPromptpayPaymentsProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationMerchantCapabilitiesPromptpayPaymentsProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesPromptpayPaymentsProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesPromptpayPaymentsProtectionsPspMigration.cs new file mode 100644 index 0000000000..7273a9b018 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesPromptpayPaymentsProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesPromptpayPaymentsProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesRevolutPayPayments.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesRevolutPayPayments.cs index 716fb2666a..30d72fa95d 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesRevolutPayPayments.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesRevolutPayPayments.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationMerchantCapabilitiesRevolutPayPayments : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationMerchantCapabilitiesRevolutPayPaymentsProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesRevolutPayPaymentsProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesRevolutPayPaymentsProtections.cs new file mode 100644 index 0000000000..9574df9e56 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesRevolutPayPaymentsProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesRevolutPayPaymentsProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationMerchantCapabilitiesRevolutPayPaymentsProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesRevolutPayPaymentsProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesRevolutPayPaymentsProtectionsPspMigration.cs new file mode 100644 index 0000000000..230c42858d --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesRevolutPayPaymentsProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesRevolutPayPaymentsProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesSamsungPayPayments.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesSamsungPayPayments.cs index 27d46f715a..c618e38c74 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesSamsungPayPayments.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesSamsungPayPayments.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationMerchantCapabilitiesSamsungPayPayments : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationMerchantCapabilitiesSamsungPayPaymentsProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesSamsungPayPaymentsProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesSamsungPayPaymentsProtections.cs new file mode 100644 index 0000000000..13f51e456a --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesSamsungPayPaymentsProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesSamsungPayPaymentsProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationMerchantCapabilitiesSamsungPayPaymentsProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesSamsungPayPaymentsProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesSamsungPayPaymentsProtectionsPspMigration.cs new file mode 100644 index 0000000000..a98ca1a083 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesSamsungPayPaymentsProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesSamsungPayPaymentsProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesSepaBankTransferPayments.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesSepaBankTransferPayments.cs index 1870547f03..8aaba91686 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesSepaBankTransferPayments.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesSepaBankTransferPayments.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationMerchantCapabilitiesSepaBankTransferPayments : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationMerchantCapabilitiesSepaBankTransferPaymentsProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesSepaBankTransferPaymentsProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesSepaBankTransferPaymentsProtections.cs new file mode 100644 index 0000000000..d1f9377260 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesSepaBankTransferPaymentsProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesSepaBankTransferPaymentsProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationMerchantCapabilitiesSepaBankTransferPaymentsProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesSepaBankTransferPaymentsProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesSepaBankTransferPaymentsProtectionsPspMigration.cs new file mode 100644 index 0000000000..b4553263d7 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesSepaBankTransferPaymentsProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesSepaBankTransferPaymentsProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesSepaDebitPayments.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesSepaDebitPayments.cs index e9d4701cbf..e3c282dd25 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesSepaDebitPayments.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesSepaDebitPayments.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationMerchantCapabilitiesSepaDebitPayments : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationMerchantCapabilitiesSepaDebitPaymentsProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesSepaDebitPaymentsProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesSepaDebitPaymentsProtections.cs new file mode 100644 index 0000000000..6c9fb8ac61 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesSepaDebitPaymentsProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesSepaDebitPaymentsProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationMerchantCapabilitiesSepaDebitPaymentsProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesSepaDebitPaymentsProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesSepaDebitPaymentsProtectionsPspMigration.cs new file mode 100644 index 0000000000..0ae4f62266 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesSepaDebitPaymentsProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesSepaDebitPaymentsProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesStripeBalancePayouts.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesStripeBalancePayouts.cs index 84ca631a7f..da68a2d67b 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesStripeBalancePayouts.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesStripeBalancePayouts.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationMerchantCapabilitiesStripeBalancePayouts : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationMerchantCapabilitiesStripeBalancePayoutsProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesStripeBalancePayoutsProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesStripeBalancePayoutsProtections.cs new file mode 100644 index 0000000000..cbeb77dfd4 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesStripeBalancePayoutsProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesStripeBalancePayoutsProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationMerchantCapabilitiesStripeBalancePayoutsProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesStripeBalancePayoutsProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesStripeBalancePayoutsProtectionsPspMigration.cs new file mode 100644 index 0000000000..970128cd34 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesStripeBalancePayoutsProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesStripeBalancePayoutsProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesSwishPayments.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesSwishPayments.cs index c4266ae3ed..b89e9ba70e 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesSwishPayments.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesSwishPayments.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationMerchantCapabilitiesSwishPayments : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationMerchantCapabilitiesSwishPaymentsProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesSwishPaymentsProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesSwishPaymentsProtections.cs new file mode 100644 index 0000000000..dcf8b3da6b --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesSwishPaymentsProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesSwishPaymentsProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationMerchantCapabilitiesSwishPaymentsProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesSwishPaymentsProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesSwishPaymentsProtectionsPspMigration.cs new file mode 100644 index 0000000000..0ff36a31c2 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesSwishPaymentsProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesSwishPaymentsProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesTwintPayments.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesTwintPayments.cs index bb34b9b4fa..abc95cbf02 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesTwintPayments.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesTwintPayments.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationMerchantCapabilitiesTwintPayments : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationMerchantCapabilitiesTwintPaymentsProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesTwintPaymentsProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesTwintPaymentsProtections.cs new file mode 100644 index 0000000000..39eef929db --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesTwintPaymentsProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesTwintPaymentsProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationMerchantCapabilitiesTwintPaymentsProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesTwintPaymentsProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesTwintPaymentsProtectionsPspMigration.cs new file mode 100644 index 0000000000..ee34b5fe0a --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesTwintPaymentsProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesTwintPaymentsProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesUsBankTransferPayments.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesUsBankTransferPayments.cs index 165c5e0647..9a35101304 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesUsBankTransferPayments.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesUsBankTransferPayments.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationMerchantCapabilitiesUsBankTransferPayments : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationMerchantCapabilitiesUsBankTransferPaymentsProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesUsBankTransferPaymentsProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesUsBankTransferPaymentsProtections.cs new file mode 100644 index 0000000000..e81d6dcaa8 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesUsBankTransferPaymentsProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesUsBankTransferPaymentsProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationMerchantCapabilitiesUsBankTransferPaymentsProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesUsBankTransferPaymentsProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesUsBankTransferPaymentsProtectionsPspMigration.cs new file mode 100644 index 0000000000..a112f074d4 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesUsBankTransferPaymentsProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesUsBankTransferPaymentsProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesZipPayments.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesZipPayments.cs index e6ac6b32b6..8060621c7c 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesZipPayments.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesZipPayments.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationMerchantCapabilitiesZipPayments : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationMerchantCapabilitiesZipPaymentsProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesZipPaymentsProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesZipPaymentsProtections.cs new file mode 100644 index 0000000000..feed8a73f6 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesZipPaymentsProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesZipPaymentsProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationMerchantCapabilitiesZipPaymentsProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesZipPaymentsProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesZipPaymentsProtectionsPspMigration.cs new file mode 100644 index 0000000000..8d053e5d14 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCapabilitiesZipPaymentsProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationMerchantCapabilitiesZipPaymentsProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesBankAccountsInstant.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesBankAccountsInstant.cs index 0b85f2f82b..392ed0de2d 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesBankAccountsInstant.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesBankAccountsInstant.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationRecipientCapabilitiesBankAccountsInstant : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationRecipientCapabilitiesBankAccountsInstantProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesBankAccountsInstantProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesBankAccountsInstantProtections.cs new file mode 100644 index 0000000000..9ea4fa13bd --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesBankAccountsInstantProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationRecipientCapabilitiesBankAccountsInstantProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationRecipientCapabilitiesBankAccountsInstantProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesBankAccountsInstantProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesBankAccountsInstantProtectionsPspMigration.cs new file mode 100644 index 0000000000..a46f376497 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesBankAccountsInstantProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationRecipientCapabilitiesBankAccountsInstantProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesBankAccountsLocal.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesBankAccountsLocal.cs index 97d730ac99..f4d6fcc3dc 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesBankAccountsLocal.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesBankAccountsLocal.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationRecipientCapabilitiesBankAccountsLocal : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationRecipientCapabilitiesBankAccountsLocalProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesBankAccountsLocalProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesBankAccountsLocalProtections.cs new file mode 100644 index 0000000000..16e23732ab --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesBankAccountsLocalProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationRecipientCapabilitiesBankAccountsLocalProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationRecipientCapabilitiesBankAccountsLocalProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesBankAccountsLocalProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesBankAccountsLocalProtectionsPspMigration.cs new file mode 100644 index 0000000000..d80c71e1f0 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesBankAccountsLocalProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationRecipientCapabilitiesBankAccountsLocalProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesBankAccountsWire.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesBankAccountsWire.cs index c4d044af79..9b38b7687c 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesBankAccountsWire.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesBankAccountsWire.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationRecipientCapabilitiesBankAccountsWire : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationRecipientCapabilitiesBankAccountsWireProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesBankAccountsWireProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesBankAccountsWireProtections.cs new file mode 100644 index 0000000000..b888196488 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesBankAccountsWireProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationRecipientCapabilitiesBankAccountsWireProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationRecipientCapabilitiesBankAccountsWireProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesBankAccountsWireProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesBankAccountsWireProtectionsPspMigration.cs new file mode 100644 index 0000000000..843d2add74 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesBankAccountsWireProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationRecipientCapabilitiesBankAccountsWireProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesCards.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesCards.cs index 5a359d70aa..65de4b5ce0 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesCards.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesCards.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationRecipientCapabilitiesCards : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationRecipientCapabilitiesCardsProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesCardsProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesCardsProtections.cs new file mode 100644 index 0000000000..72c508846b --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesCardsProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationRecipientCapabilitiesCardsProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationRecipientCapabilitiesCardsProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesCardsProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesCardsProtectionsPspMigration.cs new file mode 100644 index 0000000000..19f369cf94 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesCardsProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationRecipientCapabilitiesCardsProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesCryptoWallets.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesCryptoWallets.cs index 1b060405f4..a55e247c23 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesCryptoWallets.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesCryptoWallets.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationRecipientCapabilitiesCryptoWallets : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationRecipientCapabilitiesCryptoWalletsProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesCryptoWalletsProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesCryptoWalletsProtections.cs new file mode 100644 index 0000000000..e6c1058f0b --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesCryptoWalletsProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationRecipientCapabilitiesCryptoWalletsProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationRecipientCapabilitiesCryptoWalletsProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesCryptoWalletsProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesCryptoWalletsProtectionsPspMigration.cs new file mode 100644 index 0000000000..2fec78203c --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesCryptoWalletsProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationRecipientCapabilitiesCryptoWalletsProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesPaperChecks.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesPaperChecks.cs index 07c129dc1b..47be32d05a 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesPaperChecks.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesPaperChecks.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationRecipientCapabilitiesPaperChecks : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationRecipientCapabilitiesPaperChecksProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesPaperChecksProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesPaperChecksProtections.cs new file mode 100644 index 0000000000..484e2d2db1 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesPaperChecksProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationRecipientCapabilitiesPaperChecksProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationRecipientCapabilitiesPaperChecksProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesPaperChecksProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesPaperChecksProtectionsPspMigration.cs new file mode 100644 index 0000000000..185b08c77e --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesPaperChecksProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationRecipientCapabilitiesPaperChecksProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesStripeBalancePayouts.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesStripeBalancePayouts.cs index 1952bc5e7a..a61febddae 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesStripeBalancePayouts.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesStripeBalancePayouts.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationRecipientCapabilitiesStripeBalancePayouts : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationRecipientCapabilitiesStripeBalancePayoutsProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesStripeBalancePayoutsProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesStripeBalancePayoutsProtections.cs new file mode 100644 index 0000000000..903e9d5309 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesStripeBalancePayoutsProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationRecipientCapabilitiesStripeBalancePayoutsProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationRecipientCapabilitiesStripeBalancePayoutsProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesStripeBalancePayoutsProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesStripeBalancePayoutsProtectionsPspMigration.cs new file mode 100644 index 0000000000..e3ea8165d7 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesStripeBalancePayoutsProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationRecipientCapabilitiesStripeBalancePayoutsProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesStripeBalanceStripeTransfers.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesStripeBalanceStripeTransfers.cs index 98cbf50201..35f624493b 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesStripeBalanceStripeTransfers.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesStripeBalanceStripeTransfers.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationRecipientCapabilitiesStripeBalanceStripeTransfers : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationRecipientCapabilitiesStripeBalanceStripeTransfersProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesStripeBalanceStripeTransfersProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesStripeBalanceStripeTransfersProtections.cs new file mode 100644 index 0000000000..14fc22b336 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesStripeBalanceStripeTransfersProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationRecipientCapabilitiesStripeBalanceStripeTransfersProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationRecipientCapabilitiesStripeBalanceStripeTransfersProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesStripeBalanceStripeTransfersProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesStripeBalanceStripeTransfersProtectionsPspMigration.cs new file mode 100644 index 0000000000..3c5163be70 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientCapabilitiesStripeBalanceStripeTransfersProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationRecipientCapabilitiesStripeBalanceStripeTransfersProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesConsumerHoldsCurrenciesUsd.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesConsumerHoldsCurrenciesUsd.cs index 43d89aa49e..01775fbf7d 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesConsumerHoldsCurrenciesUsd.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesConsumerHoldsCurrenciesUsd.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationStorerCapabilitiesConsumerHoldsCurrenciesUsd : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationStorerCapabilitiesConsumerHoldsCurrenciesUsdProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesConsumerHoldsCurrenciesUsdProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesConsumerHoldsCurrenciesUsdProtections.cs new file mode 100644 index 0000000000..c369d3ff70 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesConsumerHoldsCurrenciesUsdProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationStorerCapabilitiesConsumerHoldsCurrenciesUsdProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationStorerCapabilitiesConsumerHoldsCurrenciesUsdProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesConsumerHoldsCurrenciesUsdProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesConsumerHoldsCurrenciesUsdProtectionsPspMigration.cs new file mode 100644 index 0000000000..48592904c3 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesConsumerHoldsCurrenciesUsdProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationStorerCapabilitiesConsumerHoldsCurrenciesUsdProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesFinancialAddressesBankAccounts.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesFinancialAddressesBankAccounts.cs index cb0778a804..2c74d5db9f 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesFinancialAddressesBankAccounts.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesFinancialAddressesBankAccounts.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationStorerCapabilitiesFinancialAddressesBankAccounts : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationStorerCapabilitiesFinancialAddressesBankAccountsProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesFinancialAddressesBankAccountsProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesFinancialAddressesBankAccountsProtections.cs new file mode 100644 index 0000000000..63011d6de5 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesFinancialAddressesBankAccountsProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationStorerCapabilitiesFinancialAddressesBankAccountsProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationStorerCapabilitiesFinancialAddressesBankAccountsProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesFinancialAddressesBankAccountsProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesFinancialAddressesBankAccountsProtectionsPspMigration.cs new file mode 100644 index 0000000000..1cdedf9a44 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesFinancialAddressesBankAccountsProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationStorerCapabilitiesFinancialAddressesBankAccountsProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesFinancialAddressesCryptoWallets.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesFinancialAddressesCryptoWallets.cs index 3279ab4e87..0545e2d530 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesFinancialAddressesCryptoWallets.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesFinancialAddressesCryptoWallets.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationStorerCapabilitiesFinancialAddressesCryptoWallets : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationStorerCapabilitiesFinancialAddressesCryptoWalletsProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesFinancialAddressesCryptoWalletsProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesFinancialAddressesCryptoWalletsProtections.cs new file mode 100644 index 0000000000..7a78b88e89 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesFinancialAddressesCryptoWalletsProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationStorerCapabilitiesFinancialAddressesCryptoWalletsProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationStorerCapabilitiesFinancialAddressesCryptoWalletsProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesFinancialAddressesCryptoWalletsProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesFinancialAddressesCryptoWalletsProtectionsPspMigration.cs new file mode 100644 index 0000000000..37994c4687 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesFinancialAddressesCryptoWalletsProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationStorerCapabilitiesFinancialAddressesCryptoWalletsProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrenciesEur.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrenciesEur.cs index 4f1234c37a..a610d8c7eb 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrenciesEur.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrenciesEur.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationStorerCapabilitiesHoldsCurrenciesEur : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationStorerCapabilitiesHoldsCurrenciesEurProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrenciesEurProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrenciesEurProtections.cs new file mode 100644 index 0000000000..42b44e6968 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrenciesEurProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationStorerCapabilitiesHoldsCurrenciesEurProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationStorerCapabilitiesHoldsCurrenciesEurProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrenciesEurProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrenciesEurProtectionsPspMigration.cs new file mode 100644 index 0000000000..8411b2c63f --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrenciesEurProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationStorerCapabilitiesHoldsCurrenciesEurProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrenciesGbp.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrenciesGbp.cs index d27f95229d..a17a4c3a9d 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrenciesGbp.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrenciesGbp.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationStorerCapabilitiesHoldsCurrenciesGbp : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationStorerCapabilitiesHoldsCurrenciesGbpProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrenciesGbpProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrenciesGbpProtections.cs new file mode 100644 index 0000000000..ba6d4c7c88 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrenciesGbpProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationStorerCapabilitiesHoldsCurrenciesGbpProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationStorerCapabilitiesHoldsCurrenciesGbpProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrenciesGbpProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrenciesGbpProtectionsPspMigration.cs new file mode 100644 index 0000000000..a4bd524de2 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrenciesGbpProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationStorerCapabilitiesHoldsCurrenciesGbpProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrenciesUsd.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrenciesUsd.cs index 5cfb417c96..43dd38ba26 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrenciesUsd.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrenciesUsd.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationStorerCapabilitiesHoldsCurrenciesUsd : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationStorerCapabilitiesHoldsCurrenciesUsdProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrenciesUsdProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrenciesUsdProtections.cs new file mode 100644 index 0000000000..c856d70346 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrenciesUsdProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationStorerCapabilitiesHoldsCurrenciesUsdProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationStorerCapabilitiesHoldsCurrenciesUsdProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrenciesUsdProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrenciesUsdProtectionsPspMigration.cs new file mode 100644 index 0000000000..ea20d20988 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrenciesUsdProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationStorerCapabilitiesHoldsCurrenciesUsdProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrenciesUsdc.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrenciesUsdc.cs index 0c9c4e17a0..72765c5032 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrenciesUsdc.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrenciesUsdc.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationStorerCapabilitiesHoldsCurrenciesUsdc : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationStorerCapabilitiesHoldsCurrenciesUsdcProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrenciesUsdcProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrenciesUsdcProtections.cs new file mode 100644 index 0000000000..76a98bc66a --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrenciesUsdcProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationStorerCapabilitiesHoldsCurrenciesUsdcProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationStorerCapabilitiesHoldsCurrenciesUsdcProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrenciesUsdcProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrenciesUsdcProtectionsPspMigration.cs new file mode 100644 index 0000000000..6825790c8b --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrenciesUsdcProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationStorerCapabilitiesHoldsCurrenciesUsdcProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesInboundTransfersBankAccounts.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesInboundTransfersBankAccounts.cs index d3d0817cc7..3546cdb389 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesInboundTransfersBankAccounts.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesInboundTransfersBankAccounts.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationStorerCapabilitiesInboundTransfersBankAccounts : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationStorerCapabilitiesInboundTransfersBankAccountsProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesInboundTransfersBankAccountsProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesInboundTransfersBankAccountsProtections.cs new file mode 100644 index 0000000000..4aa7649cd1 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesInboundTransfersBankAccountsProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationStorerCapabilitiesInboundTransfersBankAccountsProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationStorerCapabilitiesInboundTransfersBankAccountsProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesInboundTransfersBankAccountsProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesInboundTransfersBankAccountsProtectionsPspMigration.cs new file mode 100644 index 0000000000..f691e10e1e --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesInboundTransfersBankAccountsProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationStorerCapabilitiesInboundTransfersBankAccountsProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsBankAccounts.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsBankAccounts.cs index 7ce3619008..c507b1ddbe 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsBankAccounts.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsBankAccounts.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationStorerCapabilitiesOutboundPaymentsBankAccounts : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationStorerCapabilitiesOutboundPaymentsBankAccountsProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsBankAccountsProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsBankAccountsProtections.cs new file mode 100644 index 0000000000..277109218f --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsBankAccountsProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationStorerCapabilitiesOutboundPaymentsBankAccountsProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationStorerCapabilitiesOutboundPaymentsBankAccountsProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsBankAccountsProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsBankAccountsProtectionsPspMigration.cs new file mode 100644 index 0000000000..5f59cccc2f --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsBankAccountsProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationStorerCapabilitiesOutboundPaymentsBankAccountsProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsCards.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsCards.cs index 27ad8ab4d8..707adc8d01 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsCards.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsCards.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationStorerCapabilitiesOutboundPaymentsCards : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationStorerCapabilitiesOutboundPaymentsCardsProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsCardsProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsCardsProtections.cs new file mode 100644 index 0000000000..fb7164f824 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsCardsProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationStorerCapabilitiesOutboundPaymentsCardsProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationStorerCapabilitiesOutboundPaymentsCardsProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsCardsProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsCardsProtectionsPspMigration.cs new file mode 100644 index 0000000000..f1ff71e8bd --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsCardsProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationStorerCapabilitiesOutboundPaymentsCardsProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsCryptoWallets.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsCryptoWallets.cs index 7ad6469c0a..d2d2486e7c 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsCryptoWallets.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsCryptoWallets.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationStorerCapabilitiesOutboundPaymentsCryptoWallets : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationStorerCapabilitiesOutboundPaymentsCryptoWalletsProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsCryptoWalletsProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsCryptoWalletsProtections.cs new file mode 100644 index 0000000000..9a6fa05af7 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsCryptoWalletsProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationStorerCapabilitiesOutboundPaymentsCryptoWalletsProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationStorerCapabilitiesOutboundPaymentsCryptoWalletsProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsCryptoWalletsProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsCryptoWalletsProtectionsPspMigration.cs new file mode 100644 index 0000000000..d412f0e60b --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsCryptoWalletsProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationStorerCapabilitiesOutboundPaymentsCryptoWalletsProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccounts.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccounts.cs index 8ce3597ce2..0423cbf6b7 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccounts.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccounts.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccounts : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccountsProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccountsProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccountsProtections.cs new file mode 100644 index 0000000000..556dcb9f45 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccountsProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccountsProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccountsProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccountsProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccountsProtectionsPspMigration.cs new file mode 100644 index 0000000000..6780d0833c --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccountsProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccountsProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsPaperChecks.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsPaperChecks.cs index ebde1fb1f0..d53800cad6 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsPaperChecks.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsPaperChecks.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationStorerCapabilitiesOutboundPaymentsPaperChecks : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationStorerCapabilitiesOutboundPaymentsPaperChecksProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsPaperChecksProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsPaperChecksProtections.cs new file mode 100644 index 0000000000..e2848598ea --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsPaperChecksProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationStorerCapabilitiesOutboundPaymentsPaperChecksProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationStorerCapabilitiesOutboundPaymentsPaperChecksProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsPaperChecksProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsPaperChecksProtectionsPspMigration.cs new file mode 100644 index 0000000000..ecc19e4efa --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundPaymentsPaperChecksProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationStorerCapabilitiesOutboundPaymentsPaperChecksProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundTransfersBankAccounts.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundTransfersBankAccounts.cs index d83dff0537..1bb40bae6a 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundTransfersBankAccounts.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundTransfersBankAccounts.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationStorerCapabilitiesOutboundTransfersBankAccounts : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationStorerCapabilitiesOutboundTransfersBankAccountsProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundTransfersBankAccountsProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundTransfersBankAccountsProtections.cs new file mode 100644 index 0000000000..1ce21535bb --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundTransfersBankAccountsProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationStorerCapabilitiesOutboundTransfersBankAccountsProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationStorerCapabilitiesOutboundTransfersBankAccountsProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundTransfersBankAccountsProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundTransfersBankAccountsProtectionsPspMigration.cs new file mode 100644 index 0000000000..f06bcc9d0d --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundTransfersBankAccountsProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationStorerCapabilitiesOutboundTransfersBankAccountsProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundTransfersCryptoWallets.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundTransfersCryptoWallets.cs index e9895b5383..35535b58b4 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundTransfersCryptoWallets.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundTransfersCryptoWallets.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationStorerCapabilitiesOutboundTransfersCryptoWallets : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationStorerCapabilitiesOutboundTransfersCryptoWalletsProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundTransfersCryptoWalletsProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundTransfersCryptoWalletsProtections.cs new file mode 100644 index 0000000000..9873227468 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundTransfersCryptoWalletsProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationStorerCapabilitiesOutboundTransfersCryptoWalletsProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationStorerCapabilitiesOutboundTransfersCryptoWalletsProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundTransfersCryptoWalletsProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundTransfersCryptoWalletsProtectionsPspMigration.cs new file mode 100644 index 0000000000..16afe370ba --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundTransfersCryptoWalletsProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationStorerCapabilitiesOutboundTransfersCryptoWalletsProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundTransfersFinancialAccounts.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundTransfersFinancialAccounts.cs index 13be53ab8a..5fa331230b 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundTransfersFinancialAccounts.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundTransfersFinancialAccounts.cs @@ -9,6 +9,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountConfigurationStorerCapabilitiesOutboundTransfersFinancialAccounts : StripeEntity { + /// + /// Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountConfigurationStorerCapabilitiesOutboundTransfersFinancialAccountsProtections Protections { get; set; } + /// /// The status of the Capability. /// One of: active, pending, restricted, or unsupported. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundTransfersFinancialAccountsProtections.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundTransfersFinancialAccountsProtections.cs new file mode 100644 index 0000000000..ddb61bb602 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundTransfersFinancialAccountsProtections.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationStorerCapabilitiesOutboundTransfersFinancialAccountsProtections : StripeEntity + { + /// + /// Protection details for PSP migration. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountConfigurationStorerCapabilitiesOutboundTransfersFinancialAccountsProtectionsPspMigration PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundTransfersFinancialAccountsProtectionsPspMigration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundTransfersFinancialAccountsProtectionsPspMigration.cs new file mode 100644 index 0000000000..423bb1861c --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesOutboundTransfersFinancialAccountsProtectionsPspMigration.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountConfigurationStorerCapabilitiesOutboundTransfersFinancialAccountsProtectionsPspMigration : StripeEntity + { + /// + /// The time until which the protection will expire, as a Unix timestamp. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("expires_at")] + public long? ExpiresAt { get; set; } + + /// + /// The time at which the protection was requested, as a Unix timestamp. + /// + [JsonProperty("requested_at")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("requested_at")] + public long RequestedAt { get; set; } + + /// + /// The current status of the protection. + /// One of: active, disrupted, expired, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Services/CustomerPaymentMethods/CustomerPaymentMethodListOptions.cs b/src/Stripe.net/Services/CustomerPaymentMethods/CustomerPaymentMethodListOptions.cs index a5b0a99480..96f447c225 100644 --- a/src/Stripe.net/Services/CustomerPaymentMethods/CustomerPaymentMethodListOptions.cs +++ b/src/Stripe.net/Services/CustomerPaymentMethods/CustomerPaymentMethodListOptions.cs @@ -34,8 +34,8 @@ public class CustomerPaymentMethodListOptions : ListOptions /// payco, paynow, paypal, paypay, payto, pix, /// promptpay, qris, rechnung, revolut_pay, samsung_pay, /// satispay, scalapay, sepa_debit, shopeepay, sofort, - /// stripe_balance, sunbit, swish, twint, upi, - /// us_bank_account, wechat_pay, or zip. + /// stripe_balance, sunbit, swish, tamara, twint, + /// upi, us_bank_account, wechat_pay, or zip. /// [JsonProperty("type")] [STJS.JsonPropertyName("type")] diff --git a/src/Stripe.net/Services/Orders/OrderPaymentSettingsPaymentMethodOptionsWechatPayOptions.cs b/src/Stripe.net/Services/Orders/OrderPaymentSettingsPaymentMethodOptionsWechatPayOptions.cs index 501b2ccfee..b1fbafb0c9 100644 --- a/src/Stripe.net/Services/Orders/OrderPaymentSettingsPaymentMethodOptionsWechatPayOptions.cs +++ b/src/Stripe.net/Services/Orders/OrderPaymentSettingsPaymentMethodOptionsWechatPayOptions.cs @@ -15,9 +15,17 @@ public class OrderPaymentSettingsPaymentMethodOptionsWechatPayOptions : INestedO [STJS.JsonPropertyName("app_id")] public string AppId { get; set; } + /// + /// The unique buyer ID for the app ID registered with WeChat Pay. Only required when client + /// is mini_program. + /// + [JsonProperty("buyer_id")] + [STJS.JsonPropertyName("buyer_id")] + public string BuyerId { get; set; } + /// /// The client type that the end customer will pay from. - /// One of: android, ios, or web. + /// One of: android, ios, mini_program, or web. /// [JsonProperty("client")] [STJS.JsonPropertyName("client")] diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentConfirmOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentConfirmOptions.cs index c5389f2e63..b2f8188315 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentConfirmOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentConfirmOptions.cs @@ -41,8 +41,8 @@ public class PaymentIntentConfirmOptions : BaseOptions /// paynow, paypal, paypay, payto, pix, promptpay, /// qris, rechnung, revolut_pay, samsung_pay, satispay, /// scalapay, sepa_debit, shopeepay, sofort, - /// stripe_balance, sunbit, swish, twint, upi, - /// us_bank_account, wechat_pay, or zip. + /// stripe_balance, sunbit, swish, tamara, twint, + /// upi, us_bank_account, wechat_pay, or zip. /// [JsonProperty("allowed_payment_method_types")] [STJS.JsonPropertyName("allowed_payment_method_types")] @@ -139,8 +139,8 @@ public long? ApplicationFeeAmount /// paynow, paypal, paypay, payto, pix, promptpay, /// qris, rechnung, revolut_pay, samsung_pay, satispay, /// scalapay, sepa_debit, shopeepay, sofort, - /// stripe_balance, sunbit, swish, twint, upi, - /// us_bank_account, wechat_pay, or zip. + /// stripe_balance, sunbit, swish, tamara, twint, + /// upi, us_bank_account, wechat_pay, or zip. /// [JsonProperty("excluded_payment_method_types", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("excluded_payment_method_types")] diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentCreateOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentCreateOptions.cs index 9d5e5fc1f9..1b2af36e43 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentCreateOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentCreateOptions.cs @@ -34,8 +34,8 @@ public class PaymentIntentCreateOptions : BaseOptions, IHasMetadata /// paynow, paypal, paypay, payto, pix, promptpay, /// qris, rechnung, revolut_pay, samsung_pay, satispay, /// scalapay, sepa_debit, shopeepay, sofort, - /// stripe_balance, sunbit, swish, twint, upi, - /// us_bank_account, wechat_pay, or zip. + /// stripe_balance, sunbit, swish, tamara, twint, + /// upi, us_bank_account, wechat_pay, or zip. /// [JsonProperty("allowed_payment_method_types")] [STJS.JsonPropertyName("allowed_payment_method_types")] @@ -201,8 +201,8 @@ public class PaymentIntentCreateOptions : BaseOptions, IHasMetadata /// paynow, paypal, paypay, payto, pix, promptpay, /// qris, rechnung, revolut_pay, samsung_pay, satispay, /// scalapay, sepa_debit, shopeepay, sofort, - /// stripe_balance, sunbit, swish, twint, upi, - /// us_bank_account, wechat_pay, or zip. + /// stripe_balance, sunbit, swish, tamara, twint, + /// upi, us_bank_account, wechat_pay, or zip. /// [JsonProperty("excluded_payment_method_types")] [STJS.JsonPropertyName("excluded_payment_method_types")] diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataOptions.cs index 9ee40b5170..fd33e1ba4a 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataOptions.cs @@ -509,6 +509,14 @@ public class PaymentIntentPaymentMethodDataOptions : INestedOptions, IHasMetadat [STJS.JsonPropertyName("swish")] public PaymentIntentPaymentMethodDataSwishOptions Swish { get; set; } + /// + /// If this is a tamara PaymentMethod, this hash contains details about the Tamara + /// payment method. + /// + [JsonProperty("tamara")] + [STJS.JsonPropertyName("tamara")] + public PaymentIntentPaymentMethodDataTamaraOptions Tamara { get; set; } + /// /// If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment /// method. @@ -532,8 +540,8 @@ public class PaymentIntentPaymentMethodDataOptions : INestedOptions, IHasMetadat /// paynow, paypal, paypay, payto, pix, promptpay, /// qris, rechnung, revolut_pay, samsung_pay, satispay, /// scalapay, sepa_debit, shopeepay, sofort, - /// stripe_balance, sunbit, swish, twint, upi, - /// us_bank_account, wechat_pay, or zip. + /// stripe_balance, sunbit, swish, tamara, twint, + /// upi, us_bank_account, wechat_pay, or zip. /// [JsonProperty("type")] [STJS.JsonPropertyName("type")] diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataTamaraOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataTamaraOptions.cs new file mode 100644 index 0000000000..b765e3f9cf --- /dev/null +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataTamaraOptions.cs @@ -0,0 +1,12 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class PaymentIntentPaymentMethodDataTamaraOptions : INestedOptions + { + } +} diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsWechatPayOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsWechatPayOptions.cs index f19f0530ee..d602aa3812 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsWechatPayOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsWechatPayOptions.cs @@ -15,9 +15,17 @@ public class PaymentIntentPaymentMethodOptionsWechatPayOptions : INestedOptions [STJS.JsonPropertyName("app_id")] public string AppId { get; set; } + /// + /// The unique buyer ID for the app ID registered with WeChat Pay. Only required when client + /// is mini_program. + /// + [JsonProperty("buyer_id")] + [STJS.JsonPropertyName("buyer_id")] + public string BuyerId { get; set; } + /// /// The client type that the end customer will pay from. - /// One of: android, ios, or web. + /// One of: android, ios, mini_program, or web. /// [JsonProperty("client")] [STJS.JsonPropertyName("client")] diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentUpdateOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentUpdateOptions.cs index 0e231c9618..d862040096 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentUpdateOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentUpdateOptions.cs @@ -41,8 +41,8 @@ public class PaymentIntentUpdateOptions : BaseOptions, IHasMetadata /// paynow, paypal, paypay, payto, pix, promptpay, /// qris, rechnung, revolut_pay, samsung_pay, satispay, /// scalapay, sepa_debit, shopeepay, sofort, - /// stripe_balance, sunbit, swish, twint, upi, - /// us_bank_account, wechat_pay, or zip. + /// stripe_balance, sunbit, swish, tamara, twint, + /// upi, us_bank_account, wechat_pay, or zip. /// [JsonProperty("allowed_payment_method_types")] [STJS.JsonPropertyName("allowed_payment_method_types")] @@ -173,8 +173,8 @@ public long? ApplicationFeeAmount /// paynow, paypal, paypay, payto, pix, promptpay, /// qris, rechnung, revolut_pay, samsung_pay, satispay, /// scalapay, sepa_debit, shopeepay, sofort, - /// stripe_balance, sunbit, swish, twint, upi, - /// us_bank_account, wechat_pay, or zip. + /// stripe_balance, sunbit, swish, tamara, twint, + /// upi, us_bank_account, wechat_pay, or zip. /// [JsonProperty("excluded_payment_method_types", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("excluded_payment_method_types")] diff --git a/src/Stripe.net/Services/PaymentMethods/PaymentMethodCreateOptions.cs b/src/Stripe.net/Services/PaymentMethods/PaymentMethodCreateOptions.cs index 41f1b7b5bf..f97fb5d4a2 100644 --- a/src/Stripe.net/Services/PaymentMethods/PaymentMethodCreateOptions.cs +++ b/src/Stripe.net/Services/PaymentMethods/PaymentMethodCreateOptions.cs @@ -537,6 +537,14 @@ public class PaymentMethodCreateOptions : BaseOptions, IHasMetadata [STJS.JsonPropertyName("swish")] public PaymentMethodSwishOptions Swish { get; set; } + /// + /// If this is a tamara PaymentMethod, this hash contains details about the Tamara + /// payment method. + /// + [JsonProperty("tamara")] + [STJS.JsonPropertyName("tamara")] + public PaymentMethodTamaraOptions Tamara { get; set; } + /// /// If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment /// method. @@ -560,8 +568,8 @@ public class PaymentMethodCreateOptions : BaseOptions, IHasMetadata /// payco, paynow, paypal, paypay, payto, pix, /// promptpay, qris, rechnung, revolut_pay, samsung_pay, /// satispay, scalapay, sepa_debit, shopeepay, sofort, - /// stripe_balance, sunbit, swish, twint, upi, - /// us_bank_account, wechat_pay, or zip. + /// stripe_balance, sunbit, swish, tamara, twint, + /// upi, us_bank_account, wechat_pay, or zip. /// [JsonProperty("type")] [STJS.JsonPropertyName("type")] diff --git a/src/Stripe.net/Services/PaymentMethods/PaymentMethodListOptions.cs b/src/Stripe.net/Services/PaymentMethods/PaymentMethodListOptions.cs index 203cf346c6..53559ab441 100644 --- a/src/Stripe.net/Services/PaymentMethods/PaymentMethodListOptions.cs +++ b/src/Stripe.net/Services/PaymentMethods/PaymentMethodListOptions.cs @@ -48,8 +48,8 @@ public class PaymentMethodListOptions : ListOptions /// payco, paynow, paypal, paypay, payto, pix, /// promptpay, qris, rechnung, revolut_pay, samsung_pay, /// satispay, scalapay, sepa_debit, shopeepay, sofort, - /// stripe_balance, sunbit, swish, twint, upi, - /// us_bank_account, wechat_pay, or zip. + /// stripe_balance, sunbit, swish, tamara, twint, + /// upi, us_bank_account, wechat_pay, or zip. /// [JsonProperty("type")] [STJS.JsonPropertyName("type")] diff --git a/src/Stripe.net/Services/PaymentMethods/PaymentMethodTamaraOptions.cs b/src/Stripe.net/Services/PaymentMethods/PaymentMethodTamaraOptions.cs new file mode 100644 index 0000000000..ee850a5b48 --- /dev/null +++ b/src/Stripe.net/Services/PaymentMethods/PaymentMethodTamaraOptions.cs @@ -0,0 +1,12 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class PaymentMethodTamaraOptions : INestedOptions + { + } +} diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentCreateOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentCreateOptions.cs index 6b8a834c3b..7971049882 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentCreateOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentCreateOptions.cs @@ -94,8 +94,8 @@ public class SetupIntentCreateOptions : BaseOptions, IHasMetadata /// paynow, paypal, paypay, payto, pix, promptpay, /// qris, rechnung, revolut_pay, samsung_pay, satispay, /// scalapay, sepa_debit, shopeepay, sofort, - /// stripe_balance, sunbit, swish, twint, upi, - /// us_bank_account, wechat_pay, or zip. + /// stripe_balance, sunbit, swish, tamara, twint, + /// upi, us_bank_account, wechat_pay, or zip. /// [JsonProperty("excluded_payment_method_types")] [STJS.JsonPropertyName("excluded_payment_method_types")] diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataOptions.cs index 907fccdc68..e9942fea7f 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataOptions.cs @@ -509,6 +509,14 @@ public class SetupIntentPaymentMethodDataOptions : INestedOptions, IHasMetadata [STJS.JsonPropertyName("swish")] public SetupIntentPaymentMethodDataSwishOptions Swish { get; set; } + /// + /// If this is a tamara PaymentMethod, this hash contains details about the Tamara + /// payment method. + /// + [JsonProperty("tamara")] + [STJS.JsonPropertyName("tamara")] + public SetupIntentPaymentMethodDataTamaraOptions Tamara { get; set; } + /// /// If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment /// method. @@ -532,8 +540,8 @@ public class SetupIntentPaymentMethodDataOptions : INestedOptions, IHasMetadata /// paynow, paypal, paypay, payto, pix, promptpay, /// qris, rechnung, revolut_pay, samsung_pay, satispay, /// scalapay, sepa_debit, shopeepay, sofort, - /// stripe_balance, sunbit, swish, twint, upi, - /// us_bank_account, wechat_pay, or zip. + /// stripe_balance, sunbit, swish, tamara, twint, + /// upi, us_bank_account, wechat_pay, or zip. /// [JsonProperty("type")] [STJS.JsonPropertyName("type")] diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataTamaraOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataTamaraOptions.cs new file mode 100644 index 0000000000..52b43211f9 --- /dev/null +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataTamaraOptions.cs @@ -0,0 +1,12 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class SetupIntentPaymentMethodDataTamaraOptions : INestedOptions + { + } +} diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentUpdateOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentUpdateOptions.cs index 05a970aa04..eae7c2a253 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentUpdateOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentUpdateOptions.cs @@ -67,8 +67,8 @@ public class SetupIntentUpdateOptions : BaseOptions, IHasMetadata /// paynow, paypal, paypay, payto, pix, promptpay, /// qris, rechnung, revolut_pay, samsung_pay, satispay, /// scalapay, sepa_debit, shopeepay, sofort, - /// stripe_balance, sunbit, swish, twint, upi, - /// us_bank_account, wechat_pay, or zip. + /// stripe_balance, sunbit, swish, tamara, twint, + /// upi, us_bank_account, wechat_pay, or zip. /// [JsonProperty("excluded_payment_method_types", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("excluded_payment_method_types")] diff --git a/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataOptions.cs b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataOptions.cs index cc367f598c..c774f140ae 100644 --- a/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataOptions.cs @@ -509,6 +509,14 @@ public class ConfirmationTokenPaymentMethodDataOptions : INestedOptions, IHasMet [STJS.JsonPropertyName("swish")] public ConfirmationTokenPaymentMethodDataSwishOptions Swish { get; set; } + /// + /// If this is a tamara PaymentMethod, this hash contains details about the Tamara + /// payment method. + /// + [JsonProperty("tamara")] + [STJS.JsonPropertyName("tamara")] + public ConfirmationTokenPaymentMethodDataTamaraOptions Tamara { get; set; } + /// /// If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment /// method. @@ -532,8 +540,8 @@ public class ConfirmationTokenPaymentMethodDataOptions : INestedOptions, IHasMet /// paynow, paypal, paypay, payto, pix, promptpay, /// qris, rechnung, revolut_pay, samsung_pay, satispay, /// scalapay, sepa_debit, shopeepay, sofort, - /// stripe_balance, sunbit, swish, twint, upi, - /// us_bank_account, wechat_pay, or zip. + /// stripe_balance, sunbit, swish, tamara, twint, + /// upi, us_bank_account, wechat_pay, or zip. /// [JsonProperty("type")] [STJS.JsonPropertyName("type")] diff --git a/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataTamaraOptions.cs b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataTamaraOptions.cs new file mode 100644 index 0000000000..37335c0b0e --- /dev/null +++ b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataTamaraOptions.cs @@ -0,0 +1,12 @@ +// File generated from our OpenAPI spec +namespace Stripe.TestHelpers +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class ConfirmationTokenPaymentMethodDataTamaraOptions : INestedOptions + { + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialCelticChargeCardOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialCelticChargeCardOptions.cs index 5a759bda29..e643dc832f 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialCelticChargeCardOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialCelticChargeCardOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationCardCreatorCapabilitiesCommercialCelticChargeCardOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationCardCreatorCapabilitiesCommercialCelticChargeCardProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialCelticChargeCardProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialCelticChargeCardProtectionsOptions.cs new file mode 100644 index 0000000000..00cda9d57d --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialCelticChargeCardProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationCardCreatorCapabilitiesCommercialCelticChargeCardProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationCardCreatorCapabilitiesCommercialCelticChargeCardProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialCelticChargeCardProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialCelticChargeCardProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..4f6962049b --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialCelticChargeCardProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationCardCreatorCapabilitiesCommercialCelticChargeCardProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialCelticSpendCardOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialCelticSpendCardOptions.cs index 77b628ad4e..e10bd6e8dc 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialCelticSpendCardOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialCelticSpendCardOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationCardCreatorCapabilitiesCommercialCelticSpendCardOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationCardCreatorCapabilitiesCommercialCelticSpendCardProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialCelticSpendCardProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialCelticSpendCardProtectionsOptions.cs new file mode 100644 index 0000000000..adf0c51f8c --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialCelticSpendCardProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationCardCreatorCapabilitiesCommercialCelticSpendCardProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationCardCreatorCapabilitiesCommercialCelticSpendCardProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialCelticSpendCardProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialCelticSpendCardProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..58cb91188a --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialCelticSpendCardProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationCardCreatorCapabilitiesCommercialCelticSpendCardProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankChargeCardOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankChargeCardOptions.cs index 7e50781da3..2a6c2d5d34 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankChargeCardOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankChargeCardOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankChargeCardOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankChargeCardProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankChargeCardProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankChargeCardProtectionsOptions.cs new file mode 100644 index 0000000000..75e5c074d2 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankChargeCardProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankChargeCardProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankChargeCardProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankChargeCardProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankChargeCardProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..15c81feca7 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankChargeCardProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankChargeCardProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankPrepaidCardOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankPrepaidCardOptions.cs index de55714895..4249ecf448 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankPrepaidCardOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankPrepaidCardOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankPrepaidCardOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankPrepaidCardProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankPrepaidCardProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankPrepaidCardProtectionsOptions.cs new file mode 100644 index 0000000000..dd6e812f0a --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankPrepaidCardProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankPrepaidCardProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankPrepaidCardProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankPrepaidCardProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankPrepaidCardProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..b2f67fd10f --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankPrepaidCardProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankPrepaidCardProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankSpendCardOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankSpendCardOptions.cs index a27ebe20ea..1584252f44 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankSpendCardOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankSpendCardOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankSpendCardOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankSpendCardProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankSpendCardProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankSpendCardProtectionsOptions.cs new file mode 100644 index 0000000000..aec4c0a093 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankSpendCardProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankSpendCardProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankSpendCardProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankSpendCardProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankSpendCardProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..180f296770 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankSpendCardProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankSpendCardProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialFifthThirdChargeCardOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialFifthThirdChargeCardOptions.cs index 596659fa58..aa0ec20bb7 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialFifthThirdChargeCardOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialFifthThirdChargeCardOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationCardCreatorCapabilitiesCommercialFifthThirdChargeCardOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationCardCreatorCapabilitiesCommercialFifthThirdChargeCardProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialFifthThirdChargeCardProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialFifthThirdChargeCardProtectionsOptions.cs new file mode 100644 index 0000000000..d8cd98aede --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialFifthThirdChargeCardProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationCardCreatorCapabilitiesCommercialFifthThirdChargeCardProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationCardCreatorCapabilitiesCommercialFifthThirdChargeCardProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialFifthThirdChargeCardProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialFifthThirdChargeCardProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..c291bd89d8 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialFifthThirdChargeCardProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationCardCreatorCapabilitiesCommercialFifthThirdChargeCardProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialLeadPrepaidCardOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialLeadPrepaidCardOptions.cs index 4d868fea72..ebb87ff0ca 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialLeadPrepaidCardOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialLeadPrepaidCardOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationCardCreatorCapabilitiesCommercialLeadPrepaidCardOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationCardCreatorCapabilitiesCommercialLeadPrepaidCardProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialLeadPrepaidCardProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialLeadPrepaidCardProtectionsOptions.cs new file mode 100644 index 0000000000..159929b703 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialLeadPrepaidCardProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationCardCreatorCapabilitiesCommercialLeadPrepaidCardProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationCardCreatorCapabilitiesCommercialLeadPrepaidCardProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialLeadPrepaidCardProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialLeadPrepaidCardProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..7d90ac9248 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialLeadPrepaidCardProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationCardCreatorCapabilitiesCommercialLeadPrepaidCardProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialStripeChargeCardOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialStripeChargeCardOptions.cs index 3e19dec807..c154f7fb13 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialStripeChargeCardOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialStripeChargeCardOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationCardCreatorCapabilitiesCommercialStripeChargeCardOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationCardCreatorCapabilitiesCommercialStripeChargeCardProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialStripeChargeCardProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialStripeChargeCardProtectionsOptions.cs new file mode 100644 index 0000000000..f39f0fcc2a --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialStripeChargeCardProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationCardCreatorCapabilitiesCommercialStripeChargeCardProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationCardCreatorCapabilitiesCommercialStripeChargeCardProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialStripeChargeCardProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialStripeChargeCardProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..13135e75fb --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialStripeChargeCardProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationCardCreatorCapabilitiesCommercialStripeChargeCardProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialStripePrepaidCardOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialStripePrepaidCardOptions.cs index 6532593923..fed802a1f3 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialStripePrepaidCardOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialStripePrepaidCardOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationCardCreatorCapabilitiesCommercialStripePrepaidCardOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationCardCreatorCapabilitiesCommercialStripePrepaidCardProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialStripePrepaidCardProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialStripePrepaidCardProtectionsOptions.cs new file mode 100644 index 0000000000..739dd566e0 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialStripePrepaidCardProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationCardCreatorCapabilitiesCommercialStripePrepaidCardProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationCardCreatorCapabilitiesCommercialStripePrepaidCardProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialStripePrepaidCardProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialStripePrepaidCardProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..f361b28d2c --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesCommercialStripePrepaidCardProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationCardCreatorCapabilitiesCommercialStripePrepaidCardProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesConsumerCelticRevolvingCreditCardOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesConsumerCelticRevolvingCreditCardOptions.cs index b0cbbac167..64604352aa 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesConsumerCelticRevolvingCreditCardOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesConsumerCelticRevolvingCreditCardOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationCardCreatorCapabilitiesConsumerCelticRevolvingCreditCardOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationCardCreatorCapabilitiesConsumerCelticRevolvingCreditCardProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesConsumerCelticRevolvingCreditCardProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesConsumerCelticRevolvingCreditCardProtectionsOptions.cs new file mode 100644 index 0000000000..cb13c36935 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesConsumerCelticRevolvingCreditCardProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationCardCreatorCapabilitiesConsumerCelticRevolvingCreditCardProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationCardCreatorCapabilitiesConsumerCelticRevolvingCreditCardProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesConsumerCelticRevolvingCreditCardProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesConsumerCelticRevolvingCreditCardProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..862cecab0f --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesConsumerCelticRevolvingCreditCardProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationCardCreatorCapabilitiesConsumerCelticRevolvingCreditCardProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesConsumerCrossRiverBankPrepaidCardOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesConsumerCrossRiverBankPrepaidCardOptions.cs index bc74180a58..1fbbd7a3af 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesConsumerCrossRiverBankPrepaidCardOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesConsumerCrossRiverBankPrepaidCardOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationCardCreatorCapabilitiesConsumerCrossRiverBankPrepaidCardOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationCardCreatorCapabilitiesConsumerCrossRiverBankPrepaidCardProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesConsumerCrossRiverBankPrepaidCardProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesConsumerCrossRiverBankPrepaidCardProtectionsOptions.cs new file mode 100644 index 0000000000..b22aa46b4f --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesConsumerCrossRiverBankPrepaidCardProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationCardCreatorCapabilitiesConsumerCrossRiverBankPrepaidCardProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationCardCreatorCapabilitiesConsumerCrossRiverBankPrepaidCardProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesConsumerCrossRiverBankPrepaidCardProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesConsumerCrossRiverBankPrepaidCardProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..f388b4b014 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesConsumerCrossRiverBankPrepaidCardProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationCardCreatorCapabilitiesConsumerCrossRiverBankPrepaidCardProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesConsumerLeadDebitCardOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesConsumerLeadDebitCardOptions.cs index 5526c7812f..2682b09b88 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesConsumerLeadDebitCardOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesConsumerLeadDebitCardOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationCardCreatorCapabilitiesConsumerLeadDebitCardOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationCardCreatorCapabilitiesConsumerLeadDebitCardProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesConsumerLeadDebitCardProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesConsumerLeadDebitCardProtectionsOptions.cs new file mode 100644 index 0000000000..5862bd5e21 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesConsumerLeadDebitCardProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationCardCreatorCapabilitiesConsumerLeadDebitCardProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationCardCreatorCapabilitiesConsumerLeadDebitCardProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesConsumerLeadDebitCardProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesConsumerLeadDebitCardProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..35c5890796 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesConsumerLeadDebitCardProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationCardCreatorCapabilitiesConsumerLeadDebitCardProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesConsumerLeadPrepaidCardOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesConsumerLeadPrepaidCardOptions.cs index 05dda2dc79..74ed0d8105 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesConsumerLeadPrepaidCardOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesConsumerLeadPrepaidCardOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationCardCreatorCapabilitiesConsumerLeadPrepaidCardOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationCardCreatorCapabilitiesConsumerLeadPrepaidCardProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesConsumerLeadPrepaidCardProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesConsumerLeadPrepaidCardProtectionsOptions.cs new file mode 100644 index 0000000000..332c030aa1 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesConsumerLeadPrepaidCardProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationCardCreatorCapabilitiesConsumerLeadPrepaidCardProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationCardCreatorCapabilitiesConsumerLeadPrepaidCardProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesConsumerLeadPrepaidCardProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesConsumerLeadPrepaidCardProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..9c267dd287 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCardCreatorCapabilitiesConsumerLeadPrepaidCardProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationCardCreatorCapabilitiesConsumerLeadPrepaidCardProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCustomerCapabilitiesAutomaticIndirectTaxOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCustomerCapabilitiesAutomaticIndirectTaxOptions.cs index 401a366792..1099c7e451 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCustomerCapabilitiesAutomaticIndirectTaxOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCustomerCapabilitiesAutomaticIndirectTaxOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationCustomerCapabilitiesAutomaticIndirectTaxOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationCustomerCapabilitiesAutomaticIndirectTaxProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCustomerCapabilitiesAutomaticIndirectTaxProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCustomerCapabilitiesAutomaticIndirectTaxProtectionsOptions.cs new file mode 100644 index 0000000000..a9b28b8aea --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCustomerCapabilitiesAutomaticIndirectTaxProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationCustomerCapabilitiesAutomaticIndirectTaxProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationCustomerCapabilitiesAutomaticIndirectTaxProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCustomerCapabilitiesAutomaticIndirectTaxProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCustomerCapabilitiesAutomaticIndirectTaxProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..088a86efd6 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCustomerCapabilitiesAutomaticIndirectTaxProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationCustomerCapabilitiesAutomaticIndirectTaxProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAchDebitPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAchDebitPaymentsOptions.cs index 45e4a301d8..a7a590c303 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAchDebitPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAchDebitPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationMerchantCapabilitiesAchDebitPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationMerchantCapabilitiesAchDebitPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAchDebitPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAchDebitPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..5aab70fdbd --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAchDebitPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesAchDebitPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationMerchantCapabilitiesAchDebitPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAchDebitPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAchDebitPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..2f536a64a0 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAchDebitPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesAchDebitPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAcssDebitPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAcssDebitPaymentsOptions.cs index 63c9fb2ab8..b86877318f 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAcssDebitPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAcssDebitPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationMerchantCapabilitiesAcssDebitPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationMerchantCapabilitiesAcssDebitPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAcssDebitPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAcssDebitPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..b7d906a218 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAcssDebitPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesAcssDebitPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationMerchantCapabilitiesAcssDebitPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAcssDebitPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAcssDebitPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..e433642725 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAcssDebitPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesAcssDebitPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAffirmPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAffirmPaymentsOptions.cs index d73cbf5cef..28c4ebb103 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAffirmPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAffirmPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationMerchantCapabilitiesAffirmPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationMerchantCapabilitiesAffirmPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAffirmPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAffirmPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..ffb0cbcd53 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAffirmPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesAffirmPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationMerchantCapabilitiesAffirmPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAffirmPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAffirmPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..5711e27b40 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAffirmPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesAffirmPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAfterpayClearpayPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAfterpayClearpayPaymentsOptions.cs index 35a6584f96..bab4b39eb2 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAfterpayClearpayPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAfterpayClearpayPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationMerchantCapabilitiesAfterpayClearpayPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationMerchantCapabilitiesAfterpayClearpayPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAfterpayClearpayPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAfterpayClearpayPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..2b60b62813 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAfterpayClearpayPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesAfterpayClearpayPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationMerchantCapabilitiesAfterpayClearpayPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAfterpayClearpayPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAfterpayClearpayPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..8792ea3cdc --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAfterpayClearpayPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesAfterpayClearpayPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAlmaPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAlmaPaymentsOptions.cs index 3025bc2172..3dd2733b78 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAlmaPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAlmaPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationMerchantCapabilitiesAlmaPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationMerchantCapabilitiesAlmaPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAlmaPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAlmaPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..635c96df26 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAlmaPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesAlmaPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationMerchantCapabilitiesAlmaPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAlmaPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAlmaPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..ca5c7442a9 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAlmaPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesAlmaPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAmazonPayPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAmazonPayPaymentsOptions.cs index 5720f321f1..a263e1c6e8 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAmazonPayPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAmazonPayPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationMerchantCapabilitiesAmazonPayPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationMerchantCapabilitiesAmazonPayPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAmazonPayPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAmazonPayPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..0570580011 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAmazonPayPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesAmazonPayPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationMerchantCapabilitiesAmazonPayPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAmazonPayPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAmazonPayPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..83c27ca70e --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAmazonPayPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesAmazonPayPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAuBecsDebitPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAuBecsDebitPaymentsOptions.cs index f8c21d42d2..01894660db 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAuBecsDebitPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAuBecsDebitPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationMerchantCapabilitiesAuBecsDebitPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationMerchantCapabilitiesAuBecsDebitPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAuBecsDebitPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAuBecsDebitPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..c15ecc4274 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAuBecsDebitPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesAuBecsDebitPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationMerchantCapabilitiesAuBecsDebitPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAuBecsDebitPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAuBecsDebitPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..399758209e --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesAuBecsDebitPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesAuBecsDebitPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesBacsDebitPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesBacsDebitPaymentsOptions.cs index dbcf51c2cc..31ff8a4eae 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesBacsDebitPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesBacsDebitPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationMerchantCapabilitiesBacsDebitPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationMerchantCapabilitiesBacsDebitPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesBacsDebitPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesBacsDebitPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..72ec16ff10 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesBacsDebitPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesBacsDebitPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationMerchantCapabilitiesBacsDebitPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesBacsDebitPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesBacsDebitPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..017f6f04c5 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesBacsDebitPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesBacsDebitPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesBancontactPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesBancontactPaymentsOptions.cs index 40215a9a4d..91035c838b 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesBancontactPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesBancontactPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationMerchantCapabilitiesBancontactPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationMerchantCapabilitiesBancontactPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesBancontactPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesBancontactPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..b11ddb67cc --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesBancontactPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesBancontactPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationMerchantCapabilitiesBancontactPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesBancontactPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesBancontactPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..0bc1d6b925 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesBancontactPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesBancontactPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesBlikPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesBlikPaymentsOptions.cs index 4f9203d705..f3d426ca84 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesBlikPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesBlikPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationMerchantCapabilitiesBlikPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationMerchantCapabilitiesBlikPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesBlikPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesBlikPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..a1bcdfd57b --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesBlikPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesBlikPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationMerchantCapabilitiesBlikPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesBlikPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesBlikPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..ed60ea4739 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesBlikPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesBlikPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesBoletoPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesBoletoPaymentsOptions.cs index 9c778990fd..389a73285f 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesBoletoPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesBoletoPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationMerchantCapabilitiesBoletoPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationMerchantCapabilitiesBoletoPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesBoletoPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesBoletoPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..28b39da6a7 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesBoletoPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesBoletoPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationMerchantCapabilitiesBoletoPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesBoletoPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesBoletoPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..e3e5105146 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesBoletoPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesBoletoPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesCardPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesCardPaymentsOptions.cs index a553b48a02..438597bd0b 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesCardPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesCardPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationMerchantCapabilitiesCardPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationMerchantCapabilitiesCardPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesCardPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesCardPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..eda717a5b1 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesCardPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesCardPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationMerchantCapabilitiesCardPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesCardPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesCardPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..4592d59a6c --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesCardPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesCardPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesCartesBancairesPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesCartesBancairesPaymentsOptions.cs index 28b2a97750..446ccfa2fd 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesCartesBancairesPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesCartesBancairesPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationMerchantCapabilitiesCartesBancairesPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationMerchantCapabilitiesCartesBancairesPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesCartesBancairesPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesCartesBancairesPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..8602728eed --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesCartesBancairesPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesCartesBancairesPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationMerchantCapabilitiesCartesBancairesPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesCartesBancairesPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesCartesBancairesPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..b0d68b2a01 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesCartesBancairesPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesCartesBancairesPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesCashappPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesCashappPaymentsOptions.cs index 080523de86..ab1cecee6d 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesCashappPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesCashappPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationMerchantCapabilitiesCashappPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationMerchantCapabilitiesCashappPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesCashappPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesCashappPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..a20f7f5a32 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesCashappPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesCashappPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationMerchantCapabilitiesCashappPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesCashappPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesCashappPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..e439ed4d2b --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesCashappPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesCashappPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesEpsPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesEpsPaymentsOptions.cs index c97f0323e2..8709b5c2ae 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesEpsPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesEpsPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationMerchantCapabilitiesEpsPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationMerchantCapabilitiesEpsPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesEpsPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesEpsPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..0564471bd1 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesEpsPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesEpsPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationMerchantCapabilitiesEpsPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesEpsPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesEpsPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..41df45b8f6 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesEpsPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesEpsPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesFpxPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesFpxPaymentsOptions.cs index 7b9b2505f5..2fa0468a71 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesFpxPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesFpxPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationMerchantCapabilitiesFpxPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationMerchantCapabilitiesFpxPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesFpxPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesFpxPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..73302d9cd6 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesFpxPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesFpxPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationMerchantCapabilitiesFpxPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesFpxPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesFpxPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..e689b051cc --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesFpxPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesFpxPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesGbBankTransferPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesGbBankTransferPaymentsOptions.cs index 8dd0ec09d7..c5cc591900 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesGbBankTransferPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesGbBankTransferPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationMerchantCapabilitiesGbBankTransferPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationMerchantCapabilitiesGbBankTransferPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesGbBankTransferPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesGbBankTransferPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..97d7a39038 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesGbBankTransferPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesGbBankTransferPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationMerchantCapabilitiesGbBankTransferPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesGbBankTransferPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesGbBankTransferPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..ed3ebe7c86 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesGbBankTransferPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesGbBankTransferPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesGrabpayPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesGrabpayPaymentsOptions.cs index f3aa877ba3..6862455345 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesGrabpayPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesGrabpayPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationMerchantCapabilitiesGrabpayPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationMerchantCapabilitiesGrabpayPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesGrabpayPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesGrabpayPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..0481723122 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesGrabpayPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesGrabpayPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationMerchantCapabilitiesGrabpayPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesGrabpayPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesGrabpayPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..a61475e1d0 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesGrabpayPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesGrabpayPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesIdealPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesIdealPaymentsOptions.cs index 3b9fcf6398..37da4c423f 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesIdealPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesIdealPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationMerchantCapabilitiesIdealPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationMerchantCapabilitiesIdealPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesIdealPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesIdealPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..7219783b8c --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesIdealPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesIdealPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationMerchantCapabilitiesIdealPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesIdealPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesIdealPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..e6b68e7ae6 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesIdealPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesIdealPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesJcbPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesJcbPaymentsOptions.cs index 7448e90cb2..bafa9003f4 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesJcbPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesJcbPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationMerchantCapabilitiesJcbPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationMerchantCapabilitiesJcbPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesJcbPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesJcbPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..a6efc3e6b6 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesJcbPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesJcbPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationMerchantCapabilitiesJcbPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesJcbPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesJcbPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..d15a8b1bff --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesJcbPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesJcbPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesJpBankTransferPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesJpBankTransferPaymentsOptions.cs index bee0baba2a..c386c68120 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesJpBankTransferPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesJpBankTransferPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationMerchantCapabilitiesJpBankTransferPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationMerchantCapabilitiesJpBankTransferPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesJpBankTransferPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesJpBankTransferPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..5559645bd4 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesJpBankTransferPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesJpBankTransferPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationMerchantCapabilitiesJpBankTransferPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesJpBankTransferPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesJpBankTransferPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..fb015b8139 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesJpBankTransferPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesJpBankTransferPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesKakaoPayPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesKakaoPayPaymentsOptions.cs index e25456a161..c1468ef227 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesKakaoPayPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesKakaoPayPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationMerchantCapabilitiesKakaoPayPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationMerchantCapabilitiesKakaoPayPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesKakaoPayPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesKakaoPayPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..a7f9da8e3b --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesKakaoPayPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesKakaoPayPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationMerchantCapabilitiesKakaoPayPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesKakaoPayPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesKakaoPayPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..2dda9341da --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesKakaoPayPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesKakaoPayPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesKlarnaPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesKlarnaPaymentsOptions.cs index 073566852d..68aa953eec 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesKlarnaPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesKlarnaPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationMerchantCapabilitiesKlarnaPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationMerchantCapabilitiesKlarnaPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesKlarnaPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesKlarnaPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..177951e608 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesKlarnaPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesKlarnaPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationMerchantCapabilitiesKlarnaPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesKlarnaPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesKlarnaPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..8d2155489e --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesKlarnaPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesKlarnaPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesKonbiniPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesKonbiniPaymentsOptions.cs index 08a7b30974..543e148fc8 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesKonbiniPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesKonbiniPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationMerchantCapabilitiesKonbiniPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationMerchantCapabilitiesKonbiniPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesKonbiniPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesKonbiniPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..b08dd86575 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesKonbiniPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesKonbiniPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationMerchantCapabilitiesKonbiniPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesKonbiniPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesKonbiniPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..3fa41ad3b0 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesKonbiniPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesKonbiniPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesKrCardPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesKrCardPaymentsOptions.cs index 98e2b0d65c..dda258696d 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesKrCardPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesKrCardPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationMerchantCapabilitiesKrCardPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationMerchantCapabilitiesKrCardPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesKrCardPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesKrCardPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..a63b8f451d --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesKrCardPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesKrCardPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationMerchantCapabilitiesKrCardPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesKrCardPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesKrCardPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..44de105653 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesKrCardPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesKrCardPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesLinkPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesLinkPaymentsOptions.cs index 7ff25a8dbb..68013f2209 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesLinkPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesLinkPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationMerchantCapabilitiesLinkPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationMerchantCapabilitiesLinkPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesLinkPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesLinkPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..3d52ba1830 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesLinkPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesLinkPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationMerchantCapabilitiesLinkPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesLinkPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesLinkPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..76d5c681fd --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesLinkPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesLinkPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesMobilepayPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesMobilepayPaymentsOptions.cs index 0da1b05816..0b1cffaba1 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesMobilepayPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesMobilepayPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationMerchantCapabilitiesMobilepayPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationMerchantCapabilitiesMobilepayPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesMobilepayPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesMobilepayPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..22e6ff290a --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesMobilepayPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesMobilepayPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationMerchantCapabilitiesMobilepayPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesMobilepayPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesMobilepayPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..7d5942fa51 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesMobilepayPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesMobilepayPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesMultibancoPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesMultibancoPaymentsOptions.cs index fa3ac2da0c..c981be3211 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesMultibancoPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesMultibancoPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationMerchantCapabilitiesMultibancoPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationMerchantCapabilitiesMultibancoPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesMultibancoPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesMultibancoPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..d45564e8ce --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesMultibancoPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesMultibancoPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationMerchantCapabilitiesMultibancoPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesMultibancoPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesMultibancoPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..6ab95836b1 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesMultibancoPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesMultibancoPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesMxBankTransferPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesMxBankTransferPaymentsOptions.cs index 5c4d0a6c15..633cb316c3 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesMxBankTransferPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesMxBankTransferPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationMerchantCapabilitiesMxBankTransferPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationMerchantCapabilitiesMxBankTransferPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesMxBankTransferPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesMxBankTransferPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..f540857cc2 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesMxBankTransferPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesMxBankTransferPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationMerchantCapabilitiesMxBankTransferPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesMxBankTransferPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesMxBankTransferPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..f70f2822a4 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesMxBankTransferPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesMxBankTransferPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesNaverPayPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesNaverPayPaymentsOptions.cs index dc0197055a..0accd35782 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesNaverPayPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesNaverPayPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationMerchantCapabilitiesNaverPayPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationMerchantCapabilitiesNaverPayPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesNaverPayPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesNaverPayPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..8700fa54ab --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesNaverPayPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesNaverPayPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationMerchantCapabilitiesNaverPayPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesNaverPayPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesNaverPayPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..cd3de8b118 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesNaverPayPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesNaverPayPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesOxxoPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesOxxoPaymentsOptions.cs index ed4a985fc0..2dbb8a7bb3 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesOxxoPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesOxxoPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationMerchantCapabilitiesOxxoPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationMerchantCapabilitiesOxxoPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesOxxoPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesOxxoPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..27f01626bb --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesOxxoPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesOxxoPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationMerchantCapabilitiesOxxoPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesOxxoPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesOxxoPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..10e5ab5f0f --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesOxxoPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesOxxoPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesP24PaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesP24PaymentsOptions.cs index b2e15edb8c..c12dda9454 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesP24PaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesP24PaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationMerchantCapabilitiesP24PaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationMerchantCapabilitiesP24PaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesP24PaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesP24PaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..67e5655405 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesP24PaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesP24PaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationMerchantCapabilitiesP24PaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesP24PaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesP24PaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..c776b2c9d6 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesP24PaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesP24PaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesPayByBankPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesPayByBankPaymentsOptions.cs index 21c135615d..00f3968250 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesPayByBankPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesPayByBankPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationMerchantCapabilitiesPayByBankPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationMerchantCapabilitiesPayByBankPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesPayByBankPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesPayByBankPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..d77570634d --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesPayByBankPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesPayByBankPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationMerchantCapabilitiesPayByBankPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesPayByBankPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesPayByBankPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..d733b851e8 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesPayByBankPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesPayByBankPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesPaycoPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesPaycoPaymentsOptions.cs index 75c4ee9950..68103d6802 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesPaycoPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesPaycoPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationMerchantCapabilitiesPaycoPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationMerchantCapabilitiesPaycoPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesPaycoPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesPaycoPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..1f7214058d --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesPaycoPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesPaycoPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationMerchantCapabilitiesPaycoPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesPaycoPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesPaycoPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..c303e5d9c5 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesPaycoPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesPaycoPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesPaynowPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesPaynowPaymentsOptions.cs index 18c4fe7df4..8945e26f17 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesPaynowPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesPaynowPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationMerchantCapabilitiesPaynowPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationMerchantCapabilitiesPaynowPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesPaynowPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesPaynowPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..126a52c885 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesPaynowPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesPaynowPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationMerchantCapabilitiesPaynowPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesPaynowPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesPaynowPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..f79cc99645 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesPaynowPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesPaynowPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesPromptpayPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesPromptpayPaymentsOptions.cs index 5fa2e64d04..b5e18db620 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesPromptpayPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesPromptpayPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationMerchantCapabilitiesPromptpayPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationMerchantCapabilitiesPromptpayPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesPromptpayPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesPromptpayPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..798e928ea0 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesPromptpayPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesPromptpayPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationMerchantCapabilitiesPromptpayPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesPromptpayPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesPromptpayPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..b92efe5c88 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesPromptpayPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesPromptpayPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesRevolutPayPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesRevolutPayPaymentsOptions.cs index 3940282f70..7a66b5f869 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesRevolutPayPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesRevolutPayPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationMerchantCapabilitiesRevolutPayPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationMerchantCapabilitiesRevolutPayPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesRevolutPayPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesRevolutPayPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..c0020c0076 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesRevolutPayPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesRevolutPayPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationMerchantCapabilitiesRevolutPayPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesRevolutPayPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesRevolutPayPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..2fed46ad82 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesRevolutPayPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesRevolutPayPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesSamsungPayPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesSamsungPayPaymentsOptions.cs index 417a3c9974..0b03f23d88 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesSamsungPayPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesSamsungPayPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationMerchantCapabilitiesSamsungPayPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationMerchantCapabilitiesSamsungPayPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesSamsungPayPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesSamsungPayPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..344b0aeb35 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesSamsungPayPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesSamsungPayPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationMerchantCapabilitiesSamsungPayPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesSamsungPayPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesSamsungPayPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..b1f955f1b0 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesSamsungPayPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesSamsungPayPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesSepaBankTransferPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesSepaBankTransferPaymentsOptions.cs index 2643baff38..648c0179d4 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesSepaBankTransferPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesSepaBankTransferPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationMerchantCapabilitiesSepaBankTransferPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationMerchantCapabilitiesSepaBankTransferPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesSepaBankTransferPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesSepaBankTransferPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..453151c544 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesSepaBankTransferPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesSepaBankTransferPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationMerchantCapabilitiesSepaBankTransferPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesSepaBankTransferPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesSepaBankTransferPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..fcf91f8e47 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesSepaBankTransferPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesSepaBankTransferPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesSepaDebitPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesSepaDebitPaymentsOptions.cs index 3bda64499d..f84095d57a 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesSepaDebitPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesSepaDebitPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationMerchantCapabilitiesSepaDebitPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationMerchantCapabilitiesSepaDebitPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesSepaDebitPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesSepaDebitPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..5f3675b8a6 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesSepaDebitPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesSepaDebitPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationMerchantCapabilitiesSepaDebitPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesSepaDebitPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesSepaDebitPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..5b1c93595a --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesSepaDebitPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesSepaDebitPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesSwishPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesSwishPaymentsOptions.cs index 1ac584cc47..42c469bdcb 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesSwishPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesSwishPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationMerchantCapabilitiesSwishPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationMerchantCapabilitiesSwishPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesSwishPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesSwishPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..642bc9bcb6 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesSwishPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesSwishPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationMerchantCapabilitiesSwishPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesSwishPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesSwishPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..8493459cc3 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesSwishPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesSwishPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesTwintPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesTwintPaymentsOptions.cs index 32aac28f47..d9aa77ea37 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesTwintPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesTwintPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationMerchantCapabilitiesTwintPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationMerchantCapabilitiesTwintPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesTwintPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesTwintPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..c62a7cc025 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesTwintPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesTwintPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationMerchantCapabilitiesTwintPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesTwintPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesTwintPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..96fd0092c3 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesTwintPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesTwintPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesUsBankTransferPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesUsBankTransferPaymentsOptions.cs index 0ec483bf81..f07a530061 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesUsBankTransferPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesUsBankTransferPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationMerchantCapabilitiesUsBankTransferPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationMerchantCapabilitiesUsBankTransferPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesUsBankTransferPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesUsBankTransferPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..c17977a0d7 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesUsBankTransferPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesUsBankTransferPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationMerchantCapabilitiesUsBankTransferPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesUsBankTransferPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesUsBankTransferPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..0c8781ab1e --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesUsBankTransferPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesUsBankTransferPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesZipPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesZipPaymentsOptions.cs index e6d2cd8cda..64a2c0010f 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesZipPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesZipPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationMerchantCapabilitiesZipPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationMerchantCapabilitiesZipPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesZipPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesZipPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..c239b7ac2d --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesZipPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesZipPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationMerchantCapabilitiesZipPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesZipPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesZipPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..353bdd855f --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationMerchantCapabilitiesZipPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationMerchantCapabilitiesZipPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesBankAccountsInstantOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesBankAccountsInstantOptions.cs index bb997599e5..c3d55b3978 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesBankAccountsInstantOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesBankAccountsInstantOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationRecipientCapabilitiesBankAccountsInstantOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationRecipientCapabilitiesBankAccountsInstantProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesBankAccountsInstantProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesBankAccountsInstantProtectionsOptions.cs new file mode 100644 index 0000000000..63685f4f48 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesBankAccountsInstantProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationRecipientCapabilitiesBankAccountsInstantProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationRecipientCapabilitiesBankAccountsInstantProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesBankAccountsInstantProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesBankAccountsInstantProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..68c5afa9b6 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesBankAccountsInstantProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationRecipientCapabilitiesBankAccountsInstantProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesBankAccountsLocalOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesBankAccountsLocalOptions.cs index 9940898c14..19c580c6d8 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesBankAccountsLocalOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesBankAccountsLocalOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationRecipientCapabilitiesBankAccountsLocalOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationRecipientCapabilitiesBankAccountsLocalProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesBankAccountsLocalProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesBankAccountsLocalProtectionsOptions.cs new file mode 100644 index 0000000000..1947935462 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesBankAccountsLocalProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationRecipientCapabilitiesBankAccountsLocalProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationRecipientCapabilitiesBankAccountsLocalProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesBankAccountsLocalProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesBankAccountsLocalProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..4f6a7f6d7b --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesBankAccountsLocalProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationRecipientCapabilitiesBankAccountsLocalProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesBankAccountsWireOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesBankAccountsWireOptions.cs index 1ecc395fdd..8864c7897c 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesBankAccountsWireOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesBankAccountsWireOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationRecipientCapabilitiesBankAccountsWireOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationRecipientCapabilitiesBankAccountsWireProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesBankAccountsWireProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesBankAccountsWireProtectionsOptions.cs new file mode 100644 index 0000000000..2b08bee5b8 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesBankAccountsWireProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationRecipientCapabilitiesBankAccountsWireProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationRecipientCapabilitiesBankAccountsWireProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesBankAccountsWireProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesBankAccountsWireProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..774fba5ca3 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesBankAccountsWireProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationRecipientCapabilitiesBankAccountsWireProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesCardsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesCardsOptions.cs index 93b72f07ac..b68bfc76e1 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesCardsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesCardsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationRecipientCapabilitiesCardsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationRecipientCapabilitiesCardsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesCardsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesCardsProtectionsOptions.cs new file mode 100644 index 0000000000..59544b73dc --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesCardsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationRecipientCapabilitiesCardsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationRecipientCapabilitiesCardsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesCardsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesCardsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..bdbcde999f --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesCardsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationRecipientCapabilitiesCardsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesCryptoWalletsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesCryptoWalletsOptions.cs index 4880901361..8a3a51e6cb 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesCryptoWalletsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesCryptoWalletsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationRecipientCapabilitiesCryptoWalletsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationRecipientCapabilitiesCryptoWalletsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesCryptoWalletsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesCryptoWalletsProtectionsOptions.cs new file mode 100644 index 0000000000..c9094a6f3c --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesCryptoWalletsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationRecipientCapabilitiesCryptoWalletsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationRecipientCapabilitiesCryptoWalletsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesCryptoWalletsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesCryptoWalletsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..f54c6598c9 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesCryptoWalletsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationRecipientCapabilitiesCryptoWalletsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesPaperChecksOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesPaperChecksOptions.cs index e4e84188b2..bce484e903 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesPaperChecksOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesPaperChecksOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationRecipientCapabilitiesPaperChecksOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationRecipientCapabilitiesPaperChecksProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesPaperChecksProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesPaperChecksProtectionsOptions.cs new file mode 100644 index 0000000000..a1f9efa697 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesPaperChecksProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationRecipientCapabilitiesPaperChecksProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationRecipientCapabilitiesPaperChecksProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesPaperChecksProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesPaperChecksProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..bdf4e78c20 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesPaperChecksProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationRecipientCapabilitiesPaperChecksProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesStripeBalanceStripeTransfersOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesStripeBalanceStripeTransfersOptions.cs index 8aaaa0213d..72d6547a70 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesStripeBalanceStripeTransfersOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesStripeBalanceStripeTransfersOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationRecipientCapabilitiesStripeBalanceStripeTransfersOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationRecipientCapabilitiesStripeBalanceStripeTransfersProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesStripeBalanceStripeTransfersProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesStripeBalanceStripeTransfersProtectionsOptions.cs new file mode 100644 index 0000000000..9280a6725a --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesStripeBalanceStripeTransfersProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationRecipientCapabilitiesStripeBalanceStripeTransfersProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationRecipientCapabilitiesStripeBalanceStripeTransfersProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesStripeBalanceStripeTransfersProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesStripeBalanceStripeTransfersProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..cb04a9bc24 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationRecipientCapabilitiesStripeBalanceStripeTransfersProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationRecipientCapabilitiesStripeBalanceStripeTransfersProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesConsumerHoldsCurrenciesUsdOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesConsumerHoldsCurrenciesUsdOptions.cs index 87db4a2ee0..2942938e39 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesConsumerHoldsCurrenciesUsdOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesConsumerHoldsCurrenciesUsdOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationStorerCapabilitiesConsumerHoldsCurrenciesUsdOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationStorerCapabilitiesConsumerHoldsCurrenciesUsdProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesConsumerHoldsCurrenciesUsdProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesConsumerHoldsCurrenciesUsdProtectionsOptions.cs new file mode 100644 index 0000000000..08a404c28d --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesConsumerHoldsCurrenciesUsdProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationStorerCapabilitiesConsumerHoldsCurrenciesUsdProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationStorerCapabilitiesConsumerHoldsCurrenciesUsdProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesConsumerHoldsCurrenciesUsdProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesConsumerHoldsCurrenciesUsdProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..86991e1491 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesConsumerHoldsCurrenciesUsdProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationStorerCapabilitiesConsumerHoldsCurrenciesUsdProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesFinancialAddressesBankAccountsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesFinancialAddressesBankAccountsOptions.cs index 25ec24b055..7359380a01 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesFinancialAddressesBankAccountsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesFinancialAddressesBankAccountsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationStorerCapabilitiesFinancialAddressesBankAccountsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationStorerCapabilitiesFinancialAddressesBankAccountsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesFinancialAddressesBankAccountsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesFinancialAddressesBankAccountsProtectionsOptions.cs new file mode 100644 index 0000000000..e53b325a4b --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesFinancialAddressesBankAccountsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationStorerCapabilitiesFinancialAddressesBankAccountsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationStorerCapabilitiesFinancialAddressesBankAccountsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesFinancialAddressesBankAccountsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesFinancialAddressesBankAccountsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..6ae2df34e0 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesFinancialAddressesBankAccountsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationStorerCapabilitiesFinancialAddressesBankAccountsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesFinancialAddressesCryptoWalletsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesFinancialAddressesCryptoWalletsOptions.cs index 15ba9ced79..d84118cf54 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesFinancialAddressesCryptoWalletsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesFinancialAddressesCryptoWalletsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationStorerCapabilitiesFinancialAddressesCryptoWalletsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationStorerCapabilitiesFinancialAddressesCryptoWalletsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesFinancialAddressesCryptoWalletsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesFinancialAddressesCryptoWalletsProtectionsOptions.cs new file mode 100644 index 0000000000..d5eca6d7db --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesFinancialAddressesCryptoWalletsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationStorerCapabilitiesFinancialAddressesCryptoWalletsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationStorerCapabilitiesFinancialAddressesCryptoWalletsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesFinancialAddressesCryptoWalletsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesFinancialAddressesCryptoWalletsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..8703c8faf2 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesFinancialAddressesCryptoWalletsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationStorerCapabilitiesFinancialAddressesCryptoWalletsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesEurOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesEurOptions.cs index 0fa86ec9f1..52f2a96d85 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesEurOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesEurOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesEurOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesEurProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesEurProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesEurProtectionsOptions.cs new file mode 100644 index 0000000000..6b572b101f --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesEurProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesEurProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesEurProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesEurProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesEurProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..10c18e0fc7 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesEurProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesEurProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesGbpOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesGbpOptions.cs index e2e83f0455..66d1c33cf4 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesGbpOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesGbpOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesGbpOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesGbpProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesGbpProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesGbpProtectionsOptions.cs new file mode 100644 index 0000000000..eee9b619b5 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesGbpProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesGbpProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesGbpProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesGbpProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesGbpProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..b61add7546 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesGbpProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesGbpProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesUsdOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesUsdOptions.cs index 2a8958525a..5fe202eaff 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesUsdOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesUsdOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesUsdOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesUsdProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesUsdProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesUsdProtectionsOptions.cs new file mode 100644 index 0000000000..388fff098d --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesUsdProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesUsdProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesUsdProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesUsdProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesUsdProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..eb7957c727 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesUsdProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesUsdProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesUsdcOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesUsdcOptions.cs index e3ab5c2fbb..99756057c4 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesUsdcOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesUsdcOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesUsdcOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesUsdcProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesUsdcProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesUsdcProtectionsOptions.cs new file mode 100644 index 0000000000..b7b46ae2c7 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesUsdcProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesUsdcProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesUsdcProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesUsdcProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesUsdcProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..d33f6a9087 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesUsdcProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesUsdcProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesInboundTransfersBankAccountsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesInboundTransfersBankAccountsOptions.cs index dce2b9983d..e1b67cd216 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesInboundTransfersBankAccountsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesInboundTransfersBankAccountsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationStorerCapabilitiesInboundTransfersBankAccountsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationStorerCapabilitiesInboundTransfersBankAccountsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesInboundTransfersBankAccountsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesInboundTransfersBankAccountsProtectionsOptions.cs new file mode 100644 index 0000000000..3d501e6255 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesInboundTransfersBankAccountsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationStorerCapabilitiesInboundTransfersBankAccountsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationStorerCapabilitiesInboundTransfersBankAccountsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesInboundTransfersBankAccountsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesInboundTransfersBankAccountsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..a89a901568 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesInboundTransfersBankAccountsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationStorerCapabilitiesInboundTransfersBankAccountsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsBankAccountsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsBankAccountsOptions.cs index 4ed26bd991..11a2841bfc 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsBankAccountsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsBankAccountsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsBankAccountsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsBankAccountsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsBankAccountsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsBankAccountsProtectionsOptions.cs new file mode 100644 index 0000000000..c2ac35592b --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsBankAccountsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsBankAccountsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsBankAccountsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsBankAccountsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsBankAccountsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..4e0c33ab6b --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsBankAccountsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsBankAccountsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsCardsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsCardsOptions.cs index d16cc68846..324d37f44b 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsCardsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsCardsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsCardsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsCardsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsCardsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsCardsProtectionsOptions.cs new file mode 100644 index 0000000000..d59074f5a7 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsCardsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsCardsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsCardsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsCardsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsCardsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..27fe0140f3 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsCardsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsCardsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsCryptoWalletsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsCryptoWalletsOptions.cs index 919ffe501b..0e2a7e0919 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsCryptoWalletsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsCryptoWalletsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsCryptoWalletsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsCryptoWalletsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsCryptoWalletsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsCryptoWalletsProtectionsOptions.cs new file mode 100644 index 0000000000..e1b006bd45 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsCryptoWalletsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsCryptoWalletsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsCryptoWalletsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsCryptoWalletsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsCryptoWalletsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..ad41eade35 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsCryptoWalletsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsCryptoWalletsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccountsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccountsOptions.cs index 914ec959a2..2bd5abadde 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccountsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccountsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccountsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccountsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccountsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccountsProtectionsOptions.cs new file mode 100644 index 0000000000..92539660bf --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccountsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccountsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccountsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccountsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccountsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..3c620f58bf --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccountsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccountsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsPaperChecksOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsPaperChecksOptions.cs index 4695924678..86ff02d2a6 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsPaperChecksOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsPaperChecksOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsPaperChecksOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsPaperChecksProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsPaperChecksProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsPaperChecksProtectionsOptions.cs new file mode 100644 index 0000000000..ed445441b8 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsPaperChecksProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsPaperChecksProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsPaperChecksProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsPaperChecksProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsPaperChecksProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..f46806b118 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsPaperChecksProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationStorerCapabilitiesOutboundPaymentsPaperChecksProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundTransfersBankAccountsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundTransfersBankAccountsOptions.cs index 1ca1c97f90..224aa772a5 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundTransfersBankAccountsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundTransfersBankAccountsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationStorerCapabilitiesOutboundTransfersBankAccountsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationStorerCapabilitiesOutboundTransfersBankAccountsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundTransfersBankAccountsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundTransfersBankAccountsProtectionsOptions.cs new file mode 100644 index 0000000000..3fb24a5df3 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundTransfersBankAccountsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationStorerCapabilitiesOutboundTransfersBankAccountsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationStorerCapabilitiesOutboundTransfersBankAccountsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundTransfersBankAccountsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundTransfersBankAccountsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..c93925f206 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundTransfersBankAccountsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationStorerCapabilitiesOutboundTransfersBankAccountsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundTransfersCryptoWalletsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundTransfersCryptoWalletsOptions.cs index f45688efd2..b5b14d14ca 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundTransfersCryptoWalletsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundTransfersCryptoWalletsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationStorerCapabilitiesOutboundTransfersCryptoWalletsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationStorerCapabilitiesOutboundTransfersCryptoWalletsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundTransfersCryptoWalletsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundTransfersCryptoWalletsProtectionsOptions.cs new file mode 100644 index 0000000000..2a7f27aeab --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundTransfersCryptoWalletsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationStorerCapabilitiesOutboundTransfersCryptoWalletsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationStorerCapabilitiesOutboundTransfersCryptoWalletsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundTransfersCryptoWalletsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundTransfersCryptoWalletsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..4fb2086477 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundTransfersCryptoWalletsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationStorerCapabilitiesOutboundTransfersCryptoWalletsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundTransfersFinancialAccountsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundTransfersFinancialAccountsOptions.cs index 1581fc80e4..e7b82e691d 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundTransfersFinancialAccountsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundTransfersFinancialAccountsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountCreateConfigurationStorerCapabilitiesOutboundTransfersFinancialAccountsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountCreateConfigurationStorerCapabilitiesOutboundTransfersFinancialAccountsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundTransfersFinancialAccountsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundTransfersFinancialAccountsProtectionsOptions.cs new file mode 100644 index 0000000000..68b33db65c --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundTransfersFinancialAccountsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationStorerCapabilitiesOutboundTransfersFinancialAccountsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountCreateConfigurationStorerCapabilitiesOutboundTransfersFinancialAccountsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundTransfersFinancialAccountsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundTransfersFinancialAccountsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..7a668a0d70 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesOutboundTransfersFinancialAccountsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateConfigurationStorerCapabilitiesOutboundTransfersFinancialAccountsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCelticChargeCardOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCelticChargeCardOptions.cs index d4fffd46f3..01d75cb248 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCelticChargeCardOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCelticChargeCardOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCelticChargeCardOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCelticChargeCardProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCelticChargeCardProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCelticChargeCardProtectionsOptions.cs new file mode 100644 index 0000000000..5531e8d3f8 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCelticChargeCardProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCelticChargeCardProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCelticChargeCardProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCelticChargeCardProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCelticChargeCardProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..8b8bd2e4c5 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCelticChargeCardProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCelticChargeCardProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCelticSpendCardOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCelticSpendCardOptions.cs index 20bd1ed755..d93a30b846 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCelticSpendCardOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCelticSpendCardOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCelticSpendCardOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCelticSpendCardProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCelticSpendCardProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCelticSpendCardProtectionsOptions.cs new file mode 100644 index 0000000000..6baeb59856 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCelticSpendCardProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCelticSpendCardProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCelticSpendCardProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCelticSpendCardProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCelticSpendCardProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..4de2a212aa --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCelticSpendCardProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCelticSpendCardProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankChargeCardOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankChargeCardOptions.cs index d20de3fdd2..10f3c12195 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankChargeCardOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankChargeCardOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankChargeCardOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankChargeCardProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankChargeCardProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankChargeCardProtectionsOptions.cs new file mode 100644 index 0000000000..a84d18017b --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankChargeCardProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankChargeCardProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankChargeCardProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankChargeCardProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankChargeCardProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..9d3f749f05 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankChargeCardProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankChargeCardProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankPrepaidCardOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankPrepaidCardOptions.cs index 448df67f7f..afac1f1cde 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankPrepaidCardOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankPrepaidCardOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankPrepaidCardOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankPrepaidCardProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankPrepaidCardProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankPrepaidCardProtectionsOptions.cs new file mode 100644 index 0000000000..fdd8326a6a --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankPrepaidCardProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankPrepaidCardProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankPrepaidCardProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankPrepaidCardProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankPrepaidCardProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..0bc5915606 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankPrepaidCardProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankPrepaidCardProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankSpendCardOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankSpendCardOptions.cs index 66dfb30dd6..f888c87c3d 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankSpendCardOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankSpendCardOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankSpendCardOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankSpendCardProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankSpendCardProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankSpendCardProtectionsOptions.cs new file mode 100644 index 0000000000..e751d43364 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankSpendCardProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankSpendCardProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankSpendCardProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankSpendCardProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankSpendCardProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..52e8099458 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankSpendCardProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationCardCreatorCapabilitiesCommercialCrossRiverBankSpendCardProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialFifthThirdChargeCardOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialFifthThirdChargeCardOptions.cs index 33e5021ef1..35d6b2172a 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialFifthThirdChargeCardOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialFifthThirdChargeCardOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationCardCreatorCapabilitiesCommercialFifthThirdChargeCardOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationCardCreatorCapabilitiesCommercialFifthThirdChargeCardProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialFifthThirdChargeCardProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialFifthThirdChargeCardProtectionsOptions.cs new file mode 100644 index 0000000000..8ae1bf7774 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialFifthThirdChargeCardProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationCardCreatorCapabilitiesCommercialFifthThirdChargeCardProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationCardCreatorCapabilitiesCommercialFifthThirdChargeCardProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialFifthThirdChargeCardProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialFifthThirdChargeCardProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..9f6a849aae --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialFifthThirdChargeCardProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationCardCreatorCapabilitiesCommercialFifthThirdChargeCardProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialLeadPrepaidCardOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialLeadPrepaidCardOptions.cs index 338a9f5215..99d400ce10 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialLeadPrepaidCardOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialLeadPrepaidCardOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationCardCreatorCapabilitiesCommercialLeadPrepaidCardOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationCardCreatorCapabilitiesCommercialLeadPrepaidCardProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialLeadPrepaidCardProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialLeadPrepaidCardProtectionsOptions.cs new file mode 100644 index 0000000000..2f6784fd32 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialLeadPrepaidCardProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationCardCreatorCapabilitiesCommercialLeadPrepaidCardProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationCardCreatorCapabilitiesCommercialLeadPrepaidCardProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialLeadPrepaidCardProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialLeadPrepaidCardProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..6c44088253 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialLeadPrepaidCardProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationCardCreatorCapabilitiesCommercialLeadPrepaidCardProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialStripeChargeCardOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialStripeChargeCardOptions.cs index 60b3c90302..ef4aaf675e 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialStripeChargeCardOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialStripeChargeCardOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationCardCreatorCapabilitiesCommercialStripeChargeCardOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationCardCreatorCapabilitiesCommercialStripeChargeCardProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialStripeChargeCardProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialStripeChargeCardProtectionsOptions.cs new file mode 100644 index 0000000000..ae11abb52c --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialStripeChargeCardProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationCardCreatorCapabilitiesCommercialStripeChargeCardProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationCardCreatorCapabilitiesCommercialStripeChargeCardProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialStripeChargeCardProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialStripeChargeCardProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..d5f1d622a0 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialStripeChargeCardProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationCardCreatorCapabilitiesCommercialStripeChargeCardProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialStripePrepaidCardOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialStripePrepaidCardOptions.cs index cc32d25f59..afb642a265 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialStripePrepaidCardOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialStripePrepaidCardOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationCardCreatorCapabilitiesCommercialStripePrepaidCardOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationCardCreatorCapabilitiesCommercialStripePrepaidCardProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialStripePrepaidCardProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialStripePrepaidCardProtectionsOptions.cs new file mode 100644 index 0000000000..0d9cb1a099 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialStripePrepaidCardProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationCardCreatorCapabilitiesCommercialStripePrepaidCardProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationCardCreatorCapabilitiesCommercialStripePrepaidCardProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialStripePrepaidCardProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialStripePrepaidCardProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..b4588cf264 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesCommercialStripePrepaidCardProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationCardCreatorCapabilitiesCommercialStripePrepaidCardProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesConsumerCelticRevolvingCreditCardOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesConsumerCelticRevolvingCreditCardOptions.cs index 203d7b08db..b09e205abf 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesConsumerCelticRevolvingCreditCardOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesConsumerCelticRevolvingCreditCardOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationCardCreatorCapabilitiesConsumerCelticRevolvingCreditCardOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationCardCreatorCapabilitiesConsumerCelticRevolvingCreditCardProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesConsumerCelticRevolvingCreditCardProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesConsumerCelticRevolvingCreditCardProtectionsOptions.cs new file mode 100644 index 0000000000..0397d8876a --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesConsumerCelticRevolvingCreditCardProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationCardCreatorCapabilitiesConsumerCelticRevolvingCreditCardProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationCardCreatorCapabilitiesConsumerCelticRevolvingCreditCardProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesConsumerCelticRevolvingCreditCardProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesConsumerCelticRevolvingCreditCardProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..9a65ceae72 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesConsumerCelticRevolvingCreditCardProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationCardCreatorCapabilitiesConsumerCelticRevolvingCreditCardProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesConsumerCrossRiverBankPrepaidCardOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesConsumerCrossRiverBankPrepaidCardOptions.cs index ebeb9c7d28..d71e0ef545 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesConsumerCrossRiverBankPrepaidCardOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesConsumerCrossRiverBankPrepaidCardOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationCardCreatorCapabilitiesConsumerCrossRiverBankPrepaidCardOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationCardCreatorCapabilitiesConsumerCrossRiverBankPrepaidCardProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesConsumerCrossRiverBankPrepaidCardProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesConsumerCrossRiverBankPrepaidCardProtectionsOptions.cs new file mode 100644 index 0000000000..d4156c7897 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesConsumerCrossRiverBankPrepaidCardProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationCardCreatorCapabilitiesConsumerCrossRiverBankPrepaidCardProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationCardCreatorCapabilitiesConsumerCrossRiverBankPrepaidCardProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesConsumerCrossRiverBankPrepaidCardProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesConsumerCrossRiverBankPrepaidCardProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..056eec0a0c --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesConsumerCrossRiverBankPrepaidCardProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationCardCreatorCapabilitiesConsumerCrossRiverBankPrepaidCardProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesConsumerLeadDebitCardOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesConsumerLeadDebitCardOptions.cs index 7828156c5a..16bfe07554 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesConsumerLeadDebitCardOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesConsumerLeadDebitCardOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationCardCreatorCapabilitiesConsumerLeadDebitCardOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationCardCreatorCapabilitiesConsumerLeadDebitCardProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesConsumerLeadDebitCardProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesConsumerLeadDebitCardProtectionsOptions.cs new file mode 100644 index 0000000000..089ab2800b --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesConsumerLeadDebitCardProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationCardCreatorCapabilitiesConsumerLeadDebitCardProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationCardCreatorCapabilitiesConsumerLeadDebitCardProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesConsumerLeadDebitCardProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesConsumerLeadDebitCardProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..a12b986bed --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesConsumerLeadDebitCardProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationCardCreatorCapabilitiesConsumerLeadDebitCardProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesConsumerLeadPrepaidCardOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesConsumerLeadPrepaidCardOptions.cs index b21dd5b8fe..d6033092da 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesConsumerLeadPrepaidCardOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesConsumerLeadPrepaidCardOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationCardCreatorCapabilitiesConsumerLeadPrepaidCardOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationCardCreatorCapabilitiesConsumerLeadPrepaidCardProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesConsumerLeadPrepaidCardProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesConsumerLeadPrepaidCardProtectionsOptions.cs new file mode 100644 index 0000000000..0a29c7b227 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesConsumerLeadPrepaidCardProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationCardCreatorCapabilitiesConsumerLeadPrepaidCardProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationCardCreatorCapabilitiesConsumerLeadPrepaidCardProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesConsumerLeadPrepaidCardProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesConsumerLeadPrepaidCardProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..3d9975830b --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCardCreatorCapabilitiesConsumerLeadPrepaidCardProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationCardCreatorCapabilitiesConsumerLeadPrepaidCardProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCustomerCapabilitiesAutomaticIndirectTaxOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCustomerCapabilitiesAutomaticIndirectTaxOptions.cs index 35cbb8d8d8..53d28992f4 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCustomerCapabilitiesAutomaticIndirectTaxOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCustomerCapabilitiesAutomaticIndirectTaxOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationCustomerCapabilitiesAutomaticIndirectTaxOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationCustomerCapabilitiesAutomaticIndirectTaxProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCustomerCapabilitiesAutomaticIndirectTaxProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCustomerCapabilitiesAutomaticIndirectTaxProtectionsOptions.cs new file mode 100644 index 0000000000..ad1088def0 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCustomerCapabilitiesAutomaticIndirectTaxProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationCustomerCapabilitiesAutomaticIndirectTaxProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationCustomerCapabilitiesAutomaticIndirectTaxProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCustomerCapabilitiesAutomaticIndirectTaxProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCustomerCapabilitiesAutomaticIndirectTaxProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..8c3ac7c6e5 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCustomerCapabilitiesAutomaticIndirectTaxProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationCustomerCapabilitiesAutomaticIndirectTaxProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAchDebitPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAchDebitPaymentsOptions.cs index c7f9b029e2..9c8e7896f4 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAchDebitPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAchDebitPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationMerchantCapabilitiesAchDebitPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationMerchantCapabilitiesAchDebitPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAchDebitPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAchDebitPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..e1571949c2 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAchDebitPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesAchDebitPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationMerchantCapabilitiesAchDebitPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAchDebitPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAchDebitPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..500881c01a --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAchDebitPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesAchDebitPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAcssDebitPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAcssDebitPaymentsOptions.cs index 8fadc9c0ce..8855007e00 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAcssDebitPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAcssDebitPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationMerchantCapabilitiesAcssDebitPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationMerchantCapabilitiesAcssDebitPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAcssDebitPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAcssDebitPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..e62fd2f303 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAcssDebitPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesAcssDebitPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationMerchantCapabilitiesAcssDebitPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAcssDebitPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAcssDebitPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..c20e813d1e --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAcssDebitPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesAcssDebitPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAffirmPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAffirmPaymentsOptions.cs index d0eecf8cb7..3f3113dd2b 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAffirmPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAffirmPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationMerchantCapabilitiesAffirmPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationMerchantCapabilitiesAffirmPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAffirmPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAffirmPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..6cdacd122f --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAffirmPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesAffirmPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationMerchantCapabilitiesAffirmPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAffirmPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAffirmPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..d93d92897a --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAffirmPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesAffirmPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAfterpayClearpayPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAfterpayClearpayPaymentsOptions.cs index 6a3fd2d349..1161d479b6 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAfterpayClearpayPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAfterpayClearpayPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationMerchantCapabilitiesAfterpayClearpayPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationMerchantCapabilitiesAfterpayClearpayPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAfterpayClearpayPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAfterpayClearpayPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..17cdaa0120 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAfterpayClearpayPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesAfterpayClearpayPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationMerchantCapabilitiesAfterpayClearpayPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAfterpayClearpayPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAfterpayClearpayPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..b1cb8fbcb6 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAfterpayClearpayPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesAfterpayClearpayPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAlmaPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAlmaPaymentsOptions.cs index 76ed3e21d9..7b2d662fda 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAlmaPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAlmaPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationMerchantCapabilitiesAlmaPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationMerchantCapabilitiesAlmaPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAlmaPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAlmaPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..73709a1ef4 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAlmaPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesAlmaPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationMerchantCapabilitiesAlmaPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAlmaPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAlmaPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..1d6fb32a99 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAlmaPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesAlmaPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAmazonPayPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAmazonPayPaymentsOptions.cs index bb14426367..d0898b175c 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAmazonPayPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAmazonPayPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationMerchantCapabilitiesAmazonPayPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationMerchantCapabilitiesAmazonPayPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAmazonPayPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAmazonPayPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..2f225f0198 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAmazonPayPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesAmazonPayPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationMerchantCapabilitiesAmazonPayPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAmazonPayPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAmazonPayPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..dfab55db4d --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAmazonPayPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesAmazonPayPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAuBecsDebitPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAuBecsDebitPaymentsOptions.cs index 799dbe6aad..29b3edf211 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAuBecsDebitPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAuBecsDebitPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationMerchantCapabilitiesAuBecsDebitPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationMerchantCapabilitiesAuBecsDebitPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAuBecsDebitPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAuBecsDebitPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..8a75d4ab0a --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAuBecsDebitPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesAuBecsDebitPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationMerchantCapabilitiesAuBecsDebitPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAuBecsDebitPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAuBecsDebitPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..6821f8285e --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesAuBecsDebitPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesAuBecsDebitPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesBacsDebitPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesBacsDebitPaymentsOptions.cs index 23e44f957c..2c418f1b14 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesBacsDebitPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesBacsDebitPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationMerchantCapabilitiesBacsDebitPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationMerchantCapabilitiesBacsDebitPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesBacsDebitPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesBacsDebitPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..0e0fcc4ccc --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesBacsDebitPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesBacsDebitPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationMerchantCapabilitiesBacsDebitPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesBacsDebitPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesBacsDebitPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..46fc49891c --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesBacsDebitPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesBacsDebitPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesBancontactPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesBancontactPaymentsOptions.cs index 44392a7751..cd0e94c45c 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesBancontactPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesBancontactPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationMerchantCapabilitiesBancontactPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationMerchantCapabilitiesBancontactPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesBancontactPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesBancontactPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..00184eb87e --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesBancontactPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesBancontactPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationMerchantCapabilitiesBancontactPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesBancontactPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesBancontactPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..1507e6eb76 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesBancontactPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesBancontactPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesBlikPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesBlikPaymentsOptions.cs index 967d25457e..611eaaf551 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesBlikPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesBlikPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationMerchantCapabilitiesBlikPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationMerchantCapabilitiesBlikPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesBlikPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesBlikPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..599cb79703 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesBlikPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesBlikPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationMerchantCapabilitiesBlikPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesBlikPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesBlikPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..462840ba4b --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesBlikPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesBlikPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesBoletoPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesBoletoPaymentsOptions.cs index fac5b99b58..ca9ea66c27 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesBoletoPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesBoletoPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationMerchantCapabilitiesBoletoPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationMerchantCapabilitiesBoletoPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesBoletoPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesBoletoPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..d6ec9245b7 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesBoletoPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesBoletoPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationMerchantCapabilitiesBoletoPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesBoletoPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesBoletoPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..df44157884 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesBoletoPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesBoletoPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesCardPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesCardPaymentsOptions.cs index 882b040e5b..378f7db8dc 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesCardPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesCardPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationMerchantCapabilitiesCardPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationMerchantCapabilitiesCardPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesCardPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesCardPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..a6450aa9dc --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesCardPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesCardPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationMerchantCapabilitiesCardPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesCardPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesCardPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..b0e176a722 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesCardPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesCardPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesCartesBancairesPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesCartesBancairesPaymentsOptions.cs index d79dae4356..91bd482faf 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesCartesBancairesPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesCartesBancairesPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationMerchantCapabilitiesCartesBancairesPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationMerchantCapabilitiesCartesBancairesPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesCartesBancairesPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesCartesBancairesPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..ab5ecacdbd --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesCartesBancairesPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesCartesBancairesPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationMerchantCapabilitiesCartesBancairesPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesCartesBancairesPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesCartesBancairesPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..4ed257cac3 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesCartesBancairesPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesCartesBancairesPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesCashappPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesCashappPaymentsOptions.cs index 0e33507b14..bff7bfdd22 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesCashappPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesCashappPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationMerchantCapabilitiesCashappPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationMerchantCapabilitiesCashappPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesCashappPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesCashappPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..77086685b6 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesCashappPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesCashappPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationMerchantCapabilitiesCashappPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesCashappPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesCashappPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..9857cd0c68 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesCashappPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesCashappPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesEpsPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesEpsPaymentsOptions.cs index 656910ee56..3e5cd6baae 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesEpsPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesEpsPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationMerchantCapabilitiesEpsPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationMerchantCapabilitiesEpsPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesEpsPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesEpsPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..afcb2c4060 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesEpsPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesEpsPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationMerchantCapabilitiesEpsPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesEpsPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesEpsPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..8336b13339 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesEpsPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesEpsPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesFpxPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesFpxPaymentsOptions.cs index cd55fb8c6c..ec87a51a94 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesFpxPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesFpxPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationMerchantCapabilitiesFpxPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationMerchantCapabilitiesFpxPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesFpxPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesFpxPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..4aacc85a33 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesFpxPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesFpxPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationMerchantCapabilitiesFpxPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesFpxPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesFpxPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..190be572cc --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesFpxPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesFpxPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesGbBankTransferPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesGbBankTransferPaymentsOptions.cs index 80fe21e959..2dc9d51742 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesGbBankTransferPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesGbBankTransferPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationMerchantCapabilitiesGbBankTransferPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationMerchantCapabilitiesGbBankTransferPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesGbBankTransferPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesGbBankTransferPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..b5a6ad97a9 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesGbBankTransferPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesGbBankTransferPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationMerchantCapabilitiesGbBankTransferPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesGbBankTransferPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesGbBankTransferPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..25812537a5 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesGbBankTransferPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesGbBankTransferPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesGrabpayPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesGrabpayPaymentsOptions.cs index 53bfbc43ed..3605142793 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesGrabpayPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesGrabpayPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationMerchantCapabilitiesGrabpayPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationMerchantCapabilitiesGrabpayPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesGrabpayPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesGrabpayPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..f5735b33af --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesGrabpayPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesGrabpayPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationMerchantCapabilitiesGrabpayPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesGrabpayPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesGrabpayPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..3ad2070437 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesGrabpayPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesGrabpayPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesIdealPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesIdealPaymentsOptions.cs index 5fb3aa845b..81d83efaee 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesIdealPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesIdealPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationMerchantCapabilitiesIdealPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationMerchantCapabilitiesIdealPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesIdealPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesIdealPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..6a6e526041 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesIdealPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesIdealPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationMerchantCapabilitiesIdealPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesIdealPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesIdealPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..2b2e2ae21d --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesIdealPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesIdealPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesJcbPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesJcbPaymentsOptions.cs index f434af7db4..df4fcb41d4 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesJcbPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesJcbPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationMerchantCapabilitiesJcbPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationMerchantCapabilitiesJcbPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesJcbPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesJcbPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..388451fc1d --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesJcbPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesJcbPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationMerchantCapabilitiesJcbPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesJcbPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesJcbPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..bebfa5d718 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesJcbPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesJcbPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesJpBankTransferPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesJpBankTransferPaymentsOptions.cs index 98d6bf3a26..3278ba36be 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesJpBankTransferPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesJpBankTransferPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationMerchantCapabilitiesJpBankTransferPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationMerchantCapabilitiesJpBankTransferPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesJpBankTransferPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesJpBankTransferPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..46f2f21951 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesJpBankTransferPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesJpBankTransferPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationMerchantCapabilitiesJpBankTransferPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesJpBankTransferPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesJpBankTransferPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..bca29f06fc --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesJpBankTransferPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesJpBankTransferPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesKakaoPayPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesKakaoPayPaymentsOptions.cs index 1e7a39f171..d2cca067bc 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesKakaoPayPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesKakaoPayPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationMerchantCapabilitiesKakaoPayPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationMerchantCapabilitiesKakaoPayPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesKakaoPayPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesKakaoPayPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..1d0543e4d3 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesKakaoPayPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesKakaoPayPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationMerchantCapabilitiesKakaoPayPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesKakaoPayPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesKakaoPayPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..f337b926ca --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesKakaoPayPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesKakaoPayPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesKlarnaPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesKlarnaPaymentsOptions.cs index 77da4e2466..a1149ec640 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesKlarnaPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesKlarnaPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationMerchantCapabilitiesKlarnaPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationMerchantCapabilitiesKlarnaPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesKlarnaPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesKlarnaPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..79723bff2b --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesKlarnaPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesKlarnaPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationMerchantCapabilitiesKlarnaPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesKlarnaPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesKlarnaPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..28a7bc808f --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesKlarnaPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesKlarnaPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesKonbiniPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesKonbiniPaymentsOptions.cs index 93c44ee9fe..7ec34cb6dd 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesKonbiniPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesKonbiniPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationMerchantCapabilitiesKonbiniPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationMerchantCapabilitiesKonbiniPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesKonbiniPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesKonbiniPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..1468dad97f --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesKonbiniPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesKonbiniPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationMerchantCapabilitiesKonbiniPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesKonbiniPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesKonbiniPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..ace2640608 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesKonbiniPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesKonbiniPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesKrCardPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesKrCardPaymentsOptions.cs index 299dbfb99d..a94752295f 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesKrCardPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesKrCardPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationMerchantCapabilitiesKrCardPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationMerchantCapabilitiesKrCardPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesKrCardPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesKrCardPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..d4098e0aa0 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesKrCardPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesKrCardPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationMerchantCapabilitiesKrCardPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesKrCardPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesKrCardPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..886f63f5d9 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesKrCardPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesKrCardPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesLinkPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesLinkPaymentsOptions.cs index 941ec46b9c..d78f586c74 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesLinkPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesLinkPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationMerchantCapabilitiesLinkPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationMerchantCapabilitiesLinkPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesLinkPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesLinkPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..a3e9465c6f --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesLinkPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesLinkPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationMerchantCapabilitiesLinkPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesLinkPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesLinkPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..19b5e223bb --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesLinkPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesLinkPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesMobilepayPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesMobilepayPaymentsOptions.cs index c28894dd0a..1d7f9d732f 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesMobilepayPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesMobilepayPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationMerchantCapabilitiesMobilepayPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationMerchantCapabilitiesMobilepayPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesMobilepayPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesMobilepayPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..c225389d3d --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesMobilepayPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesMobilepayPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationMerchantCapabilitiesMobilepayPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesMobilepayPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesMobilepayPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..77e0e6fd73 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesMobilepayPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesMobilepayPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesMultibancoPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesMultibancoPaymentsOptions.cs index 9f51355e60..afa7c1e209 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesMultibancoPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesMultibancoPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationMerchantCapabilitiesMultibancoPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationMerchantCapabilitiesMultibancoPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesMultibancoPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesMultibancoPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..e8799aa4ae --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesMultibancoPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesMultibancoPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationMerchantCapabilitiesMultibancoPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesMultibancoPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesMultibancoPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..d26c8e4186 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesMultibancoPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesMultibancoPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesMxBankTransferPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesMxBankTransferPaymentsOptions.cs index 879450a117..4751cd8fde 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesMxBankTransferPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesMxBankTransferPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationMerchantCapabilitiesMxBankTransferPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationMerchantCapabilitiesMxBankTransferPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesMxBankTransferPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesMxBankTransferPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..e7c1d540c2 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesMxBankTransferPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesMxBankTransferPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationMerchantCapabilitiesMxBankTransferPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesMxBankTransferPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesMxBankTransferPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..d48a277299 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesMxBankTransferPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesMxBankTransferPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesNaverPayPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesNaverPayPaymentsOptions.cs index a1d38deb3f..0e19d193d7 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesNaverPayPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesNaverPayPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationMerchantCapabilitiesNaverPayPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationMerchantCapabilitiesNaverPayPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesNaverPayPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesNaverPayPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..5f08e392d1 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesNaverPayPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesNaverPayPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationMerchantCapabilitiesNaverPayPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesNaverPayPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesNaverPayPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..58d4ef717e --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesNaverPayPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesNaverPayPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesOxxoPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesOxxoPaymentsOptions.cs index 7388d5b27b..e3485bb1e9 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesOxxoPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesOxxoPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationMerchantCapabilitiesOxxoPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationMerchantCapabilitiesOxxoPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesOxxoPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesOxxoPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..dec373b937 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesOxxoPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesOxxoPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationMerchantCapabilitiesOxxoPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesOxxoPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesOxxoPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..bb565926a8 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesOxxoPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesOxxoPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesP24PaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesP24PaymentsOptions.cs index 31c56371ec..f99b948c8b 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesP24PaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesP24PaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationMerchantCapabilitiesP24PaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationMerchantCapabilitiesP24PaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesP24PaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesP24PaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..3ff2e526ca --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesP24PaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesP24PaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationMerchantCapabilitiesP24PaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesP24PaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesP24PaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..6b9baace11 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesP24PaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesP24PaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesPayByBankPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesPayByBankPaymentsOptions.cs index 037f05c74c..9baae1f5a3 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesPayByBankPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesPayByBankPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationMerchantCapabilitiesPayByBankPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationMerchantCapabilitiesPayByBankPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesPayByBankPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesPayByBankPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..60af0f07e1 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesPayByBankPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesPayByBankPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationMerchantCapabilitiesPayByBankPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesPayByBankPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesPayByBankPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..a6b5585dec --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesPayByBankPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesPayByBankPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesPaycoPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesPaycoPaymentsOptions.cs index dc76489d24..141f3b25c2 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesPaycoPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesPaycoPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationMerchantCapabilitiesPaycoPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationMerchantCapabilitiesPaycoPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesPaycoPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesPaycoPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..3d284c1490 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesPaycoPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesPaycoPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationMerchantCapabilitiesPaycoPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesPaycoPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesPaycoPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..f30a20ac16 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesPaycoPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesPaycoPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesPaynowPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesPaynowPaymentsOptions.cs index 658aab32bc..ceff870fca 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesPaynowPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesPaynowPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationMerchantCapabilitiesPaynowPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationMerchantCapabilitiesPaynowPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesPaynowPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesPaynowPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..9309869b61 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesPaynowPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesPaynowPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationMerchantCapabilitiesPaynowPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesPaynowPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesPaynowPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..63e0cb52d7 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesPaynowPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesPaynowPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesPromptpayPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesPromptpayPaymentsOptions.cs index 9234774f8d..2dc2b667a2 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesPromptpayPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesPromptpayPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationMerchantCapabilitiesPromptpayPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationMerchantCapabilitiesPromptpayPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesPromptpayPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesPromptpayPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..0d7d02cb19 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesPromptpayPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesPromptpayPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationMerchantCapabilitiesPromptpayPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesPromptpayPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesPromptpayPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..a278e5906c --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesPromptpayPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesPromptpayPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesRevolutPayPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesRevolutPayPaymentsOptions.cs index 1fde124191..707de4243f 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesRevolutPayPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesRevolutPayPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationMerchantCapabilitiesRevolutPayPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationMerchantCapabilitiesRevolutPayPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesRevolutPayPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesRevolutPayPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..629c28b7f7 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesRevolutPayPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesRevolutPayPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationMerchantCapabilitiesRevolutPayPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesRevolutPayPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesRevolutPayPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..e2489c327f --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesRevolutPayPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesRevolutPayPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesSamsungPayPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesSamsungPayPaymentsOptions.cs index d342c85a13..998df8a47b 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesSamsungPayPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesSamsungPayPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationMerchantCapabilitiesSamsungPayPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationMerchantCapabilitiesSamsungPayPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesSamsungPayPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesSamsungPayPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..85dd54757e --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesSamsungPayPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesSamsungPayPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationMerchantCapabilitiesSamsungPayPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesSamsungPayPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesSamsungPayPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..3ca3f347ca --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesSamsungPayPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesSamsungPayPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesSepaBankTransferPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesSepaBankTransferPaymentsOptions.cs index 481c3678a4..43ec9aa1e1 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesSepaBankTransferPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesSepaBankTransferPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationMerchantCapabilitiesSepaBankTransferPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationMerchantCapabilitiesSepaBankTransferPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesSepaBankTransferPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesSepaBankTransferPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..67679ac5c1 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesSepaBankTransferPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesSepaBankTransferPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationMerchantCapabilitiesSepaBankTransferPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesSepaBankTransferPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesSepaBankTransferPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..37f7706277 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesSepaBankTransferPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesSepaBankTransferPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesSepaDebitPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesSepaDebitPaymentsOptions.cs index 8114b063c9..5a698af96e 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesSepaDebitPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesSepaDebitPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationMerchantCapabilitiesSepaDebitPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationMerchantCapabilitiesSepaDebitPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesSepaDebitPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesSepaDebitPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..1e4aabe1a5 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesSepaDebitPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesSepaDebitPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationMerchantCapabilitiesSepaDebitPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesSepaDebitPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesSepaDebitPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..94f0b64576 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesSepaDebitPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesSepaDebitPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesSwishPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesSwishPaymentsOptions.cs index c81feee3be..a8514bdcf6 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesSwishPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesSwishPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationMerchantCapabilitiesSwishPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationMerchantCapabilitiesSwishPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesSwishPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesSwishPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..9f961cd4fe --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesSwishPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesSwishPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationMerchantCapabilitiesSwishPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesSwishPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesSwishPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..09992fee6d --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesSwishPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesSwishPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesTwintPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesTwintPaymentsOptions.cs index 976b262a8e..8b7b9c6b1e 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesTwintPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesTwintPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationMerchantCapabilitiesTwintPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationMerchantCapabilitiesTwintPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesTwintPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesTwintPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..7ef1061296 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesTwintPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesTwintPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationMerchantCapabilitiesTwintPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesTwintPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesTwintPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..a13e7b494d --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesTwintPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesTwintPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesUsBankTransferPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesUsBankTransferPaymentsOptions.cs index 8ecb31b03d..917e9795ff 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesUsBankTransferPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesUsBankTransferPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationMerchantCapabilitiesUsBankTransferPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationMerchantCapabilitiesUsBankTransferPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesUsBankTransferPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesUsBankTransferPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..849c681e27 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesUsBankTransferPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesUsBankTransferPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationMerchantCapabilitiesUsBankTransferPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesUsBankTransferPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesUsBankTransferPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..1db591be06 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesUsBankTransferPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesUsBankTransferPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesZipPaymentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesZipPaymentsOptions.cs index 7df91249b5..474521fed9 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesZipPaymentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesZipPaymentsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationMerchantCapabilitiesZipPaymentsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationMerchantCapabilitiesZipPaymentsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesZipPaymentsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesZipPaymentsProtectionsOptions.cs new file mode 100644 index 0000000000..06bbd4c143 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesZipPaymentsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesZipPaymentsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationMerchantCapabilitiesZipPaymentsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesZipPaymentsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesZipPaymentsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..11a7684a87 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationMerchantCapabilitiesZipPaymentsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationMerchantCapabilitiesZipPaymentsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesBankAccountsInstantOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesBankAccountsInstantOptions.cs index f4c0aee74d..3ae5581f42 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesBankAccountsInstantOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesBankAccountsInstantOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationRecipientCapabilitiesBankAccountsInstantOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationRecipientCapabilitiesBankAccountsInstantProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesBankAccountsInstantProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesBankAccountsInstantProtectionsOptions.cs new file mode 100644 index 0000000000..b79c228920 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesBankAccountsInstantProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationRecipientCapabilitiesBankAccountsInstantProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationRecipientCapabilitiesBankAccountsInstantProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesBankAccountsInstantProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesBankAccountsInstantProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..d305ba81ea --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesBankAccountsInstantProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationRecipientCapabilitiesBankAccountsInstantProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesBankAccountsLocalOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesBankAccountsLocalOptions.cs index e169c91c56..c11a16365e 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesBankAccountsLocalOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesBankAccountsLocalOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationRecipientCapabilitiesBankAccountsLocalOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationRecipientCapabilitiesBankAccountsLocalProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesBankAccountsLocalProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesBankAccountsLocalProtectionsOptions.cs new file mode 100644 index 0000000000..9aad220d34 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesBankAccountsLocalProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationRecipientCapabilitiesBankAccountsLocalProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationRecipientCapabilitiesBankAccountsLocalProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesBankAccountsLocalProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesBankAccountsLocalProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..baae6f73a5 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesBankAccountsLocalProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationRecipientCapabilitiesBankAccountsLocalProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesBankAccountsWireOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesBankAccountsWireOptions.cs index 25348319ce..9a02ecec75 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesBankAccountsWireOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesBankAccountsWireOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationRecipientCapabilitiesBankAccountsWireOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationRecipientCapabilitiesBankAccountsWireProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesBankAccountsWireProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesBankAccountsWireProtectionsOptions.cs new file mode 100644 index 0000000000..e356e2e909 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesBankAccountsWireProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationRecipientCapabilitiesBankAccountsWireProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationRecipientCapabilitiesBankAccountsWireProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesBankAccountsWireProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesBankAccountsWireProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..31c839b5f3 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesBankAccountsWireProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationRecipientCapabilitiesBankAccountsWireProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesCardsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesCardsOptions.cs index c132140cbe..e64c4cf82b 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesCardsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesCardsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationRecipientCapabilitiesCardsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationRecipientCapabilitiesCardsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesCardsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesCardsProtectionsOptions.cs new file mode 100644 index 0000000000..a210f74275 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesCardsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationRecipientCapabilitiesCardsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationRecipientCapabilitiesCardsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesCardsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesCardsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..51f480cc52 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesCardsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationRecipientCapabilitiesCardsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesCryptoWalletsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesCryptoWalletsOptions.cs index 708d557f53..c77c9712c7 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesCryptoWalletsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesCryptoWalletsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationRecipientCapabilitiesCryptoWalletsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationRecipientCapabilitiesCryptoWalletsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesCryptoWalletsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesCryptoWalletsProtectionsOptions.cs new file mode 100644 index 0000000000..165ebd7b0e --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesCryptoWalletsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationRecipientCapabilitiesCryptoWalletsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationRecipientCapabilitiesCryptoWalletsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesCryptoWalletsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesCryptoWalletsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..f9861cb43d --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesCryptoWalletsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationRecipientCapabilitiesCryptoWalletsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesPaperChecksOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesPaperChecksOptions.cs index dd8fae1fb4..487da2a469 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesPaperChecksOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesPaperChecksOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationRecipientCapabilitiesPaperChecksOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationRecipientCapabilitiesPaperChecksProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesPaperChecksProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesPaperChecksProtectionsOptions.cs new file mode 100644 index 0000000000..9fe00e71e5 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesPaperChecksProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationRecipientCapabilitiesPaperChecksProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationRecipientCapabilitiesPaperChecksProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesPaperChecksProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesPaperChecksProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..7b4005733c --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesPaperChecksProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationRecipientCapabilitiesPaperChecksProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesStripeBalanceStripeTransfersOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesStripeBalanceStripeTransfersOptions.cs index 2a8d99c8f9..ef699c1239 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesStripeBalanceStripeTransfersOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesStripeBalanceStripeTransfersOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationRecipientCapabilitiesStripeBalanceStripeTransfersOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationRecipientCapabilitiesStripeBalanceStripeTransfersProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesStripeBalanceStripeTransfersProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesStripeBalanceStripeTransfersProtectionsOptions.cs new file mode 100644 index 0000000000..ce9bdcd0ba --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesStripeBalanceStripeTransfersProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationRecipientCapabilitiesStripeBalanceStripeTransfersProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationRecipientCapabilitiesStripeBalanceStripeTransfersProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesStripeBalanceStripeTransfersProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesStripeBalanceStripeTransfersProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..ec07d9a8aa --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationRecipientCapabilitiesStripeBalanceStripeTransfersProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationRecipientCapabilitiesStripeBalanceStripeTransfersProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesConsumerHoldsCurrenciesUsdOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesConsumerHoldsCurrenciesUsdOptions.cs index fc0b61638f..3ec83a9fbc 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesConsumerHoldsCurrenciesUsdOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesConsumerHoldsCurrenciesUsdOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationStorerCapabilitiesConsumerHoldsCurrenciesUsdOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationStorerCapabilitiesConsumerHoldsCurrenciesUsdProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesConsumerHoldsCurrenciesUsdProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesConsumerHoldsCurrenciesUsdProtectionsOptions.cs new file mode 100644 index 0000000000..98e7eb4d19 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesConsumerHoldsCurrenciesUsdProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationStorerCapabilitiesConsumerHoldsCurrenciesUsdProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationStorerCapabilitiesConsumerHoldsCurrenciesUsdProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesConsumerHoldsCurrenciesUsdProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesConsumerHoldsCurrenciesUsdProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..2e1b78176b --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesConsumerHoldsCurrenciesUsdProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationStorerCapabilitiesConsumerHoldsCurrenciesUsdProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesFinancialAddressesBankAccountsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesFinancialAddressesBankAccountsOptions.cs index 196fec80c3..79d2a9c7bf 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesFinancialAddressesBankAccountsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesFinancialAddressesBankAccountsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationStorerCapabilitiesFinancialAddressesBankAccountsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationStorerCapabilitiesFinancialAddressesBankAccountsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesFinancialAddressesBankAccountsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesFinancialAddressesBankAccountsProtectionsOptions.cs new file mode 100644 index 0000000000..9032552462 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesFinancialAddressesBankAccountsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationStorerCapabilitiesFinancialAddressesBankAccountsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationStorerCapabilitiesFinancialAddressesBankAccountsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesFinancialAddressesBankAccountsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesFinancialAddressesBankAccountsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..6201f10aea --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesFinancialAddressesBankAccountsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationStorerCapabilitiesFinancialAddressesBankAccountsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesFinancialAddressesCryptoWalletsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesFinancialAddressesCryptoWalletsOptions.cs index 438b4a4d4d..da29f92f38 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesFinancialAddressesCryptoWalletsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesFinancialAddressesCryptoWalletsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationStorerCapabilitiesFinancialAddressesCryptoWalletsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationStorerCapabilitiesFinancialAddressesCryptoWalletsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesFinancialAddressesCryptoWalletsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesFinancialAddressesCryptoWalletsProtectionsOptions.cs new file mode 100644 index 0000000000..7d804f9fbd --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesFinancialAddressesCryptoWalletsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationStorerCapabilitiesFinancialAddressesCryptoWalletsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationStorerCapabilitiesFinancialAddressesCryptoWalletsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesFinancialAddressesCryptoWalletsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesFinancialAddressesCryptoWalletsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..ca890566b1 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesFinancialAddressesCryptoWalletsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationStorerCapabilitiesFinancialAddressesCryptoWalletsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesEurOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesEurOptions.cs index cd3e28d8b4..31d346a8a3 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesEurOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesEurOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesEurOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesEurProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesEurProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesEurProtectionsOptions.cs new file mode 100644 index 0000000000..b7fa849d1c --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesEurProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesEurProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesEurProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesEurProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesEurProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..027eecb36a --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesEurProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesEurProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesGbpOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesGbpOptions.cs index de9b814dc3..9138f3474e 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesGbpOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesGbpOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesGbpOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesGbpProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesGbpProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesGbpProtectionsOptions.cs new file mode 100644 index 0000000000..a63c4cb726 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesGbpProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesGbpProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesGbpProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesGbpProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesGbpProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..3cc63ca5b4 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesGbpProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesGbpProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesUsdOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesUsdOptions.cs index 1f9733448d..b12c678a03 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesUsdOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesUsdOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesUsdOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesUsdProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesUsdProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesUsdProtectionsOptions.cs new file mode 100644 index 0000000000..aff1463c27 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesUsdProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesUsdProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesUsdProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesUsdProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesUsdProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..7a0d5f3cf0 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesUsdProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesUsdProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesUsdcOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesUsdcOptions.cs index 92637b0f08..34c622f2e6 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesUsdcOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesUsdcOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesUsdcOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesUsdcProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesUsdcProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesUsdcProtectionsOptions.cs new file mode 100644 index 0000000000..aeacea0dd0 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesUsdcProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesUsdcProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesUsdcProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesUsdcProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesUsdcProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..e4715997d3 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesUsdcProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesUsdcProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesInboundTransfersBankAccountsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesInboundTransfersBankAccountsOptions.cs index 4385a52cc3..9799997766 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesInboundTransfersBankAccountsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesInboundTransfersBankAccountsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationStorerCapabilitiesInboundTransfersBankAccountsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationStorerCapabilitiesInboundTransfersBankAccountsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesInboundTransfersBankAccountsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesInboundTransfersBankAccountsProtectionsOptions.cs new file mode 100644 index 0000000000..a6755254da --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesInboundTransfersBankAccountsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationStorerCapabilitiesInboundTransfersBankAccountsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationStorerCapabilitiesInboundTransfersBankAccountsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesInboundTransfersBankAccountsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesInboundTransfersBankAccountsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..6e29a35a63 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesInboundTransfersBankAccountsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationStorerCapabilitiesInboundTransfersBankAccountsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsBankAccountsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsBankAccountsOptions.cs index 73ed8c0ad2..3d44479f3f 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsBankAccountsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsBankAccountsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsBankAccountsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsBankAccountsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsBankAccountsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsBankAccountsProtectionsOptions.cs new file mode 100644 index 0000000000..20aa954a0e --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsBankAccountsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsBankAccountsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsBankAccountsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsBankAccountsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsBankAccountsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..040aaf75a5 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsBankAccountsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsBankAccountsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsCardsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsCardsOptions.cs index 3d5f99c081..82417e3f6a 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsCardsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsCardsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsCardsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsCardsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsCardsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsCardsProtectionsOptions.cs new file mode 100644 index 0000000000..9dcf857978 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsCardsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsCardsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsCardsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsCardsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsCardsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..d6c0b023ae --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsCardsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsCardsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsCryptoWalletsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsCryptoWalletsOptions.cs index 84e56c9b00..a03033d9f4 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsCryptoWalletsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsCryptoWalletsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsCryptoWalletsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsCryptoWalletsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsCryptoWalletsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsCryptoWalletsProtectionsOptions.cs new file mode 100644 index 0000000000..d178474515 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsCryptoWalletsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsCryptoWalletsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsCryptoWalletsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsCryptoWalletsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsCryptoWalletsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..ba1e6aac3b --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsCryptoWalletsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsCryptoWalletsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccountsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccountsOptions.cs index 50b74ce4ea..6fb8589dc9 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccountsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccountsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccountsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccountsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccountsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccountsProtectionsOptions.cs new file mode 100644 index 0000000000..5cef22e25b --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccountsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccountsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccountsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccountsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccountsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..e62fd39c10 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccountsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccountsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsPaperChecksOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsPaperChecksOptions.cs index ec293ab1a0..3ff59bac3a 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsPaperChecksOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsPaperChecksOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsPaperChecksOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsPaperChecksProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsPaperChecksProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsPaperChecksProtectionsOptions.cs new file mode 100644 index 0000000000..723bca1dd9 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsPaperChecksProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsPaperChecksProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsPaperChecksProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsPaperChecksProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsPaperChecksProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..74b8583a24 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsPaperChecksProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationStorerCapabilitiesOutboundPaymentsPaperChecksProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersBankAccountsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersBankAccountsOptions.cs index 2f4e20d533..a5de658391 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersBankAccountsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersBankAccountsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersBankAccountsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersBankAccountsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersBankAccountsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersBankAccountsProtectionsOptions.cs new file mode 100644 index 0000000000..c9b016e096 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersBankAccountsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersBankAccountsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersBankAccountsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersBankAccountsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersBankAccountsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..d922e29c71 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersBankAccountsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersBankAccountsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersCryptoWalletsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersCryptoWalletsOptions.cs index 89422d8d02..e18df6e525 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersCryptoWalletsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersCryptoWalletsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersCryptoWalletsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersCryptoWalletsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersCryptoWalletsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersCryptoWalletsProtectionsOptions.cs new file mode 100644 index 0000000000..ccef6a259d --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersCryptoWalletsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersCryptoWalletsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersCryptoWalletsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersCryptoWalletsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersCryptoWalletsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..4484107f00 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersCryptoWalletsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersCryptoWalletsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersFinancialAccountsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersFinancialAccountsOptions.cs index 13a034225b..f76a0caa3e 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersFinancialAccountsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersFinancialAccountsOptions.cs @@ -8,6 +8,13 @@ namespace Stripe.V2.Core [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersFinancialAccountsOptions : INestedOptions { + /// + /// Protection types to request for this capability (e.g. "psp_migration"). + /// + [JsonProperty("protections")] + [STJS.JsonPropertyName("protections")] + public AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersFinancialAccountsProtectionsOptions Protections { get; set; } + /// /// To request a new Capability for an account, pass true. There can be a delay before the /// requested Capability becomes active. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersFinancialAccountsProtectionsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersFinancialAccountsProtectionsOptions.cs new file mode 100644 index 0000000000..3b0f579bce --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersFinancialAccountsProtectionsOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersFinancialAccountsProtectionsOptions : INestedOptions + { + /// + /// Parameter to request psp_migration protection. + /// + [JsonProperty("psp_migration")] + [STJS.JsonPropertyName("psp_migration")] + public AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersFinancialAccountsProtectionsPspMigrationOptions PspMigration { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersFinancialAccountsProtectionsPspMigrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersFinancialAccountsProtectionsPspMigrationOptions.cs new file mode 100644 index 0000000000..52d67347e4 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersFinancialAccountsProtectionsPspMigrationOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateConfigurationStorerCapabilitiesOutboundTransfersFinancialAccountsProtectionsPspMigrationOptions : INestedOptions + { + /// + /// To request a protection, pass true. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} From 2a1eb1c346310995066795266ec109b811f0a227 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 12 Jun 2026 18:09:05 +0000 Subject: [PATCH 04/15] Update generated code for v2300 and 310a8f6be0f5ff9f63d26e1cfac9d08b21c3d2b3 --- CODEGEN_VERSION | 2 +- OPENAPI_VERSION | 2 +- ...rdPaymentMethodDetailsCardChecksOptions.cs | 35 +++++++++++++++++++ ...ptRecordPaymentMethodDetailsCardOptions.cs | 18 ++++++++++ ...ttemptRecordPaymentMethodDetailsOptions.cs | 27 ++++++++++++++ ...entAttemptRecordReportGuaranteedOptions.cs | 7 ++++ ...rdReportPaymentAttemptGuaranteedOptions.cs | 7 ++++ 7 files changed, 96 insertions(+), 2 deletions(-) create mode 100644 src/Stripe.net/Services/PaymentAttemptRecords/PaymentAttemptRecordPaymentMethodDetailsCardChecksOptions.cs create mode 100644 src/Stripe.net/Services/PaymentAttemptRecords/PaymentAttemptRecordPaymentMethodDetailsCardOptions.cs create mode 100644 src/Stripe.net/Services/PaymentAttemptRecords/PaymentAttemptRecordPaymentMethodDetailsOptions.cs diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index e2ada73c28..5612479c86 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -161b47dfc5d5f9332c906a572b90ce8551a2f752 \ No newline at end of file +310a8f6be0f5ff9f63d26e1cfac9d08b21c3d2b3 \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index e656cda126..5d75b90304 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2299 \ No newline at end of file +v2300 \ No newline at end of file diff --git a/src/Stripe.net/Services/PaymentAttemptRecords/PaymentAttemptRecordPaymentMethodDetailsCardChecksOptions.cs b/src/Stripe.net/Services/PaymentAttemptRecords/PaymentAttemptRecordPaymentMethodDetailsCardChecksOptions.cs new file mode 100644 index 0000000000..2ecdc19bd6 --- /dev/null +++ b/src/Stripe.net/Services/PaymentAttemptRecords/PaymentAttemptRecordPaymentMethodDetailsCardChecksOptions.cs @@ -0,0 +1,35 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class PaymentAttemptRecordPaymentMethodDetailsCardChecksOptions : INestedOptions + { + /// + /// The result of the check on the cardholder's address line 1. + /// One of: fail, pass, unavailable, or unchecked. + /// + [JsonProperty("address_line1_check")] + [STJS.JsonPropertyName("address_line1_check")] + public string AddressLine1Check { get; set; } + + /// + /// The result of the check on the cardholder's postal code. + /// One of: fail, pass, unavailable, or unchecked. + /// + [JsonProperty("address_postal_code_check")] + [STJS.JsonPropertyName("address_postal_code_check")] + public string AddressPostalCodeCheck { get; set; } + + /// + /// The result of the check on the card's CVC. + /// One of: fail, pass, unavailable, or unchecked. + /// + [JsonProperty("cvc_check")] + [STJS.JsonPropertyName("cvc_check")] + public string CvcCheck { get; set; } + } +} diff --git a/src/Stripe.net/Services/PaymentAttemptRecords/PaymentAttemptRecordPaymentMethodDetailsCardOptions.cs b/src/Stripe.net/Services/PaymentAttemptRecords/PaymentAttemptRecordPaymentMethodDetailsCardOptions.cs new file mode 100644 index 0000000000..6f1bc79dc6 --- /dev/null +++ b/src/Stripe.net/Services/PaymentAttemptRecords/PaymentAttemptRecordPaymentMethodDetailsCardOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class PaymentAttemptRecordPaymentMethodDetailsCardOptions : INestedOptions + { + /// + /// Verification checks performed on the card. + /// + [JsonProperty("checks")] + [STJS.JsonPropertyName("checks")] + public PaymentAttemptRecordPaymentMethodDetailsCardChecksOptions Checks { get; set; } + } +} diff --git a/src/Stripe.net/Services/PaymentAttemptRecords/PaymentAttemptRecordPaymentMethodDetailsOptions.cs b/src/Stripe.net/Services/PaymentAttemptRecords/PaymentAttemptRecordPaymentMethodDetailsOptions.cs new file mode 100644 index 0000000000..85e8bd4bdf --- /dev/null +++ b/src/Stripe.net/Services/PaymentAttemptRecords/PaymentAttemptRecordPaymentMethodDetailsOptions.cs @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class PaymentAttemptRecordPaymentMethodDetailsOptions : INestedOptions + { + /// + /// Information about the card payment method used to make this payment. + /// + [JsonProperty("card")] + [STJS.JsonPropertyName("card")] + public PaymentAttemptRecordPaymentMethodDetailsCardOptions Card { get; set; } + + /// + /// The type of the payment method details. An additional hash is included on the + /// payment_method_details with a name matching this value. It contains additional + /// information specific to the type. + /// + [JsonProperty("type")] + [STJS.JsonPropertyName("type")] + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Services/PaymentAttemptRecords/PaymentAttemptRecordReportGuaranteedOptions.cs b/src/Stripe.net/Services/PaymentAttemptRecords/PaymentAttemptRecordReportGuaranteedOptions.cs index 3b9de59216..e1611b33b9 100644 --- a/src/Stripe.net/Services/PaymentAttemptRecords/PaymentAttemptRecordReportGuaranteedOptions.cs +++ b/src/Stripe.net/Services/PaymentAttemptRecords/PaymentAttemptRecordReportGuaranteedOptions.cs @@ -47,6 +47,13 @@ public Dictionary Metadata [STJS.JsonPropertyName("payment_evaluations")] public List PaymentEvaluations { get; set; } + /// + /// Information about the Payment Method debited for this payment. + /// + [JsonProperty("payment_method_details")] + [STJS.JsonPropertyName("payment_method_details")] + public PaymentAttemptRecordPaymentMethodDetailsOptions PaymentMethodDetails { get; set; } + /// /// Processor information for this payment. /// diff --git a/src/Stripe.net/Services/PaymentRecords/PaymentRecordReportPaymentAttemptGuaranteedOptions.cs b/src/Stripe.net/Services/PaymentRecords/PaymentRecordReportPaymentAttemptGuaranteedOptions.cs index 336fb22020..ed348d2080 100644 --- a/src/Stripe.net/Services/PaymentRecords/PaymentRecordReportPaymentAttemptGuaranteedOptions.cs +++ b/src/Stripe.net/Services/PaymentRecords/PaymentRecordReportPaymentAttemptGuaranteedOptions.cs @@ -47,6 +47,13 @@ public Dictionary Metadata [STJS.JsonPropertyName("payment_evaluations")] public List PaymentEvaluations { get; set; } + /// + /// Information about the Payment Method debited for this payment. + /// + [JsonProperty("payment_method_details")] + [STJS.JsonPropertyName("payment_method_details")] + public PaymentRecordPaymentMethodDetailsOptions PaymentMethodDetails { get; set; } + /// /// Processor information for this payment. /// From 414c3ce973ebf3dba5b4a21f712998c636b7b938 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 12 Jun 2026 18:42:25 +0000 Subject: [PATCH 05/15] Update generated code for v2301 and c20e0e5333d06539a914faeb375b14916986233a --- CODEGEN_VERSION | 2 +- OPENAPI_VERSION | 2 +- src/Stripe.net/Entities/GiftCards/GiftCard.cs | 8 ++++++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index 5612479c86..8f1b730c8b 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -310a8f6be0f5ff9f63d26e1cfac9d08b21c3d2b3 \ No newline at end of file +c20e0e5333d06539a914faeb375b14916986233a \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 5d75b90304..8f7f7dd6fb 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2300 \ No newline at end of file +v2301 \ No newline at end of file diff --git a/src/Stripe.net/Entities/GiftCards/GiftCard.cs b/src/Stripe.net/Entities/GiftCards/GiftCard.cs index 4d2d6c2785..58af2890ef 100644 --- a/src/Stripe.net/Entities/GiftCards/GiftCard.cs +++ b/src/Stripe.net/Entities/GiftCards/GiftCard.cs @@ -47,6 +47,14 @@ public class GiftCard : StripeEntity, IHasId, IHasObject [STJS.JsonPropertyName("exp_year")] public long? ExpYear { get; set; } + /// + /// Uniquely identifies this particular gift card number. You can use this attribute to + /// check whether two gift cards are the same. + /// + [JsonProperty("fingerprint")] + [STJS.JsonPropertyName("fingerprint")] + public string Fingerprint { get; set; } + #region Expandable LastOperation /// From 7d0dac6546be6edf7afc7d86f54336edae52be8d Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 12 Jun 2026 23:06:25 +0000 Subject: [PATCH 06/15] Update generated code for v2303 and 368e28dbde85e762b031f0eadf904591cfd86a7e --- CODEGEN_VERSION | 2 +- OPENAPI_VERSION | 2 +- ...rmationTokenPaymentMethodPreviewGiftCard.cs | 7 ------- .../PaymentMethods/PaymentMethodGiftCard.cs | 7 ------- ...GrantedTokenPaymentMethodDetailsGiftCard.cs | 7 ------- .../Checkout/Sessions/SessionCreateOptions.cs | 7 +++++++ .../Checkout/Sessions/SessionItemOptions.cs | 18 ++++++++++++++++++ 7 files changed, 27 insertions(+), 23 deletions(-) create mode 100644 src/Stripe.net/Services/Checkout/Sessions/SessionItemOptions.cs diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index 8f1b730c8b..67f43c3de6 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -c20e0e5333d06539a914faeb375b14916986233a \ No newline at end of file +368e28dbde85e762b031f0eadf904591cfd86a7e \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 8f7f7dd6fb..30c32b2577 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2301 \ No newline at end of file +v2303 \ No newline at end of file diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewGiftCard.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewGiftCard.cs index 6b7b379130..f191bf3fcd 100644 --- a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewGiftCard.cs +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewGiftCard.cs @@ -37,13 +37,6 @@ public class ConfirmationTokenPaymentMethodPreviewGiftCard : StripeEntity - /// The first six digits of the gift card number. - /// - [JsonProperty("first6")] - [STJS.JsonPropertyName("first6")] - public string First6 { get; set; } - /// /// The last four digits of the gift card number. /// diff --git a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodGiftCard.cs b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodGiftCard.cs index 907d2ff307..df542b9b74 100644 --- a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodGiftCard.cs +++ b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodGiftCard.cs @@ -37,13 +37,6 @@ public class PaymentMethodGiftCard : StripeEntity [STJS.JsonPropertyName("fingerprint")] public string Fingerprint { get; set; } - /// - /// The first six digits of the gift card number. - /// - [JsonProperty("first6")] - [STJS.JsonPropertyName("first6")] - public string First6 { get; set; } - /// /// The last four digits of the gift card number. /// diff --git a/src/Stripe.net/Entities/SharedPayment/GrantedTokens/GrantedTokenPaymentMethodDetailsGiftCard.cs b/src/Stripe.net/Entities/SharedPayment/GrantedTokens/GrantedTokenPaymentMethodDetailsGiftCard.cs index a6c1d7243e..e6fe8a15c2 100644 --- a/src/Stripe.net/Entities/SharedPayment/GrantedTokens/GrantedTokenPaymentMethodDetailsGiftCard.cs +++ b/src/Stripe.net/Entities/SharedPayment/GrantedTokens/GrantedTokenPaymentMethodDetailsGiftCard.cs @@ -37,13 +37,6 @@ public class GrantedTokenPaymentMethodDetailsGiftCard : StripeEntity - /// The first six digits of the gift card number. - /// - [JsonProperty("first6")] - [STJS.JsonPropertyName("first6")] - public string First6 { get; set; } - /// /// The last four digits of the gift card number. /// diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionCreateOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionCreateOptions.cs index 07bd9a3052..b65e0e9db8 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionCreateOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionCreateOptions.cs @@ -277,6 +277,13 @@ public class SessionCreateOptions : BaseOptions, IHasMetadata [STJS.JsonPropertyName("invoice_creation")] public SessionInvoiceCreationOptions InvoiceCreation { get; set; } + /// + /// A list of items the customer will purchase. + /// + [JsonProperty("items")] + [STJS.JsonPropertyName("items")] + public List Items { get; set; } + /// /// A list of items the customer is purchasing. Use this parameter to pass one-time or /// recurring Prices. The parameter is diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionItemOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionItemOptions.cs new file mode 100644 index 0000000000..54dcee75b0 --- /dev/null +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionItemOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.Checkout +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class SessionItemOptions : INestedOptions + { + /// + /// The type of item. + /// + [JsonProperty("type")] + [STJS.JsonPropertyName("type")] + public string Type { get; set; } + } +} From 9d99ae9f590f47fd44286fc66378ac0616395e57 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Sat, 13 Jun 2026 01:41:27 +0000 Subject: [PATCH 07/15] Update generated code for v2305 and c26e09541d712091b4cadc0d5fc3c08c5e21cd3d --- CODEGEN_VERSION | 2 +- OPENAPI_VERSION | 2 +- .../AccountSessionComponentsBillsFeatures.cs | 9 +++++++++ src/Stripe.net/Services/Refunds/RefundCreateOptions.cs | 7 +++++++ 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index 67f43c3de6..c751a1c388 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -368e28dbde85e762b031f0eadf904591cfd86a7e \ No newline at end of file +c26e09541d712091b4cadc0d5fc3c08c5e21cd3d \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 30c32b2577..33b3629ef8 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2303 \ No newline at end of file +v2305 \ No newline at end of file diff --git a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsBillsFeatures.cs b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsBillsFeatures.cs index 944e16a4a5..cfbd13bfdd 100644 --- a/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsBillsFeatures.cs +++ b/src/Stripe.net/Entities/AccountSessions/AccountSessionComponentsBillsFeatures.cs @@ -16,6 +16,15 @@ public class AccountSessionComponentsBillsFeatures : StripeEntity + /// Whether Stripe user authentication is disabled. This value can only be true for + /// accounts where controller.requirement_collection is application for the + /// account. This is false by default. + /// + [JsonProperty("disable_stripe_user_authentication")] + [STJS.JsonPropertyName("disable_stripe_user_authentication")] + public bool DisableStripeUserAuthentication { get; set; } + /// /// Whether to enable the send money feature that grants access to bill creation and /// payment. diff --git a/src/Stripe.net/Services/Refunds/RefundCreateOptions.cs b/src/Stripe.net/Services/Refunds/RefundCreateOptions.cs index b2898c0a2e..e8a9a2fe0e 100644 --- a/src/Stripe.net/Services/Refunds/RefundCreateOptions.cs +++ b/src/Stripe.net/Services/Refunds/RefundCreateOptions.cs @@ -72,6 +72,13 @@ public Dictionary Metadata [STJS.JsonPropertyName("origin")] public string Origin { get; set; } + /// + /// The identifier of the PaymentAttemptRecord to refund. + /// + [JsonProperty("payment_attempt_record")] + [STJS.JsonPropertyName("payment_attempt_record")] + public string PaymentAttemptRecord { get; set; } + /// /// The identifier of the PaymentIntent to refund. /// From ad49a2929979da265b006b2b160f9f66ed6ee0c8 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 15 Jun 2026 19:12:44 +0000 Subject: [PATCH 08/15] Update generated code for v2307 and cdaaf636cf151ac703fe3aa014b5ab6401a3cfaa --- CODEGEN_VERSION | 2 +- OPENAPI_VERSION | 2 +- .../Mandates/MandatePaymentMethodDetails.cs | 4 +++ .../MandatePaymentMethodDetailsBlik.cs | 29 +++++++++++++++++++ .../Services/Refunds/RefundListOptions.cs | 14 +++++++++ 5 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 src/Stripe.net/Entities/Mandates/MandatePaymentMethodDetailsBlik.cs diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index c751a1c388..d748ed7e6e 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -c26e09541d712091b4cadc0d5fc3c08c5e21cd3d \ No newline at end of file +cdaaf636cf151ac703fe3aa014b5ab6401a3cfaa \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 33b3629ef8..8deaca5013 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2305 \ No newline at end of file +v2307 \ No newline at end of file diff --git a/src/Stripe.net/Entities/Mandates/MandatePaymentMethodDetails.cs b/src/Stripe.net/Entities/Mandates/MandatePaymentMethodDetails.cs index 8fbb2ef7e0..b27970f788 100644 --- a/src/Stripe.net/Entities/Mandates/MandatePaymentMethodDetails.cs +++ b/src/Stripe.net/Entities/Mandates/MandatePaymentMethodDetails.cs @@ -24,6 +24,10 @@ public class MandatePaymentMethodDetails : StripeEntity + { + /// + /// Date at which the mandate expires. + /// + [JsonProperty("expires_after")] + [JsonConverter(typeof(UnixDateTimeConverter))] + [STJS.JsonPropertyName("expires_after")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] + public DateTime? ExpiresAfter { get; set; } + + /// + /// Type of the mandate. + /// One of: off_session, or on_session. + /// + [JsonProperty("type")] + [STJS.JsonPropertyName("type")] + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Services/Refunds/RefundListOptions.cs b/src/Stripe.net/Services/Refunds/RefundListOptions.cs index 6911e8c5ea..7e423709c7 100644 --- a/src/Stripe.net/Services/Refunds/RefundListOptions.cs +++ b/src/Stripe.net/Services/Refunds/RefundListOptions.cs @@ -25,11 +25,25 @@ public class RefundListOptions : ListOptions [STJS.JsonConverter(typeof(STJAnyOfConverter))] public AnyOf Created { get; set; } + /// + /// Only return refunds for the PaymentAttemptRecord specified by this ID. + /// + [JsonProperty("payment_attempt_record")] + [STJS.JsonPropertyName("payment_attempt_record")] + public string PaymentAttemptRecord { get; set; } + /// /// Only return refunds for the PaymentIntent specified by this ID. /// [JsonProperty("payment_intent")] [STJS.JsonPropertyName("payment_intent")] public string PaymentIntent { get; set; } + + /// + /// Only return refunds for the PaymentRecord specified by this ID. + /// + [JsonProperty("payment_record")] + [STJS.JsonPropertyName("payment_record")] + public string PaymentRecord { get; set; } } } From beaad9bcd30e5cead359fcf521115ba3ce2421b0 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 15 Jun 2026 22:53:45 +0000 Subject: [PATCH 09/15] Update generated code for v2309 and dbad6fd3f98cb69a53ab27765bb6ca9234750adb --- CODEGEN_VERSION | 2 +- OPENAPI_VERSION | 2 +- .../ChargePaymentMethodDetailsCardAccountFunding.cs | 11 +++++------ .../PaymentAttemptRecordReportRefundOptions.cs | 1 + .../PaymentRecordReportRefundOptions.cs | 1 + 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index d748ed7e6e..8ee2bcc7dc 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -cdaaf636cf151ac703fe3aa014b5ab6401a3cfaa \ No newline at end of file +dbad6fd3f98cb69a53ab27765bb6ca9234750adb \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 8deaca5013..e2ff024cf8 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2307 \ No newline at end of file +v2309 \ No newline at end of file diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardAccountFunding.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardAccountFunding.cs index 589aa7ce8a..1b4a79f9fe 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardAccountFunding.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsCardAccountFunding.cs @@ -9,12 +9,11 @@ namespace Stripe public class ChargePaymentMethodDetailsCardAccountFunding : StripeEntity { /// - /// The transaction type of the card transaction. One of account_funding or - /// purchase. - /// One of: account_funding, or purchase. + /// Indicates whether or not this charge is a funding transaction. + /// One of: disabled, or enabled. /// - [JsonProperty("processed_transaction_type")] - [STJS.JsonPropertyName("processed_transaction_type")] - public string ProcessedTransactionType { get; set; } + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentAttemptRecords/PaymentAttemptRecordReportRefundOptions.cs b/src/Stripe.net/Services/PaymentAttemptRecords/PaymentAttemptRecordReportRefundOptions.cs index 9dbe80b894..2a29a54d35 100644 --- a/src/Stripe.net/Services/PaymentAttemptRecords/PaymentAttemptRecordReportRefundOptions.cs +++ b/src/Stripe.net/Services/PaymentAttemptRecords/PaymentAttemptRecordReportRefundOptions.cs @@ -52,6 +52,7 @@ public Dictionary Metadata /// /// The outcome of the reported refund. + /// One of: failed, or refunded. /// [JsonProperty("outcome")] [STJS.JsonPropertyName("outcome")] diff --git a/src/Stripe.net/Services/PaymentRecords/PaymentRecordReportRefundOptions.cs b/src/Stripe.net/Services/PaymentRecords/PaymentRecordReportRefundOptions.cs index 9c2fa7b908..8b9343b3d9 100644 --- a/src/Stripe.net/Services/PaymentRecords/PaymentRecordReportRefundOptions.cs +++ b/src/Stripe.net/Services/PaymentRecords/PaymentRecordReportRefundOptions.cs @@ -52,6 +52,7 @@ public Dictionary Metadata /// /// The outcome of the reported refund. + /// One of: failed, or refunded. /// [JsonProperty("outcome")] [STJS.JsonPropertyName("outcome")] From 54d1c626becc69351f4b147dcc20e903635603da Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 16 Jun 2026 00:29:48 +0000 Subject: [PATCH 10/15] Update generated code for v2310 and fcc6f448e0f2cf3352ae49d4484a2ca8970003e1 --- CODEGEN_VERSION | 2 +- OPENAPI_VERSION | 2 +- .../PaymentAttemptRecordReportRefundOptions.cs | 7 +++++++ .../PaymentRecords/PaymentRecordReportRefundOptions.cs | 7 +++++++ 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index 8ee2bcc7dc..91b186ddd3 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -dbad6fd3f98cb69a53ab27765bb6ca9234750adb \ No newline at end of file +fcc6f448e0f2cf3352ae49d4484a2ca8970003e1 \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index e2ff024cf8..0ffbee3386 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2309 \ No newline at end of file +v2310 \ No newline at end of file diff --git a/src/Stripe.net/Services/PaymentAttemptRecords/PaymentAttemptRecordReportRefundOptions.cs b/src/Stripe.net/Services/PaymentAttemptRecords/PaymentAttemptRecordReportRefundOptions.cs index 2a29a54d35..06b6352929 100644 --- a/src/Stripe.net/Services/PaymentAttemptRecords/PaymentAttemptRecordReportRefundOptions.cs +++ b/src/Stripe.net/Services/PaymentAttemptRecords/PaymentAttemptRecordReportRefundOptions.cs @@ -65,6 +65,13 @@ public Dictionary Metadata [STJS.JsonPropertyName("processor_details")] public PaymentAttemptRecordProcessorDetailsOptions ProcessorDetails { get; set; } + /// + /// A key to group refunds together. + /// + [JsonProperty("refund_group")] + [STJS.JsonPropertyName("refund_group")] + public string RefundGroup { get; set; } + /// /// Information about the payment attempt refund. /// diff --git a/src/Stripe.net/Services/PaymentRecords/PaymentRecordReportRefundOptions.cs b/src/Stripe.net/Services/PaymentRecords/PaymentRecordReportRefundOptions.cs index 8b9343b3d9..67929fd21e 100644 --- a/src/Stripe.net/Services/PaymentRecords/PaymentRecordReportRefundOptions.cs +++ b/src/Stripe.net/Services/PaymentRecords/PaymentRecordReportRefundOptions.cs @@ -65,6 +65,13 @@ public Dictionary Metadata [STJS.JsonPropertyName("processor_details")] public PaymentRecordProcessorDetailsOptions ProcessorDetails { get; set; } + /// + /// A key to group refunds together. + /// + [JsonProperty("refund_group")] + [STJS.JsonPropertyName("refund_group")] + public string RefundGroup { get; set; } + /// /// Information about the payment attempt refund. /// From d9cb908ce0664501ebbfc8de67d55f07c8ba0305 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 16 Jun 2026 01:04:49 +0000 Subject: [PATCH 11/15] Update generated code for v2310 and 4d4151efb9cfbfd5a1d78638f6f205591eb765a9 --- CODEGEN_VERSION | 2 +- .../Services/GeneratedExamplesTest.cs | 22505 ++++++++++++++-- 2 files changed, 19728 insertions(+), 2779 deletions(-) diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index 91b186ddd3..d9307928d0 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -fcc6f448e0f2cf3352ae49d4484a2ca8970003e1 \ No newline at end of file +4d4151efb9cfbfd5a1d78638f6f205591eb765a9 \ No newline at end of file diff --git a/src/StripeTests/Services/GeneratedExamplesTest.cs b/src/StripeTests/Services/GeneratedExamplesTest.cs index 8cf8e820f4..dd41bc2251 100644 --- a/src/StripeTests/Services/GeneratedExamplesTest.cs +++ b/src/StripeTests/Services/GeneratedExamplesTest.cs @@ -34,6 +34,21 @@ public void TestAccountLinksPost() this.AssertRequest(HttpMethod.Post, "/v1/account_links"); } + [Fact] + public async Task TestAccountLinksPostAsync() + { + var options = new AccountLinkCreateOptions + { + Account = "acct_xxxxxxxxxxxxx", + RefreshUrl = "https://example.com/reauth", + ReturnUrl = "https://example.com/return", + Type = "account_onboarding", + }; + var service = new AccountLinkService(this.StripeClient); + AccountLink accountLink = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/account_links"); + } + [Fact] public void TestAccountsCapabilitiesGet() { @@ -45,6 +60,17 @@ public void TestAccountsCapabilitiesGet() "/v1/accounts/acct_xxxxxxxxxxxxx/capabilities"); } + [Fact] + public async Task TestAccountsCapabilitiesGetAsync() + { + var service = new AccountCapabilityService(this.StripeClient); + StripeList capabilities = await service.ListAsync( + "acct_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/accounts/acct_xxxxxxxxxxxxx/capabilities"); + } + [Fact] public void TestAccountsCapabilitiesGet2() { @@ -57,6 +83,18 @@ public void TestAccountsCapabilitiesGet2() "/v1/accounts/acct_xxxxxxxxxxxxx/capabilities/card_payments"); } + [Fact] + public async Task TestAccountsCapabilitiesGet2Async() + { + var service = new AccountCapabilityService(this.StripeClient); + Capability capability = await service.GetAsync( + "acct_xxxxxxxxxxxxx", + "card_payments"); + this.AssertRequest( + HttpMethod.Get, + "/v1/accounts/acct_xxxxxxxxxxxxx/capabilities/card_payments"); + } + [Fact] public void TestAccountsCapabilitiesPost() { @@ -74,6 +112,23 @@ public void TestAccountsCapabilitiesPost() "/v1/accounts/acct_xxxxxxxxxxxxx/capabilities/card_payments"); } + [Fact] + public async Task TestAccountsCapabilitiesPostAsync() + { + var options = new AccountCapabilityUpdateOptions + { + Requested = true, + }; + var service = new AccountCapabilityService(this.StripeClient); + Capability capability = await service.UpdateAsync( + "acct_xxxxxxxxxxxxx", + "card_payments", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/accounts/acct_xxxxxxxxxxxxx/capabilities/card_payments"); + } + [Fact] public void TestAccountsDelete() { @@ -84,6 +139,16 @@ public void TestAccountsDelete() "/v1/accounts/acct_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestAccountsDeleteAsync() + { + var service = new AccountService(this.StripeClient); + Account deleted = await service.DeleteAsync("acct_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Delete, + "/v1/accounts/acct_xxxxxxxxxxxxx"); + } + [Fact] public void TestAccountsGet() { @@ -93,6 +158,34 @@ public void TestAccountsGet() this.AssertRequest(HttpMethod.Get, "/v1/accounts", "limit=3"); } + [Fact] + public async Task TestAccountsGetAsync() + { + var options = new AccountListOptions { Limit = 3 }; + var service = new AccountService(this.StripeClient); + StripeList accounts = await service.ListAsync(options); + this.AssertRequest(HttpMethod.Get, "/v1/accounts", "limit=3"); + } + + [Fact] + public void TestAccountsGetAutoPaging() + { + var options = new AccountListOptions { Limit = 3 }; + var service = new AccountService(this.StripeClient); + var account = service.ListAutoPaging(options).First(); + this.AssertRequest(HttpMethod.Get, "/v1/accounts", "limit=3"); + } + + [Fact] + public async Task TestAccountsGetAutoPagingAsync() + { + var options = new AccountListOptions { Limit = 3 }; + var service = new AccountService(this.StripeClient); + var account = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/accounts", "limit=3"); + } + [Fact] public void TestAccountsGet2() { @@ -103,6 +196,16 @@ public void TestAccountsGet2() "/v1/accounts/acct_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestAccountsGet2Async() + { + var service = new AccountService(this.StripeClient); + Account account = await service.GetAsync("acct_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/accounts/acct_xxxxxxxxxxxxx"); + } + [Fact] public void TestAccountsLoginLinksPost() { @@ -113,6 +216,17 @@ public void TestAccountsLoginLinksPost() "/v1/accounts/acct_xxxxxxxxxxxxx/login_links"); } + [Fact] + public async Task TestAccountsLoginLinksPostAsync() + { + var service = new AccountLoginLinkService(this.StripeClient); + LoginLink loginLink = await service.CreateAsync( + "acct_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/accounts/acct_xxxxxxxxxxxxx/login_links"); + } + [Fact] public void TestAccountsPersonsDelete() { @@ -125,6 +239,18 @@ public void TestAccountsPersonsDelete() "/v1/accounts/acct_xxxxxxxxxxxxx/persons/person_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestAccountsPersonsDeleteAsync() + { + var service = new AccountPersonService(this.StripeClient); + Person deleted = await service.DeleteAsync( + "acct_xxxxxxxxxxxxx", + "person_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Delete, + "/v1/accounts/acct_xxxxxxxxxxxxx/persons/person_xxxxxxxxxxxxx"); + } + [Fact] public void TestAccountsPersonsGet() { @@ -139,6 +265,48 @@ public void TestAccountsPersonsGet() "limit=3"); } + [Fact] + public async Task TestAccountsPersonsGetAsync() + { + var options = new AccountPersonListOptions { Limit = 3 }; + var service = new AccountPersonService(this.StripeClient); + StripeList persons = await service.ListAsync( + "acct_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Get, + "/v1/accounts/acct_xxxxxxxxxxxxx/persons", + "limit=3"); + } + + [Fact] + public void TestAccountsPersonsGetAutoPaging() + { + var options = new AccountPersonListOptions { Limit = 3 }; + var service = new AccountPersonService(this.StripeClient); + var person = service.ListAutoPaging("acct_xxxxxxxxxxxxx", options) + .First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/accounts/acct_xxxxxxxxxxxxx/persons", + "limit=3"); + } + + [Fact] + public async Task TestAccountsPersonsGetAutoPagingAsync() + { + var options = new AccountPersonListOptions { Limit = 3 }; + var service = new AccountPersonService(this.StripeClient); + var person = await service.ListAutoPagingAsync( + "acct_xxxxxxxxxxxxx", + options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/accounts/acct_xxxxxxxxxxxxx/persons", + "limit=3"); + } + [Fact] public void TestAccountsPersonsGet2() { @@ -151,6 +319,18 @@ public void TestAccountsPersonsGet2() "/v1/accounts/acct_xxxxxxxxxxxxx/persons/person_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestAccountsPersonsGet2Async() + { + var service = new AccountPersonService(this.StripeClient); + Person person = await service.GetAsync( + "acct_xxxxxxxxxxxxx", + "person_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/accounts/acct_xxxxxxxxxxxxx/persons/person_xxxxxxxxxxxxx"); + } + [Fact] public void TestAccountsPersonsPost() { @@ -166,6 +346,23 @@ public void TestAccountsPersonsPost() "/v1/accounts/acct_xxxxxxxxxxxxx/persons"); } + [Fact] + public async Task TestAccountsPersonsPostAsync() + { + var options = new AccountPersonCreateOptions + { + FirstName = "Jane", + LastName = "Diaz", + }; + var service = new AccountPersonService(this.StripeClient); + Person person = await service.CreateAsync( + "acct_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/accounts/acct_xxxxxxxxxxxxx/persons"); + } + [Fact] public void TestAccountsPersonsPost2() { @@ -186,6 +383,26 @@ public void TestAccountsPersonsPost2() "/v1/accounts/acct_xxxxxxxxxxxxx/persons/person_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestAccountsPersonsPost2Async() + { + var options = new AccountPersonUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new AccountPersonService(this.StripeClient); + Person person = await service.UpdateAsync( + "acct_xxxxxxxxxxxxx", + "person_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/accounts/acct_xxxxxxxxxxxxx/persons/person_xxxxxxxxxxxxx"); + } + [Fact] public void TestAccountsPost() { @@ -211,6 +428,31 @@ public void TestAccountsPost() this.AssertRequest(HttpMethod.Post, "/v1/accounts"); } + [Fact] + public async Task TestAccountsPostAsync() + { + var options = new AccountCreateOptions + { + Type = "custom", + Country = "US", + Email = "jenny.rosen@example.com", + Capabilities = new AccountCapabilitiesOptions + { + CardPayments = new AccountCapabilitiesCardPaymentsOptions + { + Requested = true, + }, + Transfers = new AccountCapabilitiesTransfersOptions + { + Requested = true, + }, + }, + }; + var service = new AccountService(this.StripeClient); + Account account = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/accounts"); + } + [Fact] public void TestAccountsPost2() { @@ -228,6 +470,25 @@ public void TestAccountsPost2() "/v1/accounts/acct_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestAccountsPost2Async() + { + var options = new AccountUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new AccountService(this.StripeClient); + Account account = await service.UpdateAsync( + "acct_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/accounts/acct_xxxxxxxxxxxxx"); + } + [Fact] public void TestAccountsRejectPost() { @@ -239,6 +500,19 @@ public void TestAccountsRejectPost() "/v1/accounts/acct_xxxxxxxxxxxxx/reject"); } + [Fact] + public async Task TestAccountsRejectPostAsync() + { + var options = new AccountRejectOptions { Reason = "fraud" }; + var service = new AccountService(this.StripeClient); + Account account = await service.RejectAsync( + "acct_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/accounts/acct_xxxxxxxxxxxxx/reject"); + } + [Fact] public void TestApplicationFeesGet() { @@ -252,42 +526,146 @@ public void TestApplicationFeesGet() } [Fact] - public void TestApplicationFeesGet2() + public async Task TestApplicationFeesGetAsync() { + var options = new ApplicationFeeListOptions { Limit = 3 }; var service = new ApplicationFeeService(this.StripeClient); - ApplicationFee applicationFee = service.Get("fee_xxxxxxxxxxxxx"); + StripeList applicationFees = await service + .ListAsync(options); this.AssertRequest( HttpMethod.Get, - "/v1/application_fees/fee_xxxxxxxxxxxxx"); + "/v1/application_fees", + "limit=3"); } [Fact] - public void TestApplicationFeesRefundsGet() + public void TestApplicationFeesGetAutoPaging() { - var options = new ApplicationFeeRefundListOptions { Limit = 3 }; - var service = new ApplicationFeeRefundService(this.StripeClient); - StripeList applicationFeeRefunds = service - .List("fee_xxxxxxxxxxxxx", options); + var options = new ApplicationFeeListOptions { Limit = 3 }; + var service = new ApplicationFeeService(this.StripeClient); + var applicationFee = service.ListAutoPaging(options).First(); this.AssertRequest( HttpMethod.Get, - "/v1/application_fees/fee_xxxxxxxxxxxxx/refunds", + "/v1/application_fees", "limit=3"); } [Fact] - public void TestApplicationFeesRefundsGet2() + public async Task TestApplicationFeesGetAutoPagingAsync() { - var service = new ApplicationFeeRefundService(this.StripeClient); - ApplicationFeeRefund applicationFeeRefund = service.Get( - "fee_xxxxxxxxxxxxx", - "fr_xxxxxxxxxxxxx"); + var options = new ApplicationFeeListOptions { Limit = 3 }; + var service = new ApplicationFeeService(this.StripeClient); + var applicationFee = await service.ListAutoPagingAsync(options) + .FirstAsync(); this.AssertRequest( HttpMethod.Get, - "/v1/application_fees/fee_xxxxxxxxxxxxx/refunds/fr_xxxxxxxxxxxxx"); + "/v1/application_fees", + "limit=3"); } [Fact] - public void TestApplicationFeesRefundsPost() + public void TestApplicationFeesGet2() + { + var service = new ApplicationFeeService(this.StripeClient); + ApplicationFee applicationFee = service.Get("fee_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/application_fees/fee_xxxxxxxxxxxxx"); + } + + [Fact] + public async Task TestApplicationFeesGet2Async() + { + var service = new ApplicationFeeService(this.StripeClient); + ApplicationFee applicationFee = await service.GetAsync( + "fee_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/application_fees/fee_xxxxxxxxxxxxx"); + } + + [Fact] + public void TestApplicationFeesRefundsGet() + { + var options = new ApplicationFeeRefundListOptions { Limit = 3 }; + var service = new ApplicationFeeRefundService(this.StripeClient); + StripeList applicationFeeRefunds = service + .List("fee_xxxxxxxxxxxxx", options); + this.AssertRequest( + HttpMethod.Get, + "/v1/application_fees/fee_xxxxxxxxxxxxx/refunds", + "limit=3"); + } + + [Fact] + public async Task TestApplicationFeesRefundsGetAsync() + { + var options = new ApplicationFeeRefundListOptions { Limit = 3 }; + var service = new ApplicationFeeRefundService(this.StripeClient); + StripeList applicationFeeRefunds = await service + .ListAsync("fee_xxxxxxxxxxxxx", options); + this.AssertRequest( + HttpMethod.Get, + "/v1/application_fees/fee_xxxxxxxxxxxxx/refunds", + "limit=3"); + } + + [Fact] + public void TestApplicationFeesRefundsGetAutoPaging() + { + var options = new ApplicationFeeRefundListOptions { Limit = 3 }; + var service = new ApplicationFeeRefundService(this.StripeClient); + var applicationFeeRefund = service.ListAutoPaging( + "fee_xxxxxxxxxxxxx", + options) + .First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/application_fees/fee_xxxxxxxxxxxxx/refunds", + "limit=3"); + } + + [Fact] + public async Task TestApplicationFeesRefundsGetAutoPagingAsync() + { + var options = new ApplicationFeeRefundListOptions { Limit = 3 }; + var service = new ApplicationFeeRefundService(this.StripeClient); + var applicationFeeRefund = await service.ListAutoPagingAsync( + "fee_xxxxxxxxxxxxx", + options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/application_fees/fee_xxxxxxxxxxxxx/refunds", + "limit=3"); + } + + [Fact] + public void TestApplicationFeesRefundsGet2() + { + var service = new ApplicationFeeRefundService(this.StripeClient); + ApplicationFeeRefund applicationFeeRefund = service.Get( + "fee_xxxxxxxxxxxxx", + "fr_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/application_fees/fee_xxxxxxxxxxxxx/refunds/fr_xxxxxxxxxxxxx"); + } + + [Fact] + public async Task TestApplicationFeesRefundsGet2Async() + { + var service = new ApplicationFeeRefundService(this.StripeClient); + ApplicationFeeRefund applicationFeeRefund = await service.GetAsync( + "fee_xxxxxxxxxxxxx", + "fr_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/application_fees/fee_xxxxxxxxxxxxx/refunds/fr_xxxxxxxxxxxxx"); + } + + [Fact] + public void TestApplicationFeesRefundsPost() { var service = new ApplicationFeeRefundService(this.StripeClient); ApplicationFeeRefund applicationFeeRefund = service.Create( @@ -297,6 +675,17 @@ public void TestApplicationFeesRefundsPost() "/v1/application_fees/fee_xxxxxxxxxxxxx/refunds"); } + [Fact] + public async Task TestApplicationFeesRefundsPostAsync() + { + var service = new ApplicationFeeRefundService(this.StripeClient); + ApplicationFeeRefund applicationFeeRefund = await service + .CreateAsync("fee_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/application_fees/fee_xxxxxxxxxxxxx/refunds"); + } + [Fact] public void TestApplicationFeesRefundsPost2() { @@ -317,6 +706,24 @@ public void TestApplicationFeesRefundsPost2() "/v1/application_fees/fee_xxxxxxxxxxxxx/refunds/fr_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestApplicationFeesRefundsPost2Async() + { + var options = new ApplicationFeeRefundUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new ApplicationFeeRefundService(this.StripeClient); + ApplicationFeeRefund applicationFeeRefund = await service + .UpdateAsync("fee_xxxxxxxxxxxxx", "fr_xxxxxxxxxxxxx", options); + this.AssertRequest( + HttpMethod.Post, + "/v1/application_fees/fee_xxxxxxxxxxxxx/refunds/fr_xxxxxxxxxxxxx"); + } + [Fact] public void TestAppsSecretsDeletePost() { @@ -330,6 +737,19 @@ public void TestAppsSecretsDeletePost() this.AssertRequest(HttpMethod.Post, "/v1/apps/secrets/delete"); } + [Fact] + public async Task TestAppsSecretsDeletePostAsync() + { + var options = new Stripe.Apps.SecretDeleteWhereOptions + { + Name = "my-api-key", + Scope = new Stripe.Apps.SecretScopeOptions { Type = "account" }, + }; + var service = new Stripe.Apps.SecretService(this.StripeClient); + Stripe.Apps.Secret secret = await service.DeleteWhereAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/apps/secrets/delete"); + } + [Fact] public void TestAppsSecretsFindGet() { @@ -346,6 +766,22 @@ public void TestAppsSecretsFindGet() "name=sec_123&scope[type]=account"); } + [Fact] + public async Task TestAppsSecretsFindGetAsync() + { + var options = new Stripe.Apps.SecretFindOptions + { + Name = "sec_123", + Scope = new Stripe.Apps.SecretScopeOptions { Type = "account" }, + }; + var service = new Stripe.Apps.SecretService(this.StripeClient); + Stripe.Apps.Secret secret = await service.FindAsync(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/apps/secrets/find", + "name=sec_123&scope[type]=account"); + } + [Fact] public void TestAppsSecretsGet() { @@ -362,6 +798,56 @@ public void TestAppsSecretsGet() "scope[type]=account&limit=2"); } + [Fact] + public async Task TestAppsSecretsGetAsync() + { + var options = new Stripe.Apps.SecretListOptions + { + Scope = new Stripe.Apps.SecretScopeOptions { Type = "account" }, + Limit = 2, + }; + var service = new Stripe.Apps.SecretService(this.StripeClient); + StripeList secrets = await service.ListAsync( + options); + this.AssertRequest( + HttpMethod.Get, + "/v1/apps/secrets", + "scope[type]=account&limit=2"); + } + + [Fact] + public void TestAppsSecretsGetAutoPaging() + { + var options = new Stripe.Apps.SecretListOptions + { + Scope = new Stripe.Apps.SecretScopeOptions { Type = "account" }, + Limit = 2, + }; + var service = new Stripe.Apps.SecretService(this.StripeClient); + var secret = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/apps/secrets", + "scope[type]=account&limit=2"); + } + + [Fact] + public async Task TestAppsSecretsGetAutoPagingAsync() + { + var options = new Stripe.Apps.SecretListOptions + { + Scope = new Stripe.Apps.SecretScopeOptions { Type = "account" }, + Limit = 2, + }; + var service = new Stripe.Apps.SecretService(this.StripeClient); + var secret = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/apps/secrets", + "scope[type]=account&limit=2"); + } + [Fact] public void TestAppsSecretsGet2() { @@ -378,6 +864,56 @@ public void TestAppsSecretsGet2() "scope[type]=account&limit=2"); } + [Fact] + public async Task TestAppsSecretsGet2Async() + { + var options = new Stripe.Apps.SecretListOptions + { + Scope = new Stripe.Apps.SecretScopeOptions { Type = "account" }, + Limit = 2, + }; + var service = new Stripe.Apps.SecretService(this.StripeClient); + StripeList secrets = await service.ListAsync( + options); + this.AssertRequest( + HttpMethod.Get, + "/v1/apps/secrets", + "scope[type]=account&limit=2"); + } + + [Fact] + public void TestAppsSecretsGet2AutoPaging() + { + var options = new Stripe.Apps.SecretListOptions + { + Scope = new Stripe.Apps.SecretScopeOptions { Type = "account" }, + Limit = 2, + }; + var service = new Stripe.Apps.SecretService(this.StripeClient); + var secret = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/apps/secrets", + "scope[type]=account&limit=2"); + } + + [Fact] + public async Task TestAppsSecretsGet2AutoPagingAsync() + { + var options = new Stripe.Apps.SecretListOptions + { + Scope = new Stripe.Apps.SecretScopeOptions { Type = "account" }, + Limit = 2, + }; + var service = new Stripe.Apps.SecretService(this.StripeClient); + var secret = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/apps/secrets", + "scope[type]=account&limit=2"); + } + [Fact] public void TestAppsSecretsPost() { @@ -392,6 +928,20 @@ public void TestAppsSecretsPost() this.AssertRequest(HttpMethod.Post, "/v1/apps/secrets"); } + [Fact] + public async Task TestAppsSecretsPostAsync() + { + var options = new Stripe.Apps.SecretCreateOptions + { + Name = "sec_123", + Payload = "very secret string", + Scope = new Stripe.Apps.SecretScopeOptions { Type = "account" }, + }; + var service = new Stripe.Apps.SecretService(this.StripeClient); + Stripe.Apps.Secret secret = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/apps/secrets"); + } + [Fact] public void TestAppsSecretsPost2() { @@ -406,6 +956,20 @@ public void TestAppsSecretsPost2() this.AssertRequest(HttpMethod.Post, "/v1/apps/secrets"); } + [Fact] + public async Task TestAppsSecretsPost2Async() + { + var options = new Stripe.Apps.SecretCreateOptions + { + Name = "my-api-key", + Payload = "secret_key_xxxxxx", + Scope = new Stripe.Apps.SecretScopeOptions { Type = "account" }, + }; + var service = new Stripe.Apps.SecretService(this.StripeClient); + Stripe.Apps.Secret secret = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/apps/secrets"); + } + [Fact] public void TestBalanceTransactionsGet() { @@ -420,22 +984,71 @@ public void TestBalanceTransactionsGet() } [Fact] - public void TestBalanceTransactionsGet2() + public async Task TestBalanceTransactionsGetAsync() { + var options = new BalanceTransactionListOptions { Limit = 3 }; var service = new BalanceTransactionService(this.StripeClient); - BalanceTransaction balanceTransaction = service.Get( - "txn_xxxxxxxxxxxxx"); + StripeList balanceTransactions = await service + .ListAsync(options); this.AssertRequest( HttpMethod.Get, - "/v1/balance_transactions/txn_xxxxxxxxxxxxx"); + "/v1/balance_transactions", + "limit=3"); } [Fact] - public void TestBillingPortalConfigurationsGet() + public void TestBalanceTransactionsGetAutoPaging() { - var options = new Stripe.BillingPortal.ConfigurationListOptions - { - Limit = 3, + var options = new BalanceTransactionListOptions { Limit = 3 }; + var service = new BalanceTransactionService(this.StripeClient); + var balanceTransaction = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/balance_transactions", + "limit=3"); + } + + [Fact] + public async Task TestBalanceTransactionsGetAutoPagingAsync() + { + var options = new BalanceTransactionListOptions { Limit = 3 }; + var service = new BalanceTransactionService(this.StripeClient); + var balanceTransaction = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/balance_transactions", + "limit=3"); + } + + [Fact] + public void TestBalanceTransactionsGet2() + { + var service = new BalanceTransactionService(this.StripeClient); + BalanceTransaction balanceTransaction = service.Get( + "txn_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/balance_transactions/txn_xxxxxxxxxxxxx"); + } + + [Fact] + public async Task TestBalanceTransactionsGet2Async() + { + var service = new BalanceTransactionService(this.StripeClient); + BalanceTransaction balanceTransaction = await service.GetAsync( + "txn_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/balance_transactions/txn_xxxxxxxxxxxxx"); + } + + [Fact] + public void TestBillingPortalConfigurationsGet() + { + var options = new Stripe.BillingPortal.ConfigurationListOptions + { + Limit = 3, }; var service = new Stripe.BillingPortal.ConfigurationService( this.StripeClient); @@ -447,6 +1060,56 @@ public void TestBillingPortalConfigurationsGet() "limit=3"); } + [Fact] + public async Task TestBillingPortalConfigurationsGetAsync() + { + var options = new Stripe.BillingPortal.ConfigurationListOptions + { + Limit = 3, + }; + var service = new Stripe.BillingPortal.ConfigurationService( + this.StripeClient); + StripeList configurations = await service + .ListAsync(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/billing_portal/configurations", + "limit=3"); + } + + [Fact] + public void TestBillingPortalConfigurationsGetAutoPaging() + { + var options = new Stripe.BillingPortal.ConfigurationListOptions + { + Limit = 3, + }; + var service = new Stripe.BillingPortal.ConfigurationService( + this.StripeClient); + var configuration = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/billing_portal/configurations", + "limit=3"); + } + + [Fact] + public async Task TestBillingPortalConfigurationsGetAutoPagingAsync() + { + var options = new Stripe.BillingPortal.ConfigurationListOptions + { + Limit = 3, + }; + var service = new Stripe.BillingPortal.ConfigurationService( + this.StripeClient); + var configuration = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/billing_portal/configurations", + "limit=3"); + } + [Fact] public void TestBillingPortalConfigurationsGet2() { @@ -459,6 +1122,18 @@ public void TestBillingPortalConfigurationsGet2() "/v1/billing_portal/configurations/bpc_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestBillingPortalConfigurationsGet2Async() + { + var service = new Stripe.BillingPortal.ConfigurationService( + this.StripeClient); + Stripe.BillingPortal.Configuration configuration = await service + .GetAsync("bpc_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/billing_portal/configurations/bpc_xxxxxxxxxxxxx"); + } + [Fact] public void TestBillingPortalConfigurationsPost() { @@ -491,6 +1166,38 @@ public void TestBillingPortalConfigurationsPost() "/v1/billing_portal/configurations"); } + [Fact] + public async Task TestBillingPortalConfigurationsPostAsync() + { + var options = new Stripe.BillingPortal.ConfigurationCreateOptions + { + Features = new Stripe.BillingPortal.ConfigurationFeaturesOptions + { + CustomerUpdate = new Stripe.BillingPortal.ConfigurationFeaturesCustomerUpdateOptions + { + AllowedUpdates = new List { "email", "tax_id" }, + Enabled = true, + }, + InvoiceHistory = new Stripe.BillingPortal.ConfigurationFeaturesInvoiceHistoryOptions + { + Enabled = true, + }, + }, + BusinessProfile = new Stripe.BillingPortal.ConfigurationBusinessProfileOptions + { + PrivacyPolicyUrl = "https://example.com/privacy", + TermsOfServiceUrl = "https://example.com/terms", + }, + }; + var service = new Stripe.BillingPortal.ConfigurationService( + this.StripeClient); + Stripe.BillingPortal.Configuration configuration = await service + .CreateAsync(options); + this.AssertRequest( + HttpMethod.Post, + "/v1/billing_portal/configurations"); + } + [Fact] public void TestBillingPortalConfigurationsPost2() { @@ -512,6 +1219,26 @@ public void TestBillingPortalConfigurationsPost2() "/v1/billing_portal/configurations/bpc_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestBillingPortalConfigurationsPost2Async() + { + var options = new Stripe.BillingPortal.ConfigurationUpdateOptions + { + BusinessProfile = new Stripe.BillingPortal.ConfigurationBusinessProfileOptions + { + PrivacyPolicyUrl = "https://example.com/privacy", + TermsOfServiceUrl = "https://example.com/terms", + }, + }; + var service = new Stripe.BillingPortal.ConfigurationService( + this.StripeClient); + Stripe.BillingPortal.Configuration configuration = await service + .UpdateAsync("bpc_xxxxxxxxxxxxx", options); + this.AssertRequest( + HttpMethod.Post, + "/v1/billing_portal/configurations/bpc_xxxxxxxxxxxxx"); + } + [Fact] public void TestBillingPortalSessionsPost() { @@ -526,6 +1253,21 @@ public void TestBillingPortalSessionsPost() this.AssertRequest(HttpMethod.Post, "/v1/billing_portal/sessions"); } + [Fact] + public async Task TestBillingPortalSessionsPostAsync() + { + var options = new Stripe.BillingPortal.SessionCreateOptions + { + Customer = "cus_xxxxxxxxxxxxx", + ReturnUrl = "https://example.com/account", + }; + var service = new Stripe.BillingPortal.SessionService( + this.StripeClient); + Stripe.BillingPortal.Session session = await service.CreateAsync( + options); + this.AssertRequest(HttpMethod.Post, "/v1/billing_portal/sessions"); + } + [Fact] public void TestChargesCapturePost() { @@ -536,6 +1278,16 @@ public void TestChargesCapturePost() "/v1/charges/ch_xxxxxxxxxxxxx/capture"); } + [Fact] + public async Task TestChargesCapturePostAsync() + { + var service = new ChargeService(this.StripeClient); + Charge charge = await service.CaptureAsync("ch_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/charges/ch_xxxxxxxxxxxxx/capture"); + } + [Fact] public void TestChargesGet() { @@ -545,6 +1297,34 @@ public void TestChargesGet() this.AssertRequest(HttpMethod.Get, "/v1/charges", "limit=3"); } + [Fact] + public async Task TestChargesGetAsync() + { + var options = new ChargeListOptions { Limit = 3 }; + var service = new ChargeService(this.StripeClient); + StripeList charges = await service.ListAsync(options); + this.AssertRequest(HttpMethod.Get, "/v1/charges", "limit=3"); + } + + [Fact] + public void TestChargesGetAutoPaging() + { + var options = new ChargeListOptions { Limit = 3 }; + var service = new ChargeService(this.StripeClient); + var charge = service.ListAutoPaging(options).First(); + this.AssertRequest(HttpMethod.Get, "/v1/charges", "limit=3"); + } + + [Fact] + public async Task TestChargesGetAutoPagingAsync() + { + var options = new ChargeListOptions { Limit = 3 }; + var service = new ChargeService(this.StripeClient); + var charge = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/charges", "limit=3"); + } + [Fact] public void TestChargesGet2() { @@ -553,6 +1333,14 @@ public void TestChargesGet2() this.AssertRequest(HttpMethod.Get, "/v1/charges/ch_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestChargesGet2Async() + { + var service = new ChargeService(this.StripeClient); + Charge charge = await service.GetAsync("ch_xxxxxxxxxxxxx"); + this.AssertRequest(HttpMethod.Get, "/v1/charges/ch_xxxxxxxxxxxxx"); + } + [Fact] public void TestChargesPost() { @@ -568,6 +1356,21 @@ public void TestChargesPost() this.AssertRequest(HttpMethod.Post, "/v1/charges"); } + [Fact] + public async Task TestChargesPostAsync() + { + var options = new ChargeCreateOptions + { + Amount = 2000, + Currency = "usd", + Source = "tok_xxxx", + Description = "My First Test Charge (created for API docs at https://www.stripe.com/docs/api)", + }; + var service = new ChargeService(this.StripeClient); + Charge charge = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/charges"); + } + [Fact] public void TestChargesPost2() { @@ -583,6 +1386,23 @@ public void TestChargesPost2() this.AssertRequest(HttpMethod.Post, "/v1/charges/ch_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestChargesPost2Async() + { + var options = new ChargeUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new ChargeService(this.StripeClient); + Charge charge = await service.UpdateAsync( + "ch_xxxxxxxxxxxxx", + options); + this.AssertRequest(HttpMethod.Post, "/v1/charges/ch_xxxxxxxxxxxxx"); + } + [Fact] public void TestChargesSearchGet() { @@ -599,37 +1419,144 @@ public void TestChargesSearchGet() } [Fact] - public void TestCheckoutSessionsExpirePost() + public async Task TestChargesSearchGetAsync() { - var service = new Stripe.Checkout.SessionService(this.StripeClient); - Stripe.Checkout.Session session = service.Expire("sess_xyz"); + var options = new ChargeSearchOptions + { + Query = "amount>999 AND metadata['order_id']:'6735'", + }; + var service = new ChargeService(this.StripeClient); + StripeSearchResult charges = await service.SearchAsync( + options); this.AssertRequest( - HttpMethod.Post, - "/v1/checkout/sessions/sess_xyz/expire"); + HttpMethod.Get, + "/v1/charges/search", + "query=amount%3E999%20AND%20metadata%5B%27order_id%27%5D%3A%276735%27"); } [Fact] - public void TestCheckoutSessionsExpirePost2() + public void TestChargesSearchGetAutoPaging() { - var service = new Stripe.Checkout.SessionService(this.StripeClient); - Stripe.Checkout.Session session = service.Expire( - "cs_test_xxxxxxxxxxxxx"); + var options = new ChargeSearchOptions + { + Query = "amount>999 AND metadata['order_id']:'6735'", + }; + var service = new ChargeService(this.StripeClient); + var charge = service.SearchAutoPaging(options).First(); this.AssertRequest( - HttpMethod.Post, - "/v1/checkout/sessions/cs_test_xxxxxxxxxxxxx/expire"); + HttpMethod.Get, + "/v1/charges/search", + "query=amount%3E999%20AND%20metadata%5B%27order_id%27%5D%3A%276735%27"); } [Fact] - public void TestCheckoutSessionsGet() + public async Task TestChargesSearchGetAutoPagingAsync() { - var options = new Stripe.Checkout.SessionListOptions { Limit = 3 }; - var service = new Stripe.Checkout.SessionService(this.StripeClient); - StripeList sessions = service.List( - options); + var options = new ChargeSearchOptions + { + Query = "amount>999 AND metadata['order_id']:'6735'", + }; + var service = new ChargeService(this.StripeClient); + var charge = await service.SearchAutoPagingAsync(options) + .FirstAsync(); this.AssertRequest( HttpMethod.Get, - "/v1/checkout/sessions", - "limit=3"); + "/v1/charges/search", + "query=amount%3E999%20AND%20metadata%5B%27order_id%27%5D%3A%276735%27"); + } + + [Fact] + public void TestCheckoutSessionsExpirePost() + { + var service = new Stripe.Checkout.SessionService(this.StripeClient); + Stripe.Checkout.Session session = service.Expire("sess_xyz"); + this.AssertRequest( + HttpMethod.Post, + "/v1/checkout/sessions/sess_xyz/expire"); + } + + [Fact] + public async Task TestCheckoutSessionsExpirePostAsync() + { + var service = new Stripe.Checkout.SessionService(this.StripeClient); + Stripe.Checkout.Session session = await service.ExpireAsync( + "sess_xyz"); + this.AssertRequest( + HttpMethod.Post, + "/v1/checkout/sessions/sess_xyz/expire"); + } + + [Fact] + public void TestCheckoutSessionsExpirePost2() + { + var service = new Stripe.Checkout.SessionService(this.StripeClient); + Stripe.Checkout.Session session = service.Expire( + "cs_test_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/checkout/sessions/cs_test_xxxxxxxxxxxxx/expire"); + } + + [Fact] + public async Task TestCheckoutSessionsExpirePost2Async() + { + var service = new Stripe.Checkout.SessionService(this.StripeClient); + Stripe.Checkout.Session session = await service.ExpireAsync( + "cs_test_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/checkout/sessions/cs_test_xxxxxxxxxxxxx/expire"); + } + + [Fact] + public void TestCheckoutSessionsGet() + { + var options = new Stripe.Checkout.SessionListOptions { Limit = 3 }; + var service = new Stripe.Checkout.SessionService(this.StripeClient); + StripeList sessions = service.List( + options); + this.AssertRequest( + HttpMethod.Get, + "/v1/checkout/sessions", + "limit=3"); + } + + [Fact] + public async Task TestCheckoutSessionsGetAsync() + { + var options = new Stripe.Checkout.SessionListOptions { Limit = 3 }; + var service = new Stripe.Checkout.SessionService(this.StripeClient); + StripeList sessions = await service + .ListAsync(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/checkout/sessions", + "limit=3"); + } + + [Fact] + public void TestCheckoutSessionsGetAutoPaging() + { + var options = new Stripe.Checkout.SessionListOptions { Limit = 3 }; + var service = new Stripe.Checkout.SessionService(this.StripeClient); + var session = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/checkout/sessions", + "limit=3"); + } + + [Fact] + public async Task TestCheckoutSessionsGetAutoPagingAsync() + { + var options = new Stripe.Checkout.SessionListOptions { Limit = 3 }; + var service = new Stripe.Checkout.SessionService(this.StripeClient); + var session = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/checkout/sessions", + "limit=3"); } [Fact] @@ -643,6 +1570,17 @@ public void TestCheckoutSessionsGet2() "/v1/checkout/sessions/cs_test_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestCheckoutSessionsGet2Async() + { + var service = new Stripe.Checkout.SessionService(this.StripeClient); + Stripe.Checkout.Session session = await service.GetAsync( + "cs_test_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/checkout/sessions/cs_test_xxxxxxxxxxxxx"); + } + [Fact] public void TestCheckoutSessionsLineItemsGet() { @@ -654,6 +1592,41 @@ public void TestCheckoutSessionsLineItemsGet() "/v1/checkout/sessions/sess_xyz/line_items"); } + [Fact] + public async Task TestCheckoutSessionsLineItemsGetAsync() + { + var service = new Stripe.Checkout.SessionLineItemService( + this.StripeClient); + StripeList lineItems = await service.ListAsync( + "sess_xyz"); + this.AssertRequest( + HttpMethod.Get, + "/v1/checkout/sessions/sess_xyz/line_items"); + } + + [Fact] + public void TestCheckoutSessionsLineItemsGetAutoPaging() + { + var service = new Stripe.Checkout.SessionLineItemService( + this.StripeClient); + var lineItem = service.ListAutoPaging("sess_xyz").First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/checkout/sessions/sess_xyz/line_items"); + } + + [Fact] + public async Task TestCheckoutSessionsLineItemsGetAutoPagingAsync() + { + var service = new Stripe.Checkout.SessionLineItemService( + this.StripeClient); + var lineItem = await service.ListAutoPagingAsync("sess_xyz") + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/checkout/sessions/sess_xyz/line_items"); + } + [Fact] public void TestCheckoutSessionsPost() { @@ -695,6 +1668,48 @@ public void TestCheckoutSessionsPost() this.AssertRequest(HttpMethod.Post, "/v1/checkout/sessions"); } + [Fact] + public async Task TestCheckoutSessionsPostAsync() + { + var options = new Stripe.Checkout.SessionCreateOptions + { + SuccessUrl = "https://example.com/success", + CancelUrl = "https://example.com/cancel", + Mode = "payment", + ShippingOptions = new List + { + new Stripe.Checkout.SessionShippingOptionOptions + { + ShippingRate = "shr_standard", + }, + new Stripe.Checkout.SessionShippingOptionOptions + { + ShippingRateData = new Stripe.Checkout.SessionShippingOptionShippingRateDataOptions + { + DisplayName = "Standard", + DeliveryEstimate = new Stripe.Checkout.SessionShippingOptionShippingRateDataDeliveryEstimateOptions + { + Minimum = new Stripe.Checkout.SessionShippingOptionShippingRateDataDeliveryEstimateMinimumOptions + { + Unit = "day", + Value = 5, + }, + Maximum = new Stripe.Checkout.SessionShippingOptionShippingRateDataDeliveryEstimateMaximumOptions + { + Unit = "day", + Value = 7, + }, + }, + }, + }, + }, + }; + var service = new Stripe.Checkout.SessionService(this.StripeClient); + Stripe.Checkout.Session session = await service.CreateAsync( + options); + this.AssertRequest(HttpMethod.Post, "/v1/checkout/sessions"); + } + [Fact] public void TestCheckoutSessionsPost2() { @@ -716,6 +1731,28 @@ public void TestCheckoutSessionsPost2() this.AssertRequest(HttpMethod.Post, "/v1/checkout/sessions"); } + [Fact] + public async Task TestCheckoutSessionsPost2Async() + { + var options = new Stripe.Checkout.SessionCreateOptions + { + SuccessUrl = "https://example.com/success", + LineItems = new List + { + new Stripe.Checkout.SessionLineItemOptions + { + Price = "price_xxxxxxxxxxxxx", + Quantity = 2, + }, + }, + Mode = "payment", + }; + var service = new Stripe.Checkout.SessionService(this.StripeClient); + Stripe.Checkout.Session session = await service.CreateAsync( + options); + this.AssertRequest(HttpMethod.Post, "/v1/checkout/sessions"); + } + [Fact] public void TestCoreEventsGet() { @@ -730,6 +1767,20 @@ public void TestCoreEventsGet() this.AssertRequest(HttpMethod.Get, "/v2/core/events/ll_123"); } + [Fact] + public async Task TestCoreEventsGetAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/events/ll_123", + HttpStatusCode.OK, + "{\"object\":\"v2.core.event\",\"changes\":{\"int_key\":123,\"string_key\":\"value\",\"boolean_key\":true,\"object_key\":{\"object_int_key\":123,\"object_string_key\":\"value\",\"object_boolean_key\":true},\"array_key\":[1,2,3]},\"context\":\"context\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"reason\":{\"request\":{\"client\":{\"api_key\":{\"id\":\"obj_123\"},\"dashboard_user\":{\"email\":\"email\",\"ip_address\":\"ip_address\",\"machine_identifier\":\"machine_identifier\"},\"stripe_action\":{},\"type\":\"api_key\"},\"id\":\"obj_123\",\"idempotency_key\":\"idempotency_key\"},\"type\":\"request\"},\"snapshot_event\":\"snapshot_event\",\"type\":\"type\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Events; + Stripe.V2.Core.Event result = await service.GetAsync("ll_123"); + this.AssertRequest(HttpMethod.Get, "/v2/core/events/ll_123"); + } + [Fact] public void TestCountrySpecsGet() { @@ -739,6 +1790,35 @@ public void TestCountrySpecsGet() this.AssertRequest(HttpMethod.Get, "/v1/country_specs", "limit=3"); } + [Fact] + public async Task TestCountrySpecsGetAsync() + { + var options = new CountrySpecListOptions { Limit = 3 }; + var service = new CountrySpecService(this.StripeClient); + StripeList countrySpecs = await service.ListAsync( + options); + this.AssertRequest(HttpMethod.Get, "/v1/country_specs", "limit=3"); + } + + [Fact] + public void TestCountrySpecsGetAutoPaging() + { + var options = new CountrySpecListOptions { Limit = 3 }; + var service = new CountrySpecService(this.StripeClient); + var countrySpec = service.ListAutoPaging(options).First(); + this.AssertRequest(HttpMethod.Get, "/v1/country_specs", "limit=3"); + } + + [Fact] + public async Task TestCountrySpecsGetAutoPagingAsync() + { + var options = new CountrySpecListOptions { Limit = 3 }; + var service = new CountrySpecService(this.StripeClient); + var countrySpec = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/country_specs", "limit=3"); + } + [Fact] public void TestCountrySpecsGet2() { @@ -747,6 +1827,14 @@ public void TestCountrySpecsGet2() this.AssertRequest(HttpMethod.Get, "/v1/country_specs/US"); } + [Fact] + public async Task TestCountrySpecsGet2Async() + { + var service = new CountrySpecService(this.StripeClient); + CountrySpec countrySpec = await service.GetAsync("US"); + this.AssertRequest(HttpMethod.Get, "/v1/country_specs/US"); + } + [Fact] public void TestCouponsDelete() { @@ -755,6 +1843,14 @@ public void TestCouponsDelete() this.AssertRequest(HttpMethod.Delete, "/v1/coupons/Z4OV52SU"); } + [Fact] + public async Task TestCouponsDeleteAsync() + { + var service = new CouponService(this.StripeClient); + Coupon deleted = await service.DeleteAsync("Z4OV52SU"); + this.AssertRequest(HttpMethod.Delete, "/v1/coupons/Z4OV52SU"); + } + [Fact] public void TestCouponsGet() { @@ -764,6 +1860,34 @@ public void TestCouponsGet() this.AssertRequest(HttpMethod.Get, "/v1/coupons", "limit=3"); } + [Fact] + public async Task TestCouponsGetAsync() + { + var options = new CouponListOptions { Limit = 3 }; + var service = new CouponService(this.StripeClient); + StripeList coupons = await service.ListAsync(options); + this.AssertRequest(HttpMethod.Get, "/v1/coupons", "limit=3"); + } + + [Fact] + public void TestCouponsGetAutoPaging() + { + var options = new CouponListOptions { Limit = 3 }; + var service = new CouponService(this.StripeClient); + var coupon = service.ListAutoPaging(options).First(); + this.AssertRequest(HttpMethod.Get, "/v1/coupons", "limit=3"); + } + + [Fact] + public async Task TestCouponsGetAutoPagingAsync() + { + var options = new CouponListOptions { Limit = 3 }; + var service = new CouponService(this.StripeClient); + var coupon = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/coupons", "limit=3"); + } + [Fact] public void TestCouponsGet2() { @@ -772,6 +1896,14 @@ public void TestCouponsGet2() this.AssertRequest(HttpMethod.Get, "/v1/coupons/Z4OV52SU"); } + [Fact] + public async Task TestCouponsGet2Async() + { + var service = new CouponService(this.StripeClient); + Coupon coupon = await service.GetAsync("Z4OV52SU"); + this.AssertRequest(HttpMethod.Get, "/v1/coupons/Z4OV52SU"); + } + [Fact] public void TestCouponsPost() { @@ -786,11 +1918,24 @@ public void TestCouponsPost() } [Fact] - public void TestCouponsPost2() + public async Task TestCouponsPostAsync() { - var options = new CouponUpdateOptions + var options = new CouponCreateOptions { - Metadata = new Dictionary + PercentOff = 25.5M, + Duration = "once", + }; + var service = new CouponService(this.StripeClient); + Coupon coupon = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/coupons"); + } + + [Fact] + public void TestCouponsPost2() + { + var options = new CouponUpdateOptions + { + Metadata = new Dictionary { { "order_id", "6735" }, }, @@ -800,6 +1945,21 @@ public void TestCouponsPost2() this.AssertRequest(HttpMethod.Post, "/v1/coupons/Z4OV52SU"); } + [Fact] + public async Task TestCouponsPost2Async() + { + var options = new CouponUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new CouponService(this.StripeClient); + Coupon coupon = await service.UpdateAsync("Z4OV52SU", options); + this.AssertRequest(HttpMethod.Post, "/v1/coupons/Z4OV52SU"); + } + [Fact] public void TestCreditNotesGet() { @@ -809,6 +1969,35 @@ public void TestCreditNotesGet() this.AssertRequest(HttpMethod.Get, "/v1/credit_notes", "limit=3"); } + [Fact] + public async Task TestCreditNotesGetAsync() + { + var options = new CreditNoteListOptions { Limit = 3 }; + var service = new CreditNoteService(this.StripeClient); + StripeList creditNotes = await service.ListAsync( + options); + this.AssertRequest(HttpMethod.Get, "/v1/credit_notes", "limit=3"); + } + + [Fact] + public void TestCreditNotesGetAutoPaging() + { + var options = new CreditNoteListOptions { Limit = 3 }; + var service = new CreditNoteService(this.StripeClient); + var creditNote = service.ListAutoPaging(options).First(); + this.AssertRequest(HttpMethod.Get, "/v1/credit_notes", "limit=3"); + } + + [Fact] + public async Task TestCreditNotesGetAutoPagingAsync() + { + var options = new CreditNoteListOptions { Limit = 3 }; + var service = new CreditNoteService(this.StripeClient); + var creditNote = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/credit_notes", "limit=3"); + } + [Fact] public void TestCreditNotesPost() { @@ -830,6 +2019,27 @@ public void TestCreditNotesPost() this.AssertRequest(HttpMethod.Post, "/v1/credit_notes"); } + [Fact] + public async Task TestCreditNotesPostAsync() + { + var options = new CreditNoteCreateOptions + { + Invoice = "in_xxxxxxxxxxxxx", + Lines = new List + { + new CreditNoteLineOptions + { + Type = "invoice_line_item", + InvoiceLineItem = "il_xxxxxxxxxxxxx", + Quantity = 1, + }, + }, + }; + var service = new CreditNoteService(this.StripeClient); + CreditNote creditNote = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/credit_notes"); + } + [Fact] public void TestCreditNotesPreviewGet() { @@ -854,6 +2064,30 @@ public void TestCreditNotesPreviewGet() "invoice=in_xxxxxxxxxxxxx&lines[0][type]=invoice_line_item&lines[0][invoice_line_item]=il_xxxxxxxxxxxxx&lines[0][quantity]=1"); } + [Fact] + public async Task TestCreditNotesPreviewGetAsync() + { + var options = new CreditNotePreviewOptions + { + Invoice = "in_xxxxxxxxxxxxx", + Lines = new List + { + new CreditNoteLineOptions + { + Type = "invoice_line_item", + InvoiceLineItem = "il_xxxxxxxxxxxxx", + Quantity = 1, + }, + }, + }; + var service = new CreditNoteService(this.StripeClient); + CreditNote creditNote = await service.PreviewAsync(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/credit_notes/preview", + "invoice=in_xxxxxxxxxxxxx&lines[0][type]=invoice_line_item&lines[0][invoice_line_item]=il_xxxxxxxxxxxxx&lines[0][quantity]=1"); + } + [Fact] public void TestCreditNotesVoidPost() { @@ -864,6 +2098,17 @@ public void TestCreditNotesVoidPost() "/v1/credit_notes/cn_xxxxxxxxxxxxx/void"); } + [Fact] + public async Task TestCreditNotesVoidPostAsync() + { + var service = new CreditNoteService(this.StripeClient); + CreditNote creditNote = await service.VoidCreditNoteAsync( + "cn_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/credit_notes/cn_xxxxxxxxxxxxx/void"); + } + [Fact] public void TestCustomerSessionsPost() { @@ -883,6 +2128,26 @@ public void TestCustomerSessionsPost() this.AssertRequest(HttpMethod.Post, "/v1/customer_sessions"); } + [Fact] + public async Task TestCustomerSessionsPostAsync() + { + var options = new CustomerSessionCreateOptions + { + Customer = "cus_123", + Components = new CustomerSessionComponentsOptions + { + BuyButton = new CustomerSessionComponentsBuyButtonOptions + { + Enabled = true, + }, + }, + }; + var service = new CustomerSessionService(this.StripeClient); + CustomerSession customerSession = await service.CreateAsync( + options); + this.AssertRequest(HttpMethod.Post, "/v1/customer_sessions"); + } + [Fact] public void TestCustomersBalanceTransactionsGet() { @@ -900,6 +2165,61 @@ public void TestCustomersBalanceTransactionsGet() "limit=3"); } + [Fact] + public async Task TestCustomersBalanceTransactionsGetAsync() + { + var options = new CustomerBalanceTransactionListOptions + { + Limit = 3, + }; + var service = new CustomerBalanceTransactionService( + this.StripeClient); + StripeList customerBalanceTransactions = await service + .ListAsync("cus_xxxxxxxxxxxxx", options); + this.AssertRequest( + HttpMethod.Get, + "/v1/customers/cus_xxxxxxxxxxxxx/balance_transactions", + "limit=3"); + } + + [Fact] + public void TestCustomersBalanceTransactionsGetAutoPaging() + { + var options = new CustomerBalanceTransactionListOptions + { + Limit = 3, + }; + var service = new CustomerBalanceTransactionService( + this.StripeClient); + var customerBalanceTransaction = service.ListAutoPaging( + "cus_xxxxxxxxxxxxx", + options) + .First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/customers/cus_xxxxxxxxxxxxx/balance_transactions", + "limit=3"); + } + + [Fact] + public async Task TestCustomersBalanceTransactionsGetAutoPagingAsync() + { + var options = new CustomerBalanceTransactionListOptions + { + Limit = 3, + }; + var service = new CustomerBalanceTransactionService( + this.StripeClient); + var customerBalanceTransaction = await service.ListAutoPagingAsync( + "cus_xxxxxxxxxxxxx", + options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/customers/cus_xxxxxxxxxxxxx/balance_transactions", + "limit=3"); + } + [Fact] public void TestCustomersBalanceTransactionsGet2() { @@ -913,6 +2233,18 @@ public void TestCustomersBalanceTransactionsGet2() "/v1/customers/cus_xxxxxxxxxxxxx/balance_transactions/cbtxn_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestCustomersBalanceTransactionsGet2Async() + { + var service = new CustomerBalanceTransactionService( + this.StripeClient); + CustomerBalanceTransaction customerBalanceTransaction = await service + .GetAsync("cus_xxxxxxxxxxxxx", "cbtxn_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/customers/cus_xxxxxxxxxxxxx/balance_transactions/cbtxn_xxxxxxxxxxxxx"); + } + [Fact] public void TestCustomersBalanceTransactionsPost() { @@ -930,6 +2262,23 @@ public void TestCustomersBalanceTransactionsPost() "/v1/customers/cus_xxxxxxxxxxxxx/balance_transactions"); } + [Fact] + public async Task TestCustomersBalanceTransactionsPostAsync() + { + var options = new CustomerBalanceTransactionCreateOptions + { + Amount = -500, + Currency = "usd", + }; + var service = new CustomerBalanceTransactionService( + this.StripeClient); + CustomerBalanceTransaction customerBalanceTransaction = await service + .CreateAsync("cus_xxxxxxxxxxxxx", options); + this.AssertRequest( + HttpMethod.Post, + "/v1/customers/cus_xxxxxxxxxxxxx/balance_transactions"); + } + [Fact] public void TestCustomersBalanceTransactionsPost2() { @@ -949,6 +2298,28 @@ public void TestCustomersBalanceTransactionsPost2() "/v1/customers/cus_xxxxxxxxxxxxx/balance_transactions/cbtxn_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestCustomersBalanceTransactionsPost2Async() + { + var options = new CustomerBalanceTransactionUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new CustomerBalanceTransactionService( + this.StripeClient); + CustomerBalanceTransaction customerBalanceTransaction = await service + .UpdateAsync( + "cus_xxxxxxxxxxxxx", + "cbtxn_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/customers/cus_xxxxxxxxxxxxx/balance_transactions/cbtxn_xxxxxxxxxxxxx"); + } + [Fact] public void TestCustomersCashBalanceGet() { @@ -959,6 +2330,16 @@ public void TestCustomersCashBalanceGet() "/v1/customers/cus_123/cash_balance"); } + [Fact] + public async Task TestCustomersCashBalanceGetAsync() + { + var service = new CustomerCashBalanceService(this.StripeClient); + CashBalance cashBalance = await service.GetAsync("cus_123"); + this.AssertRequest( + HttpMethod.Get, + "/v1/customers/cus_123/cash_balance"); + } + [Fact] public void TestCustomersCashBalancePost() { @@ -976,6 +2357,25 @@ public void TestCustomersCashBalancePost() "/v1/customers/cus_123/cash_balance"); } + [Fact] + public async Task TestCustomersCashBalancePostAsync() + { + var options = new CustomerCashBalanceUpdateOptions + { + Settings = new CustomerCashBalanceSettingsOptions + { + ReconciliationMode = "manual", + }, + }; + var service = new CustomerCashBalanceService(this.StripeClient); + CashBalance cashBalance = await service.UpdateAsync( + "cus_123", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/customers/cus_123/cash_balance"); + } + [Fact] public void TestCustomersCashBalanceTransactionsGet() { @@ -994,36 +2394,123 @@ public void TestCustomersCashBalanceTransactionsGet() } [Fact] - public void TestCustomersDelete() + public async Task TestCustomersCashBalanceTransactionsGetAsync() { - var service = new CustomerService(this.StripeClient); - Customer deleted = service.Delete("cus_xxxxxxxxxxxxx"); + var options = new CustomerCashBalanceTransactionListOptions + { + Limit = 3, + }; + var service = new CustomerCashBalanceTransactionService( + this.StripeClient); + StripeList customerCashBalanceTransactions = await service + .ListAsync("cus_123", options); this.AssertRequest( - HttpMethod.Delete, - "/v1/customers/cus_xxxxxxxxxxxxx"); + HttpMethod.Get, + "/v1/customers/cus_123/cash_balance_transactions", + "limit=3"); } [Fact] - public void TestCustomersFundingInstructionsPost() + public void TestCustomersCashBalanceTransactionsGetAutoPaging() { - var options = new CustomerFundingInstructionsCreateOptions + var options = new CustomerCashBalanceTransactionListOptions { - BankTransfer = new CustomerFundingInstructionsBankTransferOptions - { - RequestedAddressTypes = new List { "zengin" }, - Type = "jp_bank_transfer", - }, - Currency = "usd", - FundingType = "bank_transfer", + Limit = 3, }; - var service = new CustomerFundingInstructionsService( + var service = new CustomerCashBalanceTransactionService( this.StripeClient); - FundingInstructions fundingInstructions = service.Create( + var customerCashBalanceTransaction = service.ListAutoPaging( "cus_123", - options); + options) + .First(); this.AssertRequest( - HttpMethod.Post, - "/v1/customers/cus_123/funding_instructions"); + HttpMethod.Get, + "/v1/customers/cus_123/cash_balance_transactions", + "limit=3"); + } + + [Fact] + public async Task TestCustomersCashBalanceTransactionsGetAutoPagingAsync() + { + var options = new CustomerCashBalanceTransactionListOptions + { + Limit = 3, + }; + var service = new CustomerCashBalanceTransactionService( + this.StripeClient); + var customerCashBalanceTransaction = await service + .ListAutoPagingAsync("cus_123", options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/customers/cus_123/cash_balance_transactions", + "limit=3"); + } + + [Fact] + public void TestCustomersDelete() + { + var service = new CustomerService(this.StripeClient); + Customer deleted = service.Delete("cus_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Delete, + "/v1/customers/cus_xxxxxxxxxxxxx"); + } + + [Fact] + public async Task TestCustomersDeleteAsync() + { + var service = new CustomerService(this.StripeClient); + Customer deleted = await service.DeleteAsync("cus_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Delete, + "/v1/customers/cus_xxxxxxxxxxxxx"); + } + + [Fact] + public void TestCustomersFundingInstructionsPost() + { + var options = new CustomerFundingInstructionsCreateOptions + { + BankTransfer = new CustomerFundingInstructionsBankTransferOptions + { + RequestedAddressTypes = new List { "zengin" }, + Type = "jp_bank_transfer", + }, + Currency = "usd", + FundingType = "bank_transfer", + }; + var service = new CustomerFundingInstructionsService( + this.StripeClient); + FundingInstructions fundingInstructions = service.Create( + "cus_123", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/customers/cus_123/funding_instructions"); + } + + [Fact] + public async Task TestCustomersFundingInstructionsPostAsync() + { + var options = new CustomerFundingInstructionsCreateOptions + { + BankTransfer = new CustomerFundingInstructionsBankTransferOptions + { + RequestedAddressTypes = new List { "zengin" }, + Type = "jp_bank_transfer", + }, + Currency = "usd", + FundingType = "bank_transfer", + }; + var service = new CustomerFundingInstructionsService( + this.StripeClient); + FundingInstructions fundingInstructions = await service.CreateAsync( + "cus_123", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/customers/cus_123/funding_instructions"); } [Fact] @@ -1035,6 +2522,34 @@ public void TestCustomersGet() this.AssertRequest(HttpMethod.Get, "/v1/customers", "limit=3"); } + [Fact] + public async Task TestCustomersGetAsync() + { + var options = new CustomerListOptions { Limit = 3 }; + var service = new CustomerService(this.StripeClient); + StripeList customers = await service.ListAsync(options); + this.AssertRequest(HttpMethod.Get, "/v1/customers", "limit=3"); + } + + [Fact] + public void TestCustomersGetAutoPaging() + { + var options = new CustomerListOptions { Limit = 3 }; + var service = new CustomerService(this.StripeClient); + var customer = service.ListAutoPaging(options).First(); + this.AssertRequest(HttpMethod.Get, "/v1/customers", "limit=3"); + } + + [Fact] + public async Task TestCustomersGetAutoPagingAsync() + { + var options = new CustomerListOptions { Limit = 3 }; + var service = new CustomerService(this.StripeClient); + var customer = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/customers", "limit=3"); + } + [Fact] public void TestCustomersGet2() { @@ -1044,6 +2559,34 @@ public void TestCustomersGet2() this.AssertRequest(HttpMethod.Get, "/v1/customers", "limit=3"); } + [Fact] + public async Task TestCustomersGet2Async() + { + var options = new CustomerListOptions { Limit = 3 }; + var service = new CustomerService(this.StripeClient); + StripeList customers = await service.ListAsync(options); + this.AssertRequest(HttpMethod.Get, "/v1/customers", "limit=3"); + } + + [Fact] + public void TestCustomersGet2AutoPaging() + { + var options = new CustomerListOptions { Limit = 3 }; + var service = new CustomerService(this.StripeClient); + var customer = service.ListAutoPaging(options).First(); + this.AssertRequest(HttpMethod.Get, "/v1/customers", "limit=3"); + } + + [Fact] + public async Task TestCustomersGet2AutoPagingAsync() + { + var options = new CustomerListOptions { Limit = 3 }; + var service = new CustomerService(this.StripeClient); + var customer = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/customers", "limit=3"); + } + [Fact] public void TestCustomersGet3() { @@ -1054,6 +2597,16 @@ public void TestCustomersGet3() "/v1/customers/cus_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestCustomersGet3Async() + { + var service = new CustomerService(this.StripeClient); + Customer customer = await service.GetAsync("cus_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/customers/cus_xxxxxxxxxxxxx"); + } + [Fact] public void TestCustomersPaymentMethodsGet() { @@ -1071,6 +2624,57 @@ public void TestCustomersPaymentMethodsGet() "type=card"); } + [Fact] + public async Task TestCustomersPaymentMethodsGetAsync() + { + var options = new CustomerPaymentMethodListOptions + { + Type = "card", + }; + var service = new CustomerPaymentMethodService(this.StripeClient); + StripeList paymentMethods = await service.ListAsync( + "cus_xyz", + options); + this.AssertRequest( + HttpMethod.Get, + "/v1/customers/cus_xyz/payment_methods", + "type=card"); + } + + [Fact] + public void TestCustomersPaymentMethodsGetAutoPaging() + { + var options = new CustomerPaymentMethodListOptions + { + Type = "card", + }; + var service = new CustomerPaymentMethodService(this.StripeClient); + var paymentMethod = service.ListAutoPaging("cus_xyz", options) + .First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/customers/cus_xyz/payment_methods", + "type=card"); + } + + [Fact] + public async Task TestCustomersPaymentMethodsGetAutoPagingAsync() + { + var options = new CustomerPaymentMethodListOptions + { + Type = "card", + }; + var service = new CustomerPaymentMethodService(this.StripeClient); + var paymentMethod = await service.ListAutoPagingAsync( + "cus_xyz", + options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/customers/cus_xyz/payment_methods", + "type=card"); + } + [Fact] public void TestCustomersPaymentMethodsGet2() { @@ -1088,6 +2692,59 @@ public void TestCustomersPaymentMethodsGet2() "type=card"); } + [Fact] + public async Task TestCustomersPaymentMethodsGet2Async() + { + var options = new CustomerPaymentMethodListOptions + { + Type = "card", + }; + var service = new CustomerPaymentMethodService(this.StripeClient); + StripeList paymentMethods = await service.ListAsync( + "cus_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Get, + "/v1/customers/cus_xxxxxxxxxxxxx/payment_methods", + "type=card"); + } + + [Fact] + public void TestCustomersPaymentMethodsGet2AutoPaging() + { + var options = new CustomerPaymentMethodListOptions + { + Type = "card", + }; + var service = new CustomerPaymentMethodService(this.StripeClient); + var paymentMethod = service.ListAutoPaging( + "cus_xxxxxxxxxxxxx", + options) + .First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/customers/cus_xxxxxxxxxxxxx/payment_methods", + "type=card"); + } + + [Fact] + public async Task TestCustomersPaymentMethodsGet2AutoPagingAsync() + { + var options = new CustomerPaymentMethodListOptions + { + Type = "card", + }; + var service = new CustomerPaymentMethodService(this.StripeClient); + var paymentMethod = await service.ListAutoPagingAsync( + "cus_xxxxxxxxxxxxx", + options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/customers/cus_xxxxxxxxxxxxx/payment_methods", + "type=card"); + } + [Fact] public void TestCustomersPost() { @@ -1100,6 +2757,18 @@ public void TestCustomersPost() this.AssertRequest(HttpMethod.Post, "/v1/customers"); } + [Fact] + public async Task TestCustomersPostAsync() + { + var options = new CustomerCreateOptions + { + Description = "My First Test Customer (created for API docs at https://www.stripe.com/docs/api)", + }; + var service = new CustomerService(this.StripeClient); + Customer customer = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/customers"); + } + [Fact] public void TestCustomersPost2() { @@ -1117,6 +2786,25 @@ public void TestCustomersPost2() "/v1/customers/cus_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestCustomersPost2Async() + { + var options = new CustomerUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new CustomerService(this.StripeClient); + Customer customer = await service.UpdateAsync( + "cus_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/customers/cus_xxxxxxxxxxxxx"); + } + [Fact] public void TestCustomersSearchGet() { @@ -1133,14 +2821,15 @@ public void TestCustomersSearchGet() } [Fact] - public void TestCustomersSearchGet2() + public async Task TestCustomersSearchGetAsync() { var options = new CustomerSearchOptions { Query = "name:'fakename' AND metadata['foo']:'bar'", }; var service = new CustomerService(this.StripeClient); - StripeSearchResult customers = service.Search(options); + StripeSearchResult customers = await service.SearchAsync( + options); this.AssertRequest( HttpMethod.Get, "/v1/customers/search", @@ -1148,15 +2837,120 @@ public void TestCustomersSearchGet2() } [Fact] - public void TestCustomersTaxIdsDelete() + public void TestCustomersSearchGetAutoPaging() { - var service = new CustomerTaxIdService(this.StripeClient); - TaxId deleted = service.Delete( - "cus_xxxxxxxxxxxxx", - "txi_xxxxxxxxxxxxx"); + var options = new CustomerSearchOptions + { + Query = "name:'fakename' AND metadata['foo']:'bar'", + }; + var service = new CustomerService(this.StripeClient); + var customer = service.SearchAutoPaging(options).First(); this.AssertRequest( - HttpMethod.Delete, - "/v1/customers/cus_xxxxxxxxxxxxx/tax_ids/txi_xxxxxxxxxxxxx"); + HttpMethod.Get, + "/v1/customers/search", + "query=name%3A%27fakename%27%20AND%20metadata%5B%27foo%27%5D%3A%27bar%27"); + } + + [Fact] + public async Task TestCustomersSearchGetAutoPagingAsync() + { + var options = new CustomerSearchOptions + { + Query = "name:'fakename' AND metadata['foo']:'bar'", + }; + var service = new CustomerService(this.StripeClient); + var customer = await service.SearchAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/customers/search", + "query=name%3A%27fakename%27%20AND%20metadata%5B%27foo%27%5D%3A%27bar%27"); + } + + [Fact] + public void TestCustomersSearchGet2() + { + var options = new CustomerSearchOptions + { + Query = "name:'fakename' AND metadata['foo']:'bar'", + }; + var service = new CustomerService(this.StripeClient); + StripeSearchResult customers = service.Search(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/customers/search", + "query=name%3A%27fakename%27%20AND%20metadata%5B%27foo%27%5D%3A%27bar%27"); + } + + [Fact] + public async Task TestCustomersSearchGet2Async() + { + var options = new CustomerSearchOptions + { + Query = "name:'fakename' AND metadata['foo']:'bar'", + }; + var service = new CustomerService(this.StripeClient); + StripeSearchResult customers = await service.SearchAsync( + options); + this.AssertRequest( + HttpMethod.Get, + "/v1/customers/search", + "query=name%3A%27fakename%27%20AND%20metadata%5B%27foo%27%5D%3A%27bar%27"); + } + + [Fact] + public void TestCustomersSearchGet2AutoPaging() + { + var options = new CustomerSearchOptions + { + Query = "name:'fakename' AND metadata['foo']:'bar'", + }; + var service = new CustomerService(this.StripeClient); + var customer = service.SearchAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/customers/search", + "query=name%3A%27fakename%27%20AND%20metadata%5B%27foo%27%5D%3A%27bar%27"); + } + + [Fact] + public async Task TestCustomersSearchGet2AutoPagingAsync() + { + var options = new CustomerSearchOptions + { + Query = "name:'fakename' AND metadata['foo']:'bar'", + }; + var service = new CustomerService(this.StripeClient); + var customer = await service.SearchAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/customers/search", + "query=name%3A%27fakename%27%20AND%20metadata%5B%27foo%27%5D%3A%27bar%27"); + } + + [Fact] + public void TestCustomersTaxIdsDelete() + { + var service = new CustomerTaxIdService(this.StripeClient); + TaxId deleted = service.Delete( + "cus_xxxxxxxxxxxxx", + "txi_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Delete, + "/v1/customers/cus_xxxxxxxxxxxxx/tax_ids/txi_xxxxxxxxxxxxx"); + } + + [Fact] + public async Task TestCustomersTaxIdsDeleteAsync() + { + var service = new CustomerTaxIdService(this.StripeClient); + TaxId deleted = await service.DeleteAsync( + "cus_xxxxxxxxxxxxx", + "txi_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Delete, + "/v1/customers/cus_xxxxxxxxxxxxx/tax_ids/txi_xxxxxxxxxxxxx"); } [Fact] @@ -1173,6 +2967,48 @@ public void TestCustomersTaxIdsGet() "limit=3"); } + [Fact] + public async Task TestCustomersTaxIdsGetAsync() + { + var options = new CustomerTaxIdListOptions { Limit = 3 }; + var service = new CustomerTaxIdService(this.StripeClient); + StripeList taxIds = await service.ListAsync( + "cus_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Get, + "/v1/customers/cus_xxxxxxxxxxxxx/tax_ids", + "limit=3"); + } + + [Fact] + public void TestCustomersTaxIdsGetAutoPaging() + { + var options = new CustomerTaxIdListOptions { Limit = 3 }; + var service = new CustomerTaxIdService(this.StripeClient); + var taxId = service.ListAutoPaging("cus_xxxxxxxxxxxxx", options) + .First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/customers/cus_xxxxxxxxxxxxx/tax_ids", + "limit=3"); + } + + [Fact] + public async Task TestCustomersTaxIdsGetAutoPagingAsync() + { + var options = new CustomerTaxIdListOptions { Limit = 3 }; + var service = new CustomerTaxIdService(this.StripeClient); + var taxId = await service.ListAutoPagingAsync( + "cus_xxxxxxxxxxxxx", + options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/customers/cus_xxxxxxxxxxxxx/tax_ids", + "limit=3"); + } + [Fact] public void TestCustomersTaxIdsGet2() { @@ -1183,6 +3019,18 @@ public void TestCustomersTaxIdsGet2() "/v1/customers/cus_xxxxxxxxxxxxx/tax_ids/txi_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestCustomersTaxIdsGet2Async() + { + var service = new CustomerTaxIdService(this.StripeClient); + TaxId taxId = await service.GetAsync( + "cus_xxxxxxxxxxxxx", + "txi_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/customers/cus_xxxxxxxxxxxxx/tax_ids/txi_xxxxxxxxxxxxx"); + } + [Fact] public void TestCustomersTaxIdsPost() { @@ -1198,6 +3046,23 @@ public void TestCustomersTaxIdsPost() "/v1/customers/cus_xxxxxxxxxxxxx/tax_ids"); } + [Fact] + public async Task TestCustomersTaxIdsPostAsync() + { + var options = new CustomerTaxIdCreateOptions + { + Type = "eu_vat", + Value = "DE123456789", + }; + var service = new CustomerTaxIdService(this.StripeClient); + TaxId taxId = await service.CreateAsync( + "cus_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/customers/cus_xxxxxxxxxxxxx/tax_ids"); + } + [Fact] public void TestDisputesClosePost() { @@ -1208,6 +3073,16 @@ public void TestDisputesClosePost() "/v1/disputes/dp_xxxxxxxxxxxxx/close"); } + [Fact] + public async Task TestDisputesClosePostAsync() + { + var service = new DisputeService(this.StripeClient); + Dispute dispute = await service.CloseAsync("dp_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/disputes/dp_xxxxxxxxxxxxx/close"); + } + [Fact] public void TestDisputesGet() { @@ -1217,6 +3092,34 @@ public void TestDisputesGet() this.AssertRequest(HttpMethod.Get, "/v1/disputes", "limit=3"); } + [Fact] + public async Task TestDisputesGetAsync() + { + var options = new DisputeListOptions { Limit = 3 }; + var service = new DisputeService(this.StripeClient); + StripeList disputes = await service.ListAsync(options); + this.AssertRequest(HttpMethod.Get, "/v1/disputes", "limit=3"); + } + + [Fact] + public void TestDisputesGetAutoPaging() + { + var options = new DisputeListOptions { Limit = 3 }; + var service = new DisputeService(this.StripeClient); + var dispute = service.ListAutoPaging(options).First(); + this.AssertRequest(HttpMethod.Get, "/v1/disputes", "limit=3"); + } + + [Fact] + public async Task TestDisputesGetAutoPagingAsync() + { + var options = new DisputeListOptions { Limit = 3 }; + var service = new DisputeService(this.StripeClient); + var dispute = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/disputes", "limit=3"); + } + [Fact] public void TestDisputesGet2() { @@ -1225,6 +3128,14 @@ public void TestDisputesGet2() this.AssertRequest(HttpMethod.Get, "/v1/disputes/dp_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestDisputesGet2Async() + { + var service = new DisputeService(this.StripeClient); + Dispute dispute = await service.GetAsync("dp_xxxxxxxxxxxxx"); + this.AssertRequest(HttpMethod.Get, "/v1/disputes/dp_xxxxxxxxxxxxx"); + } + [Fact] public void TestDisputesPost() { @@ -1242,6 +3153,25 @@ public void TestDisputesPost() "/v1/disputes/dp_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestDisputesPostAsync() + { + var options = new DisputeUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new DisputeService(this.StripeClient); + Dispute dispute = await service.UpdateAsync( + "dp_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/disputes/dp_xxxxxxxxxxxxx"); + } + [Fact] public void TestEventsGet() { @@ -1251,6 +3181,34 @@ public void TestEventsGet() this.AssertRequest(HttpMethod.Get, "/v1/events", "limit=3"); } + [Fact] + public async Task TestEventsGetAsync() + { + var options = new EventListOptions { Limit = 3 }; + var service = new EventService(this.StripeClient); + StripeList events = await service.ListAsync(options); + this.AssertRequest(HttpMethod.Get, "/v1/events", "limit=3"); + } + + [Fact] + public void TestEventsGetAutoPaging() + { + var options = new EventListOptions { Limit = 3 }; + var service = new EventService(this.StripeClient); + var result = service.ListAutoPaging(options).First(); + this.AssertRequest(HttpMethod.Get, "/v1/events", "limit=3"); + } + + [Fact] + public async Task TestEventsGetAutoPagingAsync() + { + var options = new EventListOptions { Limit = 3 }; + var service = new EventService(this.StripeClient); + var result = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/events", "limit=3"); + } + [Fact] public void TestEventsGet2() { @@ -1259,6 +3217,14 @@ public void TestEventsGet2() this.AssertRequest(HttpMethod.Get, "/v1/events/evt_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestEventsGet2Async() + { + var service = new EventService(this.StripeClient); + Event result = await service.GetAsync("evt_xxxxxxxxxxxxx"); + this.AssertRequest(HttpMethod.Get, "/v1/events/evt_xxxxxxxxxxxxx"); + } + [Fact] public void TestFileLinksGet() { @@ -1269,40 +3235,109 @@ public void TestFileLinksGet() } [Fact] - public void TestFileLinksGet2() + public async Task TestFileLinksGetAsync() { + var options = new FileLinkListOptions { Limit = 3 }; var service = new FileLinkService(this.StripeClient); - FileLink fileLink = service.Get("link_xxxxxxxxxxxxx"); - this.AssertRequest( - HttpMethod.Get, - "/v1/file_links/link_xxxxxxxxxxxxx"); + StripeList fileLinks = await service.ListAsync(options); + this.AssertRequest(HttpMethod.Get, "/v1/file_links", "limit=3"); } [Fact] - public void TestFileLinksPost() + public void TestFileLinksGetAutoPaging() { - var options = new FileLinkCreateOptions - { - File = "file_xxxxxxxxxxxxx", - }; + var options = new FileLinkListOptions { Limit = 3 }; var service = new FileLinkService(this.StripeClient); - FileLink fileLink = service.Create(options); - this.AssertRequest(HttpMethod.Post, "/v1/file_links"); + var fileLink = service.ListAutoPaging(options).First(); + this.AssertRequest(HttpMethod.Get, "/v1/file_links", "limit=3"); } [Fact] - public void TestFileLinksPost2() + public async Task TestFileLinksGetAutoPagingAsync() { - var options = new FileLinkUpdateOptions - { - Metadata = new Dictionary - { - { "order_id", "6735" }, - }, - }; + var options = new FileLinkListOptions { Limit = 3 }; var service = new FileLinkService(this.StripeClient); - FileLink fileLink = service.Update("link_xxxxxxxxxxxxx", options); - this.AssertRequest( + var fileLink = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/file_links", "limit=3"); + } + + [Fact] + public void TestFileLinksGet2() + { + var service = new FileLinkService(this.StripeClient); + FileLink fileLink = service.Get("link_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/file_links/link_xxxxxxxxxxxxx"); + } + + [Fact] + public async Task TestFileLinksGet2Async() + { + var service = new FileLinkService(this.StripeClient); + FileLink fileLink = await service.GetAsync("link_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/file_links/link_xxxxxxxxxxxxx"); + } + + [Fact] + public void TestFileLinksPost() + { + var options = new FileLinkCreateOptions + { + File = "file_xxxxxxxxxxxxx", + }; + var service = new FileLinkService(this.StripeClient); + FileLink fileLink = service.Create(options); + this.AssertRequest(HttpMethod.Post, "/v1/file_links"); + } + + [Fact] + public async Task TestFileLinksPostAsync() + { + var options = new FileLinkCreateOptions + { + File = "file_xxxxxxxxxxxxx", + }; + var service = new FileLinkService(this.StripeClient); + FileLink fileLink = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/file_links"); + } + + [Fact] + public void TestFileLinksPost2() + { + var options = new FileLinkUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new FileLinkService(this.StripeClient); + FileLink fileLink = service.Update("link_xxxxxxxxxxxxx", options); + this.AssertRequest( + HttpMethod.Post, + "/v1/file_links/link_xxxxxxxxxxxxx"); + } + + [Fact] + public async Task TestFileLinksPost2Async() + { + var options = new FileLinkUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new FileLinkService(this.StripeClient); + FileLink fileLink = await service.UpdateAsync( + "link_xxxxxxxxxxxxx", + options); + this.AssertRequest( HttpMethod.Post, "/v1/file_links/link_xxxxxxxxxxxxx"); } @@ -1316,6 +3351,33 @@ public void TestFilesGet() this.AssertRequest(HttpMethod.Get, "/v1/files", "limit=3"); } + [Fact] + public async Task TestFilesGetAsync() + { + var options = new FileListOptions { Limit = 3 }; + var service = new FileService(this.StripeClient); + StripeList files = await service.ListAsync(options); + this.AssertRequest(HttpMethod.Get, "/v1/files", "limit=3"); + } + + [Fact] + public void TestFilesGetAutoPaging() + { + var options = new FileListOptions { Limit = 3 }; + var service = new FileService(this.StripeClient); + var file = service.ListAutoPaging(options).First(); + this.AssertRequest(HttpMethod.Get, "/v1/files", "limit=3"); + } + + [Fact] + public async Task TestFilesGetAutoPagingAsync() + { + var options = new FileListOptions { Limit = 3 }; + var service = new FileService(this.StripeClient); + var file = await service.ListAutoPagingAsync(options).FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/files", "limit=3"); + } + [Fact] public void TestFilesGet2() { @@ -1324,6 +3386,14 @@ public void TestFilesGet2() this.AssertRequest(HttpMethod.Get, "/v1/files/file_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestFilesGet2Async() + { + var service = new FileService(this.StripeClient); + File file = await service.GetAsync("file_xxxxxxxxxxxxx"); + this.AssertRequest(HttpMethod.Get, "/v1/files/file_xxxxxxxxxxxxx"); + } + [Fact] public void TestFilesPost() { @@ -1341,6 +3411,23 @@ public void TestFilesPost() this.AssertRequest(HttpMethod.Post, "/v1/files"); } + [Fact] + public async Task TestFilesPostAsync() + { + var options = new FileCreateOptions + { + Purpose = "account_requirement", + File = new Stripe.MultipartFileContent + { + Data = new System.IO.MemoryStream( + System.Text.Encoding.UTF8.GetBytes("File contents")), + }, + }; + var service = new FileService(this.StripeClient); + File file = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/files"); + } + [Fact] public void TestFinancialConnectionsAccountsDisconnectPost() { @@ -1353,6 +3440,18 @@ public void TestFinancialConnectionsAccountsDisconnectPost() "/v1/financial_connections/accounts/fca_xyz/disconnect"); } + [Fact] + public async Task TestFinancialConnectionsAccountsDisconnectPostAsync() + { + var service = new Stripe.FinancialConnections.AccountService( + this.StripeClient); + Stripe.FinancialConnections.Account account = await service + .DisconnectAsync("fca_xyz"); + this.AssertRequest( + HttpMethod.Post, + "/v1/financial_connections/accounts/fca_xyz/disconnect"); + } + [Fact] public void TestFinancialConnectionsAccountsDisconnectPost2() { @@ -1365,6 +3464,18 @@ public void TestFinancialConnectionsAccountsDisconnectPost2() "/v1/financial_connections/accounts/fca_xxxxxxxxxxxxx/disconnect"); } + [Fact] + public async Task TestFinancialConnectionsAccountsDisconnectPost2Async() + { + var service = new Stripe.FinancialConnections.AccountService( + this.StripeClient); + Stripe.FinancialConnections.Account account = await service + .DisconnectAsync("fca_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/financial_connections/accounts/fca_xxxxxxxxxxxxx/disconnect"); + } + [Fact] public void TestFinancialConnectionsAccountsGet() { @@ -1377,6 +3488,40 @@ public void TestFinancialConnectionsAccountsGet() "/v1/financial_connections/accounts"); } + [Fact] + public async Task TestFinancialConnectionsAccountsGetAsync() + { + var service = new Stripe.FinancialConnections.AccountService( + this.StripeClient); + StripeList accounts = await service + .ListAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/financial_connections/accounts"); + } + + [Fact] + public void TestFinancialConnectionsAccountsGetAutoPaging() + { + var service = new Stripe.FinancialConnections.AccountService( + this.StripeClient); + var account = service.ListAutoPaging().First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/financial_connections/accounts"); + } + + [Fact] + public async Task TestFinancialConnectionsAccountsGetAutoPagingAsync() + { + var service = new Stripe.FinancialConnections.AccountService( + this.StripeClient); + var account = await service.ListAutoPagingAsync().FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/financial_connections/accounts"); + } + [Fact] public void TestFinancialConnectionsAccountsGet2() { @@ -1389,6 +3534,18 @@ public void TestFinancialConnectionsAccountsGet2() "/v1/financial_connections/accounts/fca_xyz"); } + [Fact] + public async Task TestFinancialConnectionsAccountsGet2Async() + { + var service = new Stripe.FinancialConnections.AccountService( + this.StripeClient); + Stripe.FinancialConnections.Account account = await service + .GetAsync("fca_xyz"); + this.AssertRequest( + HttpMethod.Get, + "/v1/financial_connections/accounts/fca_xyz"); + } + [Fact] public void TestFinancialConnectionsAccountsGet3() { @@ -1409,6 +3566,65 @@ public void TestFinancialConnectionsAccountsGet3() "account_holder[customer]=cus_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestFinancialConnectionsAccountsGet3Async() + { + var options = new Stripe.FinancialConnections.AccountListOptions + { + AccountHolder = new Stripe.FinancialConnections.AccountAccountHolderOptions + { + Customer = "cus_xxxxxxxxxxxxx", + }, + }; + var service = new Stripe.FinancialConnections.AccountService( + this.StripeClient); + StripeList accounts = await service + .ListAsync(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/financial_connections/accounts", + "account_holder[customer]=cus_xxxxxxxxxxxxx"); + } + + [Fact] + public void TestFinancialConnectionsAccountsGet3AutoPaging() + { + var options = new Stripe.FinancialConnections.AccountListOptions + { + AccountHolder = new Stripe.FinancialConnections.AccountAccountHolderOptions + { + Customer = "cus_xxxxxxxxxxxxx", + }, + }; + var service = new Stripe.FinancialConnections.AccountService( + this.StripeClient); + var account = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/financial_connections/accounts", + "account_holder[customer]=cus_xxxxxxxxxxxxx"); + } + + [Fact] + public async Task TestFinancialConnectionsAccountsGet3AutoPagingAsync() + { + var options = new Stripe.FinancialConnections.AccountListOptions + { + AccountHolder = new Stripe.FinancialConnections.AccountAccountHolderOptions + { + Customer = "cus_xxxxxxxxxxxxx", + }, + }; + var service = new Stripe.FinancialConnections.AccountService( + this.StripeClient); + var account = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/financial_connections/accounts", + "account_holder[customer]=cus_xxxxxxxxxxxxx"); + } + [Fact] public void TestFinancialConnectionsAccountsGet4() { @@ -1421,6 +3637,18 @@ public void TestFinancialConnectionsAccountsGet4() "/v1/financial_connections/accounts/fca_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestFinancialConnectionsAccountsGet4Async() + { + var service = new Stripe.FinancialConnections.AccountService( + this.StripeClient); + Stripe.FinancialConnections.Account account = await service + .GetAsync("fca_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/financial_connections/accounts/fca_xxxxxxxxxxxxx"); + } + [Fact] public void TestFinancialConnectionsAccountsOwnersGet() { @@ -1439,44 +3667,171 @@ public void TestFinancialConnectionsAccountsOwnersGet() } [Fact] - public void TestFinancialConnectionsAccountsOwnersGet2() + public async Task TestFinancialConnectionsAccountsOwnersGetAsync() { var options = new Stripe.FinancialConnections.AccountOwnerListOptions { - Limit = 3, - Ownership = "fcaowns_xxxxxxxxxxxxx", + Ownership = "fcaowns_xyz", }; var service = new Stripe.FinancialConnections.AccountOwnerService( this.StripeClient); - StripeList accountOwners = service - .List("fca_xxxxxxxxxxxxx", options); + StripeList accountOwners = await service + .ListAsync("fca_xyz", options); this.AssertRequest( HttpMethod.Get, - "/v1/financial_connections/accounts/fca_xxxxxxxxxxxxx/owners", - "limit=3&ownership=fcaowns_xxxxxxxxxxxxx"); + "/v1/financial_connections/accounts/fca_xyz/owners", + "ownership=fcaowns_xyz"); } [Fact] - public void TestFinancialConnectionsAccountsRefreshPost() + public void TestFinancialConnectionsAccountsOwnersGetAutoPaging() { - var options = new Stripe.FinancialConnections.AccountRefreshOptions + var options = new Stripe.FinancialConnections.AccountOwnerListOptions { - Features = new List { "balance" }, + Ownership = "fcaowns_xyz", }; - var service = new Stripe.FinancialConnections.AccountService( + var service = new Stripe.FinancialConnections.AccountOwnerService( this.StripeClient); - Stripe.FinancialConnections.Account account = service.Refresh( - "fca_xyz", - options); + var accountOwner = service.ListAutoPaging("fca_xyz", options) + .First(); this.AssertRequest( - HttpMethod.Post, - "/v1/financial_connections/accounts/fca_xyz/refresh"); + HttpMethod.Get, + "/v1/financial_connections/accounts/fca_xyz/owners", + "ownership=fcaowns_xyz"); } [Fact] - public void TestFinancialConnectionsAccountsSubscribePost() + public async Task TestFinancialConnectionsAccountsOwnersGetAutoPagingAsync() { - var options = new Stripe.FinancialConnections.AccountSubscribeOptions + var options = new Stripe.FinancialConnections.AccountOwnerListOptions + { + Ownership = "fcaowns_xyz", + }; + var service = new Stripe.FinancialConnections.AccountOwnerService( + this.StripeClient); + var accountOwner = await service.ListAutoPagingAsync( + "fca_xyz", + options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/financial_connections/accounts/fca_xyz/owners", + "ownership=fcaowns_xyz"); + } + + [Fact] + public void TestFinancialConnectionsAccountsOwnersGet2() + { + var options = new Stripe.FinancialConnections.AccountOwnerListOptions + { + Limit = 3, + Ownership = "fcaowns_xxxxxxxxxxxxx", + }; + var service = new Stripe.FinancialConnections.AccountOwnerService( + this.StripeClient); + StripeList accountOwners = service + .List("fca_xxxxxxxxxxxxx", options); + this.AssertRequest( + HttpMethod.Get, + "/v1/financial_connections/accounts/fca_xxxxxxxxxxxxx/owners", + "limit=3&ownership=fcaowns_xxxxxxxxxxxxx"); + } + + [Fact] + public async Task TestFinancialConnectionsAccountsOwnersGet2Async() + { + var options = new Stripe.FinancialConnections.AccountOwnerListOptions + { + Limit = 3, + Ownership = "fcaowns_xxxxxxxxxxxxx", + }; + var service = new Stripe.FinancialConnections.AccountOwnerService( + this.StripeClient); + StripeList accountOwners = await service + .ListAsync("fca_xxxxxxxxxxxxx", options); + this.AssertRequest( + HttpMethod.Get, + "/v1/financial_connections/accounts/fca_xxxxxxxxxxxxx/owners", + "limit=3&ownership=fcaowns_xxxxxxxxxxxxx"); + } + + [Fact] + public void TestFinancialConnectionsAccountsOwnersGet2AutoPaging() + { + var options = new Stripe.FinancialConnections.AccountOwnerListOptions + { + Limit = 3, + Ownership = "fcaowns_xxxxxxxxxxxxx", + }; + var service = new Stripe.FinancialConnections.AccountOwnerService( + this.StripeClient); + var accountOwner = service.ListAutoPaging( + "fca_xxxxxxxxxxxxx", + options) + .First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/financial_connections/accounts/fca_xxxxxxxxxxxxx/owners", + "limit=3&ownership=fcaowns_xxxxxxxxxxxxx"); + } + + [Fact] + public async Task TestFinancialConnectionsAccountsOwnersGet2AutoPagingAsync() + { + var options = new Stripe.FinancialConnections.AccountOwnerListOptions + { + Limit = 3, + Ownership = "fcaowns_xxxxxxxxxxxxx", + }; + var service = new Stripe.FinancialConnections.AccountOwnerService( + this.StripeClient); + var accountOwner = await service.ListAutoPagingAsync( + "fca_xxxxxxxxxxxxx", + options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/financial_connections/accounts/fca_xxxxxxxxxxxxx/owners", + "limit=3&ownership=fcaowns_xxxxxxxxxxxxx"); + } + + [Fact] + public void TestFinancialConnectionsAccountsRefreshPost() + { + var options = new Stripe.FinancialConnections.AccountRefreshOptions + { + Features = new List { "balance" }, + }; + var service = new Stripe.FinancialConnections.AccountService( + this.StripeClient); + Stripe.FinancialConnections.Account account = service.Refresh( + "fca_xyz", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/financial_connections/accounts/fca_xyz/refresh"); + } + + [Fact] + public async Task TestFinancialConnectionsAccountsRefreshPostAsync() + { + var options = new Stripe.FinancialConnections.AccountRefreshOptions + { + Features = new List { "balance" }, + }; + var service = new Stripe.FinancialConnections.AccountService( + this.StripeClient); + Stripe.FinancialConnections.Account account = await service + .RefreshAsync("fca_xyz", options); + this.AssertRequest( + HttpMethod.Post, + "/v1/financial_connections/accounts/fca_xyz/refresh"); + } + + [Fact] + public void TestFinancialConnectionsAccountsSubscribePost() + { + var options = new Stripe.FinancialConnections.AccountSubscribeOptions { Features = new List { "transactions" }, }; @@ -1490,6 +3845,22 @@ public void TestFinancialConnectionsAccountsSubscribePost() "/v1/financial_connections/accounts/fa_123/subscribe"); } + [Fact] + public async Task TestFinancialConnectionsAccountsSubscribePostAsync() + { + var options = new Stripe.FinancialConnections.AccountSubscribeOptions + { + Features = new List { "transactions" }, + }; + var service = new Stripe.FinancialConnections.AccountService( + this.StripeClient); + Stripe.FinancialConnections.Account account = await service + .SubscribeAsync("fa_123", options); + this.AssertRequest( + HttpMethod.Post, + "/v1/financial_connections/accounts/fa_123/subscribe"); + } + [Fact] public void TestFinancialConnectionsAccountsUnsubscribePost() { @@ -1507,6 +3878,22 @@ public void TestFinancialConnectionsAccountsUnsubscribePost() "/v1/financial_connections/accounts/fa_123/unsubscribe"); } + [Fact] + public async Task TestFinancialConnectionsAccountsUnsubscribePostAsync() + { + var options = new Stripe.FinancialConnections.AccountUnsubscribeOptions + { + Features = new List { "transactions" }, + }; + var service = new Stripe.FinancialConnections.AccountService( + this.StripeClient); + Stripe.FinancialConnections.Account account = await service + .UnsubscribeAsync("fa_123", options); + this.AssertRequest( + HttpMethod.Post, + "/v1/financial_connections/accounts/fa_123/unsubscribe"); + } + [Fact] public void TestFinancialConnectionsSessionsGet() { @@ -1519,6 +3906,18 @@ public void TestFinancialConnectionsSessionsGet() "/v1/financial_connections/sessions/fcsess_xyz"); } + [Fact] + public async Task TestFinancialConnectionsSessionsGetAsync() + { + var service = new Stripe.FinancialConnections.SessionService( + this.StripeClient); + Stripe.FinancialConnections.Session session = await service + .GetAsync("fcsess_xyz"); + this.AssertRequest( + HttpMethod.Get, + "/v1/financial_connections/sessions/fcsess_xyz"); + } + [Fact] public void TestFinancialConnectionsSessionsGet2() { @@ -1531,6 +3930,18 @@ public void TestFinancialConnectionsSessionsGet2() "/v1/financial_connections/sessions/fcsess_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestFinancialConnectionsSessionsGet2Async() + { + var service = new Stripe.FinancialConnections.SessionService( + this.StripeClient); + Stripe.FinancialConnections.Session session = await service + .GetAsync("fcsess_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/financial_connections/sessions/fcsess_xxxxxxxxxxxxx"); + } + [Fact] public void TestFinancialConnectionsSessionsPost() { @@ -1552,6 +3963,27 @@ public void TestFinancialConnectionsSessionsPost() "/v1/financial_connections/sessions"); } + [Fact] + public async Task TestFinancialConnectionsSessionsPostAsync() + { + var options = new Stripe.FinancialConnections.SessionCreateOptions + { + AccountHolder = new Stripe.FinancialConnections.SessionAccountHolderOptions + { + Type = "customer", + Customer = "cus_123", + }, + Permissions = new List { "balances" }, + }; + var service = new Stripe.FinancialConnections.SessionService( + this.StripeClient); + Stripe.FinancialConnections.Session session = await service + .CreateAsync(options); + this.AssertRequest( + HttpMethod.Post, + "/v1/financial_connections/sessions"); + } + [Fact] public void TestFinancialConnectionsSessionsPost2() { @@ -1577,6 +4009,31 @@ public void TestFinancialConnectionsSessionsPost2() "/v1/financial_connections/sessions"); } + [Fact] + public async Task TestFinancialConnectionsSessionsPost2Async() + { + var options = new Stripe.FinancialConnections.SessionCreateOptions + { + AccountHolder = new Stripe.FinancialConnections.SessionAccountHolderOptions + { + Type = "customer", + Customer = "cus_xxxxxxxxxxxxx", + }, + Permissions = new List { "payment_method", "balances" }, + Filters = new Stripe.FinancialConnections.SessionFiltersOptions + { + Countries = new List { "US" }, + }, + }; + var service = new Stripe.FinancialConnections.SessionService( + this.StripeClient); + Stripe.FinancialConnections.Session session = await service + .CreateAsync(options); + this.AssertRequest( + HttpMethod.Post, + "/v1/financial_connections/sessions"); + } + [Fact] public void TestFinancialConnectionsTransactionsGet() { @@ -1589,6 +4046,18 @@ public void TestFinancialConnectionsTransactionsGet() "/v1/financial_connections/transactions/tr_123"); } + [Fact] + public async Task TestFinancialConnectionsTransactionsGetAsync() + { + var service = new Stripe.FinancialConnections.TransactionService( + this.StripeClient); + Stripe.FinancialConnections.Transaction transaction = await service + .GetAsync("tr_123"); + this.AssertRequest( + HttpMethod.Get, + "/v1/financial_connections/transactions/tr_123"); + } + [Fact] public void TestFinancialConnectionsTransactionsGet2() { @@ -1607,70 +4076,256 @@ public void TestFinancialConnectionsTransactionsGet2() } [Fact] - public void TestIdentityVerificationReportsGet() + public async Task TestFinancialConnectionsTransactionsGet2Async() { - var options = new Stripe.Identity.VerificationReportListOptions + var options = new Stripe.FinancialConnections.TransactionListOptions { - Limit = 3, + Account = "fca_xyz", }; - var service = new Stripe.Identity.VerificationReportService( + var service = new Stripe.FinancialConnections.TransactionService( this.StripeClient); - StripeList verificationReports = service - .List(options); + StripeList transactions = await service + .ListAsync(options); this.AssertRequest( HttpMethod.Get, - "/v1/identity/verification_reports", - "limit=3"); + "/v1/financial_connections/transactions", + "account=fca_xyz"); } [Fact] - public void TestIdentityVerificationReportsGet2() + public void TestFinancialConnectionsTransactionsGet2AutoPaging() { - var service = new Stripe.Identity.VerificationReportService( + var options = new Stripe.FinancialConnections.TransactionListOptions + { + Account = "fca_xyz", + }; + var service = new Stripe.FinancialConnections.TransactionService( this.StripeClient); - Stripe.Identity.VerificationReport verificationReport = service.Get( - "vr_xxxxxxxxxxxxx"); + var transaction = service.ListAutoPaging(options).First(); this.AssertRequest( HttpMethod.Get, - "/v1/identity/verification_reports/vr_xxxxxxxxxxxxx"); + "/v1/financial_connections/transactions", + "account=fca_xyz"); } [Fact] - public void TestIdentityVerificationSessionsCancelPost() + public async Task TestFinancialConnectionsTransactionsGet2AutoPagingAsync() { - var service = new Stripe.Identity.VerificationSessionService( + var options = new Stripe.FinancialConnections.TransactionListOptions + { + Account = "fca_xyz", + }; + var service = new Stripe.FinancialConnections.TransactionService( this.StripeClient); - Stripe.Identity.VerificationSession verificationSession = service - .Cancel("vs_xxxxxxxxxxxxx"); + var transaction = await service.ListAutoPagingAsync(options) + .FirstAsync(); this.AssertRequest( - HttpMethod.Post, - "/v1/identity/verification_sessions/vs_xxxxxxxxxxxxx/cancel"); + HttpMethod.Get, + "/v1/financial_connections/transactions", + "account=fca_xyz"); } [Fact] - public void TestIdentityVerificationSessionsGet() + public void TestIdentityVerificationReportsGet() { - var options = new Stripe.Identity.VerificationSessionListOptions + var options = new Stripe.Identity.VerificationReportListOptions { Limit = 3, }; - var service = new Stripe.Identity.VerificationSessionService( + var service = new Stripe.Identity.VerificationReportService( this.StripeClient); - StripeList verificationSessions = service + StripeList verificationReports = service .List(options); this.AssertRequest( HttpMethod.Get, - "/v1/identity/verification_sessions", + "/v1/identity/verification_reports", "limit=3"); } [Fact] - public void TestIdentityVerificationSessionsGet2() + public async Task TestIdentityVerificationReportsGetAsync() { - var service = new Stripe.Identity.VerificationSessionService( - this.StripeClient); - Stripe.Identity.VerificationSession verificationSession = service - .Get("vs_xxxxxxxxxxxxx"); + var options = new Stripe.Identity.VerificationReportListOptions + { + Limit = 3, + }; + var service = new Stripe.Identity.VerificationReportService( + this.StripeClient); + StripeList verificationReports = await service + .ListAsync(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/identity/verification_reports", + "limit=3"); + } + + [Fact] + public void TestIdentityVerificationReportsGetAutoPaging() + { + var options = new Stripe.Identity.VerificationReportListOptions + { + Limit = 3, + }; + var service = new Stripe.Identity.VerificationReportService( + this.StripeClient); + var verificationReport = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/identity/verification_reports", + "limit=3"); + } + + [Fact] + public async Task TestIdentityVerificationReportsGetAutoPagingAsync() + { + var options = new Stripe.Identity.VerificationReportListOptions + { + Limit = 3, + }; + var service = new Stripe.Identity.VerificationReportService( + this.StripeClient); + var verificationReport = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/identity/verification_reports", + "limit=3"); + } + + [Fact] + public void TestIdentityVerificationReportsGet2() + { + var service = new Stripe.Identity.VerificationReportService( + this.StripeClient); + Stripe.Identity.VerificationReport verificationReport = service.Get( + "vr_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/identity/verification_reports/vr_xxxxxxxxxxxxx"); + } + + [Fact] + public async Task TestIdentityVerificationReportsGet2Async() + { + var service = new Stripe.Identity.VerificationReportService( + this.StripeClient); + Stripe.Identity.VerificationReport verificationReport = await service + .GetAsync("vr_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/identity/verification_reports/vr_xxxxxxxxxxxxx"); + } + + [Fact] + public void TestIdentityVerificationSessionsCancelPost() + { + var service = new Stripe.Identity.VerificationSessionService( + this.StripeClient); + Stripe.Identity.VerificationSession verificationSession = service + .Cancel("vs_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/identity/verification_sessions/vs_xxxxxxxxxxxxx/cancel"); + } + + [Fact] + public async Task TestIdentityVerificationSessionsCancelPostAsync() + { + var service = new Stripe.Identity.VerificationSessionService( + this.StripeClient); + Stripe.Identity.VerificationSession verificationSession = await service + .CancelAsync("vs_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/identity/verification_sessions/vs_xxxxxxxxxxxxx/cancel"); + } + + [Fact] + public void TestIdentityVerificationSessionsGet() + { + var options = new Stripe.Identity.VerificationSessionListOptions + { + Limit = 3, + }; + var service = new Stripe.Identity.VerificationSessionService( + this.StripeClient); + StripeList verificationSessions = service + .List(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/identity/verification_sessions", + "limit=3"); + } + + [Fact] + public async Task TestIdentityVerificationSessionsGetAsync() + { + var options = new Stripe.Identity.VerificationSessionListOptions + { + Limit = 3, + }; + var service = new Stripe.Identity.VerificationSessionService( + this.StripeClient); + StripeList verificationSessions = await service + .ListAsync(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/identity/verification_sessions", + "limit=3"); + } + + [Fact] + public void TestIdentityVerificationSessionsGetAutoPaging() + { + var options = new Stripe.Identity.VerificationSessionListOptions + { + Limit = 3, + }; + var service = new Stripe.Identity.VerificationSessionService( + this.StripeClient); + var verificationSession = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/identity/verification_sessions", + "limit=3"); + } + + [Fact] + public async Task TestIdentityVerificationSessionsGetAutoPagingAsync() + { + var options = new Stripe.Identity.VerificationSessionListOptions + { + Limit = 3, + }; + var service = new Stripe.Identity.VerificationSessionService( + this.StripeClient); + var verificationSession = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/identity/verification_sessions", + "limit=3"); + } + + [Fact] + public void TestIdentityVerificationSessionsGet2() + { + var service = new Stripe.Identity.VerificationSessionService( + this.StripeClient); + Stripe.Identity.VerificationSession verificationSession = service + .Get("vs_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/identity/verification_sessions/vs_xxxxxxxxxxxxx"); + } + + [Fact] + public async Task TestIdentityVerificationSessionsGet2Async() + { + var service = new Stripe.Identity.VerificationSessionService( + this.StripeClient); + Stripe.Identity.VerificationSession verificationSession = await service + .GetAsync("vs_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, "/v1/identity/verification_sessions/vs_xxxxxxxxxxxxx"); @@ -1692,6 +4347,22 @@ public void TestIdentityVerificationSessionsPost() "/v1/identity/verification_sessions"); } + [Fact] + public async Task TestIdentityVerificationSessionsPostAsync() + { + var options = new Stripe.Identity.VerificationSessionCreateOptions + { + Type = "document", + }; + var service = new Stripe.Identity.VerificationSessionService( + this.StripeClient); + Stripe.Identity.VerificationSession verificationSession = await service + .CreateAsync(options); + this.AssertRequest( + HttpMethod.Post, + "/v1/identity/verification_sessions"); + } + [Fact] public void TestIdentityVerificationSessionsPost2() { @@ -1708,6 +4379,22 @@ public void TestIdentityVerificationSessionsPost2() "/v1/identity/verification_sessions/vs_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestIdentityVerificationSessionsPost2Async() + { + var options = new Stripe.Identity.VerificationSessionUpdateOptions + { + Type = "id_number", + }; + var service = new Stripe.Identity.VerificationSessionService( + this.StripeClient); + Stripe.Identity.VerificationSession verificationSession = await service + .UpdateAsync("vs_xxxxxxxxxxxxx", options); + this.AssertRequest( + HttpMethod.Post, + "/v1/identity/verification_sessions/vs_xxxxxxxxxxxxx"); + } + [Fact] public void TestIdentityVerificationSessionsRedactPost() { @@ -1720,6 +4407,18 @@ public void TestIdentityVerificationSessionsRedactPost() "/v1/identity/verification_sessions/vs_xxxxxxxxxxxxx/redact"); } + [Fact] + public async Task TestIdentityVerificationSessionsRedactPostAsync() + { + var service = new Stripe.Identity.VerificationSessionService( + this.StripeClient); + Stripe.Identity.VerificationSession verificationSession = await service + .RedactAsync("vs_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/identity/verification_sessions/vs_xxxxxxxxxxxxx/redact"); + } + [Fact] public void TestInvoiceitemsDelete() { @@ -1730,6 +4429,16 @@ public void TestInvoiceitemsDelete() "/v1/invoiceitems/ii_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestInvoiceitemsDeleteAsync() + { + var service = new InvoiceItemService(this.StripeClient); + InvoiceItem deleted = await service.DeleteAsync("ii_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Delete, + "/v1/invoiceitems/ii_xxxxxxxxxxxxx"); + } + [Fact] public void TestInvoiceitemsGet() { @@ -1739,6 +4448,35 @@ public void TestInvoiceitemsGet() this.AssertRequest(HttpMethod.Get, "/v1/invoiceitems", "limit=3"); } + [Fact] + public async Task TestInvoiceitemsGetAsync() + { + var options = new InvoiceItemListOptions { Limit = 3 }; + var service = new InvoiceItemService(this.StripeClient); + StripeList invoiceItems = await service.ListAsync( + options); + this.AssertRequest(HttpMethod.Get, "/v1/invoiceitems", "limit=3"); + } + + [Fact] + public void TestInvoiceitemsGetAutoPaging() + { + var options = new InvoiceItemListOptions { Limit = 3 }; + var service = new InvoiceItemService(this.StripeClient); + var invoiceItem = service.ListAutoPaging(options).First(); + this.AssertRequest(HttpMethod.Get, "/v1/invoiceitems", "limit=3"); + } + + [Fact] + public async Task TestInvoiceitemsGetAutoPagingAsync() + { + var options = new InvoiceItemListOptions { Limit = 3 }; + var service = new InvoiceItemService(this.StripeClient); + var invoiceItem = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/invoiceitems", "limit=3"); + } + [Fact] public void TestInvoiceitemsGet2() { @@ -1749,6 +4487,17 @@ public void TestInvoiceitemsGet2() "/v1/invoiceitems/ii_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestInvoiceitemsGet2Async() + { + var service = new InvoiceItemService(this.StripeClient); + InvoiceItem invoiceItem = await service.GetAsync( + "ii_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/invoiceitems/ii_xxxxxxxxxxxxx"); + } + [Fact] public void TestInvoiceitemsPost() { @@ -1761,6 +4510,18 @@ public void TestInvoiceitemsPost() this.AssertRequest(HttpMethod.Post, "/v1/invoiceitems"); } + [Fact] + public async Task TestInvoiceitemsPostAsync() + { + var options = new InvoiceItemCreateOptions + { + Customer = "cus_xxxxxxxxxxxxx", + }; + var service = new InvoiceItemService(this.StripeClient); + InvoiceItem invoiceItem = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/invoiceitems"); + } + [Fact] public void TestInvoiceitemsPost2() { @@ -1781,14 +4542,43 @@ public void TestInvoiceitemsPost2() } [Fact] - public void TestInvoicesDelete() + public async Task TestInvoiceitemsPost2Async() { - var service = new InvoiceService(this.StripeClient); - Invoice deleted = service.Delete("in_xxxxxxxxxxxxx"); + var options = new InvoiceItemUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new InvoiceItemService(this.StripeClient); + InvoiceItem invoiceItem = await service.UpdateAsync( + "ii_xxxxxxxxxxxxx", + options); this.AssertRequest( - HttpMethod.Delete, - "/v1/invoices/in_xxxxxxxxxxxxx"); - } + HttpMethod.Post, + "/v1/invoiceitems/ii_xxxxxxxxxxxxx"); + } + + [Fact] + public void TestInvoicesDelete() + { + var service = new InvoiceService(this.StripeClient); + Invoice deleted = service.Delete("in_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Delete, + "/v1/invoices/in_xxxxxxxxxxxxx"); + } + + [Fact] + public async Task TestInvoicesDeleteAsync() + { + var service = new InvoiceService(this.StripeClient); + Invoice deleted = await service.DeleteAsync("in_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Delete, + "/v1/invoices/in_xxxxxxxxxxxxx"); + } [Fact] public void TestInvoicesFinalizePost() @@ -1800,6 +4590,17 @@ public void TestInvoicesFinalizePost() "/v1/invoices/in_xxxxxxxxxxxxx/finalize"); } + [Fact] + public async Task TestInvoicesFinalizePostAsync() + { + var service = new InvoiceService(this.StripeClient); + Invoice invoice = await service.FinalizeInvoiceAsync( + "in_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/invoices/in_xxxxxxxxxxxxx/finalize"); + } + [Fact] public void TestInvoicesGet() { @@ -1809,6 +4610,34 @@ public void TestInvoicesGet() this.AssertRequest(HttpMethod.Get, "/v1/invoices", "limit=3"); } + [Fact] + public async Task TestInvoicesGetAsync() + { + var options = new InvoiceListOptions { Limit = 3 }; + var service = new InvoiceService(this.StripeClient); + StripeList invoices = await service.ListAsync(options); + this.AssertRequest(HttpMethod.Get, "/v1/invoices", "limit=3"); + } + + [Fact] + public void TestInvoicesGetAutoPaging() + { + var options = new InvoiceListOptions { Limit = 3 }; + var service = new InvoiceService(this.StripeClient); + var invoice = service.ListAutoPaging(options).First(); + this.AssertRequest(HttpMethod.Get, "/v1/invoices", "limit=3"); + } + + [Fact] + public async Task TestInvoicesGetAutoPagingAsync() + { + var options = new InvoiceListOptions { Limit = 3 }; + var service = new InvoiceService(this.StripeClient); + var invoice = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/invoices", "limit=3"); + } + [Fact] public void TestInvoicesGet2() { @@ -1817,6 +4646,14 @@ public void TestInvoicesGet2() this.AssertRequest(HttpMethod.Get, "/v1/invoices/in_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestInvoicesGet2Async() + { + var service = new InvoiceService(this.StripeClient); + Invoice invoice = await service.GetAsync("in_xxxxxxxxxxxxx"); + this.AssertRequest(HttpMethod.Get, "/v1/invoices/in_xxxxxxxxxxxxx"); + } + [Fact] public void TestInvoicesGet3() { @@ -1832,6 +4669,23 @@ public void TestInvoicesGet3() "expand[]=customer"); } + [Fact] + public async Task TestInvoicesGet3Async() + { + var options = new InvoiceGetOptions + { + Expand = new List { "customer" }, + }; + var service = new InvoiceService(this.StripeClient); + Invoice invoice = await service.GetAsync( + "in_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Get, + "/v1/invoices/in_xxxxxxxxxxxxx", + "expand[]=customer"); + } + [Fact] public void TestInvoicesMarkUncollectiblePost() { @@ -1842,6 +4696,17 @@ public void TestInvoicesMarkUncollectiblePost() "/v1/invoices/in_xxxxxxxxxxxxx/mark_uncollectible"); } + [Fact] + public async Task TestInvoicesMarkUncollectiblePostAsync() + { + var service = new InvoiceService(this.StripeClient); + Invoice invoice = await service.MarkUncollectibleAsync( + "in_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/invoices/in_xxxxxxxxxxxxx/mark_uncollectible"); + } + [Fact] public void TestInvoicesPayPost() { @@ -1852,6 +4717,16 @@ public void TestInvoicesPayPost() "/v1/invoices/in_xxxxxxxxxxxxx/pay"); } + [Fact] + public async Task TestInvoicesPayPostAsync() + { + var service = new InvoiceService(this.StripeClient); + Invoice invoice = await service.PayAsync("in_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/invoices/in_xxxxxxxxxxxxx/pay"); + } + [Fact] public void TestInvoicesPost() { @@ -1864,6 +4739,18 @@ public void TestInvoicesPost() this.AssertRequest(HttpMethod.Post, "/v1/invoices"); } + [Fact] + public async Task TestInvoicesPostAsync() + { + var options = new InvoiceCreateOptions + { + Customer = "cus_xxxxxxxxxxxxx", + }; + var service = new InvoiceService(this.StripeClient); + Invoice invoice = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/invoices"); + } + [Fact] public void TestInvoicesPost2() { @@ -1881,6 +4768,25 @@ public void TestInvoicesPost2() "/v1/invoices/in_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestInvoicesPost2Async() + { + var options = new InvoiceUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new InvoiceService(this.StripeClient); + Invoice invoice = await service.UpdateAsync( + "in_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/invoices/in_xxxxxxxxxxxxx"); + } + [Fact] public void TestInvoicesSearchGet() { @@ -1896,6 +4802,53 @@ public void TestInvoicesSearchGet() "query=total%3E999%20AND%20metadata%5B%27order_id%27%5D%3A%276735%27"); } + [Fact] + public async Task TestInvoicesSearchGetAsync() + { + var options = new InvoiceSearchOptions + { + Query = "total>999 AND metadata['order_id']:'6735'", + }; + var service = new InvoiceService(this.StripeClient); + StripeSearchResult invoices = await service.SearchAsync( + options); + this.AssertRequest( + HttpMethod.Get, + "/v1/invoices/search", + "query=total%3E999%20AND%20metadata%5B%27order_id%27%5D%3A%276735%27"); + } + + [Fact] + public void TestInvoicesSearchGetAutoPaging() + { + var options = new InvoiceSearchOptions + { + Query = "total>999 AND metadata['order_id']:'6735'", + }; + var service = new InvoiceService(this.StripeClient); + var invoice = service.SearchAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/invoices/search", + "query=total%3E999%20AND%20metadata%5B%27order_id%27%5D%3A%276735%27"); + } + + [Fact] + public async Task TestInvoicesSearchGetAutoPagingAsync() + { + var options = new InvoiceSearchOptions + { + Query = "total>999 AND metadata['order_id']:'6735'", + }; + var service = new InvoiceService(this.StripeClient); + var invoice = await service.SearchAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/invoices/search", + "query=total%3E999%20AND%20metadata%5B%27order_id%27%5D%3A%276735%27"); + } + [Fact] public void TestInvoicesSendPost() { @@ -1906,6 +4859,17 @@ public void TestInvoicesSendPost() "/v1/invoices/in_xxxxxxxxxxxxx/send"); } + [Fact] + public async Task TestInvoicesSendPostAsync() + { + var service = new InvoiceService(this.StripeClient); + Invoice invoice = await service.SendInvoiceAsync( + "in_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/invoices/in_xxxxxxxxxxxxx/send"); + } + [Fact] public void TestInvoicesVoidPost() { @@ -1916,6 +4880,17 @@ public void TestInvoicesVoidPost() "/v1/invoices/in_xxxxxxxxxxxxx/void"); } + [Fact] + public async Task TestInvoicesVoidPostAsync() + { + var service = new InvoiceService(this.StripeClient); + Invoice invoice = await service.VoidInvoiceAsync( + "in_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/invoices/in_xxxxxxxxxxxxx/void"); + } + [Fact] public void TestIssuingAuthorizationsApprovePost() { @@ -1928,6 +4903,18 @@ public void TestIssuingAuthorizationsApprovePost() "/v1/issuing/authorizations/iauth_xxxxxxxxxxxxx/approve"); } + [Fact] + public async Task TestIssuingAuthorizationsApprovePostAsync() + { + var service = new Stripe.Issuing.AuthorizationService( + this.StripeClient); + Stripe.Issuing.Authorization authorization = await service + .ApproveAsync("iauth_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/issuing/authorizations/iauth_xxxxxxxxxxxxx/approve"); + } + [Fact] public void TestIssuingAuthorizationsDeclinePost() { @@ -1940,6 +4927,18 @@ public void TestIssuingAuthorizationsDeclinePost() "/v1/issuing/authorizations/iauth_xxxxxxxxxxxxx/decline"); } + [Fact] + public async Task TestIssuingAuthorizationsDeclinePostAsync() + { + var service = new Stripe.Issuing.AuthorizationService( + this.StripeClient); + Stripe.Issuing.Authorization authorization = await service + .DeclineAsync("iauth_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/issuing/authorizations/iauth_xxxxxxxxxxxxx/decline"); + } + [Fact] public void TestIssuingAuthorizationsGet() { @@ -1957,6 +4956,56 @@ public void TestIssuingAuthorizationsGet() "limit=3"); } + [Fact] + public async Task TestIssuingAuthorizationsGetAsync() + { + var options = new Stripe.Issuing.AuthorizationListOptions + { + Limit = 3, + }; + var service = new Stripe.Issuing.AuthorizationService( + this.StripeClient); + StripeList authorizations = await service + .ListAsync(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/issuing/authorizations", + "limit=3"); + } + + [Fact] + public void TestIssuingAuthorizationsGetAutoPaging() + { + var options = new Stripe.Issuing.AuthorizationListOptions + { + Limit = 3, + }; + var service = new Stripe.Issuing.AuthorizationService( + this.StripeClient); + var authorization = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/issuing/authorizations", + "limit=3"); + } + + [Fact] + public async Task TestIssuingAuthorizationsGetAutoPagingAsync() + { + var options = new Stripe.Issuing.AuthorizationListOptions + { + Limit = 3, + }; + var service = new Stripe.Issuing.AuthorizationService( + this.StripeClient); + var authorization = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/issuing/authorizations", + "limit=3"); + } + [Fact] public void TestIssuingAuthorizationsGet2() { @@ -1969,6 +5018,18 @@ public void TestIssuingAuthorizationsGet2() "/v1/issuing/authorizations/iauth_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestIssuingAuthorizationsGet2Async() + { + var service = new Stripe.Issuing.AuthorizationService( + this.StripeClient); + Stripe.Issuing.Authorization authorization = await service.GetAsync( + "iauth_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/issuing/authorizations/iauth_xxxxxxxxxxxxx"); + } + [Fact] public void TestIssuingAuthorizationsPost() { @@ -1989,6 +5050,25 @@ public void TestIssuingAuthorizationsPost() "/v1/issuing/authorizations/iauth_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestIssuingAuthorizationsPostAsync() + { + var options = new Stripe.Issuing.AuthorizationUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new Stripe.Issuing.AuthorizationService( + this.StripeClient); + Stripe.Issuing.Authorization authorization = await service + .UpdateAsync("iauth_xxxxxxxxxxxxx", options); + this.AssertRequest( + HttpMethod.Post, + "/v1/issuing/authorizations/iauth_xxxxxxxxxxxxx"); + } + [Fact] public void TestIssuingCardholdersGet() { @@ -2007,9 +5087,59 @@ public void TestIssuingCardholdersGet() } [Fact] - public void TestIssuingCardholdersGet2() + public async Task TestIssuingCardholdersGetAsync() { - var service = new Stripe.Issuing.CardholderService( + var options = new Stripe.Issuing.CardholderListOptions + { + Limit = 3, + }; + var service = new Stripe.Issuing.CardholderService( + this.StripeClient); + StripeList cardholders = await service + .ListAsync(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/issuing/cardholders", + "limit=3"); + } + + [Fact] + public void TestIssuingCardholdersGetAutoPaging() + { + var options = new Stripe.Issuing.CardholderListOptions + { + Limit = 3, + }; + var service = new Stripe.Issuing.CardholderService( + this.StripeClient); + var cardholder = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/issuing/cardholders", + "limit=3"); + } + + [Fact] + public async Task TestIssuingCardholdersGetAutoPagingAsync() + { + var options = new Stripe.Issuing.CardholderListOptions + { + Limit = 3, + }; + var service = new Stripe.Issuing.CardholderService( + this.StripeClient); + var cardholder = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/issuing/cardholders", + "limit=3"); + } + + [Fact] + public void TestIssuingCardholdersGet2() + { + var service = new Stripe.Issuing.CardholderService( this.StripeClient); Stripe.Issuing.Cardholder cardholder = service.Get( "ich_xxxxxxxxxxxxx"); @@ -2018,6 +5148,18 @@ public void TestIssuingCardholdersGet2() "/v1/issuing/cardholders/ich_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestIssuingCardholdersGet2Async() + { + var service = new Stripe.Issuing.CardholderService( + this.StripeClient); + Stripe.Issuing.Cardholder cardholder = await service.GetAsync( + "ich_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/issuing/cardholders/ich_xxxxxxxxxxxxx"); + } + [Fact] public void TestIssuingCardholdersPost() { @@ -2045,6 +5187,34 @@ public void TestIssuingCardholdersPost() this.AssertRequest(HttpMethod.Post, "/v1/issuing/cardholders"); } + [Fact] + public async Task TestIssuingCardholdersPostAsync() + { + var options = new Stripe.Issuing.CardholderCreateOptions + { + Type = "individual", + Name = "Jenny Rosen", + Email = "jenny.rosen@example.com", + PhoneNumber = "+18888675309", + Billing = new Stripe.Issuing.CardholderBillingOptions + { + Address = new AddressOptions + { + Line1 = "1234 Main Street", + City = "San Francisco", + State = "CA", + Country = "US", + PostalCode = "94111", + }, + }, + }; + var service = new Stripe.Issuing.CardholderService( + this.StripeClient); + Stripe.Issuing.Cardholder cardholder = await service.CreateAsync( + options); + this.AssertRequest(HttpMethod.Post, "/v1/issuing/cardholders"); + } + [Fact] public void TestIssuingCardholdersPost2() { @@ -2065,6 +5235,26 @@ public void TestIssuingCardholdersPost2() "/v1/issuing/cardholders/ich_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestIssuingCardholdersPost2Async() + { + var options = new Stripe.Issuing.CardholderUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new Stripe.Issuing.CardholderService( + this.StripeClient); + Stripe.Issuing.Cardholder cardholder = await service.UpdateAsync( + "ich_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/issuing/cardholders/ich_xxxxxxxxxxxxx"); + } + [Fact] public void TestIssuingCardsGet() { @@ -2074,6 +5264,34 @@ public void TestIssuingCardsGet() this.AssertRequest(HttpMethod.Get, "/v1/issuing/cards", "limit=3"); } + [Fact] + public async Task TestIssuingCardsGetAsync() + { + var options = new Stripe.Issuing.CardListOptions { Limit = 3 }; + var service = new Stripe.Issuing.CardService(this.StripeClient); + StripeList cards = await service.ListAsync( + options); + this.AssertRequest(HttpMethod.Get, "/v1/issuing/cards", "limit=3"); + } + + [Fact] + public void TestIssuingCardsGetAutoPaging() + { + var options = new Stripe.Issuing.CardListOptions { Limit = 3 }; + var service = new Stripe.Issuing.CardService(this.StripeClient); + var card = service.ListAutoPaging(options).First(); + this.AssertRequest(HttpMethod.Get, "/v1/issuing/cards", "limit=3"); + } + + [Fact] + public async Task TestIssuingCardsGetAutoPagingAsync() + { + var options = new Stripe.Issuing.CardListOptions { Limit = 3 }; + var service = new Stripe.Issuing.CardService(this.StripeClient); + var card = await service.ListAutoPagingAsync(options).FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/issuing/cards", "limit=3"); + } + [Fact] public void TestIssuingCardsGet2() { @@ -2084,6 +5302,17 @@ public void TestIssuingCardsGet2() "/v1/issuing/cards/ic_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestIssuingCardsGet2Async() + { + var service = new Stripe.Issuing.CardService(this.StripeClient); + Stripe.Issuing.Card card = await service.GetAsync( + "ic_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/issuing/cards/ic_xxxxxxxxxxxxx"); + } + [Fact] public void TestIssuingCardsPost() { @@ -2098,6 +5327,20 @@ public void TestIssuingCardsPost() this.AssertRequest(HttpMethod.Post, "/v1/issuing/cards"); } + [Fact] + public async Task TestIssuingCardsPostAsync() + { + var options = new Stripe.Issuing.CardCreateOptions + { + Cardholder = "ich_xxxxxxxxxxxxx", + Currency = "usd", + Type = "virtual", + }; + var service = new Stripe.Issuing.CardService(this.StripeClient); + Stripe.Issuing.Card card = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/issuing/cards"); + } + [Fact] public void TestIssuingCardsPost2() { @@ -2117,6 +5360,25 @@ public void TestIssuingCardsPost2() "/v1/issuing/cards/ic_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestIssuingCardsPost2Async() + { + var options = new Stripe.Issuing.CardUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new Stripe.Issuing.CardService(this.StripeClient); + Stripe.Issuing.Card card = await service.UpdateAsync( + "ic_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/issuing/cards/ic_xxxxxxxxxxxxx"); + } + [Fact] public void TestIssuingDisputesGet() { @@ -2129,6 +5391,44 @@ public void TestIssuingDisputesGet() "limit=3"); } + [Fact] + public async Task TestIssuingDisputesGetAsync() + { + var options = new Stripe.Issuing.DisputeListOptions { Limit = 3 }; + var service = new Stripe.Issuing.DisputeService(this.StripeClient); + StripeList disputes = await service + .ListAsync(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/issuing/disputes", + "limit=3"); + } + + [Fact] + public void TestIssuingDisputesGetAutoPaging() + { + var options = new Stripe.Issuing.DisputeListOptions { Limit = 3 }; + var service = new Stripe.Issuing.DisputeService(this.StripeClient); + var dispute = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/issuing/disputes", + "limit=3"); + } + + [Fact] + public async Task TestIssuingDisputesGetAutoPagingAsync() + { + var options = new Stripe.Issuing.DisputeListOptions { Limit = 3 }; + var service = new Stripe.Issuing.DisputeService(this.StripeClient); + var dispute = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/issuing/disputes", + "limit=3"); + } + [Fact] public void TestIssuingDisputesGet2() { @@ -2139,6 +5439,17 @@ public void TestIssuingDisputesGet2() "/v1/issuing/disputes/idp_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestIssuingDisputesGet2Async() + { + var service = new Stripe.Issuing.DisputeService(this.StripeClient); + Stripe.Issuing.Dispute dispute = await service.GetAsync( + "idp_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/issuing/disputes/idp_xxxxxxxxxxxxx"); + } + [Fact] public void TestIssuingDisputesPost() { @@ -2159,6 +5470,26 @@ public void TestIssuingDisputesPost() this.AssertRequest(HttpMethod.Post, "/v1/issuing/disputes"); } + [Fact] + public async Task TestIssuingDisputesPostAsync() + { + var options = new Stripe.Issuing.DisputeCreateOptions + { + Transaction = "ipi_xxxxxxxxxxxxx", + Evidence = new Stripe.Issuing.DisputeEvidenceOptions + { + Reason = "fraudulent", + Fraudulent = new Stripe.Issuing.DisputeEvidenceFraudulentOptions + { + Explanation = "Purchase was unrecognized.", + }, + }, + }; + var service = new Stripe.Issuing.DisputeService(this.StripeClient); + Stripe.Issuing.Dispute dispute = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/issuing/disputes"); + } + [Fact] public void TestIssuingDisputesSubmitPost() { @@ -2170,6 +5501,17 @@ public void TestIssuingDisputesSubmitPost() "/v1/issuing/disputes/idp_xxxxxxxxxxxxx/submit"); } + [Fact] + public async Task TestIssuingDisputesSubmitPostAsync() + { + var service = new Stripe.Issuing.DisputeService(this.StripeClient); + Stripe.Issuing.Dispute dispute = await service.SubmitAsync( + "idp_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/issuing/disputes/idp_xxxxxxxxxxxxx/submit"); + } + [Fact] public void TestIssuingPersonalizationDesignsGet() { @@ -2183,56 +5525,161 @@ public void TestIssuingPersonalizationDesignsGet() } [Fact] - public void TestIssuingPersonalizationDesignsGet2() + public async Task TestIssuingPersonalizationDesignsGetAsync() { var service = new Stripe.Issuing.PersonalizationDesignService( this.StripeClient); - Stripe.Issuing.PersonalizationDesign personalizationDesign = service - .Get("pd_xyz"); + StripeList personalizationDesigns = await service + .ListAsync(); this.AssertRequest( HttpMethod.Get, - "/v1/issuing/personalization_designs/pd_xyz"); + "/v1/issuing/personalization_designs"); } [Fact] - public void TestIssuingPersonalizationDesignsPost() + public void TestIssuingPersonalizationDesignsGetAutoPaging() { - var options = new Stripe.Issuing.PersonalizationDesignCreateOptions - { - PhysicalBundle = "pb_xyz", - }; var service = new Stripe.Issuing.PersonalizationDesignService( this.StripeClient); - Stripe.Issuing.PersonalizationDesign personalizationDesign = service - .Create(options); + var personalizationDesign = service.ListAutoPaging().First(); this.AssertRequest( - HttpMethod.Post, + HttpMethod.Get, "/v1/issuing/personalization_designs"); } [Fact] - public void TestIssuingPersonalizationDesignsPost2() + public async Task TestIssuingPersonalizationDesignsGetAutoPagingAsync() + { + var service = new Stripe.Issuing.PersonalizationDesignService( + this.StripeClient); + var personalizationDesign = await service.ListAutoPagingAsync() + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/issuing/personalization_designs"); + } + + [Fact] + public void TestIssuingPersonalizationDesignsGet2() { - var options = new Stripe.Issuing.PersonalizationDesignUpdateOptions(); var service = new Stripe.Issuing.PersonalizationDesignService( this.StripeClient); Stripe.Issuing.PersonalizationDesign personalizationDesign = service - .Update("pd_xyz", options); + .Get("pd_xyz"); this.AssertRequest( - HttpMethod.Post, + HttpMethod.Get, "/v1/issuing/personalization_designs/pd_xyz"); } [Fact] - public void TestIssuingPhysicalBundlesGet() + public async Task TestIssuingPersonalizationDesignsGet2Async() { - var service = new Stripe.Issuing.PhysicalBundleService( + var service = new Stripe.Issuing.PersonalizationDesignService( + this.StripeClient); + Stripe.Issuing.PersonalizationDesign personalizationDesign = await service + .GetAsync("pd_xyz"); + this.AssertRequest( + HttpMethod.Get, + "/v1/issuing/personalization_designs/pd_xyz"); + } + + [Fact] + public void TestIssuingPersonalizationDesignsPost() + { + var options = new Stripe.Issuing.PersonalizationDesignCreateOptions + { + PhysicalBundle = "pb_xyz", + }; + var service = new Stripe.Issuing.PersonalizationDesignService( + this.StripeClient); + Stripe.Issuing.PersonalizationDesign personalizationDesign = service + .Create(options); + this.AssertRequest( + HttpMethod.Post, + "/v1/issuing/personalization_designs"); + } + + [Fact] + public async Task TestIssuingPersonalizationDesignsPostAsync() + { + var options = new Stripe.Issuing.PersonalizationDesignCreateOptions + { + PhysicalBundle = "pb_xyz", + }; + var service = new Stripe.Issuing.PersonalizationDesignService( + this.StripeClient); + Stripe.Issuing.PersonalizationDesign personalizationDesign = await service + .CreateAsync(options); + this.AssertRequest( + HttpMethod.Post, + "/v1/issuing/personalization_designs"); + } + + [Fact] + public void TestIssuingPersonalizationDesignsPost2() + { + var options = new Stripe.Issuing.PersonalizationDesignUpdateOptions(); + var service = new Stripe.Issuing.PersonalizationDesignService( + this.StripeClient); + Stripe.Issuing.PersonalizationDesign personalizationDesign = service + .Update("pd_xyz", options); + this.AssertRequest( + HttpMethod.Post, + "/v1/issuing/personalization_designs/pd_xyz"); + } + + [Fact] + public async Task TestIssuingPersonalizationDesignsPost2Async() + { + var options = new Stripe.Issuing.PersonalizationDesignUpdateOptions(); + var service = new Stripe.Issuing.PersonalizationDesignService( + this.StripeClient); + Stripe.Issuing.PersonalizationDesign personalizationDesign = await service + .UpdateAsync("pd_xyz", options); + this.AssertRequest( + HttpMethod.Post, + "/v1/issuing/personalization_designs/pd_xyz"); + } + + [Fact] + public void TestIssuingPhysicalBundlesGet() + { + var service = new Stripe.Issuing.PhysicalBundleService( this.StripeClient); StripeList physicalBundles = service .List(); this.AssertRequest(HttpMethod.Get, "/v1/issuing/physical_bundles"); } + [Fact] + public async Task TestIssuingPhysicalBundlesGetAsync() + { + var service = new Stripe.Issuing.PhysicalBundleService( + this.StripeClient); + StripeList physicalBundles = await service + .ListAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/issuing/physical_bundles"); + } + + [Fact] + public void TestIssuingPhysicalBundlesGetAutoPaging() + { + var service = new Stripe.Issuing.PhysicalBundleService( + this.StripeClient); + var physicalBundle = service.ListAutoPaging().First(); + this.AssertRequest(HttpMethod.Get, "/v1/issuing/physical_bundles"); + } + + [Fact] + public async Task TestIssuingPhysicalBundlesGetAutoPagingAsync() + { + var service = new Stripe.Issuing.PhysicalBundleService( + this.StripeClient); + var physicalBundle = await service.ListAutoPagingAsync() + .FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/issuing/physical_bundles"); + } + [Fact] public void TestIssuingPhysicalBundlesGet2() { @@ -2245,6 +5692,18 @@ public void TestIssuingPhysicalBundlesGet2() "/v1/issuing/physical_bundles/pb_xyz"); } + [Fact] + public async Task TestIssuingPhysicalBundlesGet2Async() + { + var service = new Stripe.Issuing.PhysicalBundleService( + this.StripeClient); + Stripe.Issuing.PhysicalBundle physicalBundle = await service + .GetAsync("pb_xyz"); + this.AssertRequest( + HttpMethod.Get, + "/v1/issuing/physical_bundles/pb_xyz"); + } + [Fact] public void TestIssuingTransactionsGet() { @@ -2262,6 +5721,56 @@ public void TestIssuingTransactionsGet() "limit=3"); } + [Fact] + public async Task TestIssuingTransactionsGetAsync() + { + var options = new Stripe.Issuing.TransactionListOptions + { + Limit = 3, + }; + var service = new Stripe.Issuing.TransactionService( + this.StripeClient); + StripeList transactions = await service + .ListAsync(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/issuing/transactions", + "limit=3"); + } + + [Fact] + public void TestIssuingTransactionsGetAutoPaging() + { + var options = new Stripe.Issuing.TransactionListOptions + { + Limit = 3, + }; + var service = new Stripe.Issuing.TransactionService( + this.StripeClient); + var transaction = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/issuing/transactions", + "limit=3"); + } + + [Fact] + public async Task TestIssuingTransactionsGetAutoPagingAsync() + { + var options = new Stripe.Issuing.TransactionListOptions + { + Limit = 3, + }; + var service = new Stripe.Issuing.TransactionService( + this.StripeClient); + var transaction = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/issuing/transactions", + "limit=3"); + } + [Fact] public void TestIssuingTransactionsGet2() { @@ -2274,6 +5783,18 @@ public void TestIssuingTransactionsGet2() "/v1/issuing/transactions/ipi_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestIssuingTransactionsGet2Async() + { + var service = new Stripe.Issuing.TransactionService( + this.StripeClient); + Stripe.Issuing.Transaction transaction = await service.GetAsync( + "ipi_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/issuing/transactions/ipi_xxxxxxxxxxxxx"); + } + [Fact] public void TestIssuingTransactionsPost() { @@ -2294,6 +5815,26 @@ public void TestIssuingTransactionsPost() "/v1/issuing/transactions/ipi_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestIssuingTransactionsPostAsync() + { + var options = new Stripe.Issuing.TransactionUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new Stripe.Issuing.TransactionService( + this.StripeClient); + Stripe.Issuing.Transaction transaction = await service.UpdateAsync( + "ipi_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/issuing/transactions/ipi_xxxxxxxxxxxxx"); + } + [Fact] public void TestMandatesGet() { @@ -2304,6 +5845,16 @@ public void TestMandatesGet() "/v1/mandates/mandate_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestMandatesGetAsync() + { + var service = new MandateService(this.StripeClient); + Mandate mandate = await service.GetAsync("mandate_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/mandates/mandate_xxxxxxxxxxxxx"); + } + [Fact] public void TestPaymentIntentsApplyCustomerBalancePost() { @@ -2315,6 +5866,17 @@ public void TestPaymentIntentsApplyCustomerBalancePost() "/v1/payment_intents/pi_xxxxxxxxxxxxx/apply_customer_balance"); } + [Fact] + public async Task TestPaymentIntentsApplyCustomerBalancePostAsync() + { + var service = new PaymentIntentService(this.StripeClient); + PaymentIntent paymentIntent = await service + .ApplyCustomerBalanceAsync("pi_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/payment_intents/pi_xxxxxxxxxxxxx/apply_customer_balance"); + } + [Fact] public void TestPaymentIntentsCancelPost() { @@ -2325,6 +5887,17 @@ public void TestPaymentIntentsCancelPost() "/v1/payment_intents/pi_xxxxxxxxxxxxx/cancel"); } + [Fact] + public async Task TestPaymentIntentsCancelPostAsync() + { + var service = new PaymentIntentService(this.StripeClient); + PaymentIntent paymentIntent = await service.CancelAsync( + "pi_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/payment_intents/pi_xxxxxxxxxxxxx/cancel"); + } + [Fact] public void TestPaymentIntentsCapturePost() { @@ -2335,6 +5908,17 @@ public void TestPaymentIntentsCapturePost() "/v1/payment_intents/pi_xxxxxxxxxxxxx/capture"); } + [Fact] + public async Task TestPaymentIntentsCapturePostAsync() + { + var service = new PaymentIntentService(this.StripeClient); + PaymentIntent paymentIntent = await service.CaptureAsync( + "pi_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/payment_intents/pi_xxxxxxxxxxxxx/capture"); + } + [Fact] public void TestPaymentIntentsConfirmPost() { @@ -2351,6 +5935,22 @@ public void TestPaymentIntentsConfirmPost() "/v1/payment_intents/pi_xxxxxxxxxxxxx/confirm"); } + [Fact] + public async Task TestPaymentIntentsConfirmPostAsync() + { + var options = new PaymentIntentConfirmOptions + { + PaymentMethod = "pm_card_visa", + }; + var service = new PaymentIntentService(this.StripeClient); + PaymentIntent paymentIntent = await service.ConfirmAsync( + "pi_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/payment_intents/pi_xxxxxxxxxxxxx/confirm"); + } + [Fact] public void TestPaymentIntentsGet() { @@ -2363,6 +5963,44 @@ public void TestPaymentIntentsGet() "limit=3"); } + [Fact] + public async Task TestPaymentIntentsGetAsync() + { + var options = new PaymentIntentListOptions { Limit = 3 }; + var service = new PaymentIntentService(this.StripeClient); + StripeList paymentIntents = await service.ListAsync( + options); + this.AssertRequest( + HttpMethod.Get, + "/v1/payment_intents", + "limit=3"); + } + + [Fact] + public void TestPaymentIntentsGetAutoPaging() + { + var options = new PaymentIntentListOptions { Limit = 3 }; + var service = new PaymentIntentService(this.StripeClient); + var paymentIntent = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/payment_intents", + "limit=3"); + } + + [Fact] + public async Task TestPaymentIntentsGetAutoPagingAsync() + { + var options = new PaymentIntentListOptions { Limit = 3 }; + var service = new PaymentIntentService(this.StripeClient); + var paymentIntent = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/payment_intents", + "limit=3"); + } + [Fact] public void TestPaymentIntentsGet2() { @@ -2373,6 +6011,17 @@ public void TestPaymentIntentsGet2() "/v1/payment_intents/pi_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestPaymentIntentsGet2Async() + { + var service = new PaymentIntentService(this.StripeClient); + PaymentIntent paymentIntent = await service.GetAsync( + "pi_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/payment_intents/pi_xxxxxxxxxxxxx"); + } + [Fact] public void TestPaymentIntentsIncrementAuthorizationPost() { @@ -2390,13 +6039,28 @@ public void TestPaymentIntentsIncrementAuthorizationPost() } [Fact] - public void TestPaymentIntentsPost() + public async Task TestPaymentIntentsIncrementAuthorizationPostAsync() { - var options = new PaymentIntentCreateOptions + var options = new PaymentIntentIncrementAuthorizationOptions { - Amount = 1099, - Currency = "eur", - AutomaticPaymentMethods = new PaymentIntentAutomaticPaymentMethodsOptions + Amount = 2099, + }; + var service = new PaymentIntentService(this.StripeClient); + PaymentIntent paymentIntent = await service + .IncrementAuthorizationAsync("pi_xxxxxxxxxxxxx", options); + this.AssertRequest( + HttpMethod.Post, + "/v1/payment_intents/pi_xxxxxxxxxxxxx/increment_authorization"); + } + + [Fact] + public void TestPaymentIntentsPost() + { + var options = new PaymentIntentCreateOptions + { + Amount = 1099, + Currency = "eur", + AutomaticPaymentMethods = new PaymentIntentAutomaticPaymentMethodsOptions { Enabled = true, }, @@ -2406,6 +6070,23 @@ public void TestPaymentIntentsPost() this.AssertRequest(HttpMethod.Post, "/v1/payment_intents"); } + [Fact] + public async Task TestPaymentIntentsPostAsync() + { + var options = new PaymentIntentCreateOptions + { + Amount = 1099, + Currency = "eur", + AutomaticPaymentMethods = new PaymentIntentAutomaticPaymentMethodsOptions + { + Enabled = true, + }, + }; + var service = new PaymentIntentService(this.StripeClient); + PaymentIntent paymentIntent = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/payment_intents"); + } + [Fact] public void TestPaymentIntentsPost2() { @@ -2423,6 +6104,23 @@ public void TestPaymentIntentsPost2() this.AssertRequest(HttpMethod.Post, "/v1/payment_intents"); } + [Fact] + public async Task TestPaymentIntentsPost2Async() + { + var options = new PaymentIntentCreateOptions + { + Amount = 2000, + Currency = "usd", + AutomaticPaymentMethods = new PaymentIntentAutomaticPaymentMethodsOptions + { + Enabled = true, + }, + }; + var service = new PaymentIntentService(this.StripeClient); + PaymentIntent paymentIntent = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/payment_intents"); + } + [Fact] public void TestPaymentIntentsPost3() { @@ -2442,6 +6140,25 @@ public void TestPaymentIntentsPost3() "/v1/payment_intents/pi_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestPaymentIntentsPost3Async() + { + var options = new PaymentIntentUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new PaymentIntentService(this.StripeClient); + PaymentIntent paymentIntent = await service.UpdateAsync( + "pi_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/payment_intents/pi_xxxxxxxxxxxxx"); + } + [Fact] public void TestPaymentIntentsPost4() { @@ -2463,6 +6180,27 @@ public void TestPaymentIntentsPost4() this.AssertRequest(HttpMethod.Post, "/v1/payment_intents"); } + [Fact] + public async Task TestPaymentIntentsPost4Async() + { + var options = new PaymentIntentCreateOptions + { + Amount = 200, + Currency = "usd", + PaymentMethodData = new PaymentIntentPaymentMethodDataOptions + { + Type = "p24", + P24 = new PaymentIntentPaymentMethodDataP24Options + { + Bank = "blik", + }, + }, + }; + var service = new PaymentIntentService(this.StripeClient); + PaymentIntent paymentIntent = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/payment_intents"); + } + [Fact] public void TestPaymentIntentsSearchGet() { @@ -2479,6 +6217,53 @@ public void TestPaymentIntentsSearchGet() "query=status%3A%27succeeded%27%20AND%20metadata%5B%27order_id%27%5D%3A%276735%27"); } + [Fact] + public async Task TestPaymentIntentsSearchGetAsync() + { + var options = new PaymentIntentSearchOptions + { + Query = "status:'succeeded' AND metadata['order_id']:'6735'", + }; + var service = new PaymentIntentService(this.StripeClient); + StripeSearchResult paymentIntents = await service + .SearchAsync(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/payment_intents/search", + "query=status%3A%27succeeded%27%20AND%20metadata%5B%27order_id%27%5D%3A%276735%27"); + } + + [Fact] + public void TestPaymentIntentsSearchGetAutoPaging() + { + var options = new PaymentIntentSearchOptions + { + Query = "status:'succeeded' AND metadata['order_id']:'6735'", + }; + var service = new PaymentIntentService(this.StripeClient); + var paymentIntent = service.SearchAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/payment_intents/search", + "query=status%3A%27succeeded%27%20AND%20metadata%5B%27order_id%27%5D%3A%276735%27"); + } + + [Fact] + public async Task TestPaymentIntentsSearchGetAutoPagingAsync() + { + var options = new PaymentIntentSearchOptions + { + Query = "status:'succeeded' AND metadata['order_id']:'6735'", + }; + var service = new PaymentIntentService(this.StripeClient); + var paymentIntent = await service.SearchAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/payment_intents/search", + "query=status%3A%27succeeded%27%20AND%20metadata%5B%27order_id%27%5D%3A%276735%27"); + } + [Fact] public void TestPaymentIntentsVerifyMicrodepositsPost() { @@ -2490,6 +6275,17 @@ public void TestPaymentIntentsVerifyMicrodepositsPost() "/v1/payment_intents/pi_xxxxxxxxxxxxx/verify_microdeposits"); } + [Fact] + public async Task TestPaymentIntentsVerifyMicrodepositsPostAsync() + { + var service = new PaymentIntentService(this.StripeClient); + PaymentIntent paymentIntent = await service + .VerifyMicrodepositsAsync("pi_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/payment_intents/pi_xxxxxxxxxxxxx/verify_microdeposits"); + } + [Fact] public void TestPaymentIntentsVerifyMicrodepositsPost2() { @@ -2506,6 +6302,21 @@ public void TestPaymentIntentsVerifyMicrodepositsPost2() "/v1/payment_intents/pi_xxxxxxxxxxxxx/verify_microdeposits"); } + [Fact] + public async Task TestPaymentIntentsVerifyMicrodepositsPost2Async() + { + var options = new PaymentIntentVerifyMicrodepositsOptions + { + Amounts = new List { 32, 45 }, + }; + var service = new PaymentIntentService(this.StripeClient); + PaymentIntent paymentIntent = await service + .VerifyMicrodepositsAsync("pi_xxxxxxxxxxxxx", options); + this.AssertRequest( + HttpMethod.Post, + "/v1/payment_intents/pi_xxxxxxxxxxxxx/verify_microdeposits"); + } + [Fact] public void TestPaymentLinksGet() { @@ -2514,6 +6325,14 @@ public void TestPaymentLinksGet() this.AssertRequest(HttpMethod.Get, "/v1/payment_links/pl_xyz"); } + [Fact] + public async Task TestPaymentLinksGetAsync() + { + var service = new PaymentLinkService(this.StripeClient); + PaymentLink paymentLink = await service.GetAsync("pl_xyz"); + this.AssertRequest(HttpMethod.Get, "/v1/payment_links/pl_xyz"); + } + [Fact] public void TestPaymentLinksGet2() { @@ -2523,6 +6342,35 @@ public void TestPaymentLinksGet2() this.AssertRequest(HttpMethod.Get, "/v1/payment_links", "limit=3"); } + [Fact] + public async Task TestPaymentLinksGet2Async() + { + var options = new PaymentLinkListOptions { Limit = 3 }; + var service = new PaymentLinkService(this.StripeClient); + StripeList paymentLinks = await service.ListAsync( + options); + this.AssertRequest(HttpMethod.Get, "/v1/payment_links", "limit=3"); + } + + [Fact] + public void TestPaymentLinksGet2AutoPaging() + { + var options = new PaymentLinkListOptions { Limit = 3 }; + var service = new PaymentLinkService(this.StripeClient); + var paymentLink = service.ListAutoPaging(options).First(); + this.AssertRequest(HttpMethod.Get, "/v1/payment_links", "limit=3"); + } + + [Fact] + public async Task TestPaymentLinksGet2AutoPagingAsync() + { + var options = new PaymentLinkListOptions { Limit = 3 }; + var service = new PaymentLinkService(this.StripeClient); + var paymentLink = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/payment_links", "limit=3"); + } + [Fact] public void TestPaymentLinksGet3() { @@ -2533,6 +6381,17 @@ public void TestPaymentLinksGet3() "/v1/payment_links/plink_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestPaymentLinksGet3Async() + { + var service = new PaymentLinkService(this.StripeClient); + PaymentLink paymentLink = await service.GetAsync( + "plink_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/payment_links/plink_xxxxxxxxxxxxx"); + } + [Fact] public void TestPaymentLinksLineItemsGet() { @@ -2543,6 +6402,37 @@ public void TestPaymentLinksLineItemsGet() "/v1/payment_links/pl_xyz/line_items"); } + [Fact] + public async Task TestPaymentLinksLineItemsGetAsync() + { + var service = new PaymentLinkLineItemService(this.StripeClient); + StripeList lineItems = await service.ListAsync("pl_xyz"); + this.AssertRequest( + HttpMethod.Get, + "/v1/payment_links/pl_xyz/line_items"); + } + + [Fact] + public void TestPaymentLinksLineItemsGetAutoPaging() + { + var service = new PaymentLinkLineItemService(this.StripeClient); + var lineItem = service.ListAutoPaging("pl_xyz").First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/payment_links/pl_xyz/line_items"); + } + + [Fact] + public async Task TestPaymentLinksLineItemsGetAutoPagingAsync() + { + var service = new PaymentLinkLineItemService(this.StripeClient); + var lineItem = await service.ListAutoPagingAsync("pl_xyz") + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/payment_links/pl_xyz/line_items"); + } + [Fact] public void TestPaymentLinksPost() { @@ -2562,6 +6452,25 @@ public void TestPaymentLinksPost() this.AssertRequest(HttpMethod.Post, "/v1/payment_links"); } + [Fact] + public async Task TestPaymentLinksPostAsync() + { + var options = new PaymentLinkCreateOptions + { + LineItems = new List + { + new PaymentLinkLineItemOptions + { + Price = "price_xxxxxxxxxxxxx", + Quantity = 1, + }, + }, + }; + var service = new PaymentLinkService(this.StripeClient); + PaymentLink paymentLink = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/payment_links"); + } + [Fact] public void TestPaymentLinksPost2() { @@ -2581,6 +6490,25 @@ public void TestPaymentLinksPost2() this.AssertRequest(HttpMethod.Post, "/v1/payment_links"); } + [Fact] + public async Task TestPaymentLinksPost2Async() + { + var options = new PaymentLinkCreateOptions + { + LineItems = new List + { + new PaymentLinkLineItemOptions + { + Price = "price_xxxxxxxxxxxxx", + Quantity = 1, + }, + }, + }; + var service = new PaymentLinkService(this.StripeClient); + PaymentLink paymentLink = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/payment_links"); + } + [Fact] public void TestPaymentLinksPost3() { @@ -2594,6 +6522,19 @@ public void TestPaymentLinksPost3() "/v1/payment_links/plink_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestPaymentLinksPost3Async() + { + var options = new PaymentLinkUpdateOptions { Active = false }; + var service = new PaymentLinkService(this.StripeClient); + PaymentLink paymentLink = await service.UpdateAsync( + "plink_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/payment_links/plink_xxxxxxxxxxxxx"); + } + [Fact] public void TestPaymentMethodConfigurationsGet() { @@ -2612,15 +6553,79 @@ public void TestPaymentMethodConfigurationsGet() } [Fact] - public void TestPaymentMethodConfigurationsGet2() + public async Task TestPaymentMethodConfigurationsGetAsync() { + var options = new PaymentMethodConfigurationListOptions + { + Application = "foo", + }; var service = new PaymentMethodConfigurationService( this.StripeClient); - PaymentMethodConfiguration paymentMethodConfiguration = service.Get( - "foo"); + StripeList paymentMethodConfigurations = await service + .ListAsync(options); this.AssertRequest( HttpMethod.Get, - "/v1/payment_method_configurations/foo"); + "/v1/payment_method_configurations", + "application=foo"); + } + + [Fact] + public void TestPaymentMethodConfigurationsGetAutoPaging() + { + var options = new PaymentMethodConfigurationListOptions + { + Application = "foo", + }; + var service = new PaymentMethodConfigurationService( + this.StripeClient); + var paymentMethodConfiguration = service.ListAutoPaging(options) + .First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/payment_method_configurations", + "application=foo"); + } + + [Fact] + public async Task TestPaymentMethodConfigurationsGetAutoPagingAsync() + { + var options = new PaymentMethodConfigurationListOptions + { + Application = "foo", + }; + var service = new PaymentMethodConfigurationService( + this.StripeClient); + var paymentMethodConfiguration = await service.ListAutoPagingAsync( + options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/payment_method_configurations", + "application=foo"); + } + + [Fact] + public void TestPaymentMethodConfigurationsGet2() + { + var service = new PaymentMethodConfigurationService( + this.StripeClient); + PaymentMethodConfiguration paymentMethodConfiguration = service.Get( + "foo"); + this.AssertRequest( + HttpMethod.Get, + "/v1/payment_method_configurations/foo"); + } + + [Fact] + public async Task TestPaymentMethodConfigurationsGet2Async() + { + var service = new PaymentMethodConfigurationService( + this.StripeClient); + PaymentMethodConfiguration paymentMethodConfiguration = await service + .GetAsync("foo"); + this.AssertRequest( + HttpMethod.Get, + "/v1/payment_method_configurations/foo"); } [Fact] @@ -2652,6 +6657,35 @@ public void TestPaymentMethodConfigurationsPost() "/v1/payment_method_configurations"); } + [Fact] + public async Task TestPaymentMethodConfigurationsPostAsync() + { + var options = new PaymentMethodConfigurationCreateOptions + { + AcssDebit = new PaymentMethodConfigurationAcssDebitOptions + { + DisplayPreference = new PaymentMethodConfigurationAcssDebitDisplayPreferenceOptions + { + Preference = "none", + }, + }, + Affirm = new PaymentMethodConfigurationAffirmOptions + { + DisplayPreference = new PaymentMethodConfigurationAffirmDisplayPreferenceOptions + { + Preference = "none", + }, + }, + }; + var service = new PaymentMethodConfigurationService( + this.StripeClient); + PaymentMethodConfiguration paymentMethodConfiguration = await service + .CreateAsync(options); + this.AssertRequest( + HttpMethod.Post, + "/v1/payment_method_configurations"); + } + [Fact] public void TestPaymentMethodConfigurationsPost2() { @@ -2674,6 +6708,28 @@ public void TestPaymentMethodConfigurationsPost2() "/v1/payment_method_configurations/foo"); } + [Fact] + public async Task TestPaymentMethodConfigurationsPost2Async() + { + var options = new PaymentMethodConfigurationUpdateOptions + { + AcssDebit = new PaymentMethodConfigurationAcssDebitOptions + { + DisplayPreference = new PaymentMethodConfigurationAcssDebitDisplayPreferenceOptions + { + Preference = "on", + }, + }, + }; + var service = new PaymentMethodConfigurationService( + this.StripeClient); + PaymentMethodConfiguration paymentMethodConfiguration = await service + .UpdateAsync("foo", options); + this.AssertRequest( + HttpMethod.Post, + "/v1/payment_method_configurations/foo"); + } + [Fact] public void TestPaymentMethodsAttachPost() { @@ -2690,6 +6746,22 @@ public void TestPaymentMethodsAttachPost() "/v1/payment_methods/pm_xxxxxxxxxxxxx/attach"); } + [Fact] + public async Task TestPaymentMethodsAttachPostAsync() + { + var options = new PaymentMethodAttachOptions + { + Customer = "cus_xxxxxxxxxxxxx", + }; + var service = new PaymentMethodService(this.StripeClient); + PaymentMethod paymentMethod = await service.AttachAsync( + "pm_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/payment_methods/pm_xxxxxxxxxxxxx/attach"); + } + [Fact] public void TestPaymentMethodsDetachPost() { @@ -2700,6 +6772,17 @@ public void TestPaymentMethodsDetachPost() "/v1/payment_methods/pm_xxxxxxxxxxxxx/detach"); } + [Fact] + public async Task TestPaymentMethodsDetachPostAsync() + { + var service = new PaymentMethodService(this.StripeClient); + PaymentMethod paymentMethod = await service.DetachAsync( + "pm_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/payment_methods/pm_xxxxxxxxxxxxx/detach"); + } + [Fact] public void TestPaymentMethodsGet() { @@ -2716,6 +6799,56 @@ public void TestPaymentMethodsGet() "customer=cus_xxxxxxxxxxxxx&type=card"); } + [Fact] + public async Task TestPaymentMethodsGetAsync() + { + var options = new PaymentMethodListOptions + { + Customer = "cus_xxxxxxxxxxxxx", + Type = "card", + }; + var service = new PaymentMethodService(this.StripeClient); + StripeList paymentMethods = await service.ListAsync( + options); + this.AssertRequest( + HttpMethod.Get, + "/v1/payment_methods", + "customer=cus_xxxxxxxxxxxxx&type=card"); + } + + [Fact] + public void TestPaymentMethodsGetAutoPaging() + { + var options = new PaymentMethodListOptions + { + Customer = "cus_xxxxxxxxxxxxx", + Type = "card", + }; + var service = new PaymentMethodService(this.StripeClient); + var paymentMethod = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/payment_methods", + "customer=cus_xxxxxxxxxxxxx&type=card"); + } + + [Fact] + public async Task TestPaymentMethodsGetAutoPagingAsync() + { + var options = new PaymentMethodListOptions + { + Customer = "cus_xxxxxxxxxxxxx", + Type = "card", + }; + var service = new PaymentMethodService(this.StripeClient); + var paymentMethod = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/payment_methods", + "customer=cus_xxxxxxxxxxxxx&type=card"); + } + [Fact] public void TestPaymentMethodsGet2() { @@ -2726,6 +6859,17 @@ public void TestPaymentMethodsGet2() "/v1/payment_methods/pm_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestPaymentMethodsGet2Async() + { + var service = new PaymentMethodService(this.StripeClient); + PaymentMethod paymentMethod = await service.GetAsync( + "pm_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/payment_methods/pm_xxxxxxxxxxxxx"); + } + [Fact] public void TestPaymentMethodsPost() { @@ -2745,6 +6889,25 @@ public void TestPaymentMethodsPost() this.AssertRequest(HttpMethod.Post, "/v1/payment_methods"); } + [Fact] + public async Task TestPaymentMethodsPostAsync() + { + var options = new PaymentMethodCreateOptions + { + Type = "card", + Card = new PaymentMethodCardOptions + { + Number = "4242424242424242", + ExpMonth = 8, + ExpYear = 2024, + Cvc = "314", + }, + }; + var service = new PaymentMethodService(this.StripeClient); + PaymentMethod paymentMethod = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/payment_methods"); + } + [Fact] public void TestPaymentMethodsPost2() { @@ -2764,6 +6927,25 @@ public void TestPaymentMethodsPost2() "/v1/payment_methods/pm_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestPaymentMethodsPost2Async() + { + var options = new PaymentMethodUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new PaymentMethodService(this.StripeClient); + PaymentMethod paymentMethod = await service.UpdateAsync( + "pm_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/payment_methods/pm_xxxxxxxxxxxxx"); + } + [Fact] public void TestPayoutsCancelPost() { @@ -2774,6 +6956,16 @@ public void TestPayoutsCancelPost() "/v1/payouts/po_xxxxxxxxxxxxx/cancel"); } + [Fact] + public async Task TestPayoutsCancelPostAsync() + { + var service = new PayoutService(this.StripeClient); + Payout payout = await service.CancelAsync("po_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/payouts/po_xxxxxxxxxxxxx/cancel"); + } + [Fact] public void TestPayoutsGet() { @@ -2783,6 +6975,34 @@ public void TestPayoutsGet() this.AssertRequest(HttpMethod.Get, "/v1/payouts", "limit=3"); } + [Fact] + public async Task TestPayoutsGetAsync() + { + var options = new PayoutListOptions { Limit = 3 }; + var service = new PayoutService(this.StripeClient); + StripeList payouts = await service.ListAsync(options); + this.AssertRequest(HttpMethod.Get, "/v1/payouts", "limit=3"); + } + + [Fact] + public void TestPayoutsGetAutoPaging() + { + var options = new PayoutListOptions { Limit = 3 }; + var service = new PayoutService(this.StripeClient); + var payout = service.ListAutoPaging(options).First(); + this.AssertRequest(HttpMethod.Get, "/v1/payouts", "limit=3"); + } + + [Fact] + public async Task TestPayoutsGetAutoPagingAsync() + { + var options = new PayoutListOptions { Limit = 3 }; + var service = new PayoutService(this.StripeClient); + var payout = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/payouts", "limit=3"); + } + [Fact] public void TestPayoutsGet2() { @@ -2791,6 +7011,14 @@ public void TestPayoutsGet2() this.AssertRequest(HttpMethod.Get, "/v1/payouts/po_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestPayoutsGet2Async() + { + var service = new PayoutService(this.StripeClient); + Payout payout = await service.GetAsync("po_xxxxxxxxxxxxx"); + this.AssertRequest(HttpMethod.Get, "/v1/payouts/po_xxxxxxxxxxxxx"); + } + [Fact] public void TestPayoutsPost() { @@ -2804,6 +7032,19 @@ public void TestPayoutsPost() this.AssertRequest(HttpMethod.Post, "/v1/payouts"); } + [Fact] + public async Task TestPayoutsPostAsync() + { + var options = new PayoutCreateOptions + { + Amount = 1100, + Currency = "usd", + }; + var service = new PayoutService(this.StripeClient); + Payout payout = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/payouts"); + } + [Fact] public void TestPayoutsPost2() { @@ -2820,10 +7061,37 @@ public void TestPayoutsPost2() } [Fact] - public void TestPayoutsReversePost() + public async Task TestPayoutsPost2Async() { + var options = new PayoutUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; var service = new PayoutService(this.StripeClient); - Payout payout = service.Reverse("po_xxxxxxxxxxxxx"); + Payout payout = await service.UpdateAsync( + "po_xxxxxxxxxxxxx", + options); + this.AssertRequest(HttpMethod.Post, "/v1/payouts/po_xxxxxxxxxxxxx"); + } + + [Fact] + public void TestPayoutsReversePost() + { + var service = new PayoutService(this.StripeClient); + Payout payout = service.Reverse("po_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/payouts/po_xxxxxxxxxxxxx/reverse"); + } + + [Fact] + public async Task TestPayoutsReversePostAsync() + { + var service = new PayoutService(this.StripeClient); + Payout payout = await service.ReverseAsync("po_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Post, "/v1/payouts/po_xxxxxxxxxxxxx/reverse"); @@ -2839,6 +7107,16 @@ public void TestPlansDelete() "/v1/plans/price_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestPlansDeleteAsync() + { + var service = new PlanService(this.StripeClient); + Plan deleted = await service.DeleteAsync("price_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Delete, + "/v1/plans/price_xxxxxxxxxxxxx"); + } + [Fact] public void TestPlansGet() { @@ -2848,6 +7126,33 @@ public void TestPlansGet() this.AssertRequest(HttpMethod.Get, "/v1/plans", "limit=3"); } + [Fact] + public async Task TestPlansGetAsync() + { + var options = new PlanListOptions { Limit = 3 }; + var service = new PlanService(this.StripeClient); + StripeList plans = await service.ListAsync(options); + this.AssertRequest(HttpMethod.Get, "/v1/plans", "limit=3"); + } + + [Fact] + public void TestPlansGetAutoPaging() + { + var options = new PlanListOptions { Limit = 3 }; + var service = new PlanService(this.StripeClient); + var plan = service.ListAutoPaging(options).First(); + this.AssertRequest(HttpMethod.Get, "/v1/plans", "limit=3"); + } + + [Fact] + public async Task TestPlansGetAutoPagingAsync() + { + var options = new PlanListOptions { Limit = 3 }; + var service = new PlanService(this.StripeClient); + var plan = await service.ListAutoPagingAsync(options).FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/plans", "limit=3"); + } + [Fact] public void TestPlansGet2() { @@ -2856,6 +7161,14 @@ public void TestPlansGet2() this.AssertRequest(HttpMethod.Get, "/v1/plans/price_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestPlansGet2Async() + { + var service = new PlanService(this.StripeClient); + Plan plan = await service.GetAsync("price_xxxxxxxxxxxxx"); + this.AssertRequest(HttpMethod.Get, "/v1/plans/price_xxxxxxxxxxxxx"); + } + [Fact] public void TestPlansPost() { @@ -2871,6 +7184,21 @@ public void TestPlansPost() this.AssertRequest(HttpMethod.Post, "/v1/plans"); } + [Fact] + public async Task TestPlansPostAsync() + { + var options = new PlanCreateOptions + { + Amount = 2000, + Currency = "usd", + Interval = "month", + Product = "prod_xxxxxxxxxxxxx", + }; + var service = new PlanService(this.StripeClient); + Plan plan = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/plans"); + } + [Fact] public void TestPlansPost2() { @@ -2886,6 +7214,21 @@ public void TestPlansPost2() this.AssertRequest(HttpMethod.Post, "/v1/plans"); } + [Fact] + public async Task TestPlansPost2Async() + { + var options = new PlanCreateOptions + { + Amount = 2000, + Currency = "usd", + Interval = "month", + Product = new PlanProductOptions { Name = "My product" }, + }; + var service = new PlanService(this.StripeClient); + Plan plan = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/plans"); + } + [Fact] public void TestPlansPost3() { @@ -2903,6 +7246,25 @@ public void TestPlansPost3() "/v1/plans/price_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestPlansPost3Async() + { + var options = new PlanUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new PlanService(this.StripeClient); + Plan plan = await service.UpdateAsync( + "price_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/plans/price_xxxxxxxxxxxxx"); + } + [Fact] public void TestPricesGet() { @@ -2912,6 +7274,33 @@ public void TestPricesGet() this.AssertRequest(HttpMethod.Get, "/v1/prices", "limit=3"); } + [Fact] + public async Task TestPricesGetAsync() + { + var options = new PriceListOptions { Limit = 3 }; + var service = new PriceService(this.StripeClient); + StripeList prices = await service.ListAsync(options); + this.AssertRequest(HttpMethod.Get, "/v1/prices", "limit=3"); + } + + [Fact] + public void TestPricesGetAutoPaging() + { + var options = new PriceListOptions { Limit = 3 }; + var service = new PriceService(this.StripeClient); + var price = service.ListAutoPaging(options).First(); + this.AssertRequest(HttpMethod.Get, "/v1/prices", "limit=3"); + } + + [Fact] + public async Task TestPricesGetAutoPagingAsync() + { + var options = new PriceListOptions { Limit = 3 }; + var service = new PriceService(this.StripeClient); + var price = await service.ListAutoPagingAsync(options).FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/prices", "limit=3"); + } + [Fact] public void TestPricesGet2() { @@ -2922,6 +7311,16 @@ public void TestPricesGet2() "/v1/prices/price_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestPricesGet2Async() + { + var service = new PriceService(this.StripeClient); + Price price = await service.GetAsync("price_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/prices/price_xxxxxxxxxxxxx"); + } + [Fact] public void TestPricesPost() { @@ -2952,6 +7351,36 @@ public void TestPricesPost() this.AssertRequest(HttpMethod.Post, "/v1/prices"); } + [Fact] + public async Task TestPricesPostAsync() + { + var options = new PriceCreateOptions + { + UnitAmount = 2000, + Currency = "usd", + CurrencyOptions = new Dictionary + { + { + "uah", new PriceCurrencyOptionsOptions + { + UnitAmount = 5000, + } + }, + { + "eur", new PriceCurrencyOptionsOptions + { + UnitAmount = 1800, + } + }, + }, + Recurring = new PriceRecurringOptions { Interval = "month" }, + Product = "prod_xxxxxxxxxxxxx", + }; + var service = new PriceService(this.StripeClient); + Price price = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/prices"); + } + [Fact] public void TestPricesPost2() { @@ -2967,6 +7396,21 @@ public void TestPricesPost2() this.AssertRequest(HttpMethod.Post, "/v1/prices"); } + [Fact] + public async Task TestPricesPost2Async() + { + var options = new PriceCreateOptions + { + UnitAmount = 2000, + Currency = "usd", + Recurring = new PriceRecurringOptions { Interval = "month" }, + Product = "prod_xxxxxxxxxxxxx", + }; + var service = new PriceService(this.StripeClient); + Price price = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/prices"); + } + [Fact] public void TestPricesPost3() { @@ -2984,6 +7428,25 @@ public void TestPricesPost3() "/v1/prices/price_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestPricesPost3Async() + { + var options = new PriceUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new PriceService(this.StripeClient); + Price price = await service.UpdateAsync( + "price_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/prices/price_xxxxxxxxxxxxx"); + } + [Fact] public void TestPricesSearchGet() { @@ -2999,6 +7462,53 @@ public void TestPricesSearchGet() "query=active%3A%27true%27%20AND%20metadata%5B%27order_id%27%5D%3A%276735%27"); } + [Fact] + public async Task TestPricesSearchGetAsync() + { + var options = new PriceSearchOptions + { + Query = "active:'true' AND metadata['order_id']:'6735'", + }; + var service = new PriceService(this.StripeClient); + StripeSearchResult prices = await service.SearchAsync( + options); + this.AssertRequest( + HttpMethod.Get, + "/v1/prices/search", + "query=active%3A%27true%27%20AND%20metadata%5B%27order_id%27%5D%3A%276735%27"); + } + + [Fact] + public void TestPricesSearchGetAutoPaging() + { + var options = new PriceSearchOptions + { + Query = "active:'true' AND metadata['order_id']:'6735'", + }; + var service = new PriceService(this.StripeClient); + var price = service.SearchAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/prices/search", + "query=active%3A%27true%27%20AND%20metadata%5B%27order_id%27%5D%3A%276735%27"); + } + + [Fact] + public async Task TestPricesSearchGetAutoPagingAsync() + { + var options = new PriceSearchOptions + { + Query = "active:'true' AND metadata['order_id']:'6735'", + }; + var service = new PriceService(this.StripeClient); + var price = await service.SearchAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/prices/search", + "query=active%3A%27true%27%20AND%20metadata%5B%27order_id%27%5D%3A%276735%27"); + } + [Fact] public void TestProductsDelete() { @@ -3009,6 +7519,16 @@ public void TestProductsDelete() "/v1/products/prod_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestProductsDeleteAsync() + { + var service = new ProductService(this.StripeClient); + Product deleted = await service.DeleteAsync("prod_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Delete, + "/v1/products/prod_xxxxxxxxxxxxx"); + } + [Fact] public void TestProductsGet() { @@ -3019,43 +7539,109 @@ public void TestProductsGet() } [Fact] - public void TestProductsGet2() + public async Task TestProductsGetAsync() { + var options = new ProductListOptions { Limit = 3 }; var service = new ProductService(this.StripeClient); - Product product = service.Get("prod_xxxxxxxxxxxxx"); - this.AssertRequest( - HttpMethod.Get, - "/v1/products/prod_xxxxxxxxxxxxx"); + StripeList products = await service.ListAsync(options); + this.AssertRequest(HttpMethod.Get, "/v1/products", "limit=3"); } [Fact] - public void TestProductsPost() + public void TestProductsGetAutoPaging() { - var options = new ProductCreateOptions { Name = "Gold Special" }; + var options = new ProductListOptions { Limit = 3 }; var service = new ProductService(this.StripeClient); - Product product = service.Create(options); - this.AssertRequest(HttpMethod.Post, "/v1/products"); + var product = service.ListAutoPaging(options).First(); + this.AssertRequest(HttpMethod.Get, "/v1/products", "limit=3"); } [Fact] - public void TestProductsPost2() + public async Task TestProductsGetAutoPagingAsync() { - var options = new ProductUpdateOptions - { - Metadata = new Dictionary - { - { "order_id", "6735" }, - }, - }; + var options = new ProductListOptions { Limit = 3 }; var service = new ProductService(this.StripeClient); - Product product = service.Update("prod_xxxxxxxxxxxxx", options); - this.AssertRequest( - HttpMethod.Post, - "/v1/products/prod_xxxxxxxxxxxxx"); + var product = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/products", "limit=3"); } [Fact] - public void TestProductsSearchGet() + public void TestProductsGet2() + { + var service = new ProductService(this.StripeClient); + Product product = service.Get("prod_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/products/prod_xxxxxxxxxxxxx"); + } + + [Fact] + public async Task TestProductsGet2Async() + { + var service = new ProductService(this.StripeClient); + Product product = await service.GetAsync("prod_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/products/prod_xxxxxxxxxxxxx"); + } + + [Fact] + public void TestProductsPost() + { + var options = new ProductCreateOptions { Name = "Gold Special" }; + var service = new ProductService(this.StripeClient); + Product product = service.Create(options); + this.AssertRequest(HttpMethod.Post, "/v1/products"); + } + + [Fact] + public async Task TestProductsPostAsync() + { + var options = new ProductCreateOptions { Name = "Gold Special" }; + var service = new ProductService(this.StripeClient); + Product product = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/products"); + } + + [Fact] + public void TestProductsPost2() + { + var options = new ProductUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new ProductService(this.StripeClient); + Product product = service.Update("prod_xxxxxxxxxxxxx", options); + this.AssertRequest( + HttpMethod.Post, + "/v1/products/prod_xxxxxxxxxxxxx"); + } + + [Fact] + public async Task TestProductsPost2Async() + { + var options = new ProductUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new ProductService(this.StripeClient); + Product product = await service.UpdateAsync( + "prod_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/products/prod_xxxxxxxxxxxxx"); + } + + [Fact] + public void TestProductsSearchGet() { var options = new ProductSearchOptions { @@ -3069,6 +7655,53 @@ public void TestProductsSearchGet() "query=active%3A%27true%27%20AND%20metadata%5B%27order_id%27%5D%3A%276735%27"); } + [Fact] + public async Task TestProductsSearchGetAsync() + { + var options = new ProductSearchOptions + { + Query = "active:'true' AND metadata['order_id']:'6735'", + }; + var service = new ProductService(this.StripeClient); + StripeSearchResult products = await service.SearchAsync( + options); + this.AssertRequest( + HttpMethod.Get, + "/v1/products/search", + "query=active%3A%27true%27%20AND%20metadata%5B%27order_id%27%5D%3A%276735%27"); + } + + [Fact] + public void TestProductsSearchGetAutoPaging() + { + var options = new ProductSearchOptions + { + Query = "active:'true' AND metadata['order_id']:'6735'", + }; + var service = new ProductService(this.StripeClient); + var product = service.SearchAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/products/search", + "query=active%3A%27true%27%20AND%20metadata%5B%27order_id%27%5D%3A%276735%27"); + } + + [Fact] + public async Task TestProductsSearchGetAutoPagingAsync() + { + var options = new ProductSearchOptions + { + Query = "active:'true' AND metadata['order_id']:'6735'", + }; + var service = new ProductService(this.StripeClient); + var product = await service.SearchAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/products/search", + "query=active%3A%27true%27%20AND%20metadata%5B%27order_id%27%5D%3A%276735%27"); + } + [Fact] public void TestPromotionCodesGet() { @@ -3081,6 +7714,44 @@ public void TestPromotionCodesGet() "limit=3"); } + [Fact] + public async Task TestPromotionCodesGetAsync() + { + var options = new PromotionCodeListOptions { Limit = 3 }; + var service = new PromotionCodeService(this.StripeClient); + StripeList promotionCodes = await service.ListAsync( + options); + this.AssertRequest( + HttpMethod.Get, + "/v1/promotion_codes", + "limit=3"); + } + + [Fact] + public void TestPromotionCodesGetAutoPaging() + { + var options = new PromotionCodeListOptions { Limit = 3 }; + var service = new PromotionCodeService(this.StripeClient); + var promotionCode = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/promotion_codes", + "limit=3"); + } + + [Fact] + public async Task TestPromotionCodesGetAutoPagingAsync() + { + var options = new PromotionCodeListOptions { Limit = 3 }; + var service = new PromotionCodeService(this.StripeClient); + var promotionCode = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/promotion_codes", + "limit=3"); + } + [Fact] public void TestPromotionCodesGet2() { @@ -3091,6 +7762,17 @@ public void TestPromotionCodesGet2() "/v1/promotion_codes/promo_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestPromotionCodesGet2Async() + { + var service = new PromotionCodeService(this.StripeClient); + PromotionCode promotionCode = await service.GetAsync( + "promo_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/promotion_codes/promo_xxxxxxxxxxxxx"); + } + [Fact] public void TestPromotionCodesPost() { @@ -3107,6 +7789,22 @@ public void TestPromotionCodesPost() this.AssertRequest(HttpMethod.Post, "/v1/promotion_codes"); } + [Fact] + public async Task TestPromotionCodesPostAsync() + { + var options = new PromotionCodeCreateOptions + { + Promotion = new PromotionCodePromotionOptions + { + Type = "coupon", + Coupon = "Z4OV52SU", + }, + }; + var service = new PromotionCodeService(this.StripeClient); + PromotionCode promotionCode = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/promotion_codes"); + } + [Fact] public void TestPromotionCodesPost2() { @@ -3126,6 +7824,25 @@ public void TestPromotionCodesPost2() "/v1/promotion_codes/promo_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestPromotionCodesPost2Async() + { + var options = new PromotionCodeUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new PromotionCodeService(this.StripeClient); + PromotionCode promotionCode = await service.UpdateAsync( + "promo_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/promotion_codes/promo_xxxxxxxxxxxxx"); + } + [Fact] public void TestQuotesAcceptPost() { @@ -3136,6 +7853,16 @@ public void TestQuotesAcceptPost() "/v1/quotes/qt_xxxxxxxxxxxxx/accept"); } + [Fact] + public async Task TestQuotesAcceptPostAsync() + { + var service = new QuoteService(this.StripeClient); + Quote quote = await service.AcceptAsync("qt_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/quotes/qt_xxxxxxxxxxxxx/accept"); + } + [Fact] public void TestQuotesCancelPost() { @@ -3146,6 +7873,16 @@ public void TestQuotesCancelPost() "/v1/quotes/qt_xxxxxxxxxxxxx/cancel"); } + [Fact] + public async Task TestQuotesCancelPostAsync() + { + var service = new QuoteService(this.StripeClient); + Quote quote = await service.CancelAsync("qt_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/quotes/qt_xxxxxxxxxxxxx/cancel"); + } + [Fact] public void TestQuotesFinalizePost() { @@ -3156,6 +7893,16 @@ public void TestQuotesFinalizePost() "/v1/quotes/qt_xxxxxxxxxxxxx/finalize"); } + [Fact] + public async Task TestQuotesFinalizePostAsync() + { + var service = new QuoteService(this.StripeClient); + Quote quote = await service.FinalizeQuoteAsync("qt_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/quotes/qt_xxxxxxxxxxxxx/finalize"); + } + [Fact] public void TestQuotesGet() { @@ -3165,6 +7912,33 @@ public void TestQuotesGet() this.AssertRequest(HttpMethod.Get, "/v1/quotes", "limit=3"); } + [Fact] + public async Task TestQuotesGetAsync() + { + var options = new QuoteListOptions { Limit = 3 }; + var service = new QuoteService(this.StripeClient); + StripeList quotes = await service.ListAsync(options); + this.AssertRequest(HttpMethod.Get, "/v1/quotes", "limit=3"); + } + + [Fact] + public void TestQuotesGetAutoPaging() + { + var options = new QuoteListOptions { Limit = 3 }; + var service = new QuoteService(this.StripeClient); + var quote = service.ListAutoPaging(options).First(); + this.AssertRequest(HttpMethod.Get, "/v1/quotes", "limit=3"); + } + + [Fact] + public async Task TestQuotesGetAutoPagingAsync() + { + var options = new QuoteListOptions { Limit = 3 }; + var service = new QuoteService(this.StripeClient); + var quote = await service.ListAutoPagingAsync(options).FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/quotes", "limit=3"); + } + [Fact] public void TestQuotesGet2() { @@ -3173,6 +7947,14 @@ public void TestQuotesGet2() this.AssertRequest(HttpMethod.Get, "/v1/quotes/qt_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestQuotesGet2Async() + { + var service = new QuoteService(this.StripeClient); + Quote quote = await service.GetAsync("qt_xxxxxxxxxxxxx"); + this.AssertRequest(HttpMethod.Get, "/v1/quotes/qt_xxxxxxxxxxxxx"); + } + [Fact] public void TestQuotesLineItemsGet() { @@ -3184,39 +7966,102 @@ public void TestQuotesLineItemsGet() } [Fact] - public void TestQuotesPdfGet() + public async Task TestQuotesLineItemsGetAsync() { - var service = new QuoteService(this.StripeClient); - service.Pdf("qt_xxxxxxxxxxxxx"); + var service = new QuoteLineItemService(this.StripeClient); + StripeList lineItems = await service.ListAsync( + "qt_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, - "/v1/quotes/qt_xxxxxxxxxxxxx/pdf"); + "/v1/quotes/qt_xxxxxxxxxxxxx/line_items"); } [Fact] - public void TestQuotesPost() + public void TestQuotesLineItemsGetAutoPaging() { - var options = new QuoteCreateOptions - { - Customer = "cus_xxxxxxxxxxxxx", - LineItems = new List - { - new QuoteLineItemOptions - { - Price = "price_xxxxxxxxxxxxx", - Quantity = 2, - }, - }, - }; - var service = new QuoteService(this.StripeClient); - Quote quote = service.Create(options); - this.AssertRequest(HttpMethod.Post, "/v1/quotes"); + var service = new QuoteLineItemService(this.StripeClient); + var lineItem = service.ListAutoPaging("qt_xxxxxxxxxxxxx").First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/quotes/qt_xxxxxxxxxxxxx/line_items"); } [Fact] - public void TestQuotesPost2() + public async Task TestQuotesLineItemsGetAutoPagingAsync() { - var options = new QuoteUpdateOptions + var service = new QuoteLineItemService(this.StripeClient); + var lineItem = await service.ListAutoPagingAsync("qt_xxxxxxxxxxxxx") + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/quotes/qt_xxxxxxxxxxxxx/line_items"); + } + + [Fact] + public void TestQuotesPdfGet() + { + var service = new QuoteService(this.StripeClient); + System.IO.Stream stream = service.Pdf("qt_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/quotes/qt_xxxxxxxxxxxxx/pdf"); + } + + [Fact] + public async Task TestQuotesPdfGetAsync() + { + var service = new QuoteService(this.StripeClient); + System.IO.Stream stream = await service.PdfAsync( + "qt_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/quotes/qt_xxxxxxxxxxxxx/pdf"); + } + + [Fact] + public void TestQuotesPost() + { + var options = new QuoteCreateOptions + { + Customer = "cus_xxxxxxxxxxxxx", + LineItems = new List + { + new QuoteLineItemOptions + { + Price = "price_xxxxxxxxxxxxx", + Quantity = 2, + }, + }, + }; + var service = new QuoteService(this.StripeClient); + Quote quote = service.Create(options); + this.AssertRequest(HttpMethod.Post, "/v1/quotes"); + } + + [Fact] + public async Task TestQuotesPostAsync() + { + var options = new QuoteCreateOptions + { + Customer = "cus_xxxxxxxxxxxxx", + LineItems = new List + { + new QuoteLineItemOptions + { + Price = "price_xxxxxxxxxxxxx", + Quantity = 2, + }, + }, + }; + var service = new QuoteService(this.StripeClient); + Quote quote = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/quotes"); + } + + [Fact] + public void TestQuotesPost2() + { + var options = new QuoteUpdateOptions { Metadata = new Dictionary { @@ -3228,6 +8073,23 @@ public void TestQuotesPost2() this.AssertRequest(HttpMethod.Post, "/v1/quotes/qt_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestQuotesPost2Async() + { + var options = new QuoteUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new QuoteService(this.StripeClient); + Quote quote = await service.UpdateAsync( + "qt_xxxxxxxxxxxxx", + options); + this.AssertRequest(HttpMethod.Post, "/v1/quotes/qt_xxxxxxxxxxxxx"); + } + [Fact] public void TestRadarEarlyFraudWarningsGet() { @@ -3245,6 +8107,56 @@ public void TestRadarEarlyFraudWarningsGet() "limit=3"); } + [Fact] + public async Task TestRadarEarlyFraudWarningsGetAsync() + { + var options = new Stripe.Radar.EarlyFraudWarningListOptions + { + Limit = 3, + }; + var service = new Stripe.Radar.EarlyFraudWarningService( + this.StripeClient); + StripeList earlyFraudWarnings = await service + .ListAsync(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/radar/early_fraud_warnings", + "limit=3"); + } + + [Fact] + public void TestRadarEarlyFraudWarningsGetAutoPaging() + { + var options = new Stripe.Radar.EarlyFraudWarningListOptions + { + Limit = 3, + }; + var service = new Stripe.Radar.EarlyFraudWarningService( + this.StripeClient); + var earlyFraudWarning = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/radar/early_fraud_warnings", + "limit=3"); + } + + [Fact] + public async Task TestRadarEarlyFraudWarningsGetAutoPagingAsync() + { + var options = new Stripe.Radar.EarlyFraudWarningListOptions + { + Limit = 3, + }; + var service = new Stripe.Radar.EarlyFraudWarningService( + this.StripeClient); + var earlyFraudWarning = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/radar/early_fraud_warnings", + "limit=3"); + } + [Fact] public void TestRadarEarlyFraudWarningsGet2() { @@ -3257,6 +8169,18 @@ public void TestRadarEarlyFraudWarningsGet2() "/v1/radar/early_fraud_warnings/issfr_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestRadarEarlyFraudWarningsGet2Async() + { + var service = new Stripe.Radar.EarlyFraudWarningService( + this.StripeClient); + Stripe.Radar.EarlyFraudWarning earlyFraudWarning = await service + .GetAsync("issfr_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/radar/early_fraud_warnings/issfr_xxxxxxxxxxxxx"); + } + [Fact] public void TestRadarValueListItemsDelete() { @@ -3269,6 +8193,18 @@ public void TestRadarValueListItemsDelete() "/v1/radar/value_list_items/rsli_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestRadarValueListItemsDeleteAsync() + { + var service = new Stripe.Radar.ValueListItemService( + this.StripeClient); + Stripe.Radar.ValueListItem deleted = await service.DeleteAsync( + "rsli_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Delete, + "/v1/radar/value_list_items/rsli_xxxxxxxxxxxxx"); + } + [Fact] public void TestRadarValueListItemsGet() { @@ -3287,6 +8223,59 @@ public void TestRadarValueListItemsGet() "limit=3&value_list=rsl_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestRadarValueListItemsGetAsync() + { + var options = new Stripe.Radar.ValueListItemListOptions + { + Limit = 3, + ValueList = "rsl_xxxxxxxxxxxxx", + }; + var service = new Stripe.Radar.ValueListItemService( + this.StripeClient); + StripeList valueListItems = await service + .ListAsync(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/radar/value_list_items", + "limit=3&value_list=rsl_xxxxxxxxxxxxx"); + } + + [Fact] + public void TestRadarValueListItemsGetAutoPaging() + { + var options = new Stripe.Radar.ValueListItemListOptions + { + Limit = 3, + ValueList = "rsl_xxxxxxxxxxxxx", + }; + var service = new Stripe.Radar.ValueListItemService( + this.StripeClient); + var valueListItem = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/radar/value_list_items", + "limit=3&value_list=rsl_xxxxxxxxxxxxx"); + } + + [Fact] + public async Task TestRadarValueListItemsGetAutoPagingAsync() + { + var options = new Stripe.Radar.ValueListItemListOptions + { + Limit = 3, + ValueList = "rsl_xxxxxxxxxxxxx", + }; + var service = new Stripe.Radar.ValueListItemService( + this.StripeClient); + var valueListItem = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/radar/value_list_items", + "limit=3&value_list=rsl_xxxxxxxxxxxxx"); + } + [Fact] public void TestRadarValueListItemsGet2() { @@ -3299,6 +8288,18 @@ public void TestRadarValueListItemsGet2() "/v1/radar/value_list_items/rsli_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestRadarValueListItemsGet2Async() + { + var service = new Stripe.Radar.ValueListItemService( + this.StripeClient); + Stripe.Radar.ValueListItem valueListItem = await service.GetAsync( + "rsli_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/radar/value_list_items/rsli_xxxxxxxxxxxxx"); + } + [Fact] public void TestRadarValueListItemsPost() { @@ -3313,6 +8314,21 @@ public void TestRadarValueListItemsPost() this.AssertRequest(HttpMethod.Post, "/v1/radar/value_list_items"); } + [Fact] + public async Task TestRadarValueListItemsPostAsync() + { + var options = new Stripe.Radar.ValueListItemCreateOptions + { + ValueList = "rsl_xxxxxxxxxxxxx", + Value = "1.2.3.4", + }; + var service = new Stripe.Radar.ValueListItemService( + this.StripeClient); + Stripe.Radar.ValueListItem valueListItem = await service + .CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/radar/value_list_items"); + } + [Fact] public void TestRadarValueListsDelete() { @@ -3324,6 +8340,17 @@ public void TestRadarValueListsDelete() "/v1/radar/value_lists/rsl_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestRadarValueListsDeleteAsync() + { + var service = new Stripe.Radar.ValueListService(this.StripeClient); + Stripe.Radar.ValueList deleted = await service.DeleteAsync( + "rsl_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Delete, + "/v1/radar/value_lists/rsl_xxxxxxxxxxxxx"); + } + [Fact] public void TestRadarValueListsGet() { @@ -3337,6 +8364,44 @@ public void TestRadarValueListsGet() "limit=3"); } + [Fact] + public async Task TestRadarValueListsGetAsync() + { + var options = new Stripe.Radar.ValueListListOptions { Limit = 3 }; + var service = new Stripe.Radar.ValueListService(this.StripeClient); + StripeList valueLists = await service + .ListAsync(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/radar/value_lists", + "limit=3"); + } + + [Fact] + public void TestRadarValueListsGetAutoPaging() + { + var options = new Stripe.Radar.ValueListListOptions { Limit = 3 }; + var service = new Stripe.Radar.ValueListService(this.StripeClient); + var valueList = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/radar/value_lists", + "limit=3"); + } + + [Fact] + public async Task TestRadarValueListsGetAutoPagingAsync() + { + var options = new Stripe.Radar.ValueListListOptions { Limit = 3 }; + var service = new Stripe.Radar.ValueListService(this.StripeClient); + var valueList = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/radar/value_lists", + "limit=3"); + } + [Fact] public void TestRadarValueListsGet2() { @@ -3347,6 +8412,17 @@ public void TestRadarValueListsGet2() "/v1/radar/value_lists/rsl_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestRadarValueListsGet2Async() + { + var service = new Stripe.Radar.ValueListService(this.StripeClient); + Stripe.Radar.ValueList valueList = await service.GetAsync( + "rsl_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/radar/value_lists/rsl_xxxxxxxxxxxxx"); + } + [Fact] public void TestRadarValueListsPost() { @@ -3362,7 +8438,22 @@ public void TestRadarValueListsPost() } [Fact] - public void TestRadarValueListsPost2() + public async Task TestRadarValueListsPostAsync() + { + var options = new Stripe.Radar.ValueListCreateOptions + { + Alias = "custom_ip_xxxxxxxxxxxxx", + Name = "Custom IP Blocklist", + ItemType = "ip_address", + }; + var service = new Stripe.Radar.ValueListService(this.StripeClient); + Stripe.Radar.ValueList valueList = await service.CreateAsync( + options); + this.AssertRequest(HttpMethod.Post, "/v1/radar/value_lists"); + } + + [Fact] + public void TestRadarValueListsPost2() { var options = new Stripe.Radar.ValueListUpdateOptions { @@ -3377,6 +8468,22 @@ public void TestRadarValueListsPost2() "/v1/radar/value_lists/rsl_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestRadarValueListsPost2Async() + { + var options = new Stripe.Radar.ValueListUpdateOptions + { + Name = "Updated IP Block List", + }; + var service = new Stripe.Radar.ValueListService(this.StripeClient); + Stripe.Radar.ValueList valueList = await service.UpdateAsync( + "rsl_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/radar/value_lists/rsl_xxxxxxxxxxxxx"); + } + [Fact] public void TestRefundsCancelPost() { @@ -3387,6 +8494,16 @@ public void TestRefundsCancelPost() "/v1/refunds/re_xxxxxxxxxxxxx/cancel"); } + [Fact] + public async Task TestRefundsCancelPostAsync() + { + var service = new RefundService(this.StripeClient); + Refund refund = await service.CancelAsync("re_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/refunds/re_xxxxxxxxxxxxx/cancel"); + } + [Fact] public void TestRefundsGet() { @@ -3396,6 +8513,34 @@ public void TestRefundsGet() this.AssertRequest(HttpMethod.Get, "/v1/refunds", "limit=3"); } + [Fact] + public async Task TestRefundsGetAsync() + { + var options = new RefundListOptions { Limit = 3 }; + var service = new RefundService(this.StripeClient); + StripeList refunds = await service.ListAsync(options); + this.AssertRequest(HttpMethod.Get, "/v1/refunds", "limit=3"); + } + + [Fact] + public void TestRefundsGetAutoPaging() + { + var options = new RefundListOptions { Limit = 3 }; + var service = new RefundService(this.StripeClient); + var refund = service.ListAutoPaging(options).First(); + this.AssertRequest(HttpMethod.Get, "/v1/refunds", "limit=3"); + } + + [Fact] + public async Task TestRefundsGetAutoPagingAsync() + { + var options = new RefundListOptions { Limit = 3 }; + var service = new RefundService(this.StripeClient); + var refund = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/refunds", "limit=3"); + } + [Fact] public void TestRefundsGet2() { @@ -3404,6 +8549,14 @@ public void TestRefundsGet2() this.AssertRequest(HttpMethod.Get, "/v1/refunds/re_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestRefundsGet2Async() + { + var service = new RefundService(this.StripeClient); + Refund refund = await service.GetAsync("re_xxxxxxxxxxxxx"); + this.AssertRequest(HttpMethod.Get, "/v1/refunds/re_xxxxxxxxxxxxx"); + } + [Fact] public void TestRefundsPost() { @@ -3416,6 +8569,18 @@ public void TestRefundsPost() this.AssertRequest(HttpMethod.Post, "/v1/refunds"); } + [Fact] + public async Task TestRefundsPostAsync() + { + var options = new RefundCreateOptions + { + Charge = "ch_xxxxxxxxxxxxx", + }; + var service = new RefundService(this.StripeClient); + Refund refund = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/refunds"); + } + [Fact] public void TestRefundsPost2() { @@ -3431,6 +8596,23 @@ public void TestRefundsPost2() this.AssertRequest(HttpMethod.Post, "/v1/refunds/re_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestRefundsPost2Async() + { + var options = new RefundUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new RefundService(this.StripeClient); + Refund refund = await service.UpdateAsync( + "re_xxxxxxxxxxxxx", + options); + this.AssertRequest(HttpMethod.Post, "/v1/refunds/re_xxxxxxxxxxxxx"); + } + [Fact] public void TestReportingReportRunsGet() { @@ -3448,6 +8630,56 @@ public void TestReportingReportRunsGet() "limit=3"); } + [Fact] + public async Task TestReportingReportRunsGetAsync() + { + var options = new Stripe.Reporting.ReportRunListOptions + { + Limit = 3, + }; + var service = new Stripe.Reporting.ReportRunService( + this.StripeClient); + StripeList reportRuns = await service + .ListAsync(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/reporting/report_runs", + "limit=3"); + } + + [Fact] + public void TestReportingReportRunsGetAutoPaging() + { + var options = new Stripe.Reporting.ReportRunListOptions + { + Limit = 3, + }; + var service = new Stripe.Reporting.ReportRunService( + this.StripeClient); + var reportRun = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/reporting/report_runs", + "limit=3"); + } + + [Fact] + public async Task TestReportingReportRunsGetAutoPagingAsync() + { + var options = new Stripe.Reporting.ReportRunListOptions + { + Limit = 3, + }; + var service = new Stripe.Reporting.ReportRunService( + this.StripeClient); + var reportRun = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/reporting/report_runs", + "limit=3"); + } + [Fact] public void TestReportingReportRunsGet2() { @@ -3460,6 +8692,18 @@ public void TestReportingReportRunsGet2() "/v1/reporting/report_runs/frr_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestReportingReportRunsGet2Async() + { + var service = new Stripe.Reporting.ReportRunService( + this.StripeClient); + Stripe.Reporting.ReportRun reportRun = await service.GetAsync( + "frr_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/reporting/report_runs/frr_xxxxxxxxxxxxx"); + } + [Fact] public void TestReportingReportRunsPost() { @@ -3481,6 +8725,28 @@ public void TestReportingReportRunsPost() this.AssertRequest(HttpMethod.Post, "/v1/reporting/report_runs"); } + [Fact] + public async Task TestReportingReportRunsPostAsync() + { + var options = new Stripe.Reporting.ReportRunCreateOptions + { + ReportType = "balance.summary.1", + Parameters = new Stripe.Reporting.ReportRunParametersOptions + { + IntervalStart = DateTimeOffset.FromUnixTimeSeconds( + 1522540800) + .UtcDateTime, + IntervalEnd = DateTimeOffset.FromUnixTimeSeconds(1525132800) + .UtcDateTime, + }, + }; + var service = new Stripe.Reporting.ReportRunService( + this.StripeClient); + Stripe.Reporting.ReportRun reportRun = await service.CreateAsync( + options); + this.AssertRequest(HttpMethod.Post, "/v1/reporting/report_runs"); + } + [Fact] public void TestReportingReportTypesGet() { @@ -3491,6 +8757,16 @@ public void TestReportingReportTypesGet() this.AssertRequest(HttpMethod.Get, "/v1/reporting/report_types"); } + [Fact] + public async Task TestReportingReportTypesGetAsync() + { + var service = new Stripe.Reporting.ReportTypeService( + this.StripeClient); + StripeList reportTypes = await service + .ListAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/reporting/report_types"); + } + [Fact] public void TestReportingReportTypesGet2() { @@ -3503,6 +8779,18 @@ public void TestReportingReportTypesGet2() "/v1/reporting/report_types/balance.summary.1"); } + [Fact] + public async Task TestReportingReportTypesGet2Async() + { + var service = new Stripe.Reporting.ReportTypeService( + this.StripeClient); + Stripe.Reporting.ReportType reportType = await service.GetAsync( + "balance.summary.1"); + this.AssertRequest( + HttpMethod.Get, + "/v1/reporting/report_types/balance.summary.1"); + } + [Fact] public void TestReviewsApprovePost() { @@ -3513,6 +8801,16 @@ public void TestReviewsApprovePost() "/v1/reviews/prv_xxxxxxxxxxxxx/approve"); } + [Fact] + public async Task TestReviewsApprovePostAsync() + { + var service = new ReviewService(this.StripeClient); + Review review = await service.ApproveAsync("prv_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/reviews/prv_xxxxxxxxxxxxx/approve"); + } + [Fact] public void TestReviewsGet() { @@ -3522,6 +8820,34 @@ public void TestReviewsGet() this.AssertRequest(HttpMethod.Get, "/v1/reviews", "limit=3"); } + [Fact] + public async Task TestReviewsGetAsync() + { + var options = new ReviewListOptions { Limit = 3 }; + var service = new ReviewService(this.StripeClient); + StripeList reviews = await service.ListAsync(options); + this.AssertRequest(HttpMethod.Get, "/v1/reviews", "limit=3"); + } + + [Fact] + public void TestReviewsGetAutoPaging() + { + var options = new ReviewListOptions { Limit = 3 }; + var service = new ReviewService(this.StripeClient); + var review = service.ListAutoPaging(options).First(); + this.AssertRequest(HttpMethod.Get, "/v1/reviews", "limit=3"); + } + + [Fact] + public async Task TestReviewsGetAutoPagingAsync() + { + var options = new ReviewListOptions { Limit = 3 }; + var service = new ReviewService(this.StripeClient); + var review = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/reviews", "limit=3"); + } + [Fact] public void TestReviewsGet2() { @@ -3530,6 +8856,14 @@ public void TestReviewsGet2() this.AssertRequest(HttpMethod.Get, "/v1/reviews/prv_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestReviewsGet2Async() + { + var service = new ReviewService(this.StripeClient); + Review review = await service.GetAsync("prv_xxxxxxxxxxxxx"); + this.AssertRequest(HttpMethod.Get, "/v1/reviews/prv_xxxxxxxxxxxxx"); + } + [Fact] public void TestSetupAttemptsGet() { @@ -3547,47 +8881,164 @@ public void TestSetupAttemptsGet() } [Fact] - public void TestSetupIntentsCancelPost() - { - var service = new SetupIntentService(this.StripeClient); - SetupIntent setupIntent = service.Cancel("seti_xxxxxxxxxxxxx"); - this.AssertRequest( - HttpMethod.Post, - "/v1/setup_intents/seti_xxxxxxxxxxxxx/cancel"); - } - - [Fact] - public void TestSetupIntentsConfirmPost() + public async Task TestSetupAttemptsGetAsync() { - var options = new SetupIntentConfirmOptions + var options = new SetupAttemptListOptions { - PaymentMethod = "pm_card_visa", + Limit = 3, + SetupIntent = "si_xyz", }; - var service = new SetupIntentService(this.StripeClient); - SetupIntent setupIntent = service.Confirm( - "seti_xxxxxxxxxxxxx", + var service = new SetupAttemptService(this.StripeClient); + StripeList setupAttempts = await service.ListAsync( options); this.AssertRequest( - HttpMethod.Post, - "/v1/setup_intents/seti_xxxxxxxxxxxxx/confirm"); + HttpMethod.Get, + "/v1/setup_attempts", + "limit=3&setup_intent=si_xyz"); } [Fact] - public void TestSetupIntentsGet() + public void TestSetupAttemptsGetAutoPaging() { - var options = new SetupIntentListOptions { Limit = 3 }; - var service = new SetupIntentService(this.StripeClient); - StripeList setupIntents = service.List(options); - this.AssertRequest(HttpMethod.Get, "/v1/setup_intents", "limit=3"); + var options = new SetupAttemptListOptions + { + Limit = 3, + SetupIntent = "si_xyz", + }; + var service = new SetupAttemptService(this.StripeClient); + var setupAttempt = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/setup_attempts", + "limit=3&setup_intent=si_xyz"); } [Fact] - public void TestSetupIntentsGet2() + public async Task TestSetupAttemptsGetAutoPagingAsync() { - var service = new SetupIntentService(this.StripeClient); - SetupIntent setupIntent = service.Get("seti_xxxxxxxxxxxxx"); - this.AssertRequest( - HttpMethod.Get, + var options = new SetupAttemptListOptions + { + Limit = 3, + SetupIntent = "si_xyz", + }; + var service = new SetupAttemptService(this.StripeClient); + var setupAttempt = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/setup_attempts", + "limit=3&setup_intent=si_xyz"); + } + + [Fact] + public void TestSetupIntentsCancelPost() + { + var service = new SetupIntentService(this.StripeClient); + SetupIntent setupIntent = service.Cancel("seti_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/setup_intents/seti_xxxxxxxxxxxxx/cancel"); + } + + [Fact] + public async Task TestSetupIntentsCancelPostAsync() + { + var service = new SetupIntentService(this.StripeClient); + SetupIntent setupIntent = await service.CancelAsync( + "seti_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/setup_intents/seti_xxxxxxxxxxxxx/cancel"); + } + + [Fact] + public void TestSetupIntentsConfirmPost() + { + var options = new SetupIntentConfirmOptions + { + PaymentMethod = "pm_card_visa", + }; + var service = new SetupIntentService(this.StripeClient); + SetupIntent setupIntent = service.Confirm( + "seti_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/setup_intents/seti_xxxxxxxxxxxxx/confirm"); + } + + [Fact] + public async Task TestSetupIntentsConfirmPostAsync() + { + var options = new SetupIntentConfirmOptions + { + PaymentMethod = "pm_card_visa", + }; + var service = new SetupIntentService(this.StripeClient); + SetupIntent setupIntent = await service.ConfirmAsync( + "seti_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/setup_intents/seti_xxxxxxxxxxxxx/confirm"); + } + + [Fact] + public void TestSetupIntentsGet() + { + var options = new SetupIntentListOptions { Limit = 3 }; + var service = new SetupIntentService(this.StripeClient); + StripeList setupIntents = service.List(options); + this.AssertRequest(HttpMethod.Get, "/v1/setup_intents", "limit=3"); + } + + [Fact] + public async Task TestSetupIntentsGetAsync() + { + var options = new SetupIntentListOptions { Limit = 3 }; + var service = new SetupIntentService(this.StripeClient); + StripeList setupIntents = await service.ListAsync( + options); + this.AssertRequest(HttpMethod.Get, "/v1/setup_intents", "limit=3"); + } + + [Fact] + public void TestSetupIntentsGetAutoPaging() + { + var options = new SetupIntentListOptions { Limit = 3 }; + var service = new SetupIntentService(this.StripeClient); + var setupIntent = service.ListAutoPaging(options).First(); + this.AssertRequest(HttpMethod.Get, "/v1/setup_intents", "limit=3"); + } + + [Fact] + public async Task TestSetupIntentsGetAutoPagingAsync() + { + var options = new SetupIntentListOptions { Limit = 3 }; + var service = new SetupIntentService(this.StripeClient); + var setupIntent = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/setup_intents", "limit=3"); + } + + [Fact] + public void TestSetupIntentsGet2() + { + var service = new SetupIntentService(this.StripeClient); + SetupIntent setupIntent = service.Get("seti_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/setup_intents/seti_xxxxxxxxxxxxx"); + } + + [Fact] + public async Task TestSetupIntentsGet2Async() + { + var service = new SetupIntentService(this.StripeClient); + SetupIntent setupIntent = await service.GetAsync( + "seti_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, "/v1/setup_intents/seti_xxxxxxxxxxxxx"); } @@ -3603,6 +9054,18 @@ public void TestSetupIntentsPost() this.AssertRequest(HttpMethod.Post, "/v1/setup_intents"); } + [Fact] + public async Task TestSetupIntentsPostAsync() + { + var options = new SetupIntentCreateOptions + { + PaymentMethodTypes = new List { "card" }, + }; + var service = new SetupIntentService(this.StripeClient); + SetupIntent setupIntent = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/setup_intents"); + } + [Fact] public void TestSetupIntentsPost2() { @@ -3622,6 +9085,25 @@ public void TestSetupIntentsPost2() "/v1/setup_intents/seti_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestSetupIntentsPost2Async() + { + var options = new SetupIntentUpdateOptions + { + Metadata = new Dictionary + { + { "user_id", "3435453" }, + }, + }; + var service = new SetupIntentService(this.StripeClient); + SetupIntent setupIntent = await service.UpdateAsync( + "seti_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/setup_intents/seti_xxxxxxxxxxxxx"); + } + [Fact] public void TestSetupIntentsVerifyMicrodepositsPost() { @@ -3633,6 +9115,17 @@ public void TestSetupIntentsVerifyMicrodepositsPost() "/v1/setup_intents/seti_xxxxxxxxxxxxx/verify_microdeposits"); } + [Fact] + public async Task TestSetupIntentsVerifyMicrodepositsPostAsync() + { + var service = new SetupIntentService(this.StripeClient); + SetupIntent setupIntent = await service.VerifyMicrodepositsAsync( + "seti_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/setup_intents/seti_xxxxxxxxxxxxx/verify_microdeposits"); + } + [Fact] public void TestSetupIntentsVerifyMicrodepositsPost2() { @@ -3649,6 +9142,22 @@ public void TestSetupIntentsVerifyMicrodepositsPost2() "/v1/setup_intents/seti_xxxxxxxxxxxxx/verify_microdeposits"); } + [Fact] + public async Task TestSetupIntentsVerifyMicrodepositsPost2Async() + { + var options = new SetupIntentVerifyMicrodepositsOptions + { + Amounts = new List { 32, 45 }, + }; + var service = new SetupIntentService(this.StripeClient); + SetupIntent setupIntent = await service.VerifyMicrodepositsAsync( + "seti_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/setup_intents/seti_xxxxxxxxxxxxx/verify_microdeposits"); + } + [Fact] public void TestShippingRatesGet() { @@ -3657,6 +9166,30 @@ public void TestShippingRatesGet() this.AssertRequest(HttpMethod.Get, "/v1/shipping_rates"); } + [Fact] + public async Task TestShippingRatesGetAsync() + { + var service = new ShippingRateService(this.StripeClient); + StripeList shippingRates = await service.ListAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/shipping_rates"); + } + + [Fact] + public void TestShippingRatesGetAutoPaging() + { + var service = new ShippingRateService(this.StripeClient); + var shippingRate = service.ListAutoPaging().First(); + this.AssertRequest(HttpMethod.Get, "/v1/shipping_rates"); + } + + [Fact] + public async Task TestShippingRatesGetAutoPagingAsync() + { + var service = new ShippingRateService(this.StripeClient); + var shippingRate = await service.ListAutoPagingAsync().FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/shipping_rates"); + } + [Fact] public void TestShippingRatesGet2() { @@ -3666,6 +9199,35 @@ public void TestShippingRatesGet2() this.AssertRequest(HttpMethod.Get, "/v1/shipping_rates", "limit=3"); } + [Fact] + public async Task TestShippingRatesGet2Async() + { + var options = new ShippingRateListOptions { Limit = 3 }; + var service = new ShippingRateService(this.StripeClient); + StripeList shippingRates = await service.ListAsync( + options); + this.AssertRequest(HttpMethod.Get, "/v1/shipping_rates", "limit=3"); + } + + [Fact] + public void TestShippingRatesGet2AutoPaging() + { + var options = new ShippingRateListOptions { Limit = 3 }; + var service = new ShippingRateService(this.StripeClient); + var shippingRate = service.ListAutoPaging(options).First(); + this.AssertRequest(HttpMethod.Get, "/v1/shipping_rates", "limit=3"); + } + + [Fact] + public async Task TestShippingRatesGet2AutoPagingAsync() + { + var options = new ShippingRateListOptions { Limit = 3 }; + var service = new ShippingRateService(this.StripeClient); + var shippingRate = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/shipping_rates", "limit=3"); + } + [Fact] public void TestShippingRatesGet3() { @@ -3676,6 +9238,17 @@ public void TestShippingRatesGet3() "/v1/shipping_rates/shr_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestShippingRatesGet3Async() + { + var service = new ShippingRateService(this.StripeClient); + ShippingRate shippingRate = await service.GetAsync( + "shr_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/shipping_rates/shr_xxxxxxxxxxxxx"); + } + [Fact] public void TestShippingRatesPost() { @@ -3694,6 +9267,24 @@ public void TestShippingRatesPost() this.AssertRequest(HttpMethod.Post, "/v1/shipping_rates"); } + [Fact] + public async Task TestShippingRatesPostAsync() + { + var options = new ShippingRateCreateOptions + { + DisplayName = "Sample Shipper", + FixedAmount = new ShippingRateFixedAmountOptions + { + Currency = "usd", + Amount = 400, + }, + Type = "fixed_amount", + }; + var service = new ShippingRateService(this.StripeClient); + ShippingRate shippingRate = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/shipping_rates"); + } + [Fact] public void TestShippingRatesPost2() { @@ -3712,6 +9303,24 @@ public void TestShippingRatesPost2() this.AssertRequest(HttpMethod.Post, "/v1/shipping_rates"); } + [Fact] + public async Task TestShippingRatesPost2Async() + { + var options = new ShippingRateCreateOptions + { + DisplayName = "Ground shipping", + Type = "fixed_amount", + FixedAmount = new ShippingRateFixedAmountOptions + { + Amount = 500, + Currency = "usd", + }, + }; + var service = new ShippingRateService(this.StripeClient); + ShippingRate shippingRate = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/shipping_rates"); + } + [Fact] public void TestShippingRatesPost3() { @@ -3731,6 +9340,25 @@ public void TestShippingRatesPost3() "/v1/shipping_rates/shr_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestShippingRatesPost3Async() + { + var options = new ShippingRateUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new ShippingRateService(this.StripeClient); + ShippingRate shippingRate = await service.UpdateAsync( + "shr_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/shipping_rates/shr_xxxxxxxxxxxxx"); + } + [Fact] public void TestSigmaScheduledQueryRunsGet() { @@ -3749,7 +9377,57 @@ public void TestSigmaScheduledQueryRunsGet() } [Fact] - public void TestSigmaScheduledQueryRunsGet2() + public async Task TestSigmaScheduledQueryRunsGetAsync() + { + var options = new Stripe.Sigma.ScheduledQueryRunListOptions + { + Limit = 3, + }; + var service = new Stripe.Sigma.ScheduledQueryRunService( + this.StripeClient); + StripeList scheduledQueryRuns = await service + .ListAsync(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/sigma/scheduled_query_runs", + "limit=3"); + } + + [Fact] + public void TestSigmaScheduledQueryRunsGetAutoPaging() + { + var options = new Stripe.Sigma.ScheduledQueryRunListOptions + { + Limit = 3, + }; + var service = new Stripe.Sigma.ScheduledQueryRunService( + this.StripeClient); + var scheduledQueryRun = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/sigma/scheduled_query_runs", + "limit=3"); + } + + [Fact] + public async Task TestSigmaScheduledQueryRunsGetAutoPagingAsync() + { + var options = new Stripe.Sigma.ScheduledQueryRunListOptions + { + Limit = 3, + }; + var service = new Stripe.Sigma.ScheduledQueryRunService( + this.StripeClient); + var scheduledQueryRun = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/sigma/scheduled_query_runs", + "limit=3"); + } + + [Fact] + public void TestSigmaScheduledQueryRunsGet2() { var service = new Stripe.Sigma.ScheduledQueryRunService( this.StripeClient); @@ -3760,6 +9438,18 @@ public void TestSigmaScheduledQueryRunsGet2() "/v1/sigma/scheduled_query_runs/sqr_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestSigmaScheduledQueryRunsGet2Async() + { + var service = new Stripe.Sigma.ScheduledQueryRunService( + this.StripeClient); + Stripe.Sigma.ScheduledQueryRun scheduledQueryRun = await service + .GetAsync("sqr_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/sigma/scheduled_query_runs/sqr_xxxxxxxxxxxxx"); + } + [Fact] public void TestSourcesGet() { @@ -3768,6 +9458,14 @@ public void TestSourcesGet() this.AssertRequest(HttpMethod.Get, "/v1/sources/src_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestSourcesGetAsync() + { + var service = new SourceService(this.StripeClient); + Source source = await service.GetAsync("src_xxxxxxxxxxxxx"); + this.AssertRequest(HttpMethod.Get, "/v1/sources/src_xxxxxxxxxxxxx"); + } + [Fact] public void TestSourcesGet2() { @@ -3776,6 +9474,14 @@ public void TestSourcesGet2() this.AssertRequest(HttpMethod.Get, "/v1/sources/src_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestSourcesGet2Async() + { + var service = new SourceService(this.StripeClient); + Source source = await service.GetAsync("src_xxxxxxxxxxxxx"); + this.AssertRequest(HttpMethod.Get, "/v1/sources/src_xxxxxxxxxxxxx"); + } + [Fact] public void TestSourcesPost() { @@ -3793,6 +9499,25 @@ public void TestSourcesPost() "/v1/sources/src_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestSourcesPostAsync() + { + var options = new SourceUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new SourceService(this.StripeClient); + Source source = await service.UpdateAsync( + "src_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/sources/src_xxxxxxxxxxxxx"); + } + [Fact] public void TestSubscriptionItemsDelete() { @@ -3803,6 +9528,17 @@ public void TestSubscriptionItemsDelete() "/v1/subscription_items/si_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestSubscriptionItemsDeleteAsync() + { + var service = new SubscriptionItemService(this.StripeClient); + SubscriptionItem deleted = await service.DeleteAsync( + "si_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Delete, + "/v1/subscription_items/si_xxxxxxxxxxxxx"); + } + [Fact] public void TestSubscriptionItemsGet() { @@ -3819,6 +9555,53 @@ public void TestSubscriptionItemsGet() "subscription=sub_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestSubscriptionItemsGetAsync() + { + var options = new SubscriptionItemListOptions + { + Subscription = "sub_xxxxxxxxxxxxx", + }; + var service = new SubscriptionItemService(this.StripeClient); + StripeList subscriptionItems = await service + .ListAsync(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/subscription_items", + "subscription=sub_xxxxxxxxxxxxx"); + } + + [Fact] + public void TestSubscriptionItemsGetAutoPaging() + { + var options = new SubscriptionItemListOptions + { + Subscription = "sub_xxxxxxxxxxxxx", + }; + var service = new SubscriptionItemService(this.StripeClient); + var subscriptionItem = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/subscription_items", + "subscription=sub_xxxxxxxxxxxxx"); + } + + [Fact] + public async Task TestSubscriptionItemsGetAutoPagingAsync() + { + var options = new SubscriptionItemListOptions + { + Subscription = "sub_xxxxxxxxxxxxx", + }; + var service = new SubscriptionItemService(this.StripeClient); + var subscriptionItem = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/subscription_items", + "subscription=sub_xxxxxxxxxxxxx"); + } + [Fact] public void TestSubscriptionItemsGet2() { @@ -3829,6 +9612,17 @@ public void TestSubscriptionItemsGet2() "/v1/subscription_items/si_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestSubscriptionItemsGet2Async() + { + var service = new SubscriptionItemService(this.StripeClient); + SubscriptionItem subscriptionItem = await service.GetAsync( + "si_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/subscription_items/si_xxxxxxxxxxxxx"); + } + [Fact] public void TestSubscriptionItemsPost() { @@ -3843,6 +9637,21 @@ public void TestSubscriptionItemsPost() this.AssertRequest(HttpMethod.Post, "/v1/subscription_items"); } + [Fact] + public async Task TestSubscriptionItemsPostAsync() + { + var options = new SubscriptionItemCreateOptions + { + Subscription = "sub_xxxxxxxxxxxxx", + Price = "price_xxxxxxxxxxxxx", + Quantity = 2, + }; + var service = new SubscriptionItemService(this.StripeClient); + SubscriptionItem subscriptionItem = await service.CreateAsync( + options); + this.AssertRequest(HttpMethod.Post, "/v1/subscription_items"); + } + [Fact] public void TestSubscriptionItemsPost2() { @@ -3862,6 +9671,25 @@ public void TestSubscriptionItemsPost2() "/v1/subscription_items/si_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestSubscriptionItemsPost2Async() + { + var options = new SubscriptionItemUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new SubscriptionItemService(this.StripeClient); + SubscriptionItem subscriptionItem = await service.UpdateAsync( + "si_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/subscription_items/si_xxxxxxxxxxxxx"); + } + [Fact] public void TestSubscriptionSchedulesCancelPost() { @@ -3873,6 +9701,17 @@ public void TestSubscriptionSchedulesCancelPost() "/v1/subscription_schedules/sub_sched_xxxxxxxxxxxxx/cancel"); } + [Fact] + public async Task TestSubscriptionSchedulesCancelPostAsync() + { + var service = new SubscriptionScheduleService(this.StripeClient); + SubscriptionSchedule subscriptionSchedule = await service + .CancelAsync("sub_sched_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/subscription_schedules/sub_sched_xxxxxxxxxxxxx/cancel"); + } + [Fact] public void TestSubscriptionSchedulesGet() { @@ -3886,6 +9725,45 @@ public void TestSubscriptionSchedulesGet() "limit=3"); } + [Fact] + public async Task TestSubscriptionSchedulesGetAsync() + { + var options = new SubscriptionScheduleListOptions { Limit = 3 }; + var service = new SubscriptionScheduleService(this.StripeClient); + StripeList subscriptionSchedules = await service + .ListAsync(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/subscription_schedules", + "limit=3"); + } + + [Fact] + public void TestSubscriptionSchedulesGetAutoPaging() + { + var options = new SubscriptionScheduleListOptions { Limit = 3 }; + var service = new SubscriptionScheduleService(this.StripeClient); + var subscriptionSchedule = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/subscription_schedules", + "limit=3"); + } + + [Fact] + public async Task TestSubscriptionSchedulesGetAutoPagingAsync() + { + var options = new SubscriptionScheduleListOptions { Limit = 3 }; + var service = new SubscriptionScheduleService(this.StripeClient); + var subscriptionSchedule = await service.ListAutoPagingAsync( + options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/subscription_schedules", + "limit=3"); + } + [Fact] public void TestSubscriptionSchedulesGet2() { @@ -3897,6 +9775,17 @@ public void TestSubscriptionSchedulesGet2() "/v1/subscription_schedules/sub_sched_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestSubscriptionSchedulesGet2Async() + { + var service = new SubscriptionScheduleService(this.StripeClient); + SubscriptionSchedule subscriptionSchedule = await service.GetAsync( + "sub_sched_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/subscription_schedules/sub_sched_xxxxxxxxxxxxx"); + } + [Fact] public void TestSubscriptionSchedulesPost() { @@ -3926,6 +9815,36 @@ public void TestSubscriptionSchedulesPost() this.AssertRequest(HttpMethod.Post, "/v1/subscription_schedules"); } + [Fact] + public async Task TestSubscriptionSchedulesPostAsync() + { + var options = new SubscriptionScheduleCreateOptions + { + Customer = "cus_xxxxxxxxxxxxx", + StartDate = DateTimeOffset.FromUnixTimeSeconds(1676070661) + .UtcDateTime, + EndBehavior = "release", + Phases = new List + { + new SubscriptionSchedulePhaseOptions + { + Items = new List + { + new SubscriptionSchedulePhaseItemOptions + { + Price = "price_xxxxxxxxxxxxx", + Quantity = 1, + }, + }, + }, + }, + }; + var service = new SubscriptionScheduleService(this.StripeClient); + SubscriptionSchedule subscriptionSchedule = await service + .CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/subscription_schedules"); + } + [Fact] public void TestSubscriptionSchedulesPost2() { @@ -3942,6 +9861,21 @@ public void TestSubscriptionSchedulesPost2() "/v1/subscription_schedules/sub_sched_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestSubscriptionSchedulesPost2Async() + { + var options = new SubscriptionScheduleUpdateOptions + { + EndBehavior = "release", + }; + var service = new SubscriptionScheduleService(this.StripeClient); + SubscriptionSchedule subscriptionSchedule = await service + .UpdateAsync("sub_sched_xxxxxxxxxxxxx", options); + this.AssertRequest( + HttpMethod.Post, + "/v1/subscription_schedules/sub_sched_xxxxxxxxxxxxx"); + } + [Fact] public void TestSubscriptionSchedulesReleasePost() { @@ -3954,12 +9888,34 @@ public void TestSubscriptionSchedulesReleasePost() } [Fact] - public void TestSubscriptionsDelete() + public async Task TestSubscriptionSchedulesReleasePostAsync() { - var service = new SubscriptionService(this.StripeClient); - Subscription subscription = service.Cancel("sub_xxxxxxxxxxxxx"); + var service = new SubscriptionScheduleService(this.StripeClient); + SubscriptionSchedule subscriptionSchedule = await service + .ReleaseAsync("sub_sched_xxxxxxxxxxxxx"); this.AssertRequest( - HttpMethod.Delete, + HttpMethod.Post, + "/v1/subscription_schedules/sub_sched_xxxxxxxxxxxxx/release"); + } + + [Fact] + public void TestSubscriptionsDelete() + { + var service = new SubscriptionService(this.StripeClient); + Subscription subscription = service.Cancel("sub_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Delete, + "/v1/subscriptions/sub_xxxxxxxxxxxxx"); + } + + [Fact] + public async Task TestSubscriptionsDeleteAsync() + { + var service = new SubscriptionService(this.StripeClient); + Subscription subscription = await service.CancelAsync( + "sub_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Delete, "/v1/subscriptions/sub_xxxxxxxxxxxxx"); } @@ -3973,6 +9929,16 @@ public void TestSubscriptionsDiscountDelete() "/v1/subscriptions/sub_xyz/discount"); } + [Fact] + public async Task TestSubscriptionsDiscountDeleteAsync() + { + var service = new SubscriptionService(this.StripeClient); + Discount discount = await service.DeleteDiscountAsync("sub_xyz"); + this.AssertRequest( + HttpMethod.Delete, + "/v1/subscriptions/sub_xyz/discount"); + } + [Fact] public void TestSubscriptionsGet() { @@ -3982,6 +9948,35 @@ public void TestSubscriptionsGet() this.AssertRequest(HttpMethod.Get, "/v1/subscriptions", "limit=3"); } + [Fact] + public async Task TestSubscriptionsGetAsync() + { + var options = new SubscriptionListOptions { Limit = 3 }; + var service = new SubscriptionService(this.StripeClient); + StripeList subscriptions = await service.ListAsync( + options); + this.AssertRequest(HttpMethod.Get, "/v1/subscriptions", "limit=3"); + } + + [Fact] + public void TestSubscriptionsGetAutoPaging() + { + var options = new SubscriptionListOptions { Limit = 3 }; + var service = new SubscriptionService(this.StripeClient); + var subscription = service.ListAutoPaging(options).First(); + this.AssertRequest(HttpMethod.Get, "/v1/subscriptions", "limit=3"); + } + + [Fact] + public async Task TestSubscriptionsGetAutoPagingAsync() + { + var options = new SubscriptionListOptions { Limit = 3 }; + var service = new SubscriptionService(this.StripeClient); + var subscription = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/subscriptions", "limit=3"); + } + [Fact] public void TestSubscriptionsGet2() { @@ -3992,6 +9987,17 @@ public void TestSubscriptionsGet2() "/v1/subscriptions/sub_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestSubscriptionsGet2Async() + { + var service = new SubscriptionService(this.StripeClient); + Subscription subscription = await service.GetAsync( + "sub_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/subscriptions/sub_xxxxxxxxxxxxx"); + } + [Fact] public void TestSubscriptionsPost() { @@ -4011,6 +10017,25 @@ public void TestSubscriptionsPost() this.AssertRequest(HttpMethod.Post, "/v1/subscriptions"); } + [Fact] + public async Task TestSubscriptionsPostAsync() + { + var options = new SubscriptionCreateOptions + { + Customer = "cus_xxxxxxxxxxxxx", + Items = new List + { + new SubscriptionItemOptions + { + Price = "price_xxxxxxxxxxxxx", + }, + }, + }; + var service = new SubscriptionService(this.StripeClient); + Subscription subscription = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/subscriptions"); + } + [Fact] public void TestSubscriptionsPost2() { @@ -4030,6 +10055,25 @@ public void TestSubscriptionsPost2() "/v1/subscriptions/sub_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestSubscriptionsPost2Async() + { + var options = new SubscriptionUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new SubscriptionService(this.StripeClient); + Subscription subscription = await service.UpdateAsync( + "sub_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/subscriptions/sub_xxxxxxxxxxxxx"); + } + [Fact] public void TestSubscriptionsSearchGet() { @@ -4046,6 +10090,53 @@ public void TestSubscriptionsSearchGet() "query=status%3A%27active%27%20AND%20metadata%5B%27order_id%27%5D%3A%276735%27"); } + [Fact] + public async Task TestSubscriptionsSearchGetAsync() + { + var options = new SubscriptionSearchOptions + { + Query = "status:'active' AND metadata['order_id']:'6735'", + }; + var service = new SubscriptionService(this.StripeClient); + StripeSearchResult subscriptions = await service + .SearchAsync(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/subscriptions/search", + "query=status%3A%27active%27%20AND%20metadata%5B%27order_id%27%5D%3A%276735%27"); + } + + [Fact] + public void TestSubscriptionsSearchGetAutoPaging() + { + var options = new SubscriptionSearchOptions + { + Query = "status:'active' AND metadata['order_id']:'6735'", + }; + var service = new SubscriptionService(this.StripeClient); + var subscription = service.SearchAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/subscriptions/search", + "query=status%3A%27active%27%20AND%20metadata%5B%27order_id%27%5D%3A%276735%27"); + } + + [Fact] + public async Task TestSubscriptionsSearchGetAutoPagingAsync() + { + var options = new SubscriptionSearchOptions + { + Query = "status:'active' AND metadata['order_id']:'6735'", + }; + var service = new SubscriptionService(this.StripeClient); + var subscription = await service.SearchAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/subscriptions/search", + "query=status%3A%27active%27%20AND%20metadata%5B%27order_id%27%5D%3A%276735%27"); + } + [Fact] public void TestTaxCalculationsLineItemsGet() { @@ -4058,6 +10149,41 @@ public void TestTaxCalculationsLineItemsGet() "/v1/tax/calculations/xxx/line_items"); } + [Fact] + public async Task TestTaxCalculationsLineItemsGetAsync() + { + var service = new Stripe.Tax.CalculationLineItemService( + this.StripeClient); + StripeList calculationLineItems = await service + .ListAsync("xxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/tax/calculations/xxx/line_items"); + } + + [Fact] + public void TestTaxCalculationsLineItemsGetAutoPaging() + { + var service = new Stripe.Tax.CalculationLineItemService( + this.StripeClient); + var calculationLineItem = service.ListAutoPaging("xxx").First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/tax/calculations/xxx/line_items"); + } + + [Fact] + public async Task TestTaxCalculationsLineItemsGetAutoPagingAsync() + { + var service = new Stripe.Tax.CalculationLineItemService( + this.StripeClient); + var calculationLineItem = await service.ListAutoPagingAsync("xxx") + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/tax/calculations/xxx/line_items"); + } + [Fact] public void TestTaxCalculationsPost() { @@ -4090,6 +10216,39 @@ public void TestTaxCalculationsPost() this.AssertRequest(HttpMethod.Post, "/v1/tax/calculations"); } + [Fact] + public async Task TestTaxCalculationsPostAsync() + { + var options = new Stripe.Tax.CalculationCreateOptions + { + Currency = "usd", + LineItems = new List + { + new Stripe.Tax.CalculationLineItemOptions + { + Amount = 1000, + Reference = "L1", + }, + }, + CustomerDetails = new Stripe.Tax.CalculationCustomerDetailsOptions + { + Address = new AddressOptions + { + Line1 = "354 Oyster Point Blvd", + City = "South San Francisco", + State = "CA", + PostalCode = "94080", + Country = "US", + }, + AddressSource = "shipping", + }, + }; + var service = new Stripe.Tax.CalculationService(this.StripeClient); + Stripe.Tax.Calculation calculation = await service.CreateAsync( + options); + this.AssertRequest(HttpMethod.Post, "/v1/tax/calculations"); + } + [Fact] public void TestTaxCodesGet() { @@ -4099,6 +10258,34 @@ public void TestTaxCodesGet() this.AssertRequest(HttpMethod.Get, "/v1/tax_codes", "limit=3"); } + [Fact] + public async Task TestTaxCodesGetAsync() + { + var options = new TaxCodeListOptions { Limit = 3 }; + var service = new TaxCodeService(this.StripeClient); + StripeList taxCodes = await service.ListAsync(options); + this.AssertRequest(HttpMethod.Get, "/v1/tax_codes", "limit=3"); + } + + [Fact] + public void TestTaxCodesGetAutoPaging() + { + var options = new TaxCodeListOptions { Limit = 3 }; + var service = new TaxCodeService(this.StripeClient); + var taxCode = service.ListAutoPaging(options).First(); + this.AssertRequest(HttpMethod.Get, "/v1/tax_codes", "limit=3"); + } + + [Fact] + public async Task TestTaxCodesGetAutoPagingAsync() + { + var options = new TaxCodeListOptions { Limit = 3 }; + var service = new TaxCodeService(this.StripeClient); + var taxCode = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/tax_codes", "limit=3"); + } + [Fact] public void TestTaxCodesGet2() { @@ -4109,6 +10296,16 @@ public void TestTaxCodesGet2() "/v1/tax_codes/txcd_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestTaxCodesGet2Async() + { + var service = new TaxCodeService(this.StripeClient); + TaxCode taxCode = await service.GetAsync("txcd_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/tax_codes/txcd_xxxxxxxxxxxxx"); + } + [Fact] public void TestTaxIdsDelete() { @@ -4117,6 +10314,14 @@ public void TestTaxIdsDelete() this.AssertRequest(HttpMethod.Delete, "/v1/tax_ids/taxid_123"); } + [Fact] + public async Task TestTaxIdsDeleteAsync() + { + var service = new TaxIdService(this.StripeClient); + TaxId deleted = await service.DeleteAsync("taxid_123"); + this.AssertRequest(HttpMethod.Delete, "/v1/tax_ids/taxid_123"); + } + [Fact] public void TestTaxIdsGet() { @@ -4125,6 +10330,30 @@ public void TestTaxIdsGet() this.AssertRequest(HttpMethod.Get, "/v1/tax_ids"); } + [Fact] + public async Task TestTaxIdsGetAsync() + { + var service = new TaxIdService(this.StripeClient); + StripeList taxIds = await service.ListAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/tax_ids"); + } + + [Fact] + public void TestTaxIdsGetAutoPaging() + { + var service = new TaxIdService(this.StripeClient); + var taxId = service.ListAutoPaging().First(); + this.AssertRequest(HttpMethod.Get, "/v1/tax_ids"); + } + + [Fact] + public async Task TestTaxIdsGetAutoPagingAsync() + { + var service = new TaxIdService(this.StripeClient); + var taxId = await service.ListAutoPagingAsync().FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/tax_ids"); + } + [Fact] public void TestTaxIdsGet2() { @@ -4133,6 +10362,14 @@ public void TestTaxIdsGet2() this.AssertRequest(HttpMethod.Get, "/v1/tax_ids/taxid_123"); } + [Fact] + public async Task TestTaxIdsGet2Async() + { + var service = new TaxIdService(this.StripeClient); + TaxId taxId = await service.GetAsync("taxid_123"); + this.AssertRequest(HttpMethod.Get, "/v1/tax_ids/taxid_123"); + } + [Fact] public void TestTaxIdsPost() { @@ -4147,16 +10384,57 @@ public void TestTaxIdsPost() } [Fact] - public void TestTaxRatesGet() + public async Task TestTaxIdsPostAsync() { - var options = new TaxRateListOptions { Limit = 3 }; - var service = new TaxRateService(this.StripeClient); - StripeList taxRates = service.List(options); - this.AssertRequest(HttpMethod.Get, "/v1/tax_rates", "limit=3"); - } - - [Fact] - public void TestTaxRatesGet2() + var options = new TaxIdCreateOptions + { + Type = "eu_vat", + Value = "123", + }; + var service = new TaxIdService(this.StripeClient); + TaxId taxId = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/tax_ids"); + } + + [Fact] + public void TestTaxRatesGet() + { + var options = new TaxRateListOptions { Limit = 3 }; + var service = new TaxRateService(this.StripeClient); + StripeList taxRates = service.List(options); + this.AssertRequest(HttpMethod.Get, "/v1/tax_rates", "limit=3"); + } + + [Fact] + public async Task TestTaxRatesGetAsync() + { + var options = new TaxRateListOptions { Limit = 3 }; + var service = new TaxRateService(this.StripeClient); + StripeList taxRates = await service.ListAsync(options); + this.AssertRequest(HttpMethod.Get, "/v1/tax_rates", "limit=3"); + } + + [Fact] + public void TestTaxRatesGetAutoPaging() + { + var options = new TaxRateListOptions { Limit = 3 }; + var service = new TaxRateService(this.StripeClient); + var taxRate = service.ListAutoPaging(options).First(); + this.AssertRequest(HttpMethod.Get, "/v1/tax_rates", "limit=3"); + } + + [Fact] + public async Task TestTaxRatesGetAutoPagingAsync() + { + var options = new TaxRateListOptions { Limit = 3 }; + var service = new TaxRateService(this.StripeClient); + var taxRate = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/tax_rates", "limit=3"); + } + + [Fact] + public void TestTaxRatesGet2() { var service = new TaxRateService(this.StripeClient); TaxRate taxRate = service.Get("txr_xxxxxxxxxxxxx"); @@ -4165,6 +10443,16 @@ public void TestTaxRatesGet2() "/v1/tax_rates/txr_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestTaxRatesGet2Async() + { + var service = new TaxRateService(this.StripeClient); + TaxRate taxRate = await service.GetAsync("txr_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/tax_rates/txr_xxxxxxxxxxxxx"); + } + [Fact] public void TestTaxRatesPost() { @@ -4181,6 +10469,22 @@ public void TestTaxRatesPost() this.AssertRequest(HttpMethod.Post, "/v1/tax_rates"); } + [Fact] + public async Task TestTaxRatesPostAsync() + { + var options = new TaxRateCreateOptions + { + DisplayName = "VAT", + Description = "VAT Germany", + Jurisdiction = "DE", + Percentage = 16M, + Inclusive = false, + }; + var service = new TaxRateService(this.StripeClient); + TaxRate taxRate = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/tax_rates"); + } + [Fact] public void TestTaxRatesPost2() { @@ -4192,6 +10496,19 @@ public void TestTaxRatesPost2() "/v1/tax_rates/txr_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestTaxRatesPost2Async() + { + var options = new TaxRateUpdateOptions { Active = false }; + var service = new TaxRateService(this.StripeClient); + TaxRate taxRate = await service.UpdateAsync( + "txr_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/tax_rates/txr_xxxxxxxxxxxxx"); + } + [Fact] public void TestTaxRegistrationsGet() { @@ -4208,6 +10525,53 @@ public void TestTaxRegistrationsGet() "status=all"); } + [Fact] + public async Task TestTaxRegistrationsGetAsync() + { + var options = new Stripe.Tax.RegistrationListOptions + { + Status = "all", + }; + var service = new Stripe.Tax.RegistrationService(this.StripeClient); + StripeList registrations = await service + .ListAsync(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/tax/registrations", + "status=all"); + } + + [Fact] + public void TestTaxRegistrationsGetAutoPaging() + { + var options = new Stripe.Tax.RegistrationListOptions + { + Status = "all", + }; + var service = new Stripe.Tax.RegistrationService(this.StripeClient); + var registration = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/tax/registrations", + "status=all"); + } + + [Fact] + public async Task TestTaxRegistrationsGetAutoPagingAsync() + { + var options = new Stripe.Tax.RegistrationListOptions + { + Status = "all", + }; + var service = new Stripe.Tax.RegistrationService(this.StripeClient); + var registration = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/tax/registrations", + "status=all"); + } + [Fact] public void TestTaxRegistrationsPost() { @@ -4228,6 +10592,27 @@ public void TestTaxRegistrationsPost() this.AssertRequest(HttpMethod.Post, "/v1/tax/registrations"); } + [Fact] + public async Task TestTaxRegistrationsPostAsync() + { + var options = new Stripe.Tax.RegistrationCreateOptions + { + Country = "IE", + CountryOptions = new Stripe.Tax.RegistrationCountryOptionsOptions + { + Ie = new Stripe.Tax.RegistrationCountryOptionsIeOptions + { + Type = "oss_union", + }, + }, + ActiveFrom = Stripe.Tax.RegistrationActiveFrom.Now, + }; + var service = new Stripe.Tax.RegistrationService(this.StripeClient); + Stripe.Tax.Registration registration = await service.CreateAsync( + options); + this.AssertRequest(HttpMethod.Post, "/v1/tax/registrations"); + } + [Fact] public void TestTaxRegistrationsPost2() { @@ -4244,6 +10629,22 @@ public void TestTaxRegistrationsPost2() "/v1/tax/registrations/taxreg_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestTaxRegistrationsPost2Async() + { + var options = new Stripe.Tax.RegistrationUpdateOptions + { + ExpiresAt = Stripe.Tax.RegistrationExpiresAt.Now, + }; + var service = new Stripe.Tax.RegistrationService(this.StripeClient); + Stripe.Tax.Registration registration = await service.UpdateAsync( + "taxreg_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/tax/registrations/taxreg_xxxxxxxxxxxxx"); + } + [Fact] public void TestTaxSettingsGet() { @@ -4253,6 +10654,15 @@ public void TestTaxSettingsGet() this.AssertRequest(HttpMethod.Get, "/v1/tax/settings"); } + [Fact] + public async Task TestTaxSettingsGetAsync() + { + var options = new Stripe.Tax.SettingsGetOptions(); + var service = new Stripe.Tax.SettingsService(this.StripeClient); + Stripe.Tax.Settings settings = await service.GetAsync(options); + this.AssertRequest(HttpMethod.Get, "/v1/tax/settings"); + } + [Fact] public void TestTaxSettingsPost() { @@ -4268,6 +10678,21 @@ public void TestTaxSettingsPost() this.AssertRequest(HttpMethod.Post, "/v1/tax/settings"); } + [Fact] + public async Task TestTaxSettingsPostAsync() + { + var options = new Stripe.Tax.SettingsUpdateOptions + { + Defaults = new Stripe.Tax.SettingsDefaultsOptions + { + TaxCode = "txcd_10000000", + }, + }; + var service = new Stripe.Tax.SettingsService(this.StripeClient); + Stripe.Tax.Settings settings = await service.UpdateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/tax/settings"); + } + [Fact] public void TestTaxTransactionsCreateFromCalculationPost() { @@ -4284,6 +10709,22 @@ public void TestTaxTransactionsCreateFromCalculationPost() "/v1/tax/transactions/create_from_calculation"); } + [Fact] + public async Task TestTaxTransactionsCreateFromCalculationPostAsync() + { + var options = new Stripe.Tax.TransactionCreateFromCalculationOptions + { + Calculation = "xxx", + Reference = "yyy", + }; + var service = new Stripe.Tax.TransactionService(this.StripeClient); + Stripe.Tax.Transaction transaction = await service + .CreateFromCalculationAsync(options); + this.AssertRequest( + HttpMethod.Post, + "/v1/tax/transactions/create_from_calculation"); + } + [Fact] public void TestTerminalConfigurationsDelete() { @@ -4295,6 +10736,18 @@ public void TestTerminalConfigurationsDelete() "/v1/terminal/configurations/uc_123"); } + [Fact] + public async Task TestTerminalConfigurationsDeleteAsync() + { + var service = new Stripe.Terminal.ConfigurationService( + this.StripeClient); + Stripe.Terminal.Configuration deleted = await service.DeleteAsync( + "uc_123"); + this.AssertRequest( + HttpMethod.Delete, + "/v1/terminal/configurations/uc_123"); + } + [Fact] public void TestTerminalConfigurationsDelete2() { @@ -4307,6 +10760,18 @@ public void TestTerminalConfigurationsDelete2() "/v1/terminal/configurations/tmc_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestTerminalConfigurationsDelete2Async() + { + var service = new Stripe.Terminal.ConfigurationService( + this.StripeClient); + Stripe.Terminal.Configuration deleted = await service.DeleteAsync( + "tmc_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Delete, + "/v1/terminal/configurations/tmc_xxxxxxxxxxxxx"); + } + [Fact] public void TestTerminalConfigurationsGet() { @@ -4317,6 +10782,35 @@ public void TestTerminalConfigurationsGet() this.AssertRequest(HttpMethod.Get, "/v1/terminal/configurations"); } + [Fact] + public async Task TestTerminalConfigurationsGetAsync() + { + var service = new Stripe.Terminal.ConfigurationService( + this.StripeClient); + StripeList configurations = await service + .ListAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/terminal/configurations"); + } + + [Fact] + public void TestTerminalConfigurationsGetAutoPaging() + { + var service = new Stripe.Terminal.ConfigurationService( + this.StripeClient); + var configuration = service.ListAutoPaging().First(); + this.AssertRequest(HttpMethod.Get, "/v1/terminal/configurations"); + } + + [Fact] + public async Task TestTerminalConfigurationsGetAutoPagingAsync() + { + var service = new Stripe.Terminal.ConfigurationService( + this.StripeClient); + var configuration = await service.ListAutoPagingAsync() + .FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/terminal/configurations"); + } + [Fact] public void TestTerminalConfigurationsGet2() { @@ -4328,6 +10822,18 @@ public void TestTerminalConfigurationsGet2() "/v1/terminal/configurations/uc_123"); } + [Fact] + public async Task TestTerminalConfigurationsGet2Async() + { + var service = new Stripe.Terminal.ConfigurationService( + this.StripeClient); + Stripe.Terminal.Configuration configuration = await service + .GetAsync("uc_123"); + this.AssertRequest( + HttpMethod.Get, + "/v1/terminal/configurations/uc_123"); + } + [Fact] public void TestTerminalConfigurationsGet3() { @@ -4346,36 +10852,109 @@ public void TestTerminalConfigurationsGet3() } [Fact] - public void TestTerminalConfigurationsGet4() + public async Task TestTerminalConfigurationsGet3Async() { + var options = new Stripe.Terminal.ConfigurationListOptions + { + Limit = 3, + }; var service = new Stripe.Terminal.ConfigurationService( this.StripeClient); - Stripe.Terminal.Configuration configuration = service.Get( - "tmc_xxxxxxxxxxxxx"); + StripeList configurations = await service + .ListAsync(options); this.AssertRequest( HttpMethod.Get, - "/v1/terminal/configurations/tmc_xxxxxxxxxxxxx"); + "/v1/terminal/configurations", + "limit=3"); } [Fact] - public void TestTerminalConfigurationsPost() + public void TestTerminalConfigurationsGet3AutoPaging() { - var options = new Stripe.Terminal.ConfigurationCreateOptions(); + var options = new Stripe.Terminal.ConfigurationListOptions + { + Limit = 3, + }; var service = new Stripe.Terminal.ConfigurationService( this.StripeClient); - Stripe.Terminal.Configuration configuration = service.Create( - options); - this.AssertRequest(HttpMethod.Post, "/v1/terminal/configurations"); + var configuration = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/terminal/configurations", + "limit=3"); } [Fact] - public void TestTerminalConfigurationsPost2() + public async Task TestTerminalConfigurationsGet3AutoPagingAsync() { - var options = new Stripe.Terminal.ConfigurationUpdateOptions + var options = new Stripe.Terminal.ConfigurationListOptions { - Tipping = new Stripe.Terminal.ConfigurationTippingOptions - { - Usd = new Stripe.Terminal.ConfigurationTippingUsdOptions + Limit = 3, + }; + var service = new Stripe.Terminal.ConfigurationService( + this.StripeClient); + var configuration = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/terminal/configurations", + "limit=3"); + } + + [Fact] + public void TestTerminalConfigurationsGet4() + { + var service = new Stripe.Terminal.ConfigurationService( + this.StripeClient); + Stripe.Terminal.Configuration configuration = service.Get( + "tmc_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/terminal/configurations/tmc_xxxxxxxxxxxxx"); + } + + [Fact] + public async Task TestTerminalConfigurationsGet4Async() + { + var service = new Stripe.Terminal.ConfigurationService( + this.StripeClient); + Stripe.Terminal.Configuration configuration = await service + .GetAsync("tmc_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/terminal/configurations/tmc_xxxxxxxxxxxxx"); + } + + [Fact] + public void TestTerminalConfigurationsPost() + { + var options = new Stripe.Terminal.ConfigurationCreateOptions(); + var service = new Stripe.Terminal.ConfigurationService( + this.StripeClient); + Stripe.Terminal.Configuration configuration = service.Create( + options); + this.AssertRequest(HttpMethod.Post, "/v1/terminal/configurations"); + } + + [Fact] + public async Task TestTerminalConfigurationsPostAsync() + { + var options = new Stripe.Terminal.ConfigurationCreateOptions(); + var service = new Stripe.Terminal.ConfigurationService( + this.StripeClient); + Stripe.Terminal.Configuration configuration = await service + .CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/terminal/configurations"); + } + + [Fact] + public void TestTerminalConfigurationsPost2() + { + var options = new Stripe.Terminal.ConfigurationUpdateOptions + { + Tipping = new Stripe.Terminal.ConfigurationTippingOptions + { + Usd = new Stripe.Terminal.ConfigurationTippingUsdOptions { FixedAmounts = new List { 10 }, }, @@ -4391,6 +10970,28 @@ public void TestTerminalConfigurationsPost2() "/v1/terminal/configurations/uc_123"); } + [Fact] + public async Task TestTerminalConfigurationsPost2Async() + { + var options = new Stripe.Terminal.ConfigurationUpdateOptions + { + Tipping = new Stripe.Terminal.ConfigurationTippingOptions + { + Usd = new Stripe.Terminal.ConfigurationTippingUsdOptions + { + FixedAmounts = new List { 10 }, + }, + }, + }; + var service = new Stripe.Terminal.ConfigurationService( + this.StripeClient); + Stripe.Terminal.Configuration configuration = await service + .UpdateAsync("uc_123", options); + this.AssertRequest( + HttpMethod.Post, + "/v1/terminal/configurations/uc_123"); + } + [Fact] public void TestTerminalConfigurationsPost3() { @@ -4408,6 +11009,23 @@ public void TestTerminalConfigurationsPost3() this.AssertRequest(HttpMethod.Post, "/v1/terminal/configurations"); } + [Fact] + public async Task TestTerminalConfigurationsPost3Async() + { + var options = new Stripe.Terminal.ConfigurationCreateOptions + { + BbposWiseposE = new Stripe.Terminal.ConfigurationBbposWiseposEOptions + { + Splashscreen = "file_xxxxxxxxxxxxx", + }, + }; + var service = new Stripe.Terminal.ConfigurationService( + this.StripeClient); + Stripe.Terminal.Configuration configuration = await service + .CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/terminal/configurations"); + } + [Fact] public void TestTerminalConfigurationsPost4() { @@ -4428,6 +11046,25 @@ public void TestTerminalConfigurationsPost4() "/v1/terminal/configurations/tmc_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestTerminalConfigurationsPost4Async() + { + var options = new Stripe.Terminal.ConfigurationUpdateOptions + { + BbposWiseposE = new Stripe.Terminal.ConfigurationBbposWiseposEOptions + { + Splashscreen = "file_xxxxxxxxxxxxx", + }, + }; + var service = new Stripe.Terminal.ConfigurationService( + this.StripeClient); + Stripe.Terminal.Configuration configuration = await service + .UpdateAsync("tmc_xxxxxxxxxxxxx", options); + this.AssertRequest( + HttpMethod.Post, + "/v1/terminal/configurations/tmc_xxxxxxxxxxxxx"); + } + [Fact] public void TestTerminalConnectionTokensPost() { @@ -4441,6 +11078,19 @@ public void TestTerminalConnectionTokensPost() "/v1/terminal/connection_tokens"); } + [Fact] + public async Task TestTerminalConnectionTokensPostAsync() + { + var options = new Stripe.Terminal.ConnectionTokenCreateOptions(); + var service = new Stripe.Terminal.ConnectionTokenService( + this.StripeClient); + Stripe.Terminal.ConnectionToken connectionToken = await service + .CreateAsync(options); + this.AssertRequest( + HttpMethod.Post, + "/v1/terminal/connection_tokens"); + } + [Fact] public void TestTerminalLocationsDelete() { @@ -4453,6 +11103,18 @@ public void TestTerminalLocationsDelete() "/v1/terminal/locations/tml_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestTerminalLocationsDeleteAsync() + { + var service = new Stripe.Terminal.LocationService( + this.StripeClient); + Stripe.Terminal.Location deleted = await service.DeleteAsync( + "tml_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Delete, + "/v1/terminal/locations/tml_xxxxxxxxxxxxx"); + } + [Fact] public void TestTerminalLocationsGet() { @@ -4467,6 +11129,47 @@ public void TestTerminalLocationsGet() "limit=3"); } + [Fact] + public async Task TestTerminalLocationsGetAsync() + { + var options = new Stripe.Terminal.LocationListOptions { Limit = 3 }; + var service = new Stripe.Terminal.LocationService( + this.StripeClient); + StripeList locations = await service + .ListAsync(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/terminal/locations", + "limit=3"); + } + + [Fact] + public void TestTerminalLocationsGetAutoPaging() + { + var options = new Stripe.Terminal.LocationListOptions { Limit = 3 }; + var service = new Stripe.Terminal.LocationService( + this.StripeClient); + var location = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/terminal/locations", + "limit=3"); + } + + [Fact] + public async Task TestTerminalLocationsGetAutoPagingAsync() + { + var options = new Stripe.Terminal.LocationListOptions { Limit = 3 }; + var service = new Stripe.Terminal.LocationService( + this.StripeClient); + var location = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/terminal/locations", + "limit=3"); + } + [Fact] public void TestTerminalLocationsGet2() { @@ -4479,6 +11182,18 @@ public void TestTerminalLocationsGet2() "/v1/terminal/locations/tml_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestTerminalLocationsGet2Async() + { + var service = new Stripe.Terminal.LocationService( + this.StripeClient); + Stripe.Terminal.Location location = await service.GetAsync( + "tml_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/terminal/locations/tml_xxxxxxxxxxxxx"); + } + [Fact] public void TestTerminalLocationsPost() { @@ -4500,6 +11215,28 @@ public void TestTerminalLocationsPost() this.AssertRequest(HttpMethod.Post, "/v1/terminal/locations"); } + [Fact] + public async Task TestTerminalLocationsPostAsync() + { + var options = new Stripe.Terminal.LocationCreateOptions + { + DisplayName = "My First Store", + Address = new AddressOptions + { + Line1 = "1234 Main Street", + City = "San Francisco", + PostalCode = "94111", + State = "CA", + Country = "US", + }, + }; + var service = new Stripe.Terminal.LocationService( + this.StripeClient); + Stripe.Terminal.Location location = await service.CreateAsync( + options); + this.AssertRequest(HttpMethod.Post, "/v1/terminal/locations"); + } + [Fact] public void TestTerminalLocationsPost2() { @@ -4517,6 +11254,23 @@ public void TestTerminalLocationsPost2() "/v1/terminal/locations/tml_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestTerminalLocationsPost2Async() + { + var options = new Stripe.Terminal.LocationUpdateOptions + { + DisplayName = "My First Store", + }; + var service = new Stripe.Terminal.LocationService( + this.StripeClient); + Stripe.Terminal.Location location = await service.UpdateAsync( + "tml_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/terminal/locations/tml_xxxxxxxxxxxxx"); + } + [Fact] public void TestTerminalReadersCancelActionPost() { @@ -4528,6 +11282,17 @@ public void TestTerminalReadersCancelActionPost() "/v1/terminal/readers/tmr_xxxxxxxxxxxxx/cancel_action"); } + [Fact] + public async Task TestTerminalReadersCancelActionPostAsync() + { + var service = new Stripe.Terminal.ReaderService(this.StripeClient); + Stripe.Terminal.Reader reader = await service.CancelActionAsync( + "tmr_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/terminal/readers/tmr_xxxxxxxxxxxxx/cancel_action"); + } + [Fact] public void TestTerminalReadersDelete() { @@ -4539,6 +11304,17 @@ public void TestTerminalReadersDelete() "/v1/terminal/readers/tmr_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestTerminalReadersDeleteAsync() + { + var service = new Stripe.Terminal.ReaderService(this.StripeClient); + Stripe.Terminal.Reader deleted = await service.DeleteAsync( + "tmr_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Delete, + "/v1/terminal/readers/tmr_xxxxxxxxxxxxx"); + } + [Fact] public void TestTerminalReadersGet() { @@ -4552,45 +11328,124 @@ public void TestTerminalReadersGet() } [Fact] - public void TestTerminalReadersGet2() + public async Task TestTerminalReadersGetAsync() { + var options = new Stripe.Terminal.ReaderListOptions { Limit = 3 }; var service = new Stripe.Terminal.ReaderService(this.StripeClient); - Stripe.Terminal.Reader reader = service.Get("tmr_xxxxxxxxxxxxx"); + StripeList readers = await service + .ListAsync(options); this.AssertRequest( HttpMethod.Get, - "/v1/terminal/readers/tmr_xxxxxxxxxxxxx"); + "/v1/terminal/readers", + "limit=3"); } [Fact] - public void TestTerminalReadersPost() + public void TestTerminalReadersGetAutoPaging() { - var options = new Stripe.Terminal.ReaderCreateOptions - { - RegistrationCode = "puppies-plug-could", - Label = "Blue Rabbit", - Location = "tml_1234", - }; + var options = new Stripe.Terminal.ReaderListOptions { Limit = 3 }; var service = new Stripe.Terminal.ReaderService(this.StripeClient); - Stripe.Terminal.Reader reader = service.Create(options); - this.AssertRequest(HttpMethod.Post, "/v1/terminal/readers"); + var reader = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/terminal/readers", + "limit=3"); } [Fact] - public void TestTerminalReadersPost2() + public async Task TestTerminalReadersGetAutoPagingAsync() { - var options = new Stripe.Terminal.ReaderUpdateOptions - { - Label = "Blue Rabbit", - }; + var options = new Stripe.Terminal.ReaderListOptions { Limit = 3 }; var service = new Stripe.Terminal.ReaderService(this.StripeClient); - Stripe.Terminal.Reader reader = service.Update( - "tmr_xxxxxxxxxxxxx", - options); + var reader = await service.ListAutoPagingAsync(options) + .FirstAsync(); this.AssertRequest( - HttpMethod.Post, - "/v1/terminal/readers/tmr_xxxxxxxxxxxxx"); - } - + HttpMethod.Get, + "/v1/terminal/readers", + "limit=3"); + } + + [Fact] + public void TestTerminalReadersGet2() + { + var service = new Stripe.Terminal.ReaderService(this.StripeClient); + Stripe.Terminal.Reader reader = service.Get("tmr_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/terminal/readers/tmr_xxxxxxxxxxxxx"); + } + + [Fact] + public async Task TestTerminalReadersGet2Async() + { + var service = new Stripe.Terminal.ReaderService(this.StripeClient); + Stripe.Terminal.Reader reader = await service.GetAsync( + "tmr_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/terminal/readers/tmr_xxxxxxxxxxxxx"); + } + + [Fact] + public void TestTerminalReadersPost() + { + var options = new Stripe.Terminal.ReaderCreateOptions + { + RegistrationCode = "puppies-plug-could", + Label = "Blue Rabbit", + Location = "tml_1234", + }; + var service = new Stripe.Terminal.ReaderService(this.StripeClient); + Stripe.Terminal.Reader reader = service.Create(options); + this.AssertRequest(HttpMethod.Post, "/v1/terminal/readers"); + } + + [Fact] + public async Task TestTerminalReadersPostAsync() + { + var options = new Stripe.Terminal.ReaderCreateOptions + { + RegistrationCode = "puppies-plug-could", + Label = "Blue Rabbit", + Location = "tml_1234", + }; + var service = new Stripe.Terminal.ReaderService(this.StripeClient); + Stripe.Terminal.Reader reader = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/terminal/readers"); + } + + [Fact] + public void TestTerminalReadersPost2() + { + var options = new Stripe.Terminal.ReaderUpdateOptions + { + Label = "Blue Rabbit", + }; + var service = new Stripe.Terminal.ReaderService(this.StripeClient); + Stripe.Terminal.Reader reader = service.Update( + "tmr_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/terminal/readers/tmr_xxxxxxxxxxxxx"); + } + + [Fact] + public async Task TestTerminalReadersPost2Async() + { + var options = new Stripe.Terminal.ReaderUpdateOptions + { + Label = "Blue Rabbit", + }; + var service = new Stripe.Terminal.ReaderService(this.StripeClient); + Stripe.Terminal.Reader reader = await service.UpdateAsync( + "tmr_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/terminal/readers/tmr_xxxxxxxxxxxxx"); + } + [Fact] public void TestTerminalReadersProcessPaymentIntentPost() { @@ -4607,6 +11462,21 @@ public void TestTerminalReadersProcessPaymentIntentPost() "/v1/terminal/readers/tmr_xxxxxxxxxxxxx/process_payment_intent"); } + [Fact] + public async Task TestTerminalReadersProcessPaymentIntentPostAsync() + { + var options = new Stripe.Terminal.ReaderProcessPaymentIntentOptions + { + PaymentIntent = "pi_xxxxxxxxxxxxx", + }; + var service = new Stripe.Terminal.ReaderService(this.StripeClient); + Stripe.Terminal.Reader reader = await service + .ProcessPaymentIntentAsync("tmr_xxxxxxxxxxxxx", options); + this.AssertRequest( + HttpMethod.Post, + "/v1/terminal/readers/tmr_xxxxxxxxxxxxx/process_payment_intent"); + } + [Fact] public void TestTerminalReadersProcessSetupIntentPost() { @@ -4624,6 +11494,22 @@ public void TestTerminalReadersProcessSetupIntentPost() "/v1/terminal/readers/tmr_xxxxxxxxxxxxx/process_setup_intent"); } + [Fact] + public async Task TestTerminalReadersProcessSetupIntentPostAsync() + { + var options = new Stripe.Terminal.ReaderProcessSetupIntentOptions + { + SetupIntent = "seti_xxxxxxxxxxxxx", + AllowRedisplay = "always", + }; + var service = new Stripe.Terminal.ReaderService(this.StripeClient); + Stripe.Terminal.Reader reader = await service + .ProcessSetupIntentAsync("tmr_xxxxxxxxxxxxx", options); + this.AssertRequest( + HttpMethod.Post, + "/v1/terminal/readers/tmr_xxxxxxxxxxxxx/process_setup_intent"); + } + [Fact] public void TestTestHelpersCustomersFundCashBalancePost() { @@ -4641,6 +11527,23 @@ public void TestTestHelpersCustomersFundCashBalancePost() "/v1/test_helpers/customers/cus_123/fund_cash_balance"); } + [Fact] + public async Task TestTestHelpersCustomersFundCashBalancePostAsync() + { + var options = new Stripe.TestHelpers.CustomerFundCashBalanceOptions + { + Amount = 30, + Currency = "eur", + }; + var service = new Stripe.TestHelpers.CustomerService( + this.StripeClient); + CustomerCashBalanceTransaction customerCashBalanceTransaction = await service + .FundCashBalanceAsync("cus_123", options); + this.AssertRequest( + HttpMethod.Post, + "/v1/test_helpers/customers/cus_123/fund_cash_balance"); + } + [Fact] public void TestTestHelpersIssuingAuthorizationsCapturePost() { @@ -4708,6 +11611,72 @@ public void TestTestHelpersIssuingAuthorizationsCapturePost() "/v1/test_helpers/issuing/authorizations/example_authorization/capture"); } + [Fact] + public async Task TestTestHelpersIssuingAuthorizationsCapturePostAsync() + { + var options = new Stripe.TestHelpers.Issuing.AuthorizationCaptureOptions + { + CaptureAmount = 100, + CloseAuthorization = true, + PurchaseDetails = new Stripe.TestHelpers.Issuing.AuthorizationPurchaseDetailsOptions + { + Flight = new Stripe.TestHelpers.Issuing.AuthorizationPurchaseDetailsFlightOptions + { + DepartureAt = DateTimeOffset.FromUnixTimeSeconds( + 1633651200) + .UtcDateTime, + PassengerName = "John Doe", + Refundable = true, + Segments = new List + { + new Stripe.TestHelpers.Issuing.AuthorizationPurchaseDetailsFlightSegmentOptions + { + ArrivalAirportCode = "SFO", + Carrier = "Delta", + DepartureAirportCode = "LAX", + FlightNumber = "DL100", + ServiceClass = "Economy", + StopoverAllowed = true, + }, + }, + TravelAgency = "Orbitz", + }, + Fuel = new Stripe.TestHelpers.Issuing.AuthorizationPurchaseDetailsFuelOptions + { + Type = "diesel", + Unit = "liter", + UnitCostDecimal = 3.5M, + QuantityDecimal = 10M, + }, + Lodging = new Stripe.TestHelpers.Issuing.AuthorizationPurchaseDetailsLodgingOptions + { + CheckInAt = DateTimeOffset.FromUnixTimeSeconds( + 1633651200) + .UtcDateTime, + Nights = 2, + }, + Receipt = new List + { + new Stripe.TestHelpers.Issuing.AuthorizationPurchaseDetailsReceiptOptions + { + Description = "Room charge", + Quantity = 1M, + Total = 200, + UnitCost = 200, + }, + }, + Reference = "foo", + }, + }; + var service = new Stripe.TestHelpers.Issuing.AuthorizationService( + this.StripeClient); + Stripe.Issuing.Authorization authorization = await service + .CaptureAsync("example_authorization", options); + this.AssertRequest( + HttpMethod.Post, + "/v1/test_helpers/issuing/authorizations/example_authorization/capture"); + } + [Fact] public void TestTestHelpersIssuingAuthorizationsExpirePost() { @@ -4720,6 +11689,18 @@ public void TestTestHelpersIssuingAuthorizationsExpirePost() "/v1/test_helpers/issuing/authorizations/example_authorization/expire"); } + [Fact] + public async Task TestTestHelpersIssuingAuthorizationsExpirePostAsync() + { + var service = new Stripe.TestHelpers.Issuing.AuthorizationService( + this.StripeClient); + Stripe.Issuing.Authorization authorization = await service + .ExpireAsync("example_authorization"); + this.AssertRequest( + HttpMethod.Post, + "/v1/test_helpers/issuing/authorizations/example_authorization/expire"); + } + [Fact] public void TestTestHelpersIssuingAuthorizationsIncrementPost() { @@ -4738,6 +11719,23 @@ public void TestTestHelpersIssuingAuthorizationsIncrementPost() "/v1/test_helpers/issuing/authorizations/example_authorization/increment"); } + [Fact] + public async Task TestTestHelpersIssuingAuthorizationsIncrementPostAsync() + { + var options = new Stripe.TestHelpers.Issuing.AuthorizationIncrementOptions + { + IncrementAmount = 50, + IsAmountControllable = true, + }; + var service = new Stripe.TestHelpers.Issuing.AuthorizationService( + this.StripeClient); + Stripe.Issuing.Authorization authorization = await service + .IncrementAsync("example_authorization", options); + this.AssertRequest( + HttpMethod.Post, + "/v1/test_helpers/issuing/authorizations/example_authorization/increment"); + } + [Fact] public void TestTestHelpersIssuingAuthorizationsPost() { @@ -4786,6 +11784,54 @@ public void TestTestHelpersIssuingAuthorizationsPost() "/v1/test_helpers/issuing/authorizations"); } + [Fact] + public async Task TestTestHelpersIssuingAuthorizationsPostAsync() + { + var options = new Stripe.TestHelpers.Issuing.AuthorizationCreateOptions + { + Amount = 100, + AmountDetails = new Stripe.TestHelpers.Issuing.AuthorizationAmountDetailsOptions + { + AtmFee = 10, + CashbackAmount = 5, + }, + AuthorizationMethod = "chip", + Card = "foo", + Currency = "usd", + IsAmountControllable = true, + MerchantData = new Stripe.TestHelpers.Issuing.AuthorizationMerchantDataOptions + { + Category = "ac_refrigeration_repair", + City = "foo", + Country = "bar", + Name = "foo", + NetworkId = "bar", + PostalCode = "foo", + State = "bar", + TerminalId = "foo", + }, + NetworkData = new Stripe.TestHelpers.Issuing.AuthorizationNetworkDataOptions + { + AcquiringInstitutionId = "foo", + }, + VerificationData = new Stripe.TestHelpers.Issuing.AuthorizationVerificationDataOptions + { + AddressLine1Check = "mismatch", + AddressPostalCodeCheck = "match", + CvcCheck = "match", + ExpiryCheck = "mismatch", + }, + Wallet = "apple_pay", + }; + var service = new Stripe.TestHelpers.Issuing.AuthorizationService( + this.StripeClient); + Stripe.Issuing.Authorization authorization = await service + .CreateAsync(options); + this.AssertRequest( + HttpMethod.Post, + "/v1/test_helpers/issuing/authorizations"); + } + [Fact] public void TestTestHelpersIssuingAuthorizationsReversePost() { @@ -4804,13 +11850,41 @@ public void TestTestHelpersIssuingAuthorizationsReversePost() } [Fact] - public void TestTestHelpersIssuingCardsShippingDeliverPost() + public async Task TestTestHelpersIssuingAuthorizationsReversePostAsync() { - var service = new Stripe.TestHelpers.Issuing.CardService( - this.StripeClient); - Stripe.Issuing.Card card = service.DeliverCard("card_123"); - this.AssertRequest( - HttpMethod.Post, + var options = new Stripe.TestHelpers.Issuing.AuthorizationReverseOptions + { + ReverseAmount = 20, + }; + var service = new Stripe.TestHelpers.Issuing.AuthorizationService( + this.StripeClient); + Stripe.Issuing.Authorization authorization = await service + .ReverseAsync("example_authorization", options); + this.AssertRequest( + HttpMethod.Post, + "/v1/test_helpers/issuing/authorizations/example_authorization/reverse"); + } + + [Fact] + public void TestTestHelpersIssuingCardsShippingDeliverPost() + { + var service = new Stripe.TestHelpers.Issuing.CardService( + this.StripeClient); + Stripe.Issuing.Card card = service.DeliverCard("card_123"); + this.AssertRequest( + HttpMethod.Post, + "/v1/test_helpers/issuing/cards/card_123/shipping/deliver"); + } + + [Fact] + public async Task TestTestHelpersIssuingCardsShippingDeliverPostAsync() + { + var service = new Stripe.TestHelpers.Issuing.CardService( + this.StripeClient); + Stripe.Issuing.Card card = await service.DeliverCardAsync( + "card_123"); + this.AssertRequest( + HttpMethod.Post, "/v1/test_helpers/issuing/cards/card_123/shipping/deliver"); } @@ -4825,6 +11899,17 @@ public void TestTestHelpersIssuingCardsShippingFailPost() "/v1/test_helpers/issuing/cards/card_123/shipping/fail"); } + [Fact] + public async Task TestTestHelpersIssuingCardsShippingFailPostAsync() + { + var service = new Stripe.TestHelpers.Issuing.CardService( + this.StripeClient); + Stripe.Issuing.Card card = await service.FailCardAsync("card_123"); + this.AssertRequest( + HttpMethod.Post, + "/v1/test_helpers/issuing/cards/card_123/shipping/fail"); + } + [Fact] public void TestTestHelpersIssuingCardsShippingReturnPost() { @@ -4836,6 +11921,18 @@ public void TestTestHelpersIssuingCardsShippingReturnPost() "/v1/test_helpers/issuing/cards/card_123/shipping/return"); } + [Fact] + public async Task TestTestHelpersIssuingCardsShippingReturnPostAsync() + { + var service = new Stripe.TestHelpers.Issuing.CardService( + this.StripeClient); + Stripe.Issuing.Card card = await service.ReturnCardAsync( + "card_123"); + this.AssertRequest( + HttpMethod.Post, + "/v1/test_helpers/issuing/cards/card_123/shipping/return"); + } + [Fact] public void TestTestHelpersIssuingCardsShippingShipPost() { @@ -4847,6 +11944,17 @@ public void TestTestHelpersIssuingCardsShippingShipPost() "/v1/test_helpers/issuing/cards/card_123/shipping/ship"); } + [Fact] + public async Task TestTestHelpersIssuingCardsShippingShipPostAsync() + { + var service = new Stripe.TestHelpers.Issuing.CardService( + this.StripeClient); + Stripe.Issuing.Card card = await service.ShipCardAsync("card_123"); + this.AssertRequest( + HttpMethod.Post, + "/v1/test_helpers/issuing/cards/card_123/shipping/ship"); + } + [Fact] public void TestTestHelpersIssuingPersonalizationDesignsActivatePost() { @@ -4859,6 +11967,18 @@ public void TestTestHelpersIssuingPersonalizationDesignsActivatePost() "/v1/test_helpers/issuing/personalization_designs/pd_xyz/activate"); } + [Fact] + public async Task TestTestHelpersIssuingPersonalizationDesignsActivatePostAsync() + { + var service = new Stripe.TestHelpers.Issuing.PersonalizationDesignService( + this.StripeClient); + Stripe.Issuing.PersonalizationDesign personalizationDesign = await service + .ActivateAsync("pd_xyz"); + this.AssertRequest( + HttpMethod.Post, + "/v1/test_helpers/issuing/personalization_designs/pd_xyz/activate"); + } + [Fact] public void TestTestHelpersIssuingPersonalizationDesignsDeactivatePost() { @@ -4871,6 +11991,18 @@ public void TestTestHelpersIssuingPersonalizationDesignsDeactivatePost() "/v1/test_helpers/issuing/personalization_designs/pd_xyz/deactivate"); } + [Fact] + public async Task TestTestHelpersIssuingPersonalizationDesignsDeactivatePostAsync() + { + var service = new Stripe.TestHelpers.Issuing.PersonalizationDesignService( + this.StripeClient); + Stripe.Issuing.PersonalizationDesign personalizationDesign = await service + .DeactivateAsync("pd_xyz"); + this.AssertRequest( + HttpMethod.Post, + "/v1/test_helpers/issuing/personalization_designs/pd_xyz/deactivate"); + } + [Fact] public void TestTestHelpersIssuingPersonalizationDesignsRejectPost() { @@ -4890,6 +12022,25 @@ public void TestTestHelpersIssuingPersonalizationDesignsRejectPost() "/v1/test_helpers/issuing/personalization_designs/pd_xyz/reject"); } + [Fact] + public async Task TestTestHelpersIssuingPersonalizationDesignsRejectPostAsync() + { + var options = new Stripe.TestHelpers.Issuing.PersonalizationDesignRejectOptions + { + RejectionReasons = new Stripe.TestHelpers.Issuing.PersonalizationDesignRejectionReasonsOptions + { + CardLogo = new List { "geographic_location" }, + }, + }; + var service = new Stripe.TestHelpers.Issuing.PersonalizationDesignService( + this.StripeClient); + Stripe.Issuing.PersonalizationDesign personalizationDesign = await service + .RejectAsync("pd_xyz", options); + this.AssertRequest( + HttpMethod.Post, + "/v1/test_helpers/issuing/personalization_designs/pd_xyz/reject"); + } + [Fact] public void TestTestHelpersIssuingTransactionsCreateForceCapturePost() { @@ -4968,6 +12119,84 @@ public void TestTestHelpersIssuingTransactionsCreateForceCapturePost() "/v1/test_helpers/issuing/transactions/create_force_capture"); } + [Fact] + public async Task TestTestHelpersIssuingTransactionsCreateForceCapturePostAsync() + { + var options = new Stripe.TestHelpers.Issuing.TransactionCreateForceCaptureOptions + { + Amount = 100, + Card = "foo", + Currency = "usd", + MerchantData = new Stripe.TestHelpers.Issuing.TransactionMerchantDataOptions + { + Category = "ac_refrigeration_repair", + City = "foo", + Country = "US", + Name = "foo", + NetworkId = "bar", + PostalCode = "10001", + State = "NY", + TerminalId = "foo", + }, + PurchaseDetails = new Stripe.TestHelpers.Issuing.TransactionPurchaseDetailsOptions + { + Flight = new Stripe.TestHelpers.Issuing.TransactionPurchaseDetailsFlightOptions + { + DepartureAt = DateTimeOffset.FromUnixTimeSeconds( + 1633651200) + .UtcDateTime, + PassengerName = "John Doe", + Refundable = true, + Segments = new List + { + new Stripe.TestHelpers.Issuing.TransactionPurchaseDetailsFlightSegmentOptions + { + ArrivalAirportCode = "SFO", + Carrier = "Delta", + DepartureAirportCode = "LAX", + FlightNumber = "DL100", + ServiceClass = "Economy", + StopoverAllowed = true, + }, + }, + TravelAgency = "Orbitz", + }, + Fuel = new Stripe.TestHelpers.Issuing.TransactionPurchaseDetailsFuelOptions + { + Type = "diesel", + Unit = "liter", + UnitCostDecimal = 3.5M, + QuantityDecimal = 10M, + }, + Lodging = new Stripe.TestHelpers.Issuing.TransactionPurchaseDetailsLodgingOptions + { + CheckInAt = DateTimeOffset.FromUnixTimeSeconds( + 1533651200) + .UtcDateTime, + Nights = 2, + }, + Receipt = new List + { + new Stripe.TestHelpers.Issuing.TransactionPurchaseDetailsReceiptOptions + { + Description = "Room charge", + Quantity = 1M, + Total = 200, + UnitCost = 200, + }, + }, + Reference = "foo", + }, + }; + var service = new Stripe.TestHelpers.Issuing.TransactionService( + this.StripeClient); + Stripe.Issuing.Transaction transaction = await service + .CreateForceCaptureAsync(options); + this.AssertRequest( + HttpMethod.Post, + "/v1/test_helpers/issuing/transactions/create_force_capture"); + } + [Fact] public void TestTestHelpersIssuingTransactionsCreateUnlinkedRefundPost() { @@ -5046,6 +12275,84 @@ public void TestTestHelpersIssuingTransactionsCreateUnlinkedRefundPost() "/v1/test_helpers/issuing/transactions/create_unlinked_refund"); } + [Fact] + public async Task TestTestHelpersIssuingTransactionsCreateUnlinkedRefundPostAsync() + { + var options = new Stripe.TestHelpers.Issuing.TransactionCreateUnlinkedRefundOptions + { + Amount = 100, + Card = "foo", + Currency = "usd", + MerchantData = new Stripe.TestHelpers.Issuing.TransactionMerchantDataOptions + { + Category = "ac_refrigeration_repair", + City = "foo", + Country = "bar", + Name = "foo", + NetworkId = "bar", + PostalCode = "foo", + State = "bar", + TerminalId = "foo", + }, + PurchaseDetails = new Stripe.TestHelpers.Issuing.TransactionPurchaseDetailsOptions + { + Flight = new Stripe.TestHelpers.Issuing.TransactionPurchaseDetailsFlightOptions + { + DepartureAt = DateTimeOffset.FromUnixTimeSeconds( + 1533651200) + .UtcDateTime, + PassengerName = "John Doe", + Refundable = true, + Segments = new List + { + new Stripe.TestHelpers.Issuing.TransactionPurchaseDetailsFlightSegmentOptions + { + ArrivalAirportCode = "SFO", + Carrier = "Delta", + DepartureAirportCode = "LAX", + FlightNumber = "DL100", + ServiceClass = "Economy", + StopoverAllowed = true, + }, + }, + TravelAgency = "Orbitz", + }, + Fuel = new Stripe.TestHelpers.Issuing.TransactionPurchaseDetailsFuelOptions + { + Type = "diesel", + Unit = "liter", + UnitCostDecimal = 3.5M, + QuantityDecimal = 10M, + }, + Lodging = new Stripe.TestHelpers.Issuing.TransactionPurchaseDetailsLodgingOptions + { + CheckInAt = DateTimeOffset.FromUnixTimeSeconds( + 1533651200) + .UtcDateTime, + Nights = 2, + }, + Receipt = new List + { + new Stripe.TestHelpers.Issuing.TransactionPurchaseDetailsReceiptOptions + { + Description = "Room charge", + Quantity = 1M, + Total = 200, + UnitCost = 200, + }, + }, + Reference = "foo", + }, + }; + var service = new Stripe.TestHelpers.Issuing.TransactionService( + this.StripeClient); + Stripe.Issuing.Transaction transaction = await service + .CreateUnlinkedRefundAsync(options); + this.AssertRequest( + HttpMethod.Post, + "/v1/test_helpers/issuing/transactions/create_unlinked_refund"); + } + [Fact] public void TestTestHelpersIssuingTransactionsRefundPost() { @@ -5063,6 +12370,23 @@ public void TestTestHelpersIssuingTransactionsRefundPost() "/v1/test_helpers/issuing/transactions/example_transaction/refund"); } + [Fact] + public async Task TestTestHelpersIssuingTransactionsRefundPostAsync() + { + var options = new Stripe.TestHelpers.Issuing.TransactionRefundOptions + { + RefundAmount = 50, + }; + var service = new Stripe.TestHelpers.Issuing.TransactionService( + this.StripeClient); + Stripe.Issuing.Transaction transaction = await service.RefundAsync( + "example_transaction", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/test_helpers/issuing/transactions/example_transaction/refund"); + } + [Fact] public void TestTestHelpersRefundsExpirePost() { @@ -5075,9 +12399,20 @@ public void TestTestHelpersRefundsExpirePost() } [Fact] - public void TestTestHelpersTestClocksAdvancePost() + public async Task TestTestHelpersRefundsExpirePostAsync() { - var options = new Stripe.TestHelpers.TestClockAdvanceOptions + var service = new Stripe.TestHelpers.RefundService( + this.StripeClient); + Refund refund = await service.ExpireAsync("re_123"); + this.AssertRequest( + HttpMethod.Post, + "/v1/test_helpers/refunds/re_123/expire"); + } + + [Fact] + public void TestTestHelpersTestClocksAdvancePost() + { + var options = new Stripe.TestHelpers.TestClockAdvanceOptions { FrozenTime = DateTimeOffset.FromUnixTimeSeconds(142) .UtcDateTime, @@ -5092,6 +12427,24 @@ public void TestTestHelpersTestClocksAdvancePost() "/v1/test_helpers/test_clocks/clock_xyz/advance"); } + [Fact] + public async Task TestTestHelpersTestClocksAdvancePostAsync() + { + var options = new Stripe.TestHelpers.TestClockAdvanceOptions + { + FrozenTime = DateTimeOffset.FromUnixTimeSeconds(142) + .UtcDateTime, + }; + var service = new Stripe.TestHelpers.TestClockService( + this.StripeClient); + Stripe.TestHelpers.TestClock testClock = await service.AdvanceAsync( + "clock_xyz", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/test_helpers/test_clocks/clock_xyz/advance"); + } + [Fact] public void TestTestHelpersTestClocksAdvancePost2() { @@ -5110,6 +12463,24 @@ public void TestTestHelpersTestClocksAdvancePost2() "/v1/test_helpers/test_clocks/clock_xxxxxxxxxxxxx/advance"); } + [Fact] + public async Task TestTestHelpersTestClocksAdvancePost2Async() + { + var options = new Stripe.TestHelpers.TestClockAdvanceOptions + { + FrozenTime = DateTimeOffset.FromUnixTimeSeconds(1675552261) + .UtcDateTime, + }; + var service = new Stripe.TestHelpers.TestClockService( + this.StripeClient); + Stripe.TestHelpers.TestClock testClock = await service.AdvanceAsync( + "clock_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/test_helpers/test_clocks/clock_xxxxxxxxxxxxx/advance"); + } + [Fact] public void TestTestHelpersTestClocksDelete() { @@ -5121,6 +12492,18 @@ public void TestTestHelpersTestClocksDelete() "/v1/test_helpers/test_clocks/clock_xyz"); } + [Fact] + public async Task TestTestHelpersTestClocksDeleteAsync() + { + var service = new Stripe.TestHelpers.TestClockService( + this.StripeClient); + Stripe.TestHelpers.TestClock deleted = await service.DeleteAsync( + "clock_xyz"); + this.AssertRequest( + HttpMethod.Delete, + "/v1/test_helpers/test_clocks/clock_xyz"); + } + [Fact] public void TestTestHelpersTestClocksDelete2() { @@ -5133,6 +12516,18 @@ public void TestTestHelpersTestClocksDelete2() "/v1/test_helpers/test_clocks/clock_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestTestHelpersTestClocksDelete2Async() + { + var service = new Stripe.TestHelpers.TestClockService( + this.StripeClient); + Stripe.TestHelpers.TestClock deleted = await service.DeleteAsync( + "clock_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Delete, + "/v1/test_helpers/test_clocks/clock_xxxxxxxxxxxxx"); + } + [Fact] public void TestTestHelpersTestClocksGet() { @@ -5143,6 +12538,34 @@ public void TestTestHelpersTestClocksGet() this.AssertRequest(HttpMethod.Get, "/v1/test_helpers/test_clocks"); } + [Fact] + public async Task TestTestHelpersTestClocksGetAsync() + { + var service = new Stripe.TestHelpers.TestClockService( + this.StripeClient); + StripeList testClocks = await service + .ListAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/test_helpers/test_clocks"); + } + + [Fact] + public void TestTestHelpersTestClocksGetAutoPaging() + { + var service = new Stripe.TestHelpers.TestClockService( + this.StripeClient); + var testClock = service.ListAutoPaging().First(); + this.AssertRequest(HttpMethod.Get, "/v1/test_helpers/test_clocks"); + } + + [Fact] + public async Task TestTestHelpersTestClocksGetAutoPagingAsync() + { + var service = new Stripe.TestHelpers.TestClockService( + this.StripeClient); + var testClock = await service.ListAutoPagingAsync().FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/test_helpers/test_clocks"); + } + [Fact] public void TestTestHelpersTestClocksGet2() { @@ -5154,6 +12577,18 @@ public void TestTestHelpersTestClocksGet2() "/v1/test_helpers/test_clocks/clock_xyz"); } + [Fact] + public async Task TestTestHelpersTestClocksGet2Async() + { + var service = new Stripe.TestHelpers.TestClockService( + this.StripeClient); + Stripe.TestHelpers.TestClock testClock = await service.GetAsync( + "clock_xyz"); + this.AssertRequest( + HttpMethod.Get, + "/v1/test_helpers/test_clocks/clock_xyz"); + } + [Fact] public void TestTestHelpersTestClocksGet3() { @@ -5171,6 +12606,56 @@ public void TestTestHelpersTestClocksGet3() "limit=3"); } + [Fact] + public async Task TestTestHelpersTestClocksGet3Async() + { + var options = new Stripe.TestHelpers.TestClockListOptions + { + Limit = 3, + }; + var service = new Stripe.TestHelpers.TestClockService( + this.StripeClient); + StripeList testClocks = await service + .ListAsync(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/test_helpers/test_clocks", + "limit=3"); + } + + [Fact] + public void TestTestHelpersTestClocksGet3AutoPaging() + { + var options = new Stripe.TestHelpers.TestClockListOptions + { + Limit = 3, + }; + var service = new Stripe.TestHelpers.TestClockService( + this.StripeClient); + var testClock = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/test_helpers/test_clocks", + "limit=3"); + } + + [Fact] + public async Task TestTestHelpersTestClocksGet3AutoPagingAsync() + { + var options = new Stripe.TestHelpers.TestClockListOptions + { + Limit = 3, + }; + var service = new Stripe.TestHelpers.TestClockService( + this.StripeClient); + var testClock = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/test_helpers/test_clocks", + "limit=3"); + } + [Fact] public void TestTestHelpersTestClocksGet4() { @@ -5183,6 +12668,18 @@ public void TestTestHelpersTestClocksGet4() "/v1/test_helpers/test_clocks/clock_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestTestHelpersTestClocksGet4Async() + { + var service = new Stripe.TestHelpers.TestClockService( + this.StripeClient); + Stripe.TestHelpers.TestClock testClock = await service.GetAsync( + "clock_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/test_helpers/test_clocks/clock_xxxxxxxxxxxxx"); + } + [Fact] public void TestTestHelpersTestClocksPost() { @@ -5198,6 +12695,22 @@ public void TestTestHelpersTestClocksPost() this.AssertRequest(HttpMethod.Post, "/v1/test_helpers/test_clocks"); } + [Fact] + public async Task TestTestHelpersTestClocksPostAsync() + { + var options = new Stripe.TestHelpers.TestClockCreateOptions + { + FrozenTime = DateTimeOffset.FromUnixTimeSeconds(123) + .UtcDateTime, + Name = "cogsworth", + }; + var service = new Stripe.TestHelpers.TestClockService( + this.StripeClient); + Stripe.TestHelpers.TestClock testClock = await service.CreateAsync( + options); + this.AssertRequest(HttpMethod.Post, "/v1/test_helpers/test_clocks"); + } + [Fact] public void TestTestHelpersTestClocksPost2() { @@ -5212,6 +12725,21 @@ public void TestTestHelpersTestClocksPost2() this.AssertRequest(HttpMethod.Post, "/v1/test_helpers/test_clocks"); } + [Fact] + public async Task TestTestHelpersTestClocksPost2Async() + { + var options = new Stripe.TestHelpers.TestClockCreateOptions + { + FrozenTime = DateTimeOffset.FromUnixTimeSeconds(1577836800) + .UtcDateTime, + }; + var service = new Stripe.TestHelpers.TestClockService( + this.StripeClient); + Stripe.TestHelpers.TestClock testClock = await service.CreateAsync( + options); + this.AssertRequest(HttpMethod.Post, "/v1/test_helpers/test_clocks"); + } + [Fact] public void TestTestHelpersTreasuryInboundTransfersFailPost() { @@ -5232,6 +12760,25 @@ public void TestTestHelpersTreasuryInboundTransfersFailPost() "/v1/test_helpers/treasury/inbound_transfers/ibt_123/fail"); } + [Fact] + public async Task TestTestHelpersTreasuryInboundTransfersFailPostAsync() + { + var options = new Stripe.TestHelpers.Treasury.InboundTransferFailOptions + { + FailureDetails = new Stripe.TestHelpers.Treasury.InboundTransferFailureDetailsOptions + { + Code = "account_closed", + }, + }; + var service = new Stripe.TestHelpers.Treasury.InboundTransferService( + this.StripeClient); + Stripe.Treasury.InboundTransfer inboundTransfer = await service + .FailAsync("ibt_123", options); + this.AssertRequest( + HttpMethod.Post, + "/v1/test_helpers/treasury/inbound_transfers/ibt_123/fail"); + } + [Fact] public void TestTestHelpersTreasuryInboundTransfersReturnPost() { @@ -5244,6 +12791,18 @@ public void TestTestHelpersTreasuryInboundTransfersReturnPost() "/v1/test_helpers/treasury/inbound_transfers/ibt_123/return"); } + [Fact] + public async Task TestTestHelpersTreasuryInboundTransfersReturnPostAsync() + { + var service = new Stripe.TestHelpers.Treasury.InboundTransferService( + this.StripeClient); + Stripe.Treasury.InboundTransfer inboundTransfer = await service + .ReturnInboundTransferAsync("ibt_123"); + this.AssertRequest( + HttpMethod.Post, + "/v1/test_helpers/treasury/inbound_transfers/ibt_123/return"); + } + [Fact] public void TestTestHelpersTreasuryInboundTransfersSucceedPost() { @@ -5256,6 +12815,18 @@ public void TestTestHelpersTreasuryInboundTransfersSucceedPost() "/v1/test_helpers/treasury/inbound_transfers/ibt_123/succeed"); } + [Fact] + public async Task TestTestHelpersTreasuryInboundTransfersSucceedPostAsync() + { + var service = new Stripe.TestHelpers.Treasury.InboundTransferService( + this.StripeClient); + Stripe.Treasury.InboundTransfer inboundTransfer = await service + .SucceedAsync("ibt_123"); + this.AssertRequest( + HttpMethod.Post, + "/v1/test_helpers/treasury/inbound_transfers/ibt_123/succeed"); + } + [Fact] public void TestTestHelpersTreasuryOutboundTransfersFailPost() { @@ -5268,6 +12839,18 @@ public void TestTestHelpersTreasuryOutboundTransfersFailPost() "/v1/test_helpers/treasury/outbound_transfers/obt_123/fail"); } + [Fact] + public async Task TestTestHelpersTreasuryOutboundTransfersFailPostAsync() + { + var service = new Stripe.TestHelpers.Treasury.OutboundTransferService( + this.StripeClient); + Stripe.Treasury.OutboundTransfer outboundTransfer = await service + .FailAsync("obt_123"); + this.AssertRequest( + HttpMethod.Post, + "/v1/test_helpers/treasury/outbound_transfers/obt_123/fail"); + } + [Fact] public void TestTestHelpersTreasuryOutboundTransfersPostPost() { @@ -5280,6 +12863,18 @@ public void TestTestHelpersTreasuryOutboundTransfersPostPost() "/v1/test_helpers/treasury/outbound_transfers/obt_123/post"); } + [Fact] + public async Task TestTestHelpersTreasuryOutboundTransfersPostPostAsync() + { + var service = new Stripe.TestHelpers.Treasury.OutboundTransferService( + this.StripeClient); + Stripe.Treasury.OutboundTransfer outboundTransfer = await service + .PostAsync("obt_123"); + this.AssertRequest( + HttpMethod.Post, + "/v1/test_helpers/treasury/outbound_transfers/obt_123/post"); + } + [Fact] public void TestTestHelpersTreasuryOutboundTransfersReturnPost() { @@ -5299,6 +12894,25 @@ public void TestTestHelpersTreasuryOutboundTransfersReturnPost() "/v1/test_helpers/treasury/outbound_transfers/obt_123/return"); } + [Fact] + public async Task TestTestHelpersTreasuryOutboundTransfersReturnPostAsync() + { + var options = new Stripe.TestHelpers.Treasury.OutboundTransferReturnOutboundTransferOptions + { + ReturnedDetails = new Stripe.TestHelpers.Treasury.OutboundTransferReturnedDetailsOptions + { + Code = "account_closed", + }, + }; + var service = new Stripe.TestHelpers.Treasury.OutboundTransferService( + this.StripeClient); + Stripe.Treasury.OutboundTransfer outboundTransfer = await service + .ReturnOutboundTransferAsync("obt_123", options); + this.AssertRequest( + HttpMethod.Post, + "/v1/test_helpers/treasury/outbound_transfers/obt_123/return"); + } + [Fact] public void TestTestHelpersTreasuryReceivedCreditsPost() { @@ -5318,6 +12932,25 @@ public void TestTestHelpersTreasuryReceivedCreditsPost() "/v1/test_helpers/treasury/received_credits"); } + [Fact] + public async Task TestTestHelpersTreasuryReceivedCreditsPostAsync() + { + var options = new Stripe.TestHelpers.Treasury.ReceivedCreditCreateOptions + { + FinancialAccount = "fa_123", + Network = "ach", + Amount = 1234, + Currency = "usd", + }; + var service = new Stripe.TestHelpers.Treasury.ReceivedCreditService( + this.StripeClient); + Stripe.Treasury.ReceivedCredit receivedCredit = await service + .CreateAsync(options); + this.AssertRequest( + HttpMethod.Post, + "/v1/test_helpers/treasury/received_credits"); + } + [Fact] public void TestTestHelpersTreasuryReceivedDebitsPost() { @@ -5338,13 +12971,40 @@ public void TestTestHelpersTreasuryReceivedDebitsPost() } [Fact] - public void TestTokensGet() + public async Task TestTestHelpersTreasuryReceivedDebitsPostAsync() + { + var options = new Stripe.TestHelpers.Treasury.ReceivedDebitCreateOptions + { + FinancialAccount = "fa_123", + Network = "ach", + Amount = 1234, + Currency = "usd", + }; + var service = new Stripe.TestHelpers.Treasury.ReceivedDebitService( + this.StripeClient); + Stripe.Treasury.ReceivedDebit receivedDebit = await service + .CreateAsync(options); + this.AssertRequest( + HttpMethod.Post, + "/v1/test_helpers/treasury/received_debits"); + } + + [Fact] + public void TestTokensGet() { var service = new TokenService(this.StripeClient); Token token = service.Get("tok_xxxx"); this.AssertRequest(HttpMethod.Get, "/v1/tokens/tok_xxxx"); } + [Fact] + public async Task TestTokensGetAsync() + { + var service = new TokenService(this.StripeClient); + Token token = await service.GetAsync("tok_xxxx"); + this.AssertRequest(HttpMethod.Get, "/v1/tokens/tok_xxxx"); + } + [Fact] public void TestTokensPost() { @@ -5363,6 +13023,24 @@ public void TestTokensPost() this.AssertRequest(HttpMethod.Post, "/v1/tokens"); } + [Fact] + public async Task TestTokensPostAsync() + { + var options = new TokenCreateOptions + { + Card = new TokenCardOptions + { + Number = "4242424242424242", + ExpMonth = "5", + ExpYear = "2023", + Cvc = "314", + }, + }; + var service = new TokenService(this.StripeClient); + Token token = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/tokens"); + } + [Fact] public void TestTokensPost2() { @@ -5383,6 +13061,26 @@ public void TestTokensPost2() this.AssertRequest(HttpMethod.Post, "/v1/tokens"); } + [Fact] + public async Task TestTokensPost2Async() + { + var options = new TokenCreateOptions + { + BankAccount = new TokenBankAccountOptions + { + Country = "US", + Currency = "usd", + AccountHolderName = "Jenny Rosen", + AccountHolderType = "individual", + RoutingNumber = "110000000", + AccountNumber = "000123456789", + }, + }; + var service = new TokenService(this.StripeClient); + Token token = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/tokens"); + } + [Fact] public void TestTokensPost3() { @@ -5395,6 +13093,18 @@ public void TestTokensPost3() this.AssertRequest(HttpMethod.Post, "/v1/tokens"); } + [Fact] + public async Task TestTokensPost3Async() + { + var options = new TokenCreateOptions + { + Pii = new TokenPiiOptions { IdNumber = "000000000" }, + }; + var service = new TokenService(this.StripeClient); + Token token = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/tokens"); + } + [Fact] public void TestTokensPost4() { @@ -5415,6 +13125,26 @@ public void TestTokensPost4() this.AssertRequest(HttpMethod.Post, "/v1/tokens"); } + [Fact] + public async Task TestTokensPost4Async() + { + var options = new TokenCreateOptions + { + Account = new TokenAccountOptions + { + Individual = new TokenAccountIndividualOptions + { + FirstName = "Jane", + LastName = "Doe", + }, + TosShownAndAccepted = true, + }, + }; + var service = new TokenService(this.StripeClient); + Token token = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/tokens"); + } + [Fact] public void TestTokensPost5() { @@ -5435,6 +13165,26 @@ public void TestTokensPost5() this.AssertRequest(HttpMethod.Post, "/v1/tokens"); } + [Fact] + public async Task TestTokensPost5Async() + { + var options = new TokenCreateOptions + { + Person = new TokenPersonOptions + { + FirstName = "Jane", + LastName = "Doe", + Relationship = new TokenPersonRelationshipOptions + { + Owner = true, + }, + }, + }; + var service = new TokenService(this.StripeClient); + Token token = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/tokens"); + } + [Fact] public void TestTokensPost6() { @@ -5447,6 +13197,18 @@ public void TestTokensPost6() this.AssertRequest(HttpMethod.Post, "/v1/tokens"); } + [Fact] + public async Task TestTokensPost6Async() + { + var options = new TokenCreateOptions + { + CvcUpdate = new TokenCvcUpdateOptions { Cvc = "123" }, + }; + var service = new TokenService(this.StripeClient); + Token token = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/tokens"); + } + [Fact] public void TestTopupsCancelPost() { @@ -5457,6 +13219,16 @@ public void TestTopupsCancelPost() "/v1/topups/tu_xxxxxxxxxxxxx/cancel"); } + [Fact] + public async Task TestTopupsCancelPostAsync() + { + var service = new TopupService(this.StripeClient); + Topup topup = await service.CancelAsync("tu_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/topups/tu_xxxxxxxxxxxxx/cancel"); + } + [Fact] public void TestTopupsGet() { @@ -5466,6 +13238,33 @@ public void TestTopupsGet() this.AssertRequest(HttpMethod.Get, "/v1/topups", "limit=3"); } + [Fact] + public async Task TestTopupsGetAsync() + { + var options = new TopupListOptions { Limit = 3 }; + var service = new TopupService(this.StripeClient); + StripeList topups = await service.ListAsync(options); + this.AssertRequest(HttpMethod.Get, "/v1/topups", "limit=3"); + } + + [Fact] + public void TestTopupsGetAutoPaging() + { + var options = new TopupListOptions { Limit = 3 }; + var service = new TopupService(this.StripeClient); + var topup = service.ListAutoPaging(options).First(); + this.AssertRequest(HttpMethod.Get, "/v1/topups", "limit=3"); + } + + [Fact] + public async Task TestTopupsGetAutoPagingAsync() + { + var options = new TopupListOptions { Limit = 3 }; + var service = new TopupService(this.StripeClient); + var topup = await service.ListAutoPagingAsync(options).FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/topups", "limit=3"); + } + [Fact] public void TestTopupsGet2() { @@ -5474,6 +13273,14 @@ public void TestTopupsGet2() this.AssertRequest(HttpMethod.Get, "/v1/topups/tu_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestTopupsGet2Async() + { + var service = new TopupService(this.StripeClient); + Topup topup = await service.GetAsync("tu_xxxxxxxxxxxxx"); + this.AssertRequest(HttpMethod.Get, "/v1/topups/tu_xxxxxxxxxxxxx"); + } + [Fact] public void TestTopupsPost() { @@ -5489,6 +13296,21 @@ public void TestTopupsPost() this.AssertRequest(HttpMethod.Post, "/v1/topups"); } + [Fact] + public async Task TestTopupsPostAsync() + { + var options = new TopupCreateOptions + { + Amount = 2000, + Currency = "usd", + Description = "Top-up for Jenny Rosen", + StatementDescriptor = "Top-up", + }; + var service = new TopupService(this.StripeClient); + Topup topup = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/topups"); + } + [Fact] public void TestTopupsPost2() { @@ -5504,6 +13326,23 @@ public void TestTopupsPost2() this.AssertRequest(HttpMethod.Post, "/v1/topups/tu_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestTopupsPost2Async() + { + var options = new TopupUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new TopupService(this.StripeClient); + Topup topup = await service.UpdateAsync( + "tu_xxxxxxxxxxxxx", + options); + this.AssertRequest(HttpMethod.Post, "/v1/topups/tu_xxxxxxxxxxxxx"); + } + [Fact] public void TestTransfersGet() { @@ -5513,6 +13352,34 @@ public void TestTransfersGet() this.AssertRequest(HttpMethod.Get, "/v1/transfers", "limit=3"); } + [Fact] + public async Task TestTransfersGetAsync() + { + var options = new TransferListOptions { Limit = 3 }; + var service = new TransferService(this.StripeClient); + StripeList transfers = await service.ListAsync(options); + this.AssertRequest(HttpMethod.Get, "/v1/transfers", "limit=3"); + } + + [Fact] + public void TestTransfersGetAutoPaging() + { + var options = new TransferListOptions { Limit = 3 }; + var service = new TransferService(this.StripeClient); + var transfer = service.ListAutoPaging(options).First(); + this.AssertRequest(HttpMethod.Get, "/v1/transfers", "limit=3"); + } + + [Fact] + public async Task TestTransfersGetAutoPagingAsync() + { + var options = new TransferListOptions { Limit = 3 }; + var service = new TransferService(this.StripeClient); + var transfer = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/transfers", "limit=3"); + } + [Fact] public void TestTransfersGet2() { @@ -5523,6 +13390,16 @@ public void TestTransfersGet2() "/v1/transfers/tr_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestTransfersGet2Async() + { + var service = new TransferService(this.StripeClient); + Transfer transfer = await service.GetAsync("tr_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/transfers/tr_xxxxxxxxxxxxx"); + } + [Fact] public void TestTransfersPost() { @@ -5538,6 +13415,21 @@ public void TestTransfersPost() this.AssertRequest(HttpMethod.Post, "/v1/transfers"); } + [Fact] + public async Task TestTransfersPostAsync() + { + var options = new TransferCreateOptions + { + Amount = 400, + Currency = "usd", + Destination = "acct_xxxxxxxxxxxxx", + TransferGroup = "ORDER_95", + }; + var service = new TransferService(this.StripeClient); + Transfer transfer = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/transfers"); + } + [Fact] public void TestTransfersPost2() { @@ -5555,6 +13447,25 @@ public void TestTransfersPost2() "/v1/transfers/tr_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestTransfersPost2Async() + { + var options = new TransferUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new TransferService(this.StripeClient); + Transfer transfer = await service.UpdateAsync( + "tr_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/transfers/tr_xxxxxxxxxxxxx"); + } + [Fact] public void TestTransfersReversalsGet() { @@ -5570,36 +13481,104 @@ public void TestTransfersReversalsGet() } [Fact] - public void TestTransfersReversalsGet2() + public async Task TestTransfersReversalsGetAsync() { + var options = new TransferReversalListOptions { Limit = 3 }; var service = new TransferReversalService(this.StripeClient); - TransferReversal transferReversal = service.Get( - "tr_xxxxxxxxxxxxx", - "trr_xxxxxxxxxxxxx"); + StripeList transferReversals = await service + .ListAsync("tr_xxxxxxxxxxxxx", options); this.AssertRequest( HttpMethod.Get, - "/v1/transfers/tr_xxxxxxxxxxxxx/reversals/trr_xxxxxxxxxxxxx"); + "/v1/transfers/tr_xxxxxxxxxxxxx/reversals", + "limit=3"); } [Fact] - public void TestTransfersReversalsPost() + public void TestTransfersReversalsGetAutoPaging() { - var options = new TransferReversalCreateOptions { Amount = 100 }; + var options = new TransferReversalListOptions { Limit = 3 }; var service = new TransferReversalService(this.StripeClient); - TransferReversal transferReversal = service.Create( + var transferReversal = service.ListAutoPaging( "tr_xxxxxxxxxxxxx", - options); + options) + .First(); this.AssertRequest( - HttpMethod.Post, - "/v1/transfers/tr_xxxxxxxxxxxxx/reversals"); + HttpMethod.Get, + "/v1/transfers/tr_xxxxxxxxxxxxx/reversals", + "limit=3"); } [Fact] - public void TestTransfersReversalsPost2() + public async Task TestTransfersReversalsGetAutoPagingAsync() { - var options = new TransferReversalUpdateOptions - { - Metadata = new Dictionary + var options = new TransferReversalListOptions { Limit = 3 }; + var service = new TransferReversalService(this.StripeClient); + var transferReversal = await service.ListAutoPagingAsync( + "tr_xxxxxxxxxxxxx", + options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/transfers/tr_xxxxxxxxxxxxx/reversals", + "limit=3"); + } + + [Fact] + public void TestTransfersReversalsGet2() + { + var service = new TransferReversalService(this.StripeClient); + TransferReversal transferReversal = service.Get( + "tr_xxxxxxxxxxxxx", + "trr_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/transfers/tr_xxxxxxxxxxxxx/reversals/trr_xxxxxxxxxxxxx"); + } + + [Fact] + public async Task TestTransfersReversalsGet2Async() + { + var service = new TransferReversalService(this.StripeClient); + TransferReversal transferReversal = await service.GetAsync( + "tr_xxxxxxxxxxxxx", + "trr_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/transfers/tr_xxxxxxxxxxxxx/reversals/trr_xxxxxxxxxxxxx"); + } + + [Fact] + public void TestTransfersReversalsPost() + { + var options = new TransferReversalCreateOptions { Amount = 100 }; + var service = new TransferReversalService(this.StripeClient); + TransferReversal transferReversal = service.Create( + "tr_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/transfers/tr_xxxxxxxxxxxxx/reversals"); + } + + [Fact] + public async Task TestTransfersReversalsPostAsync() + { + var options = new TransferReversalCreateOptions { Amount = 100 }; + var service = new TransferReversalService(this.StripeClient); + TransferReversal transferReversal = await service.CreateAsync( + "tr_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/transfers/tr_xxxxxxxxxxxxx/reversals"); + } + + [Fact] + public void TestTransfersReversalsPost2() + { + var options = new TransferReversalUpdateOptions + { + Metadata = new Dictionary { { "order_id", "6735" }, }, @@ -5614,6 +13593,26 @@ public void TestTransfersReversalsPost2() "/v1/transfers/tr_xxxxxxxxxxxxx/reversals/trr_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestTransfersReversalsPost2Async() + { + var options = new TransferReversalUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new TransferReversalService(this.StripeClient); + TransferReversal transferReversal = await service.UpdateAsync( + "tr_xxxxxxxxxxxxx", + "trr_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/transfers/tr_xxxxxxxxxxxxx/reversals/trr_xxxxxxxxxxxxx"); + } + [Fact] public void TestTreasuryCreditReversalsGet() { @@ -5632,6 +13631,59 @@ public void TestTreasuryCreditReversalsGet() "financial_account=fa_xxxxxxxxxxxxx&limit=3"); } + [Fact] + public async Task TestTreasuryCreditReversalsGetAsync() + { + var options = new Stripe.Treasury.CreditReversalListOptions + { + FinancialAccount = "fa_xxxxxxxxxxxxx", + Limit = 3, + }; + var service = new Stripe.Treasury.CreditReversalService( + this.StripeClient); + StripeList creditReversals = await service + .ListAsync(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/credit_reversals", + "financial_account=fa_xxxxxxxxxxxxx&limit=3"); + } + + [Fact] + public void TestTreasuryCreditReversalsGetAutoPaging() + { + var options = new Stripe.Treasury.CreditReversalListOptions + { + FinancialAccount = "fa_xxxxxxxxxxxxx", + Limit = 3, + }; + var service = new Stripe.Treasury.CreditReversalService( + this.StripeClient); + var creditReversal = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/credit_reversals", + "financial_account=fa_xxxxxxxxxxxxx&limit=3"); + } + + [Fact] + public async Task TestTreasuryCreditReversalsGetAutoPagingAsync() + { + var options = new Stripe.Treasury.CreditReversalListOptions + { + FinancialAccount = "fa_xxxxxxxxxxxxx", + Limit = 3, + }; + var service = new Stripe.Treasury.CreditReversalService( + this.StripeClient); + var creditReversal = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/credit_reversals", + "financial_account=fa_xxxxxxxxxxxxx&limit=3"); + } + [Fact] public void TestTreasuryCreditReversalsGet2() { @@ -5644,6 +13696,18 @@ public void TestTreasuryCreditReversalsGet2() "/v1/treasury/credit_reversals/credrev_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestTreasuryCreditReversalsGet2Async() + { + var service = new Stripe.Treasury.CreditReversalService( + this.StripeClient); + Stripe.Treasury.CreditReversal creditReversal = await service + .GetAsync("credrev_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/credit_reversals/credrev_xxxxxxxxxxxxx"); + } + [Fact] public void TestTreasuryCreditReversalsPost() { @@ -5660,6 +13724,22 @@ public void TestTreasuryCreditReversalsPost() "/v1/treasury/credit_reversals"); } + [Fact] + public async Task TestTreasuryCreditReversalsPostAsync() + { + var options = new Stripe.Treasury.CreditReversalCreateOptions + { + ReceivedCredit = "rc_xxxxxxxxxxxxx", + }; + var service = new Stripe.Treasury.CreditReversalService( + this.StripeClient); + Stripe.Treasury.CreditReversal creditReversal = await service + .CreateAsync(options); + this.AssertRequest( + HttpMethod.Post, + "/v1/treasury/credit_reversals"); + } + [Fact] public void TestTreasuryDebitReversalsGet() { @@ -5678,6 +13758,59 @@ public void TestTreasuryDebitReversalsGet() "financial_account=fa_xxxxxxxxxxxxx&limit=3"); } + [Fact] + public async Task TestTreasuryDebitReversalsGetAsync() + { + var options = new Stripe.Treasury.DebitReversalListOptions + { + FinancialAccount = "fa_xxxxxxxxxxxxx", + Limit = 3, + }; + var service = new Stripe.Treasury.DebitReversalService( + this.StripeClient); + StripeList debitReversals = await service + .ListAsync(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/debit_reversals", + "financial_account=fa_xxxxxxxxxxxxx&limit=3"); + } + + [Fact] + public void TestTreasuryDebitReversalsGetAutoPaging() + { + var options = new Stripe.Treasury.DebitReversalListOptions + { + FinancialAccount = "fa_xxxxxxxxxxxxx", + Limit = 3, + }; + var service = new Stripe.Treasury.DebitReversalService( + this.StripeClient); + var debitReversal = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/debit_reversals", + "financial_account=fa_xxxxxxxxxxxxx&limit=3"); + } + + [Fact] + public async Task TestTreasuryDebitReversalsGetAutoPagingAsync() + { + var options = new Stripe.Treasury.DebitReversalListOptions + { + FinancialAccount = "fa_xxxxxxxxxxxxx", + Limit = 3, + }; + var service = new Stripe.Treasury.DebitReversalService( + this.StripeClient); + var debitReversal = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/debit_reversals", + "financial_account=fa_xxxxxxxxxxxxx&limit=3"); + } + [Fact] public void TestTreasuryDebitReversalsGet2() { @@ -5690,6 +13823,18 @@ public void TestTreasuryDebitReversalsGet2() "/v1/treasury/debit_reversals/debrev_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestTreasuryDebitReversalsGet2Async() + { + var service = new Stripe.Treasury.DebitReversalService( + this.StripeClient); + Stripe.Treasury.DebitReversal debitReversal = await service + .GetAsync("debrev_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/debit_reversals/debrev_xxxxxxxxxxxxx"); + } + [Fact] public void TestTreasuryDebitReversalsPost() { @@ -5704,6 +13849,20 @@ public void TestTreasuryDebitReversalsPost() this.AssertRequest(HttpMethod.Post, "/v1/treasury/debit_reversals"); } + [Fact] + public async Task TestTreasuryDebitReversalsPostAsync() + { + var options = new Stripe.Treasury.DebitReversalCreateOptions + { + ReceivedDebit = "rd_xxxxxxxxxxxxx", + }; + var service = new Stripe.Treasury.DebitReversalService( + this.StripeClient); + Stripe.Treasury.DebitReversal debitReversal = await service + .CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/treasury/debit_reversals"); + } + [Fact] public void TestTreasuryFinancialAccountsFeaturesGet() { @@ -5716,6 +13875,18 @@ public void TestTreasuryFinancialAccountsFeaturesGet() "/v1/treasury/financial_accounts/fa_xxxxxxxxxxxxx/features"); } + [Fact] + public async Task TestTreasuryFinancialAccountsFeaturesGetAsync() + { + var service = new Stripe.Treasury.FinancialAccountFeaturesService( + this.StripeClient); + Stripe.Treasury.FinancialAccountFeatures financialAccountFeatures = await service + .GetAsync("fa_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/financial_accounts/fa_xxxxxxxxxxxxx/features"); + } + [Fact] public void TestTreasuryFinancialAccountsGet() { @@ -5734,52 +13905,150 @@ public void TestTreasuryFinancialAccountsGet() } [Fact] - public void TestTreasuryFinancialAccountsGet2() + public async Task TestTreasuryFinancialAccountsGetAsync() { + var options = new Stripe.Treasury.FinancialAccountListOptions + { + Limit = 3, + }; var service = new Stripe.Treasury.FinancialAccountService( this.StripeClient); - Stripe.Treasury.FinancialAccount financialAccount = service.Get( - "fa_xxxxxxxxxxxxx"); + StripeList financialAccounts = await service + .ListAsync(options); this.AssertRequest( HttpMethod.Get, - "/v1/treasury/financial_accounts/fa_xxxxxxxxxxxxx"); + "/v1/treasury/financial_accounts", + "limit=3"); } [Fact] - public void TestTreasuryFinancialAccountsPost() + public void TestTreasuryFinancialAccountsGetAutoPaging() { - var options = new Stripe.Treasury.FinancialAccountCreateOptions + var options = new Stripe.Treasury.FinancialAccountListOptions { - SupportedCurrencies = new List { "usd" }, - Features = new Stripe.Treasury.FinancialAccountFeaturesOptions(), + Limit = 3, }; var service = new Stripe.Treasury.FinancialAccountService( this.StripeClient); - Stripe.Treasury.FinancialAccount financialAccount = service.Create( - options); + var financialAccount = service.ListAutoPaging(options).First(); this.AssertRequest( - HttpMethod.Post, - "/v1/treasury/financial_accounts"); + HttpMethod.Get, + "/v1/treasury/financial_accounts", + "limit=3"); } [Fact] - public void TestTreasuryFinancialAccountsPost2() + public async Task TestTreasuryFinancialAccountsGetAutoPagingAsync() { - var options = new Stripe.Treasury.FinancialAccountUpdateOptions + var options = new Stripe.Treasury.FinancialAccountListOptions { - Metadata = new Dictionary - { - { "order_id", "6735" }, - }, + Limit = 3, }; var service = new Stripe.Treasury.FinancialAccountService( this.StripeClient); - Stripe.Treasury.FinancialAccount financialAccount = service.Update( - "fa_xxxxxxxxxxxxx", - options); + var financialAccount = await service.ListAutoPagingAsync(options) + .FirstAsync(); this.AssertRequest( - HttpMethod.Post, - "/v1/treasury/financial_accounts/fa_xxxxxxxxxxxxx"); + HttpMethod.Get, + "/v1/treasury/financial_accounts", + "limit=3"); + } + + [Fact] + public void TestTreasuryFinancialAccountsGet2() + { + var service = new Stripe.Treasury.FinancialAccountService( + this.StripeClient); + Stripe.Treasury.FinancialAccount financialAccount = service.Get( + "fa_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/financial_accounts/fa_xxxxxxxxxxxxx"); + } + + [Fact] + public async Task TestTreasuryFinancialAccountsGet2Async() + { + var service = new Stripe.Treasury.FinancialAccountService( + this.StripeClient); + Stripe.Treasury.FinancialAccount financialAccount = await service + .GetAsync("fa_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/financial_accounts/fa_xxxxxxxxxxxxx"); + } + + [Fact] + public void TestTreasuryFinancialAccountsPost() + { + var options = new Stripe.Treasury.FinancialAccountCreateOptions + { + SupportedCurrencies = new List { "usd" }, + Features = new Stripe.Treasury.FinancialAccountFeaturesOptions(), + }; + var service = new Stripe.Treasury.FinancialAccountService( + this.StripeClient); + Stripe.Treasury.FinancialAccount financialAccount = service.Create( + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/treasury/financial_accounts"); + } + + [Fact] + public async Task TestTreasuryFinancialAccountsPostAsync() + { + var options = new Stripe.Treasury.FinancialAccountCreateOptions + { + SupportedCurrencies = new List { "usd" }, + Features = new Stripe.Treasury.FinancialAccountFeaturesOptions(), + }; + var service = new Stripe.Treasury.FinancialAccountService( + this.StripeClient); + Stripe.Treasury.FinancialAccount financialAccount = await service + .CreateAsync(options); + this.AssertRequest( + HttpMethod.Post, + "/v1/treasury/financial_accounts"); + } + + [Fact] + public void TestTreasuryFinancialAccountsPost2() + { + var options = new Stripe.Treasury.FinancialAccountUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new Stripe.Treasury.FinancialAccountService( + this.StripeClient); + Stripe.Treasury.FinancialAccount financialAccount = service.Update( + "fa_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/treasury/financial_accounts/fa_xxxxxxxxxxxxx"); + } + + [Fact] + public async Task TestTreasuryFinancialAccountsPost2Async() + { + var options = new Stripe.Treasury.FinancialAccountUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new Stripe.Treasury.FinancialAccountService( + this.StripeClient); + Stripe.Treasury.FinancialAccount financialAccount = await service + .UpdateAsync("fa_xxxxxxxxxxxxx", options); + this.AssertRequest( + HttpMethod.Post, + "/v1/treasury/financial_accounts/fa_xxxxxxxxxxxxx"); } [Fact] @@ -5794,6 +14063,18 @@ public void TestTreasuryInboundTransfersCancelPost() "/v1/treasury/inbound_transfers/ibt_xxxxxxxxxxxxx/cancel"); } + [Fact] + public async Task TestTreasuryInboundTransfersCancelPostAsync() + { + var service = new Stripe.Treasury.InboundTransferService( + this.StripeClient); + Stripe.Treasury.InboundTransfer inboundTransfer = await service + .CancelAsync("ibt_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/treasury/inbound_transfers/ibt_xxxxxxxxxxxxx/cancel"); + } + [Fact] public void TestTreasuryInboundTransfersGet() { @@ -5812,6 +14093,59 @@ public void TestTreasuryInboundTransfersGet() "financial_account=fa_xxxxxxxxxxxxx&limit=3"); } + [Fact] + public async Task TestTreasuryInboundTransfersGetAsync() + { + var options = new Stripe.Treasury.InboundTransferListOptions + { + FinancialAccount = "fa_xxxxxxxxxxxxx", + Limit = 3, + }; + var service = new Stripe.Treasury.InboundTransferService( + this.StripeClient); + StripeList inboundTransfers = await service + .ListAsync(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/inbound_transfers", + "financial_account=fa_xxxxxxxxxxxxx&limit=3"); + } + + [Fact] + public void TestTreasuryInboundTransfersGetAutoPaging() + { + var options = new Stripe.Treasury.InboundTransferListOptions + { + FinancialAccount = "fa_xxxxxxxxxxxxx", + Limit = 3, + }; + var service = new Stripe.Treasury.InboundTransferService( + this.StripeClient); + var inboundTransfer = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/inbound_transfers", + "financial_account=fa_xxxxxxxxxxxxx&limit=3"); + } + + [Fact] + public async Task TestTreasuryInboundTransfersGetAutoPagingAsync() + { + var options = new Stripe.Treasury.InboundTransferListOptions + { + FinancialAccount = "fa_xxxxxxxxxxxxx", + Limit = 3, + }; + var service = new Stripe.Treasury.InboundTransferService( + this.StripeClient); + var inboundTransfer = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/inbound_transfers", + "financial_account=fa_xxxxxxxxxxxxx&limit=3"); + } + [Fact] public void TestTreasuryInboundTransfersGet2() { @@ -5824,6 +14158,18 @@ public void TestTreasuryInboundTransfersGet2() "/v1/treasury/inbound_transfers/ibt_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestTreasuryInboundTransfersGet2Async() + { + var service = new Stripe.Treasury.InboundTransferService( + this.StripeClient); + Stripe.Treasury.InboundTransfer inboundTransfer = await service + .GetAsync("ibt_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/inbound_transfers/ibt_xxxxxxxxxxxxx"); + } + [Fact] public void TestTreasuryInboundTransfersPost() { @@ -5844,6 +14190,26 @@ public void TestTreasuryInboundTransfersPost() "/v1/treasury/inbound_transfers"); } + [Fact] + public async Task TestTreasuryInboundTransfersPostAsync() + { + var options = new Stripe.Treasury.InboundTransferCreateOptions + { + FinancialAccount = "fa_xxxxxxxxxxxxx", + Amount = 10000, + Currency = "usd", + OriginPaymentMethod = "pm_xxxxxxxxxxxxx", + Description = "InboundTransfer from my bank account", + }; + var service = new Stripe.Treasury.InboundTransferService( + this.StripeClient); + Stripe.Treasury.InboundTransfer inboundTransfer = await service + .CreateAsync(options); + this.AssertRequest( + HttpMethod.Post, + "/v1/treasury/inbound_transfers"); + } + [Fact] public void TestTreasuryOutboundPaymentsCancelPost() { @@ -5856,6 +14222,18 @@ public void TestTreasuryOutboundPaymentsCancelPost() "/v1/treasury/outbound_payments/bot_xxxxxxxxxxxxx/cancel"); } + [Fact] + public async Task TestTreasuryOutboundPaymentsCancelPostAsync() + { + var service = new Stripe.Treasury.OutboundPaymentService( + this.StripeClient); + Stripe.Treasury.OutboundPayment outboundPayment = await service + .CancelAsync("bot_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/treasury/outbound_payments/bot_xxxxxxxxxxxxx/cancel"); + } + [Fact] public void TestTreasuryOutboundPaymentsGet() { @@ -5874,6 +14252,59 @@ public void TestTreasuryOutboundPaymentsGet() "financial_account=fa_xxxxxxxxxxxxx&limit=3"); } + [Fact] + public async Task TestTreasuryOutboundPaymentsGetAsync() + { + var options = new Stripe.Treasury.OutboundPaymentListOptions + { + FinancialAccount = "fa_xxxxxxxxxxxxx", + Limit = 3, + }; + var service = new Stripe.Treasury.OutboundPaymentService( + this.StripeClient); + StripeList outboundPayments = await service + .ListAsync(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/outbound_payments", + "financial_account=fa_xxxxxxxxxxxxx&limit=3"); + } + + [Fact] + public void TestTreasuryOutboundPaymentsGetAutoPaging() + { + var options = new Stripe.Treasury.OutboundPaymentListOptions + { + FinancialAccount = "fa_xxxxxxxxxxxxx", + Limit = 3, + }; + var service = new Stripe.Treasury.OutboundPaymentService( + this.StripeClient); + var outboundPayment = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/outbound_payments", + "financial_account=fa_xxxxxxxxxxxxx&limit=3"); + } + + [Fact] + public async Task TestTreasuryOutboundPaymentsGetAutoPagingAsync() + { + var options = new Stripe.Treasury.OutboundPaymentListOptions + { + FinancialAccount = "fa_xxxxxxxxxxxxx", + Limit = 3, + }; + var service = new Stripe.Treasury.OutboundPaymentService( + this.StripeClient); + var outboundPayment = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/outbound_payments", + "financial_account=fa_xxxxxxxxxxxxx&limit=3"); + } + [Fact] public void TestTreasuryOutboundPaymentsGet2() { @@ -5886,6 +14317,18 @@ public void TestTreasuryOutboundPaymentsGet2() "/v1/treasury/outbound_payments/bot_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestTreasuryOutboundPaymentsGet2Async() + { + var service = new Stripe.Treasury.OutboundPaymentService( + this.StripeClient); + Stripe.Treasury.OutboundPayment outboundPayment = await service + .GetAsync("bot_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/outbound_payments/bot_xxxxxxxxxxxxx"); + } + [Fact] public void TestTreasuryOutboundPaymentsPost() { @@ -5907,6 +14350,27 @@ public void TestTreasuryOutboundPaymentsPost() "/v1/treasury/outbound_payments"); } + [Fact] + public async Task TestTreasuryOutboundPaymentsPostAsync() + { + var options = new Stripe.Treasury.OutboundPaymentCreateOptions + { + FinancialAccount = "fa_xxxxxxxxxxxxx", + Amount = 10000, + Currency = "usd", + Customer = "cus_xxxxxxxxxxxxx", + DestinationPaymentMethod = "pm_xxxxxxxxxxxxx", + Description = "OutboundPayment to a 3rd party", + }; + var service = new Stripe.Treasury.OutboundPaymentService( + this.StripeClient); + Stripe.Treasury.OutboundPayment outboundPayment = await service + .CreateAsync(options); + this.AssertRequest( + HttpMethod.Post, + "/v1/treasury/outbound_payments"); + } + [Fact] public void TestTreasuryOutboundTransfersCancelPost() { @@ -5920,11 +14384,23 @@ public void TestTreasuryOutboundTransfersCancelPost() } [Fact] - public void TestTreasuryOutboundTransfersGet() + public async Task TestTreasuryOutboundTransfersCancelPostAsync() { - var options = new Stripe.Treasury.OutboundTransferListOptions - { - FinancialAccount = "fa_xxxxxxxxxxxxx", + var service = new Stripe.Treasury.OutboundTransferService( + this.StripeClient); + Stripe.Treasury.OutboundTransfer outboundTransfer = await service + .CancelAsync("obt_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/treasury/outbound_transfers/obt_xxxxxxxxxxxxx/cancel"); + } + + [Fact] + public void TestTreasuryOutboundTransfersGet() + { + var options = new Stripe.Treasury.OutboundTransferListOptions + { + FinancialAccount = "fa_xxxxxxxxxxxxx", Limit = 3, }; var service = new Stripe.Treasury.OutboundTransferService( @@ -5937,6 +14413,59 @@ public void TestTreasuryOutboundTransfersGet() "financial_account=fa_xxxxxxxxxxxxx&limit=3"); } + [Fact] + public async Task TestTreasuryOutboundTransfersGetAsync() + { + var options = new Stripe.Treasury.OutboundTransferListOptions + { + FinancialAccount = "fa_xxxxxxxxxxxxx", + Limit = 3, + }; + var service = new Stripe.Treasury.OutboundTransferService( + this.StripeClient); + StripeList outboundTransfers = await service + .ListAsync(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/outbound_transfers", + "financial_account=fa_xxxxxxxxxxxxx&limit=3"); + } + + [Fact] + public void TestTreasuryOutboundTransfersGetAutoPaging() + { + var options = new Stripe.Treasury.OutboundTransferListOptions + { + FinancialAccount = "fa_xxxxxxxxxxxxx", + Limit = 3, + }; + var service = new Stripe.Treasury.OutboundTransferService( + this.StripeClient); + var outboundTransfer = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/outbound_transfers", + "financial_account=fa_xxxxxxxxxxxxx&limit=3"); + } + + [Fact] + public async Task TestTreasuryOutboundTransfersGetAutoPagingAsync() + { + var options = new Stripe.Treasury.OutboundTransferListOptions + { + FinancialAccount = "fa_xxxxxxxxxxxxx", + Limit = 3, + }; + var service = new Stripe.Treasury.OutboundTransferService( + this.StripeClient); + var outboundTransfer = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/outbound_transfers", + "financial_account=fa_xxxxxxxxxxxxx&limit=3"); + } + [Fact] public void TestTreasuryOutboundTransfersGet2() { @@ -5949,6 +14478,18 @@ public void TestTreasuryOutboundTransfersGet2() "/v1/treasury/outbound_transfers/obt_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestTreasuryOutboundTransfersGet2Async() + { + var service = new Stripe.Treasury.OutboundTransferService( + this.StripeClient); + Stripe.Treasury.OutboundTransfer outboundTransfer = await service + .GetAsync("obt_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/outbound_transfers/obt_xxxxxxxxxxxxx"); + } + [Fact] public void TestTreasuryOutboundTransfersPost() { @@ -5969,6 +14510,26 @@ public void TestTreasuryOutboundTransfersPost() "/v1/treasury/outbound_transfers"); } + [Fact] + public async Task TestTreasuryOutboundTransfersPostAsync() + { + var options = new Stripe.Treasury.OutboundTransferCreateOptions + { + FinancialAccount = "fa_xxxxxxxxxxxxx", + DestinationPaymentMethod = "pm_xxxxxxxxxxxxx", + Amount = 500, + Currency = "usd", + Description = "OutboundTransfer to my external bank account", + }; + var service = new Stripe.Treasury.OutboundTransferService( + this.StripeClient); + Stripe.Treasury.OutboundTransfer outboundTransfer = await service + .CreateAsync(options); + this.AssertRequest( + HttpMethod.Post, + "/v1/treasury/outbound_transfers"); + } + [Fact] public void TestTreasuryReceivedCreditsGet() { @@ -5987,6 +14548,59 @@ public void TestTreasuryReceivedCreditsGet() "financial_account=fa_xxxxxxxxxxxxx&limit=3"); } + [Fact] + public async Task TestTreasuryReceivedCreditsGetAsync() + { + var options = new Stripe.Treasury.ReceivedCreditListOptions + { + FinancialAccount = "fa_xxxxxxxxxxxxx", + Limit = 3, + }; + var service = new Stripe.Treasury.ReceivedCreditService( + this.StripeClient); + StripeList receivedCredits = await service + .ListAsync(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/received_credits", + "financial_account=fa_xxxxxxxxxxxxx&limit=3"); + } + + [Fact] + public void TestTreasuryReceivedCreditsGetAutoPaging() + { + var options = new Stripe.Treasury.ReceivedCreditListOptions + { + FinancialAccount = "fa_xxxxxxxxxxxxx", + Limit = 3, + }; + var service = new Stripe.Treasury.ReceivedCreditService( + this.StripeClient); + var receivedCredit = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/received_credits", + "financial_account=fa_xxxxxxxxxxxxx&limit=3"); + } + + [Fact] + public async Task TestTreasuryReceivedCreditsGetAutoPagingAsync() + { + var options = new Stripe.Treasury.ReceivedCreditListOptions + { + FinancialAccount = "fa_xxxxxxxxxxxxx", + Limit = 3, + }; + var service = new Stripe.Treasury.ReceivedCreditService( + this.StripeClient); + var receivedCredit = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/received_credits", + "financial_account=fa_xxxxxxxxxxxxx&limit=3"); + } + [Fact] public void TestTreasuryReceivedCreditsGet2() { @@ -5999,6 +14613,18 @@ public void TestTreasuryReceivedCreditsGet2() "/v1/treasury/received_credits/rc_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestTreasuryReceivedCreditsGet2Async() + { + var service = new Stripe.Treasury.ReceivedCreditService( + this.StripeClient); + Stripe.Treasury.ReceivedCredit receivedCredit = await service + .GetAsync("rc_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/received_credits/rc_xxxxxxxxxxxxx"); + } + [Fact] public void TestTreasuryReceivedDebitsGet() { @@ -6017,6 +14643,59 @@ public void TestTreasuryReceivedDebitsGet() "financial_account=fa_xxxxxxxxxxxxx&limit=3"); } + [Fact] + public async Task TestTreasuryReceivedDebitsGetAsync() + { + var options = new Stripe.Treasury.ReceivedDebitListOptions + { + FinancialAccount = "fa_xxxxxxxxxxxxx", + Limit = 3, + }; + var service = new Stripe.Treasury.ReceivedDebitService( + this.StripeClient); + StripeList receivedDebits = await service + .ListAsync(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/received_debits", + "financial_account=fa_xxxxxxxxxxxxx&limit=3"); + } + + [Fact] + public void TestTreasuryReceivedDebitsGetAutoPaging() + { + var options = new Stripe.Treasury.ReceivedDebitListOptions + { + FinancialAccount = "fa_xxxxxxxxxxxxx", + Limit = 3, + }; + var service = new Stripe.Treasury.ReceivedDebitService( + this.StripeClient); + var receivedDebit = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/received_debits", + "financial_account=fa_xxxxxxxxxxxxx&limit=3"); + } + + [Fact] + public async Task TestTreasuryReceivedDebitsGetAutoPagingAsync() + { + var options = new Stripe.Treasury.ReceivedDebitListOptions + { + FinancialAccount = "fa_xxxxxxxxxxxxx", + Limit = 3, + }; + var service = new Stripe.Treasury.ReceivedDebitService( + this.StripeClient); + var receivedDebit = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/received_debits", + "financial_account=fa_xxxxxxxxxxxxx&limit=3"); + } + [Fact] public void TestTreasuryReceivedDebitsGet2() { @@ -6029,6 +14708,18 @@ public void TestTreasuryReceivedDebitsGet2() "/v1/treasury/received_debits/rd_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestTreasuryReceivedDebitsGet2Async() + { + var service = new Stripe.Treasury.ReceivedDebitService( + this.StripeClient); + Stripe.Treasury.ReceivedDebit receivedDebit = await service + .GetAsync("rd_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/received_debits/rd_xxxxxxxxxxxxx"); + } + [Fact] public void TestTreasuryTransactionEntriesGet() { @@ -6048,82 +14739,272 @@ public void TestTreasuryTransactionEntriesGet() } [Fact] - public void TestTreasuryTransactionEntriesGet2() + public async Task TestTreasuryTransactionEntriesGetAsync() { + var options = new Stripe.Treasury.TransactionEntryListOptions + { + FinancialAccount = "fa_xxxxxxxxxxxxx", + Limit = 3, + }; var service = new Stripe.Treasury.TransactionEntryService( this.StripeClient); - Stripe.Treasury.TransactionEntry transactionEntry = service.Get( - "trxne_xxxxxxxxxxxxx"); + StripeList transactionEntries = await service + .ListAsync(options); this.AssertRequest( HttpMethod.Get, - "/v1/treasury/transaction_entries/trxne_xxxxxxxxxxxxx"); + "/v1/treasury/transaction_entries", + "financial_account=fa_xxxxxxxxxxxxx&limit=3"); } [Fact] - public void TestTreasuryTransactionsGet() + public void TestTreasuryTransactionEntriesGetAutoPaging() { - var options = new Stripe.Treasury.TransactionListOptions + var options = new Stripe.Treasury.TransactionEntryListOptions { FinancialAccount = "fa_xxxxxxxxxxxxx", Limit = 3, }; - var service = new Stripe.Treasury.TransactionService( + var service = new Stripe.Treasury.TransactionEntryService( this.StripeClient); - StripeList transactions = service.List( - options); + var transactionEntry = service.ListAutoPaging(options).First(); this.AssertRequest( HttpMethod.Get, - "/v1/treasury/transactions", + "/v1/treasury/transaction_entries", "financial_account=fa_xxxxxxxxxxxxx&limit=3"); } [Fact] - public void TestTreasuryTransactionsGet2() + public async Task TestTreasuryTransactionEntriesGetAutoPagingAsync() { - var service = new Stripe.Treasury.TransactionService( + var options = new Stripe.Treasury.TransactionEntryListOptions + { + FinancialAccount = "fa_xxxxxxxxxxxxx", + Limit = 3, + }; + var service = new Stripe.Treasury.TransactionEntryService( this.StripeClient); - Stripe.Treasury.Transaction transaction = service.Get( - "trxn_xxxxxxxxxxxxx"); + var transactionEntry = await service.ListAutoPagingAsync(options) + .FirstAsync(); this.AssertRequest( HttpMethod.Get, - "/v1/treasury/transactions/trxn_xxxxxxxxxxxxx"); - } - - [Fact] - public void TestWebhookEndpointsDelete() - { - var service = new WebhookEndpointService(this.StripeClient); - WebhookEndpoint deleted = service.Delete("we_xxxxxxxxxxxxx"); - this.AssertRequest( - HttpMethod.Delete, - "/v1/webhook_endpoints/we_xxxxxxxxxxxxx"); + "/v1/treasury/transaction_entries", + "financial_account=fa_xxxxxxxxxxxxx&limit=3"); } [Fact] - public void TestWebhookEndpointsGet() + public void TestTreasuryTransactionEntriesGet2() { - var options = new WebhookEndpointListOptions { Limit = 3 }; - var service = new WebhookEndpointService(this.StripeClient); - StripeList webhookEndpoints = service.List( - options); + var service = new Stripe.Treasury.TransactionEntryService( + this.StripeClient); + Stripe.Treasury.TransactionEntry transactionEntry = service.Get( + "trxne_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, - "/v1/webhook_endpoints", - "limit=3"); + "/v1/treasury/transaction_entries/trxne_xxxxxxxxxxxxx"); } [Fact] - public void TestWebhookEndpointsGet2() + public async Task TestTreasuryTransactionEntriesGet2Async() { - var service = new WebhookEndpointService(this.StripeClient); - WebhookEndpoint webhookEndpoint = service.Get("we_xxxxxxxxxxxxx"); + var service = new Stripe.Treasury.TransactionEntryService( + this.StripeClient); + Stripe.Treasury.TransactionEntry transactionEntry = await service + .GetAsync("trxne_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, - "/v1/webhook_endpoints/we_xxxxxxxxxxxxx"); + "/v1/treasury/transaction_entries/trxne_xxxxxxxxxxxxx"); } [Fact] - public void TestWebhookEndpointsPost() + public void TestTreasuryTransactionsGet() + { + var options = new Stripe.Treasury.TransactionListOptions + { + FinancialAccount = "fa_xxxxxxxxxxxxx", + Limit = 3, + }; + var service = new Stripe.Treasury.TransactionService( + this.StripeClient); + StripeList transactions = service.List( + options); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/transactions", + "financial_account=fa_xxxxxxxxxxxxx&limit=3"); + } + + [Fact] + public async Task TestTreasuryTransactionsGetAsync() + { + var options = new Stripe.Treasury.TransactionListOptions + { + FinancialAccount = "fa_xxxxxxxxxxxxx", + Limit = 3, + }; + var service = new Stripe.Treasury.TransactionService( + this.StripeClient); + StripeList transactions = await service + .ListAsync(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/transactions", + "financial_account=fa_xxxxxxxxxxxxx&limit=3"); + } + + [Fact] + public void TestTreasuryTransactionsGetAutoPaging() + { + var options = new Stripe.Treasury.TransactionListOptions + { + FinancialAccount = "fa_xxxxxxxxxxxxx", + Limit = 3, + }; + var service = new Stripe.Treasury.TransactionService( + this.StripeClient); + var transaction = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/transactions", + "financial_account=fa_xxxxxxxxxxxxx&limit=3"); + } + + [Fact] + public async Task TestTreasuryTransactionsGetAutoPagingAsync() + { + var options = new Stripe.Treasury.TransactionListOptions + { + FinancialAccount = "fa_xxxxxxxxxxxxx", + Limit = 3, + }; + var service = new Stripe.Treasury.TransactionService( + this.StripeClient); + var transaction = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/transactions", + "financial_account=fa_xxxxxxxxxxxxx&limit=3"); + } + + [Fact] + public void TestTreasuryTransactionsGet2() + { + var service = new Stripe.Treasury.TransactionService( + this.StripeClient); + Stripe.Treasury.Transaction transaction = service.Get( + "trxn_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/transactions/trxn_xxxxxxxxxxxxx"); + } + + [Fact] + public async Task TestTreasuryTransactionsGet2Async() + { + var service = new Stripe.Treasury.TransactionService( + this.StripeClient); + Stripe.Treasury.Transaction transaction = await service.GetAsync( + "trxn_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/transactions/trxn_xxxxxxxxxxxxx"); + } + + [Fact] + public void TestWebhookEndpointsDelete() + { + var service = new WebhookEndpointService(this.StripeClient); + WebhookEndpoint deleted = service.Delete("we_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Delete, + "/v1/webhook_endpoints/we_xxxxxxxxxxxxx"); + } + + [Fact] + public async Task TestWebhookEndpointsDeleteAsync() + { + var service = new WebhookEndpointService(this.StripeClient); + WebhookEndpoint deleted = await service.DeleteAsync( + "we_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Delete, + "/v1/webhook_endpoints/we_xxxxxxxxxxxxx"); + } + + [Fact] + public void TestWebhookEndpointsGet() + { + var options = new WebhookEndpointListOptions { Limit = 3 }; + var service = new WebhookEndpointService(this.StripeClient); + StripeList webhookEndpoints = service.List( + options); + this.AssertRequest( + HttpMethod.Get, + "/v1/webhook_endpoints", + "limit=3"); + } + + [Fact] + public async Task TestWebhookEndpointsGetAsync() + { + var options = new WebhookEndpointListOptions { Limit = 3 }; + var service = new WebhookEndpointService(this.StripeClient); + StripeList webhookEndpoints = await service + .ListAsync(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/webhook_endpoints", + "limit=3"); + } + + [Fact] + public void TestWebhookEndpointsGetAutoPaging() + { + var options = new WebhookEndpointListOptions { Limit = 3 }; + var service = new WebhookEndpointService(this.StripeClient); + var webhookEndpoint = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/webhook_endpoints", + "limit=3"); + } + + [Fact] + public async Task TestWebhookEndpointsGetAutoPagingAsync() + { + var options = new WebhookEndpointListOptions { Limit = 3 }; + var service = new WebhookEndpointService(this.StripeClient); + var webhookEndpoint = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/webhook_endpoints", + "limit=3"); + } + + [Fact] + public void TestWebhookEndpointsGet2() + { + var service = new WebhookEndpointService(this.StripeClient); + WebhookEndpoint webhookEndpoint = service.Get("we_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/webhook_endpoints/we_xxxxxxxxxxxxx"); + } + + [Fact] + public async Task TestWebhookEndpointsGet2Async() + { + var service = new WebhookEndpointService(this.StripeClient); + WebhookEndpoint webhookEndpoint = await service.GetAsync( + "we_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/webhook_endpoints/we_xxxxxxxxxxxxx"); + } + + [Fact] + public void TestWebhookEndpointsPost() { var options = new WebhookEndpointCreateOptions { @@ -6139,6 +15020,24 @@ public void TestWebhookEndpointsPost() this.AssertRequest(HttpMethod.Post, "/v1/webhook_endpoints"); } + [Fact] + public async Task TestWebhookEndpointsPostAsync() + { + var options = new WebhookEndpointCreateOptions + { + Url = "https://example.com/my/webhook/endpoint", + EnabledEvents = new List + { + "charge.failed", + "charge.succeeded", + }, + }; + var service = new WebhookEndpointService(this.StripeClient); + WebhookEndpoint webhookEndpoint = await service.CreateAsync( + options); + this.AssertRequest(HttpMethod.Post, "/v1/webhook_endpoints"); + } + [Fact] public void TestWebhookEndpointsPost2() { @@ -6155,6 +15054,22 @@ public void TestWebhookEndpointsPost2() "/v1/webhook_endpoints/we_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestWebhookEndpointsPost2Async() + { + var options = new WebhookEndpointUpdateOptions + { + Url = "https://example.com/new_endpoint", + }; + var service = new WebhookEndpointService(this.StripeClient); + WebhookEndpoint webhookEndpoint = await service.UpdateAsync( + "we_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/webhook_endpoints/we_xxxxxxxxxxxxx"); + } + [Fact] public void TestV2BillingBillSettingGet() { @@ -6170,6 +15085,49 @@ public void TestV2BillingBillSettingGet() this.AssertRequest(HttpMethod.Get, "/v2/billing/bill_settings"); } + [Fact] + public async Task TestV2BillingBillSettingGetAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/bill_settings", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.bill_setting\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"latest_version\":\"latest_version\",\"live_version\":\"live_version\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.BillSettings; + Stripe.V2.StripeList billSettings = await service + .ListAsync(); + this.AssertRequest(HttpMethod.Get, "/v2/billing/bill_settings"); + } + + [Fact] + public void TestV2BillingBillSettingGetAutoPaging() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/bill_settings", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.bill_setting\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"latest_version\":\"latest_version\",\"live_version\":\"live_version\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.BillSettings; + var billSetting = service.ListAutoPaging().First(); + this.AssertRequest(HttpMethod.Get, "/v2/billing/bill_settings"); + } + + [Fact] + public async Task TestV2BillingBillSettingGetAutoPagingAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/bill_settings", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.bill_setting\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"latest_version\":\"latest_version\",\"live_version\":\"live_version\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.BillSettings; + var billSetting = await service.ListAutoPagingAsync().FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v2/billing/bill_settings"); + } + [Fact] public void TestV2BillingBillSettingPost() { @@ -6185,6 +15143,22 @@ public void TestV2BillingBillSettingPost() this.AssertRequest(HttpMethod.Post, "/v2/billing/bill_settings"); } + [Fact] + public async Task TestV2BillingBillSettingPostAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/bill_settings", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.bill_setting\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"latest_version\":\"latest_version\",\"live_version\":\"live_version\",\"livemode\":true}"); + var options = new Stripe.V2.Billing.BillSettingCreateOptions(); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.BillSettings; + Stripe.V2.Billing.BillSetting billSetting = await service + .CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v2/billing/bill_settings"); + } + [Fact] public void TestV2BillingBillSettingGet2() { @@ -6202,26 +15176,61 @@ public void TestV2BillingBillSettingGet2() } [Fact] - public void TestV2BillingBillSettingPost2() + public async Task TestV2BillingBillSettingGet2Async() { this.StubRequest( - HttpMethod.Post, + HttpMethod.Get, "/v2/billing/bill_settings/id_123", (HttpStatusCode)200, "{\"object\":\"v2.billing.bill_setting\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"latest_version\":\"latest_version\",\"live_version\":\"live_version\",\"livemode\":true}"); - var options = new Stripe.V2.Billing.BillSettingUpdateOptions(); var client = new StripeClient(this.Requestor); var service = client.V2.Billing.BillSettings; - Stripe.V2.Billing.BillSetting billSetting = service.Update( - "id_123", - options); + Stripe.V2.Billing.BillSetting billSetting = await service.GetAsync( + "id_123"); this.AssertRequest( - HttpMethod.Post, + HttpMethod.Get, "/v2/billing/bill_settings/id_123"); } [Fact] - public void TestV2BillingBillSettingsVersionGet() + public void TestV2BillingBillSettingPost2() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/bill_settings/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.bill_setting\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"latest_version\":\"latest_version\",\"live_version\":\"live_version\",\"livemode\":true}"); + var options = new Stripe.V2.Billing.BillSettingUpdateOptions(); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.BillSettings; + Stripe.V2.Billing.BillSetting billSetting = service.Update( + "id_123", + options); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/bill_settings/id_123"); + } + + [Fact] + public async Task TestV2BillingBillSettingPost2Async() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/bill_settings/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.bill_setting\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"latest_version\":\"latest_version\",\"live_version\":\"live_version\",\"livemode\":true}"); + var options = new Stripe.V2.Billing.BillSettingUpdateOptions(); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.BillSettings; + Stripe.V2.Billing.BillSetting billSetting = await service + .UpdateAsync("id_123", options); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/bill_settings/id_123"); + } + + [Fact] + public void TestV2BillingBillSettingsVersionGet() { this.StubRequest( HttpMethod.Get, @@ -6237,6 +15246,59 @@ public void TestV2BillingBillSettingsVersionGet() "/v2/billing/bill_settings/bill_setting_id_123/versions"); } + [Fact] + public async Task TestV2BillingBillSettingsVersionGetAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/bill_settings/bill_setting_id_123/versions", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.bill_setting_version\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.BillSettings.Versions; + Stripe.V2.StripeList billSettingVersions = await service + .ListAsync("bill_setting_id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/bill_settings/bill_setting_id_123/versions"); + } + + [Fact] + public void TestV2BillingBillSettingsVersionGetAutoPaging() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/bill_settings/bill_setting_id_123/versions", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.bill_setting_version\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.BillSettings.Versions; + var billSettingVersion = service.ListAutoPaging( + "bill_setting_id_123") + .First(); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/bill_settings/bill_setting_id_123/versions"); + } + + [Fact] + public async Task TestV2BillingBillSettingsVersionGetAutoPagingAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/bill_settings/bill_setting_id_123/versions", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.bill_setting_version\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.BillSettings.Versions; + var billSettingVersion = await service.ListAutoPagingAsync( + "bill_setting_id_123") + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/bill_settings/bill_setting_id_123/versions"); + } + [Fact] public void TestV2BillingBillSettingsVersionGet2() { @@ -6254,6 +15316,23 @@ public void TestV2BillingBillSettingsVersionGet2() "/v2/billing/bill_settings/bill_setting_id_123/versions/id_123"); } + [Fact] + public async Task TestV2BillingBillSettingsVersionGet2Async() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/bill_settings/bill_setting_id_123/versions/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.bill_setting_version\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.BillSettings.Versions; + Stripe.V2.Billing.BillSettingVersion billSettingVersion = await service + .GetAsync("bill_setting_id_123", "id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/bill_settings/bill_setting_id_123/versions/id_123"); + } + [Fact] public void TestV2BillingCadenceGet() { @@ -6269,6 +15348,49 @@ public void TestV2BillingCadenceGet() this.AssertRequest(HttpMethod.Get, "/v2/billing/cadences"); } + [Fact] + public async Task TestV2BillingCadenceGetAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/cadences", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.cadence\",\"billing_cycle\":{\"interval_count\":797691627,\"type\":\"week\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"payer\":{\"billing_profile\":\"billing_profile\",\"type\":\"customer\"},\"status\":\"active\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.Cadences; + Stripe.V2.StripeList cadences = await service + .ListAsync(); + this.AssertRequest(HttpMethod.Get, "/v2/billing/cadences"); + } + + [Fact] + public void TestV2BillingCadenceGetAutoPaging() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/cadences", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.cadence\",\"billing_cycle\":{\"interval_count\":797691627,\"type\":\"week\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"payer\":{\"billing_profile\":\"billing_profile\",\"type\":\"customer\"},\"status\":\"active\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.Cadences; + var cadence = service.ListAutoPaging().First(); + this.AssertRequest(HttpMethod.Get, "/v2/billing/cadences"); + } + + [Fact] + public async Task TestV2BillingCadenceGetAutoPagingAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/cadences", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.cadence\",\"billing_cycle\":{\"interval_count\":797691627,\"type\":\"week\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"payer\":{\"billing_profile\":\"billing_profile\",\"type\":\"customer\"},\"status\":\"active\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.Cadences; + var cadence = await service.ListAutoPagingAsync().FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v2/billing/cadences"); + } + [Fact] public void TestV2BillingCadencePost() { @@ -6336,6 +15458,74 @@ public void TestV2BillingCadencePost() this.AssertRequest(HttpMethod.Post, "/v2/billing/cadences"); } + [Fact] + public async Task TestV2BillingCadencePostAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/cadences", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.cadence\",\"billing_cycle\":{\"interval_count\":797691627,\"type\":\"week\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"payer\":{\"billing_profile\":\"billing_profile\",\"type\":\"customer\"},\"status\":\"active\"}"); + var options = new Stripe.V2.Billing.CadenceCreateOptions + { + BillingCycle = new Stripe.V2.Billing.CadenceCreateBillingCycleOptions + { + Day = new Stripe.V2.Billing.CadenceCreateBillingCycleDayOptions + { + Time = new Stripe.V2.Billing.CadenceCreateBillingCycleDayTimeOptions + { + Hour = 3208676, + Minute = 1074026988, + Second = 906279820, + }, + }, + IntervalCount = 797691627, + Month = new Stripe.V2.Billing.CadenceCreateBillingCycleMonthOptions + { + DayOfMonth = 1361669285, + MonthOfYear = 82933018, + Time = new Stripe.V2.Billing.CadenceCreateBillingCycleMonthTimeOptions + { + Hour = 3208676, + Minute = 1074026988, + Second = 906279820, + }, + }, + Type = "week", + Week = new Stripe.V2.Billing.CadenceCreateBillingCycleWeekOptions + { + DayOfWeek = 43636807, + Time = new Stripe.V2.Billing.CadenceCreateBillingCycleWeekTimeOptions + { + Hour = 3208676, + Minute = 1074026988, + Second = 906279820, + }, + }, + Year = new Stripe.V2.Billing.CadenceCreateBillingCycleYearOptions + { + DayOfMonth = 1361669285, + MonthOfYear = 82933018, + Time = new Stripe.V2.Billing.CadenceCreateBillingCycleYearTimeOptions + { + Hour = 3208676, + Minute = 1074026988, + Second = 906279820, + }, + }, + }, + Payer = new Stripe.V2.Billing.CadenceCreatePayerOptions + { + BillingProfile = "billing_profile", + }, + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.Cadences; + Stripe.V2.Billing.Cadence cadence = await service.CreateAsync( + options); + this.AssertRequest(HttpMethod.Post, "/v2/billing/cadences"); + } + [Fact] public void TestV2BillingCadenceGet2() { @@ -6350,6 +15540,21 @@ public void TestV2BillingCadenceGet2() this.AssertRequest(HttpMethod.Get, "/v2/billing/cadences/id_123"); } + [Fact] + public async Task TestV2BillingCadenceGet2Async() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/cadences/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.cadence\",\"billing_cycle\":{\"interval_count\":797691627,\"type\":\"week\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"payer\":{\"billing_profile\":\"billing_profile\",\"type\":\"customer\"},\"status\":\"active\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.Cadences; + Stripe.V2.Billing.Cadence cadence = await service.GetAsync( + "id_123"); + this.AssertRequest(HttpMethod.Get, "/v2/billing/cadences/id_123"); + } + [Fact] public void TestV2BillingCadencePost2() { @@ -6367,6 +15572,23 @@ public void TestV2BillingCadencePost2() this.AssertRequest(HttpMethod.Post, "/v2/billing/cadences/id_123"); } + [Fact] + public async Task TestV2BillingCadencePost2Async() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/cadences/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.cadence\",\"billing_cycle\":{\"interval_count\":797691627,\"type\":\"week\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"payer\":{\"billing_profile\":\"billing_profile\",\"type\":\"customer\"},\"status\":\"active\"}"); + var options = new Stripe.V2.Billing.CadenceUpdateOptions(); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.Cadences; + Stripe.V2.Billing.Cadence cadence = await service.UpdateAsync( + "id_123", + options); + this.AssertRequest(HttpMethod.Post, "/v2/billing/cadences/id_123"); + } + [Fact] public void TestV2BillingCadencePost3() { @@ -6383,6 +15605,23 @@ public void TestV2BillingCadencePost3() "/v2/billing/cadences/id_123/cancel"); } + [Fact] + public async Task TestV2BillingCadencePost3Async() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/cadences/id_123/cancel", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.cadence\",\"billing_cycle\":{\"interval_count\":797691627,\"type\":\"week\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"payer\":{\"billing_profile\":\"billing_profile\",\"type\":\"customer\"},\"status\":\"active\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.Cadences; + Stripe.V2.Billing.Cadence cadence = await service.CancelAsync( + "id_123"); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/cadences/id_123/cancel"); + } + [Fact] public void TestV2BillingCadencesSpendModifierRuleGet() { @@ -6401,41 +15640,160 @@ public void TestV2BillingCadencesSpendModifierRuleGet() } [Fact] - public void TestV2BillingCadencesSpendModifierRuleGet2() + public async Task TestV2BillingCadencesSpendModifierRuleGetAsync() { this.StubRequest( HttpMethod.Get, - "/v2/billing/cadences/cadence_id_123/spend_modifier_rules/id_123", + "/v2/billing/cadences/cadence_id_123/spend_modifier_rules", (HttpStatusCode)200, - "{\"object\":\"v2.billing.cadence_spend_modifier\",\"billing_cadence\":\"billing_cadence\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"type\":\"max_billing_period_spend\"}"); + "{\"data\":[{\"object\":\"v2.billing.cadence_spend_modifier\",\"billing_cadence\":\"billing_cadence\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"type\":\"max_billing_period_spend\"}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); var service = client.V2.Billing.Cadences.SpendModifierRules; - Stripe.V2.Billing.CadenceSpendModifier cadenceSpendModifier = service - .Get("cadence_id_123", "id_123"); + Stripe.V2.StripeList cadenceSpendModifiers = await service + .ListAsync("cadence_id_123"); this.AssertRequest( HttpMethod.Get, - "/v2/billing/cadences/cadence_id_123/spend_modifier_rules/id_123"); + "/v2/billing/cadences/cadence_id_123/spend_modifier_rules"); } [Fact] - public void TestV2BillingCollectionSettingGet() + public void TestV2BillingCadencesSpendModifierRuleGetAutoPaging() { this.StubRequest( HttpMethod.Get, - "/v2/billing/collection_settings", + "/v2/billing/cadences/cadence_id_123/spend_modifier_rules", (HttpStatusCode)200, - "{\"data\":[{\"object\":\"v2.billing.collection_setting\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"latest_version\":\"latest_version\",\"live_version\":\"live_version\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"object\":\"v2.billing.cadence_spend_modifier\",\"billing_cadence\":\"billing_cadence\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"type\":\"max_billing_period_spend\"}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.CollectionSettings; - Stripe.V2.StripeList collectionSettings = service - .List(); + var service = client.V2.Billing.Cadences.SpendModifierRules; + var cadenceSpendModifier = service.ListAutoPaging("cadence_id_123") + .First(); this.AssertRequest( HttpMethod.Get, - "/v2/billing/collection_settings"); + "/v2/billing/cadences/cadence_id_123/spend_modifier_rules"); } [Fact] - public void TestV2BillingCollectionSettingPost() + public async Task TestV2BillingCadencesSpendModifierRuleGetAutoPagingAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/cadences/cadence_id_123/spend_modifier_rules", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.cadence_spend_modifier\",\"billing_cadence\":\"billing_cadence\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"type\":\"max_billing_period_spend\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.Cadences.SpendModifierRules; + var cadenceSpendModifier = await service.ListAutoPagingAsync( + "cadence_id_123") + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/cadences/cadence_id_123/spend_modifier_rules"); + } + + [Fact] + public void TestV2BillingCadencesSpendModifierRuleGet2() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/cadences/cadence_id_123/spend_modifier_rules/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.cadence_spend_modifier\",\"billing_cadence\":\"billing_cadence\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"type\":\"max_billing_period_spend\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.Cadences.SpendModifierRules; + Stripe.V2.Billing.CadenceSpendModifier cadenceSpendModifier = service + .Get("cadence_id_123", "id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/cadences/cadence_id_123/spend_modifier_rules/id_123"); + } + + [Fact] + public async Task TestV2BillingCadencesSpendModifierRuleGet2Async() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/cadences/cadence_id_123/spend_modifier_rules/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.cadence_spend_modifier\",\"billing_cadence\":\"billing_cadence\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"type\":\"max_billing_period_spend\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.Cadences.SpendModifierRules; + Stripe.V2.Billing.CadenceSpendModifier cadenceSpendModifier = await service + .GetAsync("cadence_id_123", "id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/cadences/cadence_id_123/spend_modifier_rules/id_123"); + } + + [Fact] + public void TestV2BillingCollectionSettingGet() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/collection_settings", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.collection_setting\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"latest_version\":\"latest_version\",\"live_version\":\"live_version\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.CollectionSettings; + Stripe.V2.StripeList collectionSettings = service + .List(); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/collection_settings"); + } + + [Fact] + public async Task TestV2BillingCollectionSettingGetAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/collection_settings", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.collection_setting\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"latest_version\":\"latest_version\",\"live_version\":\"live_version\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.CollectionSettings; + Stripe.V2.StripeList collectionSettings = await service + .ListAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/collection_settings"); + } + + [Fact] + public void TestV2BillingCollectionSettingGetAutoPaging() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/collection_settings", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.collection_setting\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"latest_version\":\"latest_version\",\"live_version\":\"live_version\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.CollectionSettings; + var collectionSetting = service.ListAutoPaging().First(); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/collection_settings"); + } + + [Fact] + public async Task TestV2BillingCollectionSettingGetAutoPagingAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/collection_settings", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.collection_setting\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"latest_version\":\"latest_version\",\"live_version\":\"live_version\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.CollectionSettings; + var collectionSetting = await service.ListAutoPagingAsync() + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/collection_settings"); + } + + [Fact] + public void TestV2BillingCollectionSettingPost() { this.StubRequest( HttpMethod.Post, @@ -6452,6 +15810,24 @@ public void TestV2BillingCollectionSettingPost() "/v2/billing/collection_settings"); } + [Fact] + public async Task TestV2BillingCollectionSettingPostAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/collection_settings", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.collection_setting\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"latest_version\":\"latest_version\",\"live_version\":\"live_version\",\"livemode\":true}"); + var options = new Stripe.V2.Billing.CollectionSettingCreateOptions(); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.CollectionSettings; + Stripe.V2.Billing.CollectionSetting collectionSetting = await service + .CreateAsync(options); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/collection_settings"); + } + [Fact] public void TestV2BillingCollectionSettingGet2() { @@ -6469,6 +15845,23 @@ public void TestV2BillingCollectionSettingGet2() "/v2/billing/collection_settings/id_123"); } + [Fact] + public async Task TestV2BillingCollectionSettingGet2Async() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/collection_settings/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.collection_setting\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"latest_version\":\"latest_version\",\"live_version\":\"live_version\",\"livemode\":true}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.CollectionSettings; + Stripe.V2.Billing.CollectionSetting collectionSetting = await service + .GetAsync("id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/collection_settings/id_123"); + } + [Fact] public void TestV2BillingCollectionSettingPost2() { @@ -6487,6 +15880,24 @@ public void TestV2BillingCollectionSettingPost2() "/v2/billing/collection_settings/id_123"); } + [Fact] + public async Task TestV2BillingCollectionSettingPost2Async() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/collection_settings/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.collection_setting\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"latest_version\":\"latest_version\",\"live_version\":\"live_version\",\"livemode\":true}"); + var options = new Stripe.V2.Billing.CollectionSettingUpdateOptions(); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.CollectionSettings; + Stripe.V2.Billing.CollectionSetting collectionSetting = await service + .UpdateAsync("id_123", options); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/collection_settings/id_123"); + } + [Fact] public void TestV2BillingCollectionSettingsVersionGet() { @@ -6504,6 +15915,59 @@ public void TestV2BillingCollectionSettingsVersionGet() "/v2/billing/collection_settings/collection_setting_id_123/versions"); } + [Fact] + public async Task TestV2BillingCollectionSettingsVersionGetAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/collection_settings/collection_setting_id_123/versions", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.collection_setting_version\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.CollectionSettings.Versions; + Stripe.V2.StripeList collectionSettingVersions = await service + .ListAsync("collection_setting_id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/collection_settings/collection_setting_id_123/versions"); + } + + [Fact] + public void TestV2BillingCollectionSettingsVersionGetAutoPaging() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/collection_settings/collection_setting_id_123/versions", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.collection_setting_version\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.CollectionSettings.Versions; + var collectionSettingVersion = service.ListAutoPaging( + "collection_setting_id_123") + .First(); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/collection_settings/collection_setting_id_123/versions"); + } + + [Fact] + public async Task TestV2BillingCollectionSettingsVersionGetAutoPagingAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/collection_settings/collection_setting_id_123/versions", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.collection_setting_version\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.CollectionSettings.Versions; + var collectionSettingVersion = await service.ListAutoPagingAsync( + "collection_setting_id_123") + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/collection_settings/collection_setting_id_123/versions"); + } + [Fact] public void TestV2BillingCollectionSettingsVersionGet2() { @@ -6521,6 +15985,23 @@ public void TestV2BillingCollectionSettingsVersionGet2() "/v2/billing/collection_settings/collection_setting_id_123/versions/id_123"); } + [Fact] + public async Task TestV2BillingCollectionSettingsVersionGet2Async() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/collection_settings/collection_setting_id_123/versions/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.collection_setting_version\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.CollectionSettings.Versions; + Stripe.V2.Billing.CollectionSettingVersion collectionSettingVersion = await service + .GetAsync("collection_setting_id_123", "id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/collection_settings/collection_setting_id_123/versions/id_123"); + } + [Fact] public void TestV2BillingContractGet() { @@ -6536,6 +16017,49 @@ public void TestV2BillingContractGet() this.AssertRequest(HttpMethod.Get, "/v2/billing/contracts"); } + [Fact] + public async Task TestV2BillingContractGetAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/contracts", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.contract\",\"contract_line_details\":[{\"contract_line\":\"contract_line\",\"contract_line_value_details\":{\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"ends_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"overrides\":[{\"ends_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"starts_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"type\":\"service_action\"}],\"pricing\":{},\"starts_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"}}],\"contract_number\":\"contract_number\",\"contract_value_details\":{\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"customer\":\"customer\",\"id\":\"obj_123\",\"license_quantities\":[{\"license_pricing_id\":\"license_pricing_id\",\"license_pricing_type\":\"price\",\"pricing_line\":\"pricing_line\",\"quantity\":1285004149}],\"livemode\":true,\"pricing_lines\":[{\"ends_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"pricing\":{\"type\":\"price\"},\"pricing_line\":\"pricing_line\",\"starts_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"}}],\"pricing_overrides\":[{\"ends_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"pricing_override\":\"pricing_override\",\"priority\":1165461084,\"starts_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"type\":\"multiplier\"}],\"status\":\"draft\",\"status_details\":{}}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.Contracts; + Stripe.V2.StripeList contracts = await service + .ListAsync(); + this.AssertRequest(HttpMethod.Get, "/v2/billing/contracts"); + } + + [Fact] + public void TestV2BillingContractGetAutoPaging() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/contracts", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.contract\",\"contract_line_details\":[{\"contract_line\":\"contract_line\",\"contract_line_value_details\":{\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"ends_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"overrides\":[{\"ends_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"starts_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"type\":\"service_action\"}],\"pricing\":{},\"starts_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"}}],\"contract_number\":\"contract_number\",\"contract_value_details\":{\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"customer\":\"customer\",\"id\":\"obj_123\",\"license_quantities\":[{\"license_pricing_id\":\"license_pricing_id\",\"license_pricing_type\":\"price\",\"pricing_line\":\"pricing_line\",\"quantity\":1285004149}],\"livemode\":true,\"pricing_lines\":[{\"ends_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"pricing\":{\"type\":\"price\"},\"pricing_line\":\"pricing_line\",\"starts_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"}}],\"pricing_overrides\":[{\"ends_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"pricing_override\":\"pricing_override\",\"priority\":1165461084,\"starts_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"type\":\"multiplier\"}],\"status\":\"draft\",\"status_details\":{}}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.Contracts; + var contract = service.ListAutoPaging().First(); + this.AssertRequest(HttpMethod.Get, "/v2/billing/contracts"); + } + + [Fact] + public async Task TestV2BillingContractGetAutoPagingAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/contracts", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.contract\",\"contract_line_details\":[{\"contract_line\":\"contract_line\",\"contract_line_value_details\":{\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"ends_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"overrides\":[{\"ends_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"starts_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"type\":\"service_action\"}],\"pricing\":{},\"starts_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"}}],\"contract_number\":\"contract_number\",\"contract_value_details\":{\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"customer\":\"customer\",\"id\":\"obj_123\",\"license_quantities\":[{\"license_pricing_id\":\"license_pricing_id\",\"license_pricing_type\":\"price\",\"pricing_line\":\"pricing_line\",\"quantity\":1285004149}],\"livemode\":true,\"pricing_lines\":[{\"ends_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"pricing\":{\"type\":\"price\"},\"pricing_line\":\"pricing_line\",\"starts_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"}}],\"pricing_overrides\":[{\"ends_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"pricing_override\":\"pricing_override\",\"priority\":1165461084,\"starts_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"type\":\"multiplier\"}],\"status\":\"draft\",\"status_details\":{}}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.Contracts; + var contract = await service.ListAutoPagingAsync().FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v2/billing/contracts"); + } + [Fact] public void TestV2BillingContractPost() { @@ -6812,4168 +16336,10256 @@ public void TestV2BillingContractPost() } [Fact] - public void TestV2BillingContractGet2() + public async Task TestV2BillingContractPostAsync() { this.StubRequest( - HttpMethod.Get, - "/v2/billing/contracts/id_123", + HttpMethod.Post, + "/v2/billing/contracts", (HttpStatusCode)200, "{\"object\":\"v2.billing.contract\",\"contract_line_details\":[{\"contract_line\":\"contract_line\",\"contract_line_value_details\":{\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"ends_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"overrides\":[{\"ends_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"starts_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"type\":\"service_action\"}],\"pricing\":{},\"starts_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"}}],\"contract_number\":\"contract_number\",\"contract_value_details\":{\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"customer\":\"customer\",\"id\":\"obj_123\",\"license_quantities\":[{\"license_pricing_id\":\"license_pricing_id\",\"license_pricing_type\":\"price\",\"pricing_line\":\"pricing_line\",\"quantity\":1285004149}],\"livemode\":true,\"pricing_lines\":[{\"ends_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"pricing\":{\"type\":\"price\"},\"pricing_line\":\"pricing_line\",\"starts_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"}}],\"pricing_overrides\":[{\"ends_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"pricing_override\":\"pricing_override\",\"priority\":1165461084,\"starts_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"type\":\"multiplier\"}],\"status\":\"draft\",\"status_details\":{}}"); - var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.Contracts; - Stripe.V2.Billing.Contract contract = service.Get("id_123"); - this.AssertRequest(HttpMethod.Get, "/v2/billing/contracts/id_123"); - } - - [Fact] - public void TestV2BillingContractPost2() - { - this.StubRequest( + var options = new Stripe.V2.Billing.ContractCreateOptions + { + ContractLines = new List + { + new Stripe.V2.Billing.ContractCreateContractLineOptions + { + EndsAt = new Stripe.V2.Billing.ContractCreateContractLineEndsAtOptions + { + Timestamp = DateTimeOffset.Parse( + "1970-01-01T15:18:46.294Z") + .UtcDateTime, + }, + Metadata = new Dictionary + { + { "key", "metadata" }, + }, + Overrides = new List + { + new Stripe.V2.Billing.ContractCreateContractLineOverrideOptions + { + EndsAt = new Stripe.V2.Billing.ContractCreateContractLineOverrideEndsAtOptions + { + Timestamp = DateTimeOffset.Parse( + "1970-01-01T15:18:46.294Z") + .UtcDateTime, + }, + ServiceAction = new Stripe.V2.Billing.ContractCreateContractLineOverrideServiceActionOptions + { + Add = new Stripe.V2.Billing.ContractCreateContractLineOverrideServiceActionAddOptions + { + CreditGrant = new Stripe.V2.Billing.ContractCreateContractLineOverrideServiceActionAddCreditGrantOptions + { + Amount = new Stripe.V2.Billing.ContractCreateContractLineOverrideServiceActionAddCreditGrantAmountOptions + { + Monetary = new Stripe.V2.Amount + { + Value = 63, + Currency = "USD", + }, + Type = "monetary", + }, + ApplicabilityConfig = new Stripe.V2.Billing.ContractCreateContractLineOverrideServiceActionAddCreditGrantApplicabilityConfigOptions + { + Scope = new Stripe.V2.Billing.ContractCreateContractLineOverrideServiceActionAddCreditGrantApplicabilityConfigScopeOptions + { + BillableItems = new List + { + "billable_items", + }, + PriceType = "metered", + }, + }, + Category = "paid", + ExpiryConfig = new Stripe.V2.Billing.ContractCreateContractLineOverrideServiceActionAddCreditGrantExpiryConfigOptions + { + Type = "end_of_service_period", + }, + Name = "name", + Priority = 1165461084, + }, + ServiceInterval = "month", + ServiceIntervalCount = 1375336415, + Type = "credit_grant", + }, + Replace = new Stripe.V2.Billing.ContractCreateContractLineOverrideServiceActionReplaceOptions + { + CreditGrant = new Stripe.V2.Billing.ContractCreateContractLineOverrideServiceActionReplaceCreditGrantOptions + { + Amount = new Stripe.V2.Billing.ContractCreateContractLineOverrideServiceActionReplaceCreditGrantAmountOptions + { + Monetary = new Stripe.V2.Amount + { + Value = 63, + Currency = "USD", + }, + Type = "monetary", + }, + ApplicabilityConfig = new Stripe.V2.Billing.ContractCreateContractLineOverrideServiceActionReplaceCreditGrantApplicabilityConfigOptions + { + Scope = new Stripe.V2.Billing.ContractCreateContractLineOverrideServiceActionReplaceCreditGrantApplicabilityConfigScopeOptions + { + BillableItems = new List + { + "billable_items", + }, + PriceType = "metered", + }, + }, + Category = "paid", + ExpiryConfig = new Stripe.V2.Billing.ContractCreateContractLineOverrideServiceActionReplaceCreditGrantExpiryConfigOptions + { + Type = "end_of_service_period", + }, + Name = "name", + Priority = 1165461084, + }, + Id = "obj_123", + LookupKey = "lookup_key", + ServiceInterval = "month", + ServiceIntervalCount = 1375336415, + Type = "credit_grant", + }, + Type = "add", + }, + StartsAt = new Stripe.V2.Billing.ContractCreateContractLineOverrideStartsAtOptions + { + Timestamp = DateTimeOffset.Parse( + "1970-01-01T15:18:46.294Z") + .UtcDateTime, + }, + Type = "service_action", + }, + }, + Pricing = new Stripe.V2.Billing.ContractCreateContractLinePricingOptions(), + StartsAt = new Stripe.V2.Billing.ContractCreateContractLineStartsAtOptions + { + Timestamp = DateTimeOffset.Parse( + "1970-01-01T15:18:46.294Z") + .UtcDateTime, + }, + }, + }, + ContractNumber = "contract_number", + Currency = "usd", + LicenseQuantityActions = new List + { + new Stripe.V2.Billing.ContractCreateLicenseQuantityActionOptions + { + EffectiveAt = new Stripe.V2.Billing.ContractCreateLicenseQuantityActionEffectiveAtOptions + { + Timestamp = DateTimeOffset.Parse( + "1970-01-01T15:18:46.294Z") + .UtcDateTime, + Type = "timestamp", + }, + LicensePricingId = "license_pricing_id", + LicensePricingLookupKey = "license_pricing_lookup_key", + LicensePricingType = "price", + PricingLine = "pricing_line", + Set = new Stripe.V2.Billing.ContractCreateLicenseQuantityActionSetOptions + { + Quantity = 1285004149, + }, + Type = "set", + }, + }, + PricingLines = new List + { + new Stripe.V2.Billing.ContractCreatePricingLineOptions + { + EndsAt = new Stripe.V2.Billing.ContractCreatePricingLineEndsAtOptions + { + Timestamp = DateTimeOffset.Parse( + "1970-01-01T15:18:46.294Z") + .UtcDateTime, + Type = "contract_end", + }, + LookupKey = "lookup_key", + Metadata = new Dictionary + { + { "key", "metadata" }, + }, + Pricing = new Stripe.V2.Billing.ContractCreatePricingLinePricingOptions + { + PriceDetails = new Stripe.V2.Billing.ContractCreatePricingLinePricingPriceDetailsOptions + { + Price = "price", + Quantity = 1285004149, + }, + Type = "price", + }, + StartsAt = new Stripe.V2.Billing.ContractCreatePricingLineStartsAtOptions + { + Timestamp = DateTimeOffset.Parse( + "1970-01-01T15:18:46.294Z") + .UtcDateTime, + Type = "contract_start", + }, + }, + }, + PricingOverrides = new List + { + new Stripe.V2.Billing.ContractCreatePricingOverrideOptions + { + EndsAt = new Stripe.V2.Billing.ContractCreatePricingOverrideEndsAtOptions + { + Timestamp = DateTimeOffset.Parse( + "1970-01-01T15:18:46.294Z") + .UtcDateTime, + Type = "contract_end", + }, + LookupKey = "lookup_key", + Multiplier = new Stripe.V2.Billing.ContractCreatePricingOverrideMultiplierOptions + { + Criteria = new List + { + new Stripe.V2.Billing.ContractCreatePricingOverrideMultiplierCriterionOptions + { + BillableItemIds = new List + { + "billable_item_ids", + }, + BillableItemLookupKeys = new List + { + "billable_item_lookup_keys", + }, + BillableItemTypes = new List + { + "metered", + }, + MetadataConditions = new List + { + new Stripe.V2.Billing.ContractCreatePricingOverrideMultiplierCriterionMetadataConditionOptions + { + AllOf = new List + { + new Stripe.V2.Billing.ContractCreatePricingOverrideMultiplierCriterionMetadataConditionAllOfOptions + { + Key = "key", + Value = "value", + }, + }, + }, + }, + RateCardIds = new List + { + "rate_card_ids", + }, + Type = "exclude", + }, + }, + Factor = "factor", + }, + OverwritePrice = new Stripe.V2.Billing.ContractCreatePricingOverrideOverwritePriceOptions + { + Price = "price", + TieringMode = "graduated", + Tiers = new List + { + new Stripe.V2.Billing.ContractCreatePricingOverrideOverwritePriceTierOptions + { + FlatAmount = "flat_amount", + UnitAmount = "unit_amount", + UpToDecimal = 1387931359.3333333M, + UpToInf = "inf", + }, + }, + UnitAmount = "unit_amount", + }, + Priority = 1165461084, + StartsAt = new Stripe.V2.Billing.ContractCreatePricingOverrideStartsAtOptions + { + Timestamp = DateTimeOffset.Parse( + "1970-01-01T15:18:46.294Z") + .UtcDateTime, + Type = "contract_start", + }, + Type = "multiplier", + }, + }, + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.Contracts; + Stripe.V2.Billing.Contract contract = await service.CreateAsync( + options); + this.AssertRequest(HttpMethod.Post, "/v2/billing/contracts"); + } + + [Fact] + public void TestV2BillingContractGet2() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/contracts/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.contract\",\"contract_line_details\":[{\"contract_line\":\"contract_line\",\"contract_line_value_details\":{\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"ends_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"overrides\":[{\"ends_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"starts_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"type\":\"service_action\"}],\"pricing\":{},\"starts_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"}}],\"contract_number\":\"contract_number\",\"contract_value_details\":{\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"customer\":\"customer\",\"id\":\"obj_123\",\"license_quantities\":[{\"license_pricing_id\":\"license_pricing_id\",\"license_pricing_type\":\"price\",\"pricing_line\":\"pricing_line\",\"quantity\":1285004149}],\"livemode\":true,\"pricing_lines\":[{\"ends_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"pricing\":{\"type\":\"price\"},\"pricing_line\":\"pricing_line\",\"starts_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"}}],\"pricing_overrides\":[{\"ends_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"pricing_override\":\"pricing_override\",\"priority\":1165461084,\"starts_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"type\":\"multiplier\"}],\"status\":\"draft\",\"status_details\":{}}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.Contracts; + Stripe.V2.Billing.Contract contract = service.Get("id_123"); + this.AssertRequest(HttpMethod.Get, "/v2/billing/contracts/id_123"); + } + + [Fact] + public async Task TestV2BillingContractGet2Async() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/contracts/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.contract\",\"contract_line_details\":[{\"contract_line\":\"contract_line\",\"contract_line_value_details\":{\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"ends_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"overrides\":[{\"ends_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"starts_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"type\":\"service_action\"}],\"pricing\":{},\"starts_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"}}],\"contract_number\":\"contract_number\",\"contract_value_details\":{\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"customer\":\"customer\",\"id\":\"obj_123\",\"license_quantities\":[{\"license_pricing_id\":\"license_pricing_id\",\"license_pricing_type\":\"price\",\"pricing_line\":\"pricing_line\",\"quantity\":1285004149}],\"livemode\":true,\"pricing_lines\":[{\"ends_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"pricing\":{\"type\":\"price\"},\"pricing_line\":\"pricing_line\",\"starts_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"}}],\"pricing_overrides\":[{\"ends_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"pricing_override\":\"pricing_override\",\"priority\":1165461084,\"starts_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"type\":\"multiplier\"}],\"status\":\"draft\",\"status_details\":{}}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.Contracts; + Stripe.V2.Billing.Contract contract = await service.GetAsync( + "id_123"); + this.AssertRequest(HttpMethod.Get, "/v2/billing/contracts/id_123"); + } + + [Fact] + public void TestV2BillingContractPost2() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/contracts/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.contract\",\"contract_line_details\":[{\"contract_line\":\"contract_line\",\"contract_line_value_details\":{\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"ends_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"overrides\":[{\"ends_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"starts_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"type\":\"service_action\"}],\"pricing\":{},\"starts_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"}}],\"contract_number\":\"contract_number\",\"contract_value_details\":{\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"customer\":\"customer\",\"id\":\"obj_123\",\"license_quantities\":[{\"license_pricing_id\":\"license_pricing_id\",\"license_pricing_type\":\"price\",\"pricing_line\":\"pricing_line\",\"quantity\":1285004149}],\"livemode\":true,\"pricing_lines\":[{\"ends_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"pricing\":{\"type\":\"price\"},\"pricing_line\":\"pricing_line\",\"starts_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"}}],\"pricing_overrides\":[{\"ends_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"pricing_override\":\"pricing_override\",\"priority\":1165461084,\"starts_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"type\":\"multiplier\"}],\"status\":\"draft\",\"status_details\":{}}"); + var options = new Stripe.V2.Billing.ContractUpdateOptions(); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.Contracts; + Stripe.V2.Billing.Contract contract = service.Update( + "id_123", + options); + this.AssertRequest(HttpMethod.Post, "/v2/billing/contracts/id_123"); + } + + [Fact] + public async Task TestV2BillingContractPost2Async() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/contracts/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.contract\",\"contract_line_details\":[{\"contract_line\":\"contract_line\",\"contract_line_value_details\":{\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"ends_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"overrides\":[{\"ends_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"starts_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"type\":\"service_action\"}],\"pricing\":{},\"starts_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"}}],\"contract_number\":\"contract_number\",\"contract_value_details\":{\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"customer\":\"customer\",\"id\":\"obj_123\",\"license_quantities\":[{\"license_pricing_id\":\"license_pricing_id\",\"license_pricing_type\":\"price\",\"pricing_line\":\"pricing_line\",\"quantity\":1285004149}],\"livemode\":true,\"pricing_lines\":[{\"ends_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"pricing\":{\"type\":\"price\"},\"pricing_line\":\"pricing_line\",\"starts_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"}}],\"pricing_overrides\":[{\"ends_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"pricing_override\":\"pricing_override\",\"priority\":1165461084,\"starts_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"type\":\"multiplier\"}],\"status\":\"draft\",\"status_details\":{}}"); + var options = new Stripe.V2.Billing.ContractUpdateOptions(); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.Contracts; + Stripe.V2.Billing.Contract contract = await service.UpdateAsync( + "id_123", + options); + this.AssertRequest(HttpMethod.Post, "/v2/billing/contracts/id_123"); + } + + [Fact] + public void TestV2BillingContractPost3() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/contracts/id_123/activate", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.contract\",\"contract_line_details\":[{\"contract_line\":\"contract_line\",\"contract_line_value_details\":{\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"ends_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"overrides\":[{\"ends_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"starts_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"type\":\"service_action\"}],\"pricing\":{},\"starts_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"}}],\"contract_number\":\"contract_number\",\"contract_value_details\":{\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"customer\":\"customer\",\"id\":\"obj_123\",\"license_quantities\":[{\"license_pricing_id\":\"license_pricing_id\",\"license_pricing_type\":\"price\",\"pricing_line\":\"pricing_line\",\"quantity\":1285004149}],\"livemode\":true,\"pricing_lines\":[{\"ends_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"pricing\":{\"type\":\"price\"},\"pricing_line\":\"pricing_line\",\"starts_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"}}],\"pricing_overrides\":[{\"ends_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"pricing_override\":\"pricing_override\",\"priority\":1165461084,\"starts_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"type\":\"multiplier\"}],\"status\":\"draft\",\"status_details\":{}}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.Contracts; + Stripe.V2.Billing.Contract contract = service.Activate("id_123"); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/contracts/id_123/activate"); + } + + [Fact] + public async Task TestV2BillingContractPost3Async() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/contracts/id_123/activate", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.contract\",\"contract_line_details\":[{\"contract_line\":\"contract_line\",\"contract_line_value_details\":{\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"ends_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"overrides\":[{\"ends_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"starts_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"type\":\"service_action\"}],\"pricing\":{},\"starts_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"}}],\"contract_number\":\"contract_number\",\"contract_value_details\":{\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"customer\":\"customer\",\"id\":\"obj_123\",\"license_quantities\":[{\"license_pricing_id\":\"license_pricing_id\",\"license_pricing_type\":\"price\",\"pricing_line\":\"pricing_line\",\"quantity\":1285004149}],\"livemode\":true,\"pricing_lines\":[{\"ends_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"pricing\":{\"type\":\"price\"},\"pricing_line\":\"pricing_line\",\"starts_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"}}],\"pricing_overrides\":[{\"ends_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"pricing_override\":\"pricing_override\",\"priority\":1165461084,\"starts_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"type\":\"multiplier\"}],\"status\":\"draft\",\"status_details\":{}}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.Contracts; + Stripe.V2.Billing.Contract contract = await service.ActivateAsync( + "id_123"); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/contracts/id_123/activate"); + } + + [Fact] + public void TestV2BillingContractPost4() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/contracts/id_123/cancel", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.contract\",\"contract_line_details\":[{\"contract_line\":\"contract_line\",\"contract_line_value_details\":{\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"ends_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"overrides\":[{\"ends_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"starts_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"type\":\"service_action\"}],\"pricing\":{},\"starts_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"}}],\"contract_number\":\"contract_number\",\"contract_value_details\":{\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"customer\":\"customer\",\"id\":\"obj_123\",\"license_quantities\":[{\"license_pricing_id\":\"license_pricing_id\",\"license_pricing_type\":\"price\",\"pricing_line\":\"pricing_line\",\"quantity\":1285004149}],\"livemode\":true,\"pricing_lines\":[{\"ends_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"pricing\":{\"type\":\"price\"},\"pricing_line\":\"pricing_line\",\"starts_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"}}],\"pricing_overrides\":[{\"ends_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"pricing_override\":\"pricing_override\",\"priority\":1165461084,\"starts_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"type\":\"multiplier\"}],\"status\":\"draft\",\"status_details\":{}}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.Contracts; + Stripe.V2.Billing.Contract contract = service.Cancel("id_123"); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/contracts/id_123/cancel"); + } + + [Fact] + public async Task TestV2BillingContractPost4Async() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/contracts/id_123/cancel", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.contract\",\"contract_line_details\":[{\"contract_line\":\"contract_line\",\"contract_line_value_details\":{\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"ends_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"overrides\":[{\"ends_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"starts_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"type\":\"service_action\"}],\"pricing\":{},\"starts_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"}}],\"contract_number\":\"contract_number\",\"contract_value_details\":{\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"customer\":\"customer\",\"id\":\"obj_123\",\"license_quantities\":[{\"license_pricing_id\":\"license_pricing_id\",\"license_pricing_type\":\"price\",\"pricing_line\":\"pricing_line\",\"quantity\":1285004149}],\"livemode\":true,\"pricing_lines\":[{\"ends_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"pricing\":{\"type\":\"price\"},\"pricing_line\":\"pricing_line\",\"starts_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"}}],\"pricing_overrides\":[{\"ends_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"pricing_override\":\"pricing_override\",\"priority\":1165461084,\"starts_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"type\":\"multiplier\"}],\"status\":\"draft\",\"status_details\":{}}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.Contracts; + Stripe.V2.Billing.Contract contract = await service.CancelAsync( + "id_123"); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/contracts/id_123/cancel"); + } + + [Fact] + public void TestV2BillingContractsLicensePricingQuantityChangeGet() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/contracts/contract_id_123/license_pricing/license_pricing_id_123/quantity_changes", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.contract_license_pricing_quantity_change\",\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"license_pricing_id\":\"license_pricing_id\",\"license_pricing_type\":\"price\",\"livemode\":true,\"pricing_line\":\"pricing_line\",\"quantity\":1285004149}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client + .V2 + .Billing + .Contracts + .LicensePricing + .QuantityChanges; + Stripe.V2.StripeList contractLicensePricingQuantityChanges = service + .ListQuantityChanges( + "contract_id_123", + "license_pricing_id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/contracts/contract_id_123/license_pricing/license_pricing_id_123/quantity_changes"); + } + + [Fact] + public async Task TestV2BillingContractsLicensePricingQuantityChangeGetAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/contracts/contract_id_123/license_pricing/license_pricing_id_123/quantity_changes", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.contract_license_pricing_quantity_change\",\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"license_pricing_id\":\"license_pricing_id\",\"license_pricing_type\":\"price\",\"livemode\":true,\"pricing_line\":\"pricing_line\",\"quantity\":1285004149}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client + .V2 + .Billing + .Contracts + .LicensePricing + .QuantityChanges; + Stripe.V2.StripeList contractLicensePricingQuantityChanges = await service + .ListQuantityChangesAsync( + "contract_id_123", + "license_pricing_id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/contracts/contract_id_123/license_pricing/license_pricing_id_123/quantity_changes"); + } + + [Fact] + public void TestV2BillingContractsLicensePricingQuantityChangeGetAutoPaging() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/contracts/contract_id_123/license_pricing/license_pricing_id_123/quantity_changes", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.contract_license_pricing_quantity_change\",\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"license_pricing_id\":\"license_pricing_id\",\"license_pricing_type\":\"price\",\"livemode\":true,\"pricing_line\":\"pricing_line\",\"quantity\":1285004149}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client + .V2 + .Billing + .Contracts + .LicensePricing + .QuantityChanges; + var contractLicensePricingQuantityChange = service + .ListQuantityChangesAutoPaging( + "contract_id_123", + "license_pricing_id_123") + .First(); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/contracts/contract_id_123/license_pricing/license_pricing_id_123/quantity_changes"); + } + + [Fact] + public async Task TestV2BillingContractsLicensePricingQuantityChangeGetAutoPagingAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/contracts/contract_id_123/license_pricing/license_pricing_id_123/quantity_changes", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.contract_license_pricing_quantity_change\",\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"license_pricing_id\":\"license_pricing_id\",\"license_pricing_type\":\"price\",\"livemode\":true,\"pricing_line\":\"pricing_line\",\"quantity\":1285004149}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client + .V2 + .Billing + .Contracts + .LicensePricing + .QuantityChanges; + var contractLicensePricingQuantityChange = await service + .ListQuantityChangesAutoPagingAsync( + "contract_id_123", + "license_pricing_id_123") + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/contracts/contract_id_123/license_pricing/license_pricing_id_123/quantity_changes"); + } + + [Fact] + public void TestV2BillingCustomPricingUnitGet() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/custom_pricing_units", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.custom_pricing_unit\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.CustomPricingUnits; + Stripe.V2.StripeList customPricingUnits = service + .List(); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/custom_pricing_units"); + } + + [Fact] + public async Task TestV2BillingCustomPricingUnitGetAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/custom_pricing_units", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.custom_pricing_unit\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.CustomPricingUnits; + Stripe.V2.StripeList customPricingUnits = await service + .ListAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/custom_pricing_units"); + } + + [Fact] + public void TestV2BillingCustomPricingUnitGetAutoPaging() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/custom_pricing_units", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.custom_pricing_unit\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.CustomPricingUnits; + var customPricingUnit = service.ListAutoPaging().First(); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/custom_pricing_units"); + } + + [Fact] + public async Task TestV2BillingCustomPricingUnitGetAutoPagingAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/custom_pricing_units", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.custom_pricing_unit\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.CustomPricingUnits; + var customPricingUnit = await service.ListAutoPagingAsync() + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/custom_pricing_units"); + } + + [Fact] + public void TestV2BillingCustomPricingUnitPost() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/custom_pricing_units", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.custom_pricing_unit\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true}"); + var options = new Stripe.V2.Billing.CustomPricingUnitCreateOptions + { + DisplayName = "display_name", + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.CustomPricingUnits; + Stripe.V2.Billing.CustomPricingUnit customPricingUnit = service + .Create(options); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/custom_pricing_units"); + } + + [Fact] + public async Task TestV2BillingCustomPricingUnitPostAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/custom_pricing_units", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.custom_pricing_unit\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true}"); + var options = new Stripe.V2.Billing.CustomPricingUnitCreateOptions + { + DisplayName = "display_name", + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.CustomPricingUnits; + Stripe.V2.Billing.CustomPricingUnit customPricingUnit = await service + .CreateAsync(options); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/custom_pricing_units"); + } + + [Fact] + public void TestV2BillingCustomPricingUnitGet2() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/custom_pricing_units/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.custom_pricing_unit\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.CustomPricingUnits; + Stripe.V2.Billing.CustomPricingUnit customPricingUnit = service.Get( + "id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/custom_pricing_units/id_123"); + } + + [Fact] + public async Task TestV2BillingCustomPricingUnitGet2Async() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/custom_pricing_units/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.custom_pricing_unit\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.CustomPricingUnits; + Stripe.V2.Billing.CustomPricingUnit customPricingUnit = await service + .GetAsync("id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/custom_pricing_units/id_123"); + } + + [Fact] + public void TestV2BillingCustomPricingUnitPost2() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/custom_pricing_units/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.custom_pricing_unit\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true}"); + var options = new Stripe.V2.Billing.CustomPricingUnitUpdateOptions(); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.CustomPricingUnits; + Stripe.V2.Billing.CustomPricingUnit customPricingUnit = service + .Update("id_123", options); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/custom_pricing_units/id_123"); + } + + [Fact] + public async Task TestV2BillingCustomPricingUnitPost2Async() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/custom_pricing_units/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.custom_pricing_unit\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true}"); + var options = new Stripe.V2.Billing.CustomPricingUnitUpdateOptions(); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.CustomPricingUnits; + Stripe.V2.Billing.CustomPricingUnit customPricingUnit = await service + .UpdateAsync("id_123", options); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/custom_pricing_units/id_123"); + } + + [Fact] + public void TestV2BillingIntentGet() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/intents", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.intent\",\"amount_details\":{\"currency\":\"usd\",\"discount\":\"discount\",\"shipping\":\"shipping\",\"subtotal\":\"subtotal\",\"tax\":\"tax\",\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"draft\",\"status_transitions\":{\"expires_at\":\"1970-01-10T15:36:51.170Z\"}}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.Intents; + Stripe.V2.StripeList intents = service + .List(); + this.AssertRequest(HttpMethod.Get, "/v2/billing/intents"); + } + + [Fact] + public async Task TestV2BillingIntentGetAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/intents", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.intent\",\"amount_details\":{\"currency\":\"usd\",\"discount\":\"discount\",\"shipping\":\"shipping\",\"subtotal\":\"subtotal\",\"tax\":\"tax\",\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"draft\",\"status_transitions\":{\"expires_at\":\"1970-01-10T15:36:51.170Z\"}}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.Intents; + Stripe.V2.StripeList intents = await service + .ListAsync(); + this.AssertRequest(HttpMethod.Get, "/v2/billing/intents"); + } + + [Fact] + public void TestV2BillingIntentGetAutoPaging() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/intents", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.intent\",\"amount_details\":{\"currency\":\"usd\",\"discount\":\"discount\",\"shipping\":\"shipping\",\"subtotal\":\"subtotal\",\"tax\":\"tax\",\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"draft\",\"status_transitions\":{\"expires_at\":\"1970-01-10T15:36:51.170Z\"}}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.Intents; + var intent = service.ListAutoPaging().First(); + this.AssertRequest(HttpMethod.Get, "/v2/billing/intents"); + } + + [Fact] + public async Task TestV2BillingIntentGetAutoPagingAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/intents", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.intent\",\"amount_details\":{\"currency\":\"usd\",\"discount\":\"discount\",\"shipping\":\"shipping\",\"subtotal\":\"subtotal\",\"tax\":\"tax\",\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"draft\",\"status_transitions\":{\"expires_at\":\"1970-01-10T15:36:51.170Z\"}}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.Intents; + var intent = await service.ListAutoPagingAsync().FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v2/billing/intents"); + } + + [Fact] + public void TestV2BillingIntentPost() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/intents", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.intent\",\"amount_details\":{\"currency\":\"usd\",\"discount\":\"discount\",\"shipping\":\"shipping\",\"subtotal\":\"subtotal\",\"tax\":\"tax\",\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"draft\",\"status_transitions\":{\"expires_at\":\"1970-01-10T15:36:51.170Z\"}}"); + var options = new Stripe.V2.Billing.IntentCreateOptions + { + Actions = new List + { + new Stripe.V2.Billing.IntentCreateActionOptions + { + Apply = new Stripe.V2.Billing.IntentCreateActionApplyOptions + { + Discount = new Stripe.V2.Billing.IntentCreateActionApplyDiscountOptions + { + Coupon = "coupon", + PromotionCode = "promotion_code", + Type = "coupon", + }, + EffectiveAt = new Stripe.V2.Billing.IntentCreateActionApplyEffectiveAtOptions + { + Timestamp = DateTimeOffset.Parse( + "1970-01-01T15:18:46.294Z") + .UtcDateTime, + Type = "current_billing_period_end", + }, + InvoiceDiscountRule = new Stripe.V2.Billing.IntentCreateActionApplyInvoiceDiscountRuleOptions + { + AppliesTo = "cadence", + PercentOff = new Stripe.V2.Billing.IntentCreateActionApplyInvoiceDiscountRulePercentOffOptions + { + MaximumApplications = new Stripe.V2.Billing.IntentCreateActionApplyInvoiceDiscountRulePercentOffMaximumApplicationsOptions + { + Type = "indefinite", + }, + PercentOff = 991934883.3333334M, + }, + Type = "percent_off", + }, + SpendModifierRule = new Stripe.V2.Billing.IntentCreateActionApplySpendModifierRuleOptions + { + AppliesTo = "cadence", + MaxBillingPeriodSpend = new Stripe.V2.Billing.IntentCreateActionApplySpendModifierRuleMaxBillingPeriodSpendOptions + { + Amount = new Stripe.V2.Billing.IntentCreateActionApplySpendModifierRuleMaxBillingPeriodSpendAmountOptions + { + CustomPricingUnit = new Stripe.V2.Billing.IntentCreateActionApplySpendModifierRuleMaxBillingPeriodSpendAmountCustomPricingUnitOptions + { + Id = "obj_123", + Value = "value", + }, + Type = "custom_pricing_unit", + }, + CustomPricingUnitOverageRate = new Stripe.V2.Billing.IntentCreateActionApplySpendModifierRuleMaxBillingPeriodSpendCustomPricingUnitOverageRateOptions + { + Id = "obj_123", + }, + }, + Type = "max_billing_period_spend", + }, + Type = "discount", + }, + Deactivate = new Stripe.V2.Billing.IntentCreateActionDeactivateOptions + { + CancellationDetails = new Stripe.V2.Billing.IntentCreateActionDeactivateCancellationDetailsOptions + { + Comment = "comment", + Feedback = "other", + }, + CollectAt = "next_billing_date", + EffectiveAt = new Stripe.V2.Billing.IntentCreateActionDeactivateEffectiveAtOptions + { + Timestamp = DateTimeOffset.Parse( + "1970-01-01T15:18:46.294Z") + .UtcDateTime, + Type = "on_reserve", + }, + PricingPlanSubscriptionDetails = new Stripe.V2.Billing.IntentCreateActionDeactivatePricingPlanSubscriptionDetailsOptions + { + Overrides = new Stripe.V2.Billing.IntentCreateActionDeactivatePricingPlanSubscriptionDetailsOverridesOptions + { + PartialPeriodBehaviors = new List + { + new Stripe.V2.Billing.IntentCreateActionDeactivatePricingPlanSubscriptionDetailsOverridesPartialPeriodBehaviorOptions + { + LicenseFee = new Stripe.V2.Billing.IntentCreateActionDeactivatePricingPlanSubscriptionDetailsOverridesPartialPeriodBehaviorLicenseFeeOptions + { + CreditProrationBehavior = "prorated", + }, + Type = "license_fee", + }, + }, + }, + PricingPlanSubscription = "pricing_plan_subscription", + }, + Type = "pricing_plan_subscription_details", + }, + Modify = new Stripe.V2.Billing.IntentCreateActionModifyOptions + { + CollectAt = "next_billing_date", + EffectiveAt = new Stripe.V2.Billing.IntentCreateActionModifyEffectiveAtOptions + { + Timestamp = DateTimeOffset.Parse( + "1970-01-01T15:18:46.294Z") + .UtcDateTime, + Type = "current_billing_period_start", + }, + PricingPlanSubscriptionDetails = new Stripe.V2.Billing.IntentCreateActionModifyPricingPlanSubscriptionDetailsOptions + { + ComponentConfigurations = new List + { + new Stripe.V2.Billing.IntentCreateActionModifyPricingPlanSubscriptionDetailsComponentConfigurationOptions + { + LookupKey = "lookup_key", + PricingPlanComponent = "pricing_plan_component", + Quantity = 1285004149, + }, + }, + NewPricingPlan = "new_pricing_plan", + NewPricingPlanVersion = "new_pricing_plan_version", + Overrides = new Stripe.V2.Billing.IntentCreateActionModifyPricingPlanSubscriptionDetailsOverridesOptions + { + PartialPeriodBehaviors = new List + { + new Stripe.V2.Billing.IntentCreateActionModifyPricingPlanSubscriptionDetailsOverridesPartialPeriodBehaviorOptions + { + LicenseFee = new Stripe.V2.Billing.IntentCreateActionModifyPricingPlanSubscriptionDetailsOverridesPartialPeriodBehaviorLicenseFeeOptions + { + CreditProrationBehavior = "prorated", + DebitProrationBehavior = "none", + }, + RecurringCreditGrant = new Stripe.V2.Billing.IntentCreateActionModifyPricingPlanSubscriptionDetailsOverridesPartialPeriodBehaviorRecurringCreditGrantOptions + { + CreateBehavior = "none", + }, + Type = "license_fee", + }, + }, + }, + PricingPlanSubscription = "pricing_plan_subscription", + }, + Type = "pricing_plan_subscription_details", + }, + Remove = new Stripe.V2.Billing.IntentCreateActionRemoveOptions + { + EffectiveAt = new Stripe.V2.Billing.IntentCreateActionRemoveEffectiveAtOptions + { + Type = "current_billing_period_end", + }, + InvoiceDiscountRule = "invoice_discount_rule", + SpendModifierRule = "spend_modifier_rule", + Type = "invoice_discount_rule", + }, + Subscribe = new Stripe.V2.Billing.IntentCreateActionSubscribeOptions + { + CollectAt = "next_billing_date", + EffectiveAt = new Stripe.V2.Billing.IntentCreateActionSubscribeEffectiveAtOptions + { + Timestamp = DateTimeOffset.Parse( + "1970-01-01T15:18:46.294Z") + .UtcDateTime, + Type = "current_billing_period_start", + }, + PricingPlanSubscriptionDetails = new Stripe.V2.Billing.IntentCreateActionSubscribePricingPlanSubscriptionDetailsOptions + { + ComponentConfigurations = new List + { + new Stripe.V2.Billing.IntentCreateActionSubscribePricingPlanSubscriptionDetailsComponentConfigurationOptions + { + LookupKey = "lookup_key", + PricingPlanComponent = "pricing_plan_component", + Quantity = 1285004149, + }, + }, + Metadata = new Dictionary + { + { "key", "metadata" }, + }, + Overrides = new Stripe.V2.Billing.IntentCreateActionSubscribePricingPlanSubscriptionDetailsOverridesOptions + { + PartialPeriodBehaviors = new List + { + new Stripe.V2.Billing.IntentCreateActionSubscribePricingPlanSubscriptionDetailsOverridesPartialPeriodBehaviorOptions + { + LicenseFee = new Stripe.V2.Billing.IntentCreateActionSubscribePricingPlanSubscriptionDetailsOverridesPartialPeriodBehaviorLicenseFeeOptions + { + DebitProrationBehavior = "none", + }, + RecurringCreditGrant = new Stripe.V2.Billing.IntentCreateActionSubscribePricingPlanSubscriptionDetailsOverridesPartialPeriodBehaviorRecurringCreditGrantOptions + { + CreateBehavior = "none", + }, + Type = "license_fee", + }, + }, + }, + PricingPlan = "pricing_plan", + PricingPlanVersion = "pricing_plan_version", + }, + Type = "pricing_plan_subscription_details", + V1SubscriptionDetails = new Stripe.V2.Billing.IntentCreateActionSubscribeV1SubscriptionDetailsOptions + { + Description = "description", + Items = new List + { + new Stripe.V2.Billing.IntentCreateActionSubscribeV1SubscriptionDetailsItemOptions + { + Metadata = new Dictionary + { + { "key", "metadata" }, + }, + Price = "price", + Quantity = 1285004149, + }, + }, + Metadata = new Dictionary + { + { "key", "metadata" }, + }, + }, + }, + Type = "apply", + }, + }, + Currency = "usd", + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.Intents; + Stripe.V2.Billing.Intent intent = service.Create(options); + this.AssertRequest(HttpMethod.Post, "/v2/billing/intents"); + } + + [Fact] + public async Task TestV2BillingIntentPostAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/intents", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.intent\",\"amount_details\":{\"currency\":\"usd\",\"discount\":\"discount\",\"shipping\":\"shipping\",\"subtotal\":\"subtotal\",\"tax\":\"tax\",\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"draft\",\"status_transitions\":{\"expires_at\":\"1970-01-10T15:36:51.170Z\"}}"); + var options = new Stripe.V2.Billing.IntentCreateOptions + { + Actions = new List + { + new Stripe.V2.Billing.IntentCreateActionOptions + { + Apply = new Stripe.V2.Billing.IntentCreateActionApplyOptions + { + Discount = new Stripe.V2.Billing.IntentCreateActionApplyDiscountOptions + { + Coupon = "coupon", + PromotionCode = "promotion_code", + Type = "coupon", + }, + EffectiveAt = new Stripe.V2.Billing.IntentCreateActionApplyEffectiveAtOptions + { + Timestamp = DateTimeOffset.Parse( + "1970-01-01T15:18:46.294Z") + .UtcDateTime, + Type = "current_billing_period_end", + }, + InvoiceDiscountRule = new Stripe.V2.Billing.IntentCreateActionApplyInvoiceDiscountRuleOptions + { + AppliesTo = "cadence", + PercentOff = new Stripe.V2.Billing.IntentCreateActionApplyInvoiceDiscountRulePercentOffOptions + { + MaximumApplications = new Stripe.V2.Billing.IntentCreateActionApplyInvoiceDiscountRulePercentOffMaximumApplicationsOptions + { + Type = "indefinite", + }, + PercentOff = 991934883.3333334M, + }, + Type = "percent_off", + }, + SpendModifierRule = new Stripe.V2.Billing.IntentCreateActionApplySpendModifierRuleOptions + { + AppliesTo = "cadence", + MaxBillingPeriodSpend = new Stripe.V2.Billing.IntentCreateActionApplySpendModifierRuleMaxBillingPeriodSpendOptions + { + Amount = new Stripe.V2.Billing.IntentCreateActionApplySpendModifierRuleMaxBillingPeriodSpendAmountOptions + { + CustomPricingUnit = new Stripe.V2.Billing.IntentCreateActionApplySpendModifierRuleMaxBillingPeriodSpendAmountCustomPricingUnitOptions + { + Id = "obj_123", + Value = "value", + }, + Type = "custom_pricing_unit", + }, + CustomPricingUnitOverageRate = new Stripe.V2.Billing.IntentCreateActionApplySpendModifierRuleMaxBillingPeriodSpendCustomPricingUnitOverageRateOptions + { + Id = "obj_123", + }, + }, + Type = "max_billing_period_spend", + }, + Type = "discount", + }, + Deactivate = new Stripe.V2.Billing.IntentCreateActionDeactivateOptions + { + CancellationDetails = new Stripe.V2.Billing.IntentCreateActionDeactivateCancellationDetailsOptions + { + Comment = "comment", + Feedback = "other", + }, + CollectAt = "next_billing_date", + EffectiveAt = new Stripe.V2.Billing.IntentCreateActionDeactivateEffectiveAtOptions + { + Timestamp = DateTimeOffset.Parse( + "1970-01-01T15:18:46.294Z") + .UtcDateTime, + Type = "on_reserve", + }, + PricingPlanSubscriptionDetails = new Stripe.V2.Billing.IntentCreateActionDeactivatePricingPlanSubscriptionDetailsOptions + { + Overrides = new Stripe.V2.Billing.IntentCreateActionDeactivatePricingPlanSubscriptionDetailsOverridesOptions + { + PartialPeriodBehaviors = new List + { + new Stripe.V2.Billing.IntentCreateActionDeactivatePricingPlanSubscriptionDetailsOverridesPartialPeriodBehaviorOptions + { + LicenseFee = new Stripe.V2.Billing.IntentCreateActionDeactivatePricingPlanSubscriptionDetailsOverridesPartialPeriodBehaviorLicenseFeeOptions + { + CreditProrationBehavior = "prorated", + }, + Type = "license_fee", + }, + }, + }, + PricingPlanSubscription = "pricing_plan_subscription", + }, + Type = "pricing_plan_subscription_details", + }, + Modify = new Stripe.V2.Billing.IntentCreateActionModifyOptions + { + CollectAt = "next_billing_date", + EffectiveAt = new Stripe.V2.Billing.IntentCreateActionModifyEffectiveAtOptions + { + Timestamp = DateTimeOffset.Parse( + "1970-01-01T15:18:46.294Z") + .UtcDateTime, + Type = "current_billing_period_start", + }, + PricingPlanSubscriptionDetails = new Stripe.V2.Billing.IntentCreateActionModifyPricingPlanSubscriptionDetailsOptions + { + ComponentConfigurations = new List + { + new Stripe.V2.Billing.IntentCreateActionModifyPricingPlanSubscriptionDetailsComponentConfigurationOptions + { + LookupKey = "lookup_key", + PricingPlanComponent = "pricing_plan_component", + Quantity = 1285004149, + }, + }, + NewPricingPlan = "new_pricing_plan", + NewPricingPlanVersion = "new_pricing_plan_version", + Overrides = new Stripe.V2.Billing.IntentCreateActionModifyPricingPlanSubscriptionDetailsOverridesOptions + { + PartialPeriodBehaviors = new List + { + new Stripe.V2.Billing.IntentCreateActionModifyPricingPlanSubscriptionDetailsOverridesPartialPeriodBehaviorOptions + { + LicenseFee = new Stripe.V2.Billing.IntentCreateActionModifyPricingPlanSubscriptionDetailsOverridesPartialPeriodBehaviorLicenseFeeOptions + { + CreditProrationBehavior = "prorated", + DebitProrationBehavior = "none", + }, + RecurringCreditGrant = new Stripe.V2.Billing.IntentCreateActionModifyPricingPlanSubscriptionDetailsOverridesPartialPeriodBehaviorRecurringCreditGrantOptions + { + CreateBehavior = "none", + }, + Type = "license_fee", + }, + }, + }, + PricingPlanSubscription = "pricing_plan_subscription", + }, + Type = "pricing_plan_subscription_details", + }, + Remove = new Stripe.V2.Billing.IntentCreateActionRemoveOptions + { + EffectiveAt = new Stripe.V2.Billing.IntentCreateActionRemoveEffectiveAtOptions + { + Type = "current_billing_period_end", + }, + InvoiceDiscountRule = "invoice_discount_rule", + SpendModifierRule = "spend_modifier_rule", + Type = "invoice_discount_rule", + }, + Subscribe = new Stripe.V2.Billing.IntentCreateActionSubscribeOptions + { + CollectAt = "next_billing_date", + EffectiveAt = new Stripe.V2.Billing.IntentCreateActionSubscribeEffectiveAtOptions + { + Timestamp = DateTimeOffset.Parse( + "1970-01-01T15:18:46.294Z") + .UtcDateTime, + Type = "current_billing_period_start", + }, + PricingPlanSubscriptionDetails = new Stripe.V2.Billing.IntentCreateActionSubscribePricingPlanSubscriptionDetailsOptions + { + ComponentConfigurations = new List + { + new Stripe.V2.Billing.IntentCreateActionSubscribePricingPlanSubscriptionDetailsComponentConfigurationOptions + { + LookupKey = "lookup_key", + PricingPlanComponent = "pricing_plan_component", + Quantity = 1285004149, + }, + }, + Metadata = new Dictionary + { + { "key", "metadata" }, + }, + Overrides = new Stripe.V2.Billing.IntentCreateActionSubscribePricingPlanSubscriptionDetailsOverridesOptions + { + PartialPeriodBehaviors = new List + { + new Stripe.V2.Billing.IntentCreateActionSubscribePricingPlanSubscriptionDetailsOverridesPartialPeriodBehaviorOptions + { + LicenseFee = new Stripe.V2.Billing.IntentCreateActionSubscribePricingPlanSubscriptionDetailsOverridesPartialPeriodBehaviorLicenseFeeOptions + { + DebitProrationBehavior = "none", + }, + RecurringCreditGrant = new Stripe.V2.Billing.IntentCreateActionSubscribePricingPlanSubscriptionDetailsOverridesPartialPeriodBehaviorRecurringCreditGrantOptions + { + CreateBehavior = "none", + }, + Type = "license_fee", + }, + }, + }, + PricingPlan = "pricing_plan", + PricingPlanVersion = "pricing_plan_version", + }, + Type = "pricing_plan_subscription_details", + V1SubscriptionDetails = new Stripe.V2.Billing.IntentCreateActionSubscribeV1SubscriptionDetailsOptions + { + Description = "description", + Items = new List + { + new Stripe.V2.Billing.IntentCreateActionSubscribeV1SubscriptionDetailsItemOptions + { + Metadata = new Dictionary + { + { "key", "metadata" }, + }, + Price = "price", + Quantity = 1285004149, + }, + }, + Metadata = new Dictionary + { + { "key", "metadata" }, + }, + }, + }, + Type = "apply", + }, + }, + Currency = "usd", + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.Intents; + Stripe.V2.Billing.Intent intent = await service.CreateAsync( + options); + this.AssertRequest(HttpMethod.Post, "/v2/billing/intents"); + } + + [Fact] + public void TestV2BillingIntentGet2() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/intents/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.intent\",\"amount_details\":{\"currency\":\"usd\",\"discount\":\"discount\",\"shipping\":\"shipping\",\"subtotal\":\"subtotal\",\"tax\":\"tax\",\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"draft\",\"status_transitions\":{\"expires_at\":\"1970-01-10T15:36:51.170Z\"}}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.Intents; + Stripe.V2.Billing.Intent intent = service.Get("id_123"); + this.AssertRequest(HttpMethod.Get, "/v2/billing/intents/id_123"); + } + + [Fact] + public async Task TestV2BillingIntentGet2Async() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/intents/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.intent\",\"amount_details\":{\"currency\":\"usd\",\"discount\":\"discount\",\"shipping\":\"shipping\",\"subtotal\":\"subtotal\",\"tax\":\"tax\",\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"draft\",\"status_transitions\":{\"expires_at\":\"1970-01-10T15:36:51.170Z\"}}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.Intents; + Stripe.V2.Billing.Intent intent = await service.GetAsync("id_123"); + this.AssertRequest(HttpMethod.Get, "/v2/billing/intents/id_123"); + } + + [Fact] + public void TestV2BillingIntentPost2() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/intents/id_123/cancel", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.intent\",\"amount_details\":{\"currency\":\"usd\",\"discount\":\"discount\",\"shipping\":\"shipping\",\"subtotal\":\"subtotal\",\"tax\":\"tax\",\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"draft\",\"status_transitions\":{\"expires_at\":\"1970-01-10T15:36:51.170Z\"}}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.Intents; + Stripe.V2.Billing.Intent intent = service.Cancel("id_123"); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/intents/id_123/cancel"); + } + + [Fact] + public async Task TestV2BillingIntentPost2Async() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/intents/id_123/cancel", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.intent\",\"amount_details\":{\"currency\":\"usd\",\"discount\":\"discount\",\"shipping\":\"shipping\",\"subtotal\":\"subtotal\",\"tax\":\"tax\",\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"draft\",\"status_transitions\":{\"expires_at\":\"1970-01-10T15:36:51.170Z\"}}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.Intents; + Stripe.V2.Billing.Intent intent = await service.CancelAsync( + "id_123"); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/intents/id_123/cancel"); + } + + [Fact] + public void TestV2BillingIntentPost3() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/intents/id_123/commit", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.intent\",\"amount_details\":{\"currency\":\"usd\",\"discount\":\"discount\",\"shipping\":\"shipping\",\"subtotal\":\"subtotal\",\"tax\":\"tax\",\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"draft\",\"status_transitions\":{\"expires_at\":\"1970-01-10T15:36:51.170Z\"}}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.Intents; + Stripe.V2.Billing.Intent intent = service.Commit("id_123"); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/intents/id_123/commit"); + } + + [Fact] + public async Task TestV2BillingIntentPost3Async() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/intents/id_123/commit", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.intent\",\"amount_details\":{\"currency\":\"usd\",\"discount\":\"discount\",\"shipping\":\"shipping\",\"subtotal\":\"subtotal\",\"tax\":\"tax\",\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"draft\",\"status_transitions\":{\"expires_at\":\"1970-01-10T15:36:51.170Z\"}}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.Intents; + Stripe.V2.Billing.Intent intent = await service.CommitAsync( + "id_123"); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/intents/id_123/commit"); + } + + [Fact] + public void TestV2BillingIntentPost4() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/intents/id_123/release_reservation", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.intent\",\"amount_details\":{\"currency\":\"usd\",\"discount\":\"discount\",\"shipping\":\"shipping\",\"subtotal\":\"subtotal\",\"tax\":\"tax\",\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"draft\",\"status_transitions\":{\"expires_at\":\"1970-01-10T15:36:51.170Z\"}}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.Intents; + Stripe.V2.Billing.Intent intent = service.ReleaseReservation( + "id_123"); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/intents/id_123/release_reservation"); + } + + [Fact] + public async Task TestV2BillingIntentPost4Async() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/intents/id_123/release_reservation", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.intent\",\"amount_details\":{\"currency\":\"usd\",\"discount\":\"discount\",\"shipping\":\"shipping\",\"subtotal\":\"subtotal\",\"tax\":\"tax\",\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"draft\",\"status_transitions\":{\"expires_at\":\"1970-01-10T15:36:51.170Z\"}}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.Intents; + Stripe.V2.Billing.Intent intent = await service + .ReleaseReservationAsync("id_123"); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/intents/id_123/release_reservation"); + } + + [Fact] + public void TestV2BillingIntentPost5() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/intents/id_123/reserve", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.intent\",\"amount_details\":{\"currency\":\"usd\",\"discount\":\"discount\",\"shipping\":\"shipping\",\"subtotal\":\"subtotal\",\"tax\":\"tax\",\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"draft\",\"status_transitions\":{\"expires_at\":\"1970-01-10T15:36:51.170Z\"}}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.Intents; + Stripe.V2.Billing.Intent intent = service.Reserve("id_123"); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/intents/id_123/reserve"); + } + + [Fact] + public async Task TestV2BillingIntentPost5Async() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/intents/id_123/reserve", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.intent\",\"amount_details\":{\"currency\":\"usd\",\"discount\":\"discount\",\"shipping\":\"shipping\",\"subtotal\":\"subtotal\",\"tax\":\"tax\",\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"draft\",\"status_transitions\":{\"expires_at\":\"1970-01-10T15:36:51.170Z\"}}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.Intents; + Stripe.V2.Billing.Intent intent = await service.ReserveAsync( + "id_123"); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/intents/id_123/reserve"); + } + + [Fact] + public void TestV2BillingIntentsActionGet() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/intents/intent_id_123/actions", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.intent_action\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"type\":\"apply\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.Intents.Actions; + Stripe.V2.StripeList intentActions = service + .List("intent_id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/intents/intent_id_123/actions"); + } + + [Fact] + public async Task TestV2BillingIntentsActionGetAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/intents/intent_id_123/actions", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.intent_action\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"type\":\"apply\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.Intents.Actions; + Stripe.V2.StripeList intentActions = await service + .ListAsync("intent_id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/intents/intent_id_123/actions"); + } + + [Fact] + public void TestV2BillingIntentsActionGetAutoPaging() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/intents/intent_id_123/actions", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.intent_action\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"type\":\"apply\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.Intents.Actions; + var intentAction = service.ListAutoPaging("intent_id_123").First(); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/intents/intent_id_123/actions"); + } + + [Fact] + public async Task TestV2BillingIntentsActionGetAutoPagingAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/intents/intent_id_123/actions", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.intent_action\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"type\":\"apply\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.Intents.Actions; + var intentAction = await service.ListAutoPagingAsync( + "intent_id_123") + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/intents/intent_id_123/actions"); + } + + [Fact] + public void TestV2BillingIntentsActionGet2() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/intents/intent_id_123/actions/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.intent_action\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"type\":\"apply\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.Intents.Actions; + Stripe.V2.Billing.IntentAction intentAction = service.Get( + "intent_id_123", + "id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/intents/intent_id_123/actions/id_123"); + } + + [Fact] + public async Task TestV2BillingIntentsActionGet2Async() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/intents/intent_id_123/actions/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.intent_action\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"type\":\"apply\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.Intents.Actions; + Stripe.V2.Billing.IntentAction intentAction = await service + .GetAsync("intent_id_123", "id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/intents/intent_id_123/actions/id_123"); + } + + [Fact] + public void TestV2BillingLicenseFeeGet() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/license_fees", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.license_fee\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"licensed_item\":{\"object\":\"v2.billing.licensed_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true},\"live_version\":\"live_version\",\"livemode\":true,\"service_cycle\":{\"interval\":\"month\",\"interval_count\":797691627},\"tax_behavior\":\"exclusive\",\"tiers\":[{}]}],\"next_page_url\":null,\"previous_page_url\":null}", + "lookup_keys[0]=lookup_keys"); + var options = new Stripe.V2.Billing.LicenseFeeListOptions + { + LookupKeys = new List { "lookup_keys" }, + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.LicenseFees; + Stripe.V2.StripeList licenseFees = service + .List(options); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/license_fees", + "lookup_keys[0]=lookup_keys"); + } + + [Fact] + public async Task TestV2BillingLicenseFeeGetAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/license_fees", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.license_fee\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"licensed_item\":{\"object\":\"v2.billing.licensed_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true},\"live_version\":\"live_version\",\"livemode\":true,\"service_cycle\":{\"interval\":\"month\",\"interval_count\":797691627},\"tax_behavior\":\"exclusive\",\"tiers\":[{}]}],\"next_page_url\":null,\"previous_page_url\":null}", + "lookup_keys[0]=lookup_keys"); + var options = new Stripe.V2.Billing.LicenseFeeListOptions + { + LookupKeys = new List { "lookup_keys" }, + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.LicenseFees; + Stripe.V2.StripeList licenseFees = await service + .ListAsync(options); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/license_fees", + "lookup_keys[0]=lookup_keys"); + } + + [Fact] + public void TestV2BillingLicenseFeeGetAutoPaging() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/license_fees", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.license_fee\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"licensed_item\":{\"object\":\"v2.billing.licensed_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true},\"live_version\":\"live_version\",\"livemode\":true,\"service_cycle\":{\"interval\":\"month\",\"interval_count\":797691627},\"tax_behavior\":\"exclusive\",\"tiers\":[{}]}],\"next_page_url\":null,\"previous_page_url\":null}", + "lookup_keys[0]=lookup_keys"); + var options = new Stripe.V2.Billing.LicenseFeeListOptions + { + LookupKeys = new List { "lookup_keys" }, + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.LicenseFees; + var licenseFee = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/license_fees", + "lookup_keys[0]=lookup_keys"); + } + + [Fact] + public async Task TestV2BillingLicenseFeeGetAutoPagingAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/license_fees", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.license_fee\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"licensed_item\":{\"object\":\"v2.billing.licensed_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true},\"live_version\":\"live_version\",\"livemode\":true,\"service_cycle\":{\"interval\":\"month\",\"interval_count\":797691627},\"tax_behavior\":\"exclusive\",\"tiers\":[{}]}],\"next_page_url\":null,\"previous_page_url\":null}", + "lookup_keys[0]=lookup_keys"); + var options = new Stripe.V2.Billing.LicenseFeeListOptions + { + LookupKeys = new List { "lookup_keys" }, + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.LicenseFees; + var licenseFee = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/license_fees", + "lookup_keys[0]=lookup_keys"); + } + + [Fact] + public void TestV2BillingLicenseFeePost() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/license_fees", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.license_fee\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"licensed_item\":{\"object\":\"v2.billing.licensed_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true},\"live_version\":\"live_version\",\"livemode\":true,\"service_cycle\":{\"interval\":\"month\",\"interval_count\":797691627},\"tax_behavior\":\"exclusive\",\"tiers\":[{}]}"); + var options = new Stripe.V2.Billing.LicenseFeeCreateOptions + { + Currency = "usd", + DisplayName = "display_name", + LicensedItem = "licensed_item", + ServiceInterval = "month", + ServiceIntervalCount = 1375336415, + TaxBehavior = "exclusive", + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.LicenseFees; + Stripe.V2.Billing.LicenseFee licenseFee = service.Create(options); + this.AssertRequest(HttpMethod.Post, "/v2/billing/license_fees"); + } + + [Fact] + public async Task TestV2BillingLicenseFeePostAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/license_fees", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.license_fee\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"licensed_item\":{\"object\":\"v2.billing.licensed_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true},\"live_version\":\"live_version\",\"livemode\":true,\"service_cycle\":{\"interval\":\"month\",\"interval_count\":797691627},\"tax_behavior\":\"exclusive\",\"tiers\":[{}]}"); + var options = new Stripe.V2.Billing.LicenseFeeCreateOptions + { + Currency = "usd", + DisplayName = "display_name", + LicensedItem = "licensed_item", + ServiceInterval = "month", + ServiceIntervalCount = 1375336415, + TaxBehavior = "exclusive", + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.LicenseFees; + Stripe.V2.Billing.LicenseFee licenseFee = await service.CreateAsync( + options); + this.AssertRequest(HttpMethod.Post, "/v2/billing/license_fees"); + } + + [Fact] + public void TestV2BillingLicenseFeeGet2() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/license_fees/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.license_fee\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"licensed_item\":{\"object\":\"v2.billing.licensed_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true},\"live_version\":\"live_version\",\"livemode\":true,\"service_cycle\":{\"interval\":\"month\",\"interval_count\":797691627},\"tax_behavior\":\"exclusive\",\"tiers\":[{}]}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.LicenseFees; + Stripe.V2.Billing.LicenseFee licenseFee = service.Get("id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/license_fees/id_123"); + } + + [Fact] + public async Task TestV2BillingLicenseFeeGet2Async() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/license_fees/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.license_fee\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"licensed_item\":{\"object\":\"v2.billing.licensed_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true},\"live_version\":\"live_version\",\"livemode\":true,\"service_cycle\":{\"interval\":\"month\",\"interval_count\":797691627},\"tax_behavior\":\"exclusive\",\"tiers\":[{}]}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.LicenseFees; + Stripe.V2.Billing.LicenseFee licenseFee = await service.GetAsync( + "id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/license_fees/id_123"); + } + + [Fact] + public void TestV2BillingLicenseFeePost2() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/license_fees/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.license_fee\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"licensed_item\":{\"object\":\"v2.billing.licensed_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true},\"live_version\":\"live_version\",\"livemode\":true,\"service_cycle\":{\"interval\":\"month\",\"interval_count\":797691627},\"tax_behavior\":\"exclusive\",\"tiers\":[{}]}"); + var options = new Stripe.V2.Billing.LicenseFeeUpdateOptions(); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.LicenseFees; + Stripe.V2.Billing.LicenseFee licenseFee = service.Update( + "id_123", + options); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/license_fees/id_123"); + } + + [Fact] + public async Task TestV2BillingLicenseFeePost2Async() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/license_fees/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.license_fee\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"licensed_item\":{\"object\":\"v2.billing.licensed_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true},\"live_version\":\"live_version\",\"livemode\":true,\"service_cycle\":{\"interval\":\"month\",\"interval_count\":797691627},\"tax_behavior\":\"exclusive\",\"tiers\":[{}]}"); + var options = new Stripe.V2.Billing.LicenseFeeUpdateOptions(); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.LicenseFees; + Stripe.V2.Billing.LicenseFee licenseFee = await service.UpdateAsync( + "id_123", + options); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/license_fees/id_123"); + } + + [Fact] + public void TestV2BillingLicenseFeesVersionGet() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/license_fees/license_fee_id_123/versions", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.license_fee_version\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"license_fee_id\":\"license_fee_id\",\"livemode\":true,\"tiers\":[{}]}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.LicenseFees.Versions; + Stripe.V2.StripeList licenseFeeVersions = service + .List("license_fee_id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/license_fees/license_fee_id_123/versions"); + } + + [Fact] + public async Task TestV2BillingLicenseFeesVersionGetAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/license_fees/license_fee_id_123/versions", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.license_fee_version\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"license_fee_id\":\"license_fee_id\",\"livemode\":true,\"tiers\":[{}]}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.LicenseFees.Versions; + Stripe.V2.StripeList licenseFeeVersions = await service + .ListAsync("license_fee_id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/license_fees/license_fee_id_123/versions"); + } + + [Fact] + public void TestV2BillingLicenseFeesVersionGetAutoPaging() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/license_fees/license_fee_id_123/versions", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.license_fee_version\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"license_fee_id\":\"license_fee_id\",\"livemode\":true,\"tiers\":[{}]}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.LicenseFees.Versions; + var licenseFeeVersion = service.ListAutoPaging("license_fee_id_123") + .First(); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/license_fees/license_fee_id_123/versions"); + } + + [Fact] + public async Task TestV2BillingLicenseFeesVersionGetAutoPagingAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/license_fees/license_fee_id_123/versions", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.license_fee_version\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"license_fee_id\":\"license_fee_id\",\"livemode\":true,\"tiers\":[{}]}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.LicenseFees.Versions; + var licenseFeeVersion = await service.ListAutoPagingAsync( + "license_fee_id_123") + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/license_fees/license_fee_id_123/versions"); + } + + [Fact] + public void TestV2BillingLicenseFeesVersionGet2() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/license_fees/license_fee_id_123/versions/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.license_fee_version\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"license_fee_id\":\"license_fee_id\",\"livemode\":true,\"tiers\":[{}]}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.LicenseFees.Versions; + Stripe.V2.Billing.LicenseFeeVersion licenseFeeVersion = service.Get( + "license_fee_id_123", + "id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/license_fees/license_fee_id_123/versions/id_123"); + } + + [Fact] + public async Task TestV2BillingLicenseFeesVersionGet2Async() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/license_fees/license_fee_id_123/versions/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.license_fee_version\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"license_fee_id\":\"license_fee_id\",\"livemode\":true,\"tiers\":[{}]}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.LicenseFees.Versions; + Stripe.V2.Billing.LicenseFeeVersion licenseFeeVersion = await service + .GetAsync("license_fee_id_123", "id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/license_fees/license_fee_id_123/versions/id_123"); + } + + [Fact] + public void TestV2BillingLicensedItemGet() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/licensed_items", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.licensed_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.LicensedItems; + Stripe.V2.StripeList licensedItems = service + .List(); + this.AssertRequest(HttpMethod.Get, "/v2/billing/licensed_items"); + } + + [Fact] + public async Task TestV2BillingLicensedItemGetAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/licensed_items", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.licensed_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.LicensedItems; + Stripe.V2.StripeList licensedItems = await service + .ListAsync(); + this.AssertRequest(HttpMethod.Get, "/v2/billing/licensed_items"); + } + + [Fact] + public void TestV2BillingLicensedItemGetAutoPaging() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/licensed_items", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.licensed_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.LicensedItems; + var licensedItem = service.ListAutoPaging().First(); + this.AssertRequest(HttpMethod.Get, "/v2/billing/licensed_items"); + } + + [Fact] + public async Task TestV2BillingLicensedItemGetAutoPagingAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/licensed_items", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.licensed_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.LicensedItems; + var licensedItem = await service.ListAutoPagingAsync().FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v2/billing/licensed_items"); + } + + [Fact] + public void TestV2BillingLicensedItemPost() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/licensed_items", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.licensed_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true}"); + var options = new Stripe.V2.Billing.LicensedItemCreateOptions + { + DisplayName = "display_name", + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.LicensedItems; + Stripe.V2.Billing.LicensedItem licensedItem = service.Create( + options); + this.AssertRequest(HttpMethod.Post, "/v2/billing/licensed_items"); + } + + [Fact] + public async Task TestV2BillingLicensedItemPostAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/licensed_items", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.licensed_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true}"); + var options = new Stripe.V2.Billing.LicensedItemCreateOptions + { + DisplayName = "display_name", + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.LicensedItems; + Stripe.V2.Billing.LicensedItem licensedItem = await service + .CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v2/billing/licensed_items"); + } + + [Fact] + public void TestV2BillingLicensedItemGet2() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/licensed_items/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.licensed_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.LicensedItems; + Stripe.V2.Billing.LicensedItem licensedItem = service.Get("id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/licensed_items/id_123"); + } + + [Fact] + public async Task TestV2BillingLicensedItemGet2Async() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/licensed_items/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.licensed_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.LicensedItems; + Stripe.V2.Billing.LicensedItem licensedItem = await service + .GetAsync("id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/licensed_items/id_123"); + } + + [Fact] + public void TestV2BillingLicensedItemPost2() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/licensed_items/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.licensed_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true}"); + var options = new Stripe.V2.Billing.LicensedItemUpdateOptions(); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.LicensedItems; + Stripe.V2.Billing.LicensedItem licensedItem = service.Update( + "id_123", + options); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/licensed_items/id_123"); + } + + [Fact] + public async Task TestV2BillingLicensedItemPost2Async() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/licensed_items/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.licensed_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true}"); + var options = new Stripe.V2.Billing.LicensedItemUpdateOptions(); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.LicensedItems; + Stripe.V2.Billing.LicensedItem licensedItem = await service + .UpdateAsync("id_123", options); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/licensed_items/id_123"); + } + + [Fact] + public void TestV2BillingMeterEventPost() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/meter_events", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.meter_event\",\"created\":\"1970-01-12T21:42:34.472Z\",\"event_name\":\"event_name\",\"identifier\":\"identifier\",\"livemode\":true,\"payload\":{\"key\":\"payload\"},\"timestamp\":\"1970-01-01T15:18:46.294Z\"}"); + var options = new Stripe.V2.Billing.MeterEventCreateOptions + { + EventName = "event_name", + Payload = new Dictionary + { + { "key", "payload" }, + }, + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.MeterEvents; + Stripe.V2.Billing.MeterEvent meterEvent = service.Create(options); + this.AssertRequest(HttpMethod.Post, "/v2/billing/meter_events"); + } + + [Fact] + public async Task TestV2BillingMeterEventPostAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/meter_events", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.meter_event\",\"created\":\"1970-01-12T21:42:34.472Z\",\"event_name\":\"event_name\",\"identifier\":\"identifier\",\"livemode\":true,\"payload\":{\"key\":\"payload\"},\"timestamp\":\"1970-01-01T15:18:46.294Z\"}"); + var options = new Stripe.V2.Billing.MeterEventCreateOptions + { + EventName = "event_name", + Payload = new Dictionary + { + { "key", "payload" }, + }, + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.MeterEvents; + Stripe.V2.Billing.MeterEvent meterEvent = await service.CreateAsync( + options); + this.AssertRequest(HttpMethod.Post, "/v2/billing/meter_events"); + } + + [Fact] + public void TestV2BillingMeterEventAdjustmentPost() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/meter_event_adjustments", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.meter_event_adjustment\",\"cancel\":{\"identifier\":\"identifier\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"event_name\":\"event_name\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"complete\",\"type\":\"cancel\"}"); + var options = new Stripe.V2.Billing.MeterEventAdjustmentCreateOptions + { + Cancel = new Stripe.V2.Billing.MeterEventAdjustmentCreateCancelOptions + { + Identifier = "identifier", + }, + EventName = "event_name", + Type = "cancel", + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.MeterEventAdjustments; + Stripe.V2.Billing.MeterEventAdjustment meterEventAdjustment = service + .Create(options); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/meter_event_adjustments"); + } + + [Fact] + public async Task TestV2BillingMeterEventAdjustmentPostAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/meter_event_adjustments", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.meter_event_adjustment\",\"cancel\":{\"identifier\":\"identifier\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"event_name\":\"event_name\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"complete\",\"type\":\"cancel\"}"); + var options = new Stripe.V2.Billing.MeterEventAdjustmentCreateOptions + { + Cancel = new Stripe.V2.Billing.MeterEventAdjustmentCreateCancelOptions + { + Identifier = "identifier", + }, + EventName = "event_name", + Type = "cancel", + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.MeterEventAdjustments; + Stripe.V2.Billing.MeterEventAdjustment meterEventAdjustment = await service + .CreateAsync(options); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/meter_event_adjustments"); + } + + [Fact] + public void TestV2BillingMeterEventSessionPost() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/meter_event_session", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.meter_event_session\",\"authentication_token\":\"authentication_token\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true}"); + var options = new Stripe.V2.Billing.MeterEventSessionCreateOptions(); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.MeterEventSession; + Stripe.V2.Billing.MeterEventSession meterEventSession = service + .Create(options); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/meter_event_session"); + } + + [Fact] + public async Task TestV2BillingMeterEventSessionPostAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/meter_event_session", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.meter_event_session\",\"authentication_token\":\"authentication_token\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true}"); + var options = new Stripe.V2.Billing.MeterEventSessionCreateOptions(); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.MeterEventSession; + Stripe.V2.Billing.MeterEventSession meterEventSession = await service + .CreateAsync(options); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/meter_event_session"); + } + + [Fact] + public void TestV2BillingMeterEventStreamPost() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/meter_event_stream", + (HttpStatusCode)200, + "{}"); + var options = new Stripe.V2.Billing.MeterEventStreamCreateOptions + { + Events = new List + { + new Stripe.V2.Billing.MeterEventStreamCreateEventOptions + { + EventName = "event_name", + Identifier = "identifier", + Payload = new Dictionary + { + { "key", "payload" }, + }, + Timestamp = DateTimeOffset.Parse( + "1970-01-01T15:18:46.294Z") + .UtcDateTime, + }, + }, + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.MeterEventStream; + service.Create(options); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/meter_event_stream"); + } + + [Fact] + public async Task TestV2BillingMeterEventStreamPostAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/meter_event_stream", + (HttpStatusCode)200, + "{}"); + var options = new Stripe.V2.Billing.MeterEventStreamCreateOptions + { + Events = new List + { + new Stripe.V2.Billing.MeterEventStreamCreateEventOptions + { + EventName = "event_name", + Identifier = "identifier", + Payload = new Dictionary + { + { "key", "payload" }, + }, + Timestamp = DateTimeOffset.Parse( + "1970-01-01T15:18:46.294Z") + .UtcDateTime, + }, + }, + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.MeterEventStream; + await service.CreateAsync(options); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/meter_event_stream"); + } + + [Fact] + public void TestV2BillingMeteredItemGet() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/metered_items", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.metered_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"invoice_presentation_dimensions\":[\"invoice_presentation_dimensions\"],\"livemode\":true,\"meter\":\"meter\",\"meter_segment_conditions\":[{\"dimension\":\"dimension\",\"value\":\"value\"}]}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.MeteredItems; + Stripe.V2.StripeList meteredItems = service + .List(); + this.AssertRequest(HttpMethod.Get, "/v2/billing/metered_items"); + } + + [Fact] + public async Task TestV2BillingMeteredItemGetAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/metered_items", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.metered_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"invoice_presentation_dimensions\":[\"invoice_presentation_dimensions\"],\"livemode\":true,\"meter\":\"meter\",\"meter_segment_conditions\":[{\"dimension\":\"dimension\",\"value\":\"value\"}]}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.MeteredItems; + Stripe.V2.StripeList meteredItems = await service + .ListAsync(); + this.AssertRequest(HttpMethod.Get, "/v2/billing/metered_items"); + } + + [Fact] + public void TestV2BillingMeteredItemGetAutoPaging() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/metered_items", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.metered_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"invoice_presentation_dimensions\":[\"invoice_presentation_dimensions\"],\"livemode\":true,\"meter\":\"meter\",\"meter_segment_conditions\":[{\"dimension\":\"dimension\",\"value\":\"value\"}]}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.MeteredItems; + var meteredItem = service.ListAutoPaging().First(); + this.AssertRequest(HttpMethod.Get, "/v2/billing/metered_items"); + } + + [Fact] + public async Task TestV2BillingMeteredItemGetAutoPagingAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/metered_items", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.metered_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"invoice_presentation_dimensions\":[\"invoice_presentation_dimensions\"],\"livemode\":true,\"meter\":\"meter\",\"meter_segment_conditions\":[{\"dimension\":\"dimension\",\"value\":\"value\"}]}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.MeteredItems; + var meteredItem = await service.ListAutoPagingAsync().FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v2/billing/metered_items"); + } + + [Fact] + public void TestV2BillingMeteredItemPost() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/metered_items", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.metered_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"invoice_presentation_dimensions\":[\"invoice_presentation_dimensions\"],\"livemode\":true,\"meter\":\"meter\",\"meter_segment_conditions\":[{\"dimension\":\"dimension\",\"value\":\"value\"}]}"); + var options = new Stripe.V2.Billing.MeteredItemCreateOptions + { + DisplayName = "display_name", + Meter = "meter", + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.MeteredItems; + Stripe.V2.Billing.MeteredItem meteredItem = service.Create(options); + this.AssertRequest(HttpMethod.Post, "/v2/billing/metered_items"); + } + + [Fact] + public async Task TestV2BillingMeteredItemPostAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/metered_items", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.metered_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"invoice_presentation_dimensions\":[\"invoice_presentation_dimensions\"],\"livemode\":true,\"meter\":\"meter\",\"meter_segment_conditions\":[{\"dimension\":\"dimension\",\"value\":\"value\"}]}"); + var options = new Stripe.V2.Billing.MeteredItemCreateOptions + { + DisplayName = "display_name", + Meter = "meter", + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.MeteredItems; + Stripe.V2.Billing.MeteredItem meteredItem = await service + .CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v2/billing/metered_items"); + } + + [Fact] + public void TestV2BillingMeteredItemGet2() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/metered_items/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.metered_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"invoice_presentation_dimensions\":[\"invoice_presentation_dimensions\"],\"livemode\":true,\"meter\":\"meter\",\"meter_segment_conditions\":[{\"dimension\":\"dimension\",\"value\":\"value\"}]}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.MeteredItems; + Stripe.V2.Billing.MeteredItem meteredItem = service.Get("id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/metered_items/id_123"); + } + + [Fact] + public async Task TestV2BillingMeteredItemGet2Async() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/metered_items/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.metered_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"invoice_presentation_dimensions\":[\"invoice_presentation_dimensions\"],\"livemode\":true,\"meter\":\"meter\",\"meter_segment_conditions\":[{\"dimension\":\"dimension\",\"value\":\"value\"}]}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.MeteredItems; + Stripe.V2.Billing.MeteredItem meteredItem = await service.GetAsync( + "id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/metered_items/id_123"); + } + + [Fact] + public void TestV2BillingMeteredItemPost2() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/metered_items/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.metered_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"invoice_presentation_dimensions\":[\"invoice_presentation_dimensions\"],\"livemode\":true,\"meter\":\"meter\",\"meter_segment_conditions\":[{\"dimension\":\"dimension\",\"value\":\"value\"}]}"); + var options = new Stripe.V2.Billing.MeteredItemUpdateOptions(); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.MeteredItems; + Stripe.V2.Billing.MeteredItem meteredItem = service.Update( + "id_123", + options); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/metered_items/id_123"); + } + + [Fact] + public async Task TestV2BillingMeteredItemPost2Async() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/metered_items/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.metered_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"invoice_presentation_dimensions\":[\"invoice_presentation_dimensions\"],\"livemode\":true,\"meter\":\"meter\",\"meter_segment_conditions\":[{\"dimension\":\"dimension\",\"value\":\"value\"}]}"); + var options = new Stripe.V2.Billing.MeteredItemUpdateOptions(); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.MeteredItems; + Stripe.V2.Billing.MeteredItem meteredItem = await service + .UpdateAsync("id_123", options); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/metered_items/id_123"); + } + + [Fact] + public void TestV2BillingOneTimeItemGet() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/one_time_items", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.one_time_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.OneTimeItems; + Stripe.V2.StripeList oneTimeItems = service + .List(); + this.AssertRequest(HttpMethod.Get, "/v2/billing/one_time_items"); + } + + [Fact] + public async Task TestV2BillingOneTimeItemGetAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/one_time_items", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.one_time_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.OneTimeItems; + Stripe.V2.StripeList oneTimeItems = await service + .ListAsync(); + this.AssertRequest(HttpMethod.Get, "/v2/billing/one_time_items"); + } + + [Fact] + public void TestV2BillingOneTimeItemGetAutoPaging() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/one_time_items", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.one_time_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.OneTimeItems; + var oneTimeItem = service.ListAutoPaging().First(); + this.AssertRequest(HttpMethod.Get, "/v2/billing/one_time_items"); + } + + [Fact] + public async Task TestV2BillingOneTimeItemGetAutoPagingAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/one_time_items", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.one_time_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.OneTimeItems; + var oneTimeItem = await service.ListAutoPagingAsync().FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v2/billing/one_time_items"); + } + + [Fact] + public void TestV2BillingOneTimeItemPost() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/one_time_items", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.one_time_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true}"); + var options = new Stripe.V2.Billing.OneTimeItemCreateOptions + { + DisplayName = "display_name", + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.OneTimeItems; + Stripe.V2.Billing.OneTimeItem oneTimeItem = service.Create(options); + this.AssertRequest(HttpMethod.Post, "/v2/billing/one_time_items"); + } + + [Fact] + public async Task TestV2BillingOneTimeItemPostAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/one_time_items", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.one_time_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true}"); + var options = new Stripe.V2.Billing.OneTimeItemCreateOptions + { + DisplayName = "display_name", + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.OneTimeItems; + Stripe.V2.Billing.OneTimeItem oneTimeItem = await service + .CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v2/billing/one_time_items"); + } + + [Fact] + public void TestV2BillingOneTimeItemGet2() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/one_time_items/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.one_time_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.OneTimeItems; + Stripe.V2.Billing.OneTimeItem oneTimeItem = service.Get("id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/one_time_items/id_123"); + } + + [Fact] + public async Task TestV2BillingOneTimeItemGet2Async() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/one_time_items/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.one_time_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.OneTimeItems; + Stripe.V2.Billing.OneTimeItem oneTimeItem = await service.GetAsync( + "id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/one_time_items/id_123"); + } + + [Fact] + public void TestV2BillingOneTimeItemPost2() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/one_time_items/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.one_time_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true}"); + var options = new Stripe.V2.Billing.OneTimeItemUpdateOptions(); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.OneTimeItems; + Stripe.V2.Billing.OneTimeItem oneTimeItem = service.Update( + "id_123", + options); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/one_time_items/id_123"); + } + + [Fact] + public async Task TestV2BillingOneTimeItemPost2Async() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/one_time_items/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.one_time_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true}"); + var options = new Stripe.V2.Billing.OneTimeItemUpdateOptions(); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.OneTimeItems; + Stripe.V2.Billing.OneTimeItem oneTimeItem = await service + .UpdateAsync("id_123", options); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/one_time_items/id_123"); + } + + [Fact] + public void TestV2BillingPricingPlanGet() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/pricing_plans", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.pricing_plan\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true,\"tax_behavior\":\"exclusive\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.PricingPlans; + Stripe.V2.StripeList pricingPlans = service + .List(); + this.AssertRequest(HttpMethod.Get, "/v2/billing/pricing_plans"); + } + + [Fact] + public async Task TestV2BillingPricingPlanGetAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/pricing_plans", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.pricing_plan\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true,\"tax_behavior\":\"exclusive\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.PricingPlans; + Stripe.V2.StripeList pricingPlans = await service + .ListAsync(); + this.AssertRequest(HttpMethod.Get, "/v2/billing/pricing_plans"); + } + + [Fact] + public void TestV2BillingPricingPlanGetAutoPaging() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/pricing_plans", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.pricing_plan\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true,\"tax_behavior\":\"exclusive\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.PricingPlans; + var pricingPlan = service.ListAutoPaging().First(); + this.AssertRequest(HttpMethod.Get, "/v2/billing/pricing_plans"); + } + + [Fact] + public async Task TestV2BillingPricingPlanGetAutoPagingAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/pricing_plans", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.pricing_plan\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true,\"tax_behavior\":\"exclusive\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.PricingPlans; + var pricingPlan = await service.ListAutoPagingAsync().FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v2/billing/pricing_plans"); + } + + [Fact] + public void TestV2BillingPricingPlanPost() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/pricing_plans", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.pricing_plan\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true,\"tax_behavior\":\"exclusive\"}"); + var options = new Stripe.V2.Billing.PricingPlanCreateOptions + { + Currency = "usd", + DisplayName = "display_name", + TaxBehavior = "exclusive", + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.PricingPlans; + Stripe.V2.Billing.PricingPlan pricingPlan = service.Create(options); + this.AssertRequest(HttpMethod.Post, "/v2/billing/pricing_plans"); + } + + [Fact] + public async Task TestV2BillingPricingPlanPostAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/pricing_plans", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.pricing_plan\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true,\"tax_behavior\":\"exclusive\"}"); + var options = new Stripe.V2.Billing.PricingPlanCreateOptions + { + Currency = "usd", + DisplayName = "display_name", + TaxBehavior = "exclusive", + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.PricingPlans; + Stripe.V2.Billing.PricingPlan pricingPlan = await service + .CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v2/billing/pricing_plans"); + } + + [Fact] + public void TestV2BillingPricingPlanGet2() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/pricing_plans/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.pricing_plan\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true,\"tax_behavior\":\"exclusive\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.PricingPlans; + Stripe.V2.Billing.PricingPlan pricingPlan = service.Get("id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/pricing_plans/id_123"); + } + + [Fact] + public async Task TestV2BillingPricingPlanGet2Async() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/pricing_plans/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.pricing_plan\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true,\"tax_behavior\":\"exclusive\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.PricingPlans; + Stripe.V2.Billing.PricingPlan pricingPlan = await service.GetAsync( + "id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/pricing_plans/id_123"); + } + + [Fact] + public void TestV2BillingPricingPlanPost2() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/pricing_plans/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.pricing_plan\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true,\"tax_behavior\":\"exclusive\"}"); + var options = new Stripe.V2.Billing.PricingPlanUpdateOptions(); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.PricingPlans; + Stripe.V2.Billing.PricingPlan pricingPlan = service.Update( + "id_123", + options); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/pricing_plans/id_123"); + } + + [Fact] + public async Task TestV2BillingPricingPlanPost2Async() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/pricing_plans/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.pricing_plan\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true,\"tax_behavior\":\"exclusive\"}"); + var options = new Stripe.V2.Billing.PricingPlanUpdateOptions(); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.PricingPlans; + Stripe.V2.Billing.PricingPlan pricingPlan = await service + .UpdateAsync("id_123", options); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/pricing_plans/id_123"); + } + + [Fact] + public void TestV2BillingPricingPlansComponentGet() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/pricing_plans/pricing_plan_id_123/components", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.pricing_plan_component\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"pricing_plan\":\"pricing_plan\",\"pricing_plan_version\":\"pricing_plan_version\",\"type\":\"license_fee\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.PricingPlans.Components; + Stripe.V2.StripeList pricingPlanComponents = service + .List("pricing_plan_id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/pricing_plans/pricing_plan_id_123/components"); + } + + [Fact] + public async Task TestV2BillingPricingPlansComponentGetAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/pricing_plans/pricing_plan_id_123/components", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.pricing_plan_component\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"pricing_plan\":\"pricing_plan\",\"pricing_plan_version\":\"pricing_plan_version\",\"type\":\"license_fee\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.PricingPlans.Components; + Stripe.V2.StripeList pricingPlanComponents = await service + .ListAsync("pricing_plan_id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/pricing_plans/pricing_plan_id_123/components"); + } + + [Fact] + public void TestV2BillingPricingPlansComponentGetAutoPaging() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/pricing_plans/pricing_plan_id_123/components", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.pricing_plan_component\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"pricing_plan\":\"pricing_plan\",\"pricing_plan_version\":\"pricing_plan_version\",\"type\":\"license_fee\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.PricingPlans.Components; + var pricingPlanComponent = service.ListAutoPaging( + "pricing_plan_id_123") + .First(); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/pricing_plans/pricing_plan_id_123/components"); + } + + [Fact] + public async Task TestV2BillingPricingPlansComponentGetAutoPagingAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/pricing_plans/pricing_plan_id_123/components", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.pricing_plan_component\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"pricing_plan\":\"pricing_plan\",\"pricing_plan_version\":\"pricing_plan_version\",\"type\":\"license_fee\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.PricingPlans.Components; + var pricingPlanComponent = await service.ListAutoPagingAsync( + "pricing_plan_id_123") + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/pricing_plans/pricing_plan_id_123/components"); + } + + [Fact] + public void TestV2BillingPricingPlansComponentPost() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/pricing_plans/pricing_plan_id_123/components", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.pricing_plan_component\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"pricing_plan\":\"pricing_plan\",\"pricing_plan_version\":\"pricing_plan_version\",\"type\":\"license_fee\"}"); + var options = new Stripe.V2.Billing.PricingPlans.ComponentCreateOptions + { + Type = "license_fee", + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.PricingPlans.Components; + Stripe.V2.Billing.PricingPlanComponent pricingPlanComponent = service + .Create("pricing_plan_id_123", options); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/pricing_plans/pricing_plan_id_123/components"); + } + + [Fact] + public async Task TestV2BillingPricingPlansComponentPostAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/pricing_plans/pricing_plan_id_123/components", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.pricing_plan_component\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"pricing_plan\":\"pricing_plan\",\"pricing_plan_version\":\"pricing_plan_version\",\"type\":\"license_fee\"}"); + var options = new Stripe.V2.Billing.PricingPlans.ComponentCreateOptions + { + Type = "license_fee", + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.PricingPlans.Components; + Stripe.V2.Billing.PricingPlanComponent pricingPlanComponent = await service + .CreateAsync("pricing_plan_id_123", options); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/pricing_plans/pricing_plan_id_123/components"); + } + + [Fact] + public void TestV2BillingPricingPlansComponentDelete() + { + this.StubRequest( + HttpMethod.Delete, + "/v2/billing/pricing_plans/pricing_plan_id_123/components/id_123", + (HttpStatusCode)200, + "{\"id\":\"abc_123\",\"object\":\"some.object.tag\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.PricingPlans.Components; + Stripe.V2.DeletedObject deleted = service.Delete( + "pricing_plan_id_123", + "id_123"); + this.AssertRequest( + HttpMethod.Delete, + "/v2/billing/pricing_plans/pricing_plan_id_123/components/id_123"); + } + + [Fact] + public async Task TestV2BillingPricingPlansComponentDeleteAsync() + { + this.StubRequest( + HttpMethod.Delete, + "/v2/billing/pricing_plans/pricing_plan_id_123/components/id_123", + (HttpStatusCode)200, + "{\"id\":\"abc_123\",\"object\":\"some.object.tag\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.PricingPlans.Components; + Stripe.V2.DeletedObject deleted = await service.DeleteAsync( + "pricing_plan_id_123", + "id_123"); + this.AssertRequest( + HttpMethod.Delete, + "/v2/billing/pricing_plans/pricing_plan_id_123/components/id_123"); + } + + [Fact] + public void TestV2BillingPricingPlansComponentGet2() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/pricing_plans/pricing_plan_id_123/components/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.pricing_plan_component\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"pricing_plan\":\"pricing_plan\",\"pricing_plan_version\":\"pricing_plan_version\",\"type\":\"license_fee\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.PricingPlans.Components; + Stripe.V2.Billing.PricingPlanComponent pricingPlanComponent = service + .Get("pricing_plan_id_123", "id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/pricing_plans/pricing_plan_id_123/components/id_123"); + } + + [Fact] + public async Task TestV2BillingPricingPlansComponentGet2Async() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/pricing_plans/pricing_plan_id_123/components/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.pricing_plan_component\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"pricing_plan\":\"pricing_plan\",\"pricing_plan_version\":\"pricing_plan_version\",\"type\":\"license_fee\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.PricingPlans.Components; + Stripe.V2.Billing.PricingPlanComponent pricingPlanComponent = await service + .GetAsync("pricing_plan_id_123", "id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/pricing_plans/pricing_plan_id_123/components/id_123"); + } + + [Fact] + public void TestV2BillingPricingPlansComponentPost2() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/pricing_plans/pricing_plan_id_123/components/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.pricing_plan_component\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"pricing_plan\":\"pricing_plan\",\"pricing_plan_version\":\"pricing_plan_version\",\"type\":\"license_fee\"}"); + var options = new Stripe.V2.Billing.PricingPlans.ComponentUpdateOptions(); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.PricingPlans.Components; + Stripe.V2.Billing.PricingPlanComponent pricingPlanComponent = service + .Update("pricing_plan_id_123", "id_123", options); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/pricing_plans/pricing_plan_id_123/components/id_123"); + } + + [Fact] + public async Task TestV2BillingPricingPlansComponentPost2Async() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/pricing_plans/pricing_plan_id_123/components/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.pricing_plan_component\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"pricing_plan\":\"pricing_plan\",\"pricing_plan_version\":\"pricing_plan_version\",\"type\":\"license_fee\"}"); + var options = new Stripe.V2.Billing.PricingPlans.ComponentUpdateOptions(); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.PricingPlans.Components; + Stripe.V2.Billing.PricingPlanComponent pricingPlanComponent = await service + .UpdateAsync("pricing_plan_id_123", "id_123", options); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/pricing_plans/pricing_plan_id_123/components/id_123"); + } + + [Fact] + public void TestV2BillingPricingPlansVersionGet() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/pricing_plans/pricing_plan_id_123/versions", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.pricing_plan_version\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"pricing_plan\":\"pricing_plan\",\"start_date\":\"1970-01-19T05:07:09.589Z\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.PricingPlans.Versions; + Stripe.V2.StripeList pricingPlanVersions = service + .List("pricing_plan_id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/pricing_plans/pricing_plan_id_123/versions"); + } + + [Fact] + public async Task TestV2BillingPricingPlansVersionGetAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/pricing_plans/pricing_plan_id_123/versions", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.pricing_plan_version\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"pricing_plan\":\"pricing_plan\",\"start_date\":\"1970-01-19T05:07:09.589Z\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.PricingPlans.Versions; + Stripe.V2.StripeList pricingPlanVersions = await service + .ListAsync("pricing_plan_id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/pricing_plans/pricing_plan_id_123/versions"); + } + + [Fact] + public void TestV2BillingPricingPlansVersionGetAutoPaging() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/pricing_plans/pricing_plan_id_123/versions", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.pricing_plan_version\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"pricing_plan\":\"pricing_plan\",\"start_date\":\"1970-01-19T05:07:09.589Z\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.PricingPlans.Versions; + var pricingPlanVersion = service.ListAutoPaging( + "pricing_plan_id_123") + .First(); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/pricing_plans/pricing_plan_id_123/versions"); + } + + [Fact] + public async Task TestV2BillingPricingPlansVersionGetAutoPagingAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/pricing_plans/pricing_plan_id_123/versions", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.pricing_plan_version\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"pricing_plan\":\"pricing_plan\",\"start_date\":\"1970-01-19T05:07:09.589Z\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.PricingPlans.Versions; + var pricingPlanVersion = await service.ListAutoPagingAsync( + "pricing_plan_id_123") + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/pricing_plans/pricing_plan_id_123/versions"); + } + + [Fact] + public void TestV2BillingPricingPlansVersionGet2() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/pricing_plans/pricing_plan_id_123/versions/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.pricing_plan_version\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"pricing_plan\":\"pricing_plan\",\"start_date\":\"1970-01-19T05:07:09.589Z\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.PricingPlans.Versions; + Stripe.V2.Billing.PricingPlanVersion pricingPlanVersion = service + .Get("pricing_plan_id_123", "id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/pricing_plans/pricing_plan_id_123/versions/id_123"); + } + + [Fact] + public async Task TestV2BillingPricingPlansVersionGet2Async() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/pricing_plans/pricing_plan_id_123/versions/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.pricing_plan_version\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"pricing_plan\":\"pricing_plan\",\"start_date\":\"1970-01-19T05:07:09.589Z\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.PricingPlans.Versions; + Stripe.V2.Billing.PricingPlanVersion pricingPlanVersion = await service + .GetAsync("pricing_plan_id_123", "id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/pricing_plans/pricing_plan_id_123/versions/id_123"); + } + + [Fact] + public void TestV2BillingPricingPlanSubscriptionGet() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/pricing_plan_subscriptions", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.pricing_plan_subscription\",\"billing_cadence\":\"billing_cadence\",\"collection_status\":\"past_due\",\"collection_status_transitions\":{},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"pricing_plan\":\"pricing_plan\",\"pricing_plan_version\":\"pricing_plan_version\",\"servicing_status\":\"pending\",\"servicing_status_transitions\":{}}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.PricingPlanSubscriptions; + Stripe.V2.StripeList pricingPlanSubscriptions = service + .List(); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/pricing_plan_subscriptions"); + } + + [Fact] + public async Task TestV2BillingPricingPlanSubscriptionGetAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/pricing_plan_subscriptions", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.pricing_plan_subscription\",\"billing_cadence\":\"billing_cadence\",\"collection_status\":\"past_due\",\"collection_status_transitions\":{},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"pricing_plan\":\"pricing_plan\",\"pricing_plan_version\":\"pricing_plan_version\",\"servicing_status\":\"pending\",\"servicing_status_transitions\":{}}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.PricingPlanSubscriptions; + Stripe.V2.StripeList pricingPlanSubscriptions = await service + .ListAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/pricing_plan_subscriptions"); + } + + [Fact] + public void TestV2BillingPricingPlanSubscriptionGetAutoPaging() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/pricing_plan_subscriptions", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.pricing_plan_subscription\",\"billing_cadence\":\"billing_cadence\",\"collection_status\":\"past_due\",\"collection_status_transitions\":{},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"pricing_plan\":\"pricing_plan\",\"pricing_plan_version\":\"pricing_plan_version\",\"servicing_status\":\"pending\",\"servicing_status_transitions\":{}}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.PricingPlanSubscriptions; + var pricingPlanSubscription = service.ListAutoPaging().First(); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/pricing_plan_subscriptions"); + } + + [Fact] + public async Task TestV2BillingPricingPlanSubscriptionGetAutoPagingAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/pricing_plan_subscriptions", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.pricing_plan_subscription\",\"billing_cadence\":\"billing_cadence\",\"collection_status\":\"past_due\",\"collection_status_transitions\":{},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"pricing_plan\":\"pricing_plan\",\"pricing_plan_version\":\"pricing_plan_version\",\"servicing_status\":\"pending\",\"servicing_status_transitions\":{}}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.PricingPlanSubscriptions; + var pricingPlanSubscription = await service.ListAutoPagingAsync() + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/pricing_plan_subscriptions"); + } + + [Fact] + public void TestV2BillingPricingPlanSubscriptionGet2() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/pricing_plan_subscriptions/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.pricing_plan_subscription\",\"billing_cadence\":\"billing_cadence\",\"collection_status\":\"past_due\",\"collection_status_transitions\":{},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"pricing_plan\":\"pricing_plan\",\"pricing_plan_version\":\"pricing_plan_version\",\"servicing_status\":\"pending\",\"servicing_status_transitions\":{}}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.PricingPlanSubscriptions; + Stripe.V2.Billing.PricingPlanSubscription pricingPlanSubscription = service + .Get("id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/pricing_plan_subscriptions/id_123"); + } + + [Fact] + public async Task TestV2BillingPricingPlanSubscriptionGet2Async() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/pricing_plan_subscriptions/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.pricing_plan_subscription\",\"billing_cadence\":\"billing_cadence\",\"collection_status\":\"past_due\",\"collection_status_transitions\":{},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"pricing_plan\":\"pricing_plan\",\"pricing_plan_version\":\"pricing_plan_version\",\"servicing_status\":\"pending\",\"servicing_status_transitions\":{}}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.PricingPlanSubscriptions; + Stripe.V2.Billing.PricingPlanSubscription pricingPlanSubscription = await service + .GetAsync("id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/pricing_plan_subscriptions/id_123"); + } + + [Fact] + public void TestV2BillingPricingPlanSubscriptionPost() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/pricing_plan_subscriptions/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.pricing_plan_subscription\",\"billing_cadence\":\"billing_cadence\",\"collection_status\":\"past_due\",\"collection_status_transitions\":{},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"pricing_plan\":\"pricing_plan\",\"pricing_plan_version\":\"pricing_plan_version\",\"servicing_status\":\"pending\",\"servicing_status_transitions\":{}}"); + var options = new Stripe.V2.Billing.PricingPlanSubscriptionUpdateOptions(); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.PricingPlanSubscriptions; + Stripe.V2.Billing.PricingPlanSubscription pricingPlanSubscription = service + .Update("id_123", options); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/pricing_plan_subscriptions/id_123"); + } + + [Fact] + public async Task TestV2BillingPricingPlanSubscriptionPostAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/pricing_plan_subscriptions/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.pricing_plan_subscription\",\"billing_cadence\":\"billing_cadence\",\"collection_status\":\"past_due\",\"collection_status_transitions\":{},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"pricing_plan\":\"pricing_plan\",\"pricing_plan_version\":\"pricing_plan_version\",\"servicing_status\":\"pending\",\"servicing_status_transitions\":{}}"); + var options = new Stripe.V2.Billing.PricingPlanSubscriptionUpdateOptions(); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.PricingPlanSubscriptions; + Stripe.V2.Billing.PricingPlanSubscription pricingPlanSubscription = await service + .UpdateAsync("id_123", options); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/pricing_plan_subscriptions/id_123"); + } + + [Fact] + public void TestV2BillingPricingPlanSubscriptionPost2() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/pricing_plan_subscriptions/id_123/remove_discounts", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.pricing_plan_subscription\",\"billing_cadence\":\"billing_cadence\",\"collection_status\":\"past_due\",\"collection_status_transitions\":{},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"pricing_plan\":\"pricing_plan\",\"pricing_plan_version\":\"pricing_plan_version\",\"servicing_status\":\"pending\",\"servicing_status_transitions\":{}}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.PricingPlanSubscriptions; + Stripe.V2.Billing.PricingPlanSubscription pricingPlanSubscription = service + .RemoveDiscounts("id_123"); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/pricing_plan_subscriptions/id_123/remove_discounts"); + } + + [Fact] + public async Task TestV2BillingPricingPlanSubscriptionPost2Async() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/pricing_plan_subscriptions/id_123/remove_discounts", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.pricing_plan_subscription\",\"billing_cadence\":\"billing_cadence\",\"collection_status\":\"past_due\",\"collection_status_transitions\":{},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"pricing_plan\":\"pricing_plan\",\"pricing_plan_version\":\"pricing_plan_version\",\"servicing_status\":\"pending\",\"servicing_status_transitions\":{}}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.PricingPlanSubscriptions; + Stripe.V2.Billing.PricingPlanSubscription pricingPlanSubscription = await service + .RemoveDiscountsAsync("id_123"); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/pricing_plan_subscriptions/id_123/remove_discounts"); + } + + [Fact] + public void TestV2BillingProfileGet() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/profiles", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.profile\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"active\"}],\"next_page_url\":null,\"previous_page_url\":null}", + "lookup_keys[0]=lookup_keys"); + var options = new Stripe.V2.Billing.ProfileListOptions + { + LookupKeys = new List { "lookup_keys" }, + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.Profiles; + Stripe.V2.StripeList profiles = service + .List(options); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/profiles", + "lookup_keys[0]=lookup_keys"); + } + + [Fact] + public async Task TestV2BillingProfileGetAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/profiles", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.profile\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"active\"}],\"next_page_url\":null,\"previous_page_url\":null}", + "lookup_keys[0]=lookup_keys"); + var options = new Stripe.V2.Billing.ProfileListOptions + { + LookupKeys = new List { "lookup_keys" }, + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.Profiles; + Stripe.V2.StripeList profiles = await service + .ListAsync(options); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/profiles", + "lookup_keys[0]=lookup_keys"); + } + + [Fact] + public void TestV2BillingProfileGetAutoPaging() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/profiles", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.profile\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"active\"}],\"next_page_url\":null,\"previous_page_url\":null}", + "lookup_keys[0]=lookup_keys"); + var options = new Stripe.V2.Billing.ProfileListOptions + { + LookupKeys = new List { "lookup_keys" }, + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.Profiles; + var profile = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/profiles", + "lookup_keys[0]=lookup_keys"); + } + + [Fact] + public async Task TestV2BillingProfileGetAutoPagingAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/profiles", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.profile\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"active\"}],\"next_page_url\":null,\"previous_page_url\":null}", + "lookup_keys[0]=lookup_keys"); + var options = new Stripe.V2.Billing.ProfileListOptions + { + LookupKeys = new List { "lookup_keys" }, + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.Profiles; + var profile = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/profiles", + "lookup_keys[0]=lookup_keys"); + } + + [Fact] + public void TestV2BillingProfilePost() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/profiles", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.profile\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"active\"}"); + var options = new Stripe.V2.Billing.ProfileCreateOptions + { + Customer = "customer", + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.Profiles; + Stripe.V2.Billing.Profile profile = service.Create(options); + this.AssertRequest(HttpMethod.Post, "/v2/billing/profiles"); + } + + [Fact] + public async Task TestV2BillingProfilePostAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/profiles", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.profile\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"active\"}"); + var options = new Stripe.V2.Billing.ProfileCreateOptions + { + Customer = "customer", + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.Profiles; + Stripe.V2.Billing.Profile profile = await service.CreateAsync( + options); + this.AssertRequest(HttpMethod.Post, "/v2/billing/profiles"); + } + + [Fact] + public void TestV2BillingProfileGet2() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/profiles/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.profile\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"active\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.Profiles; + Stripe.V2.Billing.Profile profile = service.Get("id_123"); + this.AssertRequest(HttpMethod.Get, "/v2/billing/profiles/id_123"); + } + + [Fact] + public async Task TestV2BillingProfileGet2Async() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/profiles/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.profile\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"active\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.Profiles; + Stripe.V2.Billing.Profile profile = await service.GetAsync( + "id_123"); + this.AssertRequest(HttpMethod.Get, "/v2/billing/profiles/id_123"); + } + + [Fact] + public void TestV2BillingProfilePost2() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/profiles/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.profile\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"active\"}"); + var options = new Stripe.V2.Billing.ProfileUpdateOptions(); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.Profiles; + Stripe.V2.Billing.Profile profile = service.Update( + "id_123", + options); + this.AssertRequest(HttpMethod.Post, "/v2/billing/profiles/id_123"); + } + + [Fact] + public async Task TestV2BillingProfilePost2Async() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/profiles/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.profile\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"active\"}"); + var options = new Stripe.V2.Billing.ProfileUpdateOptions(); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.Profiles; + Stripe.V2.Billing.Profile profile = await service.UpdateAsync( + "id_123", + options); + this.AssertRequest(HttpMethod.Post, "/v2/billing/profiles/id_123"); + } + + [Fact] + public void TestV2BillingRateCardGet() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/rate_cards", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.rate_card\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"live_version\":\"live_version\",\"livemode\":true,\"service_cycle\":{\"interval\":\"month\",\"interval_count\":797691627},\"tax_behavior\":\"exclusive\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.RateCards; + Stripe.V2.StripeList rateCards = service + .List(); + this.AssertRequest(HttpMethod.Get, "/v2/billing/rate_cards"); + } + + [Fact] + public async Task TestV2BillingRateCardGetAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/rate_cards", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.rate_card\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"live_version\":\"live_version\",\"livemode\":true,\"service_cycle\":{\"interval\":\"month\",\"interval_count\":797691627},\"tax_behavior\":\"exclusive\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.RateCards; + Stripe.V2.StripeList rateCards = await service + .ListAsync(); + this.AssertRequest(HttpMethod.Get, "/v2/billing/rate_cards"); + } + + [Fact] + public void TestV2BillingRateCardGetAutoPaging() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/rate_cards", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.rate_card\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"live_version\":\"live_version\",\"livemode\":true,\"service_cycle\":{\"interval\":\"month\",\"interval_count\":797691627},\"tax_behavior\":\"exclusive\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.RateCards; + var rateCard = service.ListAutoPaging().First(); + this.AssertRequest(HttpMethod.Get, "/v2/billing/rate_cards"); + } + + [Fact] + public async Task TestV2BillingRateCardGetAutoPagingAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/rate_cards", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.rate_card\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"live_version\":\"live_version\",\"livemode\":true,\"service_cycle\":{\"interval\":\"month\",\"interval_count\":797691627},\"tax_behavior\":\"exclusive\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.RateCards; + var rateCard = await service.ListAutoPagingAsync().FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v2/billing/rate_cards"); + } + + [Fact] + public void TestV2BillingRateCardPost() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/rate_cards", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.rate_card\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"live_version\":\"live_version\",\"livemode\":true,\"service_cycle\":{\"interval\":\"month\",\"interval_count\":797691627},\"tax_behavior\":\"exclusive\"}"); + var options = new Stripe.V2.Billing.RateCardCreateOptions + { + Currency = "usd", + DisplayName = "display_name", + ServiceInterval = "month", + ServiceIntervalCount = 1375336415, + TaxBehavior = "exclusive", + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.RateCards; + Stripe.V2.Billing.RateCard rateCard = service.Create(options); + this.AssertRequest(HttpMethod.Post, "/v2/billing/rate_cards"); + } + + [Fact] + public async Task TestV2BillingRateCardPostAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/rate_cards", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.rate_card\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"live_version\":\"live_version\",\"livemode\":true,\"service_cycle\":{\"interval\":\"month\",\"interval_count\":797691627},\"tax_behavior\":\"exclusive\"}"); + var options = new Stripe.V2.Billing.RateCardCreateOptions + { + Currency = "usd", + DisplayName = "display_name", + ServiceInterval = "month", + ServiceIntervalCount = 1375336415, + TaxBehavior = "exclusive", + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.RateCards; + Stripe.V2.Billing.RateCard rateCard = await service.CreateAsync( + options); + this.AssertRequest(HttpMethod.Post, "/v2/billing/rate_cards"); + } + + [Fact] + public void TestV2BillingRateCardGet2() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/rate_cards/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.rate_card\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"live_version\":\"live_version\",\"livemode\":true,\"service_cycle\":{\"interval\":\"month\",\"interval_count\":797691627},\"tax_behavior\":\"exclusive\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.RateCards; + Stripe.V2.Billing.RateCard rateCard = service.Get("id_123"); + this.AssertRequest(HttpMethod.Get, "/v2/billing/rate_cards/id_123"); + } + + [Fact] + public async Task TestV2BillingRateCardGet2Async() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/rate_cards/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.rate_card\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"live_version\":\"live_version\",\"livemode\":true,\"service_cycle\":{\"interval\":\"month\",\"interval_count\":797691627},\"tax_behavior\":\"exclusive\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.RateCards; + Stripe.V2.Billing.RateCard rateCard = await service.GetAsync( + "id_123"); + this.AssertRequest(HttpMethod.Get, "/v2/billing/rate_cards/id_123"); + } + + [Fact] + public void TestV2BillingRateCardPost2() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/rate_cards/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.rate_card\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"live_version\":\"live_version\",\"livemode\":true,\"service_cycle\":{\"interval\":\"month\",\"interval_count\":797691627},\"tax_behavior\":\"exclusive\"}"); + var options = new Stripe.V2.Billing.RateCardUpdateOptions(); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.RateCards; + Stripe.V2.Billing.RateCard rateCard = service.Update( + "id_123", + options); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/rate_cards/id_123"); + } + + [Fact] + public async Task TestV2BillingRateCardPost2Async() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/rate_cards/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.rate_card\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"live_version\":\"live_version\",\"livemode\":true,\"service_cycle\":{\"interval\":\"month\",\"interval_count\":797691627},\"tax_behavior\":\"exclusive\"}"); + var options = new Stripe.V2.Billing.RateCardUpdateOptions(); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.RateCards; + Stripe.V2.Billing.RateCard rateCard = await service.UpdateAsync( + "id_123", + options); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/rate_cards/id_123"); + } + + [Fact] + public void TestV2BillingRateCardPost3() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/rate_cards/id_123/modify_rates", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.rate_card_version\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"rate_card_id\":\"rate_card_id\"}"); + var options = new Stripe.V2.Billing.RateCardModifyRatesOptions + { + RatesToCreate = new List + { + new Stripe.V2.Billing.RateCardModifyRatesRatesToCreateOptions + { + Metadata = new Dictionary + { + { "key", "metadata" }, + }, + MeteredItem = "metered_item", + MeteredItemData = new Stripe.V2.Billing.RateCardModifyRatesRatesToCreateMeteredItemDataOptions + { + DisplayName = "display_name", + LookupKey = "lookup_key", + Meter = "meter", + MeterSegmentConditions = new List + { + new Stripe.V2.Billing.RateCardModifyRatesRatesToCreateMeteredItemDataMeterSegmentConditionOptions + { + Dimension = "dimension", + Value = "value", + }, + }, + UnitLabel = "unit_label", + }, + TieringMode = "graduated", + Tiers = new List + { + new Stripe.V2.Billing.RateCardModifyRatesRatesToCreateTierOptions + { + FlatAmount = "flat_amount", + UnitAmount = "unit_amount", + UpToDecimal = 1387931359.3333333M, + UpToInf = "inf", + }, + }, + TransformQuantity = new Stripe.V2.Billing.RateCardModifyRatesRatesToCreateTransformQuantityOptions + { + DivideBy = 1592560163, + Round = "down", + }, + UnitAmount = "unit_amount", + }, + }, + RatesToDelete = new List + { + new Stripe.V2.Billing.RateCardModifyRatesRatesToDeleteOptions + { + Id = "obj_123", + }, + }, + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.RateCards; + Stripe.V2.Billing.RateCardVersion rateCardVersion = service + .ModifyRates("id_123", options); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/rate_cards/id_123/modify_rates"); + } + + [Fact] + public async Task TestV2BillingRateCardPost3Async() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/rate_cards/id_123/modify_rates", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.rate_card_version\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"rate_card_id\":\"rate_card_id\"}"); + var options = new Stripe.V2.Billing.RateCardModifyRatesOptions + { + RatesToCreate = new List + { + new Stripe.V2.Billing.RateCardModifyRatesRatesToCreateOptions + { + Metadata = new Dictionary + { + { "key", "metadata" }, + }, + MeteredItem = "metered_item", + MeteredItemData = new Stripe.V2.Billing.RateCardModifyRatesRatesToCreateMeteredItemDataOptions + { + DisplayName = "display_name", + LookupKey = "lookup_key", + Meter = "meter", + MeterSegmentConditions = new List + { + new Stripe.V2.Billing.RateCardModifyRatesRatesToCreateMeteredItemDataMeterSegmentConditionOptions + { + Dimension = "dimension", + Value = "value", + }, + }, + UnitLabel = "unit_label", + }, + TieringMode = "graduated", + Tiers = new List + { + new Stripe.V2.Billing.RateCardModifyRatesRatesToCreateTierOptions + { + FlatAmount = "flat_amount", + UnitAmount = "unit_amount", + UpToDecimal = 1387931359.3333333M, + UpToInf = "inf", + }, + }, + TransformQuantity = new Stripe.V2.Billing.RateCardModifyRatesRatesToCreateTransformQuantityOptions + { + DivideBy = 1592560163, + Round = "down", + }, + UnitAmount = "unit_amount", + }, + }, + RatesToDelete = new List + { + new Stripe.V2.Billing.RateCardModifyRatesRatesToDeleteOptions + { + Id = "obj_123", + }, + }, + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.RateCards; + Stripe.V2.Billing.RateCardVersion rateCardVersion = await service + .ModifyRatesAsync("id_123", options); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/rate_cards/id_123/modify_rates"); + } + + [Fact] + public void TestV2BillingRateCardsCustomPricingUnitOverageRateGet() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/rate_cards/rate_card_id_123/custom_pricing_unit_overage_rates", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.rate_card_custom_pricing_unit_overage_rate\",\"created\":\"1970-01-12T21:42:34.472Z\",\"custom_pricing_unit\":\"custom_pricing_unit\",\"id\":\"obj_123\",\"livemode\":true,\"one_time_item\":{\"object\":\"v2.billing.one_time_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true},\"rate_card\":\"rate_card\",\"rate_card_version\":\"rate_card_version\",\"unit_amount\":\"unit_amount\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client + .V2 + .Billing + .RateCards + .CustomPricingUnitOverageRates; + Stripe.V2.StripeList rateCardCustomPricingUnitOverageRates = service + .List("rate_card_id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/rate_cards/rate_card_id_123/custom_pricing_unit_overage_rates"); + } + + [Fact] + public async Task TestV2BillingRateCardsCustomPricingUnitOverageRateGetAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/rate_cards/rate_card_id_123/custom_pricing_unit_overage_rates", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.rate_card_custom_pricing_unit_overage_rate\",\"created\":\"1970-01-12T21:42:34.472Z\",\"custom_pricing_unit\":\"custom_pricing_unit\",\"id\":\"obj_123\",\"livemode\":true,\"one_time_item\":{\"object\":\"v2.billing.one_time_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true},\"rate_card\":\"rate_card\",\"rate_card_version\":\"rate_card_version\",\"unit_amount\":\"unit_amount\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client + .V2 + .Billing + .RateCards + .CustomPricingUnitOverageRates; + Stripe.V2.StripeList rateCardCustomPricingUnitOverageRates = await service + .ListAsync("rate_card_id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/rate_cards/rate_card_id_123/custom_pricing_unit_overage_rates"); + } + + [Fact] + public void TestV2BillingRateCardsCustomPricingUnitOverageRateGetAutoPaging() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/rate_cards/rate_card_id_123/custom_pricing_unit_overage_rates", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.rate_card_custom_pricing_unit_overage_rate\",\"created\":\"1970-01-12T21:42:34.472Z\",\"custom_pricing_unit\":\"custom_pricing_unit\",\"id\":\"obj_123\",\"livemode\":true,\"one_time_item\":{\"object\":\"v2.billing.one_time_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true},\"rate_card\":\"rate_card\",\"rate_card_version\":\"rate_card_version\",\"unit_amount\":\"unit_amount\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client + .V2 + .Billing + .RateCards + .CustomPricingUnitOverageRates; + var rateCardCustomPricingUnitOverageRate = service.ListAutoPaging( + "rate_card_id_123") + .First(); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/rate_cards/rate_card_id_123/custom_pricing_unit_overage_rates"); + } + + [Fact] + public async Task TestV2BillingRateCardsCustomPricingUnitOverageRateGetAutoPagingAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/rate_cards/rate_card_id_123/custom_pricing_unit_overage_rates", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.rate_card_custom_pricing_unit_overage_rate\",\"created\":\"1970-01-12T21:42:34.472Z\",\"custom_pricing_unit\":\"custom_pricing_unit\",\"id\":\"obj_123\",\"livemode\":true,\"one_time_item\":{\"object\":\"v2.billing.one_time_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true},\"rate_card\":\"rate_card\",\"rate_card_version\":\"rate_card_version\",\"unit_amount\":\"unit_amount\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client + .V2 + .Billing + .RateCards + .CustomPricingUnitOverageRates; + var rateCardCustomPricingUnitOverageRate = await service + .ListAutoPagingAsync("rate_card_id_123") + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/rate_cards/rate_card_id_123/custom_pricing_unit_overage_rates"); + } + + [Fact] + public void TestV2BillingRateCardsCustomPricingUnitOverageRatePost() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/rate_cards/rate_card_id_123/custom_pricing_unit_overage_rates", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.rate_card_custom_pricing_unit_overage_rate\",\"created\":\"1970-01-12T21:42:34.472Z\",\"custom_pricing_unit\":\"custom_pricing_unit\",\"id\":\"obj_123\",\"livemode\":true,\"one_time_item\":{\"object\":\"v2.billing.one_time_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true},\"rate_card\":\"rate_card\",\"rate_card_version\":\"rate_card_version\",\"unit_amount\":\"unit_amount\"}"); + var options = new Stripe.V2.Billing.RateCards.CustomPricingUnitOverageRateCreateOptions + { + CustomPricingUnit = "custom_pricing_unit", + OneTimeItem = "one_time_item", + UnitAmount = "unit_amount", + }; + var client = new StripeClient(this.Requestor); + var service = client + .V2 + .Billing + .RateCards + .CustomPricingUnitOverageRates; + Stripe.V2.Billing.RateCardCustomPricingUnitOverageRate rateCardCustomPricingUnitOverageRate = service + .Create("rate_card_id_123", options); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/rate_cards/rate_card_id_123/custom_pricing_unit_overage_rates"); + } + + [Fact] + public async Task TestV2BillingRateCardsCustomPricingUnitOverageRatePostAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/rate_cards/rate_card_id_123/custom_pricing_unit_overage_rates", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.rate_card_custom_pricing_unit_overage_rate\",\"created\":\"1970-01-12T21:42:34.472Z\",\"custom_pricing_unit\":\"custom_pricing_unit\",\"id\":\"obj_123\",\"livemode\":true,\"one_time_item\":{\"object\":\"v2.billing.one_time_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true},\"rate_card\":\"rate_card\",\"rate_card_version\":\"rate_card_version\",\"unit_amount\":\"unit_amount\"}"); + var options = new Stripe.V2.Billing.RateCards.CustomPricingUnitOverageRateCreateOptions + { + CustomPricingUnit = "custom_pricing_unit", + OneTimeItem = "one_time_item", + UnitAmount = "unit_amount", + }; + var client = new StripeClient(this.Requestor); + var service = client + .V2 + .Billing + .RateCards + .CustomPricingUnitOverageRates; + Stripe.V2.Billing.RateCardCustomPricingUnitOverageRate rateCardCustomPricingUnitOverageRate = await service + .CreateAsync("rate_card_id_123", options); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/rate_cards/rate_card_id_123/custom_pricing_unit_overage_rates"); + } + + [Fact] + public void TestV2BillingRateCardsCustomPricingUnitOverageRateDelete() + { + this.StubRequest( + HttpMethod.Delete, + "/v2/billing/rate_cards/rate_card_id_123/custom_pricing_unit_overage_rates/id_123", + (HttpStatusCode)200, + "{\"id\":\"abc_123\",\"object\":\"some.object.tag\"}"); + var client = new StripeClient(this.Requestor); + var service = client + .V2 + .Billing + .RateCards + .CustomPricingUnitOverageRates; + Stripe.V2.DeletedObject deleted = service.Delete( + "rate_card_id_123", + "id_123"); + this.AssertRequest( + HttpMethod.Delete, + "/v2/billing/rate_cards/rate_card_id_123/custom_pricing_unit_overage_rates/id_123"); + } + + [Fact] + public async Task TestV2BillingRateCardsCustomPricingUnitOverageRateDeleteAsync() + { + this.StubRequest( + HttpMethod.Delete, + "/v2/billing/rate_cards/rate_card_id_123/custom_pricing_unit_overage_rates/id_123", + (HttpStatusCode)200, + "{\"id\":\"abc_123\",\"object\":\"some.object.tag\"}"); + var client = new StripeClient(this.Requestor); + var service = client + .V2 + .Billing + .RateCards + .CustomPricingUnitOverageRates; + Stripe.V2.DeletedObject deleted = await service.DeleteAsync( + "rate_card_id_123", + "id_123"); + this.AssertRequest( + HttpMethod.Delete, + "/v2/billing/rate_cards/rate_card_id_123/custom_pricing_unit_overage_rates/id_123"); + } + + [Fact] + public void TestV2BillingRateCardsCustomPricingUnitOverageRateGet2() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/rate_cards/rate_card_id_123/custom_pricing_unit_overage_rates/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.rate_card_custom_pricing_unit_overage_rate\",\"created\":\"1970-01-12T21:42:34.472Z\",\"custom_pricing_unit\":\"custom_pricing_unit\",\"id\":\"obj_123\",\"livemode\":true,\"one_time_item\":{\"object\":\"v2.billing.one_time_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true},\"rate_card\":\"rate_card\",\"rate_card_version\":\"rate_card_version\",\"unit_amount\":\"unit_amount\"}"); + var client = new StripeClient(this.Requestor); + var service = client + .V2 + .Billing + .RateCards + .CustomPricingUnitOverageRates; + Stripe.V2.Billing.RateCardCustomPricingUnitOverageRate rateCardCustomPricingUnitOverageRate = service + .Get("rate_card_id_123", "id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/rate_cards/rate_card_id_123/custom_pricing_unit_overage_rates/id_123"); + } + + [Fact] + public async Task TestV2BillingRateCardsCustomPricingUnitOverageRateGet2Async() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/rate_cards/rate_card_id_123/custom_pricing_unit_overage_rates/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.rate_card_custom_pricing_unit_overage_rate\",\"created\":\"1970-01-12T21:42:34.472Z\",\"custom_pricing_unit\":\"custom_pricing_unit\",\"id\":\"obj_123\",\"livemode\":true,\"one_time_item\":{\"object\":\"v2.billing.one_time_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true},\"rate_card\":\"rate_card\",\"rate_card_version\":\"rate_card_version\",\"unit_amount\":\"unit_amount\"}"); + var client = new StripeClient(this.Requestor); + var service = client + .V2 + .Billing + .RateCards + .CustomPricingUnitOverageRates; + Stripe.V2.Billing.RateCardCustomPricingUnitOverageRate rateCardCustomPricingUnitOverageRate = await service + .GetAsync("rate_card_id_123", "id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/rate_cards/rate_card_id_123/custom_pricing_unit_overage_rates/id_123"); + } + + [Fact] + public void TestV2BillingRateCardsRateGet() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/rate_cards/rate_card_id_123/rates", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.rate_card_rate\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"metered_item\":{\"object\":\"v2.billing.metered_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"invoice_presentation_dimensions\":[\"invoice_presentation_dimensions\"],\"livemode\":true,\"meter\":\"meter\",\"meter_segment_conditions\":[{\"dimension\":\"dimension\",\"value\":\"value\"}]},\"rate_card\":\"rate_card\",\"rate_card_version\":\"rate_card_version\",\"tiers\":[{}]}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.RateCards.Rates; + Stripe.V2.StripeList rateCardRates = service + .List("rate_card_id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/rate_cards/rate_card_id_123/rates"); + } + + [Fact] + public async Task TestV2BillingRateCardsRateGetAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/rate_cards/rate_card_id_123/rates", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.rate_card_rate\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"metered_item\":{\"object\":\"v2.billing.metered_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"invoice_presentation_dimensions\":[\"invoice_presentation_dimensions\"],\"livemode\":true,\"meter\":\"meter\",\"meter_segment_conditions\":[{\"dimension\":\"dimension\",\"value\":\"value\"}]},\"rate_card\":\"rate_card\",\"rate_card_version\":\"rate_card_version\",\"tiers\":[{}]}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.RateCards.Rates; + Stripe.V2.StripeList rateCardRates = await service + .ListAsync("rate_card_id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/rate_cards/rate_card_id_123/rates"); + } + + [Fact] + public void TestV2BillingRateCardsRateGetAutoPaging() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/rate_cards/rate_card_id_123/rates", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.rate_card_rate\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"metered_item\":{\"object\":\"v2.billing.metered_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"invoice_presentation_dimensions\":[\"invoice_presentation_dimensions\"],\"livemode\":true,\"meter\":\"meter\",\"meter_segment_conditions\":[{\"dimension\":\"dimension\",\"value\":\"value\"}]},\"rate_card\":\"rate_card\",\"rate_card_version\":\"rate_card_version\",\"tiers\":[{}]}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.RateCards.Rates; + var rateCardRate = service.ListAutoPaging("rate_card_id_123") + .First(); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/rate_cards/rate_card_id_123/rates"); + } + + [Fact] + public async Task TestV2BillingRateCardsRateGetAutoPagingAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/rate_cards/rate_card_id_123/rates", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.rate_card_rate\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"metered_item\":{\"object\":\"v2.billing.metered_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"invoice_presentation_dimensions\":[\"invoice_presentation_dimensions\"],\"livemode\":true,\"meter\":\"meter\",\"meter_segment_conditions\":[{\"dimension\":\"dimension\",\"value\":\"value\"}]},\"rate_card\":\"rate_card\",\"rate_card_version\":\"rate_card_version\",\"tiers\":[{}]}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.RateCards.Rates; + var rateCardRate = await service.ListAutoPagingAsync( + "rate_card_id_123") + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/rate_cards/rate_card_id_123/rates"); + } + + [Fact] + public void TestV2BillingRateCardsRatePost() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/rate_cards/rate_card_id_123/rates", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.rate_card_rate\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"metered_item\":{\"object\":\"v2.billing.metered_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"invoice_presentation_dimensions\":[\"invoice_presentation_dimensions\"],\"livemode\":true,\"meter\":\"meter\",\"meter_segment_conditions\":[{\"dimension\":\"dimension\",\"value\":\"value\"}]},\"rate_card\":\"rate_card\",\"rate_card_version\":\"rate_card_version\",\"tiers\":[{}]}"); + var options = new Stripe.V2.Billing.RateCards.RateCreateOptions + { + MeteredItem = "metered_item", + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.RateCards.Rates; + Stripe.V2.Billing.RateCardRate rateCardRate = service.Create( + "rate_card_id_123", + options); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/rate_cards/rate_card_id_123/rates"); + } + + [Fact] + public async Task TestV2BillingRateCardsRatePostAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/rate_cards/rate_card_id_123/rates", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.rate_card_rate\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"metered_item\":{\"object\":\"v2.billing.metered_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"invoice_presentation_dimensions\":[\"invoice_presentation_dimensions\"],\"livemode\":true,\"meter\":\"meter\",\"meter_segment_conditions\":[{\"dimension\":\"dimension\",\"value\":\"value\"}]},\"rate_card\":\"rate_card\",\"rate_card_version\":\"rate_card_version\",\"tiers\":[{}]}"); + var options = new Stripe.V2.Billing.RateCards.RateCreateOptions + { + MeteredItem = "metered_item", + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.RateCards.Rates; + Stripe.V2.Billing.RateCardRate rateCardRate = await service + .CreateAsync("rate_card_id_123", options); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/rate_cards/rate_card_id_123/rates"); + } + + [Fact] + public void TestV2BillingRateCardsRateDelete() + { + this.StubRequest( + HttpMethod.Delete, + "/v2/billing/rate_cards/rate_card_id_123/rates/id_123", + (HttpStatusCode)200, + "{\"id\":\"abc_123\",\"object\":\"some.object.tag\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.RateCards.Rates; + Stripe.V2.DeletedObject deleted = service.Delete( + "rate_card_id_123", + "id_123"); + this.AssertRequest( + HttpMethod.Delete, + "/v2/billing/rate_cards/rate_card_id_123/rates/id_123"); + } + + [Fact] + public async Task TestV2BillingRateCardsRateDeleteAsync() + { + this.StubRequest( + HttpMethod.Delete, + "/v2/billing/rate_cards/rate_card_id_123/rates/id_123", + (HttpStatusCode)200, + "{\"id\":\"abc_123\",\"object\":\"some.object.tag\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.RateCards.Rates; + Stripe.V2.DeletedObject deleted = await service.DeleteAsync( + "rate_card_id_123", + "id_123"); + this.AssertRequest( + HttpMethod.Delete, + "/v2/billing/rate_cards/rate_card_id_123/rates/id_123"); + } + + [Fact] + public void TestV2BillingRateCardsRateGet2() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/rate_cards/rate_card_id_123/rates/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.rate_card_rate\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"metered_item\":{\"object\":\"v2.billing.metered_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"invoice_presentation_dimensions\":[\"invoice_presentation_dimensions\"],\"livemode\":true,\"meter\":\"meter\",\"meter_segment_conditions\":[{\"dimension\":\"dimension\",\"value\":\"value\"}]},\"rate_card\":\"rate_card\",\"rate_card_version\":\"rate_card_version\",\"tiers\":[{}]}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.RateCards.Rates; + Stripe.V2.Billing.RateCardRate rateCardRate = service.Get( + "rate_card_id_123", + "id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/rate_cards/rate_card_id_123/rates/id_123"); + } + + [Fact] + public async Task TestV2BillingRateCardsRateGet2Async() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/rate_cards/rate_card_id_123/rates/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.rate_card_rate\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"metered_item\":{\"object\":\"v2.billing.metered_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"invoice_presentation_dimensions\":[\"invoice_presentation_dimensions\"],\"livemode\":true,\"meter\":\"meter\",\"meter_segment_conditions\":[{\"dimension\":\"dimension\",\"value\":\"value\"}]},\"rate_card\":\"rate_card\",\"rate_card_version\":\"rate_card_version\",\"tiers\":[{}]}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.RateCards.Rates; + Stripe.V2.Billing.RateCardRate rateCardRate = await service + .GetAsync("rate_card_id_123", "id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/rate_cards/rate_card_id_123/rates/id_123"); + } + + [Fact] + public void TestV2BillingRateCardsVersionGet() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/rate_cards/rate_card_id_123/versions", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.rate_card_version\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"rate_card_id\":\"rate_card_id\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.RateCards.Versions; + Stripe.V2.StripeList rateCardVersions = service + .List("rate_card_id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/rate_cards/rate_card_id_123/versions"); + } + + [Fact] + public async Task TestV2BillingRateCardsVersionGetAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/rate_cards/rate_card_id_123/versions", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.rate_card_version\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"rate_card_id\":\"rate_card_id\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.RateCards.Versions; + Stripe.V2.StripeList rateCardVersions = await service + .ListAsync("rate_card_id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/rate_cards/rate_card_id_123/versions"); + } + + [Fact] + public void TestV2BillingRateCardsVersionGetAutoPaging() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/rate_cards/rate_card_id_123/versions", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.rate_card_version\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"rate_card_id\":\"rate_card_id\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.RateCards.Versions; + var rateCardVersion = service.ListAutoPaging("rate_card_id_123") + .First(); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/rate_cards/rate_card_id_123/versions"); + } + + [Fact] + public async Task TestV2BillingRateCardsVersionGetAutoPagingAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/rate_cards/rate_card_id_123/versions", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.rate_card_version\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"rate_card_id\":\"rate_card_id\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.RateCards.Versions; + var rateCardVersion = await service.ListAutoPagingAsync( + "rate_card_id_123") + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/rate_cards/rate_card_id_123/versions"); + } + + [Fact] + public void TestV2BillingRateCardsVersionGet2() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/rate_cards/rate_card_id_123/versions/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.rate_card_version\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"rate_card_id\":\"rate_card_id\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.RateCards.Versions; + Stripe.V2.Billing.RateCardVersion rateCardVersion = service.Get( + "rate_card_id_123", + "id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/rate_cards/rate_card_id_123/versions/id_123"); + } + + [Fact] + public async Task TestV2BillingRateCardsVersionGet2Async() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/rate_cards/rate_card_id_123/versions/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.rate_card_version\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"rate_card_id\":\"rate_card_id\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.RateCards.Versions; + Stripe.V2.Billing.RateCardVersion rateCardVersion = await service + .GetAsync("rate_card_id_123", "id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/rate_cards/rate_card_id_123/versions/id_123"); + } + + [Fact] + public void TestV2BillingRateCardSubscriptionGet() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/rate_card_subscriptions", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.rate_card_subscription\",\"billing_cadence\":\"billing_cadence\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"rate_card\":\"rate_card\",\"rate_card_version\":\"rate_card_version\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.RateCardSubscriptions; + Stripe.V2.StripeList rateCardSubscriptions = service + .List(); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/rate_card_subscriptions"); + } + + [Fact] + public async Task TestV2BillingRateCardSubscriptionGetAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/rate_card_subscriptions", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.rate_card_subscription\",\"billing_cadence\":\"billing_cadence\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"rate_card\":\"rate_card\",\"rate_card_version\":\"rate_card_version\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.RateCardSubscriptions; + Stripe.V2.StripeList rateCardSubscriptions = await service + .ListAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/rate_card_subscriptions"); + } + + [Fact] + public void TestV2BillingRateCardSubscriptionGetAutoPaging() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/rate_card_subscriptions", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.rate_card_subscription\",\"billing_cadence\":\"billing_cadence\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"rate_card\":\"rate_card\",\"rate_card_version\":\"rate_card_version\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.RateCardSubscriptions; + var rateCardSubscription = service.ListAutoPaging().First(); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/rate_card_subscriptions"); + } + + [Fact] + public async Task TestV2BillingRateCardSubscriptionGetAutoPagingAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/rate_card_subscriptions", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.billing.rate_card_subscription\",\"billing_cadence\":\"billing_cadence\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"rate_card\":\"rate_card\",\"rate_card_version\":\"rate_card_version\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.RateCardSubscriptions; + var rateCardSubscription = await service.ListAutoPagingAsync() + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/rate_card_subscriptions"); + } + + [Fact] + public void TestV2BillingRateCardSubscriptionPost() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/rate_card_subscriptions", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.rate_card_subscription\",\"billing_cadence\":\"billing_cadence\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"rate_card\":\"rate_card\",\"rate_card_version\":\"rate_card_version\"}"); + var options = new Stripe.V2.Billing.RateCardSubscriptionCreateOptions + { + BillingCadence = "billing_cadence", + RateCard = "rate_card", + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.RateCardSubscriptions; + Stripe.V2.Billing.RateCardSubscription rateCardSubscription = service + .Create(options); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/rate_card_subscriptions"); + } + + [Fact] + public async Task TestV2BillingRateCardSubscriptionPostAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/rate_card_subscriptions", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.rate_card_subscription\",\"billing_cadence\":\"billing_cadence\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"rate_card\":\"rate_card\",\"rate_card_version\":\"rate_card_version\"}"); + var options = new Stripe.V2.Billing.RateCardSubscriptionCreateOptions + { + BillingCadence = "billing_cadence", + RateCard = "rate_card", + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.RateCardSubscriptions; + Stripe.V2.Billing.RateCardSubscription rateCardSubscription = await service + .CreateAsync(options); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/rate_card_subscriptions"); + } + + [Fact] + public void TestV2BillingRateCardSubscriptionGet2() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/rate_card_subscriptions/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.rate_card_subscription\",\"billing_cadence\":\"billing_cadence\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"rate_card\":\"rate_card\",\"rate_card_version\":\"rate_card_version\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.RateCardSubscriptions; + Stripe.V2.Billing.RateCardSubscription rateCardSubscription = service + .Get("id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/rate_card_subscriptions/id_123"); + } + + [Fact] + public async Task TestV2BillingRateCardSubscriptionGet2Async() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/rate_card_subscriptions/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.rate_card_subscription\",\"billing_cadence\":\"billing_cadence\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"rate_card\":\"rate_card\",\"rate_card_version\":\"rate_card_version\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.RateCardSubscriptions; + Stripe.V2.Billing.RateCardSubscription rateCardSubscription = await service + .GetAsync("id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/rate_card_subscriptions/id_123"); + } + + [Fact] + public void TestV2BillingRateCardSubscriptionPost2() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/rate_card_subscriptions/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.rate_card_subscription\",\"billing_cadence\":\"billing_cadence\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"rate_card\":\"rate_card\",\"rate_card_version\":\"rate_card_version\"}"); + var options = new Stripe.V2.Billing.RateCardSubscriptionUpdateOptions(); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.RateCardSubscriptions; + Stripe.V2.Billing.RateCardSubscription rateCardSubscription = service + .Update("id_123", options); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/rate_card_subscriptions/id_123"); + } + + [Fact] + public async Task TestV2BillingRateCardSubscriptionPost2Async() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/rate_card_subscriptions/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.rate_card_subscription\",\"billing_cadence\":\"billing_cadence\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"rate_card\":\"rate_card\",\"rate_card_version\":\"rate_card_version\"}"); + var options = new Stripe.V2.Billing.RateCardSubscriptionUpdateOptions(); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.RateCardSubscriptions; + Stripe.V2.Billing.RateCardSubscription rateCardSubscription = await service + .UpdateAsync("id_123", options); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/rate_card_subscriptions/id_123"); + } + + [Fact] + public void TestV2BillingRateCardSubscriptionPost3() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/rate_card_subscriptions/id_123/cancel", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.rate_card_subscription\",\"billing_cadence\":\"billing_cadence\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"rate_card\":\"rate_card\",\"rate_card_version\":\"rate_card_version\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.RateCardSubscriptions; + Stripe.V2.Billing.RateCardSubscription rateCardSubscription = service + .Cancel("id_123"); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/rate_card_subscriptions/id_123/cancel"); + } + + [Fact] + public async Task TestV2BillingRateCardSubscriptionPost3Async() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/rate_card_subscriptions/id_123/cancel", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.rate_card_subscription\",\"billing_cadence\":\"billing_cadence\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"rate_card\":\"rate_card\",\"rate_card_version\":\"rate_card_version\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.RateCardSubscriptions; + Stripe.V2.Billing.RateCardSubscription rateCardSubscription = await service + .CancelAsync("id_123"); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/rate_card_subscriptions/id_123/cancel"); + } + + [Fact] + public void TestV2BillingServiceActionPost() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/service_actions", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.service_action\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"service_interval\":\"month\",\"service_interval_count\":1375336415,\"type\":\"credit_grant\"}"); + var options = new Stripe.V2.Billing.ServiceActionCreateOptions + { + ServiceInterval = "month", + ServiceIntervalCount = 1375336415, + Type = "credit_grant", + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.ServiceActions; + Stripe.V2.Billing.ServiceAction serviceAction = service.Create( + options); + this.AssertRequest(HttpMethod.Post, "/v2/billing/service_actions"); + } + + [Fact] + public async Task TestV2BillingServiceActionPostAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/service_actions", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.service_action\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"service_interval\":\"month\",\"service_interval_count\":1375336415,\"type\":\"credit_grant\"}"); + var options = new Stripe.V2.Billing.ServiceActionCreateOptions + { + ServiceInterval = "month", + ServiceIntervalCount = 1375336415, + Type = "credit_grant", + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.ServiceActions; + Stripe.V2.Billing.ServiceAction serviceAction = await service + .CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v2/billing/service_actions"); + } + + [Fact] + public void TestV2BillingServiceActionGet() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/service_actions/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.service_action\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"service_interval\":\"month\",\"service_interval_count\":1375336415,\"type\":\"credit_grant\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.ServiceActions; + Stripe.V2.Billing.ServiceAction serviceAction = service.Get( + "id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/service_actions/id_123"); + } + + [Fact] + public async Task TestV2BillingServiceActionGetAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/service_actions/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.service_action\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"service_interval\":\"month\",\"service_interval_count\":1375336415,\"type\":\"credit_grant\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.ServiceActions; + Stripe.V2.Billing.ServiceAction serviceAction = await service + .GetAsync("id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/service_actions/id_123"); + } + + [Fact] + public void TestV2BillingServiceActionPost2() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/service_actions/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.service_action\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"service_interval\":\"month\",\"service_interval_count\":1375336415,\"type\":\"credit_grant\"}"); + var options = new Stripe.V2.Billing.ServiceActionUpdateOptions(); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.ServiceActions; + Stripe.V2.Billing.ServiceAction serviceAction = service.Update( + "id_123", + options); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/service_actions/id_123"); + } + + [Fact] + public async Task TestV2BillingServiceActionPost2Async() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/service_actions/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.service_action\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"service_interval\":\"month\",\"service_interval_count\":1375336415,\"type\":\"credit_grant\"}"); + var options = new Stripe.V2.Billing.ServiceActionUpdateOptions(); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.ServiceActions; + Stripe.V2.Billing.ServiceAction serviceAction = await service + .UpdateAsync("id_123", options); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/service_actions/id_123"); + } + + [Fact] + public void TestV2CommerceProductCatalogImportGet() + { + this.StubRequest( + HttpMethod.Get, + "/v2/commerce/product_catalog/imports", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.commerce.product_catalog_import\",\"created\":\"1970-01-12T21:42:34.472Z\",\"feed_type\":\"pricing\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"status\":\"awaiting_upload\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Commerce.ProductCatalog.Imports; + Stripe.V2.StripeList productCatalogImports = service + .List(); + this.AssertRequest( + HttpMethod.Get, + "/v2/commerce/product_catalog/imports"); + } + + [Fact] + public async Task TestV2CommerceProductCatalogImportGetAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/commerce/product_catalog/imports", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.commerce.product_catalog_import\",\"created\":\"1970-01-12T21:42:34.472Z\",\"feed_type\":\"pricing\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"status\":\"awaiting_upload\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Commerce.ProductCatalog.Imports; + Stripe.V2.StripeList productCatalogImports = await service + .ListAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v2/commerce/product_catalog/imports"); + } + + [Fact] + public void TestV2CommerceProductCatalogImportGetAutoPaging() + { + this.StubRequest( + HttpMethod.Get, + "/v2/commerce/product_catalog/imports", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.commerce.product_catalog_import\",\"created\":\"1970-01-12T21:42:34.472Z\",\"feed_type\":\"pricing\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"status\":\"awaiting_upload\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Commerce.ProductCatalog.Imports; + var productCatalogImport = service.ListAutoPaging().First(); + this.AssertRequest( + HttpMethod.Get, + "/v2/commerce/product_catalog/imports"); + } + + [Fact] + public async Task TestV2CommerceProductCatalogImportGetAutoPagingAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/commerce/product_catalog/imports", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.commerce.product_catalog_import\",\"created\":\"1970-01-12T21:42:34.472Z\",\"feed_type\":\"pricing\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"status\":\"awaiting_upload\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Commerce.ProductCatalog.Imports; + var productCatalogImport = await service.ListAutoPagingAsync() + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v2/commerce/product_catalog/imports"); + } + + [Fact] + public void TestV2CommerceProductCatalogImportPost() + { + this.StubRequest( + HttpMethod.Post, + "/v2/commerce/product_catalog/imports", + (HttpStatusCode)200, + "{\"object\":\"v2.commerce.product_catalog_import\",\"created\":\"1970-01-12T21:42:34.472Z\",\"feed_type\":\"pricing\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"status\":\"awaiting_upload\"}"); + var options = new Stripe.V2.Commerce.ProductCatalog.ImportCreateOptions + { + FeedType = "pricing", + Metadata = new Dictionary + { + { "key", "metadata" }, + }, + Mode = "upsert", + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Commerce.ProductCatalog.Imports; + Stripe.V2.Commerce.ProductCatalogImport productCatalogImport = service + .Create(options); + this.AssertRequest( + HttpMethod.Post, + "/v2/commerce/product_catalog/imports"); + } + + [Fact] + public async Task TestV2CommerceProductCatalogImportPostAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/commerce/product_catalog/imports", + (HttpStatusCode)200, + "{\"object\":\"v2.commerce.product_catalog_import\",\"created\":\"1970-01-12T21:42:34.472Z\",\"feed_type\":\"pricing\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"status\":\"awaiting_upload\"}"); + var options = new Stripe.V2.Commerce.ProductCatalog.ImportCreateOptions + { + FeedType = "pricing", + Metadata = new Dictionary + { + { "key", "metadata" }, + }, + Mode = "upsert", + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Commerce.ProductCatalog.Imports; + Stripe.V2.Commerce.ProductCatalogImport productCatalogImport = await service + .CreateAsync(options); + this.AssertRequest( + HttpMethod.Post, + "/v2/commerce/product_catalog/imports"); + } + + [Fact] + public void TestV2CommerceProductCatalogImportGet2() + { + this.StubRequest( + HttpMethod.Get, + "/v2/commerce/product_catalog/imports/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.commerce.product_catalog_import\",\"created\":\"1970-01-12T21:42:34.472Z\",\"feed_type\":\"pricing\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"status\":\"awaiting_upload\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Commerce.ProductCatalog.Imports; + Stripe.V2.Commerce.ProductCatalogImport productCatalogImport = service + .Get("id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/commerce/product_catalog/imports/id_123"); + } + + [Fact] + public async Task TestV2CommerceProductCatalogImportGet2Async() + { + this.StubRequest( + HttpMethod.Get, + "/v2/commerce/product_catalog/imports/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.commerce.product_catalog_import\",\"created\":\"1970-01-12T21:42:34.472Z\",\"feed_type\":\"pricing\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"status\":\"awaiting_upload\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Commerce.ProductCatalog.Imports; + Stripe.V2.Commerce.ProductCatalogImport productCatalogImport = await service + .GetAsync("id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/commerce/product_catalog/imports/id_123"); + } + + [Fact] + public void TestV2CoreAccountGet() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/accounts", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.core.account\",\"applied_configurations\":[\"card_creator\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Accounts; + Stripe.V2.StripeList accounts = service + .List(); + this.AssertRequest(HttpMethod.Get, "/v2/core/accounts"); + } + + [Fact] + public async Task TestV2CoreAccountGetAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/accounts", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.core.account\",\"applied_configurations\":[\"card_creator\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Accounts; + Stripe.V2.StripeList accounts = await service + .ListAsync(); + this.AssertRequest(HttpMethod.Get, "/v2/core/accounts"); + } + + [Fact] + public void TestV2CoreAccountGetAutoPaging() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/accounts", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.core.account\",\"applied_configurations\":[\"card_creator\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Accounts; + var account = service.ListAutoPaging().First(); + this.AssertRequest(HttpMethod.Get, "/v2/core/accounts"); + } + + [Fact] + public async Task TestV2CoreAccountGetAutoPagingAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/accounts", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.core.account\",\"applied_configurations\":[\"card_creator\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Accounts; + var account = await service.ListAutoPagingAsync().FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v2/core/accounts"); + } + + [Fact] + public void TestV2CoreAccountPost() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/accounts", + (HttpStatusCode)200, + "{\"object\":\"v2.core.account\",\"applied_configurations\":[\"card_creator\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true}"); + var options = new Stripe.V2.Core.AccountCreateOptions(); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Accounts; + Stripe.V2.Core.Account account = service.Create(options); + this.AssertRequest(HttpMethod.Post, "/v2/core/accounts"); + } + + [Fact] + public async Task TestV2CoreAccountPostAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/accounts", + (HttpStatusCode)200, + "{\"object\":\"v2.core.account\",\"applied_configurations\":[\"card_creator\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true}"); + var options = new Stripe.V2.Core.AccountCreateOptions(); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Accounts; + Stripe.V2.Core.Account account = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v2/core/accounts"); + } + + [Fact] + public void TestV2CoreAccountGet2() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/accounts/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.core.account\",\"applied_configurations\":[\"card_creator\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Accounts; + Stripe.V2.Core.Account account = service.Get("id_123"); + this.AssertRequest(HttpMethod.Get, "/v2/core/accounts/id_123"); + } + + [Fact] + public async Task TestV2CoreAccountGet2Async() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/accounts/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.core.account\",\"applied_configurations\":[\"card_creator\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Accounts; + Stripe.V2.Core.Account account = await service.GetAsync("id_123"); + this.AssertRequest(HttpMethod.Get, "/v2/core/accounts/id_123"); + } + + [Fact] + public void TestV2CoreAccountPost2() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/accounts/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.core.account\",\"applied_configurations\":[\"card_creator\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true}"); + var options = new Stripe.V2.Core.AccountUpdateOptions(); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Accounts; + Stripe.V2.Core.Account account = service.Update("id_123", options); + this.AssertRequest(HttpMethod.Post, "/v2/core/accounts/id_123"); + } + + [Fact] + public async Task TestV2CoreAccountPost2Async() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/accounts/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.core.account\",\"applied_configurations\":[\"card_creator\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true}"); + var options = new Stripe.V2.Core.AccountUpdateOptions(); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Accounts; + Stripe.V2.Core.Account account = await service.UpdateAsync( + "id_123", + options); + this.AssertRequest(HttpMethod.Post, "/v2/core/accounts/id_123"); + } + + [Fact] + public void TestV2CoreAccountPost3() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/accounts/id_123/close", + (HttpStatusCode)200, + "{\"object\":\"v2.core.account\",\"applied_configurations\":[\"card_creator\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Accounts; + Stripe.V2.Core.Account account = service.Close("id_123"); + this.AssertRequest( + HttpMethod.Post, + "/v2/core/accounts/id_123/close"); + } + + [Fact] + public async Task TestV2CoreAccountPost3Async() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/accounts/id_123/close", + (HttpStatusCode)200, + "{\"object\":\"v2.core.account\",\"applied_configurations\":[\"card_creator\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Accounts; + Stripe.V2.Core.Account account = await service.CloseAsync("id_123"); + this.AssertRequest( + HttpMethod.Post, + "/v2/core/accounts/id_123/close"); + } + + [Fact] + public void TestV2CoreAccountsPersonGet() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/accounts/account_id_123/persons", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.core.account_person\",\"account\":\"account\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"updated\":\"1970-01-03T17:07:10.277Z\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Accounts.Persons; + Stripe.V2.StripeList accountPersons = service + .List("account_id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/core/accounts/account_id_123/persons"); + } + + [Fact] + public async Task TestV2CoreAccountsPersonGetAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/accounts/account_id_123/persons", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.core.account_person\",\"account\":\"account\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"updated\":\"1970-01-03T17:07:10.277Z\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Accounts.Persons; + Stripe.V2.StripeList accountPersons = await service + .ListAsync("account_id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/core/accounts/account_id_123/persons"); + } + + [Fact] + public void TestV2CoreAccountsPersonGetAutoPaging() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/accounts/account_id_123/persons", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.core.account_person\",\"account\":\"account\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"updated\":\"1970-01-03T17:07:10.277Z\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Accounts.Persons; + var accountPerson = service.ListAutoPaging("account_id_123") + .First(); + this.AssertRequest( + HttpMethod.Get, + "/v2/core/accounts/account_id_123/persons"); + } + + [Fact] + public async Task TestV2CoreAccountsPersonGetAutoPagingAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/accounts/account_id_123/persons", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.core.account_person\",\"account\":\"account\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"updated\":\"1970-01-03T17:07:10.277Z\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Accounts.Persons; + var accountPerson = await service.ListAutoPagingAsync( + "account_id_123") + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v2/core/accounts/account_id_123/persons"); + } + + [Fact] + public void TestV2CoreAccountsPersonPost() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/accounts/account_id_123/persons", + (HttpStatusCode)200, + "{\"object\":\"v2.core.account_person\",\"account\":\"account\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"updated\":\"1970-01-03T17:07:10.277Z\"}"); + var options = new Stripe.V2.Core.Accounts.PersonCreateOptions(); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Accounts.Persons; + Stripe.V2.Core.AccountPerson accountPerson = service.Create( + "account_id_123", + options); + this.AssertRequest( + HttpMethod.Post, + "/v2/core/accounts/account_id_123/persons"); + } + + [Fact] + public async Task TestV2CoreAccountsPersonPostAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/accounts/account_id_123/persons", + (HttpStatusCode)200, + "{\"object\":\"v2.core.account_person\",\"account\":\"account\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"updated\":\"1970-01-03T17:07:10.277Z\"}"); + var options = new Stripe.V2.Core.Accounts.PersonCreateOptions(); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Accounts.Persons; + Stripe.V2.Core.AccountPerson accountPerson = await service + .CreateAsync("account_id_123", options); + this.AssertRequest( + HttpMethod.Post, + "/v2/core/accounts/account_id_123/persons"); + } + + [Fact] + public void TestV2CoreAccountsPersonDelete() + { + this.StubRequest( + HttpMethod.Delete, + "/v2/core/accounts/account_id_123/persons/id_123", + (HttpStatusCode)200, + "{\"id\":\"abc_123\",\"object\":\"some.object.tag\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Accounts.Persons; + Stripe.V2.DeletedObject deleted = service.Delete( + "account_id_123", + "id_123"); + this.AssertRequest( + HttpMethod.Delete, + "/v2/core/accounts/account_id_123/persons/id_123"); + } + + [Fact] + public async Task TestV2CoreAccountsPersonDeleteAsync() + { + this.StubRequest( + HttpMethod.Delete, + "/v2/core/accounts/account_id_123/persons/id_123", + (HttpStatusCode)200, + "{\"id\":\"abc_123\",\"object\":\"some.object.tag\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Accounts.Persons; + Stripe.V2.DeletedObject deleted = await service.DeleteAsync( + "account_id_123", + "id_123"); + this.AssertRequest( + HttpMethod.Delete, + "/v2/core/accounts/account_id_123/persons/id_123"); + } + + [Fact] + public void TestV2CoreAccountsPersonGet2() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/accounts/account_id_123/persons/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.core.account_person\",\"account\":\"account\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"updated\":\"1970-01-03T17:07:10.277Z\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Accounts.Persons; + Stripe.V2.Core.AccountPerson accountPerson = service.Get( + "account_id_123", + "id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/core/accounts/account_id_123/persons/id_123"); + } + + [Fact] + public async Task TestV2CoreAccountsPersonGet2Async() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/accounts/account_id_123/persons/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.core.account_person\",\"account\":\"account\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"updated\":\"1970-01-03T17:07:10.277Z\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Accounts.Persons; + Stripe.V2.Core.AccountPerson accountPerson = await service.GetAsync( + "account_id_123", + "id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/core/accounts/account_id_123/persons/id_123"); + } + + [Fact] + public void TestV2CoreAccountsPersonPost2() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/accounts/account_id_123/persons/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.core.account_person\",\"account\":\"account\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"updated\":\"1970-01-03T17:07:10.277Z\"}"); + var options = new Stripe.V2.Core.Accounts.PersonUpdateOptions(); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Accounts.Persons; + Stripe.V2.Core.AccountPerson accountPerson = service.Update( + "account_id_123", + "id_123", + options); + this.AssertRequest( + HttpMethod.Post, + "/v2/core/accounts/account_id_123/persons/id_123"); + } + + [Fact] + public async Task TestV2CoreAccountsPersonPost2Async() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/accounts/account_id_123/persons/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.core.account_person\",\"account\":\"account\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"updated\":\"1970-01-03T17:07:10.277Z\"}"); + var options = new Stripe.V2.Core.Accounts.PersonUpdateOptions(); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Accounts.Persons; + Stripe.V2.Core.AccountPerson accountPerson = await service + .UpdateAsync("account_id_123", "id_123", options); + this.AssertRequest( + HttpMethod.Post, + "/v2/core/accounts/account_id_123/persons/id_123"); + } + + [Fact] + public void TestV2CoreAccountsPersonTokenPost() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/accounts/account_id_123/person_tokens", + (HttpStatusCode)200, + "{\"object\":\"v2.core.account_person_token\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"used\":true}"); + var options = new Stripe.V2.Core.Accounts.PersonTokenCreateOptions(); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Accounts.PersonTokens; + Stripe.V2.Core.AccountPersonToken accountPersonToken = service + .Create("account_id_123", options); + this.AssertRequest( + HttpMethod.Post, + "/v2/core/accounts/account_id_123/person_tokens"); + } + + [Fact] + public async Task TestV2CoreAccountsPersonTokenPostAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/accounts/account_id_123/person_tokens", + (HttpStatusCode)200, + "{\"object\":\"v2.core.account_person_token\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"used\":true}"); + var options = new Stripe.V2.Core.Accounts.PersonTokenCreateOptions(); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Accounts.PersonTokens; + Stripe.V2.Core.AccountPersonToken accountPersonToken = await service + .CreateAsync("account_id_123", options); + this.AssertRequest( + HttpMethod.Post, + "/v2/core/accounts/account_id_123/person_tokens"); + } + + [Fact] + public void TestV2CoreAccountsPersonTokenGet() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/accounts/account_id_123/person_tokens/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.core.account_person_token\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"used\":true}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Accounts.PersonTokens; + Stripe.V2.Core.AccountPersonToken accountPersonToken = service.Get( + "account_id_123", + "id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/core/accounts/account_id_123/person_tokens/id_123"); + } + + [Fact] + public async Task TestV2CoreAccountsPersonTokenGetAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/accounts/account_id_123/person_tokens/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.core.account_person_token\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"used\":true}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Accounts.PersonTokens; + Stripe.V2.Core.AccountPersonToken accountPersonToken = await service + .GetAsync("account_id_123", "id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/core/accounts/account_id_123/person_tokens/id_123"); + } + + [Fact] + public void TestV2CoreAccountEvaluationPost() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/account_evaluations", + (HttpStatusCode)200, + "{\"object\":\"v2.core.account_evaluation\",\"created\":\"1970-01-12T21:42:34.472Z\",\"evaluations_triggered\":[\"fraudulent_website\"],\"id\":\"obj_123\",\"livemode\":true}"); + var options = new Stripe.V2.Core.AccountEvaluationCreateOptions + { + Signals = new List { "fraudulent_website" }, + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.AccountEvaluations; + Stripe.V2.Core.AccountEvaluation accountEvaluation = service.Create( + options); + this.AssertRequest(HttpMethod.Post, "/v2/core/account_evaluations"); + } + + [Fact] + public async Task TestV2CoreAccountEvaluationPostAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/account_evaluations", + (HttpStatusCode)200, + "{\"object\":\"v2.core.account_evaluation\",\"created\":\"1970-01-12T21:42:34.472Z\",\"evaluations_triggered\":[\"fraudulent_website\"],\"id\":\"obj_123\",\"livemode\":true}"); + var options = new Stripe.V2.Core.AccountEvaluationCreateOptions + { + Signals = new List { "fraudulent_website" }, + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.AccountEvaluations; + Stripe.V2.Core.AccountEvaluation accountEvaluation = await service + .CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v2/core/account_evaluations"); + } + + [Fact] + public void TestV2CoreAccountLinkPost() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/account_links", + (HttpStatusCode)200, + "{\"object\":\"v2.core.account_link\",\"account\":\"account\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"livemode\":true,\"url\":\"url\",\"use_case\":{\"type\":\"recipient_onboarding\"}}"); + var options = new Stripe.V2.Core.AccountLinkCreateOptions + { + Account = "account", + UseCase = new Stripe.V2.Core.AccountLinkCreateUseCaseOptions + { + AccountOnboarding = new Stripe.V2.Core.AccountLinkCreateUseCaseAccountOnboardingOptions + { + CollectionOptions = new Stripe.V2.Core.AccountLinkCreateUseCaseAccountOnboardingCollectionOptionsOptions + { + Fields = "eventually_due", + FutureRequirements = "include", + }, + Configurations = new List { "storer" }, + RefreshUrl = "refresh_url", + ReturnUrl = "return_url", + }, + AccountUpdate = new Stripe.V2.Core.AccountLinkCreateUseCaseAccountUpdateOptions + { + CollectionOptions = new Stripe.V2.Core.AccountLinkCreateUseCaseAccountUpdateCollectionOptionsOptions + { + Fields = "eventually_due", + FutureRequirements = "include", + }, + Configurations = new List { "storer" }, + RefreshUrl = "refresh_url", + ReturnUrl = "return_url", + }, + RecipientOnboarding = new Stripe.V2.Core.AccountLinkCreateUseCaseRecipientOnboardingOptions + { + CollectionOptions = new Stripe.V2.Core.AccountLinkCreateUseCaseRecipientOnboardingCollectionOptionsOptions + { + Fields = "eventually_due", + FutureRequirements = "include", + }, + Configurations = new List { "recipient" }, + RefreshUrl = "refresh_url", + ReturnUrl = "return_url", + }, + RecipientUpdate = new Stripe.V2.Core.AccountLinkCreateUseCaseRecipientUpdateOptions + { + CollectionOptions = new Stripe.V2.Core.AccountLinkCreateUseCaseRecipientUpdateCollectionOptionsOptions + { + Fields = "eventually_due", + FutureRequirements = "include", + }, + Configurations = new List { "recipient" }, + RefreshUrl = "refresh_url", + ReturnUrl = "return_url", + }, + Type = "recipient_onboarding", + }, + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.AccountLinks; + Stripe.V2.Core.AccountLink accountLink = service.Create(options); + this.AssertRequest(HttpMethod.Post, "/v2/core/account_links"); + } + + [Fact] + public async Task TestV2CoreAccountLinkPostAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/account_links", + (HttpStatusCode)200, + "{\"object\":\"v2.core.account_link\",\"account\":\"account\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"livemode\":true,\"url\":\"url\",\"use_case\":{\"type\":\"recipient_onboarding\"}}"); + var options = new Stripe.V2.Core.AccountLinkCreateOptions + { + Account = "account", + UseCase = new Stripe.V2.Core.AccountLinkCreateUseCaseOptions + { + AccountOnboarding = new Stripe.V2.Core.AccountLinkCreateUseCaseAccountOnboardingOptions + { + CollectionOptions = new Stripe.V2.Core.AccountLinkCreateUseCaseAccountOnboardingCollectionOptionsOptions + { + Fields = "eventually_due", + FutureRequirements = "include", + }, + Configurations = new List { "storer" }, + RefreshUrl = "refresh_url", + ReturnUrl = "return_url", + }, + AccountUpdate = new Stripe.V2.Core.AccountLinkCreateUseCaseAccountUpdateOptions + { + CollectionOptions = new Stripe.V2.Core.AccountLinkCreateUseCaseAccountUpdateCollectionOptionsOptions + { + Fields = "eventually_due", + FutureRequirements = "include", + }, + Configurations = new List { "storer" }, + RefreshUrl = "refresh_url", + ReturnUrl = "return_url", + }, + RecipientOnboarding = new Stripe.V2.Core.AccountLinkCreateUseCaseRecipientOnboardingOptions + { + CollectionOptions = new Stripe.V2.Core.AccountLinkCreateUseCaseRecipientOnboardingCollectionOptionsOptions + { + Fields = "eventually_due", + FutureRequirements = "include", + }, + Configurations = new List { "recipient" }, + RefreshUrl = "refresh_url", + ReturnUrl = "return_url", + }, + RecipientUpdate = new Stripe.V2.Core.AccountLinkCreateUseCaseRecipientUpdateOptions + { + CollectionOptions = new Stripe.V2.Core.AccountLinkCreateUseCaseRecipientUpdateCollectionOptionsOptions + { + Fields = "eventually_due", + FutureRequirements = "include", + }, + Configurations = new List { "recipient" }, + RefreshUrl = "refresh_url", + ReturnUrl = "return_url", + }, + Type = "recipient_onboarding", + }, + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.AccountLinks; + Stripe.V2.Core.AccountLink accountLink = await service.CreateAsync( + options); + this.AssertRequest(HttpMethod.Post, "/v2/core/account_links"); + } + + [Fact] + public void TestV2CoreAccountTokenPost() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/account_tokens", + (HttpStatusCode)200, + "{\"object\":\"v2.core.account_token\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"used\":true}"); + var options = new Stripe.V2.Core.AccountTokenCreateOptions(); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.AccountTokens; + Stripe.V2.Core.AccountToken accountToken = service.Create(options); + this.AssertRequest(HttpMethod.Post, "/v2/core/account_tokens"); + } + + [Fact] + public async Task TestV2CoreAccountTokenPostAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/account_tokens", + (HttpStatusCode)200, + "{\"object\":\"v2.core.account_token\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"used\":true}"); + var options = new Stripe.V2.Core.AccountTokenCreateOptions(); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.AccountTokens; + Stripe.V2.Core.AccountToken accountToken = await service + .CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v2/core/account_tokens"); + } + + [Fact] + public void TestV2CoreAccountTokenGet() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/account_tokens/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.core.account_token\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"used\":true}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.AccountTokens; + Stripe.V2.Core.AccountToken accountToken = service.Get("id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/core/account_tokens/id_123"); + } + + [Fact] + public async Task TestV2CoreAccountTokenGetAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/account_tokens/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.core.account_token\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"used\":true}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.AccountTokens; + Stripe.V2.Core.AccountToken accountToken = await service.GetAsync( + "id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/core/account_tokens/id_123"); + } + + [Fact] + public void TestV2CoreApprovalRequestGet() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/approval_requests", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.core.approval_request\",\"action\":\"refund.create\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"requested_by\":{\"id\":\"obj_123\"},\"status\":\"failed\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.ApprovalRequests; + Stripe.V2.StripeList approvalRequests = service + .List(); + this.AssertRequest(HttpMethod.Get, "/v2/core/approval_requests"); + } + + [Fact] + public async Task TestV2CoreApprovalRequestGetAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/approval_requests", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.core.approval_request\",\"action\":\"refund.create\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"requested_by\":{\"id\":\"obj_123\"},\"status\":\"failed\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.ApprovalRequests; + Stripe.V2.StripeList approvalRequests = await service + .ListAsync(); + this.AssertRequest(HttpMethod.Get, "/v2/core/approval_requests"); + } + + [Fact] + public void TestV2CoreApprovalRequestGetAutoPaging() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/approval_requests", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.core.approval_request\",\"action\":\"refund.create\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"requested_by\":{\"id\":\"obj_123\"},\"status\":\"failed\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.ApprovalRequests; + var approvalRequest = service.ListAutoPaging().First(); + this.AssertRequest(HttpMethod.Get, "/v2/core/approval_requests"); + } + + [Fact] + public async Task TestV2CoreApprovalRequestGetAutoPagingAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/approval_requests", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.core.approval_request\",\"action\":\"refund.create\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"requested_by\":{\"id\":\"obj_123\"},\"status\":\"failed\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.ApprovalRequests; + var approvalRequest = await service.ListAutoPagingAsync() + .FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v2/core/approval_requests"); + } + + [Fact] + public void TestV2CoreApprovalRequestGet2() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/approval_requests/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.core.approval_request\",\"action\":\"refund.create\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"requested_by\":{\"id\":\"obj_123\"},\"status\":\"failed\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.ApprovalRequests; + Stripe.V2.Core.ApprovalRequest approvalRequest = service.Get( + "id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/core/approval_requests/id_123"); + } + + [Fact] + public async Task TestV2CoreApprovalRequestGet2Async() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/approval_requests/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.core.approval_request\",\"action\":\"refund.create\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"requested_by\":{\"id\":\"obj_123\"},\"status\":\"failed\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.ApprovalRequests; + Stripe.V2.Core.ApprovalRequest approvalRequest = await service + .GetAsync("id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/core/approval_requests/id_123"); + } + + [Fact] + public void TestV2CoreApprovalRequestPost() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/approval_requests/id_123/cancel", + (HttpStatusCode)200, + "{\"object\":\"v2.core.approval_request\",\"action\":\"refund.create\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"requested_by\":{\"id\":\"obj_123\"},\"status\":\"failed\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.ApprovalRequests; + Stripe.V2.Core.ApprovalRequest approvalRequest = service.Cancel( + "id_123"); + this.AssertRequest( + HttpMethod.Post, + "/v2/core/approval_requests/id_123/cancel"); + } + + [Fact] + public async Task TestV2CoreApprovalRequestPostAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/approval_requests/id_123/cancel", + (HttpStatusCode)200, + "{\"object\":\"v2.core.approval_request\",\"action\":\"refund.create\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"requested_by\":{\"id\":\"obj_123\"},\"status\":\"failed\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.ApprovalRequests; + Stripe.V2.Core.ApprovalRequest approvalRequest = await service + .CancelAsync("id_123"); + this.AssertRequest( + HttpMethod.Post, + "/v2/core/approval_requests/id_123/cancel"); + } + + [Fact] + public void TestV2CoreApprovalRequestPost2() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/approval_requests/id_123/execute", + (HttpStatusCode)200, + "{\"object\":\"v2.core.approval_request\",\"action\":\"refund.create\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"requested_by\":{\"id\":\"obj_123\"},\"status\":\"failed\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.ApprovalRequests; + Stripe.V2.Core.ApprovalRequest approvalRequest = service.Execute( + "id_123"); + this.AssertRequest( + HttpMethod.Post, + "/v2/core/approval_requests/id_123/execute"); + } + + [Fact] + public async Task TestV2CoreApprovalRequestPost2Async() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/approval_requests/id_123/execute", + (HttpStatusCode)200, + "{\"object\":\"v2.core.approval_request\",\"action\":\"refund.create\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"requested_by\":{\"id\":\"obj_123\"},\"status\":\"failed\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.ApprovalRequests; + Stripe.V2.Core.ApprovalRequest approvalRequest = await service + .ExecuteAsync("id_123"); + this.AssertRequest( + HttpMethod.Post, + "/v2/core/approval_requests/id_123/execute"); + } + + [Fact] + public void TestV2CoreApprovalRequestPost3() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/approval_requests/id_123/submit", + (HttpStatusCode)200, + "{\"object\":\"v2.core.approval_request\",\"action\":\"refund.create\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"requested_by\":{\"id\":\"obj_123\"},\"status\":\"failed\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.ApprovalRequests; + Stripe.V2.Core.ApprovalRequest approvalRequest = service.Submit( + "id_123"); + this.AssertRequest( + HttpMethod.Post, + "/v2/core/approval_requests/id_123/submit"); + } + + [Fact] + public async Task TestV2CoreApprovalRequestPost3Async() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/approval_requests/id_123/submit", + (HttpStatusCode)200, + "{\"object\":\"v2.core.approval_request\",\"action\":\"refund.create\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"requested_by\":{\"id\":\"obj_123\"},\"status\":\"failed\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.ApprovalRequests; + Stripe.V2.Core.ApprovalRequest approvalRequest = await service + .SubmitAsync("id_123"); + this.AssertRequest( + HttpMethod.Post, + "/v2/core/approval_requests/id_123/submit"); + } + + [Fact] + public void TestV2CoreBatchJobPost() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/batch_jobs", + (HttpStatusCode)200, + "{\"object\":\"v2.core.batch_job\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"maximum_rps\":1686015830,\"metadata\":{\"key\":\"metadata\"},\"skip_validation\":true,\"status\":\"batch_failed\"}"); + var options = new Stripe.V2.Core.BatchJobCreateOptions + { + Endpoint = new Stripe.V2.Core.BatchJobCreateEndpointOptions + { + HttpMethod = "delete", + Path = BatchJobEndpointPath.V1ProductCreate, + }, + Metadata = new Dictionary + { + { "key", "metadata" }, + }, + SkipValidation = true, + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.BatchJobs; + Stripe.V2.Core.BatchJob batchJob = service.Create(options); + this.AssertRequest(HttpMethod.Post, "/v2/core/batch_jobs"); + } + + [Fact] + public async Task TestV2CoreBatchJobPostAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/batch_jobs", + (HttpStatusCode)200, + "{\"object\":\"v2.core.batch_job\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"maximum_rps\":1686015830,\"metadata\":{\"key\":\"metadata\"},\"skip_validation\":true,\"status\":\"batch_failed\"}"); + var options = new Stripe.V2.Core.BatchJobCreateOptions + { + Endpoint = new Stripe.V2.Core.BatchJobCreateEndpointOptions + { + HttpMethod = "delete", + Path = BatchJobEndpointPath.V1ProductCreate, + }, + Metadata = new Dictionary + { + { "key", "metadata" }, + }, + SkipValidation = true, + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.BatchJobs; + Stripe.V2.Core.BatchJob batchJob = await service.CreateAsync( + options); + this.AssertRequest(HttpMethod.Post, "/v2/core/batch_jobs"); + } + + [Fact] + public void TestV2CoreBatchJobGet() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/batch_jobs/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.core.batch_job\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"maximum_rps\":1686015830,\"metadata\":{\"key\":\"metadata\"},\"skip_validation\":true,\"status\":\"batch_failed\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.BatchJobs; + Stripe.V2.Core.BatchJob batchJob = service.Get("id_123"); + this.AssertRequest(HttpMethod.Get, "/v2/core/batch_jobs/id_123"); + } + + [Fact] + public async Task TestV2CoreBatchJobGetAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/batch_jobs/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.core.batch_job\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"maximum_rps\":1686015830,\"metadata\":{\"key\":\"metadata\"},\"skip_validation\":true,\"status\":\"batch_failed\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.BatchJobs; + Stripe.V2.Core.BatchJob batchJob = await service.GetAsync("id_123"); + this.AssertRequest(HttpMethod.Get, "/v2/core/batch_jobs/id_123"); + } + + [Fact] + public void TestV2CoreBatchJobPost2() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/batch_jobs/id_123/cancel", + (HttpStatusCode)200, + "{\"object\":\"v2.core.batch_job\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"maximum_rps\":1686015830,\"metadata\":{\"key\":\"metadata\"},\"skip_validation\":true,\"status\":\"batch_failed\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.BatchJobs; + Stripe.V2.Core.BatchJob batchJob = service.Cancel("id_123"); + this.AssertRequest( + HttpMethod.Post, + "/v2/core/batch_jobs/id_123/cancel"); + } + + [Fact] + public async Task TestV2CoreBatchJobPost2Async() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/batch_jobs/id_123/cancel", + (HttpStatusCode)200, + "{\"object\":\"v2.core.batch_job\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"maximum_rps\":1686015830,\"metadata\":{\"key\":\"metadata\"},\"skip_validation\":true,\"status\":\"batch_failed\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.BatchJobs; + Stripe.V2.Core.BatchJob batchJob = await service.CancelAsync( + "id_123"); + this.AssertRequest( + HttpMethod.Post, + "/v2/core/batch_jobs/id_123/cancel"); + } + + [Fact] + public void TestV2CoreClaimableSandboxPost() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/claimable_sandboxes", + (HttpStatusCode)200, + "{\"object\":\"v2.core.claimable_sandbox\",\"app_channel\":\"testing\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"onboarding_link_details\":{\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"refresh_url\":\"refresh_url\",\"url\":\"url\"},\"prefill\":{\"country\":\"country\",\"email\":\"email\",\"name\":\"name\"},\"sandbox_details\":{\"account\":\"account\"},\"status\":\"live\"}"); + var options = new Stripe.V2.Core.ClaimableSandboxCreateOptions + { + EnableMcpAccess = true, + OnboardingLinkDetails = new Stripe.V2.Core.ClaimableSandboxCreateOnboardingLinkDetailsOptions + { + RefreshUrl = "refresh_url", + }, + Prefill = new Stripe.V2.Core.ClaimableSandboxCreatePrefillOptions + { + Country = "country", + Email = "email", + Name = "name", + }, + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.ClaimableSandboxes; + Stripe.V2.Core.ClaimableSandbox claimableSandbox = service.Create( + options); + this.AssertRequest(HttpMethod.Post, "/v2/core/claimable_sandboxes"); + } + + [Fact] + public async Task TestV2CoreClaimableSandboxPostAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/claimable_sandboxes", + (HttpStatusCode)200, + "{\"object\":\"v2.core.claimable_sandbox\",\"app_channel\":\"testing\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"onboarding_link_details\":{\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"refresh_url\":\"refresh_url\",\"url\":\"url\"},\"prefill\":{\"country\":\"country\",\"email\":\"email\",\"name\":\"name\"},\"sandbox_details\":{\"account\":\"account\"},\"status\":\"live\"}"); + var options = new Stripe.V2.Core.ClaimableSandboxCreateOptions + { + EnableMcpAccess = true, + OnboardingLinkDetails = new Stripe.V2.Core.ClaimableSandboxCreateOnboardingLinkDetailsOptions + { + RefreshUrl = "refresh_url", + }, + Prefill = new Stripe.V2.Core.ClaimableSandboxCreatePrefillOptions + { + Country = "country", + Email = "email", + Name = "name", + }, + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.ClaimableSandboxes; + Stripe.V2.Core.ClaimableSandbox claimableSandbox = await service + .CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v2/core/claimable_sandboxes"); + } + + [Fact] + public void TestV2CoreClaimableSandboxGet() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/claimable_sandboxes/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.core.claimable_sandbox\",\"app_channel\":\"testing\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"onboarding_link_details\":{\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"refresh_url\":\"refresh_url\",\"url\":\"url\"},\"prefill\":{\"country\":\"country\",\"email\":\"email\",\"name\":\"name\"},\"sandbox_details\":{\"account\":\"account\"},\"status\":\"live\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.ClaimableSandboxes; + Stripe.V2.Core.ClaimableSandbox claimableSandbox = service.Get( + "id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/core/claimable_sandboxes/id_123"); + } + + [Fact] + public async Task TestV2CoreClaimableSandboxGetAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/claimable_sandboxes/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.core.claimable_sandbox\",\"app_channel\":\"testing\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"onboarding_link_details\":{\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"refresh_url\":\"refresh_url\",\"url\":\"url\"},\"prefill\":{\"country\":\"country\",\"email\":\"email\",\"name\":\"name\"},\"sandbox_details\":{\"account\":\"account\"},\"status\":\"live\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.ClaimableSandboxes; + Stripe.V2.Core.ClaimableSandbox claimableSandbox = await service + .GetAsync("id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/core/claimable_sandboxes/id_123"); + } + + [Fact] + public void TestV2CoreClaimableSandboxPost2() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/claimable_sandboxes/id_123/renew_onboarding_link", + (HttpStatusCode)200, + "{\"object\":\"v2.core.claimable_sandbox\",\"app_channel\":\"testing\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"onboarding_link_details\":{\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"refresh_url\":\"refresh_url\",\"url\":\"url\"},\"prefill\":{\"country\":\"country\",\"email\":\"email\",\"name\":\"name\"},\"sandbox_details\":{\"account\":\"account\"},\"status\":\"live\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.ClaimableSandboxes; + Stripe.V2.Core.ClaimableSandbox claimableSandbox = service + .RenewOnboardingLink("id_123"); + this.AssertRequest( + HttpMethod.Post, + "/v2/core/claimable_sandboxes/id_123/renew_onboarding_link"); + } + + [Fact] + public async Task TestV2CoreClaimableSandboxPost2Async() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/claimable_sandboxes/id_123/renew_onboarding_link", + (HttpStatusCode)200, + "{\"object\":\"v2.core.claimable_sandbox\",\"app_channel\":\"testing\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"onboarding_link_details\":{\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"refresh_url\":\"refresh_url\",\"url\":\"url\"},\"prefill\":{\"country\":\"country\",\"email\":\"email\",\"name\":\"name\"},\"sandbox_details\":{\"account\":\"account\"},\"status\":\"live\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.ClaimableSandboxes; + Stripe.V2.Core.ClaimableSandbox claimableSandbox = await service + .RenewOnboardingLinkAsync("id_123"); + this.AssertRequest( + HttpMethod.Post, + "/v2/core/claimable_sandboxes/id_123/renew_onboarding_link"); + } + + [Fact] + public void TestV2CoreConnectionSessionPost() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/connection_sessions", + (HttpStatusCode)200, + "{\"object\":\"v2.core.connection_session\",\"account\":\"account\",\"client_secret\":\"client_secret\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true}"); + var options = new Stripe.V2.Core.ConnectionSessionCreateOptions + { + Account = "account", + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.ConnectionSessions; + Stripe.V2.Core.ConnectionSession connectionSession = service.Create( + options); + this.AssertRequest(HttpMethod.Post, "/v2/core/connection_sessions"); + } + + [Fact] + public async Task TestV2CoreConnectionSessionPostAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/connection_sessions", + (HttpStatusCode)200, + "{\"object\":\"v2.core.connection_session\",\"account\":\"account\",\"client_secret\":\"client_secret\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true}"); + var options = new Stripe.V2.Core.ConnectionSessionCreateOptions + { + Account = "account", + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.ConnectionSessions; + Stripe.V2.Core.ConnectionSession connectionSession = await service + .CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v2/core/connection_sessions"); + } + + [Fact] + public void TestV2CoreConnectionSessionGet() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/connection_sessions/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.core.connection_session\",\"account\":\"account\",\"client_secret\":\"client_secret\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.ConnectionSessions; + Stripe.V2.Core.ConnectionSession connectionSession = service.Get( + "id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/core/connection_sessions/id_123"); + } + + [Fact] + public async Task TestV2CoreConnectionSessionGetAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/connection_sessions/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.core.connection_session\",\"account\":\"account\",\"client_secret\":\"client_secret\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.ConnectionSessions; + Stripe.V2.Core.ConnectionSession connectionSession = await service + .GetAsync("id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/core/connection_sessions/id_123"); + } + + [Fact] + public void TestV2CoreEventGet() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/events", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.core.event\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"type\":\"type\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Events; + Stripe.V2.StripeList events = service.List(); + this.AssertRequest(HttpMethod.Get, "/v2/core/events"); + } + + [Fact] + public async Task TestV2CoreEventGetAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/events", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.core.event\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"type\":\"type\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Events; + Stripe.V2.StripeList events = await service + .ListAsync(); + this.AssertRequest(HttpMethod.Get, "/v2/core/events"); + } + + [Fact] + public void TestV2CoreEventGetAutoPaging() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/events", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.core.event\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"type\":\"type\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Events; + var result = service.ListAutoPaging().First(); + this.AssertRequest(HttpMethod.Get, "/v2/core/events"); + } + + [Fact] + public async Task TestV2CoreEventGetAutoPagingAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/events", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.core.event\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"type\":\"type\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Events; + var result = await service.ListAutoPagingAsync().FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v2/core/events"); + } + + [Fact] + public void TestV2CoreEventGet2() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/events/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.core.event\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"type\":\"type\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Events; + Stripe.V2.Core.Event result = service.Get("id_123"); + this.AssertRequest(HttpMethod.Get, "/v2/core/events/id_123"); + } + + [Fact] + public async Task TestV2CoreEventGet2Async() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/events/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.core.event\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"type\":\"type\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Events; + Stripe.V2.Core.Event result = await service.GetAsync("id_123"); + this.AssertRequest(HttpMethod.Get, "/v2/core/events/id_123"); + } + + [Fact] + public void TestV2CoreEventDestinationGet() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/event_destinations", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.core.event_destination\",\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"id\":\"obj_123\",\"livemode\":true,\"name\":\"name\",\"status\":\"disabled\",\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.EventDestinations; + Stripe.V2.StripeList eventDestinations = service + .List(); + this.AssertRequest(HttpMethod.Get, "/v2/core/event_destinations"); + } + + [Fact] + public async Task TestV2CoreEventDestinationGetAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/event_destinations", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.core.event_destination\",\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"id\":\"obj_123\",\"livemode\":true,\"name\":\"name\",\"status\":\"disabled\",\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.EventDestinations; + Stripe.V2.StripeList eventDestinations = await service + .ListAsync(); + this.AssertRequest(HttpMethod.Get, "/v2/core/event_destinations"); + } + + [Fact] + public void TestV2CoreEventDestinationGetAutoPaging() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/event_destinations", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.core.event_destination\",\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"id\":\"obj_123\",\"livemode\":true,\"name\":\"name\",\"status\":\"disabled\",\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.EventDestinations; + var eventDestination = service.ListAutoPaging().First(); + this.AssertRequest(HttpMethod.Get, "/v2/core/event_destinations"); + } + + [Fact] + public async Task TestV2CoreEventDestinationGetAutoPagingAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/event_destinations", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.core.event_destination\",\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"id\":\"obj_123\",\"livemode\":true,\"name\":\"name\",\"status\":\"disabled\",\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.EventDestinations; + var eventDestination = await service.ListAutoPagingAsync() + .FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v2/core/event_destinations"); + } + + [Fact] + public void TestV2CoreEventDestinationPost() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/event_destinations", + (HttpStatusCode)200, + "{\"object\":\"v2.core.event_destination\",\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"id\":\"obj_123\",\"livemode\":true,\"name\":\"name\",\"status\":\"disabled\",\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\"}"); + var options = new Stripe.V2.Core.EventDestinationCreateOptions + { + EnabledEvents = new List { "enabled_events" }, + EventPayload = "thin", + Name = "name", + Type = "amazon_eventbridge", + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.EventDestinations; + Stripe.V2.Core.EventDestination eventDestination = service.Create( + options); + this.AssertRequest(HttpMethod.Post, "/v2/core/event_destinations"); + } + + [Fact] + public async Task TestV2CoreEventDestinationPostAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/event_destinations", + (HttpStatusCode)200, + "{\"object\":\"v2.core.event_destination\",\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"id\":\"obj_123\",\"livemode\":true,\"name\":\"name\",\"status\":\"disabled\",\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\"}"); + var options = new Stripe.V2.Core.EventDestinationCreateOptions + { + EnabledEvents = new List { "enabled_events" }, + EventPayload = "thin", + Name = "name", + Type = "amazon_eventbridge", + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.EventDestinations; + Stripe.V2.Core.EventDestination eventDestination = await service + .CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v2/core/event_destinations"); + } + + [Fact] + public void TestV2CoreEventDestinationDelete() + { + this.StubRequest( + HttpMethod.Delete, + "/v2/core/event_destinations/id_123", + (HttpStatusCode)200, + "{\"id\":\"abc_123\",\"object\":\"some.object.tag\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.EventDestinations; + Stripe.V2.DeletedObject deleted = service.Delete("id_123"); + this.AssertRequest( + HttpMethod.Delete, + "/v2/core/event_destinations/id_123"); + } + + [Fact] + public async Task TestV2CoreEventDestinationDeleteAsync() + { + this.StubRequest( + HttpMethod.Delete, + "/v2/core/event_destinations/id_123", + (HttpStatusCode)200, + "{\"id\":\"abc_123\",\"object\":\"some.object.tag\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.EventDestinations; + Stripe.V2.DeletedObject deleted = await service.DeleteAsync( + "id_123"); + this.AssertRequest( + HttpMethod.Delete, + "/v2/core/event_destinations/id_123"); + } + + [Fact] + public void TestV2CoreEventDestinationGet2() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/event_destinations/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.core.event_destination\",\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"id\":\"obj_123\",\"livemode\":true,\"name\":\"name\",\"status\":\"disabled\",\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.EventDestinations; + Stripe.V2.Core.EventDestination eventDestination = service.Get( + "id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/core/event_destinations/id_123"); + } + + [Fact] + public async Task TestV2CoreEventDestinationGet2Async() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/event_destinations/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.core.event_destination\",\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"id\":\"obj_123\",\"livemode\":true,\"name\":\"name\",\"status\":\"disabled\",\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.EventDestinations; + Stripe.V2.Core.EventDestination eventDestination = await service + .GetAsync("id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/core/event_destinations/id_123"); + } + + [Fact] + public void TestV2CoreEventDestinationPost2() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/event_destinations/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.core.event_destination\",\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"id\":\"obj_123\",\"livemode\":true,\"name\":\"name\",\"status\":\"disabled\",\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\"}"); + var options = new Stripe.V2.Core.EventDestinationUpdateOptions(); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.EventDestinations; + Stripe.V2.Core.EventDestination eventDestination = service.Update( + "id_123", + options); + this.AssertRequest( + HttpMethod.Post, + "/v2/core/event_destinations/id_123"); + } + + [Fact] + public async Task TestV2CoreEventDestinationPost2Async() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/event_destinations/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.core.event_destination\",\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"id\":\"obj_123\",\"livemode\":true,\"name\":\"name\",\"status\":\"disabled\",\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\"}"); + var options = new Stripe.V2.Core.EventDestinationUpdateOptions(); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.EventDestinations; + Stripe.V2.Core.EventDestination eventDestination = await service + .UpdateAsync("id_123", options); + this.AssertRequest( + HttpMethod.Post, + "/v2/core/event_destinations/id_123"); + } + + [Fact] + public void TestV2CoreEventDestinationPost3() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/event_destinations/id_123/disable", + (HttpStatusCode)200, + "{\"object\":\"v2.core.event_destination\",\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"id\":\"obj_123\",\"livemode\":true,\"name\":\"name\",\"status\":\"disabled\",\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.EventDestinations; + Stripe.V2.Core.EventDestination eventDestination = service.Disable( + "id_123"); + this.AssertRequest( + HttpMethod.Post, + "/v2/core/event_destinations/id_123/disable"); + } + + [Fact] + public async Task TestV2CoreEventDestinationPost3Async() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/event_destinations/id_123/disable", + (HttpStatusCode)200, + "{\"object\":\"v2.core.event_destination\",\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"id\":\"obj_123\",\"livemode\":true,\"name\":\"name\",\"status\":\"disabled\",\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.EventDestinations; + Stripe.V2.Core.EventDestination eventDestination = await service + .DisableAsync("id_123"); + this.AssertRequest( + HttpMethod.Post, + "/v2/core/event_destinations/id_123/disable"); + } + + [Fact] + public void TestV2CoreEventDestinationPost4() + { + this.StubRequest( HttpMethod.Post, - "/v2/billing/contracts/id_123", + "/v2/core/event_destinations/id_123/enable", (HttpStatusCode)200, - "{\"object\":\"v2.billing.contract\",\"contract_line_details\":[{\"contract_line\":\"contract_line\",\"contract_line_value_details\":{\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"ends_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"overrides\":[{\"ends_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"starts_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"type\":\"service_action\"}],\"pricing\":{},\"starts_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"}}],\"contract_number\":\"contract_number\",\"contract_value_details\":{\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"customer\":\"customer\",\"id\":\"obj_123\",\"license_quantities\":[{\"license_pricing_id\":\"license_pricing_id\",\"license_pricing_type\":\"price\",\"pricing_line\":\"pricing_line\",\"quantity\":1285004149}],\"livemode\":true,\"pricing_lines\":[{\"ends_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"pricing\":{\"type\":\"price\"},\"pricing_line\":\"pricing_line\",\"starts_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"}}],\"pricing_overrides\":[{\"ends_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"pricing_override\":\"pricing_override\",\"priority\":1165461084,\"starts_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"type\":\"multiplier\"}],\"status\":\"draft\",\"status_details\":{}}"); - var options = new Stripe.V2.Billing.ContractUpdateOptions(); + "{\"object\":\"v2.core.event_destination\",\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"id\":\"obj_123\",\"livemode\":true,\"name\":\"name\",\"status\":\"disabled\",\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\"}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.Contracts; - Stripe.V2.Billing.Contract contract = service.Update( - "id_123", - options); - this.AssertRequest(HttpMethod.Post, "/v2/billing/contracts/id_123"); + var service = client.V2.Core.EventDestinations; + Stripe.V2.Core.EventDestination eventDestination = service.Enable( + "id_123"); + this.AssertRequest( + HttpMethod.Post, + "/v2/core/event_destinations/id_123/enable"); } [Fact] - public void TestV2BillingContractPost3() + public async Task TestV2CoreEventDestinationPost4Async() { this.StubRequest( HttpMethod.Post, - "/v2/billing/contracts/id_123/activate", + "/v2/core/event_destinations/id_123/enable", (HttpStatusCode)200, - "{\"object\":\"v2.billing.contract\",\"contract_line_details\":[{\"contract_line\":\"contract_line\",\"contract_line_value_details\":{\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"ends_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"overrides\":[{\"ends_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"starts_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"type\":\"service_action\"}],\"pricing\":{},\"starts_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"}}],\"contract_number\":\"contract_number\",\"contract_value_details\":{\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"customer\":\"customer\",\"id\":\"obj_123\",\"license_quantities\":[{\"license_pricing_id\":\"license_pricing_id\",\"license_pricing_type\":\"price\",\"pricing_line\":\"pricing_line\",\"quantity\":1285004149}],\"livemode\":true,\"pricing_lines\":[{\"ends_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"pricing\":{\"type\":\"price\"},\"pricing_line\":\"pricing_line\",\"starts_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"}}],\"pricing_overrides\":[{\"ends_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"pricing_override\":\"pricing_override\",\"priority\":1165461084,\"starts_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"type\":\"multiplier\"}],\"status\":\"draft\",\"status_details\":{}}"); + "{\"object\":\"v2.core.event_destination\",\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"id\":\"obj_123\",\"livemode\":true,\"name\":\"name\",\"status\":\"disabled\",\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\"}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.Contracts; - Stripe.V2.Billing.Contract contract = service.Activate("id_123"); + var service = client.V2.Core.EventDestinations; + Stripe.V2.Core.EventDestination eventDestination = await service + .EnableAsync("id_123"); this.AssertRequest( HttpMethod.Post, - "/v2/billing/contracts/id_123/activate"); + "/v2/core/event_destinations/id_123/enable"); } [Fact] - public void TestV2BillingContractPost4() + public void TestV2CoreEventDestinationPost5() { this.StubRequest( HttpMethod.Post, - "/v2/billing/contracts/id_123/cancel", + "/v2/core/event_destinations/id_123/ping", (HttpStatusCode)200, - "{\"object\":\"v2.billing.contract\",\"contract_line_details\":[{\"contract_line\":\"contract_line\",\"contract_line_value_details\":{\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"ends_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"overrides\":[{\"ends_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"starts_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"type\":\"service_action\"}],\"pricing\":{},\"starts_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"}}],\"contract_number\":\"contract_number\",\"contract_value_details\":{\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"customer\":\"customer\",\"id\":\"obj_123\",\"license_quantities\":[{\"license_pricing_id\":\"license_pricing_id\",\"license_pricing_type\":\"price\",\"pricing_line\":\"pricing_line\",\"quantity\":1285004149}],\"livemode\":true,\"pricing_lines\":[{\"ends_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"pricing\":{\"type\":\"price\"},\"pricing_line\":\"pricing_line\",\"starts_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"}}],\"pricing_overrides\":[{\"ends_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"pricing_override\":\"pricing_override\",\"priority\":1165461084,\"starts_at\":{\"timestamp\":\"1970-01-01T15:18:46.294Z\"},\"type\":\"multiplier\"}],\"status\":\"draft\",\"status_details\":{}}"); + "{\"object\":\"v2.core.event\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"type\":\"type\"}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.Contracts; - Stripe.V2.Billing.Contract contract = service.Cancel("id_123"); + var service = client.V2.Core.EventDestinations; + Stripe.V2.Core.Event result = service.Ping("id_123"); this.AssertRequest( HttpMethod.Post, - "/v2/billing/contracts/id_123/cancel"); + "/v2/core/event_destinations/id_123/ping"); } [Fact] - public void TestV2BillingContractsLicensePricingQuantityChangeGet() + public async Task TestV2CoreEventDestinationPost5Async() { this.StubRequest( - HttpMethod.Get, - "/v2/billing/contracts/contract_id_123/license_pricing/license_pricing_id_123/quantity_changes", + HttpMethod.Post, + "/v2/core/event_destinations/id_123/ping", (HttpStatusCode)200, - "{\"data\":[{\"object\":\"v2.billing.contract_license_pricing_quantity_change\",\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"license_pricing_id\":\"license_pricing_id\",\"license_pricing_type\":\"price\",\"livemode\":true,\"pricing_line\":\"pricing_line\",\"quantity\":1285004149}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"object\":\"v2.core.event\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"type\":\"type\"}"); var client = new StripeClient(this.Requestor); - var service = client - .V2 - .Billing - .Contracts - .LicensePricing - .QuantityChanges; - Stripe.V2.StripeList contractLicensePricingQuantityChanges = service - .ListQuantityChanges( - "contract_id_123", - "license_pricing_id_123"); + var service = client.V2.Core.EventDestinations; + Stripe.V2.Core.Event result = await service.PingAsync("id_123"); this.AssertRequest( + HttpMethod.Post, + "/v2/core/event_destinations/id_123/ping"); + } + + [Fact] + public void TestV2CoreFeeBatchGet() + { + this.StubRequest( HttpMethod.Get, - "/v2/billing/contracts/contract_id_123/license_pricing/license_pricing_id_123/quantity_changes"); + "/v2/core/fee_batches", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.core.fee_batch\",\"amount\":{\"currency\":\"usd\",\"value\":\"value\"},\"collected_by\":{\"type\":\"application\"},\"collection_records\":[{\"amount\":{\"currency\":\"usd\",\"value\":\"value\"},\"type\":\"money_management_transaction\"}],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"billed\",\"status_transitions\":{}}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.FeeBatches; + Stripe.V2.StripeList feeBatches = service + .List(); + this.AssertRequest(HttpMethod.Get, "/v2/core/fee_batches"); } [Fact] - public void TestV2BillingCustomPricingUnitGet() + public async Task TestV2CoreFeeBatchGetAsync() { this.StubRequest( HttpMethod.Get, - "/v2/billing/custom_pricing_units", + "/v2/core/fee_batches", (HttpStatusCode)200, - "{\"data\":[{\"object\":\"v2.billing.custom_pricing_unit\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"object\":\"v2.core.fee_batch\",\"amount\":{\"currency\":\"usd\",\"value\":\"value\"},\"collected_by\":{\"type\":\"application\"},\"collection_records\":[{\"amount\":{\"currency\":\"usd\",\"value\":\"value\"},\"type\":\"money_management_transaction\"}],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"billed\",\"status_transitions\":{}}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.CustomPricingUnits; - Stripe.V2.StripeList customPricingUnits = service + var service = client.V2.Core.FeeBatches; + Stripe.V2.StripeList feeBatches = await service + .ListAsync(); + this.AssertRequest(HttpMethod.Get, "/v2/core/fee_batches"); + } + + [Fact] + public void TestV2CoreFeeBatchGetAutoPaging() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/fee_batches", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.core.fee_batch\",\"amount\":{\"currency\":\"usd\",\"value\":\"value\"},\"collected_by\":{\"type\":\"application\"},\"collection_records\":[{\"amount\":{\"currency\":\"usd\",\"value\":\"value\"},\"type\":\"money_management_transaction\"}],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"billed\",\"status_transitions\":{}}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.FeeBatches; + var feeBatch = service.ListAutoPaging().First(); + this.AssertRequest(HttpMethod.Get, "/v2/core/fee_batches"); + } + + [Fact] + public async Task TestV2CoreFeeBatchGetAutoPagingAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/fee_batches", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.core.fee_batch\",\"amount\":{\"currency\":\"usd\",\"value\":\"value\"},\"collected_by\":{\"type\":\"application\"},\"collection_records\":[{\"amount\":{\"currency\":\"usd\",\"value\":\"value\"},\"type\":\"money_management_transaction\"}],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"billed\",\"status_transitions\":{}}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.FeeBatches; + var feeBatch = await service.ListAutoPagingAsync().FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v2/core/fee_batches"); + } + + [Fact] + public void TestV2CoreFeeBatchGet2() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/fee_batches/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.core.fee_batch\",\"amount\":{\"currency\":\"usd\",\"value\":\"value\"},\"collected_by\":{\"type\":\"application\"},\"collection_records\":[{\"amount\":{\"currency\":\"usd\",\"value\":\"value\"},\"type\":\"money_management_transaction\"}],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"billed\",\"status_transitions\":{}}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.FeeBatches; + Stripe.V2.Core.FeeBatch feeBatch = service.Get("id_123"); + this.AssertRequest(HttpMethod.Get, "/v2/core/fee_batches/id_123"); + } + + [Fact] + public async Task TestV2CoreFeeBatchGet2Async() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/fee_batches/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.core.fee_batch\",\"amount\":{\"currency\":\"usd\",\"value\":\"value\"},\"collected_by\":{\"type\":\"application\"},\"collection_records\":[{\"amount\":{\"currency\":\"usd\",\"value\":\"value\"},\"type\":\"money_management_transaction\"}],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"billed\",\"status_transitions\":{}}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.FeeBatches; + Stripe.V2.Core.FeeBatch feeBatch = await service.GetAsync("id_123"); + this.AssertRequest(HttpMethod.Get, "/v2/core/fee_batches/id_123"); + } + + [Fact] + public void TestV2CoreFeeEntryGet() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/fee_entries", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.core.fee_entry\",\"amount\":{\"currency\":\"usd\",\"value\":\"value\"},\"charged_by\":{\"type\":\"application\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"incurred_by\":{\"id\":\"obj_123\",\"type\":\"type\"},\"livemode\":true,\"reason\":\"reprice\",\"type\":\"application_fee\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.FeeEntries; + Stripe.V2.StripeList feeEntries = service .List(); - this.AssertRequest( + this.AssertRequest(HttpMethod.Get, "/v2/core/fee_entries"); + } + + [Fact] + public async Task TestV2CoreFeeEntryGetAsync() + { + this.StubRequest( HttpMethod.Get, - "/v2/billing/custom_pricing_units"); + "/v2/core/fee_entries", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.core.fee_entry\",\"amount\":{\"currency\":\"usd\",\"value\":\"value\"},\"charged_by\":{\"type\":\"application\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"incurred_by\":{\"id\":\"obj_123\",\"type\":\"type\"},\"livemode\":true,\"reason\":\"reprice\",\"type\":\"application_fee\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.FeeEntries; + Stripe.V2.StripeList feeEntries = await service + .ListAsync(); + this.AssertRequest(HttpMethod.Get, "/v2/core/fee_entries"); } [Fact] - public void TestV2BillingCustomPricingUnitPost() + public void TestV2CoreFeeEntryGetAutoPaging() { this.StubRequest( - HttpMethod.Post, - "/v2/billing/custom_pricing_units", + HttpMethod.Get, + "/v2/core/fee_entries", (HttpStatusCode)200, - "{\"object\":\"v2.billing.custom_pricing_unit\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true}"); - var options = new Stripe.V2.Billing.CustomPricingUnitCreateOptions - { - DisplayName = "display_name", - }; + "{\"data\":[{\"object\":\"v2.core.fee_entry\",\"amount\":{\"currency\":\"usd\",\"value\":\"value\"},\"charged_by\":{\"type\":\"application\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"incurred_by\":{\"id\":\"obj_123\",\"type\":\"type\"},\"livemode\":true,\"reason\":\"reprice\",\"type\":\"application_fee\"}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.CustomPricingUnits; - Stripe.V2.Billing.CustomPricingUnit customPricingUnit = service - .Create(options); + var service = client.V2.Core.FeeEntries; + var feeEntry = service.ListAutoPaging().First(); + this.AssertRequest(HttpMethod.Get, "/v2/core/fee_entries"); + } + + [Fact] + public async Task TestV2CoreFeeEntryGetAutoPagingAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/fee_entries", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.core.fee_entry\",\"amount\":{\"currency\":\"usd\",\"value\":\"value\"},\"charged_by\":{\"type\":\"application\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"incurred_by\":{\"id\":\"obj_123\",\"type\":\"type\"},\"livemode\":true,\"reason\":\"reprice\",\"type\":\"application_fee\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.FeeEntries; + var feeEntry = await service.ListAutoPagingAsync().FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v2/core/fee_entries"); + } + + [Fact] + public void TestV2CoreFeeEntryGet2() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/fee_entries/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.core.fee_entry\",\"amount\":{\"currency\":\"usd\",\"value\":\"value\"},\"charged_by\":{\"type\":\"application\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"incurred_by\":{\"id\":\"obj_123\",\"type\":\"type\"},\"livemode\":true,\"reason\":\"reprice\",\"type\":\"application_fee\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.FeeEntries; + Stripe.V2.Core.FeeEntry feeEntry = service.Get("id_123"); + this.AssertRequest(HttpMethod.Get, "/v2/core/fee_entries/id_123"); + } + + [Fact] + public async Task TestV2CoreFeeEntryGet2Async() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/fee_entries/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.core.fee_entry\",\"amount\":{\"currency\":\"usd\",\"value\":\"value\"},\"charged_by\":{\"type\":\"application\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"incurred_by\":{\"id\":\"obj_123\",\"type\":\"type\"},\"livemode\":true,\"reason\":\"reprice\",\"type\":\"application_fee\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.FeeEntries; + Stripe.V2.Core.FeeEntry feeEntry = await service.GetAsync("id_123"); + this.AssertRequest(HttpMethod.Get, "/v2/core/fee_entries/id_123"); + } + + [Fact] + public void TestV2CoreVaultGbBankAccountGet() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/vault/gb_bank_accounts", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.core.vault.gb_bank_account\",\"archived\":true,\"bank_account_type\":\"toza\",\"bank_name\":\"bank_name\",\"confirmation_of_payee\":{\"result\":{\"created\":\"1970-01-12T21:42:34.472Z\",\"match_result\":\"unavailable\",\"matched\":{},\"message\":\"message\",\"provided\":{\"business_type\":\"personal\",\"name\":\"name\"}},\"status\":\"awaiting_acknowledgement\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"]}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Vault.GbBankAccounts; + Stripe.V2.StripeList gbBankAccounts = service + .List(); this.AssertRequest( - HttpMethod.Post, - "/v2/billing/custom_pricing_units"); + HttpMethod.Get, + "/v2/core/vault/gb_bank_accounts"); } [Fact] - public void TestV2BillingCustomPricingUnitGet2() + public async Task TestV2CoreVaultGbBankAccountGetAsync() { this.StubRequest( HttpMethod.Get, - "/v2/billing/custom_pricing_units/id_123", + "/v2/core/vault/gb_bank_accounts", (HttpStatusCode)200, - "{\"object\":\"v2.billing.custom_pricing_unit\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true}"); + "{\"data\":[{\"object\":\"v2.core.vault.gb_bank_account\",\"archived\":true,\"bank_account_type\":\"toza\",\"bank_name\":\"bank_name\",\"confirmation_of_payee\":{\"result\":{\"created\":\"1970-01-12T21:42:34.472Z\",\"match_result\":\"unavailable\",\"matched\":{},\"message\":\"message\",\"provided\":{\"business_type\":\"personal\",\"name\":\"name\"}},\"status\":\"awaiting_acknowledgement\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"]}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.CustomPricingUnits; - Stripe.V2.Billing.CustomPricingUnit customPricingUnit = service.Get( - "id_123"); + var service = client.V2.Core.Vault.GbBankAccounts; + Stripe.V2.StripeList gbBankAccounts = await service + .ListAsync(); this.AssertRequest( HttpMethod.Get, - "/v2/billing/custom_pricing_units/id_123"); + "/v2/core/vault/gb_bank_accounts"); } [Fact] - public void TestV2BillingCustomPricingUnitPost2() + public void TestV2CoreVaultGbBankAccountGetAutoPaging() { this.StubRequest( - HttpMethod.Post, - "/v2/billing/custom_pricing_units/id_123", + HttpMethod.Get, + "/v2/core/vault/gb_bank_accounts", (HttpStatusCode)200, - "{\"object\":\"v2.billing.custom_pricing_unit\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true}"); - var options = new Stripe.V2.Billing.CustomPricingUnitUpdateOptions(); + "{\"data\":[{\"object\":\"v2.core.vault.gb_bank_account\",\"archived\":true,\"bank_account_type\":\"toza\",\"bank_name\":\"bank_name\",\"confirmation_of_payee\":{\"result\":{\"created\":\"1970-01-12T21:42:34.472Z\",\"match_result\":\"unavailable\",\"matched\":{},\"message\":\"message\",\"provided\":{\"business_type\":\"personal\",\"name\":\"name\"}},\"status\":\"awaiting_acknowledgement\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"]}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.CustomPricingUnits; - Stripe.V2.Billing.CustomPricingUnit customPricingUnit = service - .Update("id_123", options); + var service = client.V2.Core.Vault.GbBankAccounts; + var gbBankAccount = service.ListAutoPaging().First(); this.AssertRequest( - HttpMethod.Post, - "/v2/billing/custom_pricing_units/id_123"); + HttpMethod.Get, + "/v2/core/vault/gb_bank_accounts"); } [Fact] - public void TestV2BillingIntentGet() + public async Task TestV2CoreVaultGbBankAccountGetAutoPagingAsync() { this.StubRequest( HttpMethod.Get, - "/v2/billing/intents", + "/v2/core/vault/gb_bank_accounts", (HttpStatusCode)200, - "{\"data\":[{\"object\":\"v2.billing.intent\",\"amount_details\":{\"currency\":\"usd\",\"discount\":\"discount\",\"shipping\":\"shipping\",\"subtotal\":\"subtotal\",\"tax\":\"tax\",\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"draft\",\"status_transitions\":{\"expires_at\":\"1970-01-10T15:36:51.170Z\"}}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"object\":\"v2.core.vault.gb_bank_account\",\"archived\":true,\"bank_account_type\":\"toza\",\"bank_name\":\"bank_name\",\"confirmation_of_payee\":{\"result\":{\"created\":\"1970-01-12T21:42:34.472Z\",\"match_result\":\"unavailable\",\"matched\":{},\"message\":\"message\",\"provided\":{\"business_type\":\"personal\",\"name\":\"name\"}},\"status\":\"awaiting_acknowledgement\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"]}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.Intents; - Stripe.V2.StripeList intents = service - .List(); - this.AssertRequest(HttpMethod.Get, "/v2/billing/intents"); + var service = client.V2.Core.Vault.GbBankAccounts; + var gbBankAccount = await service.ListAutoPagingAsync() + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v2/core/vault/gb_bank_accounts"); } [Fact] - public void TestV2BillingIntentPost() + public void TestV2CoreVaultGbBankAccountPost() { this.StubRequest( HttpMethod.Post, - "/v2/billing/intents", + "/v2/core/vault/gb_bank_accounts", (HttpStatusCode)200, - "{\"object\":\"v2.billing.intent\",\"amount_details\":{\"currency\":\"usd\",\"discount\":\"discount\",\"shipping\":\"shipping\",\"subtotal\":\"subtotal\",\"tax\":\"tax\",\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"draft\",\"status_transitions\":{\"expires_at\":\"1970-01-10T15:36:51.170Z\"}}"); - var options = new Stripe.V2.Billing.IntentCreateOptions + "{\"object\":\"v2.core.vault.gb_bank_account\",\"archived\":true,\"bank_account_type\":\"toza\",\"bank_name\":\"bank_name\",\"confirmation_of_payee\":{\"result\":{\"created\":\"1970-01-12T21:42:34.472Z\",\"match_result\":\"unavailable\",\"matched\":{},\"message\":\"message\",\"provided\":{\"business_type\":\"personal\",\"name\":\"name\"}},\"status\":\"awaiting_acknowledgement\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"]}"); + var options = new Stripe.V2.Core.Vault.GbBankAccountCreateOptions + { + Currency = "usd", + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Vault.GbBankAccounts; + Stripe.V2.Core.Vault.GbBankAccount gbBankAccount = service.Create( + options); + this.AssertRequest( + HttpMethod.Post, + "/v2/core/vault/gb_bank_accounts"); + } + + [Fact] + public async Task TestV2CoreVaultGbBankAccountPostAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/vault/gb_bank_accounts", + (HttpStatusCode)200, + "{\"object\":\"v2.core.vault.gb_bank_account\",\"archived\":true,\"bank_account_type\":\"toza\",\"bank_name\":\"bank_name\",\"confirmation_of_payee\":{\"result\":{\"created\":\"1970-01-12T21:42:34.472Z\",\"match_result\":\"unavailable\",\"matched\":{},\"message\":\"message\",\"provided\":{\"business_type\":\"personal\",\"name\":\"name\"}},\"status\":\"awaiting_acknowledgement\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"]}"); + var options = new Stripe.V2.Core.Vault.GbBankAccountCreateOptions { - Actions = new List - { - new Stripe.V2.Billing.IntentCreateActionOptions - { - Apply = new Stripe.V2.Billing.IntentCreateActionApplyOptions - { - Discount = new Stripe.V2.Billing.IntentCreateActionApplyDiscountOptions - { - Coupon = "coupon", - PromotionCode = "promotion_code", - Type = "coupon", - }, - EffectiveAt = new Stripe.V2.Billing.IntentCreateActionApplyEffectiveAtOptions - { - Timestamp = DateTimeOffset.Parse( - "1970-01-01T15:18:46.294Z") - .UtcDateTime, - Type = "current_billing_period_end", - }, - InvoiceDiscountRule = new Stripe.V2.Billing.IntentCreateActionApplyInvoiceDiscountRuleOptions - { - AppliesTo = "cadence", - PercentOff = new Stripe.V2.Billing.IntentCreateActionApplyInvoiceDiscountRulePercentOffOptions - { - MaximumApplications = new Stripe.V2.Billing.IntentCreateActionApplyInvoiceDiscountRulePercentOffMaximumApplicationsOptions - { - Type = "indefinite", - }, - PercentOff = 991934883.3333334M, - }, - Type = "percent_off", - }, - SpendModifierRule = new Stripe.V2.Billing.IntentCreateActionApplySpendModifierRuleOptions - { - AppliesTo = "cadence", - MaxBillingPeriodSpend = new Stripe.V2.Billing.IntentCreateActionApplySpendModifierRuleMaxBillingPeriodSpendOptions - { - Amount = new Stripe.V2.Billing.IntentCreateActionApplySpendModifierRuleMaxBillingPeriodSpendAmountOptions - { - CustomPricingUnit = new Stripe.V2.Billing.IntentCreateActionApplySpendModifierRuleMaxBillingPeriodSpendAmountCustomPricingUnitOptions - { - Id = "obj_123", - Value = "value", - }, - Type = "custom_pricing_unit", - }, - CustomPricingUnitOverageRate = new Stripe.V2.Billing.IntentCreateActionApplySpendModifierRuleMaxBillingPeriodSpendCustomPricingUnitOverageRateOptions - { - Id = "obj_123", - }, - }, - Type = "max_billing_period_spend", - }, - Type = "discount", - }, - Deactivate = new Stripe.V2.Billing.IntentCreateActionDeactivateOptions - { - CancellationDetails = new Stripe.V2.Billing.IntentCreateActionDeactivateCancellationDetailsOptions - { - Comment = "comment", - Feedback = "other", - }, - CollectAt = "next_billing_date", - EffectiveAt = new Stripe.V2.Billing.IntentCreateActionDeactivateEffectiveAtOptions - { - Timestamp = DateTimeOffset.Parse( - "1970-01-01T15:18:46.294Z") - .UtcDateTime, - Type = "on_reserve", - }, - PricingPlanSubscriptionDetails = new Stripe.V2.Billing.IntentCreateActionDeactivatePricingPlanSubscriptionDetailsOptions - { - Overrides = new Stripe.V2.Billing.IntentCreateActionDeactivatePricingPlanSubscriptionDetailsOverridesOptions - { - PartialPeriodBehaviors = new List - { - new Stripe.V2.Billing.IntentCreateActionDeactivatePricingPlanSubscriptionDetailsOverridesPartialPeriodBehaviorOptions - { - LicenseFee = new Stripe.V2.Billing.IntentCreateActionDeactivatePricingPlanSubscriptionDetailsOverridesPartialPeriodBehaviorLicenseFeeOptions - { - CreditProrationBehavior = "prorated", - }, - Type = "license_fee", - }, - }, - }, - PricingPlanSubscription = "pricing_plan_subscription", - }, - Type = "pricing_plan_subscription_details", - }, - Modify = new Stripe.V2.Billing.IntentCreateActionModifyOptions - { - CollectAt = "next_billing_date", - EffectiveAt = new Stripe.V2.Billing.IntentCreateActionModifyEffectiveAtOptions - { - Timestamp = DateTimeOffset.Parse( - "1970-01-01T15:18:46.294Z") - .UtcDateTime, - Type = "current_billing_period_start", - }, - PricingPlanSubscriptionDetails = new Stripe.V2.Billing.IntentCreateActionModifyPricingPlanSubscriptionDetailsOptions - { - ComponentConfigurations = new List - { - new Stripe.V2.Billing.IntentCreateActionModifyPricingPlanSubscriptionDetailsComponentConfigurationOptions - { - LookupKey = "lookup_key", - PricingPlanComponent = "pricing_plan_component", - Quantity = 1285004149, - }, - }, - NewPricingPlan = "new_pricing_plan", - NewPricingPlanVersion = "new_pricing_plan_version", - Overrides = new Stripe.V2.Billing.IntentCreateActionModifyPricingPlanSubscriptionDetailsOverridesOptions - { - PartialPeriodBehaviors = new List - { - new Stripe.V2.Billing.IntentCreateActionModifyPricingPlanSubscriptionDetailsOverridesPartialPeriodBehaviorOptions - { - LicenseFee = new Stripe.V2.Billing.IntentCreateActionModifyPricingPlanSubscriptionDetailsOverridesPartialPeriodBehaviorLicenseFeeOptions - { - CreditProrationBehavior = "prorated", - DebitProrationBehavior = "none", - }, - RecurringCreditGrant = new Stripe.V2.Billing.IntentCreateActionModifyPricingPlanSubscriptionDetailsOverridesPartialPeriodBehaviorRecurringCreditGrantOptions - { - CreateBehavior = "none", - }, - Type = "license_fee", - }, - }, - }, - PricingPlanSubscription = "pricing_plan_subscription", - }, - Type = "pricing_plan_subscription_details", - }, - Remove = new Stripe.V2.Billing.IntentCreateActionRemoveOptions - { - EffectiveAt = new Stripe.V2.Billing.IntentCreateActionRemoveEffectiveAtOptions - { - Type = "current_billing_period_end", - }, - InvoiceDiscountRule = "invoice_discount_rule", - SpendModifierRule = "spend_modifier_rule", - Type = "invoice_discount_rule", - }, - Subscribe = new Stripe.V2.Billing.IntentCreateActionSubscribeOptions - { - CollectAt = "next_billing_date", - EffectiveAt = new Stripe.V2.Billing.IntentCreateActionSubscribeEffectiveAtOptions - { - Timestamp = DateTimeOffset.Parse( - "1970-01-01T15:18:46.294Z") - .UtcDateTime, - Type = "current_billing_period_start", - }, - PricingPlanSubscriptionDetails = new Stripe.V2.Billing.IntentCreateActionSubscribePricingPlanSubscriptionDetailsOptions - { - ComponentConfigurations = new List - { - new Stripe.V2.Billing.IntentCreateActionSubscribePricingPlanSubscriptionDetailsComponentConfigurationOptions - { - LookupKey = "lookup_key", - PricingPlanComponent = "pricing_plan_component", - Quantity = 1285004149, - }, - }, - Metadata = new Dictionary - { - { "key", "metadata" }, - }, - Overrides = new Stripe.V2.Billing.IntentCreateActionSubscribePricingPlanSubscriptionDetailsOverridesOptions - { - PartialPeriodBehaviors = new List - { - new Stripe.V2.Billing.IntentCreateActionSubscribePricingPlanSubscriptionDetailsOverridesPartialPeriodBehaviorOptions - { - LicenseFee = new Stripe.V2.Billing.IntentCreateActionSubscribePricingPlanSubscriptionDetailsOverridesPartialPeriodBehaviorLicenseFeeOptions - { - DebitProrationBehavior = "none", - }, - RecurringCreditGrant = new Stripe.V2.Billing.IntentCreateActionSubscribePricingPlanSubscriptionDetailsOverridesPartialPeriodBehaviorRecurringCreditGrantOptions - { - CreateBehavior = "none", - }, - Type = "license_fee", - }, - }, - }, - PricingPlan = "pricing_plan", - PricingPlanVersion = "pricing_plan_version", - }, - Type = "pricing_plan_subscription_details", - V1SubscriptionDetails = new Stripe.V2.Billing.IntentCreateActionSubscribeV1SubscriptionDetailsOptions - { - Description = "description", - Items = new List - { - new Stripe.V2.Billing.IntentCreateActionSubscribeV1SubscriptionDetailsItemOptions - { - Metadata = new Dictionary - { - { "key", "metadata" }, - }, - Price = "price", - Quantity = 1285004149, - }, - }, - Metadata = new Dictionary - { - { "key", "metadata" }, - }, - }, - }, - Type = "apply", - }, - }, Currency = "usd", }; var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.Intents; - Stripe.V2.Billing.Intent intent = service.Create(options); - this.AssertRequest(HttpMethod.Post, "/v2/billing/intents"); + var service = client.V2.Core.Vault.GbBankAccounts; + Stripe.V2.Core.Vault.GbBankAccount gbBankAccount = await service + .CreateAsync(options); + this.AssertRequest( + HttpMethod.Post, + "/v2/core/vault/gb_bank_accounts"); } [Fact] - public void TestV2BillingIntentGet2() + public void TestV2CoreVaultGbBankAccountGet2() { this.StubRequest( HttpMethod.Get, - "/v2/billing/intents/id_123", + "/v2/core/vault/gb_bank_accounts/id_123", (HttpStatusCode)200, - "{\"object\":\"v2.billing.intent\",\"amount_details\":{\"currency\":\"usd\",\"discount\":\"discount\",\"shipping\":\"shipping\",\"subtotal\":\"subtotal\",\"tax\":\"tax\",\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"draft\",\"status_transitions\":{\"expires_at\":\"1970-01-10T15:36:51.170Z\"}}"); + "{\"object\":\"v2.core.vault.gb_bank_account\",\"archived\":true,\"bank_account_type\":\"toza\",\"bank_name\":\"bank_name\",\"confirmation_of_payee\":{\"result\":{\"created\":\"1970-01-12T21:42:34.472Z\",\"match_result\":\"unavailable\",\"matched\":{},\"message\":\"message\",\"provided\":{\"business_type\":\"personal\",\"name\":\"name\"}},\"status\":\"awaiting_acknowledgement\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"]}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.Intents; - Stripe.V2.Billing.Intent intent = service.Get("id_123"); - this.AssertRequest(HttpMethod.Get, "/v2/billing/intents/id_123"); + var service = client.V2.Core.Vault.GbBankAccounts; + Stripe.V2.Core.Vault.GbBankAccount gbBankAccount = service.Get( + "id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/core/vault/gb_bank_accounts/id_123"); } [Fact] - public void TestV2BillingIntentPost2() + public async Task TestV2CoreVaultGbBankAccountGet2Async() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/vault/gb_bank_accounts/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.core.vault.gb_bank_account\",\"archived\":true,\"bank_account_type\":\"toza\",\"bank_name\":\"bank_name\",\"confirmation_of_payee\":{\"result\":{\"created\":\"1970-01-12T21:42:34.472Z\",\"match_result\":\"unavailable\",\"matched\":{},\"message\":\"message\",\"provided\":{\"business_type\":\"personal\",\"name\":\"name\"}},\"status\":\"awaiting_acknowledgement\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"]}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Vault.GbBankAccounts; + Stripe.V2.Core.Vault.GbBankAccount gbBankAccount = await service + .GetAsync("id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/core/vault/gb_bank_accounts/id_123"); + } + + [Fact] + public void TestV2CoreVaultGbBankAccountPost2() { this.StubRequest( HttpMethod.Post, - "/v2/billing/intents/id_123/cancel", + "/v2/core/vault/gb_bank_accounts/id_123/acknowledge_confirmation_of_payee", (HttpStatusCode)200, - "{\"object\":\"v2.billing.intent\",\"amount_details\":{\"currency\":\"usd\",\"discount\":\"discount\",\"shipping\":\"shipping\",\"subtotal\":\"subtotal\",\"tax\":\"tax\",\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"draft\",\"status_transitions\":{\"expires_at\":\"1970-01-10T15:36:51.170Z\"}}"); + "{\"object\":\"v2.core.vault.gb_bank_account\",\"archived\":true,\"bank_account_type\":\"toza\",\"bank_name\":\"bank_name\",\"confirmation_of_payee\":{\"result\":{\"created\":\"1970-01-12T21:42:34.472Z\",\"match_result\":\"unavailable\",\"matched\":{},\"message\":\"message\",\"provided\":{\"business_type\":\"personal\",\"name\":\"name\"}},\"status\":\"awaiting_acknowledgement\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"]}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.Intents; - Stripe.V2.Billing.Intent intent = service.Cancel("id_123"); + var service = client.V2.Core.Vault.GbBankAccounts; + Stripe.V2.Core.Vault.GbBankAccount gbBankAccount = service + .AcknowledgeConfirmationOfPayee("id_123"); this.AssertRequest( HttpMethod.Post, - "/v2/billing/intents/id_123/cancel"); + "/v2/core/vault/gb_bank_accounts/id_123/acknowledge_confirmation_of_payee"); } [Fact] - public void TestV2BillingIntentPost3() + public async Task TestV2CoreVaultGbBankAccountPost2Async() { this.StubRequest( HttpMethod.Post, - "/v2/billing/intents/id_123/commit", + "/v2/core/vault/gb_bank_accounts/id_123/acknowledge_confirmation_of_payee", (HttpStatusCode)200, - "{\"object\":\"v2.billing.intent\",\"amount_details\":{\"currency\":\"usd\",\"discount\":\"discount\",\"shipping\":\"shipping\",\"subtotal\":\"subtotal\",\"tax\":\"tax\",\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"draft\",\"status_transitions\":{\"expires_at\":\"1970-01-10T15:36:51.170Z\"}}"); + "{\"object\":\"v2.core.vault.gb_bank_account\",\"archived\":true,\"bank_account_type\":\"toza\",\"bank_name\":\"bank_name\",\"confirmation_of_payee\":{\"result\":{\"created\":\"1970-01-12T21:42:34.472Z\",\"match_result\":\"unavailable\",\"matched\":{},\"message\":\"message\",\"provided\":{\"business_type\":\"personal\",\"name\":\"name\"}},\"status\":\"awaiting_acknowledgement\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"]}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.Intents; - Stripe.V2.Billing.Intent intent = service.Commit("id_123"); + var service = client.V2.Core.Vault.GbBankAccounts; + Stripe.V2.Core.Vault.GbBankAccount gbBankAccount = await service + .AcknowledgeConfirmationOfPayeeAsync("id_123"); this.AssertRequest( HttpMethod.Post, - "/v2/billing/intents/id_123/commit"); + "/v2/core/vault/gb_bank_accounts/id_123/acknowledge_confirmation_of_payee"); } [Fact] - public void TestV2BillingIntentPost4() + public void TestV2CoreVaultGbBankAccountPost3() { this.StubRequest( HttpMethod.Post, - "/v2/billing/intents/id_123/release_reservation", + "/v2/core/vault/gb_bank_accounts/id_123/archive", (HttpStatusCode)200, - "{\"object\":\"v2.billing.intent\",\"amount_details\":{\"currency\":\"usd\",\"discount\":\"discount\",\"shipping\":\"shipping\",\"subtotal\":\"subtotal\",\"tax\":\"tax\",\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"draft\",\"status_transitions\":{\"expires_at\":\"1970-01-10T15:36:51.170Z\"}}"); + "{\"object\":\"v2.core.vault.gb_bank_account\",\"archived\":true,\"bank_account_type\":\"toza\",\"bank_name\":\"bank_name\",\"confirmation_of_payee\":{\"result\":{\"created\":\"1970-01-12T21:42:34.472Z\",\"match_result\":\"unavailable\",\"matched\":{},\"message\":\"message\",\"provided\":{\"business_type\":\"personal\",\"name\":\"name\"}},\"status\":\"awaiting_acknowledgement\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"]}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.Intents; - Stripe.V2.Billing.Intent intent = service.ReleaseReservation( + var service = client.V2.Core.Vault.GbBankAccounts; + Stripe.V2.Core.Vault.GbBankAccount gbBankAccount = service.Archive( "id_123"); this.AssertRequest( HttpMethod.Post, - "/v2/billing/intents/id_123/release_reservation"); + "/v2/core/vault/gb_bank_accounts/id_123/archive"); } [Fact] - public void TestV2BillingIntentPost5() + public async Task TestV2CoreVaultGbBankAccountPost3Async() { this.StubRequest( HttpMethod.Post, - "/v2/billing/intents/id_123/reserve", + "/v2/core/vault/gb_bank_accounts/id_123/archive", (HttpStatusCode)200, - "{\"object\":\"v2.billing.intent\",\"amount_details\":{\"currency\":\"usd\",\"discount\":\"discount\",\"shipping\":\"shipping\",\"subtotal\":\"subtotal\",\"tax\":\"tax\",\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"draft\",\"status_transitions\":{\"expires_at\":\"1970-01-10T15:36:51.170Z\"}}"); + "{\"object\":\"v2.core.vault.gb_bank_account\",\"archived\":true,\"bank_account_type\":\"toza\",\"bank_name\":\"bank_name\",\"confirmation_of_payee\":{\"result\":{\"created\":\"1970-01-12T21:42:34.472Z\",\"match_result\":\"unavailable\",\"matched\":{},\"message\":\"message\",\"provided\":{\"business_type\":\"personal\",\"name\":\"name\"}},\"status\":\"awaiting_acknowledgement\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"]}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.Intents; - Stripe.V2.Billing.Intent intent = service.Reserve("id_123"); + var service = client.V2.Core.Vault.GbBankAccounts; + Stripe.V2.Core.Vault.GbBankAccount gbBankAccount = await service + .ArchiveAsync("id_123"); this.AssertRequest( HttpMethod.Post, - "/v2/billing/intents/id_123/reserve"); + "/v2/core/vault/gb_bank_accounts/id_123/archive"); } [Fact] - public void TestV2BillingIntentsActionGet() + public void TestV2CoreVaultGbBankAccountPost4() { this.StubRequest( - HttpMethod.Get, - "/v2/billing/intents/intent_id_123/actions", + HttpMethod.Post, + "/v2/core/vault/gb_bank_accounts/id_123/initiate_confirmation_of_payee", (HttpStatusCode)200, - "{\"data\":[{\"object\":\"v2.billing.intent_action\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"type\":\"apply\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"object\":\"v2.core.vault.gb_bank_account\",\"archived\":true,\"bank_account_type\":\"toza\",\"bank_name\":\"bank_name\",\"confirmation_of_payee\":{\"result\":{\"created\":\"1970-01-12T21:42:34.472Z\",\"match_result\":\"unavailable\",\"matched\":{},\"message\":\"message\",\"provided\":{\"business_type\":\"personal\",\"name\":\"name\"}},\"status\":\"awaiting_acknowledgement\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"]}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.Intents.Actions; - Stripe.V2.StripeList intentActions = service - .List("intent_id_123"); + var service = client.V2.Core.Vault.GbBankAccounts; + Stripe.V2.Core.Vault.GbBankAccount gbBankAccount = service + .InitiateConfirmationOfPayee("id_123"); this.AssertRequest( - HttpMethod.Get, - "/v2/billing/intents/intent_id_123/actions"); + HttpMethod.Post, + "/v2/core/vault/gb_bank_accounts/id_123/initiate_confirmation_of_payee"); } [Fact] - public void TestV2BillingIntentsActionGet2() + public async Task TestV2CoreVaultGbBankAccountPost4Async() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/vault/gb_bank_accounts/id_123/initiate_confirmation_of_payee", + (HttpStatusCode)200, + "{\"object\":\"v2.core.vault.gb_bank_account\",\"archived\":true,\"bank_account_type\":\"toza\",\"bank_name\":\"bank_name\",\"confirmation_of_payee\":{\"result\":{\"created\":\"1970-01-12T21:42:34.472Z\",\"match_result\":\"unavailable\",\"matched\":{},\"message\":\"message\",\"provided\":{\"business_type\":\"personal\",\"name\":\"name\"}},\"status\":\"awaiting_acknowledgement\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"]}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Vault.GbBankAccounts; + Stripe.V2.Core.Vault.GbBankAccount gbBankAccount = await service + .InitiateConfirmationOfPayeeAsync("id_123"); + this.AssertRequest( + HttpMethod.Post, + "/v2/core/vault/gb_bank_accounts/id_123/initiate_confirmation_of_payee"); + } + + [Fact] + public void TestV2CoreVaultUsBankAccountGet() { this.StubRequest( HttpMethod.Get, - "/v2/billing/intents/intent_id_123/actions/id_123", + "/v2/core/vault/us_bank_accounts", (HttpStatusCode)200, - "{\"object\":\"v2.billing.intent_action\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"type\":\"apply\"}"); + "{\"data\":[{\"object\":\"v2.core.vault.us_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"],\"verification\":{\"status\":\"verification_failed\"}}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.Intents.Actions; - Stripe.V2.Billing.IntentAction intentAction = service.Get( - "intent_id_123", - "id_123"); + var service = client.V2.Core.Vault.UsBankAccounts; + Stripe.V2.StripeList usBankAccounts = service + .List(); this.AssertRequest( HttpMethod.Get, - "/v2/billing/intents/intent_id_123/actions/id_123"); + "/v2/core/vault/us_bank_accounts"); } [Fact] - public void TestV2BillingLicenseFeeGet() + public async Task TestV2CoreVaultUsBankAccountGetAsync() { this.StubRequest( HttpMethod.Get, - "/v2/billing/license_fees", + "/v2/core/vault/us_bank_accounts", (HttpStatusCode)200, - "{\"data\":[{\"object\":\"v2.billing.license_fee\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"licensed_item\":{\"object\":\"v2.billing.licensed_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true},\"live_version\":\"live_version\",\"livemode\":true,\"service_cycle\":{\"interval\":\"month\",\"interval_count\":797691627},\"tax_behavior\":\"exclusive\",\"tiers\":[{}]}],\"next_page_url\":null,\"previous_page_url\":null}", - "lookup_keys[0]=lookup_keys"); - var options = new Stripe.V2.Billing.LicenseFeeListOptions - { - LookupKeys = new List { "lookup_keys" }, - }; + "{\"data\":[{\"object\":\"v2.core.vault.us_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"],\"verification\":{\"status\":\"verification_failed\"}}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.LicenseFees; - Stripe.V2.StripeList licenseFees = service - .List(options); + var service = client.V2.Core.Vault.UsBankAccounts; + Stripe.V2.StripeList usBankAccounts = await service + .ListAsync(); this.AssertRequest( HttpMethod.Get, - "/v2/billing/license_fees", - "lookup_keys[0]=lookup_keys"); + "/v2/core/vault/us_bank_accounts"); } [Fact] - public void TestV2BillingLicenseFeePost() + public void TestV2CoreVaultUsBankAccountGetAutoPaging() { this.StubRequest( - HttpMethod.Post, - "/v2/billing/license_fees", + HttpMethod.Get, + "/v2/core/vault/us_bank_accounts", (HttpStatusCode)200, - "{\"object\":\"v2.billing.license_fee\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"licensed_item\":{\"object\":\"v2.billing.licensed_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true},\"live_version\":\"live_version\",\"livemode\":true,\"service_cycle\":{\"interval\":\"month\",\"interval_count\":797691627},\"tax_behavior\":\"exclusive\",\"tiers\":[{}]}"); - var options = new Stripe.V2.Billing.LicenseFeeCreateOptions - { - Currency = "usd", - DisplayName = "display_name", - LicensedItem = "licensed_item", - ServiceInterval = "month", - ServiceIntervalCount = 1375336415, - TaxBehavior = "exclusive", - }; + "{\"data\":[{\"object\":\"v2.core.vault.us_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"],\"verification\":{\"status\":\"verification_failed\"}}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.LicenseFees; - Stripe.V2.Billing.LicenseFee licenseFee = service.Create(options); - this.AssertRequest(HttpMethod.Post, "/v2/billing/license_fees"); + var service = client.V2.Core.Vault.UsBankAccounts; + var usBankAccount = service.ListAutoPaging().First(); + this.AssertRequest( + HttpMethod.Get, + "/v2/core/vault/us_bank_accounts"); } [Fact] - public void TestV2BillingLicenseFeeGet2() + public async Task TestV2CoreVaultUsBankAccountGetAutoPagingAsync() { this.StubRequest( HttpMethod.Get, - "/v2/billing/license_fees/id_123", + "/v2/core/vault/us_bank_accounts", (HttpStatusCode)200, - "{\"object\":\"v2.billing.license_fee\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"licensed_item\":{\"object\":\"v2.billing.licensed_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true},\"live_version\":\"live_version\",\"livemode\":true,\"service_cycle\":{\"interval\":\"month\",\"interval_count\":797691627},\"tax_behavior\":\"exclusive\",\"tiers\":[{}]}"); + "{\"data\":[{\"object\":\"v2.core.vault.us_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"],\"verification\":{\"status\":\"verification_failed\"}}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.LicenseFees; - Stripe.V2.Billing.LicenseFee licenseFee = service.Get("id_123"); + var service = client.V2.Core.Vault.UsBankAccounts; + var usBankAccount = await service.ListAutoPagingAsync() + .FirstAsync(); this.AssertRequest( HttpMethod.Get, - "/v2/billing/license_fees/id_123"); + "/v2/core/vault/us_bank_accounts"); } [Fact] - public void TestV2BillingLicenseFeePost2() + public void TestV2CoreVaultUsBankAccountPost() { this.StubRequest( HttpMethod.Post, - "/v2/billing/license_fees/id_123", + "/v2/core/vault/us_bank_accounts", (HttpStatusCode)200, - "{\"object\":\"v2.billing.license_fee\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"licensed_item\":{\"object\":\"v2.billing.licensed_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true},\"live_version\":\"live_version\",\"livemode\":true,\"service_cycle\":{\"interval\":\"month\",\"interval_count\":797691627},\"tax_behavior\":\"exclusive\",\"tiers\":[{}]}"); - var options = new Stripe.V2.Billing.LicenseFeeUpdateOptions(); + "{\"object\":\"v2.core.vault.us_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"],\"verification\":{\"status\":\"verification_failed\"}}"); + var options = new Stripe.V2.Core.Vault.UsBankAccountCreateOptions + { + AccountNumber = "account_number", + Currency = "usd", + }; var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.LicenseFees; - Stripe.V2.Billing.LicenseFee licenseFee = service.Update( - "id_123", + var service = client.V2.Core.Vault.UsBankAccounts; + Stripe.V2.Core.Vault.UsBankAccount usBankAccount = service.Create( options); this.AssertRequest( HttpMethod.Post, - "/v2/billing/license_fees/id_123"); + "/v2/core/vault/us_bank_accounts"); } [Fact] - public void TestV2BillingLicenseFeesVersionGet() + public async Task TestV2CoreVaultUsBankAccountPostAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/vault/us_bank_accounts", + (HttpStatusCode)200, + "{\"object\":\"v2.core.vault.us_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"],\"verification\":{\"status\":\"verification_failed\"}}"); + var options = new Stripe.V2.Core.Vault.UsBankAccountCreateOptions + { + AccountNumber = "account_number", + Currency = "usd", + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Vault.UsBankAccounts; + Stripe.V2.Core.Vault.UsBankAccount usBankAccount = await service + .CreateAsync(options); + this.AssertRequest( + HttpMethod.Post, + "/v2/core/vault/us_bank_accounts"); + } + + [Fact] + public void TestV2CoreVaultUsBankAccountGet2() { this.StubRequest( HttpMethod.Get, - "/v2/billing/license_fees/license_fee_id_123/versions", + "/v2/core/vault/us_bank_accounts/id_123", (HttpStatusCode)200, - "{\"data\":[{\"object\":\"v2.billing.license_fee_version\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"license_fee_id\":\"license_fee_id\",\"livemode\":true,\"tiers\":[{}]}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"object\":\"v2.core.vault.us_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"],\"verification\":{\"status\":\"verification_failed\"}}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.LicenseFees.Versions; - Stripe.V2.StripeList licenseFeeVersions = service - .List("license_fee_id_123"); + var service = client.V2.Core.Vault.UsBankAccounts; + Stripe.V2.Core.Vault.UsBankAccount usBankAccount = service.Get( + "id_123"); this.AssertRequest( HttpMethod.Get, - "/v2/billing/license_fees/license_fee_id_123/versions"); + "/v2/core/vault/us_bank_accounts/id_123"); } [Fact] - public void TestV2BillingLicenseFeesVersionGet2() + public async Task TestV2CoreVaultUsBankAccountGet2Async() { this.StubRequest( HttpMethod.Get, - "/v2/billing/license_fees/license_fee_id_123/versions/id_123", + "/v2/core/vault/us_bank_accounts/id_123", (HttpStatusCode)200, - "{\"object\":\"v2.billing.license_fee_version\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"license_fee_id\":\"license_fee_id\",\"livemode\":true,\"tiers\":[{}]}"); + "{\"object\":\"v2.core.vault.us_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"],\"verification\":{\"status\":\"verification_failed\"}}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Vault.UsBankAccounts; + Stripe.V2.Core.Vault.UsBankAccount usBankAccount = await service + .GetAsync("id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/core/vault/us_bank_accounts/id_123"); + } + + [Fact] + public void TestV2CoreVaultUsBankAccountPost2() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/vault/us_bank_accounts/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.core.vault.us_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"],\"verification\":{\"status\":\"verification_failed\"}}"); + var options = new Stripe.V2.Core.Vault.UsBankAccountUpdateOptions(); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.LicenseFees.Versions; - Stripe.V2.Billing.LicenseFeeVersion licenseFeeVersion = service.Get( - "license_fee_id_123", - "id_123"); + var service = client.V2.Core.Vault.UsBankAccounts; + Stripe.V2.Core.Vault.UsBankAccount usBankAccount = service.Update( + "id_123", + options); this.AssertRequest( - HttpMethod.Get, - "/v2/billing/license_fees/license_fee_id_123/versions/id_123"); + HttpMethod.Post, + "/v2/core/vault/us_bank_accounts/id_123"); } [Fact] - public void TestV2BillingLicensedItemGet() + public async Task TestV2CoreVaultUsBankAccountPost2Async() { this.StubRequest( - HttpMethod.Get, - "/v2/billing/licensed_items", + HttpMethod.Post, + "/v2/core/vault/us_bank_accounts/id_123", (HttpStatusCode)200, - "{\"data\":[{\"object\":\"v2.billing.licensed_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"object\":\"v2.core.vault.us_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"],\"verification\":{\"status\":\"verification_failed\"}}"); + var options = new Stripe.V2.Core.Vault.UsBankAccountUpdateOptions(); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.LicensedItems; - Stripe.V2.StripeList licensedItems = service - .List(); - this.AssertRequest(HttpMethod.Get, "/v2/billing/licensed_items"); + var service = client.V2.Core.Vault.UsBankAccounts; + Stripe.V2.Core.Vault.UsBankAccount usBankAccount = await service + .UpdateAsync("id_123", options); + this.AssertRequest( + HttpMethod.Post, + "/v2/core/vault/us_bank_accounts/id_123"); } [Fact] - public void TestV2BillingLicensedItemPost() + public void TestV2CoreVaultUsBankAccountPost3() { this.StubRequest( HttpMethod.Post, - "/v2/billing/licensed_items", + "/v2/core/vault/us_bank_accounts/id_123/archive", (HttpStatusCode)200, - "{\"object\":\"v2.billing.licensed_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true}"); - var options = new Stripe.V2.Billing.LicensedItemCreateOptions - { - DisplayName = "display_name", - }; + "{\"object\":\"v2.core.vault.us_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"],\"verification\":{\"status\":\"verification_failed\"}}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.LicensedItems; - Stripe.V2.Billing.LicensedItem licensedItem = service.Create( - options); - this.AssertRequest(HttpMethod.Post, "/v2/billing/licensed_items"); + var service = client.V2.Core.Vault.UsBankAccounts; + Stripe.V2.Core.Vault.UsBankAccount usBankAccount = service.Archive( + "id_123"); + this.AssertRequest( + HttpMethod.Post, + "/v2/core/vault/us_bank_accounts/id_123/archive"); } [Fact] - public void TestV2BillingLicensedItemGet2() + public async Task TestV2CoreVaultUsBankAccountPost3Async() { this.StubRequest( - HttpMethod.Get, - "/v2/billing/licensed_items/id_123", + HttpMethod.Post, + "/v2/core/vault/us_bank_accounts/id_123/archive", (HttpStatusCode)200, - "{\"object\":\"v2.billing.licensed_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true}"); + "{\"object\":\"v2.core.vault.us_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"],\"verification\":{\"status\":\"verification_failed\"}}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.LicensedItems; - Stripe.V2.Billing.LicensedItem licensedItem = service.Get("id_123"); + var service = client.V2.Core.Vault.UsBankAccounts; + Stripe.V2.Core.Vault.UsBankAccount usBankAccount = await service + .ArchiveAsync("id_123"); this.AssertRequest( - HttpMethod.Get, - "/v2/billing/licensed_items/id_123"); + HttpMethod.Post, + "/v2/core/vault/us_bank_accounts/id_123/archive"); } [Fact] - public void TestV2BillingLicensedItemPost2() + public void TestV2CoreVaultUsBankAccountPost4() { this.StubRequest( HttpMethod.Post, - "/v2/billing/licensed_items/id_123", + "/v2/core/vault/us_bank_accounts/id_123/confirm_microdeposits", (HttpStatusCode)200, - "{\"object\":\"v2.billing.licensed_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true}"); - var options = new Stripe.V2.Billing.LicensedItemUpdateOptions(); + "{\"object\":\"v2.core.vault.us_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"],\"verification\":{\"status\":\"verification_failed\"}}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.LicensedItems; - Stripe.V2.Billing.LicensedItem licensedItem = service.Update( - "id_123", - options); + var service = client.V2.Core.Vault.UsBankAccounts; + Stripe.V2.Core.Vault.UsBankAccount usBankAccount = service + .ConfirmMicrodeposits("id_123"); this.AssertRequest( HttpMethod.Post, - "/v2/billing/licensed_items/id_123"); + "/v2/core/vault/us_bank_accounts/id_123/confirm_microdeposits"); } [Fact] - public void TestV2BillingMeterEventPost() + public async Task TestV2CoreVaultUsBankAccountPost4Async() { this.StubRequest( HttpMethod.Post, - "/v2/billing/meter_events", + "/v2/core/vault/us_bank_accounts/id_123/confirm_microdeposits", (HttpStatusCode)200, - "{\"object\":\"v2.billing.meter_event\",\"created\":\"1970-01-12T21:42:34.472Z\",\"event_name\":\"event_name\",\"identifier\":\"identifier\",\"livemode\":true,\"payload\":{\"key\":\"payload\"},\"timestamp\":\"1970-01-01T15:18:46.294Z\"}"); - var options = new Stripe.V2.Billing.MeterEventCreateOptions - { - EventName = "event_name", - Payload = new Dictionary - { - { "key", "payload" }, - }, - }; + "{\"object\":\"v2.core.vault.us_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"],\"verification\":{\"status\":\"verification_failed\"}}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.MeterEvents; - Stripe.V2.Billing.MeterEvent meterEvent = service.Create(options); - this.AssertRequest(HttpMethod.Post, "/v2/billing/meter_events"); + var service = client.V2.Core.Vault.UsBankAccounts; + Stripe.V2.Core.Vault.UsBankAccount usBankAccount = await service + .ConfirmMicrodepositsAsync("id_123"); + this.AssertRequest( + HttpMethod.Post, + "/v2/core/vault/us_bank_accounts/id_123/confirm_microdeposits"); } [Fact] - public void TestV2BillingMeterEventAdjustmentPost() + public void TestV2CoreVaultUsBankAccountPost5() { this.StubRequest( HttpMethod.Post, - "/v2/billing/meter_event_adjustments", + "/v2/core/vault/us_bank_accounts/id_123/send_microdeposits", (HttpStatusCode)200, - "{\"object\":\"v2.billing.meter_event_adjustment\",\"cancel\":{\"identifier\":\"identifier\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"event_name\":\"event_name\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"complete\",\"type\":\"cancel\"}"); - var options = new Stripe.V2.Billing.MeterEventAdjustmentCreateOptions - { - Cancel = new Stripe.V2.Billing.MeterEventAdjustmentCreateCancelOptions - { - Identifier = "identifier", - }, - EventName = "event_name", - Type = "cancel", - }; + "{\"object\":\"v2.core.vault.us_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"],\"verification\":{\"status\":\"verification_failed\"}}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.MeterEventAdjustments; - Stripe.V2.Billing.MeterEventAdjustment meterEventAdjustment = service - .Create(options); + var service = client.V2.Core.Vault.UsBankAccounts; + Stripe.V2.Core.Vault.UsBankAccount usBankAccount = service + .SendMicrodeposits("id_123"); this.AssertRequest( HttpMethod.Post, - "/v2/billing/meter_event_adjustments"); + "/v2/core/vault/us_bank_accounts/id_123/send_microdeposits"); } [Fact] - public void TestV2BillingMeterEventSessionPost() + public async Task TestV2CoreVaultUsBankAccountPost5Async() { this.StubRequest( HttpMethod.Post, - "/v2/billing/meter_event_session", + "/v2/core/vault/us_bank_accounts/id_123/send_microdeposits", (HttpStatusCode)200, - "{\"object\":\"v2.billing.meter_event_session\",\"authentication_token\":\"authentication_token\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true}"); - var options = new Stripe.V2.Billing.MeterEventSessionCreateOptions(); + "{\"object\":\"v2.core.vault.us_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"],\"verification\":{\"status\":\"verification_failed\"}}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.MeterEventSession; - Stripe.V2.Billing.MeterEventSession meterEventSession = service - .Create(options); + var service = client.V2.Core.Vault.UsBankAccounts; + Stripe.V2.Core.Vault.UsBankAccount usBankAccount = await service + .SendMicrodepositsAsync("id_123"); this.AssertRequest( HttpMethod.Post, - "/v2/billing/meter_event_session"); + "/v2/core/vault/us_bank_accounts/id_123/send_microdeposits"); } [Fact] - public void TestV2BillingMeterEventStreamPost() + public void TestV2DataAnalyticsMetricQueryPost() { this.StubRequest( HttpMethod.Post, - "/v2/billing/meter_event_stream", + "/v2/data/analytics/metric_query", (HttpStatusCode)200, - "{}"); - var options = new Stripe.V2.Billing.MeterEventStreamCreateOptions + "{\"object\":\"v2.data.analytics.metric_query_result\",\"created\":\"1970-01-12T21:42:34.472Z\",\"data\":[{\"dimensions\":{\"key\":\"dimensions\"},\"id\":\"obj_123\",\"results\":[{\"metric\":\"metric\",\"name\":\"name\",\"value\":\"111972721\"}],\"timestamp\":\"1970-01-01T15:18:46.294Z\"}],\"id\":\"obj_123\",\"livemode\":true,\"refreshed_at\":\"1970-01-01T11:25:45.896Z\"}"); + var options = new Stripe.V2.Data.Analytics.MetricQueryCreateOptions { - Events = new List + EndsAt = DateTimeOffset.Parse("1970-01-19T14:12:09.638Z") + .UtcDateTime, + Granularity = "week", + Metrics = new List { - new Stripe.V2.Billing.MeterEventStreamCreateEventOptions + new Stripe.V2.Data.Analytics.MetricQueryCreateMetricOptions { - EventName = "event_name", - Identifier = "identifier", - Payload = new Dictionary - { - { "key", "payload" }, - }, - Timestamp = DateTimeOffset.Parse( - "1970-01-01T15:18:46.294Z") - .UtcDateTime, + Id = "obj_123", + Name = "name", }, }, + StartsAt = DateTimeOffset.Parse("1970-01-25T15:13:01.215Z") + .UtcDateTime, }; var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.MeterEventStream; - service.Create(options); + var service = client.V2.Data.Analytics.MetricQuery; + Stripe.V2.Data.Analytics.MetricQueryResult metricQueryResult = service + .Create(options); this.AssertRequest( HttpMethod.Post, - "/v2/billing/meter_event_stream"); + "/v2/data/analytics/metric_query"); } [Fact] - public void TestV2BillingMeteredItemGet() + public async Task TestV2DataAnalyticsMetricQueryPostAsync() { this.StubRequest( - HttpMethod.Get, - "/v2/billing/metered_items", + HttpMethod.Post, + "/v2/data/analytics/metric_query", (HttpStatusCode)200, - "{\"data\":[{\"object\":\"v2.billing.metered_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"invoice_presentation_dimensions\":[\"invoice_presentation_dimensions\"],\"livemode\":true,\"meter\":\"meter\",\"meter_segment_conditions\":[{\"dimension\":\"dimension\",\"value\":\"value\"}]}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"object\":\"v2.data.analytics.metric_query_result\",\"created\":\"1970-01-12T21:42:34.472Z\",\"data\":[{\"dimensions\":{\"key\":\"dimensions\"},\"id\":\"obj_123\",\"results\":[{\"metric\":\"metric\",\"name\":\"name\",\"value\":\"111972721\"}],\"timestamp\":\"1970-01-01T15:18:46.294Z\"}],\"id\":\"obj_123\",\"livemode\":true,\"refreshed_at\":\"1970-01-01T11:25:45.896Z\"}"); + var options = new Stripe.V2.Data.Analytics.MetricQueryCreateOptions + { + EndsAt = DateTimeOffset.Parse("1970-01-19T14:12:09.638Z") + .UtcDateTime, + Granularity = "week", + Metrics = new List + { + new Stripe.V2.Data.Analytics.MetricQueryCreateMetricOptions + { + Id = "obj_123", + Name = "name", + }, + }, + StartsAt = DateTimeOffset.Parse("1970-01-25T15:13:01.215Z") + .UtcDateTime, + }; var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.MeteredItems; - Stripe.V2.StripeList meteredItems = service - .List(); - this.AssertRequest(HttpMethod.Get, "/v2/billing/metered_items"); + var service = client.V2.Data.Analytics.MetricQuery; + Stripe.V2.Data.Analytics.MetricQueryResult metricQueryResult = await service + .CreateAsync(options); + this.AssertRequest( + HttpMethod.Post, + "/v2/data/analytics/metric_query"); } [Fact] - public void TestV2BillingMeteredItemPost() + public void TestV2DataReportingQueryRunPost() { this.StubRequest( HttpMethod.Post, - "/v2/billing/metered_items", + "/v2/data/reporting/query_runs", (HttpStatusCode)200, - "{\"object\":\"v2.billing.metered_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"invoice_presentation_dimensions\":[\"invoice_presentation_dimensions\"],\"livemode\":true,\"meter\":\"meter\",\"meter_segment_conditions\":[{\"dimension\":\"dimension\",\"value\":\"value\"}]}"); - var options = new Stripe.V2.Billing.MeteredItemCreateOptions + "{\"object\":\"v2.data.reporting.query_run\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"sql\":\"sql\",\"status\":\"failed\",\"status_details\":{\"key\":{}}}"); + var options = new Stripe.V2.Data.Reporting.QueryRunCreateOptions { - DisplayName = "display_name", - Meter = "meter", + Sql = "sql", }; var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.MeteredItems; - Stripe.V2.Billing.MeteredItem meteredItem = service.Create(options); - this.AssertRequest(HttpMethod.Post, "/v2/billing/metered_items"); + var service = client.V2.Data.Reporting.QueryRuns; + Stripe.V2.Data.Reporting.QueryRun queryRun = service.Create( + options); + this.AssertRequest( + HttpMethod.Post, + "/v2/data/reporting/query_runs"); } [Fact] - public void TestV2BillingMeteredItemGet2() + public async Task TestV2DataReportingQueryRunPostAsync() { this.StubRequest( - HttpMethod.Get, - "/v2/billing/metered_items/id_123", + HttpMethod.Post, + "/v2/data/reporting/query_runs", (HttpStatusCode)200, - "{\"object\":\"v2.billing.metered_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"invoice_presentation_dimensions\":[\"invoice_presentation_dimensions\"],\"livemode\":true,\"meter\":\"meter\",\"meter_segment_conditions\":[{\"dimension\":\"dimension\",\"value\":\"value\"}]}"); + "{\"object\":\"v2.data.reporting.query_run\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"sql\":\"sql\",\"status\":\"failed\",\"status_details\":{\"key\":{}}}"); + var options = new Stripe.V2.Data.Reporting.QueryRunCreateOptions + { + Sql = "sql", + }; var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.MeteredItems; - Stripe.V2.Billing.MeteredItem meteredItem = service.Get("id_123"); + var service = client.V2.Data.Reporting.QueryRuns; + Stripe.V2.Data.Reporting.QueryRun queryRun = await service + .CreateAsync(options); this.AssertRequest( - HttpMethod.Get, - "/v2/billing/metered_items/id_123"); + HttpMethod.Post, + "/v2/data/reporting/query_runs"); } [Fact] - public void TestV2BillingMeteredItemPost2() + public void TestV2DataReportingQueryRunGet() { this.StubRequest( - HttpMethod.Post, - "/v2/billing/metered_items/id_123", + HttpMethod.Get, + "/v2/data/reporting/query_runs/id_123", (HttpStatusCode)200, - "{\"object\":\"v2.billing.metered_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"invoice_presentation_dimensions\":[\"invoice_presentation_dimensions\"],\"livemode\":true,\"meter\":\"meter\",\"meter_segment_conditions\":[{\"dimension\":\"dimension\",\"value\":\"value\"}]}"); - var options = new Stripe.V2.Billing.MeteredItemUpdateOptions(); + "{\"object\":\"v2.data.reporting.query_run\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"sql\":\"sql\",\"status\":\"failed\",\"status_details\":{\"key\":{}}}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.MeteredItems; - Stripe.V2.Billing.MeteredItem meteredItem = service.Update( - "id_123", - options); + var service = client.V2.Data.Reporting.QueryRuns; + Stripe.V2.Data.Reporting.QueryRun queryRun = service.Get("id_123"); this.AssertRequest( - HttpMethod.Post, - "/v2/billing/metered_items/id_123"); + HttpMethod.Get, + "/v2/data/reporting/query_runs/id_123"); } [Fact] - public void TestV2BillingOneTimeItemGet() + public async Task TestV2DataReportingQueryRunGetAsync() { this.StubRequest( HttpMethod.Get, - "/v2/billing/one_time_items", + "/v2/data/reporting/query_runs/id_123", (HttpStatusCode)200, - "{\"data\":[{\"object\":\"v2.billing.one_time_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"object\":\"v2.data.reporting.query_run\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"sql\":\"sql\",\"status\":\"failed\",\"status_details\":{\"key\":{}}}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.OneTimeItems; - Stripe.V2.StripeList oneTimeItems = service - .List(); - this.AssertRequest(HttpMethod.Get, "/v2/billing/one_time_items"); + var service = client.V2.Data.Reporting.QueryRuns; + Stripe.V2.Data.Reporting.QueryRun queryRun = await service.GetAsync( + "id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/data/reporting/query_runs/id_123"); } [Fact] - public void TestV2BillingOneTimeItemPost() + public void TestV2ExtendWorkflowGet() { this.StubRequest( - HttpMethod.Post, - "/v2/billing/one_time_items", + HttpMethod.Get, + "/v2/extend/workflows", (HttpStatusCode)200, - "{\"object\":\"v2.billing.one_time_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true}"); - var options = new Stripe.V2.Billing.OneTimeItemCreateOptions - { - DisplayName = "display_name", - }; + "{\"data\":[{\"object\":\"v2.extend.workflow\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"draft\",\"title\":\"title\",\"triggers\":[{\"type\":\"event_trigger\"}]}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.OneTimeItems; - Stripe.V2.Billing.OneTimeItem oneTimeItem = service.Create(options); - this.AssertRequest(HttpMethod.Post, "/v2/billing/one_time_items"); + var service = client.V2.Extend.Workflows; + Stripe.V2.StripeList workflows = service + .List(); + this.AssertRequest(HttpMethod.Get, "/v2/extend/workflows"); } [Fact] - public void TestV2BillingOneTimeItemGet2() + public async Task TestV2ExtendWorkflowGetAsync() { this.StubRequest( HttpMethod.Get, - "/v2/billing/one_time_items/id_123", + "/v2/extend/workflows", (HttpStatusCode)200, - "{\"object\":\"v2.billing.one_time_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true}"); + "{\"data\":[{\"object\":\"v2.extend.workflow\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"draft\",\"title\":\"title\",\"triggers\":[{\"type\":\"event_trigger\"}]}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.OneTimeItems; - Stripe.V2.Billing.OneTimeItem oneTimeItem = service.Get("id_123"); - this.AssertRequest( - HttpMethod.Get, - "/v2/billing/one_time_items/id_123"); + var service = client.V2.Extend.Workflows; + Stripe.V2.StripeList workflows = await service + .ListAsync(); + this.AssertRequest(HttpMethod.Get, "/v2/extend/workflows"); } [Fact] - public void TestV2BillingOneTimeItemPost2() + public void TestV2ExtendWorkflowGetAutoPaging() { this.StubRequest( - HttpMethod.Post, - "/v2/billing/one_time_items/id_123", + HttpMethod.Get, + "/v2/extend/workflows", (HttpStatusCode)200, - "{\"object\":\"v2.billing.one_time_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true}"); - var options = new Stripe.V2.Billing.OneTimeItemUpdateOptions(); + "{\"data\":[{\"object\":\"v2.extend.workflow\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"draft\",\"title\":\"title\",\"triggers\":[{\"type\":\"event_trigger\"}]}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.OneTimeItems; - Stripe.V2.Billing.OneTimeItem oneTimeItem = service.Update( - "id_123", - options); - this.AssertRequest( - HttpMethod.Post, - "/v2/billing/one_time_items/id_123"); + var service = client.V2.Extend.Workflows; + var workflow = service.ListAutoPaging().First(); + this.AssertRequest(HttpMethod.Get, "/v2/extend/workflows"); } [Fact] - public void TestV2BillingPricingPlanGet() + public async Task TestV2ExtendWorkflowGetAutoPagingAsync() { this.StubRequest( HttpMethod.Get, - "/v2/billing/pricing_plans", + "/v2/extend/workflows", (HttpStatusCode)200, - "{\"data\":[{\"object\":\"v2.billing.pricing_plan\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true,\"tax_behavior\":\"exclusive\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"object\":\"v2.extend.workflow\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"draft\",\"title\":\"title\",\"triggers\":[{\"type\":\"event_trigger\"}]}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.PricingPlans; - Stripe.V2.StripeList pricingPlans = service - .List(); - this.AssertRequest(HttpMethod.Get, "/v2/billing/pricing_plans"); + var service = client.V2.Extend.Workflows; + var workflow = await service.ListAutoPagingAsync().FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v2/extend/workflows"); } [Fact] - public void TestV2BillingPricingPlanPost() + public void TestV2ExtendWorkflowGet2() { this.StubRequest( - HttpMethod.Post, - "/v2/billing/pricing_plans", + HttpMethod.Get, + "/v2/extend/workflows/id_123", (HttpStatusCode)200, - "{\"object\":\"v2.billing.pricing_plan\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true,\"tax_behavior\":\"exclusive\"}"); - var options = new Stripe.V2.Billing.PricingPlanCreateOptions - { - Currency = "usd", - DisplayName = "display_name", - TaxBehavior = "exclusive", - }; + "{\"object\":\"v2.extend.workflow\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"draft\",\"title\":\"title\",\"triggers\":[{\"type\":\"event_trigger\"}]}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.PricingPlans; - Stripe.V2.Billing.PricingPlan pricingPlan = service.Create(options); - this.AssertRequest(HttpMethod.Post, "/v2/billing/pricing_plans"); + var service = client.V2.Extend.Workflows; + Stripe.V2.Extend.Workflow workflow = service.Get("id_123"); + this.AssertRequest(HttpMethod.Get, "/v2/extend/workflows/id_123"); } [Fact] - public void TestV2BillingPricingPlanGet2() + public async Task TestV2ExtendWorkflowGet2Async() { this.StubRequest( HttpMethod.Get, - "/v2/billing/pricing_plans/id_123", + "/v2/extend/workflows/id_123", (HttpStatusCode)200, - "{\"object\":\"v2.billing.pricing_plan\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true,\"tax_behavior\":\"exclusive\"}"); + "{\"object\":\"v2.extend.workflow\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"draft\",\"title\":\"title\",\"triggers\":[{\"type\":\"event_trigger\"}]}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.PricingPlans; - Stripe.V2.Billing.PricingPlan pricingPlan = service.Get("id_123"); - this.AssertRequest( - HttpMethod.Get, - "/v2/billing/pricing_plans/id_123"); + var service = client.V2.Extend.Workflows; + Stripe.V2.Extend.Workflow workflow = await service.GetAsync( + "id_123"); + this.AssertRequest(HttpMethod.Get, "/v2/extend/workflows/id_123"); } [Fact] - public void TestV2BillingPricingPlanPost2() + public void TestV2ExtendWorkflowPost() { this.StubRequest( HttpMethod.Post, - "/v2/billing/pricing_plans/id_123", + "/v2/extend/workflows/id_123/invoke", (HttpStatusCode)200, - "{\"object\":\"v2.billing.pricing_plan\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true,\"tax_behavior\":\"exclusive\"}"); - var options = new Stripe.V2.Billing.PricingPlanUpdateOptions(); + "{\"object\":\"v2.extend.workflow_run\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"failed\",\"status_transitions\":{},\"trigger\":{\"type\":\"event_trigger\"},\"workflow\":\"workflow\"}"); + var options = new Stripe.V2.Extend.WorkflowInvokeOptions + { + InputParameters = new Dictionary + { + { "int_key", 123 }, + { "string_key", "value" }, + { "boolean_key", true }, + { + "object_key", new Dictionary + { + { "object_int_key", 123 }, + { "object_string_key", "value" }, + { "object_boolean_key", true }, + } + }, + { "array_key", new List { 1, 2, 3 } }, + }, + }; var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.PricingPlans; - Stripe.V2.Billing.PricingPlan pricingPlan = service.Update( + var service = client.V2.Extend.Workflows; + Stripe.V2.Extend.WorkflowRun workflowRun = service.Invoke( "id_123", options); this.AssertRequest( HttpMethod.Post, - "/v2/billing/pricing_plans/id_123"); - } - - [Fact] - public void TestV2BillingPricingPlansComponentGet() - { - this.StubRequest( - HttpMethod.Get, - "/v2/billing/pricing_plans/pricing_plan_id_123/components", - (HttpStatusCode)200, - "{\"data\":[{\"object\":\"v2.billing.pricing_plan_component\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"pricing_plan\":\"pricing_plan\",\"pricing_plan_version\":\"pricing_plan_version\",\"type\":\"license_fee\"}],\"next_page_url\":null,\"previous_page_url\":null}"); - var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.PricingPlans.Components; - Stripe.V2.StripeList pricingPlanComponents = service - .List("pricing_plan_id_123"); - this.AssertRequest( - HttpMethod.Get, - "/v2/billing/pricing_plans/pricing_plan_id_123/components"); + "/v2/extend/workflows/id_123/invoke"); } [Fact] - public void TestV2BillingPricingPlansComponentPost() + public async Task TestV2ExtendWorkflowPostAsync() { this.StubRequest( HttpMethod.Post, - "/v2/billing/pricing_plans/pricing_plan_id_123/components", + "/v2/extend/workflows/id_123/invoke", (HttpStatusCode)200, - "{\"object\":\"v2.billing.pricing_plan_component\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"pricing_plan\":\"pricing_plan\",\"pricing_plan_version\":\"pricing_plan_version\",\"type\":\"license_fee\"}"); - var options = new Stripe.V2.Billing.PricingPlans.ComponentCreateOptions + "{\"object\":\"v2.extend.workflow_run\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"failed\",\"status_transitions\":{},\"trigger\":{\"type\":\"event_trigger\"},\"workflow\":\"workflow\"}"); + var options = new Stripe.V2.Extend.WorkflowInvokeOptions { - Type = "license_fee", + InputParameters = new Dictionary + { + { "int_key", 123 }, + { "string_key", "value" }, + { "boolean_key", true }, + { + "object_key", new Dictionary + { + { "object_int_key", 123 }, + { "object_string_key", "value" }, + { "object_boolean_key", true }, + } + }, + { "array_key", new List { 1, 2, 3 } }, + }, }; var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.PricingPlans.Components; - Stripe.V2.Billing.PricingPlanComponent pricingPlanComponent = service - .Create("pricing_plan_id_123", options); + var service = client.V2.Extend.Workflows; + Stripe.V2.Extend.WorkflowRun workflowRun = await service + .InvokeAsync("id_123", options); this.AssertRequest( HttpMethod.Post, - "/v2/billing/pricing_plans/pricing_plan_id_123/components"); + "/v2/extend/workflows/id_123/invoke"); } [Fact] - public void TestV2BillingPricingPlansComponentDelete() + public void TestV2ExtendWorkflowRunGet() { this.StubRequest( - HttpMethod.Delete, - "/v2/billing/pricing_plans/pricing_plan_id_123/components/id_123", + HttpMethod.Get, + "/v2/extend/workflow_runs", (HttpStatusCode)200, - "{\"id\":\"abc_123\",\"object\":\"some.object.tag\"}"); + "{\"data\":[{\"object\":\"v2.extend.workflow_run\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"failed\",\"status_transitions\":{},\"trigger\":{\"type\":\"event_trigger\"},\"workflow\":\"workflow\"}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.PricingPlans.Components; - Stripe.V2.DeletedObject deleted = service.Delete( - "pricing_plan_id_123", - "id_123"); - this.AssertRequest( - HttpMethod.Delete, - "/v2/billing/pricing_plans/pricing_plan_id_123/components/id_123"); + var service = client.V2.Extend.WorkflowRuns; + Stripe.V2.StripeList workflowRuns = service + .List(); + this.AssertRequest(HttpMethod.Get, "/v2/extend/workflow_runs"); } [Fact] - public void TestV2BillingPricingPlansComponentGet2() + public async Task TestV2ExtendWorkflowRunGetAsync() { this.StubRequest( HttpMethod.Get, - "/v2/billing/pricing_plans/pricing_plan_id_123/components/id_123", + "/v2/extend/workflow_runs", (HttpStatusCode)200, - "{\"object\":\"v2.billing.pricing_plan_component\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"pricing_plan\":\"pricing_plan\",\"pricing_plan_version\":\"pricing_plan_version\",\"type\":\"license_fee\"}"); + "{\"data\":[{\"object\":\"v2.extend.workflow_run\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"failed\",\"status_transitions\":{},\"trigger\":{\"type\":\"event_trigger\"},\"workflow\":\"workflow\"}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.PricingPlans.Components; - Stripe.V2.Billing.PricingPlanComponent pricingPlanComponent = service - .Get("pricing_plan_id_123", "id_123"); - this.AssertRequest( - HttpMethod.Get, - "/v2/billing/pricing_plans/pricing_plan_id_123/components/id_123"); + var service = client.V2.Extend.WorkflowRuns; + Stripe.V2.StripeList workflowRuns = await service + .ListAsync(); + this.AssertRequest(HttpMethod.Get, "/v2/extend/workflow_runs"); } [Fact] - public void TestV2BillingPricingPlansComponentPost2() + public void TestV2ExtendWorkflowRunGetAutoPaging() { this.StubRequest( - HttpMethod.Post, - "/v2/billing/pricing_plans/pricing_plan_id_123/components/id_123", + HttpMethod.Get, + "/v2/extend/workflow_runs", (HttpStatusCode)200, - "{\"object\":\"v2.billing.pricing_plan_component\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"pricing_plan\":\"pricing_plan\",\"pricing_plan_version\":\"pricing_plan_version\",\"type\":\"license_fee\"}"); - var options = new Stripe.V2.Billing.PricingPlans.ComponentUpdateOptions(); + "{\"data\":[{\"object\":\"v2.extend.workflow_run\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"failed\",\"status_transitions\":{},\"trigger\":{\"type\":\"event_trigger\"},\"workflow\":\"workflow\"}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.PricingPlans.Components; - Stripe.V2.Billing.PricingPlanComponent pricingPlanComponent = service - .Update("pricing_plan_id_123", "id_123", options); - this.AssertRequest( - HttpMethod.Post, - "/v2/billing/pricing_plans/pricing_plan_id_123/components/id_123"); + var service = client.V2.Extend.WorkflowRuns; + var workflowRun = service.ListAutoPaging().First(); + this.AssertRequest(HttpMethod.Get, "/v2/extend/workflow_runs"); } [Fact] - public void TestV2BillingPricingPlansVersionGet() + public async Task TestV2ExtendWorkflowRunGetAutoPagingAsync() { this.StubRequest( HttpMethod.Get, - "/v2/billing/pricing_plans/pricing_plan_id_123/versions", + "/v2/extend/workflow_runs", (HttpStatusCode)200, - "{\"data\":[{\"object\":\"v2.billing.pricing_plan_version\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"pricing_plan\":\"pricing_plan\",\"start_date\":\"1970-01-19T05:07:09.589Z\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"object\":\"v2.extend.workflow_run\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"failed\",\"status_transitions\":{},\"trigger\":{\"type\":\"event_trigger\"},\"workflow\":\"workflow\"}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.PricingPlans.Versions; - Stripe.V2.StripeList pricingPlanVersions = service - .List("pricing_plan_id_123"); - this.AssertRequest( - HttpMethod.Get, - "/v2/billing/pricing_plans/pricing_plan_id_123/versions"); + var service = client.V2.Extend.WorkflowRuns; + var workflowRun = await service.ListAutoPagingAsync().FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v2/extend/workflow_runs"); } [Fact] - public void TestV2BillingPricingPlansVersionGet2() + public void TestV2ExtendWorkflowRunGet2() { this.StubRequest( HttpMethod.Get, - "/v2/billing/pricing_plans/pricing_plan_id_123/versions/id_123", + "/v2/extend/workflow_runs/id_123", (HttpStatusCode)200, - "{\"object\":\"v2.billing.pricing_plan_version\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"pricing_plan\":\"pricing_plan\",\"start_date\":\"1970-01-19T05:07:09.589Z\"}"); + "{\"object\":\"v2.extend.workflow_run\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"failed\",\"status_transitions\":{},\"trigger\":{\"type\":\"event_trigger\"},\"workflow\":\"workflow\"}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.PricingPlans.Versions; - Stripe.V2.Billing.PricingPlanVersion pricingPlanVersion = service - .Get("pricing_plan_id_123", "id_123"); + var service = client.V2.Extend.WorkflowRuns; + Stripe.V2.Extend.WorkflowRun workflowRun = service.Get("id_123"); this.AssertRequest( HttpMethod.Get, - "/v2/billing/pricing_plans/pricing_plan_id_123/versions/id_123"); + "/v2/extend/workflow_runs/id_123"); } [Fact] - public void TestV2BillingPricingPlanSubscriptionGet() + public async Task TestV2ExtendWorkflowRunGet2Async() { this.StubRequest( HttpMethod.Get, - "/v2/billing/pricing_plan_subscriptions", + "/v2/extend/workflow_runs/id_123", (HttpStatusCode)200, - "{\"data\":[{\"object\":\"v2.billing.pricing_plan_subscription\",\"billing_cadence\":\"billing_cadence\",\"collection_status\":\"past_due\",\"collection_status_transitions\":{},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"pricing_plan\":\"pricing_plan\",\"pricing_plan_version\":\"pricing_plan_version\",\"servicing_status\":\"pending\",\"servicing_status_transitions\":{}}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"object\":\"v2.extend.workflow_run\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"failed\",\"status_transitions\":{},\"trigger\":{\"type\":\"event_trigger\"},\"workflow\":\"workflow\"}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.PricingPlanSubscriptions; - Stripe.V2.StripeList pricingPlanSubscriptions = service - .List(); + var service = client.V2.Extend.WorkflowRuns; + Stripe.V2.Extend.WorkflowRun workflowRun = await service.GetAsync( + "id_123"); this.AssertRequest( HttpMethod.Get, - "/v2/billing/pricing_plan_subscriptions"); + "/v2/extend/workflow_runs/id_123"); } [Fact] - public void TestV2BillingPricingPlanSubscriptionGet2() + public void TestV2IamActivityLogGet() { this.StubRequest( HttpMethod.Get, - "/v2/billing/pricing_plan_subscriptions/id_123", + "/v2/iam/activity_logs", (HttpStatusCode)200, - "{\"object\":\"v2.billing.pricing_plan_subscription\",\"billing_cadence\":\"billing_cadence\",\"collection_status\":\"past_due\",\"collection_status_transitions\":{},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"pricing_plan\":\"pricing_plan\",\"pricing_plan_version\":\"pricing_plan_version\",\"servicing_status\":\"pending\",\"servicing_status_transitions\":{}}"); + "{\"data\":[{\"object\":\"v2.iam.activity_log\",\"actor\":{\"type\":\"api_key\"},\"context\":\"context\",\"created\":\"1970-01-12T21:42:34.472Z\",\"details\":{\"type\":\"api_key\"},\"id\":\"obj_123\",\"livemode\":true,\"type\":\"api_key_created\"}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.PricingPlanSubscriptions; - Stripe.V2.Billing.PricingPlanSubscription pricingPlanSubscription = service - .Get("id_123"); - this.AssertRequest( - HttpMethod.Get, - "/v2/billing/pricing_plan_subscriptions/id_123"); + var service = client.V2.Iam.ActivityLogs; + Stripe.V2.StripeList activityLogs = service + .List(); + this.AssertRequest(HttpMethod.Get, "/v2/iam/activity_logs"); } [Fact] - public void TestV2BillingPricingPlanSubscriptionPost() + public async Task TestV2IamActivityLogGetAsync() { this.StubRequest( - HttpMethod.Post, - "/v2/billing/pricing_plan_subscriptions/id_123", + HttpMethod.Get, + "/v2/iam/activity_logs", (HttpStatusCode)200, - "{\"object\":\"v2.billing.pricing_plan_subscription\",\"billing_cadence\":\"billing_cadence\",\"collection_status\":\"past_due\",\"collection_status_transitions\":{},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"pricing_plan\":\"pricing_plan\",\"pricing_plan_version\":\"pricing_plan_version\",\"servicing_status\":\"pending\",\"servicing_status_transitions\":{}}"); - var options = new Stripe.V2.Billing.PricingPlanSubscriptionUpdateOptions(); + "{\"data\":[{\"object\":\"v2.iam.activity_log\",\"actor\":{\"type\":\"api_key\"},\"context\":\"context\",\"created\":\"1970-01-12T21:42:34.472Z\",\"details\":{\"type\":\"api_key\"},\"id\":\"obj_123\",\"livemode\":true,\"type\":\"api_key_created\"}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.PricingPlanSubscriptions; - Stripe.V2.Billing.PricingPlanSubscription pricingPlanSubscription = service - .Update("id_123", options); - this.AssertRequest( - HttpMethod.Post, - "/v2/billing/pricing_plan_subscriptions/id_123"); + var service = client.V2.Iam.ActivityLogs; + Stripe.V2.StripeList activityLogs = await service + .ListAsync(); + this.AssertRequest(HttpMethod.Get, "/v2/iam/activity_logs"); } [Fact] - public void TestV2BillingPricingPlanSubscriptionPost2() + public void TestV2IamActivityLogGetAutoPaging() { this.StubRequest( - HttpMethod.Post, - "/v2/billing/pricing_plan_subscriptions/id_123/remove_discounts", + HttpMethod.Get, + "/v2/iam/activity_logs", (HttpStatusCode)200, - "{\"object\":\"v2.billing.pricing_plan_subscription\",\"billing_cadence\":\"billing_cadence\",\"collection_status\":\"past_due\",\"collection_status_transitions\":{},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"pricing_plan\":\"pricing_plan\",\"pricing_plan_version\":\"pricing_plan_version\",\"servicing_status\":\"pending\",\"servicing_status_transitions\":{}}"); + "{\"data\":[{\"object\":\"v2.iam.activity_log\",\"actor\":{\"type\":\"api_key\"},\"context\":\"context\",\"created\":\"1970-01-12T21:42:34.472Z\",\"details\":{\"type\":\"api_key\"},\"id\":\"obj_123\",\"livemode\":true,\"type\":\"api_key_created\"}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.PricingPlanSubscriptions; - Stripe.V2.Billing.PricingPlanSubscription pricingPlanSubscription = service - .RemoveDiscounts("id_123"); - this.AssertRequest( - HttpMethod.Post, - "/v2/billing/pricing_plan_subscriptions/id_123/remove_discounts"); + var service = client.V2.Iam.ActivityLogs; + var activityLog = service.ListAutoPaging().First(); + this.AssertRequest(HttpMethod.Get, "/v2/iam/activity_logs"); } [Fact] - public void TestV2BillingProfileGet() + public async Task TestV2IamActivityLogGetAutoPagingAsync() { this.StubRequest( HttpMethod.Get, - "/v2/billing/profiles", + "/v2/iam/activity_logs", (HttpStatusCode)200, - "{\"data\":[{\"object\":\"v2.billing.profile\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"active\"}],\"next_page_url\":null,\"previous_page_url\":null}", - "lookup_keys[0]=lookup_keys"); - var options = new Stripe.V2.Billing.ProfileListOptions - { - LookupKeys = new List { "lookup_keys" }, - }; + "{\"data\":[{\"object\":\"v2.iam.activity_log\",\"actor\":{\"type\":\"api_key\"},\"context\":\"context\",\"created\":\"1970-01-12T21:42:34.472Z\",\"details\":{\"type\":\"api_key\"},\"id\":\"obj_123\",\"livemode\":true,\"type\":\"api_key_created\"}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.Profiles; - Stripe.V2.StripeList profiles = service - .List(options); - this.AssertRequest( - HttpMethod.Get, - "/v2/billing/profiles", - "lookup_keys[0]=lookup_keys"); + var service = client.V2.Iam.ActivityLogs; + var activityLog = await service.ListAutoPagingAsync().FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v2/iam/activity_logs"); } [Fact] - public void TestV2BillingProfilePost() + public void TestV2IamActivityLogGet2() { this.StubRequest( - HttpMethod.Post, - "/v2/billing/profiles", + HttpMethod.Get, + "/v2/iam/activity_logs/id_123", (HttpStatusCode)200, - "{\"object\":\"v2.billing.profile\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"active\"}"); - var options = new Stripe.V2.Billing.ProfileCreateOptions - { - Customer = "customer", - }; + "{\"object\":\"v2.iam.activity_log\",\"actor\":{\"type\":\"api_key\"},\"context\":\"context\",\"created\":\"1970-01-12T21:42:34.472Z\",\"details\":{\"type\":\"api_key\"},\"id\":\"obj_123\",\"livemode\":true,\"type\":\"api_key_created\"}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.Profiles; - Stripe.V2.Billing.Profile profile = service.Create(options); - this.AssertRequest(HttpMethod.Post, "/v2/billing/profiles"); + var service = client.V2.Iam.ActivityLogs; + Stripe.V2.Iam.ActivityLog activityLog = service.Get("id_123"); + this.AssertRequest(HttpMethod.Get, "/v2/iam/activity_logs/id_123"); } [Fact] - public void TestV2BillingProfileGet2() + public async Task TestV2IamActivityLogGet2Async() { this.StubRequest( HttpMethod.Get, - "/v2/billing/profiles/id_123", + "/v2/iam/activity_logs/id_123", (HttpStatusCode)200, - "{\"object\":\"v2.billing.profile\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"active\"}"); + "{\"object\":\"v2.iam.activity_log\",\"actor\":{\"type\":\"api_key\"},\"context\":\"context\",\"created\":\"1970-01-12T21:42:34.472Z\",\"details\":{\"type\":\"api_key\"},\"id\":\"obj_123\",\"livemode\":true,\"type\":\"api_key_created\"}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.Profiles; - Stripe.V2.Billing.Profile profile = service.Get("id_123"); - this.AssertRequest(HttpMethod.Get, "/v2/billing/profiles/id_123"); + var service = client.V2.Iam.ActivityLogs; + Stripe.V2.Iam.ActivityLog activityLog = await service.GetAsync( + "id_123"); + this.AssertRequest(HttpMethod.Get, "/v2/iam/activity_logs/id_123"); } [Fact] - public void TestV2BillingProfilePost2() + public void TestV2IamApiKeyGet() { this.StubRequest( - HttpMethod.Post, - "/v2/billing/profiles/id_123", + HttpMethod.Get, + "/v2/iam/api_keys", (HttpStatusCode)200, - "{\"object\":\"v2.billing.profile\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"active\"}"); - var options = new Stripe.V2.Billing.ProfileUpdateOptions(); + "{\"data\":[{\"object\":\"v2.iam.api_key\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"ip_allowlist\":[\"ip_allowlist\"],\"livemode\":true,\"status\":\"active\",\"type\":\"publishable_key\"}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.Profiles; - Stripe.V2.Billing.Profile profile = service.Update( - "id_123", - options); - this.AssertRequest(HttpMethod.Post, "/v2/billing/profiles/id_123"); + var service = client.V2.Iam.ApiKeys; + Stripe.V2.StripeList apiKeys = service.List(); + this.AssertRequest(HttpMethod.Get, "/v2/iam/api_keys"); } [Fact] - public void TestV2BillingRateCardGet() + public async Task TestV2IamApiKeyGetAsync() { this.StubRequest( HttpMethod.Get, - "/v2/billing/rate_cards", + "/v2/iam/api_keys", (HttpStatusCode)200, - "{\"data\":[{\"object\":\"v2.billing.rate_card\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"live_version\":\"live_version\",\"livemode\":true,\"service_cycle\":{\"interval\":\"month\",\"interval_count\":797691627},\"tax_behavior\":\"exclusive\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"object\":\"v2.iam.api_key\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"ip_allowlist\":[\"ip_allowlist\"],\"livemode\":true,\"status\":\"active\",\"type\":\"publishable_key\"}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.RateCards; - Stripe.V2.StripeList rateCards = service - .List(); - this.AssertRequest(HttpMethod.Get, "/v2/billing/rate_cards"); + var service = client.V2.Iam.ApiKeys; + Stripe.V2.StripeList apiKeys = await service + .ListAsync(); + this.AssertRequest(HttpMethod.Get, "/v2/iam/api_keys"); } [Fact] - public void TestV2BillingRateCardPost() + public void TestV2IamApiKeyGetAutoPaging() { this.StubRequest( - HttpMethod.Post, - "/v2/billing/rate_cards", + HttpMethod.Get, + "/v2/iam/api_keys", (HttpStatusCode)200, - "{\"object\":\"v2.billing.rate_card\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"live_version\":\"live_version\",\"livemode\":true,\"service_cycle\":{\"interval\":\"month\",\"interval_count\":797691627},\"tax_behavior\":\"exclusive\"}"); - var options = new Stripe.V2.Billing.RateCardCreateOptions - { - Currency = "usd", - DisplayName = "display_name", - ServiceInterval = "month", - ServiceIntervalCount = 1375336415, - TaxBehavior = "exclusive", - }; + "{\"data\":[{\"object\":\"v2.iam.api_key\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"ip_allowlist\":[\"ip_allowlist\"],\"livemode\":true,\"status\":\"active\",\"type\":\"publishable_key\"}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.RateCards; - Stripe.V2.Billing.RateCard rateCard = service.Create(options); - this.AssertRequest(HttpMethod.Post, "/v2/billing/rate_cards"); + var service = client.V2.Iam.ApiKeys; + var apiKey = service.ListAutoPaging().First(); + this.AssertRequest(HttpMethod.Get, "/v2/iam/api_keys"); } [Fact] - public void TestV2BillingRateCardGet2() + public async Task TestV2IamApiKeyGetAutoPagingAsync() { this.StubRequest( HttpMethod.Get, - "/v2/billing/rate_cards/id_123", + "/v2/iam/api_keys", (HttpStatusCode)200, - "{\"object\":\"v2.billing.rate_card\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"live_version\":\"live_version\",\"livemode\":true,\"service_cycle\":{\"interval\":\"month\",\"interval_count\":797691627},\"tax_behavior\":\"exclusive\"}"); + "{\"data\":[{\"object\":\"v2.iam.api_key\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"ip_allowlist\":[\"ip_allowlist\"],\"livemode\":true,\"status\":\"active\",\"type\":\"publishable_key\"}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.RateCards; - Stripe.V2.Billing.RateCard rateCard = service.Get("id_123"); - this.AssertRequest(HttpMethod.Get, "/v2/billing/rate_cards/id_123"); + var service = client.V2.Iam.ApiKeys; + var apiKey = await service.ListAutoPagingAsync().FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v2/iam/api_keys"); } [Fact] - public void TestV2BillingRateCardPost2() + public void TestV2IamApiKeyPost() { this.StubRequest( HttpMethod.Post, - "/v2/billing/rate_cards/id_123", + "/v2/iam/api_keys", (HttpStatusCode)200, - "{\"object\":\"v2.billing.rate_card\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"live_version\":\"live_version\",\"livemode\":true,\"service_cycle\":{\"interval\":\"month\",\"interval_count\":797691627},\"tax_behavior\":\"exclusive\"}"); - var options = new Stripe.V2.Billing.RateCardUpdateOptions(); + "{\"object\":\"v2.iam.api_key\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"ip_allowlist\":[\"ip_allowlist\"],\"livemode\":true,\"status\":\"active\",\"type\":\"publishable_key\"}"); + var options = new Stripe.V2.Iam.ApiKeyCreateOptions + { + Type = "publishable_key", + }; var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.RateCards; - Stripe.V2.Billing.RateCard rateCard = service.Update( - "id_123", - options); - this.AssertRequest( - HttpMethod.Post, - "/v2/billing/rate_cards/id_123"); + var service = client.V2.Iam.ApiKeys; + Stripe.V2.Iam.ApiKey apiKey = service.Create(options); + this.AssertRequest(HttpMethod.Post, "/v2/iam/api_keys"); } [Fact] - public void TestV2BillingRateCardPost3() + public async Task TestV2IamApiKeyPostAsync() { this.StubRequest( HttpMethod.Post, - "/v2/billing/rate_cards/id_123/modify_rates", + "/v2/iam/api_keys", (HttpStatusCode)200, - "{\"object\":\"v2.billing.rate_card_version\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"rate_card_id\":\"rate_card_id\"}"); - var options = new Stripe.V2.Billing.RateCardModifyRatesOptions + "{\"object\":\"v2.iam.api_key\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"ip_allowlist\":[\"ip_allowlist\"],\"livemode\":true,\"status\":\"active\",\"type\":\"publishable_key\"}"); + var options = new Stripe.V2.Iam.ApiKeyCreateOptions { - RatesToCreate = new List - { - new Stripe.V2.Billing.RateCardModifyRatesRatesToCreateOptions - { - Metadata = new Dictionary - { - { "key", "metadata" }, - }, - MeteredItem = "metered_item", - MeteredItemData = new Stripe.V2.Billing.RateCardModifyRatesRatesToCreateMeteredItemDataOptions - { - DisplayName = "display_name", - LookupKey = "lookup_key", - Meter = "meter", - MeterSegmentConditions = new List - { - new Stripe.V2.Billing.RateCardModifyRatesRatesToCreateMeteredItemDataMeterSegmentConditionOptions - { - Dimension = "dimension", - Value = "value", - }, - }, - UnitLabel = "unit_label", - }, - TieringMode = "graduated", - Tiers = new List - { - new Stripe.V2.Billing.RateCardModifyRatesRatesToCreateTierOptions - { - FlatAmount = "flat_amount", - UnitAmount = "unit_amount", - UpToDecimal = 1387931359.3333333M, - UpToInf = "inf", - }, - }, - TransformQuantity = new Stripe.V2.Billing.RateCardModifyRatesRatesToCreateTransformQuantityOptions - { - DivideBy = 1592560163, - Round = "down", - }, - UnitAmount = "unit_amount", - }, - }, - RatesToDelete = new List - { - new Stripe.V2.Billing.RateCardModifyRatesRatesToDeleteOptions - { - Id = "obj_123", - }, - }, + Type = "publishable_key", }; var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.RateCards; - Stripe.V2.Billing.RateCardVersion rateCardVersion = service - .ModifyRates("id_123", options); - this.AssertRequest( - HttpMethod.Post, - "/v2/billing/rate_cards/id_123/modify_rates"); + var service = client.V2.Iam.ApiKeys; + Stripe.V2.Iam.ApiKey apiKey = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v2/iam/api_keys"); } [Fact] - public void TestV2BillingRateCardsCustomPricingUnitOverageRateGet() + public void TestV2IamApiKeyGet2() { this.StubRequest( HttpMethod.Get, - "/v2/billing/rate_cards/rate_card_id_123/custom_pricing_unit_overage_rates", + "/v2/iam/api_keys/id_123", (HttpStatusCode)200, - "{\"data\":[{\"object\":\"v2.billing.rate_card_custom_pricing_unit_overage_rate\",\"created\":\"1970-01-12T21:42:34.472Z\",\"custom_pricing_unit\":\"custom_pricing_unit\",\"id\":\"obj_123\",\"livemode\":true,\"one_time_item\":{\"object\":\"v2.billing.one_time_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true},\"rate_card\":\"rate_card\",\"rate_card_version\":\"rate_card_version\",\"unit_amount\":\"unit_amount\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"object\":\"v2.iam.api_key\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"ip_allowlist\":[\"ip_allowlist\"],\"livemode\":true,\"status\":\"active\",\"type\":\"publishable_key\"}"); var client = new StripeClient(this.Requestor); - var service = client - .V2 - .Billing - .RateCards - .CustomPricingUnitOverageRates; - Stripe.V2.StripeList rateCardCustomPricingUnitOverageRates = service - .List("rate_card_id_123"); - this.AssertRequest( - HttpMethod.Get, - "/v2/billing/rate_cards/rate_card_id_123/custom_pricing_unit_overage_rates"); + var service = client.V2.Iam.ApiKeys; + Stripe.V2.Iam.ApiKey apiKey = service.Get("id_123"); + this.AssertRequest(HttpMethod.Get, "/v2/iam/api_keys/id_123"); } [Fact] - public void TestV2BillingRateCardsCustomPricingUnitOverageRatePost() + public async Task TestV2IamApiKeyGet2Async() { this.StubRequest( - HttpMethod.Post, - "/v2/billing/rate_cards/rate_card_id_123/custom_pricing_unit_overage_rates", + HttpMethod.Get, + "/v2/iam/api_keys/id_123", (HttpStatusCode)200, - "{\"object\":\"v2.billing.rate_card_custom_pricing_unit_overage_rate\",\"created\":\"1970-01-12T21:42:34.472Z\",\"custom_pricing_unit\":\"custom_pricing_unit\",\"id\":\"obj_123\",\"livemode\":true,\"one_time_item\":{\"object\":\"v2.billing.one_time_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true},\"rate_card\":\"rate_card\",\"rate_card_version\":\"rate_card_version\",\"unit_amount\":\"unit_amount\"}"); - var options = new Stripe.V2.Billing.RateCards.CustomPricingUnitOverageRateCreateOptions - { - CustomPricingUnit = "custom_pricing_unit", - OneTimeItem = "one_time_item", - UnitAmount = "unit_amount", - }; + "{\"object\":\"v2.iam.api_key\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"ip_allowlist\":[\"ip_allowlist\"],\"livemode\":true,\"status\":\"active\",\"type\":\"publishable_key\"}"); var client = new StripeClient(this.Requestor); - var service = client - .V2 - .Billing - .RateCards - .CustomPricingUnitOverageRates; - Stripe.V2.Billing.RateCardCustomPricingUnitOverageRate rateCardCustomPricingUnitOverageRate = service - .Create("rate_card_id_123", options); - this.AssertRequest( - HttpMethod.Post, - "/v2/billing/rate_cards/rate_card_id_123/custom_pricing_unit_overage_rates"); + var service = client.V2.Iam.ApiKeys; + Stripe.V2.Iam.ApiKey apiKey = await service.GetAsync("id_123"); + this.AssertRequest(HttpMethod.Get, "/v2/iam/api_keys/id_123"); } [Fact] - public void TestV2BillingRateCardsCustomPricingUnitOverageRateDelete() + public void TestV2IamApiKeyPost2() { this.StubRequest( - HttpMethod.Delete, - "/v2/billing/rate_cards/rate_card_id_123/custom_pricing_unit_overage_rates/id_123", + HttpMethod.Post, + "/v2/iam/api_keys/id_123", (HttpStatusCode)200, - "{\"id\":\"abc_123\",\"object\":\"some.object.tag\"}"); + "{\"object\":\"v2.iam.api_key\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"ip_allowlist\":[\"ip_allowlist\"],\"livemode\":true,\"status\":\"active\",\"type\":\"publishable_key\"}"); + var options = new Stripe.V2.Iam.ApiKeyUpdateOptions(); var client = new StripeClient(this.Requestor); - var service = client - .V2 - .Billing - .RateCards - .CustomPricingUnitOverageRates; - Stripe.V2.DeletedObject deleted = service.Delete( - "rate_card_id_123", - "id_123"); - this.AssertRequest( - HttpMethod.Delete, - "/v2/billing/rate_cards/rate_card_id_123/custom_pricing_unit_overage_rates/id_123"); + var service = client.V2.Iam.ApiKeys; + Stripe.V2.Iam.ApiKey apiKey = service.Update("id_123", options); + this.AssertRequest(HttpMethod.Post, "/v2/iam/api_keys/id_123"); } [Fact] - public void TestV2BillingRateCardsCustomPricingUnitOverageRateGet2() + public async Task TestV2IamApiKeyPost2Async() { this.StubRequest( - HttpMethod.Get, - "/v2/billing/rate_cards/rate_card_id_123/custom_pricing_unit_overage_rates/id_123", + HttpMethod.Post, + "/v2/iam/api_keys/id_123", (HttpStatusCode)200, - "{\"object\":\"v2.billing.rate_card_custom_pricing_unit_overage_rate\",\"created\":\"1970-01-12T21:42:34.472Z\",\"custom_pricing_unit\":\"custom_pricing_unit\",\"id\":\"obj_123\",\"livemode\":true,\"one_time_item\":{\"object\":\"v2.billing.one_time_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true},\"rate_card\":\"rate_card\",\"rate_card_version\":\"rate_card_version\",\"unit_amount\":\"unit_amount\"}"); + "{\"object\":\"v2.iam.api_key\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"ip_allowlist\":[\"ip_allowlist\"],\"livemode\":true,\"status\":\"active\",\"type\":\"publishable_key\"}"); + var options = new Stripe.V2.Iam.ApiKeyUpdateOptions(); var client = new StripeClient(this.Requestor); - var service = client - .V2 - .Billing - .RateCards - .CustomPricingUnitOverageRates; - Stripe.V2.Billing.RateCardCustomPricingUnitOverageRate rateCardCustomPricingUnitOverageRate = service - .Get("rate_card_id_123", "id_123"); - this.AssertRequest( - HttpMethod.Get, - "/v2/billing/rate_cards/rate_card_id_123/custom_pricing_unit_overage_rates/id_123"); + var service = client.V2.Iam.ApiKeys; + Stripe.V2.Iam.ApiKey apiKey = await service.UpdateAsync( + "id_123", + options); + this.AssertRequest(HttpMethod.Post, "/v2/iam/api_keys/id_123"); } [Fact] - public void TestV2BillingRateCardsRateGet() + public void TestV2IamApiKeyPost3() { this.StubRequest( - HttpMethod.Get, - "/v2/billing/rate_cards/rate_card_id_123/rates", + HttpMethod.Post, + "/v2/iam/api_keys/id_123/expire", (HttpStatusCode)200, - "{\"data\":[{\"object\":\"v2.billing.rate_card_rate\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"metered_item\":{\"object\":\"v2.billing.metered_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"invoice_presentation_dimensions\":[\"invoice_presentation_dimensions\"],\"livemode\":true,\"meter\":\"meter\",\"meter_segment_conditions\":[{\"dimension\":\"dimension\",\"value\":\"value\"}]},\"rate_card\":\"rate_card\",\"rate_card_version\":\"rate_card_version\",\"tiers\":[{}]}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"object\":\"v2.iam.api_key\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"ip_allowlist\":[\"ip_allowlist\"],\"livemode\":true,\"status\":\"active\",\"type\":\"publishable_key\"}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.RateCards.Rates; - Stripe.V2.StripeList rateCardRates = service - .List("rate_card_id_123"); + var service = client.V2.Iam.ApiKeys; + Stripe.V2.Iam.ApiKey apiKey = service.Expire("id_123"); this.AssertRequest( - HttpMethod.Get, - "/v2/billing/rate_cards/rate_card_id_123/rates"); + HttpMethod.Post, + "/v2/iam/api_keys/id_123/expire"); } [Fact] - public void TestV2BillingRateCardsRatePost() + public async Task TestV2IamApiKeyPost3Async() { this.StubRequest( HttpMethod.Post, - "/v2/billing/rate_cards/rate_card_id_123/rates", + "/v2/iam/api_keys/id_123/expire", (HttpStatusCode)200, - "{\"object\":\"v2.billing.rate_card_rate\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"metered_item\":{\"object\":\"v2.billing.metered_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"invoice_presentation_dimensions\":[\"invoice_presentation_dimensions\"],\"livemode\":true,\"meter\":\"meter\",\"meter_segment_conditions\":[{\"dimension\":\"dimension\",\"value\":\"value\"}]},\"rate_card\":\"rate_card\",\"rate_card_version\":\"rate_card_version\",\"tiers\":[{}]}"); - var options = new Stripe.V2.Billing.RateCards.RateCreateOptions - { - MeteredItem = "metered_item", - }; + "{\"object\":\"v2.iam.api_key\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"ip_allowlist\":[\"ip_allowlist\"],\"livemode\":true,\"status\":\"active\",\"type\":\"publishable_key\"}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.RateCards.Rates; - Stripe.V2.Billing.RateCardRate rateCardRate = service.Create( - "rate_card_id_123", - options); + var service = client.V2.Iam.ApiKeys; + Stripe.V2.Iam.ApiKey apiKey = await service.ExpireAsync("id_123"); this.AssertRequest( HttpMethod.Post, - "/v2/billing/rate_cards/rate_card_id_123/rates"); + "/v2/iam/api_keys/id_123/expire"); } [Fact] - public void TestV2BillingRateCardsRateDelete() + public void TestV2IamApiKeyPost4() { this.StubRequest( - HttpMethod.Delete, - "/v2/billing/rate_cards/rate_card_id_123/rates/id_123", + HttpMethod.Post, + "/v2/iam/api_keys/id_123/rotate", (HttpStatusCode)200, - "{\"id\":\"abc_123\",\"object\":\"some.object.tag\"}"); + "{\"object\":\"v2.iam.api_key\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"ip_allowlist\":[\"ip_allowlist\"],\"livemode\":true,\"status\":\"active\",\"type\":\"publishable_key\"}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.RateCards.Rates; - Stripe.V2.DeletedObject deleted = service.Delete( - "rate_card_id_123", - "id_123"); + var service = client.V2.Iam.ApiKeys; + Stripe.V2.Iam.ApiKey apiKey = service.Rotate("id_123"); this.AssertRequest( - HttpMethod.Delete, - "/v2/billing/rate_cards/rate_card_id_123/rates/id_123"); + HttpMethod.Post, + "/v2/iam/api_keys/id_123/rotate"); } [Fact] - public void TestV2BillingRateCardsRateGet2() + public async Task TestV2IamApiKeyPost4Async() { this.StubRequest( - HttpMethod.Get, - "/v2/billing/rate_cards/rate_card_id_123/rates/id_123", + HttpMethod.Post, + "/v2/iam/api_keys/id_123/rotate", (HttpStatusCode)200, - "{\"object\":\"v2.billing.rate_card_rate\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"metered_item\":{\"object\":\"v2.billing.metered_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"invoice_presentation_dimensions\":[\"invoice_presentation_dimensions\"],\"livemode\":true,\"meter\":\"meter\",\"meter_segment_conditions\":[{\"dimension\":\"dimension\",\"value\":\"value\"}]},\"rate_card\":\"rate_card\",\"rate_card_version\":\"rate_card_version\",\"tiers\":[{}]}"); + "{\"object\":\"v2.iam.api_key\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"ip_allowlist\":[\"ip_allowlist\"],\"livemode\":true,\"status\":\"active\",\"type\":\"publishable_key\"}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.RateCards.Rates; - Stripe.V2.Billing.RateCardRate rateCardRate = service.Get( - "rate_card_id_123", - "id_123"); + var service = client.V2.Iam.ApiKeys; + Stripe.V2.Iam.ApiKey apiKey = await service.RotateAsync("id_123"); this.AssertRequest( - HttpMethod.Get, - "/v2/billing/rate_cards/rate_card_id_123/rates/id_123"); + HttpMethod.Post, + "/v2/iam/api_keys/id_123/rotate"); } [Fact] - public void TestV2BillingRateCardsVersionGet() + public void TestV2MoneyManagementAdjustmentGet() { this.StubRequest( HttpMethod.Get, - "/v2/billing/rate_cards/rate_card_id_123/versions", + "/v2/money_management/adjustments", (HttpStatusCode)200, - "{\"data\":[{\"object\":\"v2.billing.rate_card_version\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"rate_card_id\":\"rate_card_id\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"object\":\"v2.money_management.adjustment\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.RateCards.Versions; - Stripe.V2.StripeList rateCardVersions = service - .List("rate_card_id_123"); + var service = client.V2.MoneyManagement.Adjustments; + Stripe.V2.StripeList adjustments = service + .List(); this.AssertRequest( HttpMethod.Get, - "/v2/billing/rate_cards/rate_card_id_123/versions"); + "/v2/money_management/adjustments"); } [Fact] - public void TestV2BillingRateCardsVersionGet2() + public async Task TestV2MoneyManagementAdjustmentGetAsync() { this.StubRequest( HttpMethod.Get, - "/v2/billing/rate_cards/rate_card_id_123/versions/id_123", + "/v2/money_management/adjustments", (HttpStatusCode)200, - "{\"object\":\"v2.billing.rate_card_version\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"rate_card_id\":\"rate_card_id\"}"); + "{\"data\":[{\"object\":\"v2.money_management.adjustment\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.RateCards.Versions; - Stripe.V2.Billing.RateCardVersion rateCardVersion = service.Get( - "rate_card_id_123", - "id_123"); + var service = client.V2.MoneyManagement.Adjustments; + Stripe.V2.StripeList adjustments = await service + .ListAsync(); this.AssertRequest( HttpMethod.Get, - "/v2/billing/rate_cards/rate_card_id_123/versions/id_123"); + "/v2/money_management/adjustments"); } [Fact] - public void TestV2BillingRateCardSubscriptionGet() + public void TestV2MoneyManagementAdjustmentGetAutoPaging() { this.StubRequest( HttpMethod.Get, - "/v2/billing/rate_card_subscriptions", + "/v2/money_management/adjustments", (HttpStatusCode)200, - "{\"data\":[{\"object\":\"v2.billing.rate_card_subscription\",\"billing_cadence\":\"billing_cadence\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"rate_card\":\"rate_card\",\"rate_card_version\":\"rate_card_version\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"object\":\"v2.money_management.adjustment\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.RateCardSubscriptions; - Stripe.V2.StripeList rateCardSubscriptions = service - .List(); + var service = client.V2.MoneyManagement.Adjustments; + var adjustment = service.ListAutoPaging().First(); this.AssertRequest( HttpMethod.Get, - "/v2/billing/rate_card_subscriptions"); + "/v2/money_management/adjustments"); } [Fact] - public void TestV2BillingRateCardSubscriptionPost() + public async Task TestV2MoneyManagementAdjustmentGetAutoPagingAsync() { this.StubRequest( - HttpMethod.Post, - "/v2/billing/rate_card_subscriptions", + HttpMethod.Get, + "/v2/money_management/adjustments", (HttpStatusCode)200, - "{\"object\":\"v2.billing.rate_card_subscription\",\"billing_cadence\":\"billing_cadence\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"rate_card\":\"rate_card\",\"rate_card_version\":\"rate_card_version\"}"); - var options = new Stripe.V2.Billing.RateCardSubscriptionCreateOptions - { - BillingCadence = "billing_cadence", - RateCard = "rate_card", - }; + "{\"data\":[{\"object\":\"v2.money_management.adjustment\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.RateCardSubscriptions; - Stripe.V2.Billing.RateCardSubscription rateCardSubscription = service - .Create(options); + var service = client.V2.MoneyManagement.Adjustments; + var adjustment = await service.ListAutoPagingAsync().FirstAsync(); this.AssertRequest( - HttpMethod.Post, - "/v2/billing/rate_card_subscriptions"); + HttpMethod.Get, + "/v2/money_management/adjustments"); } [Fact] - public void TestV2BillingRateCardSubscriptionGet2() + public void TestV2MoneyManagementAdjustmentGet2() { this.StubRequest( HttpMethod.Get, - "/v2/billing/rate_card_subscriptions/id_123", + "/v2/money_management/adjustments/id_123", (HttpStatusCode)200, - "{\"object\":\"v2.billing.rate_card_subscription\",\"billing_cadence\":\"billing_cadence\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"rate_card\":\"rate_card\",\"rate_card_version\":\"rate_card_version\"}"); + "{\"object\":\"v2.money_management.adjustment\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.RateCardSubscriptions; - Stripe.V2.Billing.RateCardSubscription rateCardSubscription = service - .Get("id_123"); + var service = client.V2.MoneyManagement.Adjustments; + Stripe.V2.MoneyManagement.Adjustment adjustment = service.Get( + "id_123"); this.AssertRequest( HttpMethod.Get, - "/v2/billing/rate_card_subscriptions/id_123"); + "/v2/money_management/adjustments/id_123"); } [Fact] - public void TestV2BillingRateCardSubscriptionPost2() + public async Task TestV2MoneyManagementAdjustmentGet2Async() { this.StubRequest( - HttpMethod.Post, - "/v2/billing/rate_card_subscriptions/id_123", + HttpMethod.Get, + "/v2/money_management/adjustments/id_123", (HttpStatusCode)200, - "{\"object\":\"v2.billing.rate_card_subscription\",\"billing_cadence\":\"billing_cadence\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"rate_card\":\"rate_card\",\"rate_card_version\":\"rate_card_version\"}"); - var options = new Stripe.V2.Billing.RateCardSubscriptionUpdateOptions(); + "{\"object\":\"v2.money_management.adjustment\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.RateCardSubscriptions; - Stripe.V2.Billing.RateCardSubscription rateCardSubscription = service - .Update("id_123", options); + var service = client.V2.MoneyManagement.Adjustments; + Stripe.V2.MoneyManagement.Adjustment adjustment = await service + .GetAsync("id_123"); this.AssertRequest( - HttpMethod.Post, - "/v2/billing/rate_card_subscriptions/id_123"); + HttpMethod.Get, + "/v2/money_management/adjustments/id_123"); } [Fact] - public void TestV2BillingRateCardSubscriptionPost3() + public void TestV2MoneyManagementCurrencyConversionGet() { this.StubRequest( - HttpMethod.Post, - "/v2/billing/rate_card_subscriptions/id_123/cancel", + HttpMethod.Get, + "/v2/money_management/currency_conversions", (HttpStatusCode)200, - "{\"object\":\"v2.billing.rate_card_subscription\",\"billing_cadence\":\"billing_cadence\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"rate_card\":\"rate_card\",\"rate_card_version\":\"rate_card_version\"}"); + "{\"data\":[{\"object\":\"v2.money_management.currency_conversion\",\"created\":\"1970-01-12T21:42:34.472Z\",\"exchange_rate\":\"exchange_rate\",\"from\":{\"amount\":{\"currency\":\"USD\",\"value\":96}},\"id\":\"obj_123\",\"livemode\":true,\"to\":{\"amount\":{\"currency\":\"USD\",\"value\":96}}}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.RateCardSubscriptions; - Stripe.V2.Billing.RateCardSubscription rateCardSubscription = service - .Cancel("id_123"); + var service = client.V2.MoneyManagement.CurrencyConversions; + Stripe.V2.StripeList currencyConversions = service + .List(); this.AssertRequest( - HttpMethod.Post, - "/v2/billing/rate_card_subscriptions/id_123/cancel"); + HttpMethod.Get, + "/v2/money_management/currency_conversions"); } [Fact] - public void TestV2BillingServiceActionPost() + public async Task TestV2MoneyManagementCurrencyConversionGetAsync() { this.StubRequest( - HttpMethod.Post, - "/v2/billing/service_actions", + HttpMethod.Get, + "/v2/money_management/currency_conversions", (HttpStatusCode)200, - "{\"object\":\"v2.billing.service_action\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"service_interval\":\"month\",\"service_interval_count\":1375336415,\"type\":\"credit_grant\"}"); - var options = new Stripe.V2.Billing.ServiceActionCreateOptions - { - ServiceInterval = "month", - ServiceIntervalCount = 1375336415, - Type = "credit_grant", - }; + "{\"data\":[{\"object\":\"v2.money_management.currency_conversion\",\"created\":\"1970-01-12T21:42:34.472Z\",\"exchange_rate\":\"exchange_rate\",\"from\":{\"amount\":{\"currency\":\"USD\",\"value\":96}},\"id\":\"obj_123\",\"livemode\":true,\"to\":{\"amount\":{\"currency\":\"USD\",\"value\":96}}}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.ServiceActions; - Stripe.V2.Billing.ServiceAction serviceAction = service.Create( - options); - this.AssertRequest(HttpMethod.Post, "/v2/billing/service_actions"); + var service = client.V2.MoneyManagement.CurrencyConversions; + Stripe.V2.StripeList currencyConversions = await service + .ListAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v2/money_management/currency_conversions"); } [Fact] - public void TestV2BillingServiceActionGet() + public void TestV2MoneyManagementCurrencyConversionGetAutoPaging() { this.StubRequest( HttpMethod.Get, - "/v2/billing/service_actions/id_123", + "/v2/money_management/currency_conversions", (HttpStatusCode)200, - "{\"object\":\"v2.billing.service_action\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"service_interval\":\"month\",\"service_interval_count\":1375336415,\"type\":\"credit_grant\"}"); + "{\"data\":[{\"object\":\"v2.money_management.currency_conversion\",\"created\":\"1970-01-12T21:42:34.472Z\",\"exchange_rate\":\"exchange_rate\",\"from\":{\"amount\":{\"currency\":\"USD\",\"value\":96}},\"id\":\"obj_123\",\"livemode\":true,\"to\":{\"amount\":{\"currency\":\"USD\",\"value\":96}}}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.ServiceActions; - Stripe.V2.Billing.ServiceAction serviceAction = service.Get( - "id_123"); + var service = client.V2.MoneyManagement.CurrencyConversions; + var currencyConversion = service.ListAutoPaging().First(); this.AssertRequest( HttpMethod.Get, - "/v2/billing/service_actions/id_123"); + "/v2/money_management/currency_conversions"); } [Fact] - public void TestV2BillingServiceActionPost2() + public async Task TestV2MoneyManagementCurrencyConversionGetAutoPagingAsync() { this.StubRequest( - HttpMethod.Post, - "/v2/billing/service_actions/id_123", + HttpMethod.Get, + "/v2/money_management/currency_conversions", (HttpStatusCode)200, - "{\"object\":\"v2.billing.service_action\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"service_interval\":\"month\",\"service_interval_count\":1375336415,\"type\":\"credit_grant\"}"); - var options = new Stripe.V2.Billing.ServiceActionUpdateOptions(); + "{\"data\":[{\"object\":\"v2.money_management.currency_conversion\",\"created\":\"1970-01-12T21:42:34.472Z\",\"exchange_rate\":\"exchange_rate\",\"from\":{\"amount\":{\"currency\":\"USD\",\"value\":96}},\"id\":\"obj_123\",\"livemode\":true,\"to\":{\"amount\":{\"currency\":\"USD\",\"value\":96}}}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.ServiceActions; - Stripe.V2.Billing.ServiceAction serviceAction = service.Update( - "id_123", - options); + var service = client.V2.MoneyManagement.CurrencyConversions; + var currencyConversion = await service.ListAutoPagingAsync() + .FirstAsync(); this.AssertRequest( - HttpMethod.Post, - "/v2/billing/service_actions/id_123"); + HttpMethod.Get, + "/v2/money_management/currency_conversions"); } [Fact] - public void TestV2CommerceProductCatalogImportGet() + public void TestV2MoneyManagementCurrencyConversionPost() { this.StubRequest( - HttpMethod.Get, - "/v2/commerce/product_catalog/imports", + HttpMethod.Post, + "/v2/money_management/currency_conversions", (HttpStatusCode)200, - "{\"data\":[{\"object\":\"v2.commerce.product_catalog_import\",\"created\":\"1970-01-12T21:42:34.472Z\",\"feed_type\":\"pricing\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"status\":\"awaiting_upload\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"object\":\"v2.money_management.currency_conversion\",\"created\":\"1970-01-12T21:42:34.472Z\",\"exchange_rate\":\"exchange_rate\",\"from\":{\"amount\":{\"currency\":\"USD\",\"value\":96}},\"id\":\"obj_123\",\"livemode\":true,\"to\":{\"amount\":{\"currency\":\"USD\",\"value\":96}}}"); + var options = new Stripe.V2.MoneyManagement.CurrencyConversionCreateOptions + { + From = new Stripe.V2.MoneyManagement.CurrencyConversionCreateFromOptions + { + Amount = new Stripe.V2.Amount + { + Value = 96, + Currency = "USD", + }, + Currency = "usd", + }, + To = new Stripe.V2.MoneyManagement.CurrencyConversionCreateToOptions + { + Amount = new Stripe.V2.Amount + { + Value = 96, + Currency = "USD", + }, + Currency = "usd", + }, + }; var client = new StripeClient(this.Requestor); - var service = client.V2.Commerce.ProductCatalog.Imports; - Stripe.V2.StripeList productCatalogImports = service - .List(); + var service = client.V2.MoneyManagement.CurrencyConversions; + Stripe.V2.MoneyManagement.CurrencyConversion currencyConversion = service + .Create(options); this.AssertRequest( - HttpMethod.Get, - "/v2/commerce/product_catalog/imports"); + HttpMethod.Post, + "/v2/money_management/currency_conversions"); } [Fact] - public void TestV2CommerceProductCatalogImportPost() + public async Task TestV2MoneyManagementCurrencyConversionPostAsync() { this.StubRequest( HttpMethod.Post, - "/v2/commerce/product_catalog/imports", + "/v2/money_management/currency_conversions", (HttpStatusCode)200, - "{\"object\":\"v2.commerce.product_catalog_import\",\"created\":\"1970-01-12T21:42:34.472Z\",\"feed_type\":\"pricing\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"status\":\"awaiting_upload\"}"); - var options = new Stripe.V2.Commerce.ProductCatalog.ImportCreateOptions + "{\"object\":\"v2.money_management.currency_conversion\",\"created\":\"1970-01-12T21:42:34.472Z\",\"exchange_rate\":\"exchange_rate\",\"from\":{\"amount\":{\"currency\":\"USD\",\"value\":96}},\"id\":\"obj_123\",\"livemode\":true,\"to\":{\"amount\":{\"currency\":\"USD\",\"value\":96}}}"); + var options = new Stripe.V2.MoneyManagement.CurrencyConversionCreateOptions { - FeedType = "pricing", - Metadata = new Dictionary + From = new Stripe.V2.MoneyManagement.CurrencyConversionCreateFromOptions { - { "key", "metadata" }, + Amount = new Stripe.V2.Amount + { + Value = 96, + Currency = "USD", + }, + Currency = "usd", + }, + To = new Stripe.V2.MoneyManagement.CurrencyConversionCreateToOptions + { + Amount = new Stripe.V2.Amount + { + Value = 96, + Currency = "USD", + }, + Currency = "usd", }, - Mode = "upsert", }; var client = new StripeClient(this.Requestor); - var service = client.V2.Commerce.ProductCatalog.Imports; - Stripe.V2.Commerce.ProductCatalogImport productCatalogImport = service - .Create(options); + var service = client.V2.MoneyManagement.CurrencyConversions; + Stripe.V2.MoneyManagement.CurrencyConversion currencyConversion = await service + .CreateAsync(options); this.AssertRequest( HttpMethod.Post, - "/v2/commerce/product_catalog/imports"); + "/v2/money_management/currency_conversions"); } [Fact] - public void TestV2CommerceProductCatalogImportGet2() + public void TestV2MoneyManagementCurrencyConversionGet2() { this.StubRequest( HttpMethod.Get, - "/v2/commerce/product_catalog/imports/id_123", + "/v2/money_management/currency_conversions/id_123", (HttpStatusCode)200, - "{\"object\":\"v2.commerce.product_catalog_import\",\"created\":\"1970-01-12T21:42:34.472Z\",\"feed_type\":\"pricing\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"status\":\"awaiting_upload\"}"); + "{\"object\":\"v2.money_management.currency_conversion\",\"created\":\"1970-01-12T21:42:34.472Z\",\"exchange_rate\":\"exchange_rate\",\"from\":{\"amount\":{\"currency\":\"USD\",\"value\":96}},\"id\":\"obj_123\",\"livemode\":true,\"to\":{\"amount\":{\"currency\":\"USD\",\"value\":96}}}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Commerce.ProductCatalog.Imports; - Stripe.V2.Commerce.ProductCatalogImport productCatalogImport = service + var service = client.V2.MoneyManagement.CurrencyConversions; + Stripe.V2.MoneyManagement.CurrencyConversion currencyConversion = service .Get("id_123"); this.AssertRequest( HttpMethod.Get, - "/v2/commerce/product_catalog/imports/id_123"); + "/v2/money_management/currency_conversions/id_123"); } [Fact] - public void TestV2CoreAccountGet() + public async Task TestV2MoneyManagementCurrencyConversionGet2Async() { this.StubRequest( HttpMethod.Get, - "/v2/core/accounts", + "/v2/money_management/currency_conversions/id_123", (HttpStatusCode)200, - "{\"data\":[{\"object\":\"v2.core.account\",\"applied_configurations\":[\"card_creator\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"object\":\"v2.money_management.currency_conversion\",\"created\":\"1970-01-12T21:42:34.472Z\",\"exchange_rate\":\"exchange_rate\",\"from\":{\"amount\":{\"currency\":\"USD\",\"value\":96}},\"id\":\"obj_123\",\"livemode\":true,\"to\":{\"amount\":{\"currency\":\"USD\",\"value\":96}}}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Core.Accounts; - Stripe.V2.StripeList accounts = service - .List(); - this.AssertRequest(HttpMethod.Get, "/v2/core/accounts"); + var service = client.V2.MoneyManagement.CurrencyConversions; + Stripe.V2.MoneyManagement.CurrencyConversion currencyConversion = await service + .GetAsync("id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/money_management/currency_conversions/id_123"); } [Fact] - public void TestV2CoreAccountPost() + public void TestV2MoneyManagementDebitDisputeGet() { this.StubRequest( - HttpMethod.Post, - "/v2/core/accounts", + HttpMethod.Get, + "/v2/money_management/debit_disputes", (HttpStatusCode)200, - "{\"object\":\"v2.core.account\",\"applied_configurations\":[\"card_creator\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true}"); - var options = new Stripe.V2.Core.AccountCreateOptions(); + "{\"data\":[{\"object\":\"v2.money_management.debit_dispute\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"received_debit\":\"received_debit\",\"status\":\"failed\",\"type\":\"bank_transfer\"}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Core.Accounts; - Stripe.V2.Core.Account account = service.Create(options); - this.AssertRequest(HttpMethod.Post, "/v2/core/accounts"); + var service = client.V2.MoneyManagement.DebitDisputes; + Stripe.V2.StripeList debitDisputes = service + .List(); + this.AssertRequest( + HttpMethod.Get, + "/v2/money_management/debit_disputes"); } [Fact] - public void TestV2CoreAccountGet2() + public async Task TestV2MoneyManagementDebitDisputeGetAsync() { this.StubRequest( HttpMethod.Get, - "/v2/core/accounts/id_123", + "/v2/money_management/debit_disputes", (HttpStatusCode)200, - "{\"object\":\"v2.core.account\",\"applied_configurations\":[\"card_creator\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true}"); + "{\"data\":[{\"object\":\"v2.money_management.debit_dispute\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"received_debit\":\"received_debit\",\"status\":\"failed\",\"type\":\"bank_transfer\"}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Core.Accounts; - Stripe.V2.Core.Account account = service.Get("id_123"); - this.AssertRequest(HttpMethod.Get, "/v2/core/accounts/id_123"); + var service = client.V2.MoneyManagement.DebitDisputes; + Stripe.V2.StripeList debitDisputes = await service + .ListAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v2/money_management/debit_disputes"); } [Fact] - public void TestV2CoreAccountPost2() + public void TestV2MoneyManagementDebitDisputeGetAutoPaging() { this.StubRequest( - HttpMethod.Post, - "/v2/core/accounts/id_123", + HttpMethod.Get, + "/v2/money_management/debit_disputes", (HttpStatusCode)200, - "{\"object\":\"v2.core.account\",\"applied_configurations\":[\"card_creator\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true}"); - var options = new Stripe.V2.Core.AccountUpdateOptions(); + "{\"data\":[{\"object\":\"v2.money_management.debit_dispute\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"received_debit\":\"received_debit\",\"status\":\"failed\",\"type\":\"bank_transfer\"}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Core.Accounts; - Stripe.V2.Core.Account account = service.Update("id_123", options); - this.AssertRequest(HttpMethod.Post, "/v2/core/accounts/id_123"); + var service = client.V2.MoneyManagement.DebitDisputes; + var debitDispute = service.ListAutoPaging().First(); + this.AssertRequest( + HttpMethod.Get, + "/v2/money_management/debit_disputes"); } [Fact] - public void TestV2CoreAccountPost3() + public async Task TestV2MoneyManagementDebitDisputeGetAutoPagingAsync() { this.StubRequest( - HttpMethod.Post, - "/v2/core/accounts/id_123/close", + HttpMethod.Get, + "/v2/money_management/debit_disputes", (HttpStatusCode)200, - "{\"object\":\"v2.core.account\",\"applied_configurations\":[\"card_creator\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true}"); + "{\"data\":[{\"object\":\"v2.money_management.debit_dispute\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"received_debit\":\"received_debit\",\"status\":\"failed\",\"type\":\"bank_transfer\"}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Core.Accounts; - Stripe.V2.Core.Account account = service.Close("id_123"); + var service = client.V2.MoneyManagement.DebitDisputes; + var debitDispute = await service.ListAutoPagingAsync().FirstAsync(); this.AssertRequest( - HttpMethod.Post, - "/v2/core/accounts/id_123/close"); + HttpMethod.Get, + "/v2/money_management/debit_disputes"); } [Fact] - public void TestV2CoreAccountsPersonGet() + public void TestV2MoneyManagementDebitDisputePost() { this.StubRequest( - HttpMethod.Get, - "/v2/core/accounts/account_id_123/persons", + HttpMethod.Post, + "/v2/money_management/debit_disputes", (HttpStatusCode)200, - "{\"data\":[{\"object\":\"v2.core.account_person\",\"account\":\"account\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"updated\":\"1970-01-03T17:07:10.277Z\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"object\":\"v2.money_management.debit_dispute\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"received_debit\":\"received_debit\",\"status\":\"failed\",\"type\":\"bank_transfer\"}"); + var options = new Stripe.V2.MoneyManagement.DebitDisputeCreateOptions + { + ReceivedDebit = "received_debit", + }; var client = new StripeClient(this.Requestor); - var service = client.V2.Core.Accounts.Persons; - Stripe.V2.StripeList accountPersons = service - .List("account_id_123"); + var service = client.V2.MoneyManagement.DebitDisputes; + Stripe.V2.MoneyManagement.DebitDispute debitDispute = service + .Create(options); this.AssertRequest( - HttpMethod.Get, - "/v2/core/accounts/account_id_123/persons"); + HttpMethod.Post, + "/v2/money_management/debit_disputes"); } [Fact] - public void TestV2CoreAccountsPersonPost() + public async Task TestV2MoneyManagementDebitDisputePostAsync() { this.StubRequest( HttpMethod.Post, - "/v2/core/accounts/account_id_123/persons", + "/v2/money_management/debit_disputes", (HttpStatusCode)200, - "{\"object\":\"v2.core.account_person\",\"account\":\"account\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"updated\":\"1970-01-03T17:07:10.277Z\"}"); - var options = new Stripe.V2.Core.Accounts.PersonCreateOptions(); + "{\"object\":\"v2.money_management.debit_dispute\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"received_debit\":\"received_debit\",\"status\":\"failed\",\"type\":\"bank_transfer\"}"); + var options = new Stripe.V2.MoneyManagement.DebitDisputeCreateOptions + { + ReceivedDebit = "received_debit", + }; var client = new StripeClient(this.Requestor); - var service = client.V2.Core.Accounts.Persons; - Stripe.V2.Core.AccountPerson accountPerson = service.Create( - "account_id_123", - options); + var service = client.V2.MoneyManagement.DebitDisputes; + Stripe.V2.MoneyManagement.DebitDispute debitDispute = await service + .CreateAsync(options); this.AssertRequest( HttpMethod.Post, - "/v2/core/accounts/account_id_123/persons"); + "/v2/money_management/debit_disputes"); } [Fact] - public void TestV2CoreAccountsPersonDelete() + public void TestV2MoneyManagementDebitDisputeGet2() { this.StubRequest( - HttpMethod.Delete, - "/v2/core/accounts/account_id_123/persons/id_123", + HttpMethod.Get, + "/v2/money_management/debit_disputes/id_123", (HttpStatusCode)200, - "{\"id\":\"abc_123\",\"object\":\"some.object.tag\"}"); + "{\"object\":\"v2.money_management.debit_dispute\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"received_debit\":\"received_debit\",\"status\":\"failed\",\"type\":\"bank_transfer\"}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Core.Accounts.Persons; - Stripe.V2.DeletedObject deleted = service.Delete( - "account_id_123", + var service = client.V2.MoneyManagement.DebitDisputes; + Stripe.V2.MoneyManagement.DebitDispute debitDispute = service.Get( "id_123"); this.AssertRequest( - HttpMethod.Delete, - "/v2/core/accounts/account_id_123/persons/id_123"); + HttpMethod.Get, + "/v2/money_management/debit_disputes/id_123"); } [Fact] - public void TestV2CoreAccountsPersonGet2() + public async Task TestV2MoneyManagementDebitDisputeGet2Async() { this.StubRequest( HttpMethod.Get, - "/v2/core/accounts/account_id_123/persons/id_123", + "/v2/money_management/debit_disputes/id_123", (HttpStatusCode)200, - "{\"object\":\"v2.core.account_person\",\"account\":\"account\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"updated\":\"1970-01-03T17:07:10.277Z\"}"); + "{\"object\":\"v2.money_management.debit_dispute\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"received_debit\":\"received_debit\",\"status\":\"failed\",\"type\":\"bank_transfer\"}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Core.Accounts.Persons; - Stripe.V2.Core.AccountPerson accountPerson = service.Get( - "account_id_123", - "id_123"); + var service = client.V2.MoneyManagement.DebitDisputes; + Stripe.V2.MoneyManagement.DebitDispute debitDispute = await service + .GetAsync("id_123"); this.AssertRequest( HttpMethod.Get, - "/v2/core/accounts/account_id_123/persons/id_123"); + "/v2/money_management/debit_disputes/id_123"); } [Fact] - public void TestV2CoreAccountsPersonPost2() + public void TestV2MoneyManagementFinancialAccountGet() { this.StubRequest( - HttpMethod.Post, - "/v2/core/accounts/account_id_123/persons/id_123", + HttpMethod.Get, + "/v2/money_management/financial_accounts", (HttpStatusCode)200, - "{\"object\":\"v2.core.account_person\",\"account\":\"account\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"updated\":\"1970-01-03T17:07:10.277Z\"}"); - var options = new Stripe.V2.Core.Accounts.PersonUpdateOptions(); + "{\"data\":[{\"object\":\"v2.money_management.financial_account\",\"balance\":{\"available\":{\"key\":{\"currency\":\"USD\",\"value\":35}},\"inbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":11}},\"outbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":60}}},\"country\":\"country\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"closed\",\"type\":\"accrued_fees\"}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Core.Accounts.Persons; - Stripe.V2.Core.AccountPerson accountPerson = service.Update( - "account_id_123", - "id_123", - options); + var service = client.V2.MoneyManagement.FinancialAccounts; + Stripe.V2.StripeList financialAccounts = service + .List(); this.AssertRequest( - HttpMethod.Post, - "/v2/core/accounts/account_id_123/persons/id_123"); + HttpMethod.Get, + "/v2/money_management/financial_accounts"); } [Fact] - public void TestV2CoreAccountsPersonTokenPost() + public async Task TestV2MoneyManagementFinancialAccountGetAsync() { this.StubRequest( - HttpMethod.Post, - "/v2/core/accounts/account_id_123/person_tokens", + HttpMethod.Get, + "/v2/money_management/financial_accounts", (HttpStatusCode)200, - "{\"object\":\"v2.core.account_person_token\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"used\":true}"); - var options = new Stripe.V2.Core.Accounts.PersonTokenCreateOptions(); + "{\"data\":[{\"object\":\"v2.money_management.financial_account\",\"balance\":{\"available\":{\"key\":{\"currency\":\"USD\",\"value\":35}},\"inbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":11}},\"outbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":60}}},\"country\":\"country\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"closed\",\"type\":\"accrued_fees\"}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Core.Accounts.PersonTokens; - Stripe.V2.Core.AccountPersonToken accountPersonToken = service - .Create("account_id_123", options); + var service = client.V2.MoneyManagement.FinancialAccounts; + Stripe.V2.StripeList financialAccounts = await service + .ListAsync(); this.AssertRequest( - HttpMethod.Post, - "/v2/core/accounts/account_id_123/person_tokens"); + HttpMethod.Get, + "/v2/money_management/financial_accounts"); } [Fact] - public void TestV2CoreAccountsPersonTokenGet() + public void TestV2MoneyManagementFinancialAccountGetAutoPaging() { this.StubRequest( HttpMethod.Get, - "/v2/core/accounts/account_id_123/person_tokens/id_123", + "/v2/money_management/financial_accounts", (HttpStatusCode)200, - "{\"object\":\"v2.core.account_person_token\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"used\":true}"); + "{\"data\":[{\"object\":\"v2.money_management.financial_account\",\"balance\":{\"available\":{\"key\":{\"currency\":\"USD\",\"value\":35}},\"inbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":11}},\"outbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":60}}},\"country\":\"country\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"closed\",\"type\":\"accrued_fees\"}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Core.Accounts.PersonTokens; - Stripe.V2.Core.AccountPersonToken accountPersonToken = service.Get( - "account_id_123", - "id_123"); + var service = client.V2.MoneyManagement.FinancialAccounts; + var financialAccount = service.ListAutoPaging().First(); this.AssertRequest( HttpMethod.Get, - "/v2/core/accounts/account_id_123/person_tokens/id_123"); + "/v2/money_management/financial_accounts"); } [Fact] - public void TestV2CoreAccountEvaluationPost() + public async Task TestV2MoneyManagementFinancialAccountGetAutoPagingAsync() { this.StubRequest( - HttpMethod.Post, - "/v2/core/account_evaluations", + HttpMethod.Get, + "/v2/money_management/financial_accounts", (HttpStatusCode)200, - "{\"object\":\"v2.core.account_evaluation\",\"created\":\"1970-01-12T21:42:34.472Z\",\"evaluations_triggered\":[\"fraudulent_website\"],\"id\":\"obj_123\",\"livemode\":true}"); - var options = new Stripe.V2.Core.AccountEvaluationCreateOptions - { - Signals = new List { "fraudulent_website" }, - }; + "{\"data\":[{\"object\":\"v2.money_management.financial_account\",\"balance\":{\"available\":{\"key\":{\"currency\":\"USD\",\"value\":35}},\"inbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":11}},\"outbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":60}}},\"country\":\"country\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"closed\",\"type\":\"accrued_fees\"}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Core.AccountEvaluations; - Stripe.V2.Core.AccountEvaluation accountEvaluation = service.Create( - options); - this.AssertRequest(HttpMethod.Post, "/v2/core/account_evaluations"); + var service = client.V2.MoneyManagement.FinancialAccounts; + var financialAccount = await service.ListAutoPagingAsync() + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v2/money_management/financial_accounts"); } [Fact] - public void TestV2CoreAccountLinkPost() + public void TestV2MoneyManagementFinancialAccountPost() { this.StubRequest( HttpMethod.Post, - "/v2/core/account_links", + "/v2/money_management/financial_accounts", (HttpStatusCode)200, - "{\"object\":\"v2.core.account_link\",\"account\":\"account\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"livemode\":true,\"url\":\"url\",\"use_case\":{\"type\":\"recipient_onboarding\"}}"); - var options = new Stripe.V2.Core.AccountLinkCreateOptions + "{\"object\":\"v2.money_management.financial_account\",\"balance\":{\"available\":{\"key\":{\"currency\":\"USD\",\"value\":35}},\"inbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":11}},\"outbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":60}}},\"country\":\"country\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"closed\",\"type\":\"accrued_fees\"}"); + var options = new Stripe.V2.MoneyManagement.FinancialAccountCreateOptions { - Account = "account", - UseCase = new Stripe.V2.Core.AccountLinkCreateUseCaseOptions - { - AccountOnboarding = new Stripe.V2.Core.AccountLinkCreateUseCaseAccountOnboardingOptions - { - CollectionOptions = new Stripe.V2.Core.AccountLinkCreateUseCaseAccountOnboardingCollectionOptionsOptions - { - Fields = "eventually_due", - FutureRequirements = "include", - }, - Configurations = new List { "storer" }, - RefreshUrl = "refresh_url", - ReturnUrl = "return_url", - }, - AccountUpdate = new Stripe.V2.Core.AccountLinkCreateUseCaseAccountUpdateOptions - { - CollectionOptions = new Stripe.V2.Core.AccountLinkCreateUseCaseAccountUpdateCollectionOptionsOptions - { - Fields = "eventually_due", - FutureRequirements = "include", - }, - Configurations = new List { "storer" }, - RefreshUrl = "refresh_url", - ReturnUrl = "return_url", - }, - RecipientOnboarding = new Stripe.V2.Core.AccountLinkCreateUseCaseRecipientOnboardingOptions - { - CollectionOptions = new Stripe.V2.Core.AccountLinkCreateUseCaseRecipientOnboardingCollectionOptionsOptions - { - Fields = "eventually_due", - FutureRequirements = "include", - }, - Configurations = new List { "recipient" }, - RefreshUrl = "refresh_url", - ReturnUrl = "return_url", - }, - RecipientUpdate = new Stripe.V2.Core.AccountLinkCreateUseCaseRecipientUpdateOptions - { - CollectionOptions = new Stripe.V2.Core.AccountLinkCreateUseCaseRecipientUpdateCollectionOptionsOptions - { - Fields = "eventually_due", - FutureRequirements = "include", - }, - Configurations = new List { "recipient" }, - RefreshUrl = "refresh_url", - ReturnUrl = "return_url", - }, - Type = "recipient_onboarding", - }, + Type = "storage", }; var client = new StripeClient(this.Requestor); - var service = client.V2.Core.AccountLinks; - Stripe.V2.Core.AccountLink accountLink = service.Create(options); - this.AssertRequest(HttpMethod.Post, "/v2/core/account_links"); + var service = client.V2.MoneyManagement.FinancialAccounts; + Stripe.V2.MoneyManagement.FinancialAccount financialAccount = service + .Create(options); + this.AssertRequest( + HttpMethod.Post, + "/v2/money_management/financial_accounts"); } [Fact] - public void TestV2CoreAccountTokenPost() + public async Task TestV2MoneyManagementFinancialAccountPostAsync() { this.StubRequest( HttpMethod.Post, - "/v2/core/account_tokens", + "/v2/money_management/financial_accounts", (HttpStatusCode)200, - "{\"object\":\"v2.core.account_token\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"used\":true}"); - var options = new Stripe.V2.Core.AccountTokenCreateOptions(); + "{\"object\":\"v2.money_management.financial_account\",\"balance\":{\"available\":{\"key\":{\"currency\":\"USD\",\"value\":35}},\"inbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":11}},\"outbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":60}}},\"country\":\"country\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"closed\",\"type\":\"accrued_fees\"}"); + var options = new Stripe.V2.MoneyManagement.FinancialAccountCreateOptions + { + Type = "storage", + }; var client = new StripeClient(this.Requestor); - var service = client.V2.Core.AccountTokens; - Stripe.V2.Core.AccountToken accountToken = service.Create(options); - this.AssertRequest(HttpMethod.Post, "/v2/core/account_tokens"); + var service = client.V2.MoneyManagement.FinancialAccounts; + Stripe.V2.MoneyManagement.FinancialAccount financialAccount = await service + .CreateAsync(options); + this.AssertRequest( + HttpMethod.Post, + "/v2/money_management/financial_accounts"); } [Fact] - public void TestV2CoreAccountTokenGet() + public void TestV2MoneyManagementFinancialAccountGet2() { this.StubRequest( HttpMethod.Get, - "/v2/core/account_tokens/id_123", + "/v2/money_management/financial_accounts/id_123", (HttpStatusCode)200, - "{\"object\":\"v2.core.account_token\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"used\":true}"); + "{\"object\":\"v2.money_management.financial_account\",\"balance\":{\"available\":{\"key\":{\"currency\":\"USD\",\"value\":35}},\"inbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":11}},\"outbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":60}}},\"country\":\"country\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"closed\",\"type\":\"accrued_fees\"}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Core.AccountTokens; - Stripe.V2.Core.AccountToken accountToken = service.Get("id_123"); + var service = client.V2.MoneyManagement.FinancialAccounts; + Stripe.V2.MoneyManagement.FinancialAccount financialAccount = service + .Get("id_123"); this.AssertRequest( HttpMethod.Get, - "/v2/core/account_tokens/id_123"); + "/v2/money_management/financial_accounts/id_123"); } [Fact] - public void TestV2CoreApprovalRequestGet() + public async Task TestV2MoneyManagementFinancialAccountGet2Async() { this.StubRequest( HttpMethod.Get, - "/v2/core/approval_requests", + "/v2/money_management/financial_accounts/id_123", (HttpStatusCode)200, - "{\"data\":[{\"object\":\"v2.core.approval_request\",\"action\":\"refund.create\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"requested_by\":{\"id\":\"obj_123\"},\"status\":\"failed\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"object\":\"v2.money_management.financial_account\",\"balance\":{\"available\":{\"key\":{\"currency\":\"USD\",\"value\":35}},\"inbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":11}},\"outbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":60}}},\"country\":\"country\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"closed\",\"type\":\"accrued_fees\"}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Core.ApprovalRequests; - Stripe.V2.StripeList approvalRequests = service - .List(); - this.AssertRequest(HttpMethod.Get, "/v2/core/approval_requests"); + var service = client.V2.MoneyManagement.FinancialAccounts; + Stripe.V2.MoneyManagement.FinancialAccount financialAccount = await service + .GetAsync("id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/money_management/financial_accounts/id_123"); } [Fact] - public void TestV2CoreApprovalRequestGet2() + public void TestV2MoneyManagementFinancialAccountPost2() { this.StubRequest( - HttpMethod.Get, - "/v2/core/approval_requests/id_123", + HttpMethod.Post, + "/v2/money_management/financial_accounts/id_123", (HttpStatusCode)200, - "{\"object\":\"v2.core.approval_request\",\"action\":\"refund.create\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"requested_by\":{\"id\":\"obj_123\"},\"status\":\"failed\"}"); + "{\"object\":\"v2.money_management.financial_account\",\"balance\":{\"available\":{\"key\":{\"currency\":\"USD\",\"value\":35}},\"inbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":11}},\"outbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":60}}},\"country\":\"country\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"closed\",\"type\":\"accrued_fees\"}"); + var options = new Stripe.V2.MoneyManagement.FinancialAccountUpdateOptions(); var client = new StripeClient(this.Requestor); - var service = client.V2.Core.ApprovalRequests; - Stripe.V2.Core.ApprovalRequest approvalRequest = service.Get( - "id_123"); + var service = client.V2.MoneyManagement.FinancialAccounts; + Stripe.V2.MoneyManagement.FinancialAccount financialAccount = service + .Update("id_123", options); this.AssertRequest( - HttpMethod.Get, - "/v2/core/approval_requests/id_123"); + HttpMethod.Post, + "/v2/money_management/financial_accounts/id_123"); } [Fact] - public void TestV2CoreApprovalRequestPost() + public async Task TestV2MoneyManagementFinancialAccountPost2Async() { this.StubRequest( HttpMethod.Post, - "/v2/core/approval_requests/id_123/cancel", + "/v2/money_management/financial_accounts/id_123", (HttpStatusCode)200, - "{\"object\":\"v2.core.approval_request\",\"action\":\"refund.create\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"requested_by\":{\"id\":\"obj_123\"},\"status\":\"failed\"}"); + "{\"object\":\"v2.money_management.financial_account\",\"balance\":{\"available\":{\"key\":{\"currency\":\"USD\",\"value\":35}},\"inbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":11}},\"outbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":60}}},\"country\":\"country\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"closed\",\"type\":\"accrued_fees\"}"); + var options = new Stripe.V2.MoneyManagement.FinancialAccountUpdateOptions(); var client = new StripeClient(this.Requestor); - var service = client.V2.Core.ApprovalRequests; - Stripe.V2.Core.ApprovalRequest approvalRequest = service.Cancel( - "id_123"); + var service = client.V2.MoneyManagement.FinancialAccounts; + Stripe.V2.MoneyManagement.FinancialAccount financialAccount = await service + .UpdateAsync("id_123", options); this.AssertRequest( HttpMethod.Post, - "/v2/core/approval_requests/id_123/cancel"); + "/v2/money_management/financial_accounts/id_123"); } [Fact] - public void TestV2CoreApprovalRequestPost2() + public void TestV2MoneyManagementFinancialAccountPost3() { this.StubRequest( HttpMethod.Post, - "/v2/core/approval_requests/id_123/execute", + "/v2/money_management/financial_accounts/id_123/close", (HttpStatusCode)200, - "{\"object\":\"v2.core.approval_request\",\"action\":\"refund.create\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"requested_by\":{\"id\":\"obj_123\"},\"status\":\"failed\"}"); + "{\"object\":\"v2.money_management.financial_account\",\"balance\":{\"available\":{\"key\":{\"currency\":\"USD\",\"value\":35}},\"inbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":11}},\"outbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":60}}},\"country\":\"country\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"closed\",\"type\":\"accrued_fees\"}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Core.ApprovalRequests; - Stripe.V2.Core.ApprovalRequest approvalRequest = service.Execute( - "id_123"); + var service = client.V2.MoneyManagement.FinancialAccounts; + Stripe.V2.MoneyManagement.FinancialAccount financialAccount = service + .Close("id_123"); this.AssertRequest( HttpMethod.Post, - "/v2/core/approval_requests/id_123/execute"); + "/v2/money_management/financial_accounts/id_123/close"); } [Fact] - public void TestV2CoreApprovalRequestPost3() + public async Task TestV2MoneyManagementFinancialAccountPost3Async() { this.StubRequest( HttpMethod.Post, - "/v2/core/approval_requests/id_123/submit", + "/v2/money_management/financial_accounts/id_123/close", (HttpStatusCode)200, - "{\"object\":\"v2.core.approval_request\",\"action\":\"refund.create\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"requested_by\":{\"id\":\"obj_123\"},\"status\":\"failed\"}"); + "{\"object\":\"v2.money_management.financial_account\",\"balance\":{\"available\":{\"key\":{\"currency\":\"USD\",\"value\":35}},\"inbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":11}},\"outbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":60}}},\"country\":\"country\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"closed\",\"type\":\"accrued_fees\"}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Core.ApprovalRequests; - Stripe.V2.Core.ApprovalRequest approvalRequest = service.Submit( - "id_123"); + var service = client.V2.MoneyManagement.FinancialAccounts; + Stripe.V2.MoneyManagement.FinancialAccount financialAccount = await service + .CloseAsync("id_123"); this.AssertRequest( HttpMethod.Post, - "/v2/core/approval_requests/id_123/submit"); + "/v2/money_management/financial_accounts/id_123/close"); } [Fact] - public void TestV2CoreBatchJobPost() + public void TestV2MoneyManagementFinancialAccountsStatementGet() { this.StubRequest( - HttpMethod.Post, - "/v2/core/batch_jobs", + HttpMethod.Get, + "/v2/money_management/financial_accounts/financial_account_id_123/statements", (HttpStatusCode)200, - "{\"object\":\"v2.core.batch_job\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"maximum_rps\":1686015830,\"metadata\":{\"key\":\"metadata\"},\"skip_validation\":true,\"status\":\"batch_failed\"}"); - var options = new Stripe.V2.Core.BatchJobCreateOptions - { - Endpoint = new Stripe.V2.Core.BatchJobCreateEndpointOptions - { - HttpMethod = "delete", - Path = BatchJobEndpointPath.V1ProductCreate, - }, - Metadata = new Dictionary - { - { "key", "metadata" }, - }, - SkipValidation = true, - }; + "{\"data\":[{\"object\":\"v2.money_management.financial_account_statement\",\"created\":\"1970-01-12T21:42:34.472Z\",\"ending_balance\":{\"key\":{\"currency\":\"USD\",\"value\":40}},\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"period\":{\"end_date\":\"end_date\",\"start_date\":\"start_date\"},\"starting_balance\":{\"key\":{\"currency\":\"USD\",\"value\":33}},\"status\":\"active\"}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Core.BatchJobs; - Stripe.V2.Core.BatchJob batchJob = service.Create(options); - this.AssertRequest(HttpMethod.Post, "/v2/core/batch_jobs"); + var service = client + .V2 + .MoneyManagement + .FinancialAccounts + .Statements; + Stripe.V2.StripeList financialAccountStatements = service + .List("financial_account_id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/money_management/financial_accounts/financial_account_id_123/statements"); } [Fact] - public void TestV2CoreBatchJobGet() + public async Task TestV2MoneyManagementFinancialAccountsStatementGetAsync() { this.StubRequest( HttpMethod.Get, - "/v2/core/batch_jobs/id_123", + "/v2/money_management/financial_accounts/financial_account_id_123/statements", (HttpStatusCode)200, - "{\"object\":\"v2.core.batch_job\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"maximum_rps\":1686015830,\"metadata\":{\"key\":\"metadata\"},\"skip_validation\":true,\"status\":\"batch_failed\"}"); + "{\"data\":[{\"object\":\"v2.money_management.financial_account_statement\",\"created\":\"1970-01-12T21:42:34.472Z\",\"ending_balance\":{\"key\":{\"currency\":\"USD\",\"value\":40}},\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"period\":{\"end_date\":\"end_date\",\"start_date\":\"start_date\"},\"starting_balance\":{\"key\":{\"currency\":\"USD\",\"value\":33}},\"status\":\"active\"}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Core.BatchJobs; - Stripe.V2.Core.BatchJob batchJob = service.Get("id_123"); - this.AssertRequest(HttpMethod.Get, "/v2/core/batch_jobs/id_123"); + var service = client + .V2 + .MoneyManagement + .FinancialAccounts + .Statements; + Stripe.V2.StripeList financialAccountStatements = await service + .ListAsync("financial_account_id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/money_management/financial_accounts/financial_account_id_123/statements"); } [Fact] - public void TestV2CoreBatchJobPost2() + public void TestV2MoneyManagementFinancialAccountsStatementGetAutoPaging() { this.StubRequest( - HttpMethod.Post, - "/v2/core/batch_jobs/id_123/cancel", + HttpMethod.Get, + "/v2/money_management/financial_accounts/financial_account_id_123/statements", (HttpStatusCode)200, - "{\"object\":\"v2.core.batch_job\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"maximum_rps\":1686015830,\"metadata\":{\"key\":\"metadata\"},\"skip_validation\":true,\"status\":\"batch_failed\"}"); + "{\"data\":[{\"object\":\"v2.money_management.financial_account_statement\",\"created\":\"1970-01-12T21:42:34.472Z\",\"ending_balance\":{\"key\":{\"currency\":\"USD\",\"value\":40}},\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"period\":{\"end_date\":\"end_date\",\"start_date\":\"start_date\"},\"starting_balance\":{\"key\":{\"currency\":\"USD\",\"value\":33}},\"status\":\"active\"}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Core.BatchJobs; - Stripe.V2.Core.BatchJob batchJob = service.Cancel("id_123"); + var service = client + .V2 + .MoneyManagement + .FinancialAccounts + .Statements; + var financialAccountStatement = service.ListAutoPaging( + "financial_account_id_123") + .First(); this.AssertRequest( - HttpMethod.Post, - "/v2/core/batch_jobs/id_123/cancel"); + HttpMethod.Get, + "/v2/money_management/financial_accounts/financial_account_id_123/statements"); } [Fact] - public void TestV2CoreClaimableSandboxPost() + public async Task TestV2MoneyManagementFinancialAccountsStatementGetAutoPagingAsync() { this.StubRequest( - HttpMethod.Post, - "/v2/core/claimable_sandboxes", + HttpMethod.Get, + "/v2/money_management/financial_accounts/financial_account_id_123/statements", (HttpStatusCode)200, - "{\"object\":\"v2.core.claimable_sandbox\",\"app_channel\":\"testing\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"onboarding_link_details\":{\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"refresh_url\":\"refresh_url\",\"url\":\"url\"},\"prefill\":{\"country\":\"country\",\"email\":\"email\",\"name\":\"name\"},\"sandbox_details\":{\"account\":\"account\"},\"status\":\"live\"}"); - var options = new Stripe.V2.Core.ClaimableSandboxCreateOptions - { - EnableMcpAccess = true, - OnboardingLinkDetails = new Stripe.V2.Core.ClaimableSandboxCreateOnboardingLinkDetailsOptions - { - RefreshUrl = "refresh_url", - }, - Prefill = new Stripe.V2.Core.ClaimableSandboxCreatePrefillOptions - { - Country = "country", - Email = "email", - Name = "name", - }, - }; + "{\"data\":[{\"object\":\"v2.money_management.financial_account_statement\",\"created\":\"1970-01-12T21:42:34.472Z\",\"ending_balance\":{\"key\":{\"currency\":\"USD\",\"value\":40}},\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"period\":{\"end_date\":\"end_date\",\"start_date\":\"start_date\"},\"starting_balance\":{\"key\":{\"currency\":\"USD\",\"value\":33}},\"status\":\"active\"}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Core.ClaimableSandboxes; - Stripe.V2.Core.ClaimableSandbox claimableSandbox = service.Create( - options); - this.AssertRequest(HttpMethod.Post, "/v2/core/claimable_sandboxes"); + var service = client + .V2 + .MoneyManagement + .FinancialAccounts + .Statements; + var financialAccountStatement = await service.ListAutoPagingAsync( + "financial_account_id_123") + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v2/money_management/financial_accounts/financial_account_id_123/statements"); } [Fact] - public void TestV2CoreClaimableSandboxGet() + public void TestV2MoneyManagementFinancialAccountsStatementGet2() { this.StubRequest( HttpMethod.Get, - "/v2/core/claimable_sandboxes/id_123", + "/v2/money_management/financial_accounts/financial_account_id_123/statements/id_123", (HttpStatusCode)200, - "{\"object\":\"v2.core.claimable_sandbox\",\"app_channel\":\"testing\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"onboarding_link_details\":{\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"refresh_url\":\"refresh_url\",\"url\":\"url\"},\"prefill\":{\"country\":\"country\",\"email\":\"email\",\"name\":\"name\"},\"sandbox_details\":{\"account\":\"account\"},\"status\":\"live\"}"); + "{\"object\":\"v2.money_management.financial_account_statement\",\"created\":\"1970-01-12T21:42:34.472Z\",\"ending_balance\":{\"key\":{\"currency\":\"USD\",\"value\":40}},\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"period\":{\"end_date\":\"end_date\",\"start_date\":\"start_date\"},\"starting_balance\":{\"key\":{\"currency\":\"USD\",\"value\":33}},\"status\":\"active\"}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Core.ClaimableSandboxes; - Stripe.V2.Core.ClaimableSandbox claimableSandbox = service.Get( - "id_123"); + var service = client + .V2 + .MoneyManagement + .FinancialAccounts + .Statements; + Stripe.V2.MoneyManagement.FinancialAccountStatement financialAccountStatement = service + .Get("financial_account_id_123", "id_123"); this.AssertRequest( HttpMethod.Get, - "/v2/core/claimable_sandboxes/id_123"); + "/v2/money_management/financial_accounts/financial_account_id_123/statements/id_123"); } [Fact] - public void TestV2CoreClaimableSandboxPost2() + public async Task TestV2MoneyManagementFinancialAccountsStatementGet2Async() { this.StubRequest( - HttpMethod.Post, - "/v2/core/claimable_sandboxes/id_123/renew_onboarding_link", + HttpMethod.Get, + "/v2/money_management/financial_accounts/financial_account_id_123/statements/id_123", (HttpStatusCode)200, - "{\"object\":\"v2.core.claimable_sandbox\",\"app_channel\":\"testing\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"onboarding_link_details\":{\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"refresh_url\":\"refresh_url\",\"url\":\"url\"},\"prefill\":{\"country\":\"country\",\"email\":\"email\",\"name\":\"name\"},\"sandbox_details\":{\"account\":\"account\"},\"status\":\"live\"}"); + "{\"object\":\"v2.money_management.financial_account_statement\",\"created\":\"1970-01-12T21:42:34.472Z\",\"ending_balance\":{\"key\":{\"currency\":\"USD\",\"value\":40}},\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"period\":{\"end_date\":\"end_date\",\"start_date\":\"start_date\"},\"starting_balance\":{\"key\":{\"currency\":\"USD\",\"value\":33}},\"status\":\"active\"}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Core.ClaimableSandboxes; - Stripe.V2.Core.ClaimableSandbox claimableSandbox = service - .RenewOnboardingLink("id_123"); + var service = client + .V2 + .MoneyManagement + .FinancialAccounts + .Statements; + Stripe.V2.MoneyManagement.FinancialAccountStatement financialAccountStatement = await service + .GetAsync("financial_account_id_123", "id_123"); this.AssertRequest( - HttpMethod.Post, - "/v2/core/claimable_sandboxes/id_123/renew_onboarding_link"); + HttpMethod.Get, + "/v2/money_management/financial_accounts/financial_account_id_123/statements/id_123"); } [Fact] - public void TestV2CoreConnectionSessionPost() + public void TestV2MoneyManagementFinancialAddressGet() { this.StubRequest( - HttpMethod.Post, - "/v2/core/connection_sessions", + HttpMethod.Get, + "/v2/money_management/financial_addresses", (HttpStatusCode)200, - "{\"object\":\"v2.core.connection_session\",\"account\":\"account\",\"client_secret\":\"client_secret\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true}"); - var options = new Stripe.V2.Core.ConnectionSessionCreateOptions - { - Account = "account", - }; + "{\"data\":[{\"object\":\"v2.money_management.financial_address\",\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"failed\"}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Core.ConnectionSessions; - Stripe.V2.Core.ConnectionSession connectionSession = service.Create( - options); - this.AssertRequest(HttpMethod.Post, "/v2/core/connection_sessions"); + var service = client.V2.MoneyManagement.FinancialAddresses; + Stripe.V2.StripeList financialAddresses = service + .List(); + this.AssertRequest( + HttpMethod.Get, + "/v2/money_management/financial_addresses"); } [Fact] - public void TestV2CoreConnectionSessionGet() + public async Task TestV2MoneyManagementFinancialAddressGetAsync() { this.StubRequest( HttpMethod.Get, - "/v2/core/connection_sessions/id_123", + "/v2/money_management/financial_addresses", (HttpStatusCode)200, - "{\"object\":\"v2.core.connection_session\",\"account\":\"account\",\"client_secret\":\"client_secret\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true}"); + "{\"data\":[{\"object\":\"v2.money_management.financial_address\",\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"failed\"}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Core.ConnectionSessions; - Stripe.V2.Core.ConnectionSession connectionSession = service.Get( - "id_123"); + var service = client.V2.MoneyManagement.FinancialAddresses; + Stripe.V2.StripeList financialAddresses = await service + .ListAsync(); this.AssertRequest( HttpMethod.Get, - "/v2/core/connection_sessions/id_123"); + "/v2/money_management/financial_addresses"); } [Fact] - public void TestV2CoreEventGet() + public void TestV2MoneyManagementFinancialAddressGetAutoPaging() { this.StubRequest( HttpMethod.Get, - "/v2/core/events", + "/v2/money_management/financial_addresses", (HttpStatusCode)200, - "{\"data\":[{\"object\":\"v2.core.event\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"type\":\"type\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"object\":\"v2.money_management.financial_address\",\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"failed\"}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Core.Events; - Stripe.V2.StripeList events = service.List(); - this.AssertRequest(HttpMethod.Get, "/v2/core/events"); + var service = client.V2.MoneyManagement.FinancialAddresses; + var financialAddress = service.ListAutoPaging().First(); + this.AssertRequest( + HttpMethod.Get, + "/v2/money_management/financial_addresses"); } [Fact] - public void TestV2CoreEventGet2() + public async Task TestV2MoneyManagementFinancialAddressGetAutoPagingAsync() { this.StubRequest( HttpMethod.Get, - "/v2/core/events/id_123", + "/v2/money_management/financial_addresses", (HttpStatusCode)200, - "{\"object\":\"v2.core.event\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"type\":\"type\"}"); + "{\"data\":[{\"object\":\"v2.money_management.financial_address\",\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"failed\"}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Core.Events; - Stripe.V2.Core.Event result = service.Get("id_123"); - this.AssertRequest(HttpMethod.Get, "/v2/core/events/id_123"); + var service = client.V2.MoneyManagement.FinancialAddresses; + var financialAddress = await service.ListAutoPagingAsync() + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v2/money_management/financial_addresses"); } [Fact] - public void TestV2CoreEventDestinationGet() + public void TestV2MoneyManagementFinancialAddressPost() { this.StubRequest( - HttpMethod.Get, - "/v2/core/event_destinations", + HttpMethod.Post, + "/v2/money_management/financial_addresses", (HttpStatusCode)200, - "{\"data\":[{\"object\":\"v2.core.event_destination\",\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"id\":\"obj_123\",\"livemode\":true,\"name\":\"name\",\"status\":\"disabled\",\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"object\":\"v2.money_management.financial_address\",\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"failed\"}"); + var options = new Stripe.V2.MoneyManagement.FinancialAddressCreateOptions + { + FinancialAccount = "financial_account", + Type = "ca_bank_account", + }; var client = new StripeClient(this.Requestor); - var service = client.V2.Core.EventDestinations; - Stripe.V2.StripeList eventDestinations = service - .List(); - this.AssertRequest(HttpMethod.Get, "/v2/core/event_destinations"); + var service = client.V2.MoneyManagement.FinancialAddresses; + Stripe.V2.MoneyManagement.FinancialAddress financialAddress = service + .Create(options); + this.AssertRequest( + HttpMethod.Post, + "/v2/money_management/financial_addresses"); } [Fact] - public void TestV2CoreEventDestinationPost() + public async Task TestV2MoneyManagementFinancialAddressPostAsync() { this.StubRequest( HttpMethod.Post, - "/v2/core/event_destinations", + "/v2/money_management/financial_addresses", (HttpStatusCode)200, - "{\"object\":\"v2.core.event_destination\",\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"id\":\"obj_123\",\"livemode\":true,\"name\":\"name\",\"status\":\"disabled\",\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\"}"); - var options = new Stripe.V2.Core.EventDestinationCreateOptions + "{\"object\":\"v2.money_management.financial_address\",\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"failed\"}"); + var options = new Stripe.V2.MoneyManagement.FinancialAddressCreateOptions { - EnabledEvents = new List { "enabled_events" }, - EventPayload = "thin", - Name = "name", - Type = "amazon_eventbridge", + FinancialAccount = "financial_account", + Type = "ca_bank_account", }; var client = new StripeClient(this.Requestor); - var service = client.V2.Core.EventDestinations; - Stripe.V2.Core.EventDestination eventDestination = service.Create( - options); - this.AssertRequest(HttpMethod.Post, "/v2/core/event_destinations"); + var service = client.V2.MoneyManagement.FinancialAddresses; + Stripe.V2.MoneyManagement.FinancialAddress financialAddress = await service + .CreateAsync(options); + this.AssertRequest( + HttpMethod.Post, + "/v2/money_management/financial_addresses"); } [Fact] - public void TestV2CoreEventDestinationDelete() + public void TestV2MoneyManagementFinancialAddressGet2() + { + this.StubRequest( + HttpMethod.Get, + "/v2/money_management/financial_addresses/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.money_management.financial_address\",\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"failed\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.MoneyManagement.FinancialAddresses; + Stripe.V2.MoneyManagement.FinancialAddress financialAddress = service + .Get("id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/money_management/financial_addresses/id_123"); + } + + [Fact] + public async Task TestV2MoneyManagementFinancialAddressGet2Async() { this.StubRequest( - HttpMethod.Delete, - "/v2/core/event_destinations/id_123", + HttpMethod.Get, + "/v2/money_management/financial_addresses/id_123", (HttpStatusCode)200, - "{\"id\":\"abc_123\",\"object\":\"some.object.tag\"}"); + "{\"object\":\"v2.money_management.financial_address\",\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"failed\"}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Core.EventDestinations; - Stripe.V2.DeletedObject deleted = service.Delete("id_123"); + var service = client.V2.MoneyManagement.FinancialAddresses; + Stripe.V2.MoneyManagement.FinancialAddress financialAddress = await service + .GetAsync("id_123"); this.AssertRequest( - HttpMethod.Delete, - "/v2/core/event_destinations/id_123"); + HttpMethod.Get, + "/v2/money_management/financial_addresses/id_123"); } [Fact] - public void TestV2CoreEventDestinationGet2() + public void TestV2MoneyManagementInboundTransferGet() { this.StubRequest( HttpMethod.Get, - "/v2/core/event_destinations/id_123", + "/v2/money_management/inbound_transfers", (HttpStatusCode)200, - "{\"object\":\"v2.core.event_destination\",\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"id\":\"obj_123\",\"livemode\":true,\"name\":\"name\",\"status\":\"disabled\",\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\"}"); + "{\"data\":[{\"object\":\"v2.money_management.inbound_transfer\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"payment_method\":{\"type\":\"type\"}},\"id\":\"obj_123\",\"livemode\":true,\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"financial_account\":\"financial_account\"},\"transfer_history\":[{\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"level\":\"canonical\",\"type\":\"bank_debit_failed\"}]}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Core.EventDestinations; - Stripe.V2.Core.EventDestination eventDestination = service.Get( - "id_123"); + var service = client.V2.MoneyManagement.InboundTransfers; + Stripe.V2.StripeList inboundTransfers = service + .List(); this.AssertRequest( HttpMethod.Get, - "/v2/core/event_destinations/id_123"); + "/v2/money_management/inbound_transfers"); } [Fact] - public void TestV2CoreEventDestinationPost2() + public async Task TestV2MoneyManagementInboundTransferGetAsync() { this.StubRequest( - HttpMethod.Post, - "/v2/core/event_destinations/id_123", + HttpMethod.Get, + "/v2/money_management/inbound_transfers", (HttpStatusCode)200, - "{\"object\":\"v2.core.event_destination\",\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"id\":\"obj_123\",\"livemode\":true,\"name\":\"name\",\"status\":\"disabled\",\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\"}"); - var options = new Stripe.V2.Core.EventDestinationUpdateOptions(); + "{\"data\":[{\"object\":\"v2.money_management.inbound_transfer\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"payment_method\":{\"type\":\"type\"}},\"id\":\"obj_123\",\"livemode\":true,\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"financial_account\":\"financial_account\"},\"transfer_history\":[{\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"level\":\"canonical\",\"type\":\"bank_debit_failed\"}]}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Core.EventDestinations; - Stripe.V2.Core.EventDestination eventDestination = service.Update( - "id_123", - options); + var service = client.V2.MoneyManagement.InboundTransfers; + Stripe.V2.StripeList inboundTransfers = await service + .ListAsync(); this.AssertRequest( - HttpMethod.Post, - "/v2/core/event_destinations/id_123"); + HttpMethod.Get, + "/v2/money_management/inbound_transfers"); } [Fact] - public void TestV2CoreEventDestinationPost3() + public void TestV2MoneyManagementInboundTransferGetAutoPaging() { this.StubRequest( - HttpMethod.Post, - "/v2/core/event_destinations/id_123/disable", + HttpMethod.Get, + "/v2/money_management/inbound_transfers", (HttpStatusCode)200, - "{\"object\":\"v2.core.event_destination\",\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"id\":\"obj_123\",\"livemode\":true,\"name\":\"name\",\"status\":\"disabled\",\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\"}"); + "{\"data\":[{\"object\":\"v2.money_management.inbound_transfer\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"payment_method\":{\"type\":\"type\"}},\"id\":\"obj_123\",\"livemode\":true,\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"financial_account\":\"financial_account\"},\"transfer_history\":[{\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"level\":\"canonical\",\"type\":\"bank_debit_failed\"}]}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Core.EventDestinations; - Stripe.V2.Core.EventDestination eventDestination = service.Disable( - "id_123"); + var service = client.V2.MoneyManagement.InboundTransfers; + var inboundTransfer = service.ListAutoPaging().First(); this.AssertRequest( - HttpMethod.Post, - "/v2/core/event_destinations/id_123/disable"); + HttpMethod.Get, + "/v2/money_management/inbound_transfers"); } [Fact] - public void TestV2CoreEventDestinationPost4() + public async Task TestV2MoneyManagementInboundTransferGetAutoPagingAsync() { this.StubRequest( - HttpMethod.Post, - "/v2/core/event_destinations/id_123/enable", + HttpMethod.Get, + "/v2/money_management/inbound_transfers", (HttpStatusCode)200, - "{\"object\":\"v2.core.event_destination\",\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"id\":\"obj_123\",\"livemode\":true,\"name\":\"name\",\"status\":\"disabled\",\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\"}"); + "{\"data\":[{\"object\":\"v2.money_management.inbound_transfer\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"payment_method\":{\"type\":\"type\"}},\"id\":\"obj_123\",\"livemode\":true,\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"financial_account\":\"financial_account\"},\"transfer_history\":[{\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"level\":\"canonical\",\"type\":\"bank_debit_failed\"}]}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Core.EventDestinations; - Stripe.V2.Core.EventDestination eventDestination = service.Enable( - "id_123"); + var service = client.V2.MoneyManagement.InboundTransfers; + var inboundTransfer = await service.ListAutoPagingAsync() + .FirstAsync(); this.AssertRequest( - HttpMethod.Post, - "/v2/core/event_destinations/id_123/enable"); + HttpMethod.Get, + "/v2/money_management/inbound_transfers"); } [Fact] - public void TestV2CoreEventDestinationPost5() + public void TestV2MoneyManagementInboundTransferPost() { this.StubRequest( HttpMethod.Post, - "/v2/core/event_destinations/id_123/ping", + "/v2/money_management/inbound_transfers", (HttpStatusCode)200, - "{\"object\":\"v2.core.event\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"type\":\"type\"}"); + "{\"object\":\"v2.money_management.inbound_transfer\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"payment_method\":{\"type\":\"type\"}},\"id\":\"obj_123\",\"livemode\":true,\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"financial_account\":\"financial_account\"},\"transfer_history\":[{\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"level\":\"canonical\",\"type\":\"bank_debit_failed\"}]}"); + var options = new Stripe.V2.MoneyManagement.InboundTransferCreateOptions + { + Amount = new Stripe.V2.Amount { Value = 96, Currency = "USD" }, + From = new Stripe.V2.MoneyManagement.InboundTransferCreateFromOptions + { + Currency = "usd", + PaymentMethod = "payment_method", + }, + To = new Stripe.V2.MoneyManagement.InboundTransferCreateToOptions + { + Currency = "usd", + FinancialAccount = "financial_account", + }, + }; var client = new StripeClient(this.Requestor); - var service = client.V2.Core.EventDestinations; - Stripe.V2.Core.Event result = service.Ping("id_123"); + var service = client.V2.MoneyManagement.InboundTransfers; + Stripe.V2.MoneyManagement.InboundTransfer inboundTransfer = service + .Create(options); this.AssertRequest( HttpMethod.Post, - "/v2/core/event_destinations/id_123/ping"); + "/v2/money_management/inbound_transfers"); } [Fact] - public void TestV2CoreFeeBatchGet() + public async Task TestV2MoneyManagementInboundTransferPostAsync() { this.StubRequest( - HttpMethod.Get, - "/v2/core/fee_batches", + HttpMethod.Post, + "/v2/money_management/inbound_transfers", (HttpStatusCode)200, - "{\"data\":[{\"object\":\"v2.core.fee_batch\",\"amount\":{\"currency\":\"usd\",\"value\":\"value\"},\"collected_by\":{\"type\":\"application\"},\"collection_records\":[{\"amount\":{\"currency\":\"usd\",\"value\":\"value\"},\"type\":\"money_management_transaction\"}],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"billed\",\"status_transitions\":{}}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"object\":\"v2.money_management.inbound_transfer\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"payment_method\":{\"type\":\"type\"}},\"id\":\"obj_123\",\"livemode\":true,\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"financial_account\":\"financial_account\"},\"transfer_history\":[{\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"level\":\"canonical\",\"type\":\"bank_debit_failed\"}]}"); + var options = new Stripe.V2.MoneyManagement.InboundTransferCreateOptions + { + Amount = new Stripe.V2.Amount { Value = 96, Currency = "USD" }, + From = new Stripe.V2.MoneyManagement.InboundTransferCreateFromOptions + { + Currency = "usd", + PaymentMethod = "payment_method", + }, + To = new Stripe.V2.MoneyManagement.InboundTransferCreateToOptions + { + Currency = "usd", + FinancialAccount = "financial_account", + }, + }; var client = new StripeClient(this.Requestor); - var service = client.V2.Core.FeeBatches; - Stripe.V2.StripeList feeBatches = service - .List(); - this.AssertRequest(HttpMethod.Get, "/v2/core/fee_batches"); + var service = client.V2.MoneyManagement.InboundTransfers; + Stripe.V2.MoneyManagement.InboundTransfer inboundTransfer = await service + .CreateAsync(options); + this.AssertRequest( + HttpMethod.Post, + "/v2/money_management/inbound_transfers"); } [Fact] - public void TestV2CoreFeeBatchGet2() + public void TestV2MoneyManagementInboundTransferGet2() { this.StubRequest( HttpMethod.Get, - "/v2/core/fee_batches/id_123", + "/v2/money_management/inbound_transfers/id_123", (HttpStatusCode)200, - "{\"object\":\"v2.core.fee_batch\",\"amount\":{\"currency\":\"usd\",\"value\":\"value\"},\"collected_by\":{\"type\":\"application\"},\"collection_records\":[{\"amount\":{\"currency\":\"usd\",\"value\":\"value\"},\"type\":\"money_management_transaction\"}],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"billed\",\"status_transitions\":{}}"); + "{\"object\":\"v2.money_management.inbound_transfer\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"payment_method\":{\"type\":\"type\"}},\"id\":\"obj_123\",\"livemode\":true,\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"financial_account\":\"financial_account\"},\"transfer_history\":[{\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"level\":\"canonical\",\"type\":\"bank_debit_failed\"}]}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Core.FeeBatches; - Stripe.V2.Core.FeeBatch feeBatch = service.Get("id_123"); - this.AssertRequest(HttpMethod.Get, "/v2/core/fee_batches/id_123"); + var service = client.V2.MoneyManagement.InboundTransfers; + Stripe.V2.MoneyManagement.InboundTransfer inboundTransfer = service + .Get("id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/money_management/inbound_transfers/id_123"); } [Fact] - public void TestV2CoreFeeEntryGet() + public async Task TestV2MoneyManagementInboundTransferGet2Async() { this.StubRequest( HttpMethod.Get, - "/v2/core/fee_entries", + "/v2/money_management/inbound_transfers/id_123", (HttpStatusCode)200, - "{\"data\":[{\"object\":\"v2.core.fee_entry\",\"amount\":{\"currency\":\"usd\",\"value\":\"value\"},\"charged_by\":{\"type\":\"application\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"incurred_by\":{\"id\":\"obj_123\",\"type\":\"type\"},\"livemode\":true,\"reason\":\"reprice\",\"type\":\"application_fee\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"object\":\"v2.money_management.inbound_transfer\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"payment_method\":{\"type\":\"type\"}},\"id\":\"obj_123\",\"livemode\":true,\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"financial_account\":\"financial_account\"},\"transfer_history\":[{\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"level\":\"canonical\",\"type\":\"bank_debit_failed\"}]}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Core.FeeEntries; - Stripe.V2.StripeList feeEntries = service - .List(); - this.AssertRequest(HttpMethod.Get, "/v2/core/fee_entries"); + var service = client.V2.MoneyManagement.InboundTransfers; + Stripe.V2.MoneyManagement.InboundTransfer inboundTransfer = await service + .GetAsync("id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/money_management/inbound_transfers/id_123"); } [Fact] - public void TestV2CoreFeeEntryGet2() + public void TestV2MoneyManagementOutboundPaymentGet() { this.StubRequest( HttpMethod.Get, - "/v2/core/fee_entries/id_123", + "/v2/money_management/outbound_payments", (HttpStatusCode)200, - "{\"object\":\"v2.core.fee_entry\",\"amount\":{\"currency\":\"usd\",\"value\":\"value\"},\"charged_by\":{\"type\":\"application\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"incurred_by\":{\"id\":\"obj_123\",\"type\":\"type\"},\"livemode\":true,\"reason\":\"reprice\",\"type\":\"application_fee\"}"); + "{\"data\":[{\"object\":\"v2.money_management.outbound_payment\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"livemode\":true,\"recipient_notification\":{\"setting\":\"configured\"},\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"trace_id\":{\"status\":\"pending\"}}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Core.FeeEntries; - Stripe.V2.Core.FeeEntry feeEntry = service.Get("id_123"); - this.AssertRequest(HttpMethod.Get, "/v2/core/fee_entries/id_123"); + var service = client.V2.MoneyManagement.OutboundPayments; + Stripe.V2.StripeList outboundPayments = service + .List(); + this.AssertRequest( + HttpMethod.Get, + "/v2/money_management/outbound_payments"); } [Fact] - public void TestV2CoreVaultGbBankAccountGet() + public async Task TestV2MoneyManagementOutboundPaymentGetAsync() { this.StubRequest( HttpMethod.Get, - "/v2/core/vault/gb_bank_accounts", + "/v2/money_management/outbound_payments", (HttpStatusCode)200, - "{\"data\":[{\"object\":\"v2.core.vault.gb_bank_account\",\"archived\":true,\"bank_account_type\":\"toza\",\"bank_name\":\"bank_name\",\"confirmation_of_payee\":{\"result\":{\"created\":\"1970-01-12T21:42:34.472Z\",\"match_result\":\"unavailable\",\"matched\":{},\"message\":\"message\",\"provided\":{\"business_type\":\"personal\",\"name\":\"name\"}},\"status\":\"awaiting_acknowledgement\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"]}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"object\":\"v2.money_management.outbound_payment\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"livemode\":true,\"recipient_notification\":{\"setting\":\"configured\"},\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"trace_id\":{\"status\":\"pending\"}}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Core.Vault.GbBankAccounts; - Stripe.V2.StripeList gbBankAccounts = service - .List(); + var service = client.V2.MoneyManagement.OutboundPayments; + Stripe.V2.StripeList outboundPayments = await service + .ListAsync(); this.AssertRequest( HttpMethod.Get, - "/v2/core/vault/gb_bank_accounts"); + "/v2/money_management/outbound_payments"); } [Fact] - public void TestV2CoreVaultGbBankAccountPost() + public void TestV2MoneyManagementOutboundPaymentGetAutoPaging() { this.StubRequest( - HttpMethod.Post, - "/v2/core/vault/gb_bank_accounts", + HttpMethod.Get, + "/v2/money_management/outbound_payments", (HttpStatusCode)200, - "{\"object\":\"v2.core.vault.gb_bank_account\",\"archived\":true,\"bank_account_type\":\"toza\",\"bank_name\":\"bank_name\",\"confirmation_of_payee\":{\"result\":{\"created\":\"1970-01-12T21:42:34.472Z\",\"match_result\":\"unavailable\",\"matched\":{},\"message\":\"message\",\"provided\":{\"business_type\":\"personal\",\"name\":\"name\"}},\"status\":\"awaiting_acknowledgement\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"]}"); - var options = new Stripe.V2.Core.Vault.GbBankAccountCreateOptions - { - Currency = "usd", - }; + "{\"data\":[{\"object\":\"v2.money_management.outbound_payment\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"livemode\":true,\"recipient_notification\":{\"setting\":\"configured\"},\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"trace_id\":{\"status\":\"pending\"}}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Core.Vault.GbBankAccounts; - Stripe.V2.Core.Vault.GbBankAccount gbBankAccount = service.Create( - options); + var service = client.V2.MoneyManagement.OutboundPayments; + var outboundPayment = service.ListAutoPaging().First(); this.AssertRequest( - HttpMethod.Post, - "/v2/core/vault/gb_bank_accounts"); + HttpMethod.Get, + "/v2/money_management/outbound_payments"); } [Fact] - public void TestV2CoreVaultGbBankAccountGet2() + public async Task TestV2MoneyManagementOutboundPaymentGetAutoPagingAsync() { this.StubRequest( HttpMethod.Get, - "/v2/core/vault/gb_bank_accounts/id_123", + "/v2/money_management/outbound_payments", (HttpStatusCode)200, - "{\"object\":\"v2.core.vault.gb_bank_account\",\"archived\":true,\"bank_account_type\":\"toza\",\"bank_name\":\"bank_name\",\"confirmation_of_payee\":{\"result\":{\"created\":\"1970-01-12T21:42:34.472Z\",\"match_result\":\"unavailable\",\"matched\":{},\"message\":\"message\",\"provided\":{\"business_type\":\"personal\",\"name\":\"name\"}},\"status\":\"awaiting_acknowledgement\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"]}"); + "{\"data\":[{\"object\":\"v2.money_management.outbound_payment\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"livemode\":true,\"recipient_notification\":{\"setting\":\"configured\"},\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"trace_id\":{\"status\":\"pending\"}}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Core.Vault.GbBankAccounts; - Stripe.V2.Core.Vault.GbBankAccount gbBankAccount = service.Get( - "id_123"); + var service = client.V2.MoneyManagement.OutboundPayments; + var outboundPayment = await service.ListAutoPagingAsync() + .FirstAsync(); this.AssertRequest( HttpMethod.Get, - "/v2/core/vault/gb_bank_accounts/id_123"); + "/v2/money_management/outbound_payments"); } [Fact] - public void TestV2CoreVaultGbBankAccountPost2() + public void TestV2MoneyManagementOutboundPaymentPost() { this.StubRequest( HttpMethod.Post, - "/v2/core/vault/gb_bank_accounts/id_123/acknowledge_confirmation_of_payee", + "/v2/money_management/outbound_payments", (HttpStatusCode)200, - "{\"object\":\"v2.core.vault.gb_bank_account\",\"archived\":true,\"bank_account_type\":\"toza\",\"bank_name\":\"bank_name\",\"confirmation_of_payee\":{\"result\":{\"created\":\"1970-01-12T21:42:34.472Z\",\"match_result\":\"unavailable\",\"matched\":{},\"message\":\"message\",\"provided\":{\"business_type\":\"personal\",\"name\":\"name\"}},\"status\":\"awaiting_acknowledgement\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"]}"); + "{\"object\":\"v2.money_management.outbound_payment\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"livemode\":true,\"recipient_notification\":{\"setting\":\"configured\"},\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"trace_id\":{\"status\":\"pending\"}}"); + var options = new Stripe.V2.MoneyManagement.OutboundPaymentCreateOptions + { + Amount = new Stripe.V2.Amount { Value = 96, Currency = "USD" }, + From = new Stripe.V2.MoneyManagement.OutboundPaymentCreateFromOptions + { + Currency = "usd", + FinancialAccount = "financial_account", + }, + To = new Stripe.V2.MoneyManagement.OutboundPaymentCreateToOptions + { + Currency = "usd", + PayoutMethod = "payout_method", + Recipient = "recipient", + }, + }; var client = new StripeClient(this.Requestor); - var service = client.V2.Core.Vault.GbBankAccounts; - Stripe.V2.Core.Vault.GbBankAccount gbBankAccount = service - .AcknowledgeConfirmationOfPayee("id_123"); + var service = client.V2.MoneyManagement.OutboundPayments; + Stripe.V2.MoneyManagement.OutboundPayment outboundPayment = service + .Create(options); this.AssertRequest( HttpMethod.Post, - "/v2/core/vault/gb_bank_accounts/id_123/acknowledge_confirmation_of_payee"); + "/v2/money_management/outbound_payments"); } [Fact] - public void TestV2CoreVaultGbBankAccountPost3() + public async Task TestV2MoneyManagementOutboundPaymentPostAsync() { this.StubRequest( HttpMethod.Post, - "/v2/core/vault/gb_bank_accounts/id_123/archive", + "/v2/money_management/outbound_payments", (HttpStatusCode)200, - "{\"object\":\"v2.core.vault.gb_bank_account\",\"archived\":true,\"bank_account_type\":\"toza\",\"bank_name\":\"bank_name\",\"confirmation_of_payee\":{\"result\":{\"created\":\"1970-01-12T21:42:34.472Z\",\"match_result\":\"unavailable\",\"matched\":{},\"message\":\"message\",\"provided\":{\"business_type\":\"personal\",\"name\":\"name\"}},\"status\":\"awaiting_acknowledgement\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"]}"); + "{\"object\":\"v2.money_management.outbound_payment\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"livemode\":true,\"recipient_notification\":{\"setting\":\"configured\"},\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"trace_id\":{\"status\":\"pending\"}}"); + var options = new Stripe.V2.MoneyManagement.OutboundPaymentCreateOptions + { + Amount = new Stripe.V2.Amount { Value = 96, Currency = "USD" }, + From = new Stripe.V2.MoneyManagement.OutboundPaymentCreateFromOptions + { + Currency = "usd", + FinancialAccount = "financial_account", + }, + To = new Stripe.V2.MoneyManagement.OutboundPaymentCreateToOptions + { + Currency = "usd", + PayoutMethod = "payout_method", + Recipient = "recipient", + }, + }; var client = new StripeClient(this.Requestor); - var service = client.V2.Core.Vault.GbBankAccounts; - Stripe.V2.Core.Vault.GbBankAccount gbBankAccount = service.Archive( - "id_123"); + var service = client.V2.MoneyManagement.OutboundPayments; + Stripe.V2.MoneyManagement.OutboundPayment outboundPayment = await service + .CreateAsync(options); this.AssertRequest( HttpMethod.Post, - "/v2/core/vault/gb_bank_accounts/id_123/archive"); + "/v2/money_management/outbound_payments"); } [Fact] - public void TestV2CoreVaultGbBankAccountPost4() + public void TestV2MoneyManagementOutboundPaymentGet2() { this.StubRequest( - HttpMethod.Post, - "/v2/core/vault/gb_bank_accounts/id_123/initiate_confirmation_of_payee", + HttpMethod.Get, + "/v2/money_management/outbound_payments/id_123", (HttpStatusCode)200, - "{\"object\":\"v2.core.vault.gb_bank_account\",\"archived\":true,\"bank_account_type\":\"toza\",\"bank_name\":\"bank_name\",\"confirmation_of_payee\":{\"result\":{\"created\":\"1970-01-12T21:42:34.472Z\",\"match_result\":\"unavailable\",\"matched\":{},\"message\":\"message\",\"provided\":{\"business_type\":\"personal\",\"name\":\"name\"}},\"status\":\"awaiting_acknowledgement\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"]}"); + "{\"object\":\"v2.money_management.outbound_payment\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"livemode\":true,\"recipient_notification\":{\"setting\":\"configured\"},\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"trace_id\":{\"status\":\"pending\"}}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Core.Vault.GbBankAccounts; - Stripe.V2.Core.Vault.GbBankAccount gbBankAccount = service - .InitiateConfirmationOfPayee("id_123"); + var service = client.V2.MoneyManagement.OutboundPayments; + Stripe.V2.MoneyManagement.OutboundPayment outboundPayment = service + .Get("id_123"); this.AssertRequest( - HttpMethod.Post, - "/v2/core/vault/gb_bank_accounts/id_123/initiate_confirmation_of_payee"); + HttpMethod.Get, + "/v2/money_management/outbound_payments/id_123"); } [Fact] - public void TestV2CoreVaultUsBankAccountGet() + public async Task TestV2MoneyManagementOutboundPaymentGet2Async() { this.StubRequest( HttpMethod.Get, - "/v2/core/vault/us_bank_accounts", + "/v2/money_management/outbound_payments/id_123", (HttpStatusCode)200, - "{\"data\":[{\"object\":\"v2.core.vault.us_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"],\"verification\":{\"status\":\"verification_failed\"}}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"object\":\"v2.money_management.outbound_payment\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"livemode\":true,\"recipient_notification\":{\"setting\":\"configured\"},\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"trace_id\":{\"status\":\"pending\"}}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Core.Vault.UsBankAccounts; - Stripe.V2.StripeList usBankAccounts = service - .List(); + var service = client.V2.MoneyManagement.OutboundPayments; + Stripe.V2.MoneyManagement.OutboundPayment outboundPayment = await service + .GetAsync("id_123"); this.AssertRequest( HttpMethod.Get, - "/v2/core/vault/us_bank_accounts"); + "/v2/money_management/outbound_payments/id_123"); } [Fact] - public void TestV2CoreVaultUsBankAccountPost() + public void TestV2MoneyManagementOutboundPaymentPost2() { this.StubRequest( HttpMethod.Post, - "/v2/core/vault/us_bank_accounts", + "/v2/money_management/outbound_payments/id_123/cancel", (HttpStatusCode)200, - "{\"object\":\"v2.core.vault.us_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"],\"verification\":{\"status\":\"verification_failed\"}}"); - var options = new Stripe.V2.Core.Vault.UsBankAccountCreateOptions - { - AccountNumber = "account_number", - Currency = "usd", - }; + "{\"object\":\"v2.money_management.outbound_payment\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"livemode\":true,\"recipient_notification\":{\"setting\":\"configured\"},\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"trace_id\":{\"status\":\"pending\"}}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Core.Vault.UsBankAccounts; - Stripe.V2.Core.Vault.UsBankAccount usBankAccount = service.Create( - options); + var service = client.V2.MoneyManagement.OutboundPayments; + Stripe.V2.MoneyManagement.OutboundPayment outboundPayment = service + .Cancel("id_123"); this.AssertRequest( HttpMethod.Post, - "/v2/core/vault/us_bank_accounts"); + "/v2/money_management/outbound_payments/id_123/cancel"); } [Fact] - public void TestV2CoreVaultUsBankAccountGet2() + public async Task TestV2MoneyManagementOutboundPaymentPost2Async() { this.StubRequest( - HttpMethod.Get, - "/v2/core/vault/us_bank_accounts/id_123", + HttpMethod.Post, + "/v2/money_management/outbound_payments/id_123/cancel", (HttpStatusCode)200, - "{\"object\":\"v2.core.vault.us_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"],\"verification\":{\"status\":\"verification_failed\"}}"); + "{\"object\":\"v2.money_management.outbound_payment\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"livemode\":true,\"recipient_notification\":{\"setting\":\"configured\"},\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"trace_id\":{\"status\":\"pending\"}}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Core.Vault.UsBankAccounts; - Stripe.V2.Core.Vault.UsBankAccount usBankAccount = service.Get( - "id_123"); + var service = client.V2.MoneyManagement.OutboundPayments; + Stripe.V2.MoneyManagement.OutboundPayment outboundPayment = await service + .CancelAsync("id_123"); this.AssertRequest( - HttpMethod.Get, - "/v2/core/vault/us_bank_accounts/id_123"); + HttpMethod.Post, + "/v2/money_management/outbound_payments/id_123/cancel"); } [Fact] - public void TestV2CoreVaultUsBankAccountPost2() + public void TestV2MoneyManagementOutboundPaymentQuotePost() { this.StubRequest( HttpMethod.Post, - "/v2/core/vault/us_bank_accounts/id_123", + "/v2/money_management/outbound_payment_quotes", (HttpStatusCode)200, - "{\"object\":\"v2.core.vault.us_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"],\"verification\":{\"status\":\"verification_failed\"}}"); - var options = new Stripe.V2.Core.Vault.UsBankAccountUpdateOptions(); + "{\"object\":\"v2.money_management.outbound_payment_quote\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"estimated_fees\":[{\"amount\":{\"currency\":\"USD\",\"value\":96},\"type\":\"next_day_payout_fee\"}],\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"fx_quote\":{\"lock_duration\":\"five_minutes\",\"lock_status\":\"active\",\"rates\":{\"key\":{\"exchange_rate\":\"exchange_rate\"}},\"to_currency\":\"usd\"},\"id\":\"obj_123\",\"livemode\":true,\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"}}"); + var options = new Stripe.V2.MoneyManagement.OutboundPaymentQuoteCreateOptions + { + Amount = new Stripe.V2.Amount { Value = 96, Currency = "USD" }, + From = new Stripe.V2.MoneyManagement.OutboundPaymentQuoteCreateFromOptions + { + Currency = "usd", + FinancialAccount = "financial_account", + }, + To = new Stripe.V2.MoneyManagement.OutboundPaymentQuoteCreateToOptions + { + Currency = "usd", + PayoutMethod = "payout_method", + Recipient = "recipient", + }, + }; var client = new StripeClient(this.Requestor); - var service = client.V2.Core.Vault.UsBankAccounts; - Stripe.V2.Core.Vault.UsBankAccount usBankAccount = service.Update( - "id_123", - options); + var service = client.V2.MoneyManagement.OutboundPaymentQuotes; + Stripe.V2.MoneyManagement.OutboundPaymentQuote outboundPaymentQuote = service + .Create(options); this.AssertRequest( HttpMethod.Post, - "/v2/core/vault/us_bank_accounts/id_123"); + "/v2/money_management/outbound_payment_quotes"); } [Fact] - public void TestV2CoreVaultUsBankAccountPost3() + public async Task TestV2MoneyManagementOutboundPaymentQuotePostAsync() { this.StubRequest( HttpMethod.Post, - "/v2/core/vault/us_bank_accounts/id_123/archive", + "/v2/money_management/outbound_payment_quotes", (HttpStatusCode)200, - "{\"object\":\"v2.core.vault.us_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"],\"verification\":{\"status\":\"verification_failed\"}}"); + "{\"object\":\"v2.money_management.outbound_payment_quote\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"estimated_fees\":[{\"amount\":{\"currency\":\"USD\",\"value\":96},\"type\":\"next_day_payout_fee\"}],\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"fx_quote\":{\"lock_duration\":\"five_minutes\",\"lock_status\":\"active\",\"rates\":{\"key\":{\"exchange_rate\":\"exchange_rate\"}},\"to_currency\":\"usd\"},\"id\":\"obj_123\",\"livemode\":true,\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"}}"); + var options = new Stripe.V2.MoneyManagement.OutboundPaymentQuoteCreateOptions + { + Amount = new Stripe.V2.Amount { Value = 96, Currency = "USD" }, + From = new Stripe.V2.MoneyManagement.OutboundPaymentQuoteCreateFromOptions + { + Currency = "usd", + FinancialAccount = "financial_account", + }, + To = new Stripe.V2.MoneyManagement.OutboundPaymentQuoteCreateToOptions + { + Currency = "usd", + PayoutMethod = "payout_method", + Recipient = "recipient", + }, + }; var client = new StripeClient(this.Requestor); - var service = client.V2.Core.Vault.UsBankAccounts; - Stripe.V2.Core.Vault.UsBankAccount usBankAccount = service.Archive( - "id_123"); + var service = client.V2.MoneyManagement.OutboundPaymentQuotes; + Stripe.V2.MoneyManagement.OutboundPaymentQuote outboundPaymentQuote = await service + .CreateAsync(options); this.AssertRequest( HttpMethod.Post, - "/v2/core/vault/us_bank_accounts/id_123/archive"); + "/v2/money_management/outbound_payment_quotes"); } [Fact] - public void TestV2CoreVaultUsBankAccountPost4() + public void TestV2MoneyManagementOutboundPaymentQuoteGet() { this.StubRequest( - HttpMethod.Post, - "/v2/core/vault/us_bank_accounts/id_123/confirm_microdeposits", + HttpMethod.Get, + "/v2/money_management/outbound_payment_quotes/id_123", (HttpStatusCode)200, - "{\"object\":\"v2.core.vault.us_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"],\"verification\":{\"status\":\"verification_failed\"}}"); + "{\"object\":\"v2.money_management.outbound_payment_quote\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"estimated_fees\":[{\"amount\":{\"currency\":\"USD\",\"value\":96},\"type\":\"next_day_payout_fee\"}],\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"fx_quote\":{\"lock_duration\":\"five_minutes\",\"lock_status\":\"active\",\"rates\":{\"key\":{\"exchange_rate\":\"exchange_rate\"}},\"to_currency\":\"usd\"},\"id\":\"obj_123\",\"livemode\":true,\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"}}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Core.Vault.UsBankAccounts; - Stripe.V2.Core.Vault.UsBankAccount usBankAccount = service - .ConfirmMicrodeposits("id_123"); + var service = client.V2.MoneyManagement.OutboundPaymentQuotes; + Stripe.V2.MoneyManagement.OutboundPaymentQuote outboundPaymentQuote = service + .Get("id_123"); this.AssertRequest( - HttpMethod.Post, - "/v2/core/vault/us_bank_accounts/id_123/confirm_microdeposits"); + HttpMethod.Get, + "/v2/money_management/outbound_payment_quotes/id_123"); } [Fact] - public void TestV2CoreVaultUsBankAccountPost5() + public async Task TestV2MoneyManagementOutboundPaymentQuoteGetAsync() { this.StubRequest( - HttpMethod.Post, - "/v2/core/vault/us_bank_accounts/id_123/send_microdeposits", + HttpMethod.Get, + "/v2/money_management/outbound_payment_quotes/id_123", (HttpStatusCode)200, - "{\"object\":\"v2.core.vault.us_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"],\"verification\":{\"status\":\"verification_failed\"}}"); + "{\"object\":\"v2.money_management.outbound_payment_quote\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"estimated_fees\":[{\"amount\":{\"currency\":\"USD\",\"value\":96},\"type\":\"next_day_payout_fee\"}],\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"fx_quote\":{\"lock_duration\":\"five_minutes\",\"lock_status\":\"active\",\"rates\":{\"key\":{\"exchange_rate\":\"exchange_rate\"}},\"to_currency\":\"usd\"},\"id\":\"obj_123\",\"livemode\":true,\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"}}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Core.Vault.UsBankAccounts; - Stripe.V2.Core.Vault.UsBankAccount usBankAccount = service - .SendMicrodeposits("id_123"); + var service = client.V2.MoneyManagement.OutboundPaymentQuotes; + Stripe.V2.MoneyManagement.OutboundPaymentQuote outboundPaymentQuote = await service + .GetAsync("id_123"); this.AssertRequest( - HttpMethod.Post, - "/v2/core/vault/us_bank_accounts/id_123/send_microdeposits"); + HttpMethod.Get, + "/v2/money_management/outbound_payment_quotes/id_123"); } [Fact] - public void TestV2DataAnalyticsMetricQueryPost() + public void TestV2MoneyManagementOutboundSetupIntentGet() { this.StubRequest( - HttpMethod.Post, - "/v2/data/analytics/metric_query", + HttpMethod.Get, + "/v2/money_management/outbound_setup_intents", (HttpStatusCode)200, - "{\"object\":\"v2.data.analytics.metric_query_result\",\"created\":\"1970-01-12T21:42:34.472Z\",\"data\":[{\"dimensions\":{\"key\":\"dimensions\"},\"id\":\"obj_123\",\"results\":[{\"metric\":\"metric\",\"name\":\"name\",\"value\":\"111972721\"}],\"timestamp\":\"1970-01-01T15:18:46.294Z\"}],\"id\":\"obj_123\",\"livemode\":true,\"refreshed_at\":\"1970-01-01T11:25:45.896Z\"}"); - var options = new Stripe.V2.Data.Analytics.MetricQueryCreateOptions - { - EndsAt = DateTimeOffset.Parse("1970-01-19T14:12:09.638Z") - .UtcDateTime, - Granularity = "week", - Metrics = new List - { - new Stripe.V2.Data.Analytics.MetricQueryCreateMetricOptions - { - Id = "obj_123", - Name = "name", - }, - }, - StartsAt = DateTimeOffset.Parse("1970-01-25T15:13:01.215Z") - .UtcDateTime, - }; + "{\"data\":[{\"object\":\"v2.money_management.outbound_setup_intent\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"payout_method\":{\"object\":\"v2.money_management.payout_method\",\"available_payout_speeds\":[\"standard\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"restricted\":true,\"type\":\"bank_account\",\"usage_status\":{\"payments\":\"requires_action\",\"transfers\":\"invalid\"}},\"status\":\"requires_payout_method\",\"usage_intent\":\"payment\"}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Data.Analytics.MetricQuery; - Stripe.V2.Data.Analytics.MetricQueryResult metricQueryResult = service - .Create(options); + var service = client.V2.MoneyManagement.OutboundSetupIntents; + Stripe.V2.StripeList outboundSetupIntents = service + .List(); this.AssertRequest( - HttpMethod.Post, - "/v2/data/analytics/metric_query"); + HttpMethod.Get, + "/v2/money_management/outbound_setup_intents"); } [Fact] - public void TestV2DataReportingQueryRunPost() + public async Task TestV2MoneyManagementOutboundSetupIntentGetAsync() { this.StubRequest( - HttpMethod.Post, - "/v2/data/reporting/query_runs", + HttpMethod.Get, + "/v2/money_management/outbound_setup_intents", (HttpStatusCode)200, - "{\"object\":\"v2.data.reporting.query_run\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"sql\":\"sql\",\"status\":\"failed\",\"status_details\":{\"key\":{}}}"); - var options = new Stripe.V2.Data.Reporting.QueryRunCreateOptions - { - Sql = "sql", - }; + "{\"data\":[{\"object\":\"v2.money_management.outbound_setup_intent\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"payout_method\":{\"object\":\"v2.money_management.payout_method\",\"available_payout_speeds\":[\"standard\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"restricted\":true,\"type\":\"bank_account\",\"usage_status\":{\"payments\":\"requires_action\",\"transfers\":\"invalid\"}},\"status\":\"requires_payout_method\",\"usage_intent\":\"payment\"}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Data.Reporting.QueryRuns; - Stripe.V2.Data.Reporting.QueryRun queryRun = service.Create( - options); + var service = client.V2.MoneyManagement.OutboundSetupIntents; + Stripe.V2.StripeList outboundSetupIntents = await service + .ListAsync(); this.AssertRequest( - HttpMethod.Post, - "/v2/data/reporting/query_runs"); + HttpMethod.Get, + "/v2/money_management/outbound_setup_intents"); } [Fact] - public void TestV2DataReportingQueryRunGet() + public void TestV2MoneyManagementOutboundSetupIntentGetAutoPaging() { this.StubRequest( HttpMethod.Get, - "/v2/data/reporting/query_runs/id_123", + "/v2/money_management/outbound_setup_intents", (HttpStatusCode)200, - "{\"object\":\"v2.data.reporting.query_run\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"sql\":\"sql\",\"status\":\"failed\",\"status_details\":{\"key\":{}}}"); + "{\"data\":[{\"object\":\"v2.money_management.outbound_setup_intent\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"payout_method\":{\"object\":\"v2.money_management.payout_method\",\"available_payout_speeds\":[\"standard\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"restricted\":true,\"type\":\"bank_account\",\"usage_status\":{\"payments\":\"requires_action\",\"transfers\":\"invalid\"}},\"status\":\"requires_payout_method\",\"usage_intent\":\"payment\"}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Data.Reporting.QueryRuns; - Stripe.V2.Data.Reporting.QueryRun queryRun = service.Get("id_123"); + var service = client.V2.MoneyManagement.OutboundSetupIntents; + var outboundSetupIntent = service.ListAutoPaging().First(); this.AssertRequest( HttpMethod.Get, - "/v2/data/reporting/query_runs/id_123"); + "/v2/money_management/outbound_setup_intents"); } [Fact] - public void TestV2ExtendWorkflowGet() + public async Task TestV2MoneyManagementOutboundSetupIntentGetAutoPagingAsync() { this.StubRequest( HttpMethod.Get, - "/v2/extend/workflows", + "/v2/money_management/outbound_setup_intents", (HttpStatusCode)200, - "{\"data\":[{\"object\":\"v2.extend.workflow\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"draft\",\"title\":\"title\",\"triggers\":[{\"type\":\"event_trigger\"}]}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"object\":\"v2.money_management.outbound_setup_intent\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"payout_method\":{\"object\":\"v2.money_management.payout_method\",\"available_payout_speeds\":[\"standard\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"restricted\":true,\"type\":\"bank_account\",\"usage_status\":{\"payments\":\"requires_action\",\"transfers\":\"invalid\"}},\"status\":\"requires_payout_method\",\"usage_intent\":\"payment\"}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Extend.Workflows; - Stripe.V2.StripeList workflows = service - .List(); - this.AssertRequest(HttpMethod.Get, "/v2/extend/workflows"); + var service = client.V2.MoneyManagement.OutboundSetupIntents; + var outboundSetupIntent = await service.ListAutoPagingAsync() + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v2/money_management/outbound_setup_intents"); } [Fact] - public void TestV2ExtendWorkflowGet2() + public void TestV2MoneyManagementOutboundSetupIntentPost() { this.StubRequest( - HttpMethod.Get, - "/v2/extend/workflows/id_123", + HttpMethod.Post, + "/v2/money_management/outbound_setup_intents", (HttpStatusCode)200, - "{\"object\":\"v2.extend.workflow\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"draft\",\"title\":\"title\",\"triggers\":[{\"type\":\"event_trigger\"}]}"); + "{\"object\":\"v2.money_management.outbound_setup_intent\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"payout_method\":{\"object\":\"v2.money_management.payout_method\",\"available_payout_speeds\":[\"standard\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"restricted\":true,\"type\":\"bank_account\",\"usage_status\":{\"payments\":\"requires_action\",\"transfers\":\"invalid\"}},\"status\":\"requires_payout_method\",\"usage_intent\":\"payment\"}"); + var options = new Stripe.V2.MoneyManagement.OutboundSetupIntentCreateOptions(); var client = new StripeClient(this.Requestor); - var service = client.V2.Extend.Workflows; - Stripe.V2.Extend.Workflow workflow = service.Get("id_123"); - this.AssertRequest(HttpMethod.Get, "/v2/extend/workflows/id_123"); + var service = client.V2.MoneyManagement.OutboundSetupIntents; + Stripe.V2.MoneyManagement.OutboundSetupIntent outboundSetupIntent = service + .Create(options); + this.AssertRequest( + HttpMethod.Post, + "/v2/money_management/outbound_setup_intents"); } [Fact] - public void TestV2ExtendWorkflowPost() + public async Task TestV2MoneyManagementOutboundSetupIntentPostAsync() { this.StubRequest( HttpMethod.Post, - "/v2/extend/workflows/id_123/invoke", + "/v2/money_management/outbound_setup_intents", (HttpStatusCode)200, - "{\"object\":\"v2.extend.workflow_run\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"failed\",\"status_transitions\":{},\"trigger\":{\"type\":\"event_trigger\"},\"workflow\":\"workflow\"}"); - var options = new Stripe.V2.Extend.WorkflowInvokeOptions - { - InputParameters = new Dictionary - { - { "int_key", 123 }, - { "string_key", "value" }, - { "boolean_key", true }, - { - "object_key", new Dictionary - { - { "object_int_key", 123 }, - { "object_string_key", "value" }, - { "object_boolean_key", true }, - } - }, - { "array_key", new List { 1, 2, 3 } }, - }, - }; + "{\"object\":\"v2.money_management.outbound_setup_intent\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"payout_method\":{\"object\":\"v2.money_management.payout_method\",\"available_payout_speeds\":[\"standard\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"restricted\":true,\"type\":\"bank_account\",\"usage_status\":{\"payments\":\"requires_action\",\"transfers\":\"invalid\"}},\"status\":\"requires_payout_method\",\"usage_intent\":\"payment\"}"); + var options = new Stripe.V2.MoneyManagement.OutboundSetupIntentCreateOptions(); var client = new StripeClient(this.Requestor); - var service = client.V2.Extend.Workflows; - Stripe.V2.Extend.WorkflowRun workflowRun = service.Invoke( - "id_123", - options); + var service = client.V2.MoneyManagement.OutboundSetupIntents; + Stripe.V2.MoneyManagement.OutboundSetupIntent outboundSetupIntent = await service + .CreateAsync(options); this.AssertRequest( HttpMethod.Post, - "/v2/extend/workflows/id_123/invoke"); + "/v2/money_management/outbound_setup_intents"); } [Fact] - public void TestV2ExtendWorkflowRunGet() + public void TestV2MoneyManagementOutboundSetupIntentGet2() { this.StubRequest( HttpMethod.Get, - "/v2/extend/workflow_runs", + "/v2/money_management/outbound_setup_intents/id_123", (HttpStatusCode)200, - "{\"data\":[{\"object\":\"v2.extend.workflow_run\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"failed\",\"status_transitions\":{},\"trigger\":{\"type\":\"event_trigger\"},\"workflow\":\"workflow\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"object\":\"v2.money_management.outbound_setup_intent\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"payout_method\":{\"object\":\"v2.money_management.payout_method\",\"available_payout_speeds\":[\"standard\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"restricted\":true,\"type\":\"bank_account\",\"usage_status\":{\"payments\":\"requires_action\",\"transfers\":\"invalid\"}},\"status\":\"requires_payout_method\",\"usage_intent\":\"payment\"}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Extend.WorkflowRuns; - Stripe.V2.StripeList workflowRuns = service - .List(); - this.AssertRequest(HttpMethod.Get, "/v2/extend/workflow_runs"); + var service = client.V2.MoneyManagement.OutboundSetupIntents; + Stripe.V2.MoneyManagement.OutboundSetupIntent outboundSetupIntent = service + .Get("id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/money_management/outbound_setup_intents/id_123"); } [Fact] - public void TestV2ExtendWorkflowRunGet2() + public async Task TestV2MoneyManagementOutboundSetupIntentGet2Async() { this.StubRequest( HttpMethod.Get, - "/v2/extend/workflow_runs/id_123", + "/v2/money_management/outbound_setup_intents/id_123", (HttpStatusCode)200, - "{\"object\":\"v2.extend.workflow_run\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"failed\",\"status_transitions\":{},\"trigger\":{\"type\":\"event_trigger\"},\"workflow\":\"workflow\"}"); + "{\"object\":\"v2.money_management.outbound_setup_intent\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"payout_method\":{\"object\":\"v2.money_management.payout_method\",\"available_payout_speeds\":[\"standard\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"restricted\":true,\"type\":\"bank_account\",\"usage_status\":{\"payments\":\"requires_action\",\"transfers\":\"invalid\"}},\"status\":\"requires_payout_method\",\"usage_intent\":\"payment\"}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Extend.WorkflowRuns; - Stripe.V2.Extend.WorkflowRun workflowRun = service.Get("id_123"); + var service = client.V2.MoneyManagement.OutboundSetupIntents; + Stripe.V2.MoneyManagement.OutboundSetupIntent outboundSetupIntent = await service + .GetAsync("id_123"); this.AssertRequest( HttpMethod.Get, - "/v2/extend/workflow_runs/id_123"); + "/v2/money_management/outbound_setup_intents/id_123"); } [Fact] - public void TestV2IamActivityLogGet() + public void TestV2MoneyManagementOutboundSetupIntentPost2() { this.StubRequest( - HttpMethod.Get, - "/v2/iam/activity_logs", + HttpMethod.Post, + "/v2/money_management/outbound_setup_intents/id_123", (HttpStatusCode)200, - "{\"data\":[{\"object\":\"v2.iam.activity_log\",\"actor\":{\"type\":\"api_key\"},\"context\":\"context\",\"created\":\"1970-01-12T21:42:34.472Z\",\"details\":{\"type\":\"api_key\"},\"id\":\"obj_123\",\"livemode\":true,\"type\":\"api_key_created\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"object\":\"v2.money_management.outbound_setup_intent\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"payout_method\":{\"object\":\"v2.money_management.payout_method\",\"available_payout_speeds\":[\"standard\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"restricted\":true,\"type\":\"bank_account\",\"usage_status\":{\"payments\":\"requires_action\",\"transfers\":\"invalid\"}},\"status\":\"requires_payout_method\",\"usage_intent\":\"payment\"}"); + var options = new Stripe.V2.MoneyManagement.OutboundSetupIntentUpdateOptions(); var client = new StripeClient(this.Requestor); - var service = client.V2.Iam.ActivityLogs; - Stripe.V2.StripeList activityLogs = service - .List(); - this.AssertRequest(HttpMethod.Get, "/v2/iam/activity_logs"); + var service = client.V2.MoneyManagement.OutboundSetupIntents; + Stripe.V2.MoneyManagement.OutboundSetupIntent outboundSetupIntent = service + .Update("id_123", options); + this.AssertRequest( + HttpMethod.Post, + "/v2/money_management/outbound_setup_intents/id_123"); } [Fact] - public void TestV2IamActivityLogGet2() + public async Task TestV2MoneyManagementOutboundSetupIntentPost2Async() { this.StubRequest( - HttpMethod.Get, - "/v2/iam/activity_logs/id_123", + HttpMethod.Post, + "/v2/money_management/outbound_setup_intents/id_123", (HttpStatusCode)200, - "{\"object\":\"v2.iam.activity_log\",\"actor\":{\"type\":\"api_key\"},\"context\":\"context\",\"created\":\"1970-01-12T21:42:34.472Z\",\"details\":{\"type\":\"api_key\"},\"id\":\"obj_123\",\"livemode\":true,\"type\":\"api_key_created\"}"); + "{\"object\":\"v2.money_management.outbound_setup_intent\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"payout_method\":{\"object\":\"v2.money_management.payout_method\",\"available_payout_speeds\":[\"standard\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"restricted\":true,\"type\":\"bank_account\",\"usage_status\":{\"payments\":\"requires_action\",\"transfers\":\"invalid\"}},\"status\":\"requires_payout_method\",\"usage_intent\":\"payment\"}"); + var options = new Stripe.V2.MoneyManagement.OutboundSetupIntentUpdateOptions(); var client = new StripeClient(this.Requestor); - var service = client.V2.Iam.ActivityLogs; - Stripe.V2.Iam.ActivityLog activityLog = service.Get("id_123"); - this.AssertRequest(HttpMethod.Get, "/v2/iam/activity_logs/id_123"); + var service = client.V2.MoneyManagement.OutboundSetupIntents; + Stripe.V2.MoneyManagement.OutboundSetupIntent outboundSetupIntent = await service + .UpdateAsync("id_123", options); + this.AssertRequest( + HttpMethod.Post, + "/v2/money_management/outbound_setup_intents/id_123"); } [Fact] - public void TestV2IamApiKeyGet() + public void TestV2MoneyManagementOutboundSetupIntentPost3() { this.StubRequest( - HttpMethod.Get, - "/v2/iam/api_keys", + HttpMethod.Post, + "/v2/money_management/outbound_setup_intents/id_123/cancel", (HttpStatusCode)200, - "{\"data\":[{\"object\":\"v2.iam.api_key\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"ip_allowlist\":[\"ip_allowlist\"],\"livemode\":true,\"status\":\"active\",\"type\":\"publishable_key\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"object\":\"v2.money_management.outbound_setup_intent\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"payout_method\":{\"object\":\"v2.money_management.payout_method\",\"available_payout_speeds\":[\"standard\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"restricted\":true,\"type\":\"bank_account\",\"usage_status\":{\"payments\":\"requires_action\",\"transfers\":\"invalid\"}},\"status\":\"requires_payout_method\",\"usage_intent\":\"payment\"}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Iam.ApiKeys; - Stripe.V2.StripeList apiKeys = service.List(); - this.AssertRequest(HttpMethod.Get, "/v2/iam/api_keys"); + var service = client.V2.MoneyManagement.OutboundSetupIntents; + Stripe.V2.MoneyManagement.OutboundSetupIntent outboundSetupIntent = service + .Cancel("id_123"); + this.AssertRequest( + HttpMethod.Post, + "/v2/money_management/outbound_setup_intents/id_123/cancel"); } [Fact] - public void TestV2IamApiKeyPost() + public async Task TestV2MoneyManagementOutboundSetupIntentPost3Async() { this.StubRequest( HttpMethod.Post, - "/v2/iam/api_keys", + "/v2/money_management/outbound_setup_intents/id_123/cancel", (HttpStatusCode)200, - "{\"object\":\"v2.iam.api_key\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"ip_allowlist\":[\"ip_allowlist\"],\"livemode\":true,\"status\":\"active\",\"type\":\"publishable_key\"}"); - var options = new Stripe.V2.Iam.ApiKeyCreateOptions - { - Type = "publishable_key", - }; + "{\"object\":\"v2.money_management.outbound_setup_intent\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"payout_method\":{\"object\":\"v2.money_management.payout_method\",\"available_payout_speeds\":[\"standard\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"restricted\":true,\"type\":\"bank_account\",\"usage_status\":{\"payments\":\"requires_action\",\"transfers\":\"invalid\"}},\"status\":\"requires_payout_method\",\"usage_intent\":\"payment\"}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Iam.ApiKeys; - Stripe.V2.Iam.ApiKey apiKey = service.Create(options); - this.AssertRequest(HttpMethod.Post, "/v2/iam/api_keys"); + var service = client.V2.MoneyManagement.OutboundSetupIntents; + Stripe.V2.MoneyManagement.OutboundSetupIntent outboundSetupIntent = await service + .CancelAsync("id_123"); + this.AssertRequest( + HttpMethod.Post, + "/v2/money_management/outbound_setup_intents/id_123/cancel"); } [Fact] - public void TestV2IamApiKeyGet2() + public void TestV2MoneyManagementOutboundTransferGet() { this.StubRequest( HttpMethod.Get, - "/v2/iam/api_keys/id_123", + "/v2/money_management/outbound_transfers", (HttpStatusCode)200, - "{\"object\":\"v2.iam.api_key\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"ip_allowlist\":[\"ip_allowlist\"],\"livemode\":true,\"status\":\"active\",\"type\":\"publishable_key\"}"); + "{\"data\":[{\"object\":\"v2.money_management.outbound_transfer\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"livemode\":true,\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\"},\"trace_id\":{\"status\":\"pending\"}}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Iam.ApiKeys; - Stripe.V2.Iam.ApiKey apiKey = service.Get("id_123"); - this.AssertRequest(HttpMethod.Get, "/v2/iam/api_keys/id_123"); + var service = client.V2.MoneyManagement.OutboundTransfers; + Stripe.V2.StripeList outboundTransfers = service + .List(); + this.AssertRequest( + HttpMethod.Get, + "/v2/money_management/outbound_transfers"); } [Fact] - public void TestV2IamApiKeyPost2() + public async Task TestV2MoneyManagementOutboundTransferGetAsync() { this.StubRequest( - HttpMethod.Post, - "/v2/iam/api_keys/id_123", + HttpMethod.Get, + "/v2/money_management/outbound_transfers", (HttpStatusCode)200, - "{\"object\":\"v2.iam.api_key\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"ip_allowlist\":[\"ip_allowlist\"],\"livemode\":true,\"status\":\"active\",\"type\":\"publishable_key\"}"); - var options = new Stripe.V2.Iam.ApiKeyUpdateOptions(); + "{\"data\":[{\"object\":\"v2.money_management.outbound_transfer\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"livemode\":true,\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\"},\"trace_id\":{\"status\":\"pending\"}}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Iam.ApiKeys; - Stripe.V2.Iam.ApiKey apiKey = service.Update("id_123", options); - this.AssertRequest(HttpMethod.Post, "/v2/iam/api_keys/id_123"); + var service = client.V2.MoneyManagement.OutboundTransfers; + Stripe.V2.StripeList outboundTransfers = await service + .ListAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v2/money_management/outbound_transfers"); } [Fact] - public void TestV2IamApiKeyPost3() + public void TestV2MoneyManagementOutboundTransferGetAutoPaging() { this.StubRequest( - HttpMethod.Post, - "/v2/iam/api_keys/id_123/expire", + HttpMethod.Get, + "/v2/money_management/outbound_transfers", (HttpStatusCode)200, - "{\"object\":\"v2.iam.api_key\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"ip_allowlist\":[\"ip_allowlist\"],\"livemode\":true,\"status\":\"active\",\"type\":\"publishable_key\"}"); + "{\"data\":[{\"object\":\"v2.money_management.outbound_transfer\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"livemode\":true,\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\"},\"trace_id\":{\"status\":\"pending\"}}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Iam.ApiKeys; - Stripe.V2.Iam.ApiKey apiKey = service.Expire("id_123"); + var service = client.V2.MoneyManagement.OutboundTransfers; + var outboundTransfer = service.ListAutoPaging().First(); this.AssertRequest( - HttpMethod.Post, - "/v2/iam/api_keys/id_123/expire"); + HttpMethod.Get, + "/v2/money_management/outbound_transfers"); } [Fact] - public void TestV2IamApiKeyPost4() + public async Task TestV2MoneyManagementOutboundTransferGetAutoPagingAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/money_management/outbound_transfers", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.money_management.outbound_transfer\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"livemode\":true,\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\"},\"trace_id\":{\"status\":\"pending\"}}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.MoneyManagement.OutboundTransfers; + var outboundTransfer = await service.ListAutoPagingAsync() + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v2/money_management/outbound_transfers"); + } + + [Fact] + public void TestV2MoneyManagementOutboundTransferPost() { this.StubRequest( HttpMethod.Post, - "/v2/iam/api_keys/id_123/rotate", + "/v2/money_management/outbound_transfers", (HttpStatusCode)200, - "{\"object\":\"v2.iam.api_key\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"ip_allowlist\":[\"ip_allowlist\"],\"livemode\":true,\"status\":\"active\",\"type\":\"publishable_key\"}"); + "{\"object\":\"v2.money_management.outbound_transfer\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"livemode\":true,\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\"},\"trace_id\":{\"status\":\"pending\"}}"); + var options = new Stripe.V2.MoneyManagement.OutboundTransferCreateOptions + { + Amount = new Stripe.V2.Amount { Value = 96, Currency = "USD" }, + From = new Stripe.V2.MoneyManagement.OutboundTransferCreateFromOptions + { + Currency = "usd", + FinancialAccount = "financial_account", + }, + To = new Stripe.V2.MoneyManagement.OutboundTransferCreateToOptions + { + Currency = "usd", + PayoutMethod = "payout_method", + }, + }; var client = new StripeClient(this.Requestor); - var service = client.V2.Iam.ApiKeys; - Stripe.V2.Iam.ApiKey apiKey = service.Rotate("id_123"); + var service = client.V2.MoneyManagement.OutboundTransfers; + Stripe.V2.MoneyManagement.OutboundTransfer outboundTransfer = service + .Create(options); this.AssertRequest( HttpMethod.Post, - "/v2/iam/api_keys/id_123/rotate"); + "/v2/money_management/outbound_transfers"); } [Fact] - public void TestV2MoneyManagementAdjustmentGet() + public async Task TestV2MoneyManagementOutboundTransferPostAsync() { this.StubRequest( - HttpMethod.Get, - "/v2/money_management/adjustments", + HttpMethod.Post, + "/v2/money_management/outbound_transfers", (HttpStatusCode)200, - "{\"data\":[{\"object\":\"v2.money_management.adjustment\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"object\":\"v2.money_management.outbound_transfer\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"livemode\":true,\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\"},\"trace_id\":{\"status\":\"pending\"}}"); + var options = new Stripe.V2.MoneyManagement.OutboundTransferCreateOptions + { + Amount = new Stripe.V2.Amount { Value = 96, Currency = "USD" }, + From = new Stripe.V2.MoneyManagement.OutboundTransferCreateFromOptions + { + Currency = "usd", + FinancialAccount = "financial_account", + }, + To = new Stripe.V2.MoneyManagement.OutboundTransferCreateToOptions + { + Currency = "usd", + PayoutMethod = "payout_method", + }, + }; var client = new StripeClient(this.Requestor); - var service = client.V2.MoneyManagement.Adjustments; - Stripe.V2.StripeList adjustments = service - .List(); + var service = client.V2.MoneyManagement.OutboundTransfers; + Stripe.V2.MoneyManagement.OutboundTransfer outboundTransfer = await service + .CreateAsync(options); this.AssertRequest( - HttpMethod.Get, - "/v2/money_management/adjustments"); + HttpMethod.Post, + "/v2/money_management/outbound_transfers"); } [Fact] - public void TestV2MoneyManagementAdjustmentGet2() + public void TestV2MoneyManagementOutboundTransferGet2() { this.StubRequest( HttpMethod.Get, - "/v2/money_management/adjustments/id_123", + "/v2/money_management/outbound_transfers/id_123", (HttpStatusCode)200, - "{\"object\":\"v2.money_management.adjustment\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true}"); + "{\"object\":\"v2.money_management.outbound_transfer\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"livemode\":true,\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\"},\"trace_id\":{\"status\":\"pending\"}}"); var client = new StripeClient(this.Requestor); - var service = client.V2.MoneyManagement.Adjustments; - Stripe.V2.MoneyManagement.Adjustment adjustment = service.Get( - "id_123"); + var service = client.V2.MoneyManagement.OutboundTransfers; + Stripe.V2.MoneyManagement.OutboundTransfer outboundTransfer = service + .Get("id_123"); this.AssertRequest( HttpMethod.Get, - "/v2/money_management/adjustments/id_123"); + "/v2/money_management/outbound_transfers/id_123"); } [Fact] - public void TestV2MoneyManagementCurrencyConversionGet() + public async Task TestV2MoneyManagementOutboundTransferGet2Async() { this.StubRequest( HttpMethod.Get, - "/v2/money_management/currency_conversions", + "/v2/money_management/outbound_transfers/id_123", (HttpStatusCode)200, - "{\"data\":[{\"object\":\"v2.money_management.currency_conversion\",\"created\":\"1970-01-12T21:42:34.472Z\",\"exchange_rate\":\"exchange_rate\",\"from\":{\"amount\":{\"currency\":\"USD\",\"value\":96}},\"id\":\"obj_123\",\"livemode\":true,\"to\":{\"amount\":{\"currency\":\"USD\",\"value\":96}}}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"object\":\"v2.money_management.outbound_transfer\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"livemode\":true,\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\"},\"trace_id\":{\"status\":\"pending\"}}"); var client = new StripeClient(this.Requestor); - var service = client.V2.MoneyManagement.CurrencyConversions; - Stripe.V2.StripeList currencyConversions = service - .List(); + var service = client.V2.MoneyManagement.OutboundTransfers; + Stripe.V2.MoneyManagement.OutboundTransfer outboundTransfer = await service + .GetAsync("id_123"); this.AssertRequest( HttpMethod.Get, - "/v2/money_management/currency_conversions"); + "/v2/money_management/outbound_transfers/id_123"); } [Fact] - public void TestV2MoneyManagementCurrencyConversionPost() + public void TestV2MoneyManagementOutboundTransferPost2() { this.StubRequest( HttpMethod.Post, - "/v2/money_management/currency_conversions", + "/v2/money_management/outbound_transfers/id_123/cancel", (HttpStatusCode)200, - "{\"object\":\"v2.money_management.currency_conversion\",\"created\":\"1970-01-12T21:42:34.472Z\",\"exchange_rate\":\"exchange_rate\",\"from\":{\"amount\":{\"currency\":\"USD\",\"value\":96}},\"id\":\"obj_123\",\"livemode\":true,\"to\":{\"amount\":{\"currency\":\"USD\",\"value\":96}}}"); - var options = new Stripe.V2.MoneyManagement.CurrencyConversionCreateOptions - { - From = new Stripe.V2.MoneyManagement.CurrencyConversionCreateFromOptions - { - Amount = new Stripe.V2.Amount - { - Value = 96, - Currency = "USD", - }, - Currency = "usd", - }, - To = new Stripe.V2.MoneyManagement.CurrencyConversionCreateToOptions - { - Amount = new Stripe.V2.Amount - { - Value = 96, - Currency = "USD", - }, - Currency = "usd", - }, - }; + "{\"object\":\"v2.money_management.outbound_transfer\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"livemode\":true,\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\"},\"trace_id\":{\"status\":\"pending\"}}"); var client = new StripeClient(this.Requestor); - var service = client.V2.MoneyManagement.CurrencyConversions; - Stripe.V2.MoneyManagement.CurrencyConversion currencyConversion = service - .Create(options); + var service = client.V2.MoneyManagement.OutboundTransfers; + Stripe.V2.MoneyManagement.OutboundTransfer outboundTransfer = service + .Cancel("id_123"); this.AssertRequest( HttpMethod.Post, - "/v2/money_management/currency_conversions"); + "/v2/money_management/outbound_transfers/id_123/cancel"); } [Fact] - public void TestV2MoneyManagementCurrencyConversionGet2() + public async Task TestV2MoneyManagementOutboundTransferPost2Async() { this.StubRequest( - HttpMethod.Get, - "/v2/money_management/currency_conversions/id_123", + HttpMethod.Post, + "/v2/money_management/outbound_transfers/id_123/cancel", (HttpStatusCode)200, - "{\"object\":\"v2.money_management.currency_conversion\",\"created\":\"1970-01-12T21:42:34.472Z\",\"exchange_rate\":\"exchange_rate\",\"from\":{\"amount\":{\"currency\":\"USD\",\"value\":96}},\"id\":\"obj_123\",\"livemode\":true,\"to\":{\"amount\":{\"currency\":\"USD\",\"value\":96}}}"); + "{\"object\":\"v2.money_management.outbound_transfer\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"livemode\":true,\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\"},\"trace_id\":{\"status\":\"pending\"}}"); var client = new StripeClient(this.Requestor); - var service = client.V2.MoneyManagement.CurrencyConversions; - Stripe.V2.MoneyManagement.CurrencyConversion currencyConversion = service - .Get("id_123"); + var service = client.V2.MoneyManagement.OutboundTransfers; + Stripe.V2.MoneyManagement.OutboundTransfer outboundTransfer = await service + .CancelAsync("id_123"); this.AssertRequest( - HttpMethod.Get, - "/v2/money_management/currency_conversions/id_123"); + HttpMethod.Post, + "/v2/money_management/outbound_transfers/id_123/cancel"); } [Fact] - public void TestV2MoneyManagementDebitDisputeGet() + public void TestV2MoneyManagementPayoutMethodGet() { this.StubRequest( HttpMethod.Get, - "/v2/money_management/debit_disputes", + "/v2/money_management/payout_methods", (HttpStatusCode)200, - "{\"data\":[{\"object\":\"v2.money_management.debit_dispute\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"received_debit\":\"received_debit\",\"status\":\"failed\",\"type\":\"bank_transfer\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"object\":\"v2.money_management.payout_method\",\"available_payout_speeds\":[\"standard\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"restricted\":true,\"type\":\"bank_account\",\"usage_status\":{\"payments\":\"requires_action\",\"transfers\":\"invalid\"}}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.MoneyManagement.DebitDisputes; - Stripe.V2.StripeList debitDisputes = service + var service = client.V2.MoneyManagement.PayoutMethods; + Stripe.V2.StripeList payoutMethods = service .List(); this.AssertRequest( HttpMethod.Get, - "/v2/money_management/debit_disputes"); + "/v2/money_management/payout_methods"); } [Fact] - public void TestV2MoneyManagementDebitDisputePost() + public async Task TestV2MoneyManagementPayoutMethodGetAsync() { this.StubRequest( - HttpMethod.Post, - "/v2/money_management/debit_disputes", + HttpMethod.Get, + "/v2/money_management/payout_methods", (HttpStatusCode)200, - "{\"object\":\"v2.money_management.debit_dispute\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"received_debit\":\"received_debit\",\"status\":\"failed\",\"type\":\"bank_transfer\"}"); - var options = new Stripe.V2.MoneyManagement.DebitDisputeCreateOptions - { - ReceivedDebit = "received_debit", - }; + "{\"data\":[{\"object\":\"v2.money_management.payout_method\",\"available_payout_speeds\":[\"standard\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"restricted\":true,\"type\":\"bank_account\",\"usage_status\":{\"payments\":\"requires_action\",\"transfers\":\"invalid\"}}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.MoneyManagement.DebitDisputes; - Stripe.V2.MoneyManagement.DebitDispute debitDispute = service - .Create(options); + var service = client.V2.MoneyManagement.PayoutMethods; + Stripe.V2.StripeList payoutMethods = await service + .ListAsync(); this.AssertRequest( - HttpMethod.Post, - "/v2/money_management/debit_disputes"); + HttpMethod.Get, + "/v2/money_management/payout_methods"); } [Fact] - public void TestV2MoneyManagementDebitDisputeGet2() + public void TestV2MoneyManagementPayoutMethodGetAutoPaging() { this.StubRequest( HttpMethod.Get, - "/v2/money_management/debit_disputes/id_123", + "/v2/money_management/payout_methods", (HttpStatusCode)200, - "{\"object\":\"v2.money_management.debit_dispute\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"received_debit\":\"received_debit\",\"status\":\"failed\",\"type\":\"bank_transfer\"}"); + "{\"data\":[{\"object\":\"v2.money_management.payout_method\",\"available_payout_speeds\":[\"standard\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"restricted\":true,\"type\":\"bank_account\",\"usage_status\":{\"payments\":\"requires_action\",\"transfers\":\"invalid\"}}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.MoneyManagement.DebitDisputes; - Stripe.V2.MoneyManagement.DebitDispute debitDispute = service.Get( - "id_123"); + var service = client.V2.MoneyManagement.PayoutMethods; + var payoutMethod = service.ListAutoPaging().First(); this.AssertRequest( HttpMethod.Get, - "/v2/money_management/debit_disputes/id_123"); + "/v2/money_management/payout_methods"); } [Fact] - public void TestV2MoneyManagementFinancialAccountGet() + public async Task TestV2MoneyManagementPayoutMethodGetAutoPagingAsync() { this.StubRequest( HttpMethod.Get, - "/v2/money_management/financial_accounts", + "/v2/money_management/payout_methods", (HttpStatusCode)200, - "{\"data\":[{\"object\":\"v2.money_management.financial_account\",\"balance\":{\"available\":{\"key\":{\"currency\":\"USD\",\"value\":35}},\"inbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":11}},\"outbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":60}}},\"country\":\"country\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"closed\",\"type\":\"accrued_fees\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"object\":\"v2.money_management.payout_method\",\"available_payout_speeds\":[\"standard\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"restricted\":true,\"type\":\"bank_account\",\"usage_status\":{\"payments\":\"requires_action\",\"transfers\":\"invalid\"}}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.MoneyManagement.FinancialAccounts; - Stripe.V2.StripeList financialAccounts = service - .List(); + var service = client.V2.MoneyManagement.PayoutMethods; + var payoutMethod = await service.ListAutoPagingAsync().FirstAsync(); this.AssertRequest( HttpMethod.Get, - "/v2/money_management/financial_accounts"); + "/v2/money_management/payout_methods"); } [Fact] - public void TestV2MoneyManagementFinancialAccountPost() + public void TestV2MoneyManagementPayoutMethodGet2() { this.StubRequest( - HttpMethod.Post, - "/v2/money_management/financial_accounts", + HttpMethod.Get, + "/v2/money_management/payout_methods/id_123", (HttpStatusCode)200, - "{\"object\":\"v2.money_management.financial_account\",\"balance\":{\"available\":{\"key\":{\"currency\":\"USD\",\"value\":35}},\"inbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":11}},\"outbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":60}}},\"country\":\"country\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"closed\",\"type\":\"accrued_fees\"}"); - var options = new Stripe.V2.MoneyManagement.FinancialAccountCreateOptions - { - Type = "storage", - }; + "{\"object\":\"v2.money_management.payout_method\",\"available_payout_speeds\":[\"standard\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"restricted\":true,\"type\":\"bank_account\",\"usage_status\":{\"payments\":\"requires_action\",\"transfers\":\"invalid\"}}"); var client = new StripeClient(this.Requestor); - var service = client.V2.MoneyManagement.FinancialAccounts; - Stripe.V2.MoneyManagement.FinancialAccount financialAccount = service - .Create(options); + var service = client.V2.MoneyManagement.PayoutMethods; + Stripe.V2.MoneyManagement.PayoutMethod payoutMethod = service.Get( + "id_123"); this.AssertRequest( - HttpMethod.Post, - "/v2/money_management/financial_accounts"); + HttpMethod.Get, + "/v2/money_management/payout_methods/id_123"); } [Fact] - public void TestV2MoneyManagementFinancialAccountGet2() + public async Task TestV2MoneyManagementPayoutMethodGet2Async() { this.StubRequest( HttpMethod.Get, - "/v2/money_management/financial_accounts/id_123", + "/v2/money_management/payout_methods/id_123", (HttpStatusCode)200, - "{\"object\":\"v2.money_management.financial_account\",\"balance\":{\"available\":{\"key\":{\"currency\":\"USD\",\"value\":35}},\"inbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":11}},\"outbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":60}}},\"country\":\"country\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"closed\",\"type\":\"accrued_fees\"}"); + "{\"object\":\"v2.money_management.payout_method\",\"available_payout_speeds\":[\"standard\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"restricted\":true,\"type\":\"bank_account\",\"usage_status\":{\"payments\":\"requires_action\",\"transfers\":\"invalid\"}}"); var client = new StripeClient(this.Requestor); - var service = client.V2.MoneyManagement.FinancialAccounts; - Stripe.V2.MoneyManagement.FinancialAccount financialAccount = service - .Get("id_123"); + var service = client.V2.MoneyManagement.PayoutMethods; + Stripe.V2.MoneyManagement.PayoutMethod payoutMethod = await service + .GetAsync("id_123"); this.AssertRequest( HttpMethod.Get, - "/v2/money_management/financial_accounts/id_123"); + "/v2/money_management/payout_methods/id_123"); } [Fact] - public void TestV2MoneyManagementFinancialAccountPost2() + public void TestV2MoneyManagementPayoutMethodPost() { this.StubRequest( HttpMethod.Post, - "/v2/money_management/financial_accounts/id_123", + "/v2/money_management/payout_methods/id_123/archive", (HttpStatusCode)200, - "{\"object\":\"v2.money_management.financial_account\",\"balance\":{\"available\":{\"key\":{\"currency\":\"USD\",\"value\":35}},\"inbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":11}},\"outbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":60}}},\"country\":\"country\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"closed\",\"type\":\"accrued_fees\"}"); - var options = new Stripe.V2.MoneyManagement.FinancialAccountUpdateOptions(); + "{\"object\":\"v2.money_management.payout_method\",\"available_payout_speeds\":[\"standard\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"restricted\":true,\"type\":\"bank_account\",\"usage_status\":{\"payments\":\"requires_action\",\"transfers\":\"invalid\"}}"); var client = new StripeClient(this.Requestor); - var service = client.V2.MoneyManagement.FinancialAccounts; - Stripe.V2.MoneyManagement.FinancialAccount financialAccount = service - .Update("id_123", options); + var service = client.V2.MoneyManagement.PayoutMethods; + Stripe.V2.MoneyManagement.PayoutMethod payoutMethod = service + .Archive("id_123"); this.AssertRequest( HttpMethod.Post, - "/v2/money_management/financial_accounts/id_123"); + "/v2/money_management/payout_methods/id_123/archive"); } [Fact] - public void TestV2MoneyManagementFinancialAccountPost3() + public async Task TestV2MoneyManagementPayoutMethodPostAsync() { this.StubRequest( HttpMethod.Post, - "/v2/money_management/financial_accounts/id_123/close", + "/v2/money_management/payout_methods/id_123/archive", (HttpStatusCode)200, - "{\"object\":\"v2.money_management.financial_account\",\"balance\":{\"available\":{\"key\":{\"currency\":\"USD\",\"value\":35}},\"inbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":11}},\"outbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":60}}},\"country\":\"country\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"closed\",\"type\":\"accrued_fees\"}"); + "{\"object\":\"v2.money_management.payout_method\",\"available_payout_speeds\":[\"standard\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"restricted\":true,\"type\":\"bank_account\",\"usage_status\":{\"payments\":\"requires_action\",\"transfers\":\"invalid\"}}"); var client = new StripeClient(this.Requestor); - var service = client.V2.MoneyManagement.FinancialAccounts; - Stripe.V2.MoneyManagement.FinancialAccount financialAccount = service - .Close("id_123"); + var service = client.V2.MoneyManagement.PayoutMethods; + Stripe.V2.MoneyManagement.PayoutMethod payoutMethod = await service + .ArchiveAsync("id_123"); this.AssertRequest( HttpMethod.Post, - "/v2/money_management/financial_accounts/id_123/close"); + "/v2/money_management/payout_methods/id_123/archive"); } [Fact] - public void TestV2MoneyManagementFinancialAccountsStatementGet() + public void TestV2MoneyManagementPayoutMethodPost2() { this.StubRequest( - HttpMethod.Get, - "/v2/money_management/financial_accounts/financial_account_id_123/statements", + HttpMethod.Post, + "/v2/money_management/payout_methods/id_123/unarchive", (HttpStatusCode)200, - "{\"data\":[{\"object\":\"v2.money_management.financial_account_statement\",\"created\":\"1970-01-12T21:42:34.472Z\",\"ending_balance\":{\"key\":{\"currency\":\"USD\",\"value\":40}},\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"period\":{\"end_date\":\"end_date\",\"start_date\":\"start_date\"},\"starting_balance\":{\"key\":{\"currency\":\"USD\",\"value\":33}},\"status\":\"active\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"object\":\"v2.money_management.payout_method\",\"available_payout_speeds\":[\"standard\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"restricted\":true,\"type\":\"bank_account\",\"usage_status\":{\"payments\":\"requires_action\",\"transfers\":\"invalid\"}}"); var client = new StripeClient(this.Requestor); - var service = client - .V2 - .MoneyManagement - .FinancialAccounts - .Statements; - Stripe.V2.StripeList financialAccountStatements = service - .List("financial_account_id_123"); + var service = client.V2.MoneyManagement.PayoutMethods; + Stripe.V2.MoneyManagement.PayoutMethod payoutMethod = service + .Unarchive("id_123"); this.AssertRequest( - HttpMethod.Get, - "/v2/money_management/financial_accounts/financial_account_id_123/statements"); + HttpMethod.Post, + "/v2/money_management/payout_methods/id_123/unarchive"); } [Fact] - public void TestV2MoneyManagementFinancialAccountsStatementGet2() + public async Task TestV2MoneyManagementPayoutMethodPost2Async() { this.StubRequest( - HttpMethod.Get, - "/v2/money_management/financial_accounts/financial_account_id_123/statements/id_123", + HttpMethod.Post, + "/v2/money_management/payout_methods/id_123/unarchive", (HttpStatusCode)200, - "{\"object\":\"v2.money_management.financial_account_statement\",\"created\":\"1970-01-12T21:42:34.472Z\",\"ending_balance\":{\"key\":{\"currency\":\"USD\",\"value\":40}},\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"period\":{\"end_date\":\"end_date\",\"start_date\":\"start_date\"},\"starting_balance\":{\"key\":{\"currency\":\"USD\",\"value\":33}},\"status\":\"active\"}"); + "{\"object\":\"v2.money_management.payout_method\",\"available_payout_speeds\":[\"standard\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"restricted\":true,\"type\":\"bank_account\",\"usage_status\":{\"payments\":\"requires_action\",\"transfers\":\"invalid\"}}"); var client = new StripeClient(this.Requestor); - var service = client - .V2 - .MoneyManagement - .FinancialAccounts - .Statements; - Stripe.V2.MoneyManagement.FinancialAccountStatement financialAccountStatement = service - .Get("financial_account_id_123", "id_123"); + var service = client.V2.MoneyManagement.PayoutMethods; + Stripe.V2.MoneyManagement.PayoutMethod payoutMethod = await service + .UnarchiveAsync("id_123"); this.AssertRequest( - HttpMethod.Get, - "/v2/money_management/financial_accounts/financial_account_id_123/statements/id_123"); + HttpMethod.Post, + "/v2/money_management/payout_methods/id_123/unarchive"); } [Fact] - public void TestV2MoneyManagementFinancialAddressGet() + public void TestV2MoneyManagementPayoutMethodsBankAccountSpecGet() { this.StubRequest( HttpMethod.Get, - "/v2/money_management/financial_addresses", + "/v2/money_management/payout_methods_bank_account_spec", (HttpStatusCode)200, - "{\"data\":[{\"object\":\"v2.money_management.financial_address\",\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"failed\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"object\":\"v2.money_management.payout_methods_bank_account_spec\",\"countries\":{\"key\":{\"fields\":[{\"local_name\":\"local_name\",\"local_name_human\":{\"content\":\"content\",\"localization_key\":\"localization_key\"},\"max_length\":1111390753,\"min_length\":711577229,\"placeholder\":\"placeholder\",\"stripe_name\":\"stripe_name\",\"validation_regex\":\"validation_regex\"}]}},\"livemode\":true}"); var client = new StripeClient(this.Requestor); - var service = client.V2.MoneyManagement.FinancialAddresses; - Stripe.V2.StripeList financialAddresses = service - .List(); + var service = client + .V2 + .MoneyManagement + .PayoutMethodsBankAccountSpec; + Stripe.V2.MoneyManagement.PayoutMethodsBankAccountSpec payoutMethodsBankAccountSpec = service + .Get(); this.AssertRequest( HttpMethod.Get, - "/v2/money_management/financial_addresses"); + "/v2/money_management/payout_methods_bank_account_spec"); } [Fact] - public void TestV2MoneyManagementFinancialAddressPost() + public async Task TestV2MoneyManagementPayoutMethodsBankAccountSpecGetAsync() { this.StubRequest( - HttpMethod.Post, - "/v2/money_management/financial_addresses", + HttpMethod.Get, + "/v2/money_management/payout_methods_bank_account_spec", (HttpStatusCode)200, - "{\"object\":\"v2.money_management.financial_address\",\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"failed\"}"); - var options = new Stripe.V2.MoneyManagement.FinancialAddressCreateOptions - { - FinancialAccount = "financial_account", - Type = "ca_bank_account", - }; + "{\"object\":\"v2.money_management.payout_methods_bank_account_spec\",\"countries\":{\"key\":{\"fields\":[{\"local_name\":\"local_name\",\"local_name_human\":{\"content\":\"content\",\"localization_key\":\"localization_key\"},\"max_length\":1111390753,\"min_length\":711577229,\"placeholder\":\"placeholder\",\"stripe_name\":\"stripe_name\",\"validation_regex\":\"validation_regex\"}]}},\"livemode\":true}"); var client = new StripeClient(this.Requestor); - var service = client.V2.MoneyManagement.FinancialAddresses; - Stripe.V2.MoneyManagement.FinancialAddress financialAddress = service - .Create(options); + var service = client + .V2 + .MoneyManagement + .PayoutMethodsBankAccountSpec; + Stripe.V2.MoneyManagement.PayoutMethodsBankAccountSpec payoutMethodsBankAccountSpec = await service + .GetAsync(); this.AssertRequest( - HttpMethod.Post, - "/v2/money_management/financial_addresses"); + HttpMethod.Get, + "/v2/money_management/payout_methods_bank_account_spec"); } [Fact] - public void TestV2MoneyManagementFinancialAddressGet2() + public void TestV2MoneyManagementReceivedCreditGet() { this.StubRequest( HttpMethod.Get, - "/v2/money_management/financial_addresses/id_123", + "/v2/money_management/received_credits", (HttpStatusCode)200, - "{\"object\":\"v2.money_management.financial_address\",\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"failed\"}"); + "{\"data\":[{\"object\":\"v2.money_management.received_credit\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"returned\",\"type\":\"balance_transfer\"}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.MoneyManagement.FinancialAddresses; - Stripe.V2.MoneyManagement.FinancialAddress financialAddress = service - .Get("id_123"); + var service = client.V2.MoneyManagement.ReceivedCredits; + Stripe.V2.StripeList receivedCredits = service + .List(); this.AssertRequest( HttpMethod.Get, - "/v2/money_management/financial_addresses/id_123"); + "/v2/money_management/received_credits"); } [Fact] - public void TestV2MoneyManagementInboundTransferGet() + public async Task TestV2MoneyManagementReceivedCreditGetAsync() { this.StubRequest( HttpMethod.Get, - "/v2/money_management/inbound_transfers", + "/v2/money_management/received_credits", (HttpStatusCode)200, - "{\"data\":[{\"object\":\"v2.money_management.inbound_transfer\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"payment_method\":{\"type\":\"type\"}},\"id\":\"obj_123\",\"livemode\":true,\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"financial_account\":\"financial_account\"},\"transfer_history\":[{\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"level\":\"canonical\",\"type\":\"bank_debit_failed\"}]}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"object\":\"v2.money_management.received_credit\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"returned\",\"type\":\"balance_transfer\"}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.MoneyManagement.InboundTransfers; - Stripe.V2.StripeList inboundTransfers = service - .List(); + var service = client.V2.MoneyManagement.ReceivedCredits; + Stripe.V2.StripeList receivedCredits = await service + .ListAsync(); this.AssertRequest( HttpMethod.Get, - "/v2/money_management/inbound_transfers"); + "/v2/money_management/received_credits"); } [Fact] - public void TestV2MoneyManagementInboundTransferPost() + public void TestV2MoneyManagementReceivedCreditGetAutoPaging() { this.StubRequest( - HttpMethod.Post, - "/v2/money_management/inbound_transfers", + HttpMethod.Get, + "/v2/money_management/received_credits", (HttpStatusCode)200, - "{\"object\":\"v2.money_management.inbound_transfer\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"payment_method\":{\"type\":\"type\"}},\"id\":\"obj_123\",\"livemode\":true,\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"financial_account\":\"financial_account\"},\"transfer_history\":[{\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"level\":\"canonical\",\"type\":\"bank_debit_failed\"}]}"); - var options = new Stripe.V2.MoneyManagement.InboundTransferCreateOptions - { - Amount = new Stripe.V2.Amount { Value = 96, Currency = "USD" }, - From = new Stripe.V2.MoneyManagement.InboundTransferCreateFromOptions - { - Currency = "usd", - PaymentMethod = "payment_method", - }, - To = new Stripe.V2.MoneyManagement.InboundTransferCreateToOptions - { - Currency = "usd", - FinancialAccount = "financial_account", - }, - }; + "{\"data\":[{\"object\":\"v2.money_management.received_credit\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"returned\",\"type\":\"balance_transfer\"}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.MoneyManagement.InboundTransfers; - Stripe.V2.MoneyManagement.InboundTransfer inboundTransfer = service - .Create(options); + var service = client.V2.MoneyManagement.ReceivedCredits; + var receivedCredit = service.ListAutoPaging().First(); this.AssertRequest( - HttpMethod.Post, - "/v2/money_management/inbound_transfers"); + HttpMethod.Get, + "/v2/money_management/received_credits"); } [Fact] - public void TestV2MoneyManagementInboundTransferGet2() + public async Task TestV2MoneyManagementReceivedCreditGetAutoPagingAsync() { this.StubRequest( HttpMethod.Get, - "/v2/money_management/inbound_transfers/id_123", + "/v2/money_management/received_credits", (HttpStatusCode)200, - "{\"object\":\"v2.money_management.inbound_transfer\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"payment_method\":{\"type\":\"type\"}},\"id\":\"obj_123\",\"livemode\":true,\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"financial_account\":\"financial_account\"},\"transfer_history\":[{\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"level\":\"canonical\",\"type\":\"bank_debit_failed\"}]}"); + "{\"data\":[{\"object\":\"v2.money_management.received_credit\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"returned\",\"type\":\"balance_transfer\"}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.MoneyManagement.InboundTransfers; - Stripe.V2.MoneyManagement.InboundTransfer inboundTransfer = service - .Get("id_123"); + var service = client.V2.MoneyManagement.ReceivedCredits; + var receivedCredit = await service.ListAutoPagingAsync() + .FirstAsync(); this.AssertRequest( HttpMethod.Get, - "/v2/money_management/inbound_transfers/id_123"); + "/v2/money_management/received_credits"); } [Fact] - public void TestV2MoneyManagementOutboundPaymentGet() + public void TestV2MoneyManagementReceivedCreditGet2() { this.StubRequest( HttpMethod.Get, - "/v2/money_management/outbound_payments", + "/v2/money_management/received_credits/id_123", (HttpStatusCode)200, - "{\"data\":[{\"object\":\"v2.money_management.outbound_payment\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"livemode\":true,\"recipient_notification\":{\"setting\":\"configured\"},\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"trace_id\":{\"status\":\"pending\"}}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"object\":\"v2.money_management.received_credit\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"returned\",\"type\":\"balance_transfer\"}"); var client = new StripeClient(this.Requestor); - var service = client.V2.MoneyManagement.OutboundPayments; - Stripe.V2.StripeList outboundPayments = service - .List(); + var service = client.V2.MoneyManagement.ReceivedCredits; + Stripe.V2.MoneyManagement.ReceivedCredit receivedCredit = service + .Get("id_123"); this.AssertRequest( HttpMethod.Get, - "/v2/money_management/outbound_payments"); + "/v2/money_management/received_credits/id_123"); } [Fact] - public void TestV2MoneyManagementOutboundPaymentPost() + public async Task TestV2MoneyManagementReceivedCreditGet2Async() { this.StubRequest( - HttpMethod.Post, - "/v2/money_management/outbound_payments", + HttpMethod.Get, + "/v2/money_management/received_credits/id_123", (HttpStatusCode)200, - "{\"object\":\"v2.money_management.outbound_payment\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"livemode\":true,\"recipient_notification\":{\"setting\":\"configured\"},\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"trace_id\":{\"status\":\"pending\"}}"); - var options = new Stripe.V2.MoneyManagement.OutboundPaymentCreateOptions - { - Amount = new Stripe.V2.Amount { Value = 96, Currency = "USD" }, - From = new Stripe.V2.MoneyManagement.OutboundPaymentCreateFromOptions - { - Currency = "usd", - FinancialAccount = "financial_account", - }, - To = new Stripe.V2.MoneyManagement.OutboundPaymentCreateToOptions - { - Currency = "usd", - PayoutMethod = "payout_method", - Recipient = "recipient", - }, - }; + "{\"object\":\"v2.money_management.received_credit\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"returned\",\"type\":\"balance_transfer\"}"); var client = new StripeClient(this.Requestor); - var service = client.V2.MoneyManagement.OutboundPayments; - Stripe.V2.MoneyManagement.OutboundPayment outboundPayment = service - .Create(options); + var service = client.V2.MoneyManagement.ReceivedCredits; + Stripe.V2.MoneyManagement.ReceivedCredit receivedCredit = await service + .GetAsync("id_123"); this.AssertRequest( - HttpMethod.Post, - "/v2/money_management/outbound_payments"); + HttpMethod.Get, + "/v2/money_management/received_credits/id_123"); } [Fact] - public void TestV2MoneyManagementOutboundPaymentGet2() + public void TestV2MoneyManagementReceivedDebitGet() { this.StubRequest( HttpMethod.Get, - "/v2/money_management/outbound_payments/id_123", + "/v2/money_management/received_debits", (HttpStatusCode)200, - "{\"object\":\"v2.money_management.outbound_payment\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"livemode\":true,\"recipient_notification\":{\"setting\":\"configured\"},\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"trace_id\":{\"status\":\"pending\"}}"); + "{\"data\":[{\"object\":\"v2.money_management.received_debit\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"canceled\",\"type\":\"balance_transfer\"}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.MoneyManagement.OutboundPayments; - Stripe.V2.MoneyManagement.OutboundPayment outboundPayment = service - .Get("id_123"); + var service = client.V2.MoneyManagement.ReceivedDebits; + Stripe.V2.StripeList receivedDebits = service + .List(); this.AssertRequest( HttpMethod.Get, - "/v2/money_management/outbound_payments/id_123"); + "/v2/money_management/received_debits"); } [Fact] - public void TestV2MoneyManagementOutboundPaymentPost2() + public async Task TestV2MoneyManagementReceivedDebitGetAsync() { this.StubRequest( - HttpMethod.Post, - "/v2/money_management/outbound_payments/id_123/cancel", + HttpMethod.Get, + "/v2/money_management/received_debits", (HttpStatusCode)200, - "{\"object\":\"v2.money_management.outbound_payment\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"livemode\":true,\"recipient_notification\":{\"setting\":\"configured\"},\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"trace_id\":{\"status\":\"pending\"}}"); + "{\"data\":[{\"object\":\"v2.money_management.received_debit\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"canceled\",\"type\":\"balance_transfer\"}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.MoneyManagement.OutboundPayments; - Stripe.V2.MoneyManagement.OutboundPayment outboundPayment = service - .Cancel("id_123"); + var service = client.V2.MoneyManagement.ReceivedDebits; + Stripe.V2.StripeList receivedDebits = await service + .ListAsync(); this.AssertRequest( - HttpMethod.Post, - "/v2/money_management/outbound_payments/id_123/cancel"); + HttpMethod.Get, + "/v2/money_management/received_debits"); } [Fact] - public void TestV2MoneyManagementOutboundPaymentQuotePost() + public void TestV2MoneyManagementReceivedDebitGetAutoPaging() { this.StubRequest( - HttpMethod.Post, - "/v2/money_management/outbound_payment_quotes", + HttpMethod.Get, + "/v2/money_management/received_debits", (HttpStatusCode)200, - "{\"object\":\"v2.money_management.outbound_payment_quote\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"estimated_fees\":[{\"amount\":{\"currency\":\"USD\",\"value\":96},\"type\":\"next_day_payout_fee\"}],\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"fx_quote\":{\"lock_duration\":\"five_minutes\",\"lock_status\":\"active\",\"rates\":{\"key\":{\"exchange_rate\":\"exchange_rate\"}},\"to_currency\":\"usd\"},\"id\":\"obj_123\",\"livemode\":true,\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"}}"); - var options = new Stripe.V2.MoneyManagement.OutboundPaymentQuoteCreateOptions - { - Amount = new Stripe.V2.Amount { Value = 96, Currency = "USD" }, - From = new Stripe.V2.MoneyManagement.OutboundPaymentQuoteCreateFromOptions - { - Currency = "usd", - FinancialAccount = "financial_account", - }, - To = new Stripe.V2.MoneyManagement.OutboundPaymentQuoteCreateToOptions - { - Currency = "usd", - PayoutMethod = "payout_method", - Recipient = "recipient", - }, - }; + "{\"data\":[{\"object\":\"v2.money_management.received_debit\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"canceled\",\"type\":\"balance_transfer\"}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.MoneyManagement.OutboundPaymentQuotes; - Stripe.V2.MoneyManagement.OutboundPaymentQuote outboundPaymentQuote = service - .Create(options); + var service = client.V2.MoneyManagement.ReceivedDebits; + var receivedDebit = service.ListAutoPaging().First(); this.AssertRequest( - HttpMethod.Post, - "/v2/money_management/outbound_payment_quotes"); + HttpMethod.Get, + "/v2/money_management/received_debits"); } [Fact] - public void TestV2MoneyManagementOutboundPaymentQuoteGet() + public async Task TestV2MoneyManagementReceivedDebitGetAutoPagingAsync() { this.StubRequest( HttpMethod.Get, - "/v2/money_management/outbound_payment_quotes/id_123", + "/v2/money_management/received_debits", (HttpStatusCode)200, - "{\"object\":\"v2.money_management.outbound_payment_quote\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"estimated_fees\":[{\"amount\":{\"currency\":\"USD\",\"value\":96},\"type\":\"next_day_payout_fee\"}],\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"fx_quote\":{\"lock_duration\":\"five_minutes\",\"lock_status\":\"active\",\"rates\":{\"key\":{\"exchange_rate\":\"exchange_rate\"}},\"to_currency\":\"usd\"},\"id\":\"obj_123\",\"livemode\":true,\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"}}"); + "{\"data\":[{\"object\":\"v2.money_management.received_debit\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"canceled\",\"type\":\"balance_transfer\"}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.MoneyManagement.OutboundPaymentQuotes; - Stripe.V2.MoneyManagement.OutboundPaymentQuote outboundPaymentQuote = service - .Get("id_123"); + var service = client.V2.MoneyManagement.ReceivedDebits; + var receivedDebit = await service.ListAutoPagingAsync() + .FirstAsync(); this.AssertRequest( HttpMethod.Get, - "/v2/money_management/outbound_payment_quotes/id_123"); + "/v2/money_management/received_debits"); } [Fact] - public void TestV2MoneyManagementOutboundSetupIntentGet() + public void TestV2MoneyManagementReceivedDebitGet2() { this.StubRequest( HttpMethod.Get, - "/v2/money_management/outbound_setup_intents", + "/v2/money_management/received_debits/id_123", (HttpStatusCode)200, - "{\"data\":[{\"object\":\"v2.money_management.outbound_setup_intent\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"payout_method\":{\"object\":\"v2.money_management.payout_method\",\"available_payout_speeds\":[\"standard\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"restricted\":true,\"type\":\"bank_account\",\"usage_status\":{\"payments\":\"requires_action\",\"transfers\":\"invalid\"}},\"status\":\"requires_payout_method\",\"usage_intent\":\"payment\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"object\":\"v2.money_management.received_debit\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"canceled\",\"type\":\"balance_transfer\"}"); var client = new StripeClient(this.Requestor); - var service = client.V2.MoneyManagement.OutboundSetupIntents; - Stripe.V2.StripeList outboundSetupIntents = service - .List(); + var service = client.V2.MoneyManagement.ReceivedDebits; + Stripe.V2.MoneyManagement.ReceivedDebit receivedDebit = service.Get( + "id_123"); this.AssertRequest( HttpMethod.Get, - "/v2/money_management/outbound_setup_intents"); + "/v2/money_management/received_debits/id_123"); } [Fact] - public void TestV2MoneyManagementOutboundSetupIntentPost() + public async Task TestV2MoneyManagementReceivedDebitGet2Async() { this.StubRequest( - HttpMethod.Post, - "/v2/money_management/outbound_setup_intents", + HttpMethod.Get, + "/v2/money_management/received_debits/id_123", (HttpStatusCode)200, - "{\"object\":\"v2.money_management.outbound_setup_intent\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"payout_method\":{\"object\":\"v2.money_management.payout_method\",\"available_payout_speeds\":[\"standard\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"restricted\":true,\"type\":\"bank_account\",\"usage_status\":{\"payments\":\"requires_action\",\"transfers\":\"invalid\"}},\"status\":\"requires_payout_method\",\"usage_intent\":\"payment\"}"); - var options = new Stripe.V2.MoneyManagement.OutboundSetupIntentCreateOptions(); + "{\"object\":\"v2.money_management.received_debit\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"canceled\",\"type\":\"balance_transfer\"}"); var client = new StripeClient(this.Requestor); - var service = client.V2.MoneyManagement.OutboundSetupIntents; - Stripe.V2.MoneyManagement.OutboundSetupIntent outboundSetupIntent = service - .Create(options); + var service = client.V2.MoneyManagement.ReceivedDebits; + Stripe.V2.MoneyManagement.ReceivedDebit receivedDebit = await service + .GetAsync("id_123"); this.AssertRequest( - HttpMethod.Post, - "/v2/money_management/outbound_setup_intents"); + HttpMethod.Get, + "/v2/money_management/received_debits/id_123"); } [Fact] - public void TestV2MoneyManagementOutboundSetupIntentGet2() + public void TestV2MoneyManagementRecipientVerificationPost() { this.StubRequest( - HttpMethod.Get, - "/v2/money_management/outbound_setup_intents/id_123", + HttpMethod.Post, + "/v2/money_management/recipient_verifications", (HttpStatusCode)200, - "{\"object\":\"v2.money_management.outbound_setup_intent\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"payout_method\":{\"object\":\"v2.money_management.payout_method\",\"available_payout_speeds\":[\"standard\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"restricted\":true,\"type\":\"bank_account\",\"usage_status\":{\"payments\":\"requires_action\",\"transfers\":\"invalid\"}},\"status\":\"requires_payout_method\",\"usage_intent\":\"payment\"}"); + "{\"object\":\"v2.money_management.recipient_verification\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"match_result\":\"unavailable\",\"match_result_details\":{\"message\":\"message\",\"provided_name\":\"provided_name\"},\"status\":\"acknowledged\"}"); + var options = new Stripe.V2.MoneyManagement.RecipientVerificationCreateOptions + { + PayoutMethod = "payout_method", + }; var client = new StripeClient(this.Requestor); - var service = client.V2.MoneyManagement.OutboundSetupIntents; - Stripe.V2.MoneyManagement.OutboundSetupIntent outboundSetupIntent = service - .Get("id_123"); + var service = client.V2.MoneyManagement.RecipientVerifications; + Stripe.V2.MoneyManagement.RecipientVerification recipientVerification = service + .Create(options); this.AssertRequest( - HttpMethod.Get, - "/v2/money_management/outbound_setup_intents/id_123"); + HttpMethod.Post, + "/v2/money_management/recipient_verifications"); } [Fact] - public void TestV2MoneyManagementOutboundSetupIntentPost2() + public async Task TestV2MoneyManagementRecipientVerificationPostAsync() { this.StubRequest( HttpMethod.Post, - "/v2/money_management/outbound_setup_intents/id_123", + "/v2/money_management/recipient_verifications", (HttpStatusCode)200, - "{\"object\":\"v2.money_management.outbound_setup_intent\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"payout_method\":{\"object\":\"v2.money_management.payout_method\",\"available_payout_speeds\":[\"standard\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"restricted\":true,\"type\":\"bank_account\",\"usage_status\":{\"payments\":\"requires_action\",\"transfers\":\"invalid\"}},\"status\":\"requires_payout_method\",\"usage_intent\":\"payment\"}"); - var options = new Stripe.V2.MoneyManagement.OutboundSetupIntentUpdateOptions(); + "{\"object\":\"v2.money_management.recipient_verification\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"match_result\":\"unavailable\",\"match_result_details\":{\"message\":\"message\",\"provided_name\":\"provided_name\"},\"status\":\"acknowledged\"}"); + var options = new Stripe.V2.MoneyManagement.RecipientVerificationCreateOptions + { + PayoutMethod = "payout_method", + }; var client = new StripeClient(this.Requestor); - var service = client.V2.MoneyManagement.OutboundSetupIntents; - Stripe.V2.MoneyManagement.OutboundSetupIntent outboundSetupIntent = service - .Update("id_123", options); + var service = client.V2.MoneyManagement.RecipientVerifications; + Stripe.V2.MoneyManagement.RecipientVerification recipientVerification = await service + .CreateAsync(options); this.AssertRequest( HttpMethod.Post, - "/v2/money_management/outbound_setup_intents/id_123"); + "/v2/money_management/recipient_verifications"); } [Fact] - public void TestV2MoneyManagementOutboundSetupIntentPost3() + public void TestV2MoneyManagementRecipientVerificationGet() { this.StubRequest( - HttpMethod.Post, - "/v2/money_management/outbound_setup_intents/id_123/cancel", + HttpMethod.Get, + "/v2/money_management/recipient_verifications/id_123", (HttpStatusCode)200, - "{\"object\":\"v2.money_management.outbound_setup_intent\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"payout_method\":{\"object\":\"v2.money_management.payout_method\",\"available_payout_speeds\":[\"standard\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"restricted\":true,\"type\":\"bank_account\",\"usage_status\":{\"payments\":\"requires_action\",\"transfers\":\"invalid\"}},\"status\":\"requires_payout_method\",\"usage_intent\":\"payment\"}"); + "{\"object\":\"v2.money_management.recipient_verification\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"match_result\":\"unavailable\",\"match_result_details\":{\"message\":\"message\",\"provided_name\":\"provided_name\"},\"status\":\"acknowledged\"}"); var client = new StripeClient(this.Requestor); - var service = client.V2.MoneyManagement.OutboundSetupIntents; - Stripe.V2.MoneyManagement.OutboundSetupIntent outboundSetupIntent = service - .Cancel("id_123"); + var service = client.V2.MoneyManagement.RecipientVerifications; + Stripe.V2.MoneyManagement.RecipientVerification recipientVerification = service + .Get("id_123"); this.AssertRequest( - HttpMethod.Post, - "/v2/money_management/outbound_setup_intents/id_123/cancel"); + HttpMethod.Get, + "/v2/money_management/recipient_verifications/id_123"); } [Fact] - public void TestV2MoneyManagementOutboundTransferGet() + public async Task TestV2MoneyManagementRecipientVerificationGetAsync() { this.StubRequest( HttpMethod.Get, - "/v2/money_management/outbound_transfers", + "/v2/money_management/recipient_verifications/id_123", (HttpStatusCode)200, - "{\"data\":[{\"object\":\"v2.money_management.outbound_transfer\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"livemode\":true,\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\"},\"trace_id\":{\"status\":\"pending\"}}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"object\":\"v2.money_management.recipient_verification\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"match_result\":\"unavailable\",\"match_result_details\":{\"message\":\"message\",\"provided_name\":\"provided_name\"},\"status\":\"acknowledged\"}"); var client = new StripeClient(this.Requestor); - var service = client.V2.MoneyManagement.OutboundTransfers; - Stripe.V2.StripeList outboundTransfers = service - .List(); + var service = client.V2.MoneyManagement.RecipientVerifications; + Stripe.V2.MoneyManagement.RecipientVerification recipientVerification = await service + .GetAsync("id_123"); this.AssertRequest( HttpMethod.Get, - "/v2/money_management/outbound_transfers"); + "/v2/money_management/recipient_verifications/id_123"); } [Fact] - public void TestV2MoneyManagementOutboundTransferPost() + public void TestV2MoneyManagementRecipientVerificationPost2() { this.StubRequest( HttpMethod.Post, - "/v2/money_management/outbound_transfers", + "/v2/money_management/recipient_verifications/id_123/acknowledge", (HttpStatusCode)200, - "{\"object\":\"v2.money_management.outbound_transfer\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"livemode\":true,\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\"},\"trace_id\":{\"status\":\"pending\"}}"); - var options = new Stripe.V2.MoneyManagement.OutboundTransferCreateOptions - { - Amount = new Stripe.V2.Amount { Value = 96, Currency = "USD" }, - From = new Stripe.V2.MoneyManagement.OutboundTransferCreateFromOptions - { - Currency = "usd", - FinancialAccount = "financial_account", - }, - To = new Stripe.V2.MoneyManagement.OutboundTransferCreateToOptions - { - Currency = "usd", - PayoutMethod = "payout_method", - }, - }; + "{\"object\":\"v2.money_management.recipient_verification\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"match_result\":\"unavailable\",\"match_result_details\":{\"message\":\"message\",\"provided_name\":\"provided_name\"},\"status\":\"acknowledged\"}"); var client = new StripeClient(this.Requestor); - var service = client.V2.MoneyManagement.OutboundTransfers; - Stripe.V2.MoneyManagement.OutboundTransfer outboundTransfer = service - .Create(options); + var service = client.V2.MoneyManagement.RecipientVerifications; + Stripe.V2.MoneyManagement.RecipientVerification recipientVerification = service + .Acknowledge("id_123"); this.AssertRequest( HttpMethod.Post, - "/v2/money_management/outbound_transfers"); + "/v2/money_management/recipient_verifications/id_123/acknowledge"); } [Fact] - public void TestV2MoneyManagementOutboundTransferGet2() + public async Task TestV2MoneyManagementRecipientVerificationPost2Async() { this.StubRequest( - HttpMethod.Get, - "/v2/money_management/outbound_transfers/id_123", + HttpMethod.Post, + "/v2/money_management/recipient_verifications/id_123/acknowledge", (HttpStatusCode)200, - "{\"object\":\"v2.money_management.outbound_transfer\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"livemode\":true,\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\"},\"trace_id\":{\"status\":\"pending\"}}"); + "{\"object\":\"v2.money_management.recipient_verification\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"match_result\":\"unavailable\",\"match_result_details\":{\"message\":\"message\",\"provided_name\":\"provided_name\"},\"status\":\"acknowledged\"}"); var client = new StripeClient(this.Requestor); - var service = client.V2.MoneyManagement.OutboundTransfers; - Stripe.V2.MoneyManagement.OutboundTransfer outboundTransfer = service - .Get("id_123"); + var service = client.V2.MoneyManagement.RecipientVerifications; + Stripe.V2.MoneyManagement.RecipientVerification recipientVerification = await service + .AcknowledgeAsync("id_123"); this.AssertRequest( - HttpMethod.Get, - "/v2/money_management/outbound_transfers/id_123"); + HttpMethod.Post, + "/v2/money_management/recipient_verifications/id_123/acknowledge"); } [Fact] - public void TestV2MoneyManagementOutboundTransferPost2() + public void TestV2MoneyManagementTransactionGet() { this.StubRequest( - HttpMethod.Post, - "/v2/money_management/outbound_transfers/id_123/cancel", + HttpMethod.Get, + "/v2/money_management/transactions", (HttpStatusCode)200, - "{\"object\":\"v2.money_management.outbound_transfer\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"livemode\":true,\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\"},\"trace_id\":{\"status\":\"pending\"}}"); + "{\"data\":[{\"object\":\"v2.money_management.transaction\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"balance_impact\":{\"available\":{\"currency\":\"USD\",\"value\":35},\"inbound_pending\":{\"currency\":\"USD\",\"value\":11},\"outbound_pending\":{\"currency\":\"USD\",\"value\":60}},\"category\":\"inbound_transfer_reversal\",\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"pending\",\"status_transitions\":{}}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.MoneyManagement.OutboundTransfers; - Stripe.V2.MoneyManagement.OutboundTransfer outboundTransfer = service - .Cancel("id_123"); + var service = client.V2.MoneyManagement.Transactions; + Stripe.V2.StripeList transactions = service + .List(); this.AssertRequest( - HttpMethod.Post, - "/v2/money_management/outbound_transfers/id_123/cancel"); + HttpMethod.Get, + "/v2/money_management/transactions"); } [Fact] - public void TestV2MoneyManagementPayoutMethodGet() + public async Task TestV2MoneyManagementTransactionGetAsync() { this.StubRequest( HttpMethod.Get, - "/v2/money_management/payout_methods", + "/v2/money_management/transactions", (HttpStatusCode)200, - "{\"data\":[{\"object\":\"v2.money_management.payout_method\",\"available_payout_speeds\":[\"standard\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"restricted\":true,\"type\":\"bank_account\",\"usage_status\":{\"payments\":\"requires_action\",\"transfers\":\"invalid\"}}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"object\":\"v2.money_management.transaction\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"balance_impact\":{\"available\":{\"currency\":\"USD\",\"value\":35},\"inbound_pending\":{\"currency\":\"USD\",\"value\":11},\"outbound_pending\":{\"currency\":\"USD\",\"value\":60}},\"category\":\"inbound_transfer_reversal\",\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"pending\",\"status_transitions\":{}}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.MoneyManagement.PayoutMethods; - Stripe.V2.StripeList payoutMethods = service - .List(); + var service = client.V2.MoneyManagement.Transactions; + Stripe.V2.StripeList transactions = await service + .ListAsync(); this.AssertRequest( HttpMethod.Get, - "/v2/money_management/payout_methods"); + "/v2/money_management/transactions"); } [Fact] - public void TestV2MoneyManagementPayoutMethodGet2() + public void TestV2MoneyManagementTransactionGetAutoPaging() { this.StubRequest( HttpMethod.Get, - "/v2/money_management/payout_methods/id_123", + "/v2/money_management/transactions", (HttpStatusCode)200, - "{\"object\":\"v2.money_management.payout_method\",\"available_payout_speeds\":[\"standard\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"restricted\":true,\"type\":\"bank_account\",\"usage_status\":{\"payments\":\"requires_action\",\"transfers\":\"invalid\"}}"); + "{\"data\":[{\"object\":\"v2.money_management.transaction\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"balance_impact\":{\"available\":{\"currency\":\"USD\",\"value\":35},\"inbound_pending\":{\"currency\":\"USD\",\"value\":11},\"outbound_pending\":{\"currency\":\"USD\",\"value\":60}},\"category\":\"inbound_transfer_reversal\",\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"pending\",\"status_transitions\":{}}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.MoneyManagement.PayoutMethods; - Stripe.V2.MoneyManagement.PayoutMethod payoutMethod = service.Get( - "id_123"); + var service = client.V2.MoneyManagement.Transactions; + var transaction = service.ListAutoPaging().First(); this.AssertRequest( HttpMethod.Get, - "/v2/money_management/payout_methods/id_123"); + "/v2/money_management/transactions"); } [Fact] - public void TestV2MoneyManagementPayoutMethodPost() + public async Task TestV2MoneyManagementTransactionGetAutoPagingAsync() { this.StubRequest( - HttpMethod.Post, - "/v2/money_management/payout_methods/id_123/archive", + HttpMethod.Get, + "/v2/money_management/transactions", (HttpStatusCode)200, - "{\"object\":\"v2.money_management.payout_method\",\"available_payout_speeds\":[\"standard\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"restricted\":true,\"type\":\"bank_account\",\"usage_status\":{\"payments\":\"requires_action\",\"transfers\":\"invalid\"}}"); + "{\"data\":[{\"object\":\"v2.money_management.transaction\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"balance_impact\":{\"available\":{\"currency\":\"USD\",\"value\":35},\"inbound_pending\":{\"currency\":\"USD\",\"value\":11},\"outbound_pending\":{\"currency\":\"USD\",\"value\":60}},\"category\":\"inbound_transfer_reversal\",\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"pending\",\"status_transitions\":{}}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.MoneyManagement.PayoutMethods; - Stripe.V2.MoneyManagement.PayoutMethod payoutMethod = service - .Archive("id_123"); + var service = client.V2.MoneyManagement.Transactions; + var transaction = await service.ListAutoPagingAsync().FirstAsync(); this.AssertRequest( - HttpMethod.Post, - "/v2/money_management/payout_methods/id_123/archive"); + HttpMethod.Get, + "/v2/money_management/transactions"); } [Fact] - public void TestV2MoneyManagementPayoutMethodPost2() + public void TestV2MoneyManagementTransactionGet2() { this.StubRequest( - HttpMethod.Post, - "/v2/money_management/payout_methods/id_123/unarchive", + HttpMethod.Get, + "/v2/money_management/transactions/id_123", (HttpStatusCode)200, - "{\"object\":\"v2.money_management.payout_method\",\"available_payout_speeds\":[\"standard\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"restricted\":true,\"type\":\"bank_account\",\"usage_status\":{\"payments\":\"requires_action\",\"transfers\":\"invalid\"}}"); + "{\"object\":\"v2.money_management.transaction\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"balance_impact\":{\"available\":{\"currency\":\"USD\",\"value\":35},\"inbound_pending\":{\"currency\":\"USD\",\"value\":11},\"outbound_pending\":{\"currency\":\"USD\",\"value\":60}},\"category\":\"inbound_transfer_reversal\",\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"pending\",\"status_transitions\":{}}"); var client = new StripeClient(this.Requestor); - var service = client.V2.MoneyManagement.PayoutMethods; - Stripe.V2.MoneyManagement.PayoutMethod payoutMethod = service - .Unarchive("id_123"); + var service = client.V2.MoneyManagement.Transactions; + Stripe.V2.MoneyManagement.Transaction transaction = service.Get( + "id_123"); this.AssertRequest( - HttpMethod.Post, - "/v2/money_management/payout_methods/id_123/unarchive"); + HttpMethod.Get, + "/v2/money_management/transactions/id_123"); } [Fact] - public void TestV2MoneyManagementPayoutMethodsBankAccountSpecGet() + public async Task TestV2MoneyManagementTransactionGet2Async() { this.StubRequest( HttpMethod.Get, - "/v2/money_management/payout_methods_bank_account_spec", + "/v2/money_management/transactions/id_123", (HttpStatusCode)200, - "{\"object\":\"v2.money_management.payout_methods_bank_account_spec\",\"countries\":{\"key\":{\"fields\":[{\"local_name\":\"local_name\",\"local_name_human\":{\"content\":\"content\",\"localization_key\":\"localization_key\"},\"max_length\":1111390753,\"min_length\":711577229,\"placeholder\":\"placeholder\",\"stripe_name\":\"stripe_name\",\"validation_regex\":\"validation_regex\"}]}},\"livemode\":true}"); + "{\"object\":\"v2.money_management.transaction\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"balance_impact\":{\"available\":{\"currency\":\"USD\",\"value\":35},\"inbound_pending\":{\"currency\":\"USD\",\"value\":11},\"outbound_pending\":{\"currency\":\"USD\",\"value\":60}},\"category\":\"inbound_transfer_reversal\",\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"pending\",\"status_transitions\":{}}"); var client = new StripeClient(this.Requestor); - var service = client - .V2 - .MoneyManagement - .PayoutMethodsBankAccountSpec; - Stripe.V2.MoneyManagement.PayoutMethodsBankAccountSpec payoutMethodsBankAccountSpec = service - .Get(); + var service = client.V2.MoneyManagement.Transactions; + Stripe.V2.MoneyManagement.Transaction transaction = await service + .GetAsync("id_123"); this.AssertRequest( HttpMethod.Get, - "/v2/money_management/payout_methods_bank_account_spec"); + "/v2/money_management/transactions/id_123"); } [Fact] - public void TestV2MoneyManagementReceivedCreditGet() + public void TestV2MoneyManagementTransactionEntryGet() { this.StubRequest( HttpMethod.Get, - "/v2/money_management/received_credits", + "/v2/money_management/transaction_entries", (HttpStatusCode)200, - "{\"data\":[{\"object\":\"v2.money_management.received_credit\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"returned\",\"type\":\"balance_transfer\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"object\":\"v2.money_management.transaction_entry\",\"balance_impact\":{\"available\":{\"currency\":\"USD\",\"value\":35},\"inbound_pending\":{\"currency\":\"USD\",\"value\":11},\"outbound_pending\":{\"currency\":\"USD\",\"value\":60}},\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"livemode\":true,\"transaction\":\"transaction\",\"transaction_details\":{\"category\":\"inbound_transfer_reversal\",\"financial_account\":\"financial_account\"}}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.MoneyManagement.ReceivedCredits; - Stripe.V2.StripeList receivedCredits = service + var service = client.V2.MoneyManagement.TransactionEntries; + Stripe.V2.StripeList transactionEntries = service .List(); this.AssertRequest( HttpMethod.Get, - "/v2/money_management/received_credits"); + "/v2/money_management/transaction_entries"); } [Fact] - public void TestV2MoneyManagementReceivedCreditGet2() + public async Task TestV2MoneyManagementTransactionEntryGetAsync() { this.StubRequest( HttpMethod.Get, - "/v2/money_management/received_credits/id_123", + "/v2/money_management/transaction_entries", (HttpStatusCode)200, - "{\"object\":\"v2.money_management.received_credit\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"returned\",\"type\":\"balance_transfer\"}"); + "{\"data\":[{\"object\":\"v2.money_management.transaction_entry\",\"balance_impact\":{\"available\":{\"currency\":\"USD\",\"value\":35},\"inbound_pending\":{\"currency\":\"USD\",\"value\":11},\"outbound_pending\":{\"currency\":\"USD\",\"value\":60}},\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"livemode\":true,\"transaction\":\"transaction\",\"transaction_details\":{\"category\":\"inbound_transfer_reversal\",\"financial_account\":\"financial_account\"}}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.MoneyManagement.ReceivedCredits; - Stripe.V2.MoneyManagement.ReceivedCredit receivedCredit = service - .Get("id_123"); + var service = client.V2.MoneyManagement.TransactionEntries; + Stripe.V2.StripeList transactionEntries = await service + .ListAsync(); this.AssertRequest( HttpMethod.Get, - "/v2/money_management/received_credits/id_123"); + "/v2/money_management/transaction_entries"); } [Fact] - public void TestV2MoneyManagementReceivedDebitGet() + public void TestV2MoneyManagementTransactionEntryGetAutoPaging() { this.StubRequest( HttpMethod.Get, - "/v2/money_management/received_debits", + "/v2/money_management/transaction_entries", (HttpStatusCode)200, - "{\"data\":[{\"object\":\"v2.money_management.received_debit\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"canceled\",\"type\":\"balance_transfer\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"object\":\"v2.money_management.transaction_entry\",\"balance_impact\":{\"available\":{\"currency\":\"USD\",\"value\":35},\"inbound_pending\":{\"currency\":\"USD\",\"value\":11},\"outbound_pending\":{\"currency\":\"USD\",\"value\":60}},\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"livemode\":true,\"transaction\":\"transaction\",\"transaction_details\":{\"category\":\"inbound_transfer_reversal\",\"financial_account\":\"financial_account\"}}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.MoneyManagement.ReceivedDebits; - Stripe.V2.StripeList receivedDebits = service - .List(); + var service = client.V2.MoneyManagement.TransactionEntries; + var transactionEntry = service.ListAutoPaging().First(); this.AssertRequest( HttpMethod.Get, - "/v2/money_management/received_debits"); + "/v2/money_management/transaction_entries"); } [Fact] - public void TestV2MoneyManagementReceivedDebitGet2() + public async Task TestV2MoneyManagementTransactionEntryGetAutoPagingAsync() { this.StubRequest( HttpMethod.Get, - "/v2/money_management/received_debits/id_123", + "/v2/money_management/transaction_entries", (HttpStatusCode)200, - "{\"object\":\"v2.money_management.received_debit\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"canceled\",\"type\":\"balance_transfer\"}"); + "{\"data\":[{\"object\":\"v2.money_management.transaction_entry\",\"balance_impact\":{\"available\":{\"currency\":\"USD\",\"value\":35},\"inbound_pending\":{\"currency\":\"USD\",\"value\":11},\"outbound_pending\":{\"currency\":\"USD\",\"value\":60}},\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"livemode\":true,\"transaction\":\"transaction\",\"transaction_details\":{\"category\":\"inbound_transfer_reversal\",\"financial_account\":\"financial_account\"}}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.MoneyManagement.ReceivedDebits; - Stripe.V2.MoneyManagement.ReceivedDebit receivedDebit = service.Get( - "id_123"); + var service = client.V2.MoneyManagement.TransactionEntries; + var transactionEntry = await service.ListAutoPagingAsync() + .FirstAsync(); this.AssertRequest( HttpMethod.Get, - "/v2/money_management/received_debits/id_123"); + "/v2/money_management/transaction_entries"); } [Fact] - public void TestV2MoneyManagementRecipientVerificationPost() + public void TestV2MoneyManagementTransactionEntryGet2() { this.StubRequest( - HttpMethod.Post, - "/v2/money_management/recipient_verifications", + HttpMethod.Get, + "/v2/money_management/transaction_entries/id_123", (HttpStatusCode)200, - "{\"object\":\"v2.money_management.recipient_verification\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"match_result\":\"unavailable\",\"match_result_details\":{\"message\":\"message\",\"provided_name\":\"provided_name\"},\"status\":\"acknowledged\"}"); - var options = new Stripe.V2.MoneyManagement.RecipientVerificationCreateOptions - { - PayoutMethod = "payout_method", - }; + "{\"object\":\"v2.money_management.transaction_entry\",\"balance_impact\":{\"available\":{\"currency\":\"USD\",\"value\":35},\"inbound_pending\":{\"currency\":\"USD\",\"value\":11},\"outbound_pending\":{\"currency\":\"USD\",\"value\":60}},\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"livemode\":true,\"transaction\":\"transaction\",\"transaction_details\":{\"category\":\"inbound_transfer_reversal\",\"financial_account\":\"financial_account\"}}"); var client = new StripeClient(this.Requestor); - var service = client.V2.MoneyManagement.RecipientVerifications; - Stripe.V2.MoneyManagement.RecipientVerification recipientVerification = service - .Create(options); + var service = client.V2.MoneyManagement.TransactionEntries; + Stripe.V2.MoneyManagement.TransactionEntry transactionEntry = service + .Get("id_123"); this.AssertRequest( - HttpMethod.Post, - "/v2/money_management/recipient_verifications"); + HttpMethod.Get, + "/v2/money_management/transaction_entries/id_123"); } [Fact] - public void TestV2MoneyManagementRecipientVerificationGet() + public async Task TestV2MoneyManagementTransactionEntryGet2Async() { this.StubRequest( HttpMethod.Get, - "/v2/money_management/recipient_verifications/id_123", + "/v2/money_management/transaction_entries/id_123", (HttpStatusCode)200, - "{\"object\":\"v2.money_management.recipient_verification\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"match_result\":\"unavailable\",\"match_result_details\":{\"message\":\"message\",\"provided_name\":\"provided_name\"},\"status\":\"acknowledged\"}"); + "{\"object\":\"v2.money_management.transaction_entry\",\"balance_impact\":{\"available\":{\"currency\":\"USD\",\"value\":35},\"inbound_pending\":{\"currency\":\"USD\",\"value\":11},\"outbound_pending\":{\"currency\":\"USD\",\"value\":60}},\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"livemode\":true,\"transaction\":\"transaction\",\"transaction_details\":{\"category\":\"inbound_transfer_reversal\",\"financial_account\":\"financial_account\"}}"); var client = new StripeClient(this.Requestor); - var service = client.V2.MoneyManagement.RecipientVerifications; - Stripe.V2.MoneyManagement.RecipientVerification recipientVerification = service - .Get("id_123"); + var service = client.V2.MoneyManagement.TransactionEntries; + Stripe.V2.MoneyManagement.TransactionEntry transactionEntry = await service + .GetAsync("id_123"); this.AssertRequest( HttpMethod.Get, - "/v2/money_management/recipient_verifications/id_123"); + "/v2/money_management/transaction_entries/id_123"); } [Fact] - public void TestV2MoneyManagementRecipientVerificationPost2() + public void TestV2NetworkBusinessProfileGet() { this.StubRequest( - HttpMethod.Post, - "/v2/money_management/recipient_verifications/id_123/acknowledge", + HttpMethod.Get, + "/v2/network/business_profiles/me", (HttpStatusCode)200, - "{\"object\":\"v2.money_management.recipient_verification\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"match_result\":\"unavailable\",\"match_result_details\":{\"message\":\"message\",\"provided_name\":\"provided_name\"},\"status\":\"acknowledged\"}"); + "{\"object\":\"v2.network.business_profile\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true,\"username\":\"username\"}"); var client = new StripeClient(this.Requestor); - var service = client.V2.MoneyManagement.RecipientVerifications; - Stripe.V2.MoneyManagement.RecipientVerification recipientVerification = service - .Acknowledge("id_123"); + var service = client.V2.Network.BusinessProfiles; + Stripe.V2.Network.BusinessProfile businessProfile = service.Me(); this.AssertRequest( - HttpMethod.Post, - "/v2/money_management/recipient_verifications/id_123/acknowledge"); + HttpMethod.Get, + "/v2/network/business_profiles/me"); } [Fact] - public void TestV2MoneyManagementTransactionGet() + public async Task TestV2NetworkBusinessProfileGetAsync() { this.StubRequest( HttpMethod.Get, - "/v2/money_management/transactions", + "/v2/network/business_profiles/me", (HttpStatusCode)200, - "{\"data\":[{\"object\":\"v2.money_management.transaction\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"balance_impact\":{\"available\":{\"currency\":\"USD\",\"value\":35},\"inbound_pending\":{\"currency\":\"USD\",\"value\":11},\"outbound_pending\":{\"currency\":\"USD\",\"value\":60}},\"category\":\"inbound_transfer_reversal\",\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"pending\",\"status_transitions\":{}}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"object\":\"v2.network.business_profile\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true,\"username\":\"username\"}"); var client = new StripeClient(this.Requestor); - var service = client.V2.MoneyManagement.Transactions; - Stripe.V2.StripeList transactions = service - .List(); + var service = client.V2.Network.BusinessProfiles; + Stripe.V2.Network.BusinessProfile businessProfile = await service + .MeAsync(); this.AssertRequest( HttpMethod.Get, - "/v2/money_management/transactions"); + "/v2/network/business_profiles/me"); } [Fact] - public void TestV2MoneyManagementTransactionGet2() + public void TestV2NetworkBusinessProfileGet2() { this.StubRequest( HttpMethod.Get, - "/v2/money_management/transactions/id_123", + "/v2/network/business_profiles/id_123", (HttpStatusCode)200, - "{\"object\":\"v2.money_management.transaction\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"balance_impact\":{\"available\":{\"currency\":\"USD\",\"value\":35},\"inbound_pending\":{\"currency\":\"USD\",\"value\":11},\"outbound_pending\":{\"currency\":\"USD\",\"value\":60}},\"category\":\"inbound_transfer_reversal\",\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"pending\",\"status_transitions\":{}}"); + "{\"object\":\"v2.network.business_profile\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true,\"username\":\"username\"}"); var client = new StripeClient(this.Requestor); - var service = client.V2.MoneyManagement.Transactions; - Stripe.V2.MoneyManagement.Transaction transaction = service.Get( + var service = client.V2.Network.BusinessProfiles; + Stripe.V2.Network.BusinessProfile businessProfile = service.Get( "id_123"); this.AssertRequest( HttpMethod.Get, - "/v2/money_management/transactions/id_123"); + "/v2/network/business_profiles/id_123"); } [Fact] - public void TestV2MoneyManagementTransactionEntryGet() + public async Task TestV2NetworkBusinessProfileGet2Async() { this.StubRequest( HttpMethod.Get, - "/v2/money_management/transaction_entries", + "/v2/network/business_profiles/id_123", (HttpStatusCode)200, - "{\"data\":[{\"object\":\"v2.money_management.transaction_entry\",\"balance_impact\":{\"available\":{\"currency\":\"USD\",\"value\":35},\"inbound_pending\":{\"currency\":\"USD\",\"value\":11},\"outbound_pending\":{\"currency\":\"USD\",\"value\":60}},\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"livemode\":true,\"transaction\":\"transaction\",\"transaction_details\":{\"category\":\"inbound_transfer_reversal\",\"financial_account\":\"financial_account\"}}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"object\":\"v2.network.business_profile\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true,\"username\":\"username\"}"); var client = new StripeClient(this.Requestor); - var service = client.V2.MoneyManagement.TransactionEntries; - Stripe.V2.StripeList transactionEntries = service - .List(); + var service = client.V2.Network.BusinessProfiles; + Stripe.V2.Network.BusinessProfile businessProfile = await service + .GetAsync("id_123"); this.AssertRequest( HttpMethod.Get, - "/v2/money_management/transaction_entries"); + "/v2/network/business_profiles/id_123"); } [Fact] - public void TestV2MoneyManagementTransactionEntryGet2() + public void TestV2OrchestratedCommerceAgreementGet() { this.StubRequest( HttpMethod.Get, - "/v2/money_management/transaction_entries/id_123", + "/v2/orchestrated_commerce/agreements", (HttpStatusCode)200, - "{\"object\":\"v2.money_management.transaction_entry\",\"balance_impact\":{\"available\":{\"currency\":\"USD\",\"value\":35},\"inbound_pending\":{\"currency\":\"USD\",\"value\":11},\"outbound_pending\":{\"currency\":\"USD\",\"value\":60}},\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"livemode\":true,\"transaction\":\"transaction\",\"transaction_details\":{\"category\":\"inbound_transfer_reversal\",\"financial_account\":\"financial_account\"}}"); + "{\"data\":[{\"object\":\"v2.orchestrated_commerce.agreement\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"initiated_by\":\"seller\",\"livemode\":true,\"orchestrator_details\":{\"name\":\"name\",\"network_business_profile\":\"network_business_profile\"},\"seller_details\":{\"network_business_profile\":\"network_business_profile\"},\"status\":\"partially_confirmed\",\"status_transitions\":{}}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.MoneyManagement.TransactionEntries; - Stripe.V2.MoneyManagement.TransactionEntry transactionEntry = service - .Get("id_123"); + var service = client.V2.OrchestratedCommerce.Agreements; + Stripe.V2.StripeList agreements = service + .List(); this.AssertRequest( HttpMethod.Get, - "/v2/money_management/transaction_entries/id_123"); + "/v2/orchestrated_commerce/agreements"); } [Fact] - public void TestV2NetworkBusinessProfileGet() + public async Task TestV2OrchestratedCommerceAgreementGetAsync() { this.StubRequest( HttpMethod.Get, - "/v2/network/business_profiles/me", + "/v2/orchestrated_commerce/agreements", (HttpStatusCode)200, - "{\"object\":\"v2.network.business_profile\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true,\"username\":\"username\"}"); + "{\"data\":[{\"object\":\"v2.orchestrated_commerce.agreement\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"initiated_by\":\"seller\",\"livemode\":true,\"orchestrator_details\":{\"name\":\"name\",\"network_business_profile\":\"network_business_profile\"},\"seller_details\":{\"network_business_profile\":\"network_business_profile\"},\"status\":\"partially_confirmed\",\"status_transitions\":{}}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Network.BusinessProfiles; - Stripe.V2.Network.BusinessProfile businessProfile = service.Me(); + var service = client.V2.OrchestratedCommerce.Agreements; + Stripe.V2.StripeList agreements = await service + .ListAsync(); this.AssertRequest( HttpMethod.Get, - "/v2/network/business_profiles/me"); + "/v2/orchestrated_commerce/agreements"); } [Fact] - public void TestV2NetworkBusinessProfileGet2() + public void TestV2OrchestratedCommerceAgreementGetAutoPaging() { this.StubRequest( HttpMethod.Get, - "/v2/network/business_profiles/id_123", + "/v2/orchestrated_commerce/agreements", (HttpStatusCode)200, - "{\"object\":\"v2.network.business_profile\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true,\"username\":\"username\"}"); + "{\"data\":[{\"object\":\"v2.orchestrated_commerce.agreement\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"initiated_by\":\"seller\",\"livemode\":true,\"orchestrator_details\":{\"name\":\"name\",\"network_business_profile\":\"network_business_profile\"},\"seller_details\":{\"network_business_profile\":\"network_business_profile\"},\"status\":\"partially_confirmed\",\"status_transitions\":{}}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Network.BusinessProfiles; - Stripe.V2.Network.BusinessProfile businessProfile = service.Get( - "id_123"); + var service = client.V2.OrchestratedCommerce.Agreements; + var agreement = service.ListAutoPaging().First(); this.AssertRequest( HttpMethod.Get, - "/v2/network/business_profiles/id_123"); + "/v2/orchestrated_commerce/agreements"); } [Fact] - public void TestV2OrchestratedCommerceAgreementGet() + public async Task TestV2OrchestratedCommerceAgreementGetAutoPagingAsync() { this.StubRequest( HttpMethod.Get, @@ -10982,8 +26594,7 @@ public void TestV2OrchestratedCommerceAgreementGet() "{\"data\":[{\"object\":\"v2.orchestrated_commerce.agreement\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"initiated_by\":\"seller\",\"livemode\":true,\"orchestrator_details\":{\"name\":\"name\",\"network_business_profile\":\"network_business_profile\"},\"seller_details\":{\"network_business_profile\":\"network_business_profile\"},\"status\":\"partially_confirmed\",\"status_transitions\":{}}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); var service = client.V2.OrchestratedCommerce.Agreements; - Stripe.V2.StripeList agreements = service - .List(); + var agreement = await service.ListAutoPagingAsync().FirstAsync(); this.AssertRequest( HttpMethod.Get, "/v2/orchestrated_commerce/agreements"); @@ -11010,6 +26621,27 @@ public void TestV2OrchestratedCommerceAgreementPost() "/v2/orchestrated_commerce/agreements"); } + [Fact] + public async Task TestV2OrchestratedCommerceAgreementPostAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/orchestrated_commerce/agreements", + (HttpStatusCode)200, + "{\"object\":\"v2.orchestrated_commerce.agreement\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"initiated_by\":\"seller\",\"livemode\":true,\"orchestrator_details\":{\"name\":\"name\",\"network_business_profile\":\"network_business_profile\"},\"seller_details\":{\"network_business_profile\":\"network_business_profile\"},\"status\":\"partially_confirmed\",\"status_transitions\":{}}"); + var options = new Stripe.V2.OrchestratedCommerce.AgreementCreateOptions + { + Orchestrator = "orchestrator", + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.OrchestratedCommerce.Agreements; + Stripe.V2.OrchestratedCommerce.Agreement agreement = await service + .CreateAsync(options); + this.AssertRequest( + HttpMethod.Post, + "/v2/orchestrated_commerce/agreements"); + } + [Fact] public void TestV2OrchestratedCommerceAgreementGet2() { @@ -11027,6 +26659,23 @@ public void TestV2OrchestratedCommerceAgreementGet2() "/v2/orchestrated_commerce/agreements/id_123"); } + [Fact] + public async Task TestV2OrchestratedCommerceAgreementGet2Async() + { + this.StubRequest( + HttpMethod.Get, + "/v2/orchestrated_commerce/agreements/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.orchestrated_commerce.agreement\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"initiated_by\":\"seller\",\"livemode\":true,\"orchestrator_details\":{\"name\":\"name\",\"network_business_profile\":\"network_business_profile\"},\"seller_details\":{\"network_business_profile\":\"network_business_profile\"},\"status\":\"partially_confirmed\",\"status_transitions\":{}}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.OrchestratedCommerce.Agreements; + Stripe.V2.OrchestratedCommerce.Agreement agreement = await service + .GetAsync("id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/orchestrated_commerce/agreements/id_123"); + } + [Fact] public void TestV2OrchestratedCommerceAgreementPost2() { @@ -11044,6 +26693,23 @@ public void TestV2OrchestratedCommerceAgreementPost2() "/v2/orchestrated_commerce/agreements/id_123/confirm"); } + [Fact] + public async Task TestV2OrchestratedCommerceAgreementPost2Async() + { + this.StubRequest( + HttpMethod.Post, + "/v2/orchestrated_commerce/agreements/id_123/confirm", + (HttpStatusCode)200, + "{\"object\":\"v2.orchestrated_commerce.agreement\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"initiated_by\":\"seller\",\"livemode\":true,\"orchestrator_details\":{\"name\":\"name\",\"network_business_profile\":\"network_business_profile\"},\"seller_details\":{\"network_business_profile\":\"network_business_profile\"},\"status\":\"partially_confirmed\",\"status_transitions\":{}}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.OrchestratedCommerce.Agreements; + Stripe.V2.OrchestratedCommerce.Agreement agreement = await service + .ConfirmAsync("id_123"); + this.AssertRequest( + HttpMethod.Post, + "/v2/orchestrated_commerce/agreements/id_123/confirm"); + } + [Fact] public void TestV2OrchestratedCommerceAgreementPost3() { @@ -11061,6 +26727,23 @@ public void TestV2OrchestratedCommerceAgreementPost3() "/v2/orchestrated_commerce/agreements/id_123/terminate"); } + [Fact] + public async Task TestV2OrchestratedCommerceAgreementPost3Async() + { + this.StubRequest( + HttpMethod.Post, + "/v2/orchestrated_commerce/agreements/id_123/terminate", + (HttpStatusCode)200, + "{\"object\":\"v2.orchestrated_commerce.agreement\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"initiated_by\":\"seller\",\"livemode\":true,\"orchestrator_details\":{\"name\":\"name\",\"network_business_profile\":\"network_business_profile\"},\"seller_details\":{\"network_business_profile\":\"network_business_profile\"},\"status\":\"partially_confirmed\",\"status_transitions\":{}}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.OrchestratedCommerce.Agreements; + Stripe.V2.OrchestratedCommerce.Agreement agreement = await service + .TerminateAsync("id_123"); + this.AssertRequest( + HttpMethod.Post, + "/v2/orchestrated_commerce/agreements/id_123/terminate"); + } + [Fact] public void TestV2PaymentsOffSessionPaymentGet() { @@ -11078,6 +26761,56 @@ public void TestV2PaymentsOffSessionPaymentGet() "/v2/payments/off_session_payments"); } + [Fact] + public async Task TestV2PaymentsOffSessionPaymentGetAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/payments/off_session_payments", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.payments.off_session_payment\",\"amount_requested\":{\"currency\":\"USD\",\"value\":47},\"cadence\":\"unscheduled\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"payment_method\":\"payment_method\",\"payments_orchestration\":{\"enabled\":true},\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"scheduled\"},\"status\":\"requires_capture\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Payments.OffSessionPayments; + Stripe.V2.StripeList offSessionPayments = await service + .ListAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v2/payments/off_session_payments"); + } + + [Fact] + public void TestV2PaymentsOffSessionPaymentGetAutoPaging() + { + this.StubRequest( + HttpMethod.Get, + "/v2/payments/off_session_payments", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.payments.off_session_payment\",\"amount_requested\":{\"currency\":\"USD\",\"value\":47},\"cadence\":\"unscheduled\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"payment_method\":\"payment_method\",\"payments_orchestration\":{\"enabled\":true},\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"scheduled\"},\"status\":\"requires_capture\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Payments.OffSessionPayments; + var offSessionPayment = service.ListAutoPaging().First(); + this.AssertRequest( + HttpMethod.Get, + "/v2/payments/off_session_payments"); + } + + [Fact] + public async Task TestV2PaymentsOffSessionPaymentGetAutoPagingAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/payments/off_session_payments", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.payments.off_session_payment\",\"amount_requested\":{\"currency\":\"USD\",\"value\":47},\"cadence\":\"unscheduled\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"payment_method\":\"payment_method\",\"payments_orchestration\":{\"enabled\":true},\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"scheduled\"},\"status\":\"requires_capture\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Payments.OffSessionPayments; + var offSessionPayment = await service.ListAutoPagingAsync() + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v2/payments/off_session_payments"); + } + [Fact] public void TestV2PaymentsOffSessionPaymentPost() { @@ -11101,6 +26834,29 @@ public void TestV2PaymentsOffSessionPaymentPost() "/v2/payments/off_session_payments"); } + [Fact] + public async Task TestV2PaymentsOffSessionPaymentPostAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/payments/off_session_payments", + (HttpStatusCode)200, + "{\"object\":\"v2.payments.off_session_payment\",\"amount_requested\":{\"currency\":\"USD\",\"value\":47},\"cadence\":\"unscheduled\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"payment_method\":\"payment_method\",\"payments_orchestration\":{\"enabled\":true},\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"scheduled\"},\"status\":\"requires_capture\"}"); + var options = new Stripe.V2.Payments.OffSessionPaymentCreateOptions + { + Amount = new Stripe.V2.Amount { Value = 96, Currency = "USD" }, + Cadence = "unscheduled", + Customer = "customer", + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Payments.OffSessionPayments; + Stripe.V2.Payments.OffSessionPayment offSessionPayment = await service + .CreateAsync(options); + this.AssertRequest( + HttpMethod.Post, + "/v2/payments/off_session_payments"); + } + [Fact] public void TestV2PaymentsOffSessionPaymentGet2() { @@ -11118,6 +26874,23 @@ public void TestV2PaymentsOffSessionPaymentGet2() "/v2/payments/off_session_payments/id_123"); } + [Fact] + public async Task TestV2PaymentsOffSessionPaymentGet2Async() + { + this.StubRequest( + HttpMethod.Get, + "/v2/payments/off_session_payments/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.payments.off_session_payment\",\"amount_requested\":{\"currency\":\"USD\",\"value\":47},\"cadence\":\"unscheduled\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"payment_method\":\"payment_method\",\"payments_orchestration\":{\"enabled\":true},\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"scheduled\"},\"status\":\"requires_capture\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Payments.OffSessionPayments; + Stripe.V2.Payments.OffSessionPayment offSessionPayment = await service + .GetAsync("id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/payments/off_session_payments/id_123"); + } + [Fact] public void TestV2PaymentsOffSessionPaymentPost2() { @@ -11135,42 +26908,110 @@ public void TestV2PaymentsOffSessionPaymentPost2() "/v2/payments/off_session_payments/id_123/cancel"); } + [Fact] + public async Task TestV2PaymentsOffSessionPaymentPost2Async() + { + this.StubRequest( + HttpMethod.Post, + "/v2/payments/off_session_payments/id_123/cancel", + (HttpStatusCode)200, + "{\"object\":\"v2.payments.off_session_payment\",\"amount_requested\":{\"currency\":\"USD\",\"value\":47},\"cadence\":\"unscheduled\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"payment_method\":\"payment_method\",\"payments_orchestration\":{\"enabled\":true},\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"scheduled\"},\"status\":\"requires_capture\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Payments.OffSessionPayments; + Stripe.V2.Payments.OffSessionPayment offSessionPayment = await service + .CancelAsync("id_123"); + this.AssertRequest( + HttpMethod.Post, + "/v2/payments/off_session_payments/id_123/cancel"); + } + [Fact] public void TestV2PaymentsOffSessionPaymentPost3() { this.StubRequest( HttpMethod.Post, - "/v2/payments/off_session_payments/id_123/capture", + "/v2/payments/off_session_payments/id_123/capture", + (HttpStatusCode)200, + "{\"object\":\"v2.payments.off_session_payment\",\"amount_requested\":{\"currency\":\"USD\",\"value\":47},\"cadence\":\"unscheduled\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"payment_method\":\"payment_method\",\"payments_orchestration\":{\"enabled\":true},\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"scheduled\"},\"status\":\"requires_capture\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Payments.OffSessionPayments; + Stripe.V2.Payments.OffSessionPayment offSessionPayment = service + .Capture("id_123"); + this.AssertRequest( + HttpMethod.Post, + "/v2/payments/off_session_payments/id_123/capture"); + } + + [Fact] + public async Task TestV2PaymentsOffSessionPaymentPost3Async() + { + this.StubRequest( + HttpMethod.Post, + "/v2/payments/off_session_payments/id_123/capture", + (HttpStatusCode)200, + "{\"object\":\"v2.payments.off_session_payment\",\"amount_requested\":{\"currency\":\"USD\",\"value\":47},\"cadence\":\"unscheduled\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"payment_method\":\"payment_method\",\"payments_orchestration\":{\"enabled\":true},\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"scheduled\"},\"status\":\"requires_capture\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Payments.OffSessionPayments; + Stripe.V2.Payments.OffSessionPayment offSessionPayment = await service + .CaptureAsync("id_123"); + this.AssertRequest( + HttpMethod.Post, + "/v2/payments/off_session_payments/id_123/capture"); + } + + [Fact] + public void TestV2PaymentsOffSessionPaymentPost4() + { + this.StubRequest( + HttpMethod.Post, + "/v2/payments/off_session_payments/id_123/pause", + (HttpStatusCode)200, + "{\"object\":\"v2.payments.off_session_payment\",\"amount_requested\":{\"currency\":\"USD\",\"value\":47},\"cadence\":\"unscheduled\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"payment_method\":\"payment_method\",\"payments_orchestration\":{\"enabled\":true},\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"scheduled\"},\"status\":\"requires_capture\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Payments.OffSessionPayments; + Stripe.V2.Payments.OffSessionPayment offSessionPayment = service + .Pause("id_123"); + this.AssertRequest( + HttpMethod.Post, + "/v2/payments/off_session_payments/id_123/pause"); + } + + [Fact] + public async Task TestV2PaymentsOffSessionPaymentPost4Async() + { + this.StubRequest( + HttpMethod.Post, + "/v2/payments/off_session_payments/id_123/pause", (HttpStatusCode)200, "{\"object\":\"v2.payments.off_session_payment\",\"amount_requested\":{\"currency\":\"USD\",\"value\":47},\"cadence\":\"unscheduled\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"payment_method\":\"payment_method\",\"payments_orchestration\":{\"enabled\":true},\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"scheduled\"},\"status\":\"requires_capture\"}"); var client = new StripeClient(this.Requestor); var service = client.V2.Payments.OffSessionPayments; - Stripe.V2.Payments.OffSessionPayment offSessionPayment = service - .Capture("id_123"); + Stripe.V2.Payments.OffSessionPayment offSessionPayment = await service + .PauseAsync("id_123"); this.AssertRequest( HttpMethod.Post, - "/v2/payments/off_session_payments/id_123/capture"); + "/v2/payments/off_session_payments/id_123/pause"); } [Fact] - public void TestV2PaymentsOffSessionPaymentPost4() + public void TestV2PaymentsOffSessionPaymentPost5() { this.StubRequest( HttpMethod.Post, - "/v2/payments/off_session_payments/id_123/pause", + "/v2/payments/off_session_payments/id_123/resume", (HttpStatusCode)200, "{\"object\":\"v2.payments.off_session_payment\",\"amount_requested\":{\"currency\":\"USD\",\"value\":47},\"cadence\":\"unscheduled\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"payment_method\":\"payment_method\",\"payments_orchestration\":{\"enabled\":true},\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"scheduled\"},\"status\":\"requires_capture\"}"); var client = new StripeClient(this.Requestor); var service = client.V2.Payments.OffSessionPayments; Stripe.V2.Payments.OffSessionPayment offSessionPayment = service - .Pause("id_123"); + .Resume("id_123"); this.AssertRequest( HttpMethod.Post, - "/v2/payments/off_session_payments/id_123/pause"); + "/v2/payments/off_session_payments/id_123/resume"); } [Fact] - public void TestV2PaymentsOffSessionPaymentPost5() + public async Task TestV2PaymentsOffSessionPaymentPost5Async() { this.StubRequest( HttpMethod.Post, @@ -11179,8 +27020,8 @@ public void TestV2PaymentsOffSessionPaymentPost5() "{\"object\":\"v2.payments.off_session_payment\",\"amount_requested\":{\"currency\":\"USD\",\"value\":47},\"cadence\":\"unscheduled\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"payment_method\":\"payment_method\",\"payments_orchestration\":{\"enabled\":true},\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"scheduled\"},\"status\":\"requires_capture\"}"); var client = new StripeClient(this.Requestor); var service = client.V2.Payments.OffSessionPayments; - Stripe.V2.Payments.OffSessionPayment offSessionPayment = service - .Resume("id_123"); + Stripe.V2.Payments.OffSessionPayment offSessionPayment = await service + .ResumeAsync("id_123"); this.AssertRequest( HttpMethod.Post, "/v2/payments/off_session_payments/id_123/resume"); @@ -11203,6 +27044,56 @@ public void TestV2PaymentsSettlementAllocationIntentGet() "/v2/payments/settlement_allocation_intents"); } + [Fact] + public async Task TestV2PaymentsSettlementAllocationIntentGetAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/payments/settlement_allocation_intents", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.payments.settlement_allocation_intent\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"expected_settlement_date\":\"1970-01-22T14:14:13.629Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"linked_credits\":[\"linked_credits\"],\"livemode\":true,\"reference\":\"reference\",\"status\":\"canceled\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Payments.SettlementAllocationIntents; + Stripe.V2.StripeList settlementAllocationIntents = await service + .ListAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v2/payments/settlement_allocation_intents"); + } + + [Fact] + public void TestV2PaymentsSettlementAllocationIntentGetAutoPaging() + { + this.StubRequest( + HttpMethod.Get, + "/v2/payments/settlement_allocation_intents", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.payments.settlement_allocation_intent\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"expected_settlement_date\":\"1970-01-22T14:14:13.629Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"linked_credits\":[\"linked_credits\"],\"livemode\":true,\"reference\":\"reference\",\"status\":\"canceled\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Payments.SettlementAllocationIntents; + var settlementAllocationIntent = service.ListAutoPaging().First(); + this.AssertRequest( + HttpMethod.Get, + "/v2/payments/settlement_allocation_intents"); + } + + [Fact] + public async Task TestV2PaymentsSettlementAllocationIntentGetAutoPagingAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/payments/settlement_allocation_intents", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.payments.settlement_allocation_intent\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"expected_settlement_date\":\"1970-01-22T14:14:13.629Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"linked_credits\":[\"linked_credits\"],\"livemode\":true,\"reference\":\"reference\",\"status\":\"canceled\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Payments.SettlementAllocationIntents; + var settlementAllocationIntent = await service.ListAutoPagingAsync() + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v2/payments/settlement_allocation_intents"); + } + [Fact] public void TestV2PaymentsSettlementAllocationIntentPost() { @@ -11229,6 +27120,32 @@ public void TestV2PaymentsSettlementAllocationIntentPost() "/v2/payments/settlement_allocation_intents"); } + [Fact] + public async Task TestV2PaymentsSettlementAllocationIntentPostAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/payments/settlement_allocation_intents", + (HttpStatusCode)200, + "{\"object\":\"v2.payments.settlement_allocation_intent\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"expected_settlement_date\":\"1970-01-22T14:14:13.629Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"linked_credits\":[\"linked_credits\"],\"livemode\":true,\"reference\":\"reference\",\"status\":\"canceled\"}"); + var options = new Stripe.V2.Payments.SettlementAllocationIntentCreateOptions + { + Amount = new Stripe.V2.Amount { Value = 96, Currency = "USD" }, + ExpectedSettlementDate = DateTimeOffset.Parse( + "1970-01-22T14:14:13.629Z") + .UtcDateTime, + FinancialAccount = "financial_account", + Reference = "reference", + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Payments.SettlementAllocationIntents; + Stripe.V2.Payments.SettlementAllocationIntent settlementAllocationIntent = await service + .CreateAsync(options); + this.AssertRequest( + HttpMethod.Post, + "/v2/payments/settlement_allocation_intents"); + } + [Fact] public void TestV2PaymentsSettlementAllocationIntentGet2() { @@ -11246,6 +27163,23 @@ public void TestV2PaymentsSettlementAllocationIntentGet2() "/v2/payments/settlement_allocation_intents/id_123"); } + [Fact] + public async Task TestV2PaymentsSettlementAllocationIntentGet2Async() + { + this.StubRequest( + HttpMethod.Get, + "/v2/payments/settlement_allocation_intents/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.payments.settlement_allocation_intent\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"expected_settlement_date\":\"1970-01-22T14:14:13.629Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"linked_credits\":[\"linked_credits\"],\"livemode\":true,\"reference\":\"reference\",\"status\":\"canceled\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Payments.SettlementAllocationIntents; + Stripe.V2.Payments.SettlementAllocationIntent settlementAllocationIntent = await service + .GetAsync("id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/payments/settlement_allocation_intents/id_123"); + } + [Fact] public void TestV2PaymentsSettlementAllocationIntentPost2() { @@ -11264,6 +27198,24 @@ public void TestV2PaymentsSettlementAllocationIntentPost2() "/v2/payments/settlement_allocation_intents/id_123"); } + [Fact] + public async Task TestV2PaymentsSettlementAllocationIntentPost2Async() + { + this.StubRequest( + HttpMethod.Post, + "/v2/payments/settlement_allocation_intents/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.payments.settlement_allocation_intent\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"expected_settlement_date\":\"1970-01-22T14:14:13.629Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"linked_credits\":[\"linked_credits\"],\"livemode\":true,\"reference\":\"reference\",\"status\":\"canceled\"}"); + var options = new Stripe.V2.Payments.SettlementAllocationIntentUpdateOptions(); + var client = new StripeClient(this.Requestor); + var service = client.V2.Payments.SettlementAllocationIntents; + Stripe.V2.Payments.SettlementAllocationIntent settlementAllocationIntent = await service + .UpdateAsync("id_123", options); + this.AssertRequest( + HttpMethod.Post, + "/v2/payments/settlement_allocation_intents/id_123"); + } + [Fact] public void TestV2PaymentsSettlementAllocationIntentPost3() { @@ -11281,6 +27233,23 @@ public void TestV2PaymentsSettlementAllocationIntentPost3() "/v2/payments/settlement_allocation_intents/id_123/cancel"); } + [Fact] + public async Task TestV2PaymentsSettlementAllocationIntentPost3Async() + { + this.StubRequest( + HttpMethod.Post, + "/v2/payments/settlement_allocation_intents/id_123/cancel", + (HttpStatusCode)200, + "{\"object\":\"v2.payments.settlement_allocation_intent\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"expected_settlement_date\":\"1970-01-22T14:14:13.629Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"linked_credits\":[\"linked_credits\"],\"livemode\":true,\"reference\":\"reference\",\"status\":\"canceled\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Payments.SettlementAllocationIntents; + Stripe.V2.Payments.SettlementAllocationIntent settlementAllocationIntent = await service + .CancelAsync("id_123"); + this.AssertRequest( + HttpMethod.Post, + "/v2/payments/settlement_allocation_intents/id_123/cancel"); + } + [Fact] public void TestV2PaymentsSettlementAllocationIntentPost4() { @@ -11298,6 +27267,23 @@ public void TestV2PaymentsSettlementAllocationIntentPost4() "/v2/payments/settlement_allocation_intents/id_123/submit"); } + [Fact] + public async Task TestV2PaymentsSettlementAllocationIntentPost4Async() + { + this.StubRequest( + HttpMethod.Post, + "/v2/payments/settlement_allocation_intents/id_123/submit", + (HttpStatusCode)200, + "{\"object\":\"v2.payments.settlement_allocation_intent\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"expected_settlement_date\":\"1970-01-22T14:14:13.629Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"linked_credits\":[\"linked_credits\"],\"livemode\":true,\"reference\":\"reference\",\"status\":\"canceled\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Payments.SettlementAllocationIntents; + Stripe.V2.Payments.SettlementAllocationIntent settlementAllocationIntent = await service + .SubmitAsync("id_123"); + this.AssertRequest( + HttpMethod.Post, + "/v2/payments/settlement_allocation_intents/id_123/submit"); + } + [Fact] public void TestV2PaymentsSettlementAllocationIntentsSplitGet() { @@ -11315,6 +27301,59 @@ public void TestV2PaymentsSettlementAllocationIntentsSplitGet() "/v2/payments/settlement_allocation_intents/settlement_allocation_intent_id_123/splits"); } + [Fact] + public async Task TestV2PaymentsSettlementAllocationIntentsSplitGetAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/payments/settlement_allocation_intents/settlement_allocation_intent_id_123/splits", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.payments.settlement_allocation_intent_split\",\"account\":\"account\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"settlement_allocation_intent\":\"settlement_allocation_intent\",\"status\":\"canceled\",\"type\":\"credit\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Payments.SettlementAllocationIntents.Splits; + Stripe.V2.StripeList settlementAllocationIntentSplits = await service + .ListAsync("settlement_allocation_intent_id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/payments/settlement_allocation_intents/settlement_allocation_intent_id_123/splits"); + } + + [Fact] + public void TestV2PaymentsSettlementAllocationIntentsSplitGetAutoPaging() + { + this.StubRequest( + HttpMethod.Get, + "/v2/payments/settlement_allocation_intents/settlement_allocation_intent_id_123/splits", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.payments.settlement_allocation_intent_split\",\"account\":\"account\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"settlement_allocation_intent\":\"settlement_allocation_intent\",\"status\":\"canceled\",\"type\":\"credit\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Payments.SettlementAllocationIntents.Splits; + var settlementAllocationIntentSplit = service.ListAutoPaging( + "settlement_allocation_intent_id_123") + .First(); + this.AssertRequest( + HttpMethod.Get, + "/v2/payments/settlement_allocation_intents/settlement_allocation_intent_id_123/splits"); + } + + [Fact] + public async Task TestV2PaymentsSettlementAllocationIntentsSplitGetAutoPagingAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/payments/settlement_allocation_intents/settlement_allocation_intent_id_123/splits", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.payments.settlement_allocation_intent_split\",\"account\":\"account\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"settlement_allocation_intent\":\"settlement_allocation_intent\",\"status\":\"canceled\",\"type\":\"credit\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Payments.SettlementAllocationIntents.Splits; + var settlementAllocationIntentSplit = await service + .ListAutoPagingAsync("settlement_allocation_intent_id_123") + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v2/payments/settlement_allocation_intents/settlement_allocation_intent_id_123/splits"); + } + [Fact] public void TestV2PaymentsSettlementAllocationIntentsSplitPost() { @@ -11338,6 +27377,29 @@ public void TestV2PaymentsSettlementAllocationIntentsSplitPost() "/v2/payments/settlement_allocation_intents/settlement_allocation_intent_id_123/splits"); } + [Fact] + public async Task TestV2PaymentsSettlementAllocationIntentsSplitPostAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/payments/settlement_allocation_intents/settlement_allocation_intent_id_123/splits", + (HttpStatusCode)200, + "{\"object\":\"v2.payments.settlement_allocation_intent_split\",\"account\":\"account\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"settlement_allocation_intent\":\"settlement_allocation_intent\",\"status\":\"canceled\",\"type\":\"credit\"}"); + var options = new Stripe.V2.Payments.SettlementAllocationIntents.SplitCreateOptions + { + Account = "account", + Amount = new Stripe.V2.Amount { Value = 96, Currency = "USD" }, + Type = "credit", + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Payments.SettlementAllocationIntents.Splits; + Stripe.V2.Payments.SettlementAllocationIntentSplit settlementAllocationIntentSplit = await service + .CreateAsync("settlement_allocation_intent_id_123", options); + this.AssertRequest( + HttpMethod.Post, + "/v2/payments/settlement_allocation_intents/settlement_allocation_intent_id_123/splits"); + } + [Fact] public void TestV2PaymentsSettlementAllocationIntentsSplitGet2() { @@ -11355,6 +27417,23 @@ public void TestV2PaymentsSettlementAllocationIntentsSplitGet2() "/v2/payments/settlement_allocation_intents/settlement_allocation_intent_id_123/splits/id_123"); } + [Fact] + public async Task TestV2PaymentsSettlementAllocationIntentsSplitGet2Async() + { + this.StubRequest( + HttpMethod.Get, + "/v2/payments/settlement_allocation_intents/settlement_allocation_intent_id_123/splits/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.payments.settlement_allocation_intent_split\",\"account\":\"account\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"settlement_allocation_intent\":\"settlement_allocation_intent\",\"status\":\"canceled\",\"type\":\"credit\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Payments.SettlementAllocationIntents.Splits; + Stripe.V2.Payments.SettlementAllocationIntentSplit settlementAllocationIntentSplit = await service + .GetAsync("settlement_allocation_intent_id_123", "id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/payments/settlement_allocation_intents/settlement_allocation_intent_id_123/splits/id_123"); + } + [Fact] public void TestV2PaymentsSettlementAllocationIntentsSplitPost2() { @@ -11372,6 +27451,23 @@ public void TestV2PaymentsSettlementAllocationIntentsSplitPost2() "/v2/payments/settlement_allocation_intents/settlement_allocation_intent_id_123/splits/id_123/cancel"); } + [Fact] + public async Task TestV2PaymentsSettlementAllocationIntentsSplitPost2Async() + { + this.StubRequest( + HttpMethod.Post, + "/v2/payments/settlement_allocation_intents/settlement_allocation_intent_id_123/splits/id_123/cancel", + (HttpStatusCode)200, + "{\"object\":\"v2.payments.settlement_allocation_intent_split\",\"account\":\"account\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"settlement_allocation_intent\":\"settlement_allocation_intent\",\"status\":\"canceled\",\"type\":\"credit\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Payments.SettlementAllocationIntents.Splits; + Stripe.V2.Payments.SettlementAllocationIntentSplit settlementAllocationIntentSplit = await service + .CancelAsync("settlement_allocation_intent_id_123", "id_123"); + this.AssertRequest( + HttpMethod.Post, + "/v2/payments/settlement_allocation_intents/settlement_allocation_intent_id_123/splits/id_123/cancel"); + } + [Fact] public void TestV2ReportingReportGet() { @@ -11379,15 +27475,63 @@ public void TestV2ReportingReportGet() HttpMethod.Get, "/v2/reporting/reports/id_123", (HttpStatusCode)200, - "{\"object\":\"v2.reporting.report\",\"id\":\"obj_123\",\"livemode\":true,\"name\":\"name\",\"parameters\":{\"key\":{\"description\":\"description\",\"required\":true,\"type\":\"string\"}}}"); + "{\"object\":\"v2.reporting.report\",\"id\":\"obj_123\",\"livemode\":true,\"name\":\"name\",\"parameters\":{\"key\":{\"description\":\"description\",\"required\":true,\"type\":\"string\"}}}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Reporting.Reports; + Stripe.V2.Reporting.Report report = service.Get("id_123"); + this.AssertRequest(HttpMethod.Get, "/v2/reporting/reports/id_123"); + } + + [Fact] + public async Task TestV2ReportingReportGetAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/reporting/reports/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.reporting.report\",\"id\":\"obj_123\",\"livemode\":true,\"name\":\"name\",\"parameters\":{\"key\":{\"description\":\"description\",\"required\":true,\"type\":\"string\"}}}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Reporting.Reports; + Stripe.V2.Reporting.Report report = await service.GetAsync( + "id_123"); + this.AssertRequest(HttpMethod.Get, "/v2/reporting/reports/id_123"); + } + + [Fact] + public void TestV2ReportingReportRunPost() + { + this.StubRequest( + HttpMethod.Post, + "/v2/reporting/report_runs", + (HttpStatusCode)200, + "{\"object\":\"v2.reporting.report_run\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"report\":\"report\",\"report_name\":\"report_name\",\"report_parameters\":{\"int_key\":123,\"string_key\":\"value\",\"boolean_key\":true,\"object_key\":{\"object_int_key\":123,\"object_string_key\":\"value\",\"object_boolean_key\":true},\"array_key\":[1,2,3]},\"status\":\"failed\",\"status_details\":{\"key\":{}}}"); + var options = new Stripe.V2.Reporting.ReportRunCreateOptions + { + Report = "report", + ReportParameters = new Dictionary + { + { "int_key", 123 }, + { "string_key", "value" }, + { "boolean_key", true }, + { + "object_key", new Dictionary + { + { "object_int_key", 123 }, + { "object_string_key", "value" }, + { "object_boolean_key", true }, + } + }, + { "array_key", new List { 1, 2, 3 } }, + }, + }; var client = new StripeClient(this.Requestor); - var service = client.V2.Reporting.Reports; - Stripe.V2.Reporting.Report report = service.Get("id_123"); - this.AssertRequest(HttpMethod.Get, "/v2/reporting/reports/id_123"); + var service = client.V2.Reporting.ReportRuns; + Stripe.V2.Reporting.ReportRun reportRun = service.Create(options); + this.AssertRequest(HttpMethod.Post, "/v2/reporting/report_runs"); } [Fact] - public void TestV2ReportingReportRunPost() + public async Task TestV2ReportingReportRunPostAsync() { this.StubRequest( HttpMethod.Post, @@ -11415,7 +27559,8 @@ public void TestV2ReportingReportRunPost() }; var client = new StripeClient(this.Requestor); var service = client.V2.Reporting.ReportRuns; - Stripe.V2.Reporting.ReportRun reportRun = service.Create(options); + Stripe.V2.Reporting.ReportRun reportRun = await service.CreateAsync( + options); this.AssertRequest(HttpMethod.Post, "/v2/reporting/report_runs"); } @@ -11435,6 +27580,23 @@ public void TestV2ReportingReportRunGet() "/v2/reporting/report_runs/id_123"); } + [Fact] + public async Task TestV2ReportingReportRunGetAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/reporting/report_runs/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.reporting.report_run\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"report\":\"report\",\"report_name\":\"report_name\",\"report_parameters\":{\"int_key\":123,\"string_key\":\"value\",\"boolean_key\":true,\"object_key\":{\"object_int_key\":123,\"object_string_key\":\"value\",\"object_boolean_key\":true},\"array_key\":[1,2,3]},\"status\":\"failed\",\"status_details\":{\"key\":{}}}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Reporting.ReportRuns; + Stripe.V2.Reporting.ReportRun reportRun = await service.GetAsync( + "id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/reporting/report_runs/id_123"); + } + [Fact] public void TestV2SignalsAccountSignalGet() { @@ -11458,6 +27620,74 @@ public void TestV2SignalsAccountSignalGet() "type[0]=fraudulent_merchant"); } + [Fact] + public async Task TestV2SignalsAccountSignalGetAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/signals/account_signals", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.signals.account_signal\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"type\":\"fraudulent_merchant\"}],\"next_page_url\":null,\"previous_page_url\":null}", + "type[0]=fraudulent_merchant"); + var options = new Stripe.V2.Signals.AccountSignalListOptions + { + Type = new List { "fraudulent_merchant" }, + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Signals.AccountSignals; + Stripe.V2.StripeList accountSignals = await service + .ListAsync(options); + this.AssertRequest( + HttpMethod.Get, + "/v2/signals/account_signals", + "type[0]=fraudulent_merchant"); + } + + [Fact] + public void TestV2SignalsAccountSignalGetAutoPaging() + { + this.StubRequest( + HttpMethod.Get, + "/v2/signals/account_signals", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.signals.account_signal\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"type\":\"fraudulent_merchant\"}],\"next_page_url\":null,\"previous_page_url\":null}", + "type[0]=fraudulent_merchant"); + var options = new Stripe.V2.Signals.AccountSignalListOptions + { + Type = new List { "fraudulent_merchant" }, + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Signals.AccountSignals; + var accountSignal = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v2/signals/account_signals", + "type[0]=fraudulent_merchant"); + } + + [Fact] + public async Task TestV2SignalsAccountSignalGetAutoPagingAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/signals/account_signals", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.signals.account_signal\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"type\":\"fraudulent_merchant\"}],\"next_page_url\":null,\"previous_page_url\":null}", + "type[0]=fraudulent_merchant"); + var options = new Stripe.V2.Signals.AccountSignalListOptions + { + Type = new List { "fraudulent_merchant" }, + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Signals.AccountSignals; + var accountSignal = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v2/signals/account_signals", + "type[0]=fraudulent_merchant"); + } + [Fact] public void TestV2SignalsAccountSignalGet2() { @@ -11475,6 +27705,23 @@ public void TestV2SignalsAccountSignalGet2() "/v2/signals/account_signals/id_123"); } + [Fact] + public async Task TestV2SignalsAccountSignalGet2Async() + { + this.StubRequest( + HttpMethod.Get, + "/v2/signals/account_signals/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.signals.account_signal\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"type\":\"fraudulent_merchant\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Signals.AccountSignals; + Stripe.V2.Signals.AccountSignal accountSignal = await service + .GetAsync("id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/signals/account_signals/id_123"); + } + [Fact] public void TestV2TaxManualRuleGet() { @@ -11491,22 +27738,171 @@ public void TestV2TaxManualRuleGet() } [Fact] - public void TestV2TaxManualRulePost() + public async Task TestV2TaxManualRuleGetAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/tax/manual_rules", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.tax.manual_rule\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"products\":[{\"type\":\"licensed_item\"}],\"scheduled_tax_rates\":[{\"rates\":[{\"display_name\":\"display_name\",\"percentage\":\"614555204\"}]}],\"status\":\"active\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Tax.ManualRules; + Stripe.V2.StripeList manualRules = await service + .ListAsync(); + this.AssertRequest(HttpMethod.Get, "/v2/tax/manual_rules"); + } + + [Fact] + public void TestV2TaxManualRuleGetAutoPaging() + { + this.StubRequest( + HttpMethod.Get, + "/v2/tax/manual_rules", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.tax.manual_rule\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"products\":[{\"type\":\"licensed_item\"}],\"scheduled_tax_rates\":[{\"rates\":[{\"display_name\":\"display_name\",\"percentage\":\"614555204\"}]}],\"status\":\"active\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Tax.ManualRules; + var manualRule = service.ListAutoPaging().First(); + this.AssertRequest(HttpMethod.Get, "/v2/tax/manual_rules"); + } + + [Fact] + public async Task TestV2TaxManualRuleGetAutoPagingAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/tax/manual_rules", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.tax.manual_rule\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"products\":[{\"type\":\"licensed_item\"}],\"scheduled_tax_rates\":[{\"rates\":[{\"display_name\":\"display_name\",\"percentage\":\"614555204\"}]}],\"status\":\"active\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Tax.ManualRules; + var manualRule = await service.ListAutoPagingAsync().FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v2/tax/manual_rules"); + } + + [Fact] + public void TestV2TaxManualRulePost() + { + this.StubRequest( + HttpMethod.Post, + "/v2/tax/manual_rules", + (HttpStatusCode)200, + "{\"object\":\"v2.tax.manual_rule\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"products\":[{\"type\":\"licensed_item\"}],\"scheduled_tax_rates\":[{\"rates\":[{\"display_name\":\"display_name\",\"percentage\":\"614555204\"}]}],\"status\":\"active\"}"); + var options = new Stripe.V2.Tax.ManualRuleCreateOptions + { + ScheduledTaxRates = new List + { + new Stripe.V2.Tax.ManualRuleCreateScheduledTaxRateOptions + { + Rates = new List + { + new Stripe.V2.Tax.ManualRuleCreateScheduledTaxRateRateOptions + { + Country = "country", + Description = "description", + DisplayName = "display_name", + Jurisdiction = "jurisdiction", + Percentage = 614555204M, + State = "state", + }, + }, + StartsAt = DateTimeOffset.Parse( + "1970-01-25T15:13:01.215Z") + .UtcDateTime, + }, + }, + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Tax.ManualRules; + Stripe.V2.Tax.ManualRule manualRule = service.Create(options); + this.AssertRequest(HttpMethod.Post, "/v2/tax/manual_rules"); + } + + [Fact] + public async Task TestV2TaxManualRulePostAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/tax/manual_rules", + (HttpStatusCode)200, + "{\"object\":\"v2.tax.manual_rule\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"products\":[{\"type\":\"licensed_item\"}],\"scheduled_tax_rates\":[{\"rates\":[{\"display_name\":\"display_name\",\"percentage\":\"614555204\"}]}],\"status\":\"active\"}"); + var options = new Stripe.V2.Tax.ManualRuleCreateOptions + { + ScheduledTaxRates = new List + { + new Stripe.V2.Tax.ManualRuleCreateScheduledTaxRateOptions + { + Rates = new List + { + new Stripe.V2.Tax.ManualRuleCreateScheduledTaxRateRateOptions + { + Country = "country", + Description = "description", + DisplayName = "display_name", + Jurisdiction = "jurisdiction", + Percentage = 614555204M, + State = "state", + }, + }, + StartsAt = DateTimeOffset.Parse( + "1970-01-25T15:13:01.215Z") + .UtcDateTime, + }, + }, + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Tax.ManualRules; + Stripe.V2.Tax.ManualRule manualRule = await service.CreateAsync( + options); + this.AssertRequest(HttpMethod.Post, "/v2/tax/manual_rules"); + } + + [Fact] + public void TestV2TaxManualRuleGet2() + { + this.StubRequest( + HttpMethod.Get, + "/v2/tax/manual_rules/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.tax.manual_rule\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"products\":[{\"type\":\"licensed_item\"}],\"scheduled_tax_rates\":[{\"rates\":[{\"display_name\":\"display_name\",\"percentage\":\"614555204\"}]}],\"status\":\"active\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Tax.ManualRules; + Stripe.V2.Tax.ManualRule manualRule = service.Get("id_123"); + this.AssertRequest(HttpMethod.Get, "/v2/tax/manual_rules/id_123"); + } + + [Fact] + public async Task TestV2TaxManualRuleGet2Async() + { + this.StubRequest( + HttpMethod.Get, + "/v2/tax/manual_rules/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.tax.manual_rule\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"products\":[{\"type\":\"licensed_item\"}],\"scheduled_tax_rates\":[{\"rates\":[{\"display_name\":\"display_name\",\"percentage\":\"614555204\"}]}],\"status\":\"active\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Tax.ManualRules; + Stripe.V2.Tax.ManualRule manualRule = await service.GetAsync( + "id_123"); + this.AssertRequest(HttpMethod.Get, "/v2/tax/manual_rules/id_123"); + } + + [Fact] + public void TestV2TaxManualRulePost2() { this.StubRequest( HttpMethod.Post, - "/v2/tax/manual_rules", + "/v2/tax/manual_rules/id_123", (HttpStatusCode)200, "{\"object\":\"v2.tax.manual_rule\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"products\":[{\"type\":\"licensed_item\"}],\"scheduled_tax_rates\":[{\"rates\":[{\"display_name\":\"display_name\",\"percentage\":\"614555204\"}]}],\"status\":\"active\"}"); - var options = new Stripe.V2.Tax.ManualRuleCreateOptions + var options = new Stripe.V2.Tax.ManualRuleUpdateOptions { - ScheduledTaxRates = new List + ScheduledTaxRates = new List { - new Stripe.V2.Tax.ManualRuleCreateScheduledTaxRateOptions + new Stripe.V2.Tax.ManualRuleUpdateScheduledTaxRateOptions { - Rates = new List + Rates = new List { - new Stripe.V2.Tax.ManualRuleCreateScheduledTaxRateRateOptions + new Stripe.V2.Tax.ManualRuleUpdateScheduledTaxRateRateOptions { Country = "country", Description = "description", @@ -11524,26 +27920,14 @@ public void TestV2TaxManualRulePost() }; var client = new StripeClient(this.Requestor); var service = client.V2.Tax.ManualRules; - Stripe.V2.Tax.ManualRule manualRule = service.Create(options); - this.AssertRequest(HttpMethod.Post, "/v2/tax/manual_rules"); - } - - [Fact] - public void TestV2TaxManualRuleGet2() - { - this.StubRequest( - HttpMethod.Get, - "/v2/tax/manual_rules/id_123", - (HttpStatusCode)200, - "{\"object\":\"v2.tax.manual_rule\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"products\":[{\"type\":\"licensed_item\"}],\"scheduled_tax_rates\":[{\"rates\":[{\"display_name\":\"display_name\",\"percentage\":\"614555204\"}]}],\"status\":\"active\"}"); - var client = new StripeClient(this.Requestor); - var service = client.V2.Tax.ManualRules; - Stripe.V2.Tax.ManualRule manualRule = service.Get("id_123"); - this.AssertRequest(HttpMethod.Get, "/v2/tax/manual_rules/id_123"); + Stripe.V2.Tax.ManualRule manualRule = service.Update( + "id_123", + options); + this.AssertRequest(HttpMethod.Post, "/v2/tax/manual_rules/id_123"); } [Fact] - public void TestV2TaxManualRulePost2() + public async Task TestV2TaxManualRulePost2Async() { this.StubRequest( HttpMethod.Post, @@ -11576,7 +27960,7 @@ public void TestV2TaxManualRulePost2() }; var client = new StripeClient(this.Requestor); var service = client.V2.Tax.ManualRules; - Stripe.V2.Tax.ManualRule manualRule = service.Update( + Stripe.V2.Tax.ManualRule manualRule = await service.UpdateAsync( "id_123", options); this.AssertRequest(HttpMethod.Post, "/v2/tax/manual_rules/id_123"); @@ -11598,6 +27982,23 @@ public void TestV2TaxManualRulePost3() "/v2/tax/manual_rules/id_123/deactivate"); } + [Fact] + public async Task TestV2TaxManualRulePost3Async() + { + this.StubRequest( + HttpMethod.Post, + "/v2/tax/manual_rules/id_123/deactivate", + (HttpStatusCode)200, + "{\"object\":\"v2.tax.manual_rule\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"products\":[{\"type\":\"licensed_item\"}],\"scheduled_tax_rates\":[{\"rates\":[{\"display_name\":\"display_name\",\"percentage\":\"614555204\"}]}],\"status\":\"active\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Tax.ManualRules; + Stripe.V2.Tax.ManualRule manualRule = await service.DeactivateAsync( + "id_123"); + this.AssertRequest( + HttpMethod.Post, + "/v2/tax/manual_rules/id_123/deactivate"); + } + [Fact] public void TestV2TestHelpersFinancialAddressPost() { @@ -11620,6 +28021,28 @@ public void TestV2TestHelpersFinancialAddressPost() "/v2/test_helpers/financial_addresses/id_123/credit"); } + [Fact] + public async Task TestV2TestHelpersFinancialAddressPostAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/test_helpers/financial_addresses/id_123/credit", + (HttpStatusCode)200, + "{\"object\":\"financial_address_credit_simulation\",\"livemode\":true,\"status\":\"status\"}"); + var options = new Stripe.V2.TestHelpers.FinancialAddressCreditOptions + { + Amount = new Stripe.V2.Amount { Value = 96, Currency = "USD" }, + Network = "wire", + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.TestHelpers.FinancialAddresses; + Stripe.V2.FinancialAddressCreditSimulation financialAddressCreditSimulation = await service + .CreditAsync("id_123", options); + this.AssertRequest( + HttpMethod.Post, + "/v2/test_helpers/financial_addresses/id_123/credit"); + } + [Fact] public void TestV2TestHelpersFinancialAddressPost2() { @@ -11637,6 +28060,23 @@ public void TestV2TestHelpersFinancialAddressPost2() "/v2/test_helpers/financial_addresses/id_123/generate_microdeposits"); } + [Fact] + public async Task TestV2TestHelpersFinancialAddressPost2Async() + { + this.StubRequest( + HttpMethod.Post, + "/v2/test_helpers/financial_addresses/id_123/generate_microdeposits", + (HttpStatusCode)200, + "{\"object\":\"financial_address_generated_microdeposits\",\"amounts\":[{\"currency\":\"USD\",\"value\":1}],\"livemode\":true,\"status\":\"accepted\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.TestHelpers.FinancialAddresses; + Stripe.V2.FinancialAddressGeneratedMicrodeposits financialAddressGeneratedMicrodeposits = await service + .GenerateMicrodepositsAsync("id_123"); + this.AssertRequest( + HttpMethod.Post, + "/v2/test_helpers/financial_addresses/id_123/generate_microdeposits"); + } + [Fact] public void TestV2TestHelpersMoneyManagementPost() { @@ -11659,6 +28099,28 @@ public void TestV2TestHelpersMoneyManagementPost() "/v2/test_helpers/money_management/recipient_verifications"); } + [Fact] + public async Task TestV2TestHelpersMoneyManagementPostAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/test_helpers/money_management/recipient_verifications", + (HttpStatusCode)200, + "{\"object\":\"v2.money_management.recipient_verification\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"match_result\":\"unavailable\",\"match_result_details\":{\"message\":\"message\",\"provided_name\":\"provided_name\"},\"status\":\"acknowledged\"}"); + var options = new Stripe.V2.TestHelpers.MoneyManagementRecipientVerificationsOptions + { + MatchResult = "unavailable", + PayoutMethod = "payout_method", + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.TestHelpers.MoneyManagement; + Stripe.V2.MoneyManagement.RecipientVerification recipientVerification = await service + .RecipientVerificationsAsync(options); + this.AssertRequest( + HttpMethod.Post, + "/v2/test_helpers/money_management/recipient_verifications"); + } + [Fact] public void TestAlreadyCanceledError() { @@ -11680,6 +28142,27 @@ public void TestAlreadyCanceledError() "/v2/money_management/outbound_payments/id_123/cancel"); } + [Fact] + public async Task TestAlreadyCanceledErrorAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/money_management/outbound_payments/id_123/cancel", + (HttpStatusCode)400, + "{\"error\":{\"type\":\"already_canceled\",\"code\":\"outbound_payment_already_canceled\"}}"); + var exception = await Assert.ThrowsAsync( + async () => + { + var client = new StripeClient(this.Requestor); + var service = client.V2.MoneyManagement.OutboundPayments; + Stripe.V2.MoneyManagement.OutboundPayment outboundPayment = await service + .CancelAsync("id_123"); + }); + this.AssertRequest( + HttpMethod.Post, + "/v2/money_management/outbound_payments/id_123/cancel"); + } + [Fact] public void TestAlreadyExistsError() { @@ -11705,6 +28188,31 @@ public void TestAlreadyExistsError() "/v2/money_management/financial_accounts"); } + [Fact] + public async Task TestAlreadyExistsErrorAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/money_management/financial_accounts", + (HttpStatusCode)400, + "{\"error\":{\"type\":\"already_exists\",\"code\":\"already_exists\"}}"); + var exception = await Assert.ThrowsAsync( + async () => + { + var options = new Stripe.V2.MoneyManagement.FinancialAccountCreateOptions + { + Type = "storage", + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.MoneyManagement.FinancialAccounts; + Stripe.V2.MoneyManagement.FinancialAccount financialAccount = await service + .CreateAsync(options); + }); + this.AssertRequest( + HttpMethod.Post, + "/v2/money_management/financial_accounts"); + } + [Fact] public void TestBlockedByStripeError() { @@ -11731,6 +28239,32 @@ public void TestBlockedByStripeError() "/v2/core/vault/us_bank_accounts"); } + [Fact] + public async Task TestBlockedByStripeErrorAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/vault/us_bank_accounts", + (HttpStatusCode)400, + "{\"error\":{\"type\":\"blocked_by_stripe\",\"code\":\"blocked_payout_method\"}}"); + var exception = await Assert.ThrowsAsync( + async () => + { + var options = new Stripe.V2.Core.Vault.UsBankAccountCreateOptions + { + AccountNumber = "account_number", + Currency = "usd", + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Vault.UsBankAccounts; + Stripe.V2.Core.Vault.UsBankAccount usBankAccount = await service + .CreateAsync(options); + }); + this.AssertRequest( + HttpMethod.Post, + "/v2/core/vault/us_bank_accounts"); + } + [Fact] public void TestCannotProceedError() { @@ -11752,6 +28286,27 @@ public void TestCannotProceedError() "/v2/core/vault/us_bank_accounts/id_123/archive"); } + [Fact] + public async Task TestCannotProceedErrorAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/vault/us_bank_accounts/id_123/archive", + (HttpStatusCode)400, + "{\"error\":{\"type\":\"cannot_proceed\",\"code\":\"default_payout_method_cannot_be_archived\"}}"); + var exception = await Assert.ThrowsAsync( + async () => + { + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Vault.UsBankAccounts; + Stripe.V2.Core.Vault.UsBankAccount usBankAccount = await service + .ArchiveAsync("id_123"); + }); + this.AssertRequest( + HttpMethod.Post, + "/v2/core/vault/us_bank_accounts/id_123/archive"); + } + [Fact] public void TestControlledByAlternateResourceError() { @@ -11774,6 +28329,28 @@ public void TestControlledByAlternateResourceError() "/v2/money_management/outbound_setup_intents"); } + [Fact] + public async Task TestControlledByAlternateResourceErrorAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/money_management/outbound_setup_intents", + (HttpStatusCode)400, + "{\"error\":{\"type\":\"controlled_by_alternate_resource\",\"code\":\"payout_method_cannot_be_archived\"}}"); + var exception = await Assert.ThrowsAsync( + async () => + { + var options = new Stripe.V2.MoneyManagement.OutboundSetupIntentCreateOptions(); + var client = new StripeClient(this.Requestor); + var service = client.V2.MoneyManagement.OutboundSetupIntents; + Stripe.V2.MoneyManagement.OutboundSetupIntent outboundSetupIntent = await service + .CreateAsync(options); + }); + this.AssertRequest( + HttpMethod.Post, + "/v2/money_management/outbound_setup_intents"); + } + [Fact] public void TestControlledByDashboardError() { @@ -11795,6 +28372,27 @@ public void TestControlledByDashboardError() "/v2/core/vault/us_bank_accounts/id_123/archive"); } + [Fact] + public async Task TestControlledByDashboardErrorAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/vault/us_bank_accounts/id_123/archive", + (HttpStatusCode)400, + "{\"error\":{\"type\":\"controlled_by_dashboard\",\"code\":\"bank_account_cannot_be_archived\"}}"); + var exception = await Assert.ThrowsAsync( + async () => + { + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Vault.UsBankAccounts; + Stripe.V2.Core.Vault.UsBankAccount usBankAccount = await service + .ArchiveAsync("id_123"); + }); + this.AssertRequest( + HttpMethod.Post, + "/v2/core/vault/us_bank_accounts/id_123/archive"); + } + [Fact] public void TestFeatureNotEnabledError() { @@ -11812,25 +28410,77 @@ public void TestFeatureNotEnabledError() To = new Stripe.V2.MoneyManagement.CurrencyConversionCreateToOptions(), }; var client = new StripeClient(this.Requestor); - var service = client.V2.MoneyManagement.CurrencyConversions; - Stripe.V2.MoneyManagement.CurrencyConversion currencyConversion = service + var service = client.V2.MoneyManagement.CurrencyConversions; + Stripe.V2.MoneyManagement.CurrencyConversion currencyConversion = service + .Create(options); + }); + this.AssertRequest( + HttpMethod.Post, + "/v2/money_management/currency_conversions"); + } + + [Fact] + public async Task TestFeatureNotEnabledErrorAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/money_management/currency_conversions", + (HttpStatusCode)400, + "{\"error\":{\"type\":\"feature_not_enabled\",\"code\":\"outbound_flow_from_closed_financial_account_unsupported\"}}"); + var exception = await Assert.ThrowsAsync( + async () => + { + var options = new Stripe.V2.MoneyManagement.CurrencyConversionCreateOptions + { + From = new Stripe.V2.MoneyManagement.CurrencyConversionCreateFromOptions(), + To = new Stripe.V2.MoneyManagement.CurrencyConversionCreateToOptions(), + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.MoneyManagement.CurrencyConversions; + Stripe.V2.MoneyManagement.CurrencyConversion currencyConversion = await service + .CreateAsync(options); + }); + this.AssertRequest( + HttpMethod.Post, + "/v2/money_management/currency_conversions"); + } + + [Fact] + public void TestFinancialAccountNotOpenError() + { + this.StubRequest( + HttpMethod.Post, + "/v2/money_management/financial_addresses", + (HttpStatusCode)400, + "{\"error\":{\"type\":\"financial_account_not_open\",\"code\":\"financial_account_not_in_open_status\"}}"); + var exception = Assert.Throws( + () => + { + var options = new Stripe.V2.MoneyManagement.FinancialAddressCreateOptions + { + FinancialAccount = "financial_account", + Type = "ca_bank_account", + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.MoneyManagement.FinancialAddresses; + Stripe.V2.MoneyManagement.FinancialAddress financialAddress = service .Create(options); }); this.AssertRequest( HttpMethod.Post, - "/v2/money_management/currency_conversions"); + "/v2/money_management/financial_addresses"); } [Fact] - public void TestFinancialAccountNotOpenError() + public async Task TestFinancialAccountNotOpenErrorAsync() { this.StubRequest( HttpMethod.Post, "/v2/money_management/financial_addresses", (HttpStatusCode)400, "{\"error\":{\"type\":\"financial_account_not_open\",\"code\":\"financial_account_not_in_open_status\"}}"); - var exception = Assert.Throws( - () => + var exception = await Assert.ThrowsAsync( + async () => { var options = new Stripe.V2.MoneyManagement.FinancialAddressCreateOptions { @@ -11839,8 +28489,8 @@ public void TestFinancialAccountNotOpenError() }; var client = new StripeClient(this.Requestor); var service = client.V2.MoneyManagement.FinancialAddresses; - Stripe.V2.MoneyManagement.FinancialAddress financialAddress = service - .Create(options); + Stripe.V2.MoneyManagement.FinancialAddress financialAddress = await service + .CreateAsync(options); }); this.AssertRequest( HttpMethod.Post, @@ -11873,6 +28523,32 @@ public void TestFxQuoteExpiredError() "/v2/money_management/currency_conversions"); } + [Fact] + public async Task TestFxQuoteExpiredErrorAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/money_management/currency_conversions", + (HttpStatusCode)400, + "{\"error\":{\"type\":\"fx_quote_expired\",\"code\":\"currency_conversion_fx_quote_expired\"}}"); + var exception = await Assert.ThrowsAsync( + async () => + { + var options = new Stripe.V2.MoneyManagement.CurrencyConversionCreateOptions + { + From = new Stripe.V2.MoneyManagement.CurrencyConversionCreateFromOptions(), + To = new Stripe.V2.MoneyManagement.CurrencyConversionCreateToOptions(), + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.MoneyManagement.CurrencyConversions; + Stripe.V2.MoneyManagement.CurrencyConversion currencyConversion = await service + .CreateAsync(options); + }); + this.AssertRequest( + HttpMethod.Post, + "/v2/money_management/currency_conversions"); + } + [Fact] public void TestInsufficientFundsError() { @@ -11907,6 +28583,40 @@ public void TestInsufficientFundsError() "/v2/money_management/outbound_payments"); } + [Fact] + public async Task TestInsufficientFundsErrorAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/money_management/outbound_payments", + (HttpStatusCode)400, + "{\"error\":{\"type\":\"insufficient_funds\",\"code\":\"insufficient_funds\"}}"); + var exception = await Assert.ThrowsAsync( + async () => + { + var options = new Stripe.V2.MoneyManagement.OutboundPaymentCreateOptions + { + Amount = new Stripe.V2.Amount { Value = 96, Currency = "USD" }, + From = new Stripe.V2.MoneyManagement.OutboundPaymentCreateFromOptions + { + Currency = "usd", + FinancialAccount = "financial_account", + }, + To = new Stripe.V2.MoneyManagement.OutboundPaymentCreateToOptions + { + Recipient = "recipient", + }, + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.MoneyManagement.OutboundPayments; + Stripe.V2.MoneyManagement.OutboundPayment outboundPayment = await service + .CreateAsync(options); + }); + this.AssertRequest( + HttpMethod.Post, + "/v2/money_management/outbound_payments"); + } + [Fact] public void TestInvalidPaymentMethodError() { @@ -11933,6 +28643,32 @@ public void TestInvalidPaymentMethodError() "/v2/core/vault/us_bank_accounts"); } + [Fact] + public async Task TestInvalidPaymentMethodErrorAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/vault/us_bank_accounts", + (HttpStatusCode)400, + "{\"error\":{\"type\":\"invalid_payment_method\",\"code\":\"invalid_us_bank_account\"}}"); + var exception = await Assert.ThrowsAsync( + async () => + { + var options = new Stripe.V2.Core.Vault.UsBankAccountCreateOptions + { + AccountNumber = "account_number", + Currency = "usd", + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Vault.UsBankAccounts; + Stripe.V2.Core.Vault.UsBankAccount usBankAccount = await service + .CreateAsync(options); + }); + this.AssertRequest( + HttpMethod.Post, + "/v2/core/vault/us_bank_accounts"); + } + [Fact] public void TestInvalidPayoutMethodError() { @@ -11955,6 +28691,28 @@ public void TestInvalidPayoutMethodError() "/v2/money_management/outbound_setup_intents"); } + [Fact] + public async Task TestInvalidPayoutMethodErrorAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/money_management/outbound_setup_intents", + (HttpStatusCode)400, + "{\"error\":{\"type\":\"invalid_payout_method\",\"code\":\"invalid_payout_method\"}}"); + var exception = await Assert.ThrowsAsync( + async () => + { + var options = new Stripe.V2.MoneyManagement.OutboundSetupIntentCreateOptions(); + var client = new StripeClient(this.Requestor); + var service = client.V2.MoneyManagement.OutboundSetupIntents; + Stripe.V2.MoneyManagement.OutboundSetupIntent outboundSetupIntent = await service + .CreateAsync(options); + }); + this.AssertRequest( + HttpMethod.Post, + "/v2/money_management/outbound_setup_intents"); + } + [Fact] public void TestNonZeroBalanceError() { @@ -11976,6 +28734,27 @@ public void TestNonZeroBalanceError() "/v2/money_management/financial_accounts/id_123/close"); } + [Fact] + public async Task TestNonZeroBalanceErrorAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/money_management/financial_accounts/id_123/close", + (HttpStatusCode)400, + "{\"error\":{\"type\":\"non_zero_balance\",\"code\":\"closing_financial_account_with_non_zero_balances\"}}"); + var exception = await Assert.ThrowsAsync( + async () => + { + var client = new StripeClient(this.Requestor); + var service = client.V2.MoneyManagement.FinancialAccounts; + Stripe.V2.MoneyManagement.FinancialAccount financialAccount = await service + .CloseAsync("id_123"); + }); + this.AssertRequest( + HttpMethod.Post, + "/v2/money_management/financial_accounts/id_123/close"); + } + [Fact] public void TestNotCancelableError() { @@ -11997,6 +28776,27 @@ public void TestNotCancelableError() "/v2/money_management/outbound_payments/id_123/cancel"); } + [Fact] + public async Task TestNotCancelableErrorAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/money_management/outbound_payments/id_123/cancel", + (HttpStatusCode)400, + "{\"error\":{\"type\":\"not_cancelable\",\"code\":\"outbound_payment_not_cancelable\"}}"); + var exception = await Assert.ThrowsAsync( + async () => + { + var client = new StripeClient(this.Requestor); + var service = client.V2.MoneyManagement.OutboundPayments; + Stripe.V2.MoneyManagement.OutboundPayment outboundPayment = await service + .CancelAsync("id_123"); + }); + this.AssertRequest( + HttpMethod.Post, + "/v2/money_management/outbound_payments/id_123/cancel"); + } + [Fact] public void TestQuotaExceededError() { @@ -12023,6 +28823,32 @@ public void TestQuotaExceededError() "/v2/core/vault/us_bank_accounts"); } + [Fact] + public async Task TestQuotaExceededErrorAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/vault/us_bank_accounts", + (HttpStatusCode)400, + "{\"error\":{\"type\":\"quota_exceeded\",\"code\":\"archived_payout_method_card\"}}"); + var exception = await Assert.ThrowsAsync( + async () => + { + var options = new Stripe.V2.Core.Vault.UsBankAccountCreateOptions + { + AccountNumber = "account_number", + Currency = "usd", + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Vault.UsBankAccounts; + Stripe.V2.Core.Vault.UsBankAccount usBankAccount = await service + .CreateAsync(options); + }); + this.AssertRequest( + HttpMethod.Post, + "/v2/core/vault/us_bank_accounts"); + } + [Fact] public void TestRateLimitError() { @@ -12042,6 +28868,61 @@ public void TestRateLimitError() this.AssertRequest(HttpMethod.Get, "/v2/core/accounts"); } + [Fact] + public async Task TestRateLimitErrorAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/accounts", + (HttpStatusCode)400, + "{\"error\":{\"type\":\"rate_limit\",\"code\":\"account_rate_limit_exceeded\"}}"); + var exception = await Assert.ThrowsAsync( + async () => + { + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Accounts; + Stripe.V2.StripeList accounts = await service + .ListAsync(); + }); + this.AssertRequest(HttpMethod.Get, "/v2/core/accounts"); + } + + [Fact] + public void TestRateLimitErrorAutoPaging() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/accounts", + (HttpStatusCode)400, + "{\"error\":{\"type\":\"rate_limit\",\"code\":\"account_rate_limit_exceeded\"}}"); + var exception = Assert.Throws( + () => + { + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Accounts; + var account = service.ListAutoPaging().First(); + }); + this.AssertRequest(HttpMethod.Get, "/v2/core/accounts"); + } + + [Fact] + public async Task TestRateLimitErrorAutoPagingAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/accounts", + (HttpStatusCode)400, + "{\"error\":{\"type\":\"rate_limit\",\"code\":\"account_rate_limit_exceeded\"}}"); + var exception = await Assert.ThrowsAsync( + async () => + { + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Accounts; + var account = await service.ListAutoPagingAsync().FirstAsync(); + }); + this.AssertRequest(HttpMethod.Get, "/v2/core/accounts"); + } + [Fact] public void TestRecipientNotNotifiableError() { @@ -12076,6 +28957,40 @@ public void TestRecipientNotNotifiableError() "/v2/money_management/outbound_payments"); } + [Fact] + public async Task TestRecipientNotNotifiableErrorAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/money_management/outbound_payments", + (HttpStatusCode)400, + "{\"error\":{\"type\":\"recipient_not_notifiable\",\"code\":\"recipient_email_does_not_exist\"}}"); + var exception = await Assert.ThrowsAsync( + async () => + { + var options = new Stripe.V2.MoneyManagement.OutboundPaymentCreateOptions + { + Amount = new Stripe.V2.Amount { Value = 96, Currency = "USD" }, + From = new Stripe.V2.MoneyManagement.OutboundPaymentCreateFromOptions + { + Currency = "usd", + FinancialAccount = "financial_account", + }, + To = new Stripe.V2.MoneyManagement.OutboundPaymentCreateToOptions + { + Recipient = "recipient", + }, + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.MoneyManagement.OutboundPayments; + Stripe.V2.MoneyManagement.OutboundPayment outboundPayment = await service + .CreateAsync(options); + }); + this.AssertRequest( + HttpMethod.Post, + "/v2/money_management/outbound_payments"); + } + [Fact] public void TestTemporarySessionExpiredError() { @@ -12109,5 +29024,39 @@ public void TestTemporarySessionExpiredError() HttpMethod.Post, "/v2/billing/meter_event_stream"); } + + [Fact] + public async Task TestTemporarySessionExpiredErrorAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/meter_event_stream", + (HttpStatusCode)400, + "{\"error\":{\"type\":\"temporary_session_expired\",\"code\":\"billing_meter_event_session_expired\"}}"); + var exception = await Assert.ThrowsAsync( + async () => + { + var options = new Stripe.V2.Billing.MeterEventStreamCreateOptions + { + Events = new List + { + new Stripe.V2.Billing.MeterEventStreamCreateEventOptions + { + EventName = "event_name", + Payload = new Dictionary + { + { "key", "payload" }, + }, + }, + }, + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.MeterEventStream; + await service.CreateAsync(options); + }); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/meter_event_stream"); + } } } From 436f3ae8f1076fd3fce6867bfa25825ff899dab6 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 16 Jun 2026 01:43:18 +0000 Subject: [PATCH 12/15] Update generated code for v2311 and 9f1b026510bc9d939dc89ab90fff40d27e770566 --- CODEGEN_VERSION | 2 +- OPENAPI_VERSION | 2 +- ...PaymentIntentPaymentMethodOptionsCrypto.cs | 4 +++ ...onsCryptoTransactionVerificationOptions.cs | 26 +++++++++++++++++++ ...IntentPaymentMethodOptionsCryptoOptions.cs | 8 ++++++ ...toTransactionVerificationOptionsOptions.cs | 26 +++++++++++++++++++ 6 files changed, 66 insertions(+), 2 deletions(-) create mode 100644 src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsCryptoTransactionVerificationOptions.cs create mode 100644 src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCryptoTransactionVerificationOptionsOptions.cs diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index d9307928d0..3b88654242 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -4d4151efb9cfbfd5a1d78638f6f205591eb765a9 \ No newline at end of file +9f1b026510bc9d939dc89ab90fff40d27e770566 \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 0ffbee3386..a7dc15e48d 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2310 \ No newline at end of file +v2311 \ No newline at end of file diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsCrypto.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsCrypto.cs index 2c875d47d0..999b8dcced 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsCrypto.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsCrypto.cs @@ -43,5 +43,9 @@ public class PaymentIntentPaymentMethodOptionsCrypto : StripeEntity + { + /// + /// The network on which the transaction was submitted. + /// One of: base, ethereum, polygon, solana, or tempo. + /// + [JsonProperty("network")] + [STJS.JsonPropertyName("network")] + public string Network { get; set; } + + /// + /// The hash of the onchain transaction to verify. + /// + [JsonProperty("transaction_hash")] + [STJS.JsonPropertyName("transaction_hash")] + public string TransactionHash { get; set; } + } +} diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCryptoOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCryptoOptions.cs index 7402fb0a8e..8286d62163 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCryptoOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCryptoOptions.cs @@ -50,5 +50,13 @@ public class PaymentIntentPaymentMethodOptionsCryptoOptions : INestedOptions [JsonProperty("setup_future_usage")] [STJS.JsonPropertyName("setup_future_usage")] public string SetupFutureUsage { get; set; } + + /// + /// Specific configuration for this PaymentIntent when the mode is + /// transaction_verification. + /// + [JsonProperty("transaction_verification_options")] + [STJS.JsonPropertyName("transaction_verification_options")] + public PaymentIntentPaymentMethodOptionsCryptoTransactionVerificationOptionsOptions TransactionVerificationOptions { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCryptoTransactionVerificationOptionsOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCryptoTransactionVerificationOptionsOptions.cs new file mode 100644 index 0000000000..67adaf1a4d --- /dev/null +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsCryptoTransactionVerificationOptionsOptions.cs @@ -0,0 +1,26 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class PaymentIntentPaymentMethodOptionsCryptoTransactionVerificationOptionsOptions : INestedOptions + { + /// + /// The network on which the transaction was submitted. + /// One of: base, ethereum, polygon, solana, or tempo. + /// + [JsonProperty("network")] + [STJS.JsonPropertyName("network")] + public string Network { get; set; } + + /// + /// The hash of the onchain transaction to verify. + /// + [JsonProperty("transaction_hash")] + [STJS.JsonPropertyName("transaction_hash")] + public string TransactionHash { get; set; } + } +} From 912198c520efdfb36adfcc992bc7f13ab0bdc561 Mon Sep 17 00:00:00 2001 From: jar-stripe Date: Mon, 15 Jun 2026 19:33:26 -0700 Subject: [PATCH 13/15] Upgrade CI runners from ubuntu-22.04 to ubuntu-24.04 (#3398) --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e618ced6ff..cdac47c799 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -191,7 +191,7 @@ jobs: build: name: Build needs: [test, test-net462, prepare-dotnet-versions] - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 permissions: contents: read steps: @@ -213,7 +213,7 @@ jobs: name: Pack NuGet if: (((github.event_name == 'push') || (github.event_name == 'workflow_dispatch')) && startsWith(github.ref, 'refs/tags/v')) needs: [build, prepare-dotnet-versions] - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 permissions: contents: read steps: From d83d5a37edcd4c12a73ee14614f3b343a937698a Mon Sep 17 00:00:00 2001 From: David Brownman Date: Tue, 16 Jun 2026 12:32:46 -0700 Subject: [PATCH 14/15] Add PR disclaimer to README (#3400) --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 36e0a490f3..9e3cffdce2 100644 --- a/README.md +++ b/README.md @@ -333,6 +333,9 @@ New features and bug fixes are released on the latest major version of the Strip ## Development +> [!WARNING] +> External contributions to this repo from first-time contributors are currently on hiatus. If you'd like to see a change made to the package, please open an issue. + [Contribution guidelines for this project](CONTRIBUTING.md) .NET 8 is required to build and test Stripe.net SDK, you can install it from [get.dot.net](https://get.dot.net/). From d0ce86730a0177be134e7a90df743b500900225e Mon Sep 17 00:00:00 2001 From: jar-stripe Date: Wed, 17 Jun 2026 10:35:58 -0700 Subject: [PATCH 15/15] Remove manual API tests superseded by GeneratedExamplesTest (#3402) * Remove manual API tests superseded by GeneratedExamplesTest These 62 manually maintained *ServiceTest.cs files tested CRUDL operations that are now fully covered by GeneratedExamplesTest.cs, which was recently updated to also generate async and autopaging test variants (sdk-codegen#3708). Files testing SDK-specific behavior (file uploads, OAuth, webhook verification, options serialization, sources, ephemeral keys, autopaging infrastructure, etc.) are preserved. Co-Authored-By: Claude Opus 4.6 Committed-By-Agent: claude * Remove redundant options serialization tests ContentEncoderTest.cs already covers all serialization mechanisms generically (AnyOf, lists, nested objects, DateTime, StringEnum, etc.) using synthetic TestOptions. These resource-specific tests add no additional coverage. Co-Authored-By: Claude Opus 4.6 Committed-By-Agent: claude --------- Co-authored-by: Claude Opus 4.6 --- .../AccountLinks/AccountLinkServiceTest.cs | 50 - .../Accounts/AccountCreateOptionsTest.cs | 26 - .../Services/Accounts/AccountServiceTest.cs | 270 - .../ApplicationFeeRefundServiceTest.cs | 149 - .../ApplicationFeeServiceTest.cs | 86 - .../BalanceTransactionServiceTest.cs | 86 - .../BankAccountListOptionsTest.cs | 17 - .../Sessions/ConfigurationServiceTest.cs | 125 - .../Sessions/SessionServiceTest.cs | 50 - .../AccountCapabilityServiceTest.cs | 94 - .../Services/Cards/CardListOptionsTest.cs | 17 - .../Charges/ChargeCreateOptionsTest.cs | 94 - .../Services/Charges/ChargeServiceTest.cs | 208 - .../Services/Checkout/SessionServiceTest.cs | 207 - .../CountrySpecs/CountrySpecServiceTest.cs | 86 - .../Coupons/CouponCreateOptionsTest.cs | 21 - .../Services/Coupons/CouponServiceTest.cs | 155 - .../CreditNotes/CreditNoteServiceTest.cs | 278 - .../CustomerBalanceTransactionServiceTest.cs | 136 - .../Services/Customers/CustomerServiceTest.cs | 155 - .../Services/Disputes/DisputeServiceTest.cs | 132 - .../Services/Events/EventServiceTest.cs | 86 - .../Services/FileLinks/FileLinkServiceTest.cs | 139 - .../Services/GeneratedExamplesTest.cs | 10869 +++++++++++++++- .../VerificationReportServiceTest.cs | 63 - .../VerificationSessionServiceTest.cs | 158 - .../InvoiceItems/InvoiceItemServiceTest.cs | 156 - .../Services/Invoices/InvoiceServiceTest.cs | 317 - .../AuthorizationServiceTest.cs | 136 - .../Cardholders/CardholderServiceTest.cs | 173 - .../Issuing/Cards/IssuingCardServiceTest.cs | 143 - .../Disputes/IssuingDisputeServiceTest.cs | 164 - .../Transactions/TransactionServiceTest.cs | 104 - .../LoginLinks/AccountLoginLinkServiceTest.cs | 45 - .../Services/Mandates/MandateServiceTest.cs | 43 - .../PaymentIntentConfirmOptionsTest.cs | 20 - .../PaymentIntentCreateOptionsTest.cs | 20 - .../PaymentIntentServiceTest.cs | 232 - .../PaymentMethodServiceTest.cs | 189 - .../Services/Payouts/PayoutServiceTest.cs | 175 - .../Persons/AccountPersonServiceTest.cs | 182 - .../Services/Plans/PlanCreateOptionsTest.cs | 64 - .../Services/Plans/PlanServiceTest.cs | 204 - .../Services/Prices/PriceCreateOptionsTest.cs | 64 - .../Services/Prices/PriceServiceTest.cs | 202 - .../Services/Products/ProductServiceTest.cs | 161 - .../PromotionCodeServiceTest.cs | 144 - .../Services/Quotes/QuoteServiceTest.cs | 353 - .../EarlyFraudWarningServiceTest.cs | 88 - .../ValueListItemServiceTest.cs | 128 - .../Radar/ValueLists/ValueListServiceTest.cs | 157 - .../Services/Refunds/RefundServiceTest.cs | 139 - .../ReportRuns/ReportRunServiceTest.cs | 103 - .../ReportTypes/ReportTypeServiceTest.cs | 61 - .../Services/Reviews/ReviewServiceTest.cs | 108 - .../SetupAttempts/SetupAttemptServiceTest.cs | 67 - .../SetupIntents/SetupIntentServiceTest.cs | 200 - .../ScheduledQueryRunServiceTest.cs | 86 - .../SubscriptionItemServiceTest.cs | 173 - .../SubscriptionScheduleServiceTest.cs | 205 - .../SubscriptionCreateOptionsTest.cs | 61 - .../Subscriptions/SubscriptionServiceTest.cs | 186 - .../Services/TaxCodes/TaxCodeServiceTest.cs | 71 - .../Services/TaxIds/TaxIdServiceTest.cs | 130 - .../Services/TaxRates/TaxRateServiceTest.cs | 140 - .../ConnectionTokenServiceTest.cs | 44 - .../Terminal/Locations/LocationServiceTest.cs | 146 - .../Terminal/Readers/ReaderServiceTest.cs | 139 - .../Services/Tokens/TokenServiceTest.cs | 126 - .../Services/Topups/TopupServiceTest.cs | 158 - .../TransferReversalServiceTest.cs | 139 - .../Services/Transfers/TransferServiceTest.cs | 140 - .../WebhookEndpointServiceTest.cs | 158 - 73 files changed, 10317 insertions(+), 9884 deletions(-) delete mode 100644 src/StripeTests/Services/AccountLinks/AccountLinkServiceTest.cs delete mode 100644 src/StripeTests/Services/Accounts/AccountCreateOptionsTest.cs delete mode 100644 src/StripeTests/Services/Accounts/AccountServiceTest.cs delete mode 100644 src/StripeTests/Services/ApplicationFeeRefunds/ApplicationFeeRefundServiceTest.cs delete mode 100644 src/StripeTests/Services/ApplicationFees/ApplicationFeeServiceTest.cs delete mode 100644 src/StripeTests/Services/BalanceTransactions/BalanceTransactionServiceTest.cs delete mode 100644 src/StripeTests/Services/BankAccounts/BankAccountListOptionsTest.cs delete mode 100644 src/StripeTests/Services/BillingPortal/Sessions/ConfigurationServiceTest.cs delete mode 100644 src/StripeTests/Services/BillingPortal/Sessions/SessionServiceTest.cs delete mode 100644 src/StripeTests/Services/Capabilities/AccountCapabilityServiceTest.cs delete mode 100644 src/StripeTests/Services/Cards/CardListOptionsTest.cs delete mode 100644 src/StripeTests/Services/Charges/ChargeCreateOptionsTest.cs delete mode 100644 src/StripeTests/Services/Charges/ChargeServiceTest.cs delete mode 100644 src/StripeTests/Services/Checkout/SessionServiceTest.cs delete mode 100644 src/StripeTests/Services/CountrySpecs/CountrySpecServiceTest.cs delete mode 100644 src/StripeTests/Services/Coupons/CouponCreateOptionsTest.cs delete mode 100644 src/StripeTests/Services/Coupons/CouponServiceTest.cs delete mode 100644 src/StripeTests/Services/CreditNotes/CreditNoteServiceTest.cs delete mode 100644 src/StripeTests/Services/CustomerBalanceTransactions/CustomerBalanceTransactionServiceTest.cs delete mode 100644 src/StripeTests/Services/Customers/CustomerServiceTest.cs delete mode 100644 src/StripeTests/Services/Disputes/DisputeServiceTest.cs delete mode 100644 src/StripeTests/Services/Events/EventServiceTest.cs delete mode 100644 src/StripeTests/Services/FileLinks/FileLinkServiceTest.cs delete mode 100644 src/StripeTests/Services/Identity/VerificationReports/VerificationReportServiceTest.cs delete mode 100644 src/StripeTests/Services/Identity/VerificationSessions/VerificationSessionServiceTest.cs delete mode 100644 src/StripeTests/Services/InvoiceItems/InvoiceItemServiceTest.cs delete mode 100644 src/StripeTests/Services/Invoices/InvoiceServiceTest.cs delete mode 100644 src/StripeTests/Services/Issuing/Authorizations/AuthorizationServiceTest.cs delete mode 100644 src/StripeTests/Services/Issuing/Cardholders/CardholderServiceTest.cs delete mode 100644 src/StripeTests/Services/Issuing/Cards/IssuingCardServiceTest.cs delete mode 100644 src/StripeTests/Services/Issuing/Disputes/IssuingDisputeServiceTest.cs delete mode 100644 src/StripeTests/Services/Issuing/Transactions/TransactionServiceTest.cs delete mode 100644 src/StripeTests/Services/LoginLinks/AccountLoginLinkServiceTest.cs delete mode 100644 src/StripeTests/Services/Mandates/MandateServiceTest.cs delete mode 100644 src/StripeTests/Services/PaymentIntents/PaymentIntentConfirmOptionsTest.cs delete mode 100644 src/StripeTests/Services/PaymentIntents/PaymentIntentCreateOptionsTest.cs delete mode 100644 src/StripeTests/Services/PaymentIntents/PaymentIntentServiceTest.cs delete mode 100644 src/StripeTests/Services/PaymentMethods/PaymentMethodServiceTest.cs delete mode 100644 src/StripeTests/Services/Payouts/PayoutServiceTest.cs delete mode 100644 src/StripeTests/Services/Persons/AccountPersonServiceTest.cs delete mode 100644 src/StripeTests/Services/Plans/PlanCreateOptionsTest.cs delete mode 100644 src/StripeTests/Services/Plans/PlanServiceTest.cs delete mode 100644 src/StripeTests/Services/Prices/PriceCreateOptionsTest.cs delete mode 100644 src/StripeTests/Services/Prices/PriceServiceTest.cs delete mode 100644 src/StripeTests/Services/Products/ProductServiceTest.cs delete mode 100644 src/StripeTests/Services/PromotionCodes/PromotionCodeServiceTest.cs delete mode 100644 src/StripeTests/Services/Quotes/QuoteServiceTest.cs delete mode 100644 src/StripeTests/Services/Radar/EarlyFraudWarnings/EarlyFraudWarningServiceTest.cs delete mode 100644 src/StripeTests/Services/Radar/ValueListItems/ValueListItemServiceTest.cs delete mode 100644 src/StripeTests/Services/Radar/ValueLists/ValueListServiceTest.cs delete mode 100644 src/StripeTests/Services/Refunds/RefundServiceTest.cs delete mode 100644 src/StripeTests/Services/Reporting/ReportRuns/ReportRunServiceTest.cs delete mode 100644 src/StripeTests/Services/Reporting/ReportTypes/ReportTypeServiceTest.cs delete mode 100644 src/StripeTests/Services/Reviews/ReviewServiceTest.cs delete mode 100644 src/StripeTests/Services/SetupAttempts/SetupAttemptServiceTest.cs delete mode 100644 src/StripeTests/Services/SetupIntents/SetupIntentServiceTest.cs delete mode 100644 src/StripeTests/Services/Sigma/ScheduledQueryRuns/ScheduledQueryRunServiceTest.cs delete mode 100644 src/StripeTests/Services/SubscriptionItems/SubscriptionItemServiceTest.cs delete mode 100644 src/StripeTests/Services/SubscriptionSchedules/SubscriptionScheduleServiceTest.cs delete mode 100644 src/StripeTests/Services/Subscriptions/SubscriptionCreateOptionsTest.cs delete mode 100644 src/StripeTests/Services/Subscriptions/SubscriptionServiceTest.cs delete mode 100644 src/StripeTests/Services/TaxCodes/TaxCodeServiceTest.cs delete mode 100644 src/StripeTests/Services/TaxIds/TaxIdServiceTest.cs delete mode 100644 src/StripeTests/Services/TaxRates/TaxRateServiceTest.cs delete mode 100644 src/StripeTests/Services/Terminal/ConnectionTokens/ConnectionTokenServiceTest.cs delete mode 100644 src/StripeTests/Services/Terminal/Locations/LocationServiceTest.cs delete mode 100644 src/StripeTests/Services/Terminal/Readers/ReaderServiceTest.cs delete mode 100644 src/StripeTests/Services/Tokens/TokenServiceTest.cs delete mode 100644 src/StripeTests/Services/Topups/TopupServiceTest.cs delete mode 100644 src/StripeTests/Services/TransferReversals/TransferReversalServiceTest.cs delete mode 100644 src/StripeTests/Services/Transfers/TransferServiceTest.cs delete mode 100644 src/StripeTests/Services/WebhookEndpoints/WebhookEndpointServiceTest.cs diff --git a/src/StripeTests/Services/AccountLinks/AccountLinkServiceTest.cs b/src/StripeTests/Services/AccountLinks/AccountLinkServiceTest.cs deleted file mode 100644 index 6a8065ca70..0000000000 --- a/src/StripeTests/Services/AccountLinks/AccountLinkServiceTest.cs +++ /dev/null @@ -1,50 +0,0 @@ -namespace StripeTests -{ - using System.Collections.Generic; - using System.Net.Http; - using System.Threading.Tasks; - - using Stripe; - using Xunit; - - public class AccountLinkServiceTest : BaseStripeTest - { - private readonly AccountLinkService service; - private readonly AccountLinkCreateOptions createOptions; - - public AccountLinkServiceTest( - StripeMockFixture stripeMockFixture, - MockHttpClientFixture mockHttpClientFixture) - : base(stripeMockFixture, mockHttpClientFixture) - { - this.service = new AccountLinkService(this.StripeClient); - - this.createOptions = new AccountLinkCreateOptions - { - Account = "acct_123", - Collect = "eventually_due", - RefreshUrl = "https://stripe.com/refresh", - ReturnUrl = "https://stripe.com/return", - Type = "account_onboarding", - }; - } - - [Fact] - public void Create() - { - var accountLink = this.service.Create(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/account_links"); - Assert.NotNull(accountLink); - Assert.Equal("account_link", accountLink.Object); - } - - [Fact] - public async Task CreateAsync() - { - var accountLink = await this.service.CreateAsync(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/account_links"); - Assert.NotNull(accountLink); - Assert.Equal("account_link", accountLink.Object); - } - } -} diff --git a/src/StripeTests/Services/Accounts/AccountCreateOptionsTest.cs b/src/StripeTests/Services/Accounts/AccountCreateOptionsTest.cs deleted file mode 100644 index 693acf4dbd..0000000000 --- a/src/StripeTests/Services/Accounts/AccountCreateOptionsTest.cs +++ /dev/null @@ -1,26 +0,0 @@ -namespace StripeTests -{ - using Stripe; - using Stripe.Infrastructure.FormEncoding; - using Xunit; - - public class AccountCreateOptionsTest : BaseStripeTest - { - [Fact] - public void Serialize() - { - var options = new AccountCreateOptions - { - Individual = new AccountIndividualOptions - { - FirstName = "first name", - LastName = "last name", - }, - }; - - Assert.Equal( - "individual[first_name]=first+name&individual[last_name]=last+name", - ContentEncoder.CreateQueryString(options)); - } - } -} diff --git a/src/StripeTests/Services/Accounts/AccountServiceTest.cs b/src/StripeTests/Services/Accounts/AccountServiceTest.cs deleted file mode 100644 index 3994024456..0000000000 --- a/src/StripeTests/Services/Accounts/AccountServiceTest.cs +++ /dev/null @@ -1,270 +0,0 @@ -namespace StripeTests -{ - using System; - using System.Collections.Generic; - using System.Linq; - using System.Net.Http; - using System.Threading.Tasks; - - using Stripe; - using Xunit; - - public class AccountServiceTest : BaseStripeTest - { - private const string AccountId = "acct_123"; - - private readonly AccountService service; - private readonly AccountCreateOptions createOptions; - private readonly AccountUpdateOptions updateOptions; - private readonly AccountListOptions listOptions; - private readonly AccountRejectOptions rejectOptions; - - public AccountServiceTest( - StripeMockFixture stripeMockFixture, - MockHttpClientFixture mockHttpClientFixture) - : base(stripeMockFixture, mockHttpClientFixture) - { - this.service = new AccountService(this.StripeClient); - - this.createOptions = new AccountCreateOptions - { - Type = AccountType.Custom, - BusinessProfile = new AccountBusinessProfileOptions - { - Name = "business name", - }, - BusinessType = "company", - Capabilities = new AccountCapabilitiesOptions - { - CardPayments = new AccountCapabilitiesCardPaymentsOptions - { - Requested = true, - }, - Transfers = new AccountCapabilitiesTransfersOptions - { - Requested = true, - }, - }, - Company = new AccountCompanyOptions - { - Address = new AddressOptions - { - State = "CA", - City = "City", - Line1 = "Line1", - Line2 = "Line2", - PostalCode = "90210", - Country = "US", - }, - Name = "Company name", - Verification = new AccountCompanyVerificationOptions - { - Document = new AccountCompanyVerificationDocumentOptions - { - Back = "file_back", - Front = "file_front", - }, - }, - }, - ExternalAccount = "tok_visa_debit", - Settings = new AccountSettingsOptions - { - Branding = new AccountSettingsBrandingOptions - { - Logo = "file_123", - }, - CardPayments = new AccountSettingsCardPaymentsOptions - { - DeclineOn = new AccountSettingsCardPaymentsDeclineOnOptions - { - AvsFailure = true, - CvcFailure = true, - }, - StatementDescriptorPrefix = "STR", - }, - Payments = new AccountSettingsPaymentsOptions - { - StatementDescriptor = "STRIPE 123", - }, - Payouts = new AccountSettingsPayoutsOptions - { - DebitNegativeBalances = true, - Schedule = new AccountSettingsPayoutsScheduleOptions - { - Interval = "monthly", - MonthlyAnchor = 10, - }, - }, - }, - TosAcceptance = new AccountTosAcceptanceOptions - { - Date = DateTime.Parse("Mon, 01 Jan 2001 00:00:00Z"), - Ip = "127.0.0.1", - UserAgent = "User-Agent", - }, - }; - - this.updateOptions = new AccountUpdateOptions - { - Metadata = new Dictionary - { - { "key", "value" }, - }, - }; - - this.rejectOptions = new AccountRejectOptions - { - Reason = "terms_of_service", - }; - - this.listOptions = new AccountListOptions - { - Limit = 1, - }; - } - - [Fact] - public void Create() - { - var account = this.service.Create(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/accounts"); - Assert.NotNull(account); - Assert.Equal("account", account.Object); - } - - [Fact] - public async Task CreateAsync() - { - var account = await this.service.CreateAsync(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/accounts"); - Assert.NotNull(account); - Assert.Equal("account", account.Object); - } - - [Fact] - public void Delete() - { - var deleted = this.service.Delete(AccountId); - this.AssertRequest(HttpMethod.Delete, "/v1/accounts/acct_123"); - Assert.NotNull(deleted); - } - - [Fact] - public async Task DeleteAsync() - { - var deleted = await this.service.DeleteAsync(AccountId); - this.AssertRequest(HttpMethod.Delete, "/v1/accounts/acct_123"); - Assert.NotNull(deleted); - } - - [Fact] - public void Get() - { - var account = this.service.Get(AccountId); - this.AssertRequest(HttpMethod.Get, "/v1/accounts/acct_123"); - Assert.NotNull(account); - Assert.Equal("account", account.Object); - } - - [Fact] - public async Task GetAsync() - { - var account = await this.service.GetAsync(AccountId); - this.AssertRequest(HttpMethod.Get, "/v1/accounts/acct_123"); - Assert.NotNull(account); - Assert.Equal("account", account.Object); - } - - [Fact] - public void GetSelf() - { - var account = this.service.GetSelf(); - this.AssertRequest(HttpMethod.Get, "/v1/account"); - Assert.NotNull(account); - Assert.Equal("account", account.Object); - } - - [Fact] - public async Task GetSelfAsync() - { - var account = await this.service.GetSelfAsync(); - this.AssertRequest(HttpMethod.Get, "/v1/account"); - Assert.NotNull(account); - Assert.Equal("account", account.Object); - } - - [Fact] - public void List() - { - var accounts = this.service.List(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/accounts"); - Assert.NotNull(accounts); - Assert.Equal("list", accounts.Object); - Assert.Single(accounts.Data); - Assert.Equal("account", accounts.Data[0].Object); - } - - [Fact] - public async Task ListAsync() - { - var accounts = await this.service.ListAsync(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/accounts"); - Assert.NotNull(accounts); - Assert.Equal("list", accounts.Object); - Assert.Single(accounts.Data); - Assert.Equal("account", accounts.Data[0].Object); - } - - [Fact] - public void ListAutoPaging() - { - var account = this.service.ListAutoPaging(this.listOptions).First(); - Assert.NotNull(account); - Assert.Equal("account", account.Object); - } - - [Fact] - public async Task ListAutoPagingAsync() - { - var account = await this.service.ListAutoPagingAsync(this.listOptions).FirstAsync(); - Assert.NotNull(account); - Assert.Equal("account", account.Object); - } - - [Fact] - public void Reject() - { - var account = this.service.Reject(AccountId, this.rejectOptions); - this.AssertRequest(HttpMethod.Post, "/v1/accounts/acct_123/reject"); - Assert.NotNull(account); - Assert.Equal("account", account.Object); - } - - [Fact] - public async Task RejectAsync() - { - var account = await this.service.RejectAsync(AccountId, this.rejectOptions); - this.AssertRequest(HttpMethod.Post, "/v1/accounts/acct_123/reject"); - Assert.NotNull(account); - Assert.Equal("account", account.Object); - } - - [Fact] - public void Update() - { - var account = this.service.Update(AccountId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/accounts/acct_123"); - Assert.NotNull(account); - Assert.Equal("account", account.Object); - } - - [Fact] - public async Task UpdateAsync() - { - var account = await this.service.UpdateAsync(AccountId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/accounts/acct_123"); - Assert.NotNull(account); - Assert.Equal("account", account.Object); - } - } -} diff --git a/src/StripeTests/Services/ApplicationFeeRefunds/ApplicationFeeRefundServiceTest.cs b/src/StripeTests/Services/ApplicationFeeRefunds/ApplicationFeeRefundServiceTest.cs deleted file mode 100644 index a764f09552..0000000000 --- a/src/StripeTests/Services/ApplicationFeeRefunds/ApplicationFeeRefundServiceTest.cs +++ /dev/null @@ -1,149 +0,0 @@ -namespace StripeTests -{ - using System.Collections.Generic; - using System.Linq; - using System.Net.Http; - using System.Threading.Tasks; - - using Stripe; - using Xunit; - - public class ApplicationFeeRefundServiceTest : BaseStripeTest - { - private const string ApplicationFeeId = "fee_123"; - private const string ApplicationFeeRefundId = "fr_123"; - - private readonly ApplicationFeeRefundService service; - private readonly ApplicationFeeRefundCreateOptions createOptions; - private readonly ApplicationFeeRefundUpdateOptions updateOptions; - private readonly ApplicationFeeRefundListOptions listOptions; - - public ApplicationFeeRefundServiceTest( - StripeMockFixture stripeMockFixture, - MockHttpClientFixture mockHttpClientFixture) - : base(stripeMockFixture, mockHttpClientFixture) - { - this.service = new ApplicationFeeRefundService(this.StripeClient); - - this.createOptions = new ApplicationFeeRefundCreateOptions - { - Amount = 123, - }; - - this.updateOptions = new ApplicationFeeRefundUpdateOptions - { - Metadata = new Dictionary - { - { "key", "value" }, - }, - }; - - this.listOptions = new ApplicationFeeRefundListOptions - { - Limit = 1, - }; - } - - [Fact] - public void Create() - { - var applicationFeeRefund = this.service.Create( - ApplicationFeeId, - this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/application_fees/fee_123/refunds"); - Assert.NotNull(applicationFeeRefund); - Assert.Equal("fee_refund", applicationFeeRefund.Object); - } - - [Fact] - public async Task CreateAsync() - { - var applicationFeeRefund = await this.service.CreateAsync( - ApplicationFeeId, - this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/application_fees/fee_123/refunds"); - Assert.NotNull(applicationFeeRefund); - Assert.Equal("fee_refund", applicationFeeRefund.Object); - } - - [Fact] - public void Get() - { - var applicationFeeRefund = this.service.Get(ApplicationFeeId, ApplicationFeeRefundId); - this.AssertRequest(HttpMethod.Get, "/v1/application_fees/fee_123/refunds/fr_123"); - Assert.NotNull(applicationFeeRefund); - Assert.Equal("fee_refund", applicationFeeRefund.Object); - } - - [Fact] - public async Task GetAsync() - { - var applicationFeeRefund = await this.service.GetAsync(ApplicationFeeId, ApplicationFeeRefundId); - this.AssertRequest(HttpMethod.Get, "/v1/application_fees/fee_123/refunds/fr_123"); - Assert.NotNull(applicationFeeRefund); - Assert.Equal("fee_refund", applicationFeeRefund.Object); - } - - [Fact] - public void List() - { - var applicationFeeRefunds = this.service.List(ApplicationFeeId, this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/application_fees/fee_123/refunds"); - Assert.NotNull(applicationFeeRefunds); - Assert.Equal("list", applicationFeeRefunds.Object); - Assert.Single(applicationFeeRefunds.Data); - Assert.Equal("fee_refund", applicationFeeRefunds.Data[0].Object); - } - - [Fact] - public async Task ListAsync() - { - var applicationFeeRefunds = await this.service.ListAsync(ApplicationFeeId, this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/application_fees/fee_123/refunds"); - Assert.NotNull(applicationFeeRefunds); - Assert.Equal("list", applicationFeeRefunds.Object); - Assert.Single(applicationFeeRefunds.Data); - Assert.Equal("fee_refund", applicationFeeRefunds.Data[0].Object); - } - - [Fact] - public void ListAutoPaging() - { - var applicationFeeRefund = this.service.ListAutoPaging(ApplicationFeeId, this.listOptions).First(); - Assert.NotNull(applicationFeeRefund); - Assert.Equal("fee_refund", applicationFeeRefund.Object); - } - - [Fact] - public async Task ListAutoPagingAsync() - { - var applicationFeeRefund = await this.service.ListAutoPagingAsync(ApplicationFeeId, this.listOptions).FirstAsync(); - Assert.NotNull(applicationFeeRefund); - Assert.Equal("fee_refund", applicationFeeRefund.Object); - } - - [Fact] - public void Update() - { - var applicationFeeRefund = this.service.Update( - ApplicationFeeId, - ApplicationFeeRefundId, - this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/application_fees/fee_123/refunds/fr_123"); - Assert.NotNull(applicationFeeRefund); - Assert.Equal("fee_refund", applicationFeeRefund.Object); - } - - [Fact] - public async Task UpdateAsync() - { - var applicationFeeRefund = await this.service.UpdateAsync( - ApplicationFeeId, - ApplicationFeeRefundId, - this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/application_fees/fee_123/refunds/fr_123"); - Assert.NotNull(applicationFeeRefund); - Assert.Equal("fee_refund", applicationFeeRefund.Object); - } - } -} diff --git a/src/StripeTests/Services/ApplicationFees/ApplicationFeeServiceTest.cs b/src/StripeTests/Services/ApplicationFees/ApplicationFeeServiceTest.cs deleted file mode 100644 index f911c63cb4..0000000000 --- a/src/StripeTests/Services/ApplicationFees/ApplicationFeeServiceTest.cs +++ /dev/null @@ -1,86 +0,0 @@ -namespace StripeTests -{ - using System.Linq; - using System.Net.Http; - using System.Threading.Tasks; - - using Stripe; - using Xunit; - - public class ApplicationFeeServiceTest : BaseStripeTest - { - private const string ApplicationFeeId = "fee_123"; - - private readonly ApplicationFeeService service; - private readonly ApplicationFeeListOptions listOptions; - - public ApplicationFeeServiceTest( - StripeMockFixture stripeMockFixture, - MockHttpClientFixture mockHttpClientFixture) - : base(stripeMockFixture, mockHttpClientFixture) - { - this.service = new ApplicationFeeService(this.StripeClient); - - this.listOptions = new ApplicationFeeListOptions - { - Limit = 1, - }; - } - - [Fact] - public void Get() - { - var applicationFee = this.service.Get(ApplicationFeeId); - this.AssertRequest(HttpMethod.Get, "/v1/application_fees/fee_123"); - Assert.NotNull(applicationFee); - Assert.Equal("application_fee", applicationFee.Object); - } - - [Fact] - public async Task GetAsync() - { - var applicationFee = await this.service.GetAsync(ApplicationFeeId); - this.AssertRequest(HttpMethod.Get, "/v1/application_fees/fee_123"); - Assert.NotNull(applicationFee); - Assert.Equal("application_fee", applicationFee.Object); - } - - [Fact] - public void List() - { - var applicationFees = this.service.List(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/application_fees"); - Assert.NotNull(applicationFees); - Assert.Equal("list", applicationFees.Object); - Assert.Single(applicationFees.Data); - Assert.Equal("application_fee", applicationFees.Data[0].Object); - } - - [Fact] - public async Task ListAsync() - { - var applicationFees = await this.service.ListAsync(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/application_fees"); - Assert.NotNull(applicationFees); - Assert.Equal("list", applicationFees.Object); - Assert.Single(applicationFees.Data); - Assert.Equal("application_fee", applicationFees.Data[0].Object); - } - - [Fact] - public void ListAutoPaging() - { - var applicationFee = this.service.ListAutoPaging(this.listOptions).First(); - Assert.NotNull(applicationFee); - Assert.Equal("application_fee", applicationFee.Object); - } - - [Fact] - public async Task ListAutoPagingAsync() - { - var applicationFee = await this.service.ListAutoPagingAsync(this.listOptions).FirstAsync(); - Assert.NotNull(applicationFee); - Assert.Equal("application_fee", applicationFee.Object); - } - } -} diff --git a/src/StripeTests/Services/BalanceTransactions/BalanceTransactionServiceTest.cs b/src/StripeTests/Services/BalanceTransactions/BalanceTransactionServiceTest.cs deleted file mode 100644 index 0b7db94278..0000000000 --- a/src/StripeTests/Services/BalanceTransactions/BalanceTransactionServiceTest.cs +++ /dev/null @@ -1,86 +0,0 @@ -namespace StripeTests -{ - using System.Linq; - using System.Net.Http; - using System.Threading.Tasks; - - using Stripe; - using Xunit; - - public class BalanceTransactionServiceTest : BaseStripeTest - { - private const string BalanceTransactionId = "txn_123"; - - private readonly BalanceTransactionService service; - private readonly BalanceTransactionListOptions listOptions; - - public BalanceTransactionServiceTest( - StripeMockFixture stripeMockFixture, - MockHttpClientFixture mockHttpClientFixture) - : base(stripeMockFixture, mockHttpClientFixture) - { - this.service = new BalanceTransactionService(this.StripeClient); - - this.listOptions = new BalanceTransactionListOptions - { - Limit = 1, - }; - } - - [Fact] - public void Get() - { - var balanceTransaction = this.service.Get(BalanceTransactionId); - this.AssertRequest(HttpMethod.Get, "/v1/balance_transactions/txn_123"); - Assert.NotNull(balanceTransaction); - Assert.Equal("balance_transaction", balanceTransaction.Object); - } - - [Fact] - public async Task GetAsync() - { - var balanceTransaction = await this.service.GetAsync(BalanceTransactionId); - this.AssertRequest(HttpMethod.Get, "/v1/balance_transactions/txn_123"); - Assert.NotNull(balanceTransaction); - Assert.Equal("balance_transaction", balanceTransaction.Object); - } - - [Fact] - public void List() - { - var balanceTransactions = this.service.List(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/balance_transactions"); - Assert.NotNull(balanceTransactions); - Assert.Equal("list", balanceTransactions.Object); - Assert.Single(balanceTransactions.Data); - Assert.Equal("balance_transaction", balanceTransactions.Data[0].Object); - } - - [Fact] - public async Task ListAsync() - { - var balanceTransactions = await this.service.ListAsync(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/balance_transactions"); - Assert.NotNull(balanceTransactions); - Assert.Equal("list", balanceTransactions.Object); - Assert.Single(balanceTransactions.Data); - Assert.Equal("balance_transaction", balanceTransactions.Data[0].Object); - } - - [Fact] - public void ListAutoPaging() - { - var balanceTransaction = this.service.ListAutoPaging(this.listOptions).First(); - Assert.NotNull(balanceTransaction); - Assert.Equal("balance_transaction", balanceTransaction.Object); - } - - [Fact] - public async Task ListAutoPagingAsync() - { - var balanceTransaction = await this.service.ListAutoPagingAsync(this.listOptions).FirstAsync(); - Assert.NotNull(balanceTransaction); - Assert.Equal("balance_transaction", balanceTransaction.Object); - } - } -} diff --git a/src/StripeTests/Services/BankAccounts/BankAccountListOptionsTest.cs b/src/StripeTests/Services/BankAccounts/BankAccountListOptionsTest.cs deleted file mode 100644 index 2bf23aaac4..0000000000 --- a/src/StripeTests/Services/BankAccounts/BankAccountListOptionsTest.cs +++ /dev/null @@ -1,17 +0,0 @@ -namespace StripeTests -{ - using Stripe; - using Stripe.Infrastructure.FormEncoding; - using Xunit; - - public class BankAccountListOptionsTest : BaseStripeTest - { - [Fact] - public void SerializeObjectProperly() - { - var options = new BankAccountListOptions(); - - Assert.Equal("object=bank_account", ContentEncoder.CreateQueryString(options)); - } - } -} diff --git a/src/StripeTests/Services/BillingPortal/Sessions/ConfigurationServiceTest.cs b/src/StripeTests/Services/BillingPortal/Sessions/ConfigurationServiceTest.cs deleted file mode 100644 index 2ba3abfb04..0000000000 --- a/src/StripeTests/Services/BillingPortal/Sessions/ConfigurationServiceTest.cs +++ /dev/null @@ -1,125 +0,0 @@ -namespace StripeTests.BillingPortal -{ - using System.Collections.Generic; - using System.Linq; - using System.Net.Http; - using System.Threading.Tasks; - - using Stripe; - using Stripe.BillingPortal; - using Xunit; - - public class ConfigurationServiceTest : BaseStripeTest - { - private const string ConfigurationId = "bpc_123"; - private readonly ConfigurationService service; - private readonly ConfigurationCreateOptions createOptions; - private readonly ConfigurationUpdateOptions updateOptions; - private readonly ConfigurationListOptions listOptions; - - public ConfigurationServiceTest( - StripeMockFixture stripeMockFixture, - MockHttpClientFixture mockHttpClientFixture) - : base(stripeMockFixture, mockHttpClientFixture) - { - this.service = new ConfigurationService(this.StripeClient); - - this.createOptions = new ConfigurationCreateOptions - { - BusinessProfile = new ConfigurationBusinessProfileOptions - { - PrivacyPolicyUrl = "https://example.com/privacy", - TermsOfServiceUrl = "https://example.com/tos", - }, - Features = new ConfigurationFeaturesOptions - { - CustomerUpdate = new ConfigurationFeaturesCustomerUpdateOptions - { - AllowedUpdates = new List { "address" }, - Enabled = true, - }, - }, - }; - this.updateOptions = new ConfigurationUpdateOptions - { - Active = false, - }; - this.listOptions = new ConfigurationListOptions - { - Active = true, - }; - } - - [Fact] - public void Create() - { - var configuration = this.service.Create(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/billing_portal/configurations"); - Assert.NotNull(configuration); - Assert.Equal("billing_portal.configuration", configuration.Object); - } - - [Fact] - public void Update() - { - var configuration = this.service.Update("bpc_123", this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/billing_portal/configurations/bpc_123"); - Assert.NotNull(configuration); - Assert.Equal("billing_portal.configuration", configuration.Object); - } - - [Fact] - public async Task CreateAsync() - { - var configuration = await this.service.CreateAsync(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/billing_portal/configurations"); - Assert.NotNull(configuration); - Assert.Equal("billing_portal.configuration", configuration.Object); - } - - [Fact] - public void Get() - { - var configuration = this.service.Get(ConfigurationId); - this.AssertRequest(HttpMethod.Get, "/v1/billing_portal/configurations/bpc_123"); - Assert.NotNull(configuration); - Assert.Equal("billing_portal.configuration", configuration.Object); - } - - [Fact] - public async Task GetAsync() - { - var configuration = await this.service.GetAsync(ConfigurationId); - this.AssertRequest(HttpMethod.Get, "/v1/billing_portal/configurations/bpc_123"); - Assert.NotNull(configuration); - Assert.Equal("billing_portal.configuration", configuration.Object); - } - - [Fact] - public async Task ListAsync() - { - var configurations = await this.service.ListAsync(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/billing_portal/configurations"); - Assert.NotNull(configurations); - Assert.Equal("list", configurations.Object); - Assert.Single(configurations.Data); - Assert.Equal("billing_portal.configuration", configurations.Data[0].Object); - } - - [Fact] - public void ListAutoPaging() - { - var configuration = this.service.ListAutoPaging(this.listOptions).First(); - Assert.NotNull(configuration); - Assert.Equal("billing_portal.configuration", configuration.Object); - } - - [Fact] - public async Task ListAutoPagingAsync() - { - var configuration = await this.service.ListAutoPagingAsync(this.listOptions).FirstAsync(); - Assert.NotNull(configuration); - Assert.Equal("billing_portal.configuration", configuration.Object); - } - } -} diff --git a/src/StripeTests/Services/BillingPortal/Sessions/SessionServiceTest.cs b/src/StripeTests/Services/BillingPortal/Sessions/SessionServiceTest.cs deleted file mode 100644 index c128d4fd32..0000000000 --- a/src/StripeTests/Services/BillingPortal/Sessions/SessionServiceTest.cs +++ /dev/null @@ -1,50 +0,0 @@ -namespace StripeTests.BillingPortal -{ - using System.Collections.Generic; - using System.Linq; - using System.Net.Http; - using System.Threading.Tasks; - - using Stripe; - using Stripe.BillingPortal; - using Xunit; - - public class SessionServiceTest : BaseStripeTest - { - private const string SessionId = "pts_123"; - private readonly SessionService service; - private readonly SessionCreateOptions createOptions; - - public SessionServiceTest( - StripeMockFixture stripeMockFixture, - MockHttpClientFixture mockHttpClientFixture) - : base(stripeMockFixture, mockHttpClientFixture) - { - this.service = new SessionService(this.StripeClient); - - this.createOptions = new SessionCreateOptions - { - Customer = "cus_123", - ReturnUrl = "https://stripe.com/return", - }; - } - - [Fact] - public void Create() - { - var session = this.service.Create(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/billing_portal/sessions"); - Assert.NotNull(session); - Assert.Equal("billing_portal.session", session.Object); - } - - [Fact] - public async Task CreateAsync() - { - var session = await this.service.CreateAsync(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/billing_portal/sessions"); - Assert.NotNull(session); - Assert.Equal("billing_portal.session", session.Object); - } - } -} diff --git a/src/StripeTests/Services/Capabilities/AccountCapabilityServiceTest.cs b/src/StripeTests/Services/Capabilities/AccountCapabilityServiceTest.cs deleted file mode 100644 index 91b89c3360..0000000000 --- a/src/StripeTests/Services/Capabilities/AccountCapabilityServiceTest.cs +++ /dev/null @@ -1,94 +0,0 @@ -namespace StripeTests -{ - using System.Linq; - using System.Net.Http; - using System.Threading.Tasks; - - using Stripe; - using Xunit; - - public class AccountCapabilityServiceTest : BaseStripeTest - { - private const string AccountId = "acct_123"; - private const string CapabilityId = "acap_123"; - - private readonly AccountCapabilityService service; - private readonly AccountCapabilityUpdateOptions updateOptions; - private readonly AccountCapabilityListOptions listOptions; - - public AccountCapabilityServiceTest( - StripeMockFixture stripeMockFixture, - MockHttpClientFixture mockHttpClientFixture) - : base(stripeMockFixture, mockHttpClientFixture) - { - this.service = new AccountCapabilityService(this.StripeClient); - - this.updateOptions = new AccountCapabilityUpdateOptions - { - Requested = true, - }; - - this.listOptions = new AccountCapabilityListOptions - { - }; - } - - [Fact] - public void Get() - { - var capability = this.service.Get(AccountId, CapabilityId); - this.AssertRequest(HttpMethod.Get, "/v1/accounts/acct_123/capabilities/acap_123"); - Assert.NotNull(capability); - Assert.Equal("capability", capability.Object); - } - - [Fact] - public async Task GetAsync() - { - var capability = await this.service.GetAsync(AccountId, CapabilityId); - this.AssertRequest(HttpMethod.Get, "/v1/accounts/acct_123/capabilities/acap_123"); - Assert.NotNull(capability); - Assert.Equal("capability", capability.Object); - } - - [Fact] - public void List() - { - var capabilities = this.service.List(AccountId, this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/accounts/acct_123/capabilities"); - Assert.NotNull(capabilities); - Assert.Equal("list", capabilities.Object); - Assert.Single(capabilities.Data); - Assert.Equal("capability", capabilities.Data[0].Object); - } - - [Fact] - public async Task ListAsync() - { - var capabilities = await this.service.ListAsync(AccountId, this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/accounts/acct_123/capabilities"); - Assert.NotNull(capabilities); - Assert.Equal("list", capabilities.Object); - Assert.Single(capabilities.Data); - Assert.Equal("capability", capabilities.Data[0].Object); - } - - [Fact] - public void Update() - { - var capability = this.service.Update(AccountId, CapabilityId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/accounts/acct_123/capabilities/acap_123"); - Assert.NotNull(capability); - Assert.Equal("capability", capability.Object); - } - - [Fact] - public async Task UpdateAsync() - { - var capability = await this.service.UpdateAsync(AccountId, CapabilityId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/accounts/acct_123/capabilities/acap_123"); - Assert.NotNull(capability); - Assert.Equal("capability", capability.Object); - } - } -} diff --git a/src/StripeTests/Services/Cards/CardListOptionsTest.cs b/src/StripeTests/Services/Cards/CardListOptionsTest.cs deleted file mode 100644 index 42612f1d4e..0000000000 --- a/src/StripeTests/Services/Cards/CardListOptionsTest.cs +++ /dev/null @@ -1,17 +0,0 @@ -namespace StripeTests -{ - using Stripe; - using Stripe.Infrastructure.FormEncoding; - using Xunit; - - public class CardListOptionsTest : BaseStripeTest - { - [Fact] - public void SerializeObjectProperly() - { - var options = new CardListOptions(); - - Assert.Equal("object=card", ContentEncoder.CreateQueryString(options)); - } - } -} diff --git a/src/StripeTests/Services/Charges/ChargeCreateOptionsTest.cs b/src/StripeTests/Services/Charges/ChargeCreateOptionsTest.cs deleted file mode 100644 index 34567632c1..0000000000 --- a/src/StripeTests/Services/Charges/ChargeCreateOptionsTest.cs +++ /dev/null @@ -1,94 +0,0 @@ -namespace StripeTests -{ - using System; - using Stripe; - using Stripe.Infrastructure.FormEncoding; - using Xunit; - - public class ChargeCreateOptionsTest : BaseStripeTest - { - [Fact] - public void Serialize() - { - var testCases = new[] - { - // No data - new - { - data = new ChargeCreateOptions { }, - want = string.Empty, - }, - - // Source is a non-null, non-empty string - new - { - data = new ChargeCreateOptions - { - Source = "tok_visa", - }, - want = "source=tok_visa", - }, - - // Source is a non-null, empty string - new - { - data = new ChargeCreateOptions - { - Source = string.Empty, - }, - want = "source=", - }, - - // Source is a null string - new - { - data = new ChargeCreateOptions - { - Source = (string)null, - }, - want = string.Empty, - }, - - // Source is a non-null CardCreateNestedOptions - new - { - data = new ChargeCreateOptions - { - Source = new CardCreateNestedOptions - { - Number = "4242424242424242", - ExpMonth = 1, - ExpYear = 2030, - }, - }, - want = "source[exp_month]=1&source[exp_year]=2030&source[number]=4242424242424242&source[object]=card", - }, - - // Source is a null CardCreateNestedOptions - new - { - data = new ChargeCreateOptions - { - Source = (CardCreateNestedOptions)null, - }, - want = string.Empty, - }, - - // Source is null - new - { - data = new ChargeCreateOptions - { - Source = null, - }, - want = string.Empty, - }, - }; - - foreach (var testCase in testCases) - { - Assert.Equal(testCase.want, ContentEncoder.CreateQueryString(testCase.data)); - } - } - } -} diff --git a/src/StripeTests/Services/Charges/ChargeServiceTest.cs b/src/StripeTests/Services/Charges/ChargeServiceTest.cs deleted file mode 100644 index 5feacb4634..0000000000 --- a/src/StripeTests/Services/Charges/ChargeServiceTest.cs +++ /dev/null @@ -1,208 +0,0 @@ -namespace StripeTests -{ - using System.Collections.Generic; - using System.Linq; - using System.Net.Http; - using System.Threading.Tasks; - - using Stripe; - using Xunit; - - public class ChargeServiceTest : BaseStripeTest - { - private const string ChargeId = "ch_123"; - - private readonly ChargeService service; - private readonly ChargeCaptureOptions captureOptions; - private readonly ChargeCreateOptions createOptions; - private readonly ChargeUpdateOptions updateOptions; - private readonly ChargeListOptions listOptions; - private readonly ChargeSearchOptions searchOptions; - - public ChargeServiceTest( - StripeMockFixture stripeMockFixture, - MockHttpClientFixture mockHttpClientFixture) - : base(stripeMockFixture, mockHttpClientFixture) - { - this.service = new ChargeService(this.StripeClient); - - this.captureOptions = new ChargeCaptureOptions - { - Amount = 123, - }; - - this.createOptions = new ChargeCreateOptions - { - Amount = 123, - Currency = "usd", - Source = "tok_123", - }; - - this.updateOptions = new ChargeUpdateOptions - { - FraudDetails = new ChargeFraudDetailsOptions - { - UserReport = "safe", - }, - }; - - this.listOptions = new ChargeListOptions - { - Limit = 1, - }; - - this.searchOptions = new ChargeSearchOptions - { - Query = "currency:\"USD\"", - }; - } - - [Fact] - public void Capture() - { - var charge = this.service.Capture(ChargeId, this.captureOptions); - this.AssertRequest(HttpMethod.Post, "/v1/charges/ch_123/capture"); - Assert.NotNull(charge); - Assert.Equal("charge", charge.Object); - } - - [Fact] - public async Task CaptureAsync() - { - var charge = await this.service.CaptureAsync(ChargeId, this.captureOptions); - this.AssertRequest(HttpMethod.Post, "/v1/charges/ch_123/capture"); - Assert.NotNull(charge); - Assert.Equal("charge", charge.Object); - } - - [Fact] - public void Create() - { - var charge = this.service.Create(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/charges"); - Assert.NotNull(charge); - Assert.Equal("charge", charge.Object); - } - - [Fact] - public async Task CreateAsync() - { - var charge = await this.service.CreateAsync(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/charges"); - Assert.NotNull(charge); - Assert.Equal("charge", charge.Object); - } - - [Fact] - public void Get() - { - var charge = this.service.Get(ChargeId); - this.AssertRequest(HttpMethod.Get, "/v1/charges/ch_123"); - Assert.NotNull(charge); - Assert.Equal("charge", charge.Object); - } - - [Fact] - public async Task GetAsync() - { - var charge = await this.service.GetAsync(ChargeId); - this.AssertRequest(HttpMethod.Get, "/v1/charges/ch_123"); - Assert.NotNull(charge); - Assert.Equal("charge", charge.Object); - } - - [Fact] - public void List() - { - var charges = this.service.List(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/charges"); - Assert.NotNull(charges); - Assert.Equal("list", charges.Object); - Assert.Single(charges.Data); - Assert.Equal("charge", charges.Data[0].Object); - } - - [Fact] - public async Task ListAsync() - { - var charges = await this.service.ListAsync(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/charges"); - Assert.NotNull(charges); - Assert.Equal("list", charges.Object); - Assert.Single(charges.Data); - Assert.Equal("charge", charges.Data[0].Object); - } - - [Fact] - public void ListAutoPaging() - { - var charge = this.service.ListAutoPaging(this.listOptions).First(); - Assert.NotNull(charge); - Assert.Equal("charge", charge.Object); - } - - [Fact] - public async Task ListAutoPagingAsync() - { - var charge = await this.service.ListAutoPagingAsync(this.listOptions).FirstAsync(); - Assert.NotNull(charge); - Assert.Equal("charge", charge.Object); - } - - [Fact] - public void Search() - { - var charges = this.service.Search(this.searchOptions); - this.AssertRequest(HttpMethod.Get, "/v1/charges/search"); - Assert.NotNull(charges); - Assert.Equal("search_result", charges.Object); - Assert.Single(charges.Data); - Assert.Equal("charge", charges.Data[0].Object); - } - - [Fact] - public async Task SearchAsync() - { - var charges = await this.service.SearchAsync(this.searchOptions); - this.AssertRequest(HttpMethod.Get, "/v1/charges/search"); - Assert.NotNull(charges); - Assert.Equal("search_result", charges.Object); - Assert.Single(charges.Data); - Assert.Equal("charge", charges.Data[0].Object); - } - - [Fact] - public void SearchAutoPaging() - { - var charge = this.service.SearchAutoPaging(this.searchOptions).Single(); - Assert.NotNull(charge); - Assert.Equal("charge", charge.Object); - } - - [Fact] - public async Task SearchAutoPagingAsync() - { - var charge = await this.service.SearchAutoPagingAsync(this.searchOptions).SingleAsync(); - Assert.NotNull(charge); - Assert.Equal("charge", charge.Object); - } - - [Fact] - public void Update() - { - var charge = this.service.Update(ChargeId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/charges/ch_123"); - Assert.NotNull(charge); - Assert.Equal("charge", charge.Object); - } - - [Fact] - public async Task UpdateAsync() - { - var charge = await this.service.UpdateAsync(ChargeId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/charges/ch_123"); - Assert.NotNull(charge); - Assert.Equal("charge", charge.Object); - } - } -} diff --git a/src/StripeTests/Services/Checkout/SessionServiceTest.cs b/src/StripeTests/Services/Checkout/SessionServiceTest.cs deleted file mode 100644 index 6b46e70c25..0000000000 --- a/src/StripeTests/Services/Checkout/SessionServiceTest.cs +++ /dev/null @@ -1,207 +0,0 @@ -namespace StripeTests.Checkout -{ - using System.Collections.Generic; - using System.Linq; - using System.Net.Http; - using System.Threading.Tasks; - - using Stripe; - using Stripe.Checkout; - using Xunit; - - public class SessionServiceTest : BaseStripeTest - { - private const string SessionId = "cs_123"; - private readonly SessionService service; - private readonly SessionCreateOptions createOptions; - private readonly SessionListOptions listOptions; - private readonly SessionLineItemListOptions listLineItemsOptions; - - public SessionServiceTest( - StripeMockFixture stripeMockFixture, - MockHttpClientFixture mockHttpClientFixture) - : base(stripeMockFixture, mockHttpClientFixture) - { - this.service = new SessionService(this.StripeClient); - - this.createOptions = new SessionCreateOptions - { - CancelUrl = "https://stripe.com/cancel", - ClientReferenceId = "1234", - LineItems = new List - { - new SessionLineItemOptions - { - PriceData = new SessionLineItemPriceDataOptions - { - Currency = "usd", - Product = "prod_123", - UnitAmountDecimal = 0.01234567890m, // Ensure decimals work - }, - Quantity = 2, - }, - new SessionLineItemOptions - { - PriceData = new SessionLineItemPriceDataOptions - { - Currency = "usd", - Product = "prod_ABC", - Recurring = new SessionLineItemPriceDataRecurringOptions - { - Interval = "day", - IntervalCount = 15, - }, - UnitAmountDecimal = 0.01234567890m, // Ensure decimals work - }, - Quantity = 2, - }, - }, - PaymentIntentData = new SessionPaymentIntentDataOptions - { - Description = "description", - Shipping = new ChargeShippingOptions - { - Name = "name", - Phone = "555-555-5555", - Address = new AddressOptions - { - State = "CA", - City = "City", - Line1 = "Line1", - Line2 = "Line2", - PostalCode = "90210", - Country = "US", - }, - }, - }, - PaymentMethodTypes = new List - { - "card", - }, - SuccessUrl = "https://stripe.com/success", - }; - - this.listOptions = new SessionListOptions - { - Limit = 1, - }; - - this.listLineItemsOptions = new SessionLineItemListOptions - { - Limit = 1, - }; - } - - [Fact] - public void Create() - { - var session = this.service.Create(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/checkout/sessions"); - Assert.NotNull(session); - Assert.Equal("checkout.session", session.Object); - } - - [Fact] - public async Task CreateAsync() - { - var session = await this.service.CreateAsync(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/checkout/sessions"); - Assert.NotNull(session); - Assert.Equal("checkout.session", session.Object); - } - - [Fact] - public void Get() - { - var session = this.service.Get(SessionId); - this.AssertRequest(HttpMethod.Get, "/v1/checkout/sessions/cs_123"); - Assert.NotNull(session); - Assert.Equal("checkout.session", session.Object); - } - - [Fact] - public async Task GetAsync() - { - var session = await this.service.GetAsync(SessionId); - this.AssertRequest(HttpMethod.Get, "/v1/checkout/sessions/cs_123"); - Assert.NotNull(session); - Assert.Equal("checkout.session", session.Object); - } - - [Fact] - public void List() - { - var intents = this.service.List(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/checkout/sessions"); - Assert.NotNull(intents); - Assert.Equal("list", intents.Object); - Assert.Single(intents.Data); - Assert.Equal("checkout.session", intents.Data[0].Object); - } - - [Fact] - public async Task ListAsync() - { - var intents = await this.service.ListAsync(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/checkout/sessions"); - Assert.NotNull(intents); - Assert.Equal("list", intents.Object); - Assert.Single(intents.Data); - Assert.Equal("checkout.session", intents.Data[0].Object); - } - - [Fact] - public void ListAutoPaging() - { - var intent = this.service.ListAutoPaging(this.listOptions).First(); - Assert.NotNull(intent); - Assert.Equal("checkout.session", intent.Object); - } - - [Fact] - public async Task ListAutoPagingAsync() - { - var intent = await this.service.ListAutoPagingAsync(this.listOptions).FirstAsync(); - Assert.NotNull(intent); - Assert.Equal("checkout.session", intent.Object); - } - - [Fact] - public void ListLineItems() - { - var lineItems = this.service.LineItems.List(SessionId, this.listLineItemsOptions); - this.AssertRequest(HttpMethod.Get, "/v1/checkout/sessions/cs_123/line_items"); - Assert.NotNull(lineItems); - Assert.Equal("list", lineItems.Object); - Assert.Single(lineItems.Data); - Assert.Equal("item", lineItems.Data[0].Object); - } - - [Fact] - public async Task ListLineItemsAsync() - { - var lineItems = await this.service.LineItems.ListAsync(SessionId, this.listLineItemsOptions); - this.AssertRequest(HttpMethod.Get, "/v1/checkout/sessions/cs_123/line_items"); - Assert.NotNull(lineItems); - Assert.Equal("list", lineItems.Object); - Assert.Single(lineItems.Data); - Assert.Equal("item", lineItems.Data[0].Object); - } - - [Fact] - public void ListLineItemsAutoPaging() - { - var lineItem = this.service.LineItems.ListAutoPaging(SessionId, this.listLineItemsOptions).First(); - Assert.NotNull(lineItem); - Assert.Equal("item", lineItem.Object); - } - - [Fact] - public async Task ListLineItemsAutoPagingAsync() - { - var lineItem = await this.service.LineItems.ListAutoPagingAsync(SessionId, this.listLineItemsOptions).FirstAsync(); - Assert.NotNull(lineItem); - Assert.Equal("item", lineItem.Object); - } - } -} diff --git a/src/StripeTests/Services/CountrySpecs/CountrySpecServiceTest.cs b/src/StripeTests/Services/CountrySpecs/CountrySpecServiceTest.cs deleted file mode 100644 index ad9e1f1282..0000000000 --- a/src/StripeTests/Services/CountrySpecs/CountrySpecServiceTest.cs +++ /dev/null @@ -1,86 +0,0 @@ -namespace StripeTests -{ - using System.Linq; - using System.Net.Http; - using System.Threading.Tasks; - - using Stripe; - using Xunit; - - public class CountrySpecServiceTest : BaseStripeTest - { - private const string CountrySpecId = "US"; - - private readonly CountrySpecService service; - private readonly CountrySpecListOptions listOptions; - - public CountrySpecServiceTest( - StripeMockFixture stripeMockFixture, - MockHttpClientFixture mockHttpClientFixture) - : base(stripeMockFixture, mockHttpClientFixture) - { - this.service = new CountrySpecService(this.StripeClient); - - this.listOptions = new CountrySpecListOptions - { - Limit = 1, - }; - } - - [Fact] - public void Get() - { - var countrySpec = this.service.Get(CountrySpecId); - this.AssertRequest(HttpMethod.Get, "/v1/country_specs/US"); - Assert.NotNull(countrySpec); - Assert.Equal("country_spec", countrySpec.Object); - } - - [Fact] - public async Task GetAsync() - { - var countrySpec = await this.service.GetAsync(CountrySpecId); - this.AssertRequest(HttpMethod.Get, "/v1/country_specs/US"); - Assert.NotNull(countrySpec); - Assert.Equal("country_spec", countrySpec.Object); - } - - [Fact] - public void List() - { - var countrySpecs = this.service.List(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/country_specs"); - Assert.NotNull(countrySpecs); - Assert.Equal("list", countrySpecs.Object); - Assert.Single(countrySpecs.Data); - Assert.Equal("country_spec", countrySpecs.Data[0].Object); - } - - [Fact] - public async Task ListAsync() - { - var countrySpecs = await this.service.ListAsync(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/country_specs"); - Assert.NotNull(countrySpecs); - Assert.Equal("list", countrySpecs.Object); - Assert.Single(countrySpecs.Data); - Assert.Equal("country_spec", countrySpecs.Data[0].Object); - } - - [Fact] - public void ListAutoPaging() - { - var countrySpec = this.service.ListAutoPaging(this.listOptions).First(); - Assert.NotNull(countrySpec); - Assert.Equal("country_spec", countrySpec.Object); - } - - [Fact] - public async Task ListAutoPagingAsync() - { - var countrySpec = await this.service.ListAutoPagingAsync(this.listOptions).FirstAsync(); - Assert.NotNull(countrySpec); - Assert.Equal("country_spec", countrySpec.Object); - } - } -} diff --git a/src/StripeTests/Services/Coupons/CouponCreateOptionsTest.cs b/src/StripeTests/Services/Coupons/CouponCreateOptionsTest.cs deleted file mode 100644 index 28b439cca1..0000000000 --- a/src/StripeTests/Services/Coupons/CouponCreateOptionsTest.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace StripeTests -{ - using Stripe; - using Stripe.Infrastructure.FormEncoding; - using Xunit; - - public class CouponCreateOptionsTest : BaseStripeTest - { - [Fact] - public void Serialize() - { - var options = new CouponCreateOptions - { - PercentOff = 25, - Duration = "forever", - }; - - Assert.Equal("duration=forever&percent_off=25", ContentEncoder.CreateQueryString(options)); - } - } -} diff --git a/src/StripeTests/Services/Coupons/CouponServiceTest.cs b/src/StripeTests/Services/Coupons/CouponServiceTest.cs deleted file mode 100644 index f4a685b18a..0000000000 --- a/src/StripeTests/Services/Coupons/CouponServiceTest.cs +++ /dev/null @@ -1,155 +0,0 @@ -namespace StripeTests -{ - using System.Collections.Generic; - using System.Linq; - using System.Net.Http; - using System.Threading.Tasks; - - using Stripe; - using Xunit; - - public class CouponServiceTest : BaseStripeTest - { - private const string CouponId = "co_123"; - - private readonly CouponService service; - private readonly CouponCreateOptions createOptions; - private readonly CouponUpdateOptions updateOptions; - private readonly CouponListOptions listOptions; - - public CouponServiceTest( - StripeMockFixture stripeMockFixture, - MockHttpClientFixture mockHttpClientFixture) - : base(stripeMockFixture, mockHttpClientFixture) - { - this.service = new CouponService(this.StripeClient); - - this.createOptions = new CouponCreateOptions - { - PercentOff = 25, - Duration = "forever", - }; - - this.updateOptions = new CouponUpdateOptions - { - Metadata = new Dictionary - { - { "key", "value" }, - }, - }; - - this.listOptions = new CouponListOptions - { - Limit = 1, - }; - } - - [Fact] - public void Create() - { - var coupon = this.service.Create(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/coupons"); - Assert.NotNull(coupon); - Assert.Equal("coupon", coupon.Object); - } - - [Fact] - public async Task CreateAsync() - { - var coupon = await this.service.CreateAsync(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/coupons"); - Assert.NotNull(coupon); - Assert.Equal("coupon", coupon.Object); - } - - [Fact] - public void Delete() - { - var deleted = this.service.Delete(CouponId); - this.AssertRequest(HttpMethod.Delete, "/v1/coupons/co_123"); - Assert.NotNull(deleted); - } - - [Fact] - public async Task DeleteAsync() - { - var deleted = await this.service.DeleteAsync(CouponId); - this.AssertRequest(HttpMethod.Delete, "/v1/coupons/co_123"); - Assert.NotNull(deleted); - } - - [Fact] - public void Get() - { - var coupon = this.service.Get(CouponId); - this.AssertRequest(HttpMethod.Get, "/v1/coupons/co_123"); - Assert.NotNull(coupon); - Assert.Equal("coupon", coupon.Object); - } - - [Fact] - public async Task GetAsync() - { - var coupon = await this.service.GetAsync(CouponId); - this.AssertRequest(HttpMethod.Get, "/v1/coupons/co_123"); - Assert.NotNull(coupon); - Assert.Equal("coupon", coupon.Object); - } - - [Fact] - public void List() - { - var coupons = this.service.List(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/coupons"); - Assert.NotNull(coupons); - Assert.Equal("list", coupons.Object); - Assert.Single(coupons.Data); - Assert.Equal("coupon", coupons.Data[0].Object); - } - - [Fact] - public async Task ListAsync() - { - var coupons = await this.service.ListAsync(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/coupons"); - Assert.NotNull(coupons); - Assert.Equal("list", coupons.Object); - Assert.Single(coupons.Data); - Assert.Equal("coupon", coupons.Data[0].Object); - } - - [Fact] - public void ListAutoPaging() - { - var coupon = this.service.ListAutoPaging(this.listOptions).First(); - Assert.NotNull(coupon); - Assert.Equal("coupon", coupon.Object); - } - - [Fact] - public async Task ListAutoPagingAsync() - { - var coupon = await this.service.ListAutoPagingAsync(this.listOptions).FirstAsync(); - Assert.NotNull(coupon); - Assert.Equal("coupon", coupon.Object); - } - - [Fact] - public void Update() - { - var coupon = this.service.Update(CouponId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/coupons/co_123"); - Assert.NotNull(coupon); - Assert.Equal("coupon", coupon.Object); - } - - [Fact] - public async Task UpdateAsync() - { - var coupon = await this.service.UpdateAsync(CouponId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/coupons/co_123"); - Assert.NotNull(coupon); - Assert.Equal("coupon", coupon.Object); - } - } -} diff --git a/src/StripeTests/Services/CreditNotes/CreditNoteServiceTest.cs b/src/StripeTests/Services/CreditNotes/CreditNoteServiceTest.cs deleted file mode 100644 index 23fa4e71bc..0000000000 --- a/src/StripeTests/Services/CreditNotes/CreditNoteServiceTest.cs +++ /dev/null @@ -1,278 +0,0 @@ -namespace StripeTests -{ - using System.Collections.Generic; - using System.Linq; - using System.Net.Http; - using System.Threading.Tasks; - - using Stripe; - using Xunit; - - public class CreditNoteServiceTest : BaseStripeTest - { - private const string CreditNoteId = "cn_123"; - - private readonly CreditNoteService service; - private readonly CreditNoteCreateOptions createOptions; - private readonly CreditNoteUpdateOptions updateOptions; - private readonly CreditNoteListOptions listOptions; - private readonly CreditNoteListLineItemsOptions listLineItemsOptions; - private readonly CreditNotePreviewOptions previewOptions; - private readonly CreditNoteListPreviewLineItemsOptions listPreviewLineItemsOptions; - private readonly CreditNoteVoidOptions voidOptions; - - public CreditNoteServiceTest( - StripeMockFixture stripeMockFixture, - MockHttpClientFixture mockHttpClientFixture) - : base(stripeMockFixture, mockHttpClientFixture) - { - this.service = new CreditNoteService(this.StripeClient); - - this.createOptions = new CreditNoteCreateOptions - { - Amount = 100, - Invoice = "in_123", - Reason = "duplicate", - }; - - this.updateOptions = new CreditNoteUpdateOptions - { - Metadata = new Dictionary - { - { "key", "value" }, - }, - }; - - this.listOptions = new CreditNoteListOptions - { - Limit = 1, - Invoice = "in_123", - }; - - this.listLineItemsOptions = new CreditNoteListLineItemsOptions - { - Limit = 1, - }; - - this.previewOptions = new CreditNotePreviewOptions - { - Amount = 1000, - Invoice = "in_123", - }; - - this.listPreviewLineItemsOptions = new CreditNoteListPreviewLineItemsOptions - { - Amount = 1000, - Invoice = "in_123", - }; - - this.voidOptions = new CreditNoteVoidOptions - { - }; - } - - [Fact] - public void Create() - { - var creditNote = this.service.Create(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/credit_notes"); - Assert.NotNull(creditNote); - Assert.Equal("credit_note", creditNote.Object); - } - - [Fact] - public async Task CreateAsync() - { - var creditNote = await this.service.CreateAsync(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/credit_notes"); - Assert.NotNull(creditNote); - Assert.Equal("credit_note", creditNote.Object); - } - - [Fact] - public void Get() - { - var creditNote = this.service.Get(CreditNoteId); - this.AssertRequest(HttpMethod.Get, "/v1/credit_notes/cn_123"); - Assert.NotNull(creditNote); - Assert.Equal("credit_note", creditNote.Object); - } - - [Fact] - public async Task GetAsync() - { - var creditNote = await this.service.GetAsync(CreditNoteId); - this.AssertRequest(HttpMethod.Get, "/v1/credit_notes/cn_123"); - Assert.NotNull(creditNote); - Assert.Equal("credit_note", creditNote.Object); - } - - [Fact] - public void List() - { - var creditNotes = this.service.List(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/credit_notes"); - Assert.NotNull(creditNotes); - Assert.Equal("list", creditNotes.Object); - Assert.Single(creditNotes.Data); - Assert.Equal("credit_note", creditNotes.Data[0].Object); - } - - [Fact] - public async Task ListAsync() - { - var creditNotes = await this.service.ListAsync(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/credit_notes"); - Assert.NotNull(creditNotes); - Assert.Equal("list", creditNotes.Object); - Assert.Single(creditNotes.Data); - Assert.Equal("credit_note", creditNotes.Data[0].Object); - } - - [Fact] - public void ListAutoPaging() - { - var creditNote = this.service.ListAutoPaging(this.listOptions).First(); - Assert.NotNull(creditNote); - Assert.Equal("credit_note", creditNote.Object); - } - - [Fact] - public async Task ListAutoPagingAsync() - { - var creditNote = await this.service.ListAutoPagingAsync(this.listOptions).FirstAsync(); - Assert.NotNull(creditNote); - Assert.Equal("credit_note", creditNote.Object); - } - - [Fact] - public void ListLineItems() - { - var lineItems = this.service.ListLineItems(CreditNoteId, this.listLineItemsOptions); - this.AssertRequest(HttpMethod.Get, "/v1/credit_notes/cn_123/lines"); - Assert.NotNull(lineItems); - Assert.Equal("list", lineItems.Object); - Assert.Single(lineItems.Data); - Assert.Equal("credit_note_line_item", lineItems.Data[0].Object); - } - - [Fact] - public async Task ListLineItemsAsync() - { - var lineItems = await this.service.ListLineItemsAsync(CreditNoteId, this.listLineItemsOptions); - this.AssertRequest(HttpMethod.Get, "/v1/credit_notes/cn_123/lines"); - Assert.NotNull(lineItems); - Assert.Equal("list", lineItems.Object); - Assert.Single(lineItems.Data); - Assert.Equal("credit_note_line_item", lineItems.Data[0].Object); - } - - [Fact] - public void ListLineItemsAutoPaging() - { - var lineItem = this.service.ListLineItemsAutoPaging(CreditNoteId, this.listLineItemsOptions).First(); - Assert.NotNull(lineItem); - Assert.Equal("credit_note_line_item", lineItem.Object); - } - - [Fact] - public async Task ListLineItemsAutoPagingAsync() - { - var lineItem = await this.service.ListLineItemsAutoPagingAsync(CreditNoteId, this.listLineItemsOptions).FirstAsync(); - Assert.NotNull(lineItem); - Assert.Equal("credit_note_line_item", lineItem.Object); - } - - [Fact] - public void Preview() - { - var creditNote = this.service.Preview(this.previewOptions); - this.AssertRequest(HttpMethod.Get, "/v1/credit_notes/preview"); - Assert.NotNull(creditNote); - Assert.Equal("credit_note", creditNote.Object); - } - - [Fact] - public async Task PreviewAsync() - { - var creditNote = await this.service.PreviewAsync(this.previewOptions); - this.AssertRequest(HttpMethod.Get, "/v1/credit_notes/preview"); - Assert.NotNull(creditNote); - Assert.Equal("credit_note", creditNote.Object); - } - - [Fact] - public void ListPreviewLineItems() - { - var lineItems = this.service.ListPreviewLineItems(this.listPreviewLineItemsOptions); - this.AssertRequest(HttpMethod.Get, "/v1/credit_notes/preview/lines"); - Assert.NotNull(lineItems); - Assert.Equal("list", lineItems.Object); - Assert.Single(lineItems.Data); - Assert.Equal("credit_note_line_item", lineItems.Data[0].Object); - } - - [Fact] - public async Task ListPreviewLineItemsAsync() - { - var lineItems = await this.service.ListPreviewLineItemsAsync(this.listPreviewLineItemsOptions); - this.AssertRequest(HttpMethod.Get, "/v1/credit_notes/preview/lines"); - Assert.NotNull(lineItems); - Assert.Equal("list", lineItems.Object); - Assert.Single(lineItems.Data); - Assert.Equal("credit_note_line_item", lineItems.Data[0].Object); - } - - [Fact] - public void ListPreviewLineItemsAutoPaging() - { - var lineItem = this.service.ListPreviewLineItemsAutoPaging(this.listPreviewLineItemsOptions).First(); - Assert.NotNull(lineItem); - Assert.Equal("credit_note_line_item", lineItem.Object); - } - - [Fact] - public async Task ListPreviewLineItemsAutoPagingAsync() - { - var lineItem = await this.service.ListPreviewLineItemsAutoPagingAsync(this.listPreviewLineItemsOptions).FirstAsync(); - Assert.NotNull(lineItem); - Assert.Equal("credit_note_line_item", lineItem.Object); - } - - [Fact] - public void Update() - { - var creditNote = this.service.Update(CreditNoteId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/credit_notes/cn_123"); - Assert.NotNull(creditNote); - Assert.Equal("credit_note", creditNote.Object); - } - - [Fact] - public async Task UpdateAsync() - { - var creditNote = await this.service.UpdateAsync(CreditNoteId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/credit_notes/cn_123"); - Assert.NotNull(creditNote); - Assert.Equal("credit_note", creditNote.Object); - } - - [Fact] - public void VoidCreditNote() - { - var creditNote = this.service.VoidCreditNote(CreditNoteId, this.voidOptions); - this.AssertRequest(HttpMethod.Post, "/v1/credit_notes/cn_123/void"); - Assert.NotNull(creditNote); - Assert.Equal("credit_note", creditNote.Object); - } - - [Fact] - public async Task VoidCreditNoteAsync() - { - var creditNote = await this.service.VoidCreditNoteAsync(CreditNoteId, this.voidOptions); - this.AssertRequest(HttpMethod.Post, "/v1/credit_notes/cn_123/void"); - Assert.NotNull(creditNote); - Assert.Equal("credit_note", creditNote.Object); - } - } -} diff --git a/src/StripeTests/Services/CustomerBalanceTransactions/CustomerBalanceTransactionServiceTest.cs b/src/StripeTests/Services/CustomerBalanceTransactions/CustomerBalanceTransactionServiceTest.cs deleted file mode 100644 index 5790a3d72f..0000000000 --- a/src/StripeTests/Services/CustomerBalanceTransactions/CustomerBalanceTransactionServiceTest.cs +++ /dev/null @@ -1,136 +0,0 @@ -namespace StripeTests -{ - using System.Linq; - using System.Net.Http; - using System.Threading.Tasks; - - using Stripe; - using Xunit; - - public class CustomerBalanceTransactionServiceTest : BaseStripeTest - { - private const string CustomerId = "cus_123"; - private const string CustomerBalanceTransactionId = "cbtxn_123"; - - private readonly CustomerBalanceTransactionService service; - private readonly CustomerBalanceTransactionCreateOptions createOptions; - private readonly CustomerBalanceTransactionListOptions listOptions; - private readonly CustomerBalanceTransactionUpdateOptions updateOptions; - - public CustomerBalanceTransactionServiceTest( - StripeMockFixture stripeMockFixture, - MockHttpClientFixture mockHttpClientFixture) - : base(stripeMockFixture, mockHttpClientFixture) - { - this.service = new CustomerBalanceTransactionService(this.StripeClient); - - this.createOptions = new CustomerBalanceTransactionCreateOptions - { - Amount = 1234, - Currency = "usd", - }; - - this.listOptions = new CustomerBalanceTransactionListOptions - { - Limit = 1, - }; - - this.updateOptions = new CustomerBalanceTransactionUpdateOptions - { - Description = "description", - }; - } - - [Fact] - public void Create() - { - var transaction = this.service.Create(CustomerId, this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/customers/cus_123/balance_transactions"); - Assert.NotNull(transaction); - Assert.Equal("customer_balance_transaction", transaction.Object); - } - - [Fact] - public async Task CreateAsync() - { - var transaction = await this.service.CreateAsync(CustomerId, this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/customers/cus_123/balance_transactions"); - Assert.NotNull(transaction); - Assert.Equal("customer_balance_transaction", transaction.Object); - } - - [Fact] - public void Get() - { - var transaction = this.service.Get(CustomerId, CustomerBalanceTransactionId); - this.AssertRequest(HttpMethod.Get, "/v1/customers/cus_123/balance_transactions/cbtxn_123"); - Assert.NotNull(transaction); - Assert.Equal("customer_balance_transaction", transaction.Object); - } - - [Fact] - public async Task GetAsync() - { - var transaction = await this.service.GetAsync(CustomerId, CustomerBalanceTransactionId); - this.AssertRequest(HttpMethod.Get, "/v1/customers/cus_123/balance_transactions/cbtxn_123"); - Assert.NotNull(transaction); - Assert.Equal("customer_balance_transaction", transaction.Object); - } - - [Fact] - public void List() - { - var transactions = this.service.List(CustomerId, this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/customers/cus_123/balance_transactions"); - Assert.NotNull(transactions); - Assert.Equal("list", transactions.Object); - Assert.Single(transactions.Data); - Assert.Equal("customer_balance_transaction", transactions.Data[0].Object); - } - - [Fact] - public async Task ListAsync() - { - var transactions = await this.service.ListAsync(CustomerId, this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/customers/cus_123/balance_transactions"); - Assert.NotNull(transactions); - Assert.Equal("list", transactions.Object); - Assert.Single(transactions.Data); - Assert.Equal("customer_balance_transaction", transactions.Data[0].Object); - } - - [Fact] - public void ListAutoPaging() - { - var transaction = this.service.ListAutoPaging(CustomerId, this.listOptions).First(); - Assert.NotNull(transaction); - Assert.Equal("customer_balance_transaction", transaction.Object); - } - - [Fact] - public async Task ListAutoPagingAsync() - { - var transaction = await this.service.ListAutoPagingAsync(CustomerId, this.listOptions).FirstAsync(); - Assert.NotNull(transaction); - Assert.Equal("customer_balance_transaction", transaction.Object); - } - - [Fact] - public void Update() - { - var customer = this.service.Update(CustomerId, CustomerBalanceTransactionId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/customers/cus_123/balance_transactions/cbtxn_123"); - Assert.NotNull(customer); - Assert.Equal("customer_balance_transaction", customer.Object); - } - - [Fact] - public async Task UpdateAsync() - { - var customer = await this.service.UpdateAsync(CustomerId, CustomerBalanceTransactionId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/customers/cus_123/balance_transactions/cbtxn_123"); - Assert.NotNull(customer); - Assert.Equal("customer_balance_transaction", customer.Object); - } - } -} diff --git a/src/StripeTests/Services/Customers/CustomerServiceTest.cs b/src/StripeTests/Services/Customers/CustomerServiceTest.cs deleted file mode 100644 index dcc8664ffe..0000000000 --- a/src/StripeTests/Services/Customers/CustomerServiceTest.cs +++ /dev/null @@ -1,155 +0,0 @@ -namespace StripeTests -{ - using System.Collections.Generic; - using System.Linq; - using System.Net.Http; - using System.Threading.Tasks; - - using Stripe; - using Xunit; - - public class CustomerServiceTest : BaseStripeTest - { - private const string CustomerId = "cus_123"; - - private readonly CustomerService service; - private readonly CustomerCreateOptions createOptions; - private readonly CustomerUpdateOptions updateOptions; - private readonly CustomerListOptions listOptions; - - public CustomerServiceTest( - StripeMockFixture stripeMockFixture, - MockHttpClientFixture mockHttpClientFixture) - : base(stripeMockFixture, mockHttpClientFixture) - { - this.service = new CustomerService(this.StripeClient); - - this.createOptions = new CustomerCreateOptions - { - Email = "example@example.com", - Source = "tok_123", - }; - - this.updateOptions = new CustomerUpdateOptions - { - Metadata = new Dictionary - { - { "key", "value" }, - }, - }; - - this.listOptions = new CustomerListOptions - { - Limit = 1, - }; - } - - [Fact] - public void Create() - { - var customer = this.service.Create(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/customers"); - Assert.NotNull(customer); - Assert.Equal("customer", customer.Object); - } - - [Fact] - public async Task CreateAsync() - { - var customer = await this.service.CreateAsync(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/customers"); - Assert.NotNull(customer); - Assert.Equal("customer", customer.Object); - } - - [Fact] - public void Delete() - { - var deleted = this.service.Delete(CustomerId); - this.AssertRequest(HttpMethod.Delete, "/v1/customers/cus_123"); - Assert.NotNull(deleted); - } - - [Fact] - public async Task DeleteAsync() - { - var deleted = await this.service.DeleteAsync(CustomerId); - this.AssertRequest(HttpMethod.Delete, "/v1/customers/cus_123"); - Assert.NotNull(deleted); - } - - [Fact] - public void Get() - { - var customer = this.service.Get(CustomerId); - this.AssertRequest(HttpMethod.Get, "/v1/customers/cus_123"); - Assert.NotNull(customer); - Assert.Equal("customer", customer.Object); - } - - [Fact] - public async Task GetAsync() - { - var customer = await this.service.GetAsync(CustomerId); - this.AssertRequest(HttpMethod.Get, "/v1/customers/cus_123"); - Assert.NotNull(customer); - Assert.Equal("customer", customer.Object); - } - - [Fact] - public void List() - { - var customers = this.service.List(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/customers"); - Assert.NotNull(customers); - Assert.Equal("list", customers.Object); - Assert.Single(customers.Data); - Assert.Equal("customer", customers.Data[0].Object); - } - - [Fact] - public async Task ListAsync() - { - var customers = await this.service.ListAsync(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/customers"); - Assert.NotNull(customers); - Assert.Equal("list", customers.Object); - Assert.Single(customers.Data); - Assert.Equal("customer", customers.Data[0].Object); - } - - [Fact] - public void ListAutoPaging() - { - var customer = this.service.ListAutoPaging(this.listOptions).First(); - Assert.NotNull(customer); - Assert.Equal("customer", customer.Object); - } - - [Fact] - public async Task ListAutoPagingAsync() - { - var customer = await this.service.ListAutoPagingAsync(this.listOptions).FirstAsync(); - Assert.NotNull(customer); - Assert.Equal("customer", customer.Object); - } - - [Fact] - public void Update() - { - var customer = this.service.Update(CustomerId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/customers/cus_123"); - Assert.NotNull(customer); - Assert.Equal("customer", customer.Object); - } - - [Fact] - public async Task UpdateAsync() - { - var customer = await this.service.UpdateAsync(CustomerId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/customers/cus_123"); - Assert.NotNull(customer); - Assert.Equal("customer", customer.Object); - } - } -} diff --git a/src/StripeTests/Services/Disputes/DisputeServiceTest.cs b/src/StripeTests/Services/Disputes/DisputeServiceTest.cs deleted file mode 100644 index 33753dd878..0000000000 --- a/src/StripeTests/Services/Disputes/DisputeServiceTest.cs +++ /dev/null @@ -1,132 +0,0 @@ -namespace StripeTests -{ - using System.Collections.Generic; - using System.Linq; - using System.Net.Http; - using System.Threading.Tasks; - - using Stripe; - using Xunit; - - public class DisputeServiceTest : BaseStripeTest - { - private const string DisputeId = "dp_123"; - - private readonly DisputeService service; - private readonly DisputeUpdateOptions updateOptions; - private readonly DisputeListOptions listOptions; - - public DisputeServiceTest( - StripeMockFixture stripeMockFixture, - MockHttpClientFixture mockHttpClientFixture) - : base(stripeMockFixture, mockHttpClientFixture) - { - this.service = new DisputeService(this.StripeClient); - - this.updateOptions = new DisputeUpdateOptions - { - Metadata = new Dictionary - { - { "key", "value" }, - }, - }; - - this.listOptions = new DisputeListOptions - { - Limit = 1, - }; - } - - [Fact] - public void Close() - { - var dispute = this.service.Close(DisputeId); - this.AssertRequest(HttpMethod.Post, "/v1/disputes/dp_123/close"); - Assert.NotNull(dispute); - Assert.Equal("dispute", dispute.Object); - } - - [Fact] - public async Task CloseAsync() - { - var dispute = await this.service.CloseAsync(DisputeId); - this.AssertRequest(HttpMethod.Post, "/v1/disputes/dp_123/close"); - Assert.NotNull(dispute); - Assert.Equal("dispute", dispute.Object); - } - - [Fact] - public void Get() - { - var dispute = this.service.Get(DisputeId); - this.AssertRequest(HttpMethod.Get, "/v1/disputes/dp_123"); - Assert.NotNull(dispute); - Assert.Equal("dispute", dispute.Object); - } - - [Fact] - public async Task GetAsync() - { - var dispute = await this.service.GetAsync(DisputeId); - this.AssertRequest(HttpMethod.Get, "/v1/disputes/dp_123"); - Assert.NotNull(dispute); - Assert.Equal("dispute", dispute.Object); - } - - [Fact] - public void List() - { - var disputes = this.service.List(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/disputes"); - Assert.NotNull(disputes); - Assert.Equal("list", disputes.Object); - Assert.Single(disputes.Data); - Assert.Equal("dispute", disputes.Data[0].Object); - } - - [Fact] - public async Task ListAsync() - { - var disputes = await this.service.ListAsync(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/disputes"); - Assert.NotNull(disputes); - Assert.Equal("list", disputes.Object); - Assert.Single(disputes.Data); - Assert.Equal("dispute", disputes.Data[0].Object); - } - - [Fact] - public void ListAutoPaging() - { - var dispute = this.service.ListAutoPaging(this.listOptions).First(); - Assert.NotNull(dispute); - Assert.Equal("dispute", dispute.Object); - } - - [Fact] - public async Task ListAutoPagingAsync() - { - var dispute = await this.service.ListAutoPagingAsync(this.listOptions).FirstAsync(); - Assert.NotNull(dispute); - Assert.Equal("dispute", dispute.Object); - } - - [Fact] - public void Update() - { - var dispute = this.service.Update(DisputeId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/disputes/dp_123"); - Assert.NotNull(dispute); - Assert.Equal("dispute", dispute.Object); - } - - [Fact] - public async Task UpdateAsync() - { - var dispute = await this.service.UpdateAsync(DisputeId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/disputes/dp_123"); - Assert.NotNull(dispute); - Assert.Equal("dispute", dispute.Object); - } - } -} diff --git a/src/StripeTests/Services/Events/EventServiceTest.cs b/src/StripeTests/Services/Events/EventServiceTest.cs deleted file mode 100644 index e6aeeb3a12..0000000000 --- a/src/StripeTests/Services/Events/EventServiceTest.cs +++ /dev/null @@ -1,86 +0,0 @@ -namespace StripeTests -{ - using System.Linq; - using System.Net.Http; - using System.Threading.Tasks; - - using Stripe; - using Xunit; - - public class EventServiceTest : BaseStripeTest - { - private const string EventId = "evt_123"; - - private readonly EventService service; - private readonly EventListOptions listOptions; - - public EventServiceTest( - StripeMockFixture stripeMockFixture, - MockHttpClientFixture mockHttpClientFixture) - : base(stripeMockFixture, mockHttpClientFixture) - { - this.service = new EventService(this.StripeClient); - - this.listOptions = new EventListOptions - { - Limit = 1, - }; - } - - [Fact] - public void Get() - { - var evt = this.service.Get(EventId); - this.AssertRequest(HttpMethod.Get, "/v1/events/evt_123"); - Assert.NotNull(evt); - Assert.Equal("event", evt.Object); - } - - [Fact] - public async Task GetAsync() - { - var evt = await this.service.GetAsync(EventId); - this.AssertRequest(HttpMethod.Get, "/v1/events/evt_123"); - Assert.NotNull(evt); - Assert.Equal("event", evt.Object); - } - - [Fact] - public void List() - { - var events = this.service.List(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/events"); - Assert.NotNull(events); - Assert.Equal("list", events.Object); - Assert.Single(events.Data); - Assert.Equal("event", events.Data[0].Object); - } - - [Fact] - public async Task ListAsync() - { - var events = await this.service.ListAsync(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/events"); - Assert.NotNull(events); - Assert.Equal("list", events.Object); - Assert.Single(events.Data); - Assert.Equal("event", events.Data[0].Object); - } - - [Fact] - public void ListAutoPaging() - { - var evt = this.service.ListAutoPaging(this.listOptions).First(); - Assert.NotNull(evt); - Assert.Equal("event", evt.Object); - } - - [Fact] - public async Task ListAutoPagingAsync() - { - var evt = await this.service.ListAutoPagingAsync(this.listOptions).FirstAsync(); - Assert.NotNull(evt); - Assert.Equal("event", evt.Object); - } - } -} diff --git a/src/StripeTests/Services/FileLinks/FileLinkServiceTest.cs b/src/StripeTests/Services/FileLinks/FileLinkServiceTest.cs deleted file mode 100644 index 3cf452b6d2..0000000000 --- a/src/StripeTests/Services/FileLinks/FileLinkServiceTest.cs +++ /dev/null @@ -1,139 +0,0 @@ -namespace StripeTests -{ - using System.Collections.Generic; - using System.Linq; - using System.Net.Http; - using System.Threading.Tasks; - - using Stripe; - using Xunit; - - public class FileLinkServiceTest : BaseStripeTest - { - private const string FileLinkId = "link_123"; - - private readonly FileLinkService service; - private readonly FileLinkCreateOptions createOptions; - private readonly FileLinkUpdateOptions updateOptions; - private readonly FileLinkListOptions listOptions; - - public FileLinkServiceTest( - StripeMockFixture stripeMockFixture, - MockHttpClientFixture mockHttpClientFixture) - : base(stripeMockFixture, mockHttpClientFixture) - { - this.service = new FileLinkService(this.StripeClient); - - this.createOptions = new FileLinkCreateOptions - { - File = "file_123", - }; - - this.updateOptions = new FileLinkUpdateOptions - { - Metadata = new Dictionary - { - { "key", "value" }, - }, - }; - - this.listOptions = new FileLinkListOptions - { - File = "file_123", - Limit = 1, - }; - } - - [Fact] - public void Create() - { - var fileLink = this.service.Create(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/file_links"); - Assert.NotNull(fileLink); - Assert.Equal("file_link", fileLink.Object); - } - - [Fact] - public async Task CreateAsync() - { - var fileLink = await this.service.CreateAsync(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/file_links"); - Assert.NotNull(fileLink); - Assert.Equal("file_link", fileLink.Object); - } - - [Fact] - public void Get() - { - var fileLink = this.service.Get(FileLinkId); - this.AssertRequest(HttpMethod.Get, "/v1/file_links/link_123"); - Assert.NotNull(fileLink); - Assert.Equal("file_link", fileLink.Object); - } - - [Fact] - public async Task GetAsync() - { - var fileLink = await this.service.GetAsync(FileLinkId); - this.AssertRequest(HttpMethod.Get, "/v1/file_links/link_123"); - Assert.NotNull(fileLink); - Assert.Equal("file_link", fileLink.Object); - } - - [Fact] - public void List() - { - var fileLinks = this.service.List(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/file_links"); - Assert.NotNull(fileLinks); - Assert.Equal("list", fileLinks.Object); - Assert.Single(fileLinks.Data); - Assert.Equal("file_link", fileLinks.Data[0].Object); - } - - [Fact] - public async Task ListAsync() - { - var fileLinks = await this.service.ListAsync(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/file_links"); - Assert.NotNull(fileLinks); - Assert.Equal("list", fileLinks.Object); - Assert.Single(fileLinks.Data); - Assert.Equal("file_link", fileLinks.Data[0].Object); - } - - [Fact] - public void ListAutoPaging() - { - var domain = this.service.ListAutoPaging(this.listOptions).First(); - Assert.NotNull(domain); - Assert.Equal("file_link", domain.Object); - } - - [Fact] - public async Task ListAutoPagingAsync() - { - var domain = await this.service.ListAutoPagingAsync(this.listOptions).FirstAsync(); - Assert.NotNull(domain); - Assert.Equal("file_link", domain.Object); - } - - [Fact] - public void Update() - { - var fileLink = this.service.Update(FileLinkId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/file_links/link_123"); - Assert.NotNull(fileLink); - Assert.Equal("file_link", fileLink.Object); - } - - [Fact] - public async Task UpdateAsync() - { - var fileLink = await this.service.UpdateAsync(FileLinkId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/file_links/link_123"); - Assert.NotNull(fileLink); - Assert.Equal("file_link", fileLink.Object); - } - } -} diff --git a/src/StripeTests/Services/GeneratedExamplesTest.cs b/src/StripeTests/Services/GeneratedExamplesTest.cs index 8c086cfc4f..1f06c60481 100644 --- a/src/StripeTests/Services/GeneratedExamplesTest.cs +++ b/src/StripeTests/Services/GeneratedExamplesTest.cs @@ -34,6 +34,21 @@ public void TestAccountLinksPost() this.AssertRequest(HttpMethod.Post, "/v1/account_links"); } + [Fact] + public async Task TestAccountLinksPostAsync() + { + var options = new AccountLinkCreateOptions + { + Account = "acct_xxxxxxxxxxxxx", + RefreshUrl = "https://example.com/reauth", + ReturnUrl = "https://example.com/return", + Type = "account_onboarding", + }; + var service = new AccountLinkService(this.StripeClient); + AccountLink accountLink = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/account_links"); + } + [Fact] public void TestAccountsCapabilitiesGet() { @@ -45,6 +60,17 @@ public void TestAccountsCapabilitiesGet() "/v1/accounts/acct_xxxxxxxxxxxxx/capabilities"); } + [Fact] + public async Task TestAccountsCapabilitiesGetAsync() + { + var service = new AccountCapabilityService(this.StripeClient); + StripeList capabilities = await service.ListAsync( + "acct_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/accounts/acct_xxxxxxxxxxxxx/capabilities"); + } + [Fact] public void TestAccountsCapabilitiesGet2() { @@ -57,6 +83,18 @@ public void TestAccountsCapabilitiesGet2() "/v1/accounts/acct_xxxxxxxxxxxxx/capabilities/card_payments"); } + [Fact] + public async Task TestAccountsCapabilitiesGet2Async() + { + var service = new AccountCapabilityService(this.StripeClient); + Capability capability = await service.GetAsync( + "acct_xxxxxxxxxxxxx", + "card_payments"); + this.AssertRequest( + HttpMethod.Get, + "/v1/accounts/acct_xxxxxxxxxxxxx/capabilities/card_payments"); + } + [Fact] public void TestAccountsCapabilitiesPost() { @@ -74,6 +112,23 @@ public void TestAccountsCapabilitiesPost() "/v1/accounts/acct_xxxxxxxxxxxxx/capabilities/card_payments"); } + [Fact] + public async Task TestAccountsCapabilitiesPostAsync() + { + var options = new AccountCapabilityUpdateOptions + { + Requested = true, + }; + var service = new AccountCapabilityService(this.StripeClient); + Capability capability = await service.UpdateAsync( + "acct_xxxxxxxxxxxxx", + "card_payments", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/accounts/acct_xxxxxxxxxxxxx/capabilities/card_payments"); + } + [Fact] public void TestAccountsDelete() { @@ -84,6 +139,16 @@ public void TestAccountsDelete() "/v1/accounts/acct_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestAccountsDeleteAsync() + { + var service = new AccountService(this.StripeClient); + Account deleted = await service.DeleteAsync("acct_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Delete, + "/v1/accounts/acct_xxxxxxxxxxxxx"); + } + [Fact] public void TestAccountsGet() { @@ -93,6 +158,34 @@ public void TestAccountsGet() this.AssertRequest(HttpMethod.Get, "/v1/accounts", "limit=3"); } + [Fact] + public async Task TestAccountsGetAsync() + { + var options = new AccountListOptions { Limit = 3 }; + var service = new AccountService(this.StripeClient); + StripeList accounts = await service.ListAsync(options); + this.AssertRequest(HttpMethod.Get, "/v1/accounts", "limit=3"); + } + + [Fact] + public void TestAccountsGetAutoPaging() + { + var options = new AccountListOptions { Limit = 3 }; + var service = new AccountService(this.StripeClient); + var account = service.ListAutoPaging(options).First(); + this.AssertRequest(HttpMethod.Get, "/v1/accounts", "limit=3"); + } + + [Fact] + public async Task TestAccountsGetAutoPagingAsync() + { + var options = new AccountListOptions { Limit = 3 }; + var service = new AccountService(this.StripeClient); + var account = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/accounts", "limit=3"); + } + [Fact] public void TestAccountsGet2() { @@ -103,6 +196,16 @@ public void TestAccountsGet2() "/v1/accounts/acct_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestAccountsGet2Async() + { + var service = new AccountService(this.StripeClient); + Account account = await service.GetAsync("acct_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/accounts/acct_xxxxxxxxxxxxx"); + } + [Fact] public void TestAccountsLoginLinksPost() { @@ -113,6 +216,17 @@ public void TestAccountsLoginLinksPost() "/v1/accounts/acct_xxxxxxxxxxxxx/login_links"); } + [Fact] + public async Task TestAccountsLoginLinksPostAsync() + { + var service = new AccountLoginLinkService(this.StripeClient); + LoginLink loginLink = await service.CreateAsync( + "acct_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/accounts/acct_xxxxxxxxxxxxx/login_links"); + } + [Fact] public void TestAccountsPersonsDelete() { @@ -125,6 +239,18 @@ public void TestAccountsPersonsDelete() "/v1/accounts/acct_xxxxxxxxxxxxx/persons/person_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestAccountsPersonsDeleteAsync() + { + var service = new AccountPersonService(this.StripeClient); + Person deleted = await service.DeleteAsync( + "acct_xxxxxxxxxxxxx", + "person_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Delete, + "/v1/accounts/acct_xxxxxxxxxxxxx/persons/person_xxxxxxxxxxxxx"); + } + [Fact] public void TestAccountsPersonsGet() { @@ -139,6 +265,48 @@ public void TestAccountsPersonsGet() "limit=3"); } + [Fact] + public async Task TestAccountsPersonsGetAsync() + { + var options = new AccountPersonListOptions { Limit = 3 }; + var service = new AccountPersonService(this.StripeClient); + StripeList persons = await service.ListAsync( + "acct_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Get, + "/v1/accounts/acct_xxxxxxxxxxxxx/persons", + "limit=3"); + } + + [Fact] + public void TestAccountsPersonsGetAutoPaging() + { + var options = new AccountPersonListOptions { Limit = 3 }; + var service = new AccountPersonService(this.StripeClient); + var person = service.ListAutoPaging("acct_xxxxxxxxxxxxx", options) + .First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/accounts/acct_xxxxxxxxxxxxx/persons", + "limit=3"); + } + + [Fact] + public async Task TestAccountsPersonsGetAutoPagingAsync() + { + var options = new AccountPersonListOptions { Limit = 3 }; + var service = new AccountPersonService(this.StripeClient); + var person = await service.ListAutoPagingAsync( + "acct_xxxxxxxxxxxxx", + options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/accounts/acct_xxxxxxxxxxxxx/persons", + "limit=3"); + } + [Fact] public void TestAccountsPersonsGet2() { @@ -151,6 +319,18 @@ public void TestAccountsPersonsGet2() "/v1/accounts/acct_xxxxxxxxxxxxx/persons/person_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestAccountsPersonsGet2Async() + { + var service = new AccountPersonService(this.StripeClient); + Person person = await service.GetAsync( + "acct_xxxxxxxxxxxxx", + "person_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/accounts/acct_xxxxxxxxxxxxx/persons/person_xxxxxxxxxxxxx"); + } + [Fact] public void TestAccountsPersonsPost() { @@ -166,6 +346,23 @@ public void TestAccountsPersonsPost() "/v1/accounts/acct_xxxxxxxxxxxxx/persons"); } + [Fact] + public async Task TestAccountsPersonsPostAsync() + { + var options = new AccountPersonCreateOptions + { + FirstName = "Jane", + LastName = "Diaz", + }; + var service = new AccountPersonService(this.StripeClient); + Person person = await service.CreateAsync( + "acct_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/accounts/acct_xxxxxxxxxxxxx/persons"); + } + [Fact] public void TestAccountsPersonsPost2() { @@ -186,6 +383,26 @@ public void TestAccountsPersonsPost2() "/v1/accounts/acct_xxxxxxxxxxxxx/persons/person_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestAccountsPersonsPost2Async() + { + var options = new AccountPersonUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new AccountPersonService(this.StripeClient); + Person person = await service.UpdateAsync( + "acct_xxxxxxxxxxxxx", + "person_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/accounts/acct_xxxxxxxxxxxxx/persons/person_xxxxxxxxxxxxx"); + } + [Fact] public void TestAccountsPost() { @@ -211,6 +428,31 @@ public void TestAccountsPost() this.AssertRequest(HttpMethod.Post, "/v1/accounts"); } + [Fact] + public async Task TestAccountsPostAsync() + { + var options = new AccountCreateOptions + { + Type = "custom", + Country = "US", + Email = "jenny.rosen@example.com", + Capabilities = new AccountCapabilitiesOptions + { + CardPayments = new AccountCapabilitiesCardPaymentsOptions + { + Requested = true, + }, + Transfers = new AccountCapabilitiesTransfersOptions + { + Requested = true, + }, + }, + }; + var service = new AccountService(this.StripeClient); + Account account = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/accounts"); + } + [Fact] public void TestAccountsPost2() { @@ -228,6 +470,25 @@ public void TestAccountsPost2() "/v1/accounts/acct_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestAccountsPost2Async() + { + var options = new AccountUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new AccountService(this.StripeClient); + Account account = await service.UpdateAsync( + "acct_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/accounts/acct_xxxxxxxxxxxxx"); + } + [Fact] public void TestAccountsRejectPost() { @@ -239,6 +500,19 @@ public void TestAccountsRejectPost() "/v1/accounts/acct_xxxxxxxxxxxxx/reject"); } + [Fact] + public async Task TestAccountsRejectPostAsync() + { + var options = new AccountRejectOptions { Reason = "fraud" }; + var service = new AccountService(this.StripeClient); + Account account = await service.RejectAsync( + "acct_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/accounts/acct_xxxxxxxxxxxxx/reject"); + } + [Fact] public void TestApplicationFeesGet() { @@ -252,42 +526,146 @@ public void TestApplicationFeesGet() } [Fact] - public void TestApplicationFeesGet2() + public async Task TestApplicationFeesGetAsync() { + var options = new ApplicationFeeListOptions { Limit = 3 }; var service = new ApplicationFeeService(this.StripeClient); - ApplicationFee applicationFee = service.Get("fee_xxxxxxxxxxxxx"); + StripeList applicationFees = await service + .ListAsync(options); this.AssertRequest( HttpMethod.Get, - "/v1/application_fees/fee_xxxxxxxxxxxxx"); + "/v1/application_fees", + "limit=3"); } [Fact] - public void TestApplicationFeesRefundsGet() + public void TestApplicationFeesGetAutoPaging() { - var options = new ApplicationFeeRefundListOptions { Limit = 3 }; - var service = new ApplicationFeeRefundService(this.StripeClient); - StripeList applicationFeeRefunds = service - .List("fee_xxxxxxxxxxxxx", options); + var options = new ApplicationFeeListOptions { Limit = 3 }; + var service = new ApplicationFeeService(this.StripeClient); + var applicationFee = service.ListAutoPaging(options).First(); this.AssertRequest( HttpMethod.Get, - "/v1/application_fees/fee_xxxxxxxxxxxxx/refunds", + "/v1/application_fees", "limit=3"); } [Fact] - public void TestApplicationFeesRefundsGet2() + public async Task TestApplicationFeesGetAutoPagingAsync() { - var service = new ApplicationFeeRefundService(this.StripeClient); - ApplicationFeeRefund applicationFeeRefund = service.Get( - "fee_xxxxxxxxxxxxx", - "fr_xxxxxxxxxxxxx"); + var options = new ApplicationFeeListOptions { Limit = 3 }; + var service = new ApplicationFeeService(this.StripeClient); + var applicationFee = await service.ListAutoPagingAsync(options) + .FirstAsync(); this.AssertRequest( HttpMethod.Get, - "/v1/application_fees/fee_xxxxxxxxxxxxx/refunds/fr_xxxxxxxxxxxxx"); + "/v1/application_fees", + "limit=3"); } [Fact] - public void TestApplicationFeesRefundsPost() + public void TestApplicationFeesGet2() + { + var service = new ApplicationFeeService(this.StripeClient); + ApplicationFee applicationFee = service.Get("fee_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/application_fees/fee_xxxxxxxxxxxxx"); + } + + [Fact] + public async Task TestApplicationFeesGet2Async() + { + var service = new ApplicationFeeService(this.StripeClient); + ApplicationFee applicationFee = await service.GetAsync( + "fee_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/application_fees/fee_xxxxxxxxxxxxx"); + } + + [Fact] + public void TestApplicationFeesRefundsGet() + { + var options = new ApplicationFeeRefundListOptions { Limit = 3 }; + var service = new ApplicationFeeRefundService(this.StripeClient); + StripeList applicationFeeRefunds = service + .List("fee_xxxxxxxxxxxxx", options); + this.AssertRequest( + HttpMethod.Get, + "/v1/application_fees/fee_xxxxxxxxxxxxx/refunds", + "limit=3"); + } + + [Fact] + public async Task TestApplicationFeesRefundsGetAsync() + { + var options = new ApplicationFeeRefundListOptions { Limit = 3 }; + var service = new ApplicationFeeRefundService(this.StripeClient); + StripeList applicationFeeRefunds = await service + .ListAsync("fee_xxxxxxxxxxxxx", options); + this.AssertRequest( + HttpMethod.Get, + "/v1/application_fees/fee_xxxxxxxxxxxxx/refunds", + "limit=3"); + } + + [Fact] + public void TestApplicationFeesRefundsGetAutoPaging() + { + var options = new ApplicationFeeRefundListOptions { Limit = 3 }; + var service = new ApplicationFeeRefundService(this.StripeClient); + var applicationFeeRefund = service.ListAutoPaging( + "fee_xxxxxxxxxxxxx", + options) + .First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/application_fees/fee_xxxxxxxxxxxxx/refunds", + "limit=3"); + } + + [Fact] + public async Task TestApplicationFeesRefundsGetAutoPagingAsync() + { + var options = new ApplicationFeeRefundListOptions { Limit = 3 }; + var service = new ApplicationFeeRefundService(this.StripeClient); + var applicationFeeRefund = await service.ListAutoPagingAsync( + "fee_xxxxxxxxxxxxx", + options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/application_fees/fee_xxxxxxxxxxxxx/refunds", + "limit=3"); + } + + [Fact] + public void TestApplicationFeesRefundsGet2() + { + var service = new ApplicationFeeRefundService(this.StripeClient); + ApplicationFeeRefund applicationFeeRefund = service.Get( + "fee_xxxxxxxxxxxxx", + "fr_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/application_fees/fee_xxxxxxxxxxxxx/refunds/fr_xxxxxxxxxxxxx"); + } + + [Fact] + public async Task TestApplicationFeesRefundsGet2Async() + { + var service = new ApplicationFeeRefundService(this.StripeClient); + ApplicationFeeRefund applicationFeeRefund = await service.GetAsync( + "fee_xxxxxxxxxxxxx", + "fr_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/application_fees/fee_xxxxxxxxxxxxx/refunds/fr_xxxxxxxxxxxxx"); + } + + [Fact] + public void TestApplicationFeesRefundsPost() { var service = new ApplicationFeeRefundService(this.StripeClient); ApplicationFeeRefund applicationFeeRefund = service.Create( @@ -297,6 +675,17 @@ public void TestApplicationFeesRefundsPost() "/v1/application_fees/fee_xxxxxxxxxxxxx/refunds"); } + [Fact] + public async Task TestApplicationFeesRefundsPostAsync() + { + var service = new ApplicationFeeRefundService(this.StripeClient); + ApplicationFeeRefund applicationFeeRefund = await service + .CreateAsync("fee_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/application_fees/fee_xxxxxxxxxxxxx/refunds"); + } + [Fact] public void TestApplicationFeesRefundsPost2() { @@ -317,6 +706,24 @@ public void TestApplicationFeesRefundsPost2() "/v1/application_fees/fee_xxxxxxxxxxxxx/refunds/fr_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestApplicationFeesRefundsPost2Async() + { + var options = new ApplicationFeeRefundUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new ApplicationFeeRefundService(this.StripeClient); + ApplicationFeeRefund applicationFeeRefund = await service + .UpdateAsync("fee_xxxxxxxxxxxxx", "fr_xxxxxxxxxxxxx", options); + this.AssertRequest( + HttpMethod.Post, + "/v1/application_fees/fee_xxxxxxxxxxxxx/refunds/fr_xxxxxxxxxxxxx"); + } + [Fact] public void TestAppsSecretsDeletePost() { @@ -330,6 +737,19 @@ public void TestAppsSecretsDeletePost() this.AssertRequest(HttpMethod.Post, "/v1/apps/secrets/delete"); } + [Fact] + public async Task TestAppsSecretsDeletePostAsync() + { + var options = new Stripe.Apps.SecretDeleteWhereOptions + { + Name = "my-api-key", + Scope = new Stripe.Apps.SecretScopeOptions { Type = "account" }, + }; + var service = new Stripe.Apps.SecretService(this.StripeClient); + Stripe.Apps.Secret secret = await service.DeleteWhereAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/apps/secrets/delete"); + } + [Fact] public void TestAppsSecretsFindGet() { @@ -346,6 +766,22 @@ public void TestAppsSecretsFindGet() "name=sec_123&scope[type]=account"); } + [Fact] + public async Task TestAppsSecretsFindGetAsync() + { + var options = new Stripe.Apps.SecretFindOptions + { + Name = "sec_123", + Scope = new Stripe.Apps.SecretScopeOptions { Type = "account" }, + }; + var service = new Stripe.Apps.SecretService(this.StripeClient); + Stripe.Apps.Secret secret = await service.FindAsync(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/apps/secrets/find", + "name=sec_123&scope[type]=account"); + } + [Fact] public void TestAppsSecretsGet() { @@ -362,6 +798,56 @@ public void TestAppsSecretsGet() "scope[type]=account&limit=2"); } + [Fact] + public async Task TestAppsSecretsGetAsync() + { + var options = new Stripe.Apps.SecretListOptions + { + Scope = new Stripe.Apps.SecretScopeOptions { Type = "account" }, + Limit = 2, + }; + var service = new Stripe.Apps.SecretService(this.StripeClient); + StripeList secrets = await service.ListAsync( + options); + this.AssertRequest( + HttpMethod.Get, + "/v1/apps/secrets", + "scope[type]=account&limit=2"); + } + + [Fact] + public void TestAppsSecretsGetAutoPaging() + { + var options = new Stripe.Apps.SecretListOptions + { + Scope = new Stripe.Apps.SecretScopeOptions { Type = "account" }, + Limit = 2, + }; + var service = new Stripe.Apps.SecretService(this.StripeClient); + var secret = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/apps/secrets", + "scope[type]=account&limit=2"); + } + + [Fact] + public async Task TestAppsSecretsGetAutoPagingAsync() + { + var options = new Stripe.Apps.SecretListOptions + { + Scope = new Stripe.Apps.SecretScopeOptions { Type = "account" }, + Limit = 2, + }; + var service = new Stripe.Apps.SecretService(this.StripeClient); + var secret = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/apps/secrets", + "scope[type]=account&limit=2"); + } + [Fact] public void TestAppsSecretsGet2() { @@ -378,6 +864,56 @@ public void TestAppsSecretsGet2() "scope[type]=account&limit=2"); } + [Fact] + public async Task TestAppsSecretsGet2Async() + { + var options = new Stripe.Apps.SecretListOptions + { + Scope = new Stripe.Apps.SecretScopeOptions { Type = "account" }, + Limit = 2, + }; + var service = new Stripe.Apps.SecretService(this.StripeClient); + StripeList secrets = await service.ListAsync( + options); + this.AssertRequest( + HttpMethod.Get, + "/v1/apps/secrets", + "scope[type]=account&limit=2"); + } + + [Fact] + public void TestAppsSecretsGet2AutoPaging() + { + var options = new Stripe.Apps.SecretListOptions + { + Scope = new Stripe.Apps.SecretScopeOptions { Type = "account" }, + Limit = 2, + }; + var service = new Stripe.Apps.SecretService(this.StripeClient); + var secret = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/apps/secrets", + "scope[type]=account&limit=2"); + } + + [Fact] + public async Task TestAppsSecretsGet2AutoPagingAsync() + { + var options = new Stripe.Apps.SecretListOptions + { + Scope = new Stripe.Apps.SecretScopeOptions { Type = "account" }, + Limit = 2, + }; + var service = new Stripe.Apps.SecretService(this.StripeClient); + var secret = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/apps/secrets", + "scope[type]=account&limit=2"); + } + [Fact] public void TestAppsSecretsPost() { @@ -392,6 +928,20 @@ public void TestAppsSecretsPost() this.AssertRequest(HttpMethod.Post, "/v1/apps/secrets"); } + [Fact] + public async Task TestAppsSecretsPostAsync() + { + var options = new Stripe.Apps.SecretCreateOptions + { + Name = "sec_123", + Payload = "very secret string", + Scope = new Stripe.Apps.SecretScopeOptions { Type = "account" }, + }; + var service = new Stripe.Apps.SecretService(this.StripeClient); + Stripe.Apps.Secret secret = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/apps/secrets"); + } + [Fact] public void TestAppsSecretsPost2() { @@ -406,6 +956,20 @@ public void TestAppsSecretsPost2() this.AssertRequest(HttpMethod.Post, "/v1/apps/secrets"); } + [Fact] + public async Task TestAppsSecretsPost2Async() + { + var options = new Stripe.Apps.SecretCreateOptions + { + Name = "my-api-key", + Payload = "secret_key_xxxxxx", + Scope = new Stripe.Apps.SecretScopeOptions { Type = "account" }, + }; + var service = new Stripe.Apps.SecretService(this.StripeClient); + Stripe.Apps.Secret secret = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/apps/secrets"); + } + [Fact] public void TestBalanceTransactionsGet() { @@ -420,22 +984,71 @@ public void TestBalanceTransactionsGet() } [Fact] - public void TestBalanceTransactionsGet2() + public async Task TestBalanceTransactionsGetAsync() { + var options = new BalanceTransactionListOptions { Limit = 3 }; var service = new BalanceTransactionService(this.StripeClient); - BalanceTransaction balanceTransaction = service.Get( - "txn_xxxxxxxxxxxxx"); + StripeList balanceTransactions = await service + .ListAsync(options); this.AssertRequest( HttpMethod.Get, - "/v1/balance_transactions/txn_xxxxxxxxxxxxx"); + "/v1/balance_transactions", + "limit=3"); } [Fact] - public void TestBillingPortalConfigurationsGet() + public void TestBalanceTransactionsGetAutoPaging() { - var options = new Stripe.BillingPortal.ConfigurationListOptions - { - Limit = 3, + var options = new BalanceTransactionListOptions { Limit = 3 }; + var service = new BalanceTransactionService(this.StripeClient); + var balanceTransaction = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/balance_transactions", + "limit=3"); + } + + [Fact] + public async Task TestBalanceTransactionsGetAutoPagingAsync() + { + var options = new BalanceTransactionListOptions { Limit = 3 }; + var service = new BalanceTransactionService(this.StripeClient); + var balanceTransaction = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/balance_transactions", + "limit=3"); + } + + [Fact] + public void TestBalanceTransactionsGet2() + { + var service = new BalanceTransactionService(this.StripeClient); + BalanceTransaction balanceTransaction = service.Get( + "txn_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/balance_transactions/txn_xxxxxxxxxxxxx"); + } + + [Fact] + public async Task TestBalanceTransactionsGet2Async() + { + var service = new BalanceTransactionService(this.StripeClient); + BalanceTransaction balanceTransaction = await service.GetAsync( + "txn_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/balance_transactions/txn_xxxxxxxxxxxxx"); + } + + [Fact] + public void TestBillingPortalConfigurationsGet() + { + var options = new Stripe.BillingPortal.ConfigurationListOptions + { + Limit = 3, }; var service = new Stripe.BillingPortal.ConfigurationService( this.StripeClient); @@ -447,6 +1060,56 @@ public void TestBillingPortalConfigurationsGet() "limit=3"); } + [Fact] + public async Task TestBillingPortalConfigurationsGetAsync() + { + var options = new Stripe.BillingPortal.ConfigurationListOptions + { + Limit = 3, + }; + var service = new Stripe.BillingPortal.ConfigurationService( + this.StripeClient); + StripeList configurations = await service + .ListAsync(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/billing_portal/configurations", + "limit=3"); + } + + [Fact] + public void TestBillingPortalConfigurationsGetAutoPaging() + { + var options = new Stripe.BillingPortal.ConfigurationListOptions + { + Limit = 3, + }; + var service = new Stripe.BillingPortal.ConfigurationService( + this.StripeClient); + var configuration = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/billing_portal/configurations", + "limit=3"); + } + + [Fact] + public async Task TestBillingPortalConfigurationsGetAutoPagingAsync() + { + var options = new Stripe.BillingPortal.ConfigurationListOptions + { + Limit = 3, + }; + var service = new Stripe.BillingPortal.ConfigurationService( + this.StripeClient); + var configuration = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/billing_portal/configurations", + "limit=3"); + } + [Fact] public void TestBillingPortalConfigurationsGet2() { @@ -459,6 +1122,18 @@ public void TestBillingPortalConfigurationsGet2() "/v1/billing_portal/configurations/bpc_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestBillingPortalConfigurationsGet2Async() + { + var service = new Stripe.BillingPortal.ConfigurationService( + this.StripeClient); + Stripe.BillingPortal.Configuration configuration = await service + .GetAsync("bpc_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/billing_portal/configurations/bpc_xxxxxxxxxxxxx"); + } + [Fact] public void TestBillingPortalConfigurationsPost() { @@ -491,6 +1166,38 @@ public void TestBillingPortalConfigurationsPost() "/v1/billing_portal/configurations"); } + [Fact] + public async Task TestBillingPortalConfigurationsPostAsync() + { + var options = new Stripe.BillingPortal.ConfigurationCreateOptions + { + Features = new Stripe.BillingPortal.ConfigurationFeaturesOptions + { + CustomerUpdate = new Stripe.BillingPortal.ConfigurationFeaturesCustomerUpdateOptions + { + AllowedUpdates = new List { "email", "tax_id" }, + Enabled = true, + }, + InvoiceHistory = new Stripe.BillingPortal.ConfigurationFeaturesInvoiceHistoryOptions + { + Enabled = true, + }, + }, + BusinessProfile = new Stripe.BillingPortal.ConfigurationBusinessProfileOptions + { + PrivacyPolicyUrl = "https://example.com/privacy", + TermsOfServiceUrl = "https://example.com/terms", + }, + }; + var service = new Stripe.BillingPortal.ConfigurationService( + this.StripeClient); + Stripe.BillingPortal.Configuration configuration = await service + .CreateAsync(options); + this.AssertRequest( + HttpMethod.Post, + "/v1/billing_portal/configurations"); + } + [Fact] public void TestBillingPortalConfigurationsPost2() { @@ -512,6 +1219,26 @@ public void TestBillingPortalConfigurationsPost2() "/v1/billing_portal/configurations/bpc_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestBillingPortalConfigurationsPost2Async() + { + var options = new Stripe.BillingPortal.ConfigurationUpdateOptions + { + BusinessProfile = new Stripe.BillingPortal.ConfigurationBusinessProfileOptions + { + PrivacyPolicyUrl = "https://example.com/privacy", + TermsOfServiceUrl = "https://example.com/terms", + }, + }; + var service = new Stripe.BillingPortal.ConfigurationService( + this.StripeClient); + Stripe.BillingPortal.Configuration configuration = await service + .UpdateAsync("bpc_xxxxxxxxxxxxx", options); + this.AssertRequest( + HttpMethod.Post, + "/v1/billing_portal/configurations/bpc_xxxxxxxxxxxxx"); + } + [Fact] public void TestBillingPortalSessionsPost() { @@ -526,6 +1253,21 @@ public void TestBillingPortalSessionsPost() this.AssertRequest(HttpMethod.Post, "/v1/billing_portal/sessions"); } + [Fact] + public async Task TestBillingPortalSessionsPostAsync() + { + var options = new Stripe.BillingPortal.SessionCreateOptions + { + Customer = "cus_xxxxxxxxxxxxx", + ReturnUrl = "https://example.com/account", + }; + var service = new Stripe.BillingPortal.SessionService( + this.StripeClient); + Stripe.BillingPortal.Session session = await service.CreateAsync( + options); + this.AssertRequest(HttpMethod.Post, "/v1/billing_portal/sessions"); + } + [Fact] public void TestChargesCapturePost() { @@ -536,6 +1278,16 @@ public void TestChargesCapturePost() "/v1/charges/ch_xxxxxxxxxxxxx/capture"); } + [Fact] + public async Task TestChargesCapturePostAsync() + { + var service = new ChargeService(this.StripeClient); + Charge charge = await service.CaptureAsync("ch_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/charges/ch_xxxxxxxxxxxxx/capture"); + } + [Fact] public void TestChargesGet() { @@ -545,6 +1297,34 @@ public void TestChargesGet() this.AssertRequest(HttpMethod.Get, "/v1/charges", "limit=3"); } + [Fact] + public async Task TestChargesGetAsync() + { + var options = new ChargeListOptions { Limit = 3 }; + var service = new ChargeService(this.StripeClient); + StripeList charges = await service.ListAsync(options); + this.AssertRequest(HttpMethod.Get, "/v1/charges", "limit=3"); + } + + [Fact] + public void TestChargesGetAutoPaging() + { + var options = new ChargeListOptions { Limit = 3 }; + var service = new ChargeService(this.StripeClient); + var charge = service.ListAutoPaging(options).First(); + this.AssertRequest(HttpMethod.Get, "/v1/charges", "limit=3"); + } + + [Fact] + public async Task TestChargesGetAutoPagingAsync() + { + var options = new ChargeListOptions { Limit = 3 }; + var service = new ChargeService(this.StripeClient); + var charge = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/charges", "limit=3"); + } + [Fact] public void TestChargesGet2() { @@ -553,6 +1333,14 @@ public void TestChargesGet2() this.AssertRequest(HttpMethod.Get, "/v1/charges/ch_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestChargesGet2Async() + { + var service = new ChargeService(this.StripeClient); + Charge charge = await service.GetAsync("ch_xxxxxxxxxxxxx"); + this.AssertRequest(HttpMethod.Get, "/v1/charges/ch_xxxxxxxxxxxxx"); + } + [Fact] public void TestChargesPost() { @@ -568,6 +1356,21 @@ public void TestChargesPost() this.AssertRequest(HttpMethod.Post, "/v1/charges"); } + [Fact] + public async Task TestChargesPostAsync() + { + var options = new ChargeCreateOptions + { + Amount = 2000, + Currency = "usd", + Source = "tok_xxxx", + Description = "My First Test Charge (created for API docs at https://www.stripe.com/docs/api)", + }; + var service = new ChargeService(this.StripeClient); + Charge charge = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/charges"); + } + [Fact] public void TestChargesPost2() { @@ -583,6 +1386,23 @@ public void TestChargesPost2() this.AssertRequest(HttpMethod.Post, "/v1/charges/ch_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestChargesPost2Async() + { + var options = new ChargeUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new ChargeService(this.StripeClient); + Charge charge = await service.UpdateAsync( + "ch_xxxxxxxxxxxxx", + options); + this.AssertRequest(HttpMethod.Post, "/v1/charges/ch_xxxxxxxxxxxxx"); + } + [Fact] public void TestChargesSearchGet() { @@ -599,37 +1419,144 @@ public void TestChargesSearchGet() } [Fact] - public void TestCheckoutSessionsExpirePost() + public async Task TestChargesSearchGetAsync() { - var service = new Stripe.Checkout.SessionService(this.StripeClient); - Stripe.Checkout.Session session = service.Expire("sess_xyz"); + var options = new ChargeSearchOptions + { + Query = "amount>999 AND metadata['order_id']:'6735'", + }; + var service = new ChargeService(this.StripeClient); + StripeSearchResult charges = await service.SearchAsync( + options); this.AssertRequest( - HttpMethod.Post, - "/v1/checkout/sessions/sess_xyz/expire"); + HttpMethod.Get, + "/v1/charges/search", + "query=amount%3E999%20AND%20metadata%5B%27order_id%27%5D%3A%276735%27"); } [Fact] - public void TestCheckoutSessionsExpirePost2() + public void TestChargesSearchGetAutoPaging() { - var service = new Stripe.Checkout.SessionService(this.StripeClient); - Stripe.Checkout.Session session = service.Expire( - "cs_test_xxxxxxxxxxxxx"); + var options = new ChargeSearchOptions + { + Query = "amount>999 AND metadata['order_id']:'6735'", + }; + var service = new ChargeService(this.StripeClient); + var charge = service.SearchAutoPaging(options).First(); this.AssertRequest( - HttpMethod.Post, - "/v1/checkout/sessions/cs_test_xxxxxxxxxxxxx/expire"); + HttpMethod.Get, + "/v1/charges/search", + "query=amount%3E999%20AND%20metadata%5B%27order_id%27%5D%3A%276735%27"); } [Fact] - public void TestCheckoutSessionsGet() + public async Task TestChargesSearchGetAutoPagingAsync() { - var options = new Stripe.Checkout.SessionListOptions { Limit = 3 }; - var service = new Stripe.Checkout.SessionService(this.StripeClient); - StripeList sessions = service.List( - options); + var options = new ChargeSearchOptions + { + Query = "amount>999 AND metadata['order_id']:'6735'", + }; + var service = new ChargeService(this.StripeClient); + var charge = await service.SearchAutoPagingAsync(options) + .FirstAsync(); this.AssertRequest( HttpMethod.Get, - "/v1/checkout/sessions", - "limit=3"); + "/v1/charges/search", + "query=amount%3E999%20AND%20metadata%5B%27order_id%27%5D%3A%276735%27"); + } + + [Fact] + public void TestCheckoutSessionsExpirePost() + { + var service = new Stripe.Checkout.SessionService(this.StripeClient); + Stripe.Checkout.Session session = service.Expire("sess_xyz"); + this.AssertRequest( + HttpMethod.Post, + "/v1/checkout/sessions/sess_xyz/expire"); + } + + [Fact] + public async Task TestCheckoutSessionsExpirePostAsync() + { + var service = new Stripe.Checkout.SessionService(this.StripeClient); + Stripe.Checkout.Session session = await service.ExpireAsync( + "sess_xyz"); + this.AssertRequest( + HttpMethod.Post, + "/v1/checkout/sessions/sess_xyz/expire"); + } + + [Fact] + public void TestCheckoutSessionsExpirePost2() + { + var service = new Stripe.Checkout.SessionService(this.StripeClient); + Stripe.Checkout.Session session = service.Expire( + "cs_test_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/checkout/sessions/cs_test_xxxxxxxxxxxxx/expire"); + } + + [Fact] + public async Task TestCheckoutSessionsExpirePost2Async() + { + var service = new Stripe.Checkout.SessionService(this.StripeClient); + Stripe.Checkout.Session session = await service.ExpireAsync( + "cs_test_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/checkout/sessions/cs_test_xxxxxxxxxxxxx/expire"); + } + + [Fact] + public void TestCheckoutSessionsGet() + { + var options = new Stripe.Checkout.SessionListOptions { Limit = 3 }; + var service = new Stripe.Checkout.SessionService(this.StripeClient); + StripeList sessions = service.List( + options); + this.AssertRequest( + HttpMethod.Get, + "/v1/checkout/sessions", + "limit=3"); + } + + [Fact] + public async Task TestCheckoutSessionsGetAsync() + { + var options = new Stripe.Checkout.SessionListOptions { Limit = 3 }; + var service = new Stripe.Checkout.SessionService(this.StripeClient); + StripeList sessions = await service + .ListAsync(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/checkout/sessions", + "limit=3"); + } + + [Fact] + public void TestCheckoutSessionsGetAutoPaging() + { + var options = new Stripe.Checkout.SessionListOptions { Limit = 3 }; + var service = new Stripe.Checkout.SessionService(this.StripeClient); + var session = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/checkout/sessions", + "limit=3"); + } + + [Fact] + public async Task TestCheckoutSessionsGetAutoPagingAsync() + { + var options = new Stripe.Checkout.SessionListOptions { Limit = 3 }; + var service = new Stripe.Checkout.SessionService(this.StripeClient); + var session = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/checkout/sessions", + "limit=3"); } [Fact] @@ -643,6 +1570,17 @@ public void TestCheckoutSessionsGet2() "/v1/checkout/sessions/cs_test_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestCheckoutSessionsGet2Async() + { + var service = new Stripe.Checkout.SessionService(this.StripeClient); + Stripe.Checkout.Session session = await service.GetAsync( + "cs_test_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/checkout/sessions/cs_test_xxxxxxxxxxxxx"); + } + [Fact] public void TestCheckoutSessionsLineItemsGet() { @@ -654,6 +1592,41 @@ public void TestCheckoutSessionsLineItemsGet() "/v1/checkout/sessions/sess_xyz/line_items"); } + [Fact] + public async Task TestCheckoutSessionsLineItemsGetAsync() + { + var service = new Stripe.Checkout.SessionLineItemService( + this.StripeClient); + StripeList lineItems = await service.ListAsync( + "sess_xyz"); + this.AssertRequest( + HttpMethod.Get, + "/v1/checkout/sessions/sess_xyz/line_items"); + } + + [Fact] + public void TestCheckoutSessionsLineItemsGetAutoPaging() + { + var service = new Stripe.Checkout.SessionLineItemService( + this.StripeClient); + var lineItem = service.ListAutoPaging("sess_xyz").First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/checkout/sessions/sess_xyz/line_items"); + } + + [Fact] + public async Task TestCheckoutSessionsLineItemsGetAutoPagingAsync() + { + var service = new Stripe.Checkout.SessionLineItemService( + this.StripeClient); + var lineItem = await service.ListAutoPagingAsync("sess_xyz") + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/checkout/sessions/sess_xyz/line_items"); + } + [Fact] public void TestCheckoutSessionsPost() { @@ -695,6 +1668,48 @@ public void TestCheckoutSessionsPost() this.AssertRequest(HttpMethod.Post, "/v1/checkout/sessions"); } + [Fact] + public async Task TestCheckoutSessionsPostAsync() + { + var options = new Stripe.Checkout.SessionCreateOptions + { + SuccessUrl = "https://example.com/success", + CancelUrl = "https://example.com/cancel", + Mode = "payment", + ShippingOptions = new List + { + new Stripe.Checkout.SessionShippingOptionOptions + { + ShippingRate = "shr_standard", + }, + new Stripe.Checkout.SessionShippingOptionOptions + { + ShippingRateData = new Stripe.Checkout.SessionShippingOptionShippingRateDataOptions + { + DisplayName = "Standard", + DeliveryEstimate = new Stripe.Checkout.SessionShippingOptionShippingRateDataDeliveryEstimateOptions + { + Minimum = new Stripe.Checkout.SessionShippingOptionShippingRateDataDeliveryEstimateMinimumOptions + { + Unit = "day", + Value = 5, + }, + Maximum = new Stripe.Checkout.SessionShippingOptionShippingRateDataDeliveryEstimateMaximumOptions + { + Unit = "day", + Value = 7, + }, + }, + }, + }, + }, + }; + var service = new Stripe.Checkout.SessionService(this.StripeClient); + Stripe.Checkout.Session session = await service.CreateAsync( + options); + this.AssertRequest(HttpMethod.Post, "/v1/checkout/sessions"); + } + [Fact] public void TestCheckoutSessionsPost2() { @@ -716,6 +1731,28 @@ public void TestCheckoutSessionsPost2() this.AssertRequest(HttpMethod.Post, "/v1/checkout/sessions"); } + [Fact] + public async Task TestCheckoutSessionsPost2Async() + { + var options = new Stripe.Checkout.SessionCreateOptions + { + SuccessUrl = "https://example.com/success", + LineItems = new List + { + new Stripe.Checkout.SessionLineItemOptions + { + Price = "price_xxxxxxxxxxxxx", + Quantity = 2, + }, + }, + Mode = "payment", + }; + var service = new Stripe.Checkout.SessionService(this.StripeClient); + Stripe.Checkout.Session session = await service.CreateAsync( + options); + this.AssertRequest(HttpMethod.Post, "/v1/checkout/sessions"); + } + [Fact] public void TestCoreEventsGet() { @@ -730,6 +1767,20 @@ public void TestCoreEventsGet() this.AssertRequest(HttpMethod.Get, "/v2/core/events/ll_123"); } + [Fact] + public async Task TestCoreEventsGetAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/events/ll_123", + HttpStatusCode.OK, + "{\"object\":\"v2.core.event\",\"changes\":{\"int_key\":123,\"string_key\":\"value\",\"boolean_key\":true,\"object_key\":{\"object_int_key\":123,\"object_string_key\":\"value\",\"object_boolean_key\":true},\"array_key\":[1,2,3]},\"context\":\"context\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"reason\":{\"request\":{\"id\":\"obj_123\",\"idempotency_key\":\"idempotency_key\"},\"type\":\"request\"},\"type\":\"type\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Events; + Stripe.V2.Core.Event result = await service.GetAsync("ll_123"); + this.AssertRequest(HttpMethod.Get, "/v2/core/events/ll_123"); + } + [Fact] public void TestCountrySpecsGet() { @@ -739,6 +1790,35 @@ public void TestCountrySpecsGet() this.AssertRequest(HttpMethod.Get, "/v1/country_specs", "limit=3"); } + [Fact] + public async Task TestCountrySpecsGetAsync() + { + var options = new CountrySpecListOptions { Limit = 3 }; + var service = new CountrySpecService(this.StripeClient); + StripeList countrySpecs = await service.ListAsync( + options); + this.AssertRequest(HttpMethod.Get, "/v1/country_specs", "limit=3"); + } + + [Fact] + public void TestCountrySpecsGetAutoPaging() + { + var options = new CountrySpecListOptions { Limit = 3 }; + var service = new CountrySpecService(this.StripeClient); + var countrySpec = service.ListAutoPaging(options).First(); + this.AssertRequest(HttpMethod.Get, "/v1/country_specs", "limit=3"); + } + + [Fact] + public async Task TestCountrySpecsGetAutoPagingAsync() + { + var options = new CountrySpecListOptions { Limit = 3 }; + var service = new CountrySpecService(this.StripeClient); + var countrySpec = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/country_specs", "limit=3"); + } + [Fact] public void TestCountrySpecsGet2() { @@ -747,6 +1827,14 @@ public void TestCountrySpecsGet2() this.AssertRequest(HttpMethod.Get, "/v1/country_specs/US"); } + [Fact] + public async Task TestCountrySpecsGet2Async() + { + var service = new CountrySpecService(this.StripeClient); + CountrySpec countrySpec = await service.GetAsync("US"); + this.AssertRequest(HttpMethod.Get, "/v1/country_specs/US"); + } + [Fact] public void TestCouponsDelete() { @@ -755,6 +1843,14 @@ public void TestCouponsDelete() this.AssertRequest(HttpMethod.Delete, "/v1/coupons/Z4OV52SU"); } + [Fact] + public async Task TestCouponsDeleteAsync() + { + var service = new CouponService(this.StripeClient); + Coupon deleted = await service.DeleteAsync("Z4OV52SU"); + this.AssertRequest(HttpMethod.Delete, "/v1/coupons/Z4OV52SU"); + } + [Fact] public void TestCouponsGet() { @@ -764,6 +1860,34 @@ public void TestCouponsGet() this.AssertRequest(HttpMethod.Get, "/v1/coupons", "limit=3"); } + [Fact] + public async Task TestCouponsGetAsync() + { + var options = new CouponListOptions { Limit = 3 }; + var service = new CouponService(this.StripeClient); + StripeList coupons = await service.ListAsync(options); + this.AssertRequest(HttpMethod.Get, "/v1/coupons", "limit=3"); + } + + [Fact] + public void TestCouponsGetAutoPaging() + { + var options = new CouponListOptions { Limit = 3 }; + var service = new CouponService(this.StripeClient); + var coupon = service.ListAutoPaging(options).First(); + this.AssertRequest(HttpMethod.Get, "/v1/coupons", "limit=3"); + } + + [Fact] + public async Task TestCouponsGetAutoPagingAsync() + { + var options = new CouponListOptions { Limit = 3 }; + var service = new CouponService(this.StripeClient); + var coupon = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/coupons", "limit=3"); + } + [Fact] public void TestCouponsGet2() { @@ -772,6 +1896,14 @@ public void TestCouponsGet2() this.AssertRequest(HttpMethod.Get, "/v1/coupons/Z4OV52SU"); } + [Fact] + public async Task TestCouponsGet2Async() + { + var service = new CouponService(this.StripeClient); + Coupon coupon = await service.GetAsync("Z4OV52SU"); + this.AssertRequest(HttpMethod.Get, "/v1/coupons/Z4OV52SU"); + } + [Fact] public void TestCouponsPost() { @@ -786,11 +1918,24 @@ public void TestCouponsPost() } [Fact] - public void TestCouponsPost2() + public async Task TestCouponsPostAsync() { - var options = new CouponUpdateOptions + var options = new CouponCreateOptions { - Metadata = new Dictionary + PercentOff = 25.5M, + Duration = "once", + }; + var service = new CouponService(this.StripeClient); + Coupon coupon = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/coupons"); + } + + [Fact] + public void TestCouponsPost2() + { + var options = new CouponUpdateOptions + { + Metadata = new Dictionary { { "order_id", "6735" }, }, @@ -800,6 +1945,21 @@ public void TestCouponsPost2() this.AssertRequest(HttpMethod.Post, "/v1/coupons/Z4OV52SU"); } + [Fact] + public async Task TestCouponsPost2Async() + { + var options = new CouponUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new CouponService(this.StripeClient); + Coupon coupon = await service.UpdateAsync("Z4OV52SU", options); + this.AssertRequest(HttpMethod.Post, "/v1/coupons/Z4OV52SU"); + } + [Fact] public void TestCreditNotesGet() { @@ -809,6 +1969,35 @@ public void TestCreditNotesGet() this.AssertRequest(HttpMethod.Get, "/v1/credit_notes", "limit=3"); } + [Fact] + public async Task TestCreditNotesGetAsync() + { + var options = new CreditNoteListOptions { Limit = 3 }; + var service = new CreditNoteService(this.StripeClient); + StripeList creditNotes = await service.ListAsync( + options); + this.AssertRequest(HttpMethod.Get, "/v1/credit_notes", "limit=3"); + } + + [Fact] + public void TestCreditNotesGetAutoPaging() + { + var options = new CreditNoteListOptions { Limit = 3 }; + var service = new CreditNoteService(this.StripeClient); + var creditNote = service.ListAutoPaging(options).First(); + this.AssertRequest(HttpMethod.Get, "/v1/credit_notes", "limit=3"); + } + + [Fact] + public async Task TestCreditNotesGetAutoPagingAsync() + { + var options = new CreditNoteListOptions { Limit = 3 }; + var service = new CreditNoteService(this.StripeClient); + var creditNote = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/credit_notes", "limit=3"); + } + [Fact] public void TestCreditNotesPost() { @@ -830,6 +2019,27 @@ public void TestCreditNotesPost() this.AssertRequest(HttpMethod.Post, "/v1/credit_notes"); } + [Fact] + public async Task TestCreditNotesPostAsync() + { + var options = new CreditNoteCreateOptions + { + Invoice = "in_xxxxxxxxxxxxx", + Lines = new List + { + new CreditNoteLineOptions + { + Type = "invoice_line_item", + InvoiceLineItem = "il_xxxxxxxxxxxxx", + Quantity = 1, + }, + }, + }; + var service = new CreditNoteService(this.StripeClient); + CreditNote creditNote = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/credit_notes"); + } + [Fact] public void TestCreditNotesPreviewGet() { @@ -854,6 +2064,30 @@ public void TestCreditNotesPreviewGet() "invoice=in_xxxxxxxxxxxxx&lines[0][type]=invoice_line_item&lines[0][invoice_line_item]=il_xxxxxxxxxxxxx&lines[0][quantity]=1"); } + [Fact] + public async Task TestCreditNotesPreviewGetAsync() + { + var options = new CreditNotePreviewOptions + { + Invoice = "in_xxxxxxxxxxxxx", + Lines = new List + { + new CreditNoteLineOptions + { + Type = "invoice_line_item", + InvoiceLineItem = "il_xxxxxxxxxxxxx", + Quantity = 1, + }, + }, + }; + var service = new CreditNoteService(this.StripeClient); + CreditNote creditNote = await service.PreviewAsync(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/credit_notes/preview", + "invoice=in_xxxxxxxxxxxxx&lines[0][type]=invoice_line_item&lines[0][invoice_line_item]=il_xxxxxxxxxxxxx&lines[0][quantity]=1"); + } + [Fact] public void TestCreditNotesVoidPost() { @@ -864,6 +2098,17 @@ public void TestCreditNotesVoidPost() "/v1/credit_notes/cn_xxxxxxxxxxxxx/void"); } + [Fact] + public async Task TestCreditNotesVoidPostAsync() + { + var service = new CreditNoteService(this.StripeClient); + CreditNote creditNote = await service.VoidCreditNoteAsync( + "cn_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/credit_notes/cn_xxxxxxxxxxxxx/void"); + } + [Fact] public void TestCustomerSessionsPost() { @@ -883,6 +2128,26 @@ public void TestCustomerSessionsPost() this.AssertRequest(HttpMethod.Post, "/v1/customer_sessions"); } + [Fact] + public async Task TestCustomerSessionsPostAsync() + { + var options = new CustomerSessionCreateOptions + { + Customer = "cus_123", + Components = new CustomerSessionComponentsOptions + { + BuyButton = new CustomerSessionComponentsBuyButtonOptions + { + Enabled = true, + }, + }, + }; + var service = new CustomerSessionService(this.StripeClient); + CustomerSession customerSession = await service.CreateAsync( + options); + this.AssertRequest(HttpMethod.Post, "/v1/customer_sessions"); + } + [Fact] public void TestCustomersBalanceTransactionsGet() { @@ -900,6 +2165,61 @@ public void TestCustomersBalanceTransactionsGet() "limit=3"); } + [Fact] + public async Task TestCustomersBalanceTransactionsGetAsync() + { + var options = new CustomerBalanceTransactionListOptions + { + Limit = 3, + }; + var service = new CustomerBalanceTransactionService( + this.StripeClient); + StripeList customerBalanceTransactions = await service + .ListAsync("cus_xxxxxxxxxxxxx", options); + this.AssertRequest( + HttpMethod.Get, + "/v1/customers/cus_xxxxxxxxxxxxx/balance_transactions", + "limit=3"); + } + + [Fact] + public void TestCustomersBalanceTransactionsGetAutoPaging() + { + var options = new CustomerBalanceTransactionListOptions + { + Limit = 3, + }; + var service = new CustomerBalanceTransactionService( + this.StripeClient); + var customerBalanceTransaction = service.ListAutoPaging( + "cus_xxxxxxxxxxxxx", + options) + .First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/customers/cus_xxxxxxxxxxxxx/balance_transactions", + "limit=3"); + } + + [Fact] + public async Task TestCustomersBalanceTransactionsGetAutoPagingAsync() + { + var options = new CustomerBalanceTransactionListOptions + { + Limit = 3, + }; + var service = new CustomerBalanceTransactionService( + this.StripeClient); + var customerBalanceTransaction = await service.ListAutoPagingAsync( + "cus_xxxxxxxxxxxxx", + options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/customers/cus_xxxxxxxxxxxxx/balance_transactions", + "limit=3"); + } + [Fact] public void TestCustomersBalanceTransactionsGet2() { @@ -913,6 +2233,18 @@ public void TestCustomersBalanceTransactionsGet2() "/v1/customers/cus_xxxxxxxxxxxxx/balance_transactions/cbtxn_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestCustomersBalanceTransactionsGet2Async() + { + var service = new CustomerBalanceTransactionService( + this.StripeClient); + CustomerBalanceTransaction customerBalanceTransaction = await service + .GetAsync("cus_xxxxxxxxxxxxx", "cbtxn_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/customers/cus_xxxxxxxxxxxxx/balance_transactions/cbtxn_xxxxxxxxxxxxx"); + } + [Fact] public void TestCustomersBalanceTransactionsPost() { @@ -930,6 +2262,23 @@ public void TestCustomersBalanceTransactionsPost() "/v1/customers/cus_xxxxxxxxxxxxx/balance_transactions"); } + [Fact] + public async Task TestCustomersBalanceTransactionsPostAsync() + { + var options = new CustomerBalanceTransactionCreateOptions + { + Amount = -500, + Currency = "usd", + }; + var service = new CustomerBalanceTransactionService( + this.StripeClient); + CustomerBalanceTransaction customerBalanceTransaction = await service + .CreateAsync("cus_xxxxxxxxxxxxx", options); + this.AssertRequest( + HttpMethod.Post, + "/v1/customers/cus_xxxxxxxxxxxxx/balance_transactions"); + } + [Fact] public void TestCustomersBalanceTransactionsPost2() { @@ -949,6 +2298,28 @@ public void TestCustomersBalanceTransactionsPost2() "/v1/customers/cus_xxxxxxxxxxxxx/balance_transactions/cbtxn_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestCustomersBalanceTransactionsPost2Async() + { + var options = new CustomerBalanceTransactionUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new CustomerBalanceTransactionService( + this.StripeClient); + CustomerBalanceTransaction customerBalanceTransaction = await service + .UpdateAsync( + "cus_xxxxxxxxxxxxx", + "cbtxn_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/customers/cus_xxxxxxxxxxxxx/balance_transactions/cbtxn_xxxxxxxxxxxxx"); + } + [Fact] public void TestCustomersCashBalanceGet() { @@ -959,6 +2330,16 @@ public void TestCustomersCashBalanceGet() "/v1/customers/cus_123/cash_balance"); } + [Fact] + public async Task TestCustomersCashBalanceGetAsync() + { + var service = new CustomerCashBalanceService(this.StripeClient); + CashBalance cashBalance = await service.GetAsync("cus_123"); + this.AssertRequest( + HttpMethod.Get, + "/v1/customers/cus_123/cash_balance"); + } + [Fact] public void TestCustomersCashBalancePost() { @@ -976,6 +2357,25 @@ public void TestCustomersCashBalancePost() "/v1/customers/cus_123/cash_balance"); } + [Fact] + public async Task TestCustomersCashBalancePostAsync() + { + var options = new CustomerCashBalanceUpdateOptions + { + Settings = new CustomerCashBalanceSettingsOptions + { + ReconciliationMode = "manual", + }, + }; + var service = new CustomerCashBalanceService(this.StripeClient); + CashBalance cashBalance = await service.UpdateAsync( + "cus_123", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/customers/cus_123/cash_balance"); + } + [Fact] public void TestCustomersCashBalanceTransactionsGet() { @@ -994,36 +2394,123 @@ public void TestCustomersCashBalanceTransactionsGet() } [Fact] - public void TestCustomersDelete() + public async Task TestCustomersCashBalanceTransactionsGetAsync() { - var service = new CustomerService(this.StripeClient); - Customer deleted = service.Delete("cus_xxxxxxxxxxxxx"); + var options = new CustomerCashBalanceTransactionListOptions + { + Limit = 3, + }; + var service = new CustomerCashBalanceTransactionService( + this.StripeClient); + StripeList customerCashBalanceTransactions = await service + .ListAsync("cus_123", options); this.AssertRequest( - HttpMethod.Delete, - "/v1/customers/cus_xxxxxxxxxxxxx"); + HttpMethod.Get, + "/v1/customers/cus_123/cash_balance_transactions", + "limit=3"); } [Fact] - public void TestCustomersFundingInstructionsPost() + public void TestCustomersCashBalanceTransactionsGetAutoPaging() { - var options = new CustomerFundingInstructionsCreateOptions + var options = new CustomerCashBalanceTransactionListOptions { - BankTransfer = new CustomerFundingInstructionsBankTransferOptions - { - RequestedAddressTypes = new List { "zengin" }, - Type = "jp_bank_transfer", - }, - Currency = "usd", - FundingType = "bank_transfer", + Limit = 3, }; - var service = new CustomerFundingInstructionsService( + var service = new CustomerCashBalanceTransactionService( this.StripeClient); - FundingInstructions fundingInstructions = service.Create( + var customerCashBalanceTransaction = service.ListAutoPaging( "cus_123", - options); + options) + .First(); this.AssertRequest( - HttpMethod.Post, - "/v1/customers/cus_123/funding_instructions"); + HttpMethod.Get, + "/v1/customers/cus_123/cash_balance_transactions", + "limit=3"); + } + + [Fact] + public async Task TestCustomersCashBalanceTransactionsGetAutoPagingAsync() + { + var options = new CustomerCashBalanceTransactionListOptions + { + Limit = 3, + }; + var service = new CustomerCashBalanceTransactionService( + this.StripeClient); + var customerCashBalanceTransaction = await service + .ListAutoPagingAsync("cus_123", options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/customers/cus_123/cash_balance_transactions", + "limit=3"); + } + + [Fact] + public void TestCustomersDelete() + { + var service = new CustomerService(this.StripeClient); + Customer deleted = service.Delete("cus_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Delete, + "/v1/customers/cus_xxxxxxxxxxxxx"); + } + + [Fact] + public async Task TestCustomersDeleteAsync() + { + var service = new CustomerService(this.StripeClient); + Customer deleted = await service.DeleteAsync("cus_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Delete, + "/v1/customers/cus_xxxxxxxxxxxxx"); + } + + [Fact] + public void TestCustomersFundingInstructionsPost() + { + var options = new CustomerFundingInstructionsCreateOptions + { + BankTransfer = new CustomerFundingInstructionsBankTransferOptions + { + RequestedAddressTypes = new List { "zengin" }, + Type = "jp_bank_transfer", + }, + Currency = "usd", + FundingType = "bank_transfer", + }; + var service = new CustomerFundingInstructionsService( + this.StripeClient); + FundingInstructions fundingInstructions = service.Create( + "cus_123", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/customers/cus_123/funding_instructions"); + } + + [Fact] + public async Task TestCustomersFundingInstructionsPostAsync() + { + var options = new CustomerFundingInstructionsCreateOptions + { + BankTransfer = new CustomerFundingInstructionsBankTransferOptions + { + RequestedAddressTypes = new List { "zengin" }, + Type = "jp_bank_transfer", + }, + Currency = "usd", + FundingType = "bank_transfer", + }; + var service = new CustomerFundingInstructionsService( + this.StripeClient); + FundingInstructions fundingInstructions = await service.CreateAsync( + "cus_123", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/customers/cus_123/funding_instructions"); } [Fact] @@ -1035,6 +2522,34 @@ public void TestCustomersGet() this.AssertRequest(HttpMethod.Get, "/v1/customers", "limit=3"); } + [Fact] + public async Task TestCustomersGetAsync() + { + var options = new CustomerListOptions { Limit = 3 }; + var service = new CustomerService(this.StripeClient); + StripeList customers = await service.ListAsync(options); + this.AssertRequest(HttpMethod.Get, "/v1/customers", "limit=3"); + } + + [Fact] + public void TestCustomersGetAutoPaging() + { + var options = new CustomerListOptions { Limit = 3 }; + var service = new CustomerService(this.StripeClient); + var customer = service.ListAutoPaging(options).First(); + this.AssertRequest(HttpMethod.Get, "/v1/customers", "limit=3"); + } + + [Fact] + public async Task TestCustomersGetAutoPagingAsync() + { + var options = new CustomerListOptions { Limit = 3 }; + var service = new CustomerService(this.StripeClient); + var customer = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/customers", "limit=3"); + } + [Fact] public void TestCustomersGet2() { @@ -1044,6 +2559,34 @@ public void TestCustomersGet2() this.AssertRequest(HttpMethod.Get, "/v1/customers", "limit=3"); } + [Fact] + public async Task TestCustomersGet2Async() + { + var options = new CustomerListOptions { Limit = 3 }; + var service = new CustomerService(this.StripeClient); + StripeList customers = await service.ListAsync(options); + this.AssertRequest(HttpMethod.Get, "/v1/customers", "limit=3"); + } + + [Fact] + public void TestCustomersGet2AutoPaging() + { + var options = new CustomerListOptions { Limit = 3 }; + var service = new CustomerService(this.StripeClient); + var customer = service.ListAutoPaging(options).First(); + this.AssertRequest(HttpMethod.Get, "/v1/customers", "limit=3"); + } + + [Fact] + public async Task TestCustomersGet2AutoPagingAsync() + { + var options = new CustomerListOptions { Limit = 3 }; + var service = new CustomerService(this.StripeClient); + var customer = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/customers", "limit=3"); + } + [Fact] public void TestCustomersGet3() { @@ -1054,6 +2597,16 @@ public void TestCustomersGet3() "/v1/customers/cus_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestCustomersGet3Async() + { + var service = new CustomerService(this.StripeClient); + Customer customer = await service.GetAsync("cus_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/customers/cus_xxxxxxxxxxxxx"); + } + [Fact] public void TestCustomersPaymentMethodsGet() { @@ -1071,6 +2624,57 @@ public void TestCustomersPaymentMethodsGet() "type=card"); } + [Fact] + public async Task TestCustomersPaymentMethodsGetAsync() + { + var options = new CustomerPaymentMethodListOptions + { + Type = "card", + }; + var service = new CustomerPaymentMethodService(this.StripeClient); + StripeList paymentMethods = await service.ListAsync( + "cus_xyz", + options); + this.AssertRequest( + HttpMethod.Get, + "/v1/customers/cus_xyz/payment_methods", + "type=card"); + } + + [Fact] + public void TestCustomersPaymentMethodsGetAutoPaging() + { + var options = new CustomerPaymentMethodListOptions + { + Type = "card", + }; + var service = new CustomerPaymentMethodService(this.StripeClient); + var paymentMethod = service.ListAutoPaging("cus_xyz", options) + .First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/customers/cus_xyz/payment_methods", + "type=card"); + } + + [Fact] + public async Task TestCustomersPaymentMethodsGetAutoPagingAsync() + { + var options = new CustomerPaymentMethodListOptions + { + Type = "card", + }; + var service = new CustomerPaymentMethodService(this.StripeClient); + var paymentMethod = await service.ListAutoPagingAsync( + "cus_xyz", + options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/customers/cus_xyz/payment_methods", + "type=card"); + } + [Fact] public void TestCustomersPaymentMethodsGet2() { @@ -1088,6 +2692,59 @@ public void TestCustomersPaymentMethodsGet2() "type=card"); } + [Fact] + public async Task TestCustomersPaymentMethodsGet2Async() + { + var options = new CustomerPaymentMethodListOptions + { + Type = "card", + }; + var service = new CustomerPaymentMethodService(this.StripeClient); + StripeList paymentMethods = await service.ListAsync( + "cus_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Get, + "/v1/customers/cus_xxxxxxxxxxxxx/payment_methods", + "type=card"); + } + + [Fact] + public void TestCustomersPaymentMethodsGet2AutoPaging() + { + var options = new CustomerPaymentMethodListOptions + { + Type = "card", + }; + var service = new CustomerPaymentMethodService(this.StripeClient); + var paymentMethod = service.ListAutoPaging( + "cus_xxxxxxxxxxxxx", + options) + .First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/customers/cus_xxxxxxxxxxxxx/payment_methods", + "type=card"); + } + + [Fact] + public async Task TestCustomersPaymentMethodsGet2AutoPagingAsync() + { + var options = new CustomerPaymentMethodListOptions + { + Type = "card", + }; + var service = new CustomerPaymentMethodService(this.StripeClient); + var paymentMethod = await service.ListAutoPagingAsync( + "cus_xxxxxxxxxxxxx", + options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/customers/cus_xxxxxxxxxxxxx/payment_methods", + "type=card"); + } + [Fact] public void TestCustomersPost() { @@ -1100,6 +2757,18 @@ public void TestCustomersPost() this.AssertRequest(HttpMethod.Post, "/v1/customers"); } + [Fact] + public async Task TestCustomersPostAsync() + { + var options = new CustomerCreateOptions + { + Description = "My First Test Customer (created for API docs at https://www.stripe.com/docs/api)", + }; + var service = new CustomerService(this.StripeClient); + Customer customer = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/customers"); + } + [Fact] public void TestCustomersPost2() { @@ -1117,6 +2786,25 @@ public void TestCustomersPost2() "/v1/customers/cus_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestCustomersPost2Async() + { + var options = new CustomerUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new CustomerService(this.StripeClient); + Customer customer = await service.UpdateAsync( + "cus_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/customers/cus_xxxxxxxxxxxxx"); + } + [Fact] public void TestCustomersSearchGet() { @@ -1133,14 +2821,15 @@ public void TestCustomersSearchGet() } [Fact] - public void TestCustomersSearchGet2() + public async Task TestCustomersSearchGetAsync() { var options = new CustomerSearchOptions { Query = "name:'fakename' AND metadata['foo']:'bar'", }; var service = new CustomerService(this.StripeClient); - StripeSearchResult customers = service.Search(options); + StripeSearchResult customers = await service.SearchAsync( + options); this.AssertRequest( HttpMethod.Get, "/v1/customers/search", @@ -1148,15 +2837,120 @@ public void TestCustomersSearchGet2() } [Fact] - public void TestCustomersTaxIdsDelete() + public void TestCustomersSearchGetAutoPaging() { - var service = new CustomerTaxIdService(this.StripeClient); - TaxId deleted = service.Delete( - "cus_xxxxxxxxxxxxx", - "txi_xxxxxxxxxxxxx"); + var options = new CustomerSearchOptions + { + Query = "name:'fakename' AND metadata['foo']:'bar'", + }; + var service = new CustomerService(this.StripeClient); + var customer = service.SearchAutoPaging(options).First(); this.AssertRequest( - HttpMethod.Delete, - "/v1/customers/cus_xxxxxxxxxxxxx/tax_ids/txi_xxxxxxxxxxxxx"); + HttpMethod.Get, + "/v1/customers/search", + "query=name%3A%27fakename%27%20AND%20metadata%5B%27foo%27%5D%3A%27bar%27"); + } + + [Fact] + public async Task TestCustomersSearchGetAutoPagingAsync() + { + var options = new CustomerSearchOptions + { + Query = "name:'fakename' AND metadata['foo']:'bar'", + }; + var service = new CustomerService(this.StripeClient); + var customer = await service.SearchAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/customers/search", + "query=name%3A%27fakename%27%20AND%20metadata%5B%27foo%27%5D%3A%27bar%27"); + } + + [Fact] + public void TestCustomersSearchGet2() + { + var options = new CustomerSearchOptions + { + Query = "name:'fakename' AND metadata['foo']:'bar'", + }; + var service = new CustomerService(this.StripeClient); + StripeSearchResult customers = service.Search(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/customers/search", + "query=name%3A%27fakename%27%20AND%20metadata%5B%27foo%27%5D%3A%27bar%27"); + } + + [Fact] + public async Task TestCustomersSearchGet2Async() + { + var options = new CustomerSearchOptions + { + Query = "name:'fakename' AND metadata['foo']:'bar'", + }; + var service = new CustomerService(this.StripeClient); + StripeSearchResult customers = await service.SearchAsync( + options); + this.AssertRequest( + HttpMethod.Get, + "/v1/customers/search", + "query=name%3A%27fakename%27%20AND%20metadata%5B%27foo%27%5D%3A%27bar%27"); + } + + [Fact] + public void TestCustomersSearchGet2AutoPaging() + { + var options = new CustomerSearchOptions + { + Query = "name:'fakename' AND metadata['foo']:'bar'", + }; + var service = new CustomerService(this.StripeClient); + var customer = service.SearchAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/customers/search", + "query=name%3A%27fakename%27%20AND%20metadata%5B%27foo%27%5D%3A%27bar%27"); + } + + [Fact] + public async Task TestCustomersSearchGet2AutoPagingAsync() + { + var options = new CustomerSearchOptions + { + Query = "name:'fakename' AND metadata['foo']:'bar'", + }; + var service = new CustomerService(this.StripeClient); + var customer = await service.SearchAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/customers/search", + "query=name%3A%27fakename%27%20AND%20metadata%5B%27foo%27%5D%3A%27bar%27"); + } + + [Fact] + public void TestCustomersTaxIdsDelete() + { + var service = new CustomerTaxIdService(this.StripeClient); + TaxId deleted = service.Delete( + "cus_xxxxxxxxxxxxx", + "txi_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Delete, + "/v1/customers/cus_xxxxxxxxxxxxx/tax_ids/txi_xxxxxxxxxxxxx"); + } + + [Fact] + public async Task TestCustomersTaxIdsDeleteAsync() + { + var service = new CustomerTaxIdService(this.StripeClient); + TaxId deleted = await service.DeleteAsync( + "cus_xxxxxxxxxxxxx", + "txi_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Delete, + "/v1/customers/cus_xxxxxxxxxxxxx/tax_ids/txi_xxxxxxxxxxxxx"); } [Fact] @@ -1173,6 +2967,48 @@ public void TestCustomersTaxIdsGet() "limit=3"); } + [Fact] + public async Task TestCustomersTaxIdsGetAsync() + { + var options = new CustomerTaxIdListOptions { Limit = 3 }; + var service = new CustomerTaxIdService(this.StripeClient); + StripeList taxIds = await service.ListAsync( + "cus_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Get, + "/v1/customers/cus_xxxxxxxxxxxxx/tax_ids", + "limit=3"); + } + + [Fact] + public void TestCustomersTaxIdsGetAutoPaging() + { + var options = new CustomerTaxIdListOptions { Limit = 3 }; + var service = new CustomerTaxIdService(this.StripeClient); + var taxId = service.ListAutoPaging("cus_xxxxxxxxxxxxx", options) + .First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/customers/cus_xxxxxxxxxxxxx/tax_ids", + "limit=3"); + } + + [Fact] + public async Task TestCustomersTaxIdsGetAutoPagingAsync() + { + var options = new CustomerTaxIdListOptions { Limit = 3 }; + var service = new CustomerTaxIdService(this.StripeClient); + var taxId = await service.ListAutoPagingAsync( + "cus_xxxxxxxxxxxxx", + options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/customers/cus_xxxxxxxxxxxxx/tax_ids", + "limit=3"); + } + [Fact] public void TestCustomersTaxIdsGet2() { @@ -1183,6 +3019,18 @@ public void TestCustomersTaxIdsGet2() "/v1/customers/cus_xxxxxxxxxxxxx/tax_ids/txi_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestCustomersTaxIdsGet2Async() + { + var service = new CustomerTaxIdService(this.StripeClient); + TaxId taxId = await service.GetAsync( + "cus_xxxxxxxxxxxxx", + "txi_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/customers/cus_xxxxxxxxxxxxx/tax_ids/txi_xxxxxxxxxxxxx"); + } + [Fact] public void TestCustomersTaxIdsPost() { @@ -1198,6 +3046,23 @@ public void TestCustomersTaxIdsPost() "/v1/customers/cus_xxxxxxxxxxxxx/tax_ids"); } + [Fact] + public async Task TestCustomersTaxIdsPostAsync() + { + var options = new CustomerTaxIdCreateOptions + { + Type = "eu_vat", + Value = "DE123456789", + }; + var service = new CustomerTaxIdService(this.StripeClient); + TaxId taxId = await service.CreateAsync( + "cus_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/customers/cus_xxxxxxxxxxxxx/tax_ids"); + } + [Fact] public void TestDisputesClosePost() { @@ -1208,6 +3073,16 @@ public void TestDisputesClosePost() "/v1/disputes/dp_xxxxxxxxxxxxx/close"); } + [Fact] + public async Task TestDisputesClosePostAsync() + { + var service = new DisputeService(this.StripeClient); + Dispute dispute = await service.CloseAsync("dp_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/disputes/dp_xxxxxxxxxxxxx/close"); + } + [Fact] public void TestDisputesGet() { @@ -1217,6 +3092,34 @@ public void TestDisputesGet() this.AssertRequest(HttpMethod.Get, "/v1/disputes", "limit=3"); } + [Fact] + public async Task TestDisputesGetAsync() + { + var options = new DisputeListOptions { Limit = 3 }; + var service = new DisputeService(this.StripeClient); + StripeList disputes = await service.ListAsync(options); + this.AssertRequest(HttpMethod.Get, "/v1/disputes", "limit=3"); + } + + [Fact] + public void TestDisputesGetAutoPaging() + { + var options = new DisputeListOptions { Limit = 3 }; + var service = new DisputeService(this.StripeClient); + var dispute = service.ListAutoPaging(options).First(); + this.AssertRequest(HttpMethod.Get, "/v1/disputes", "limit=3"); + } + + [Fact] + public async Task TestDisputesGetAutoPagingAsync() + { + var options = new DisputeListOptions { Limit = 3 }; + var service = new DisputeService(this.StripeClient); + var dispute = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/disputes", "limit=3"); + } + [Fact] public void TestDisputesGet2() { @@ -1225,6 +3128,14 @@ public void TestDisputesGet2() this.AssertRequest(HttpMethod.Get, "/v1/disputes/dp_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestDisputesGet2Async() + { + var service = new DisputeService(this.StripeClient); + Dispute dispute = await service.GetAsync("dp_xxxxxxxxxxxxx"); + this.AssertRequest(HttpMethod.Get, "/v1/disputes/dp_xxxxxxxxxxxxx"); + } + [Fact] public void TestDisputesPost() { @@ -1242,6 +3153,25 @@ public void TestDisputesPost() "/v1/disputes/dp_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestDisputesPostAsync() + { + var options = new DisputeUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new DisputeService(this.StripeClient); + Dispute dispute = await service.UpdateAsync( + "dp_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/disputes/dp_xxxxxxxxxxxxx"); + } + [Fact] public void TestEventsGet() { @@ -1251,6 +3181,34 @@ public void TestEventsGet() this.AssertRequest(HttpMethod.Get, "/v1/events", "limit=3"); } + [Fact] + public async Task TestEventsGetAsync() + { + var options = new EventListOptions { Limit = 3 }; + var service = new EventService(this.StripeClient); + StripeList events = await service.ListAsync(options); + this.AssertRequest(HttpMethod.Get, "/v1/events", "limit=3"); + } + + [Fact] + public void TestEventsGetAutoPaging() + { + var options = new EventListOptions { Limit = 3 }; + var service = new EventService(this.StripeClient); + var result = service.ListAutoPaging(options).First(); + this.AssertRequest(HttpMethod.Get, "/v1/events", "limit=3"); + } + + [Fact] + public async Task TestEventsGetAutoPagingAsync() + { + var options = new EventListOptions { Limit = 3 }; + var service = new EventService(this.StripeClient); + var result = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/events", "limit=3"); + } + [Fact] public void TestEventsGet2() { @@ -1259,6 +3217,14 @@ public void TestEventsGet2() this.AssertRequest(HttpMethod.Get, "/v1/events/evt_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestEventsGet2Async() + { + var service = new EventService(this.StripeClient); + Event result = await service.GetAsync("evt_xxxxxxxxxxxxx"); + this.AssertRequest(HttpMethod.Get, "/v1/events/evt_xxxxxxxxxxxxx"); + } + [Fact] public void TestFileLinksGet() { @@ -1269,40 +3235,109 @@ public void TestFileLinksGet() } [Fact] - public void TestFileLinksGet2() + public async Task TestFileLinksGetAsync() { + var options = new FileLinkListOptions { Limit = 3 }; var service = new FileLinkService(this.StripeClient); - FileLink fileLink = service.Get("link_xxxxxxxxxxxxx"); - this.AssertRequest( - HttpMethod.Get, - "/v1/file_links/link_xxxxxxxxxxxxx"); + StripeList fileLinks = await service.ListAsync(options); + this.AssertRequest(HttpMethod.Get, "/v1/file_links", "limit=3"); } [Fact] - public void TestFileLinksPost() + public void TestFileLinksGetAutoPaging() { - var options = new FileLinkCreateOptions - { - File = "file_xxxxxxxxxxxxx", - }; + var options = new FileLinkListOptions { Limit = 3 }; var service = new FileLinkService(this.StripeClient); - FileLink fileLink = service.Create(options); - this.AssertRequest(HttpMethod.Post, "/v1/file_links"); + var fileLink = service.ListAutoPaging(options).First(); + this.AssertRequest(HttpMethod.Get, "/v1/file_links", "limit=3"); } [Fact] - public void TestFileLinksPost2() + public async Task TestFileLinksGetAutoPagingAsync() { - var options = new FileLinkUpdateOptions - { - Metadata = new Dictionary - { - { "order_id", "6735" }, - }, - }; + var options = new FileLinkListOptions { Limit = 3 }; var service = new FileLinkService(this.StripeClient); - FileLink fileLink = service.Update("link_xxxxxxxxxxxxx", options); - this.AssertRequest( + var fileLink = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/file_links", "limit=3"); + } + + [Fact] + public void TestFileLinksGet2() + { + var service = new FileLinkService(this.StripeClient); + FileLink fileLink = service.Get("link_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/file_links/link_xxxxxxxxxxxxx"); + } + + [Fact] + public async Task TestFileLinksGet2Async() + { + var service = new FileLinkService(this.StripeClient); + FileLink fileLink = await service.GetAsync("link_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/file_links/link_xxxxxxxxxxxxx"); + } + + [Fact] + public void TestFileLinksPost() + { + var options = new FileLinkCreateOptions + { + File = "file_xxxxxxxxxxxxx", + }; + var service = new FileLinkService(this.StripeClient); + FileLink fileLink = service.Create(options); + this.AssertRequest(HttpMethod.Post, "/v1/file_links"); + } + + [Fact] + public async Task TestFileLinksPostAsync() + { + var options = new FileLinkCreateOptions + { + File = "file_xxxxxxxxxxxxx", + }; + var service = new FileLinkService(this.StripeClient); + FileLink fileLink = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/file_links"); + } + + [Fact] + public void TestFileLinksPost2() + { + var options = new FileLinkUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new FileLinkService(this.StripeClient); + FileLink fileLink = service.Update("link_xxxxxxxxxxxxx", options); + this.AssertRequest( + HttpMethod.Post, + "/v1/file_links/link_xxxxxxxxxxxxx"); + } + + [Fact] + public async Task TestFileLinksPost2Async() + { + var options = new FileLinkUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new FileLinkService(this.StripeClient); + FileLink fileLink = await service.UpdateAsync( + "link_xxxxxxxxxxxxx", + options); + this.AssertRequest( HttpMethod.Post, "/v1/file_links/link_xxxxxxxxxxxxx"); } @@ -1316,6 +3351,33 @@ public void TestFilesGet() this.AssertRequest(HttpMethod.Get, "/v1/files", "limit=3"); } + [Fact] + public async Task TestFilesGetAsync() + { + var options = new FileListOptions { Limit = 3 }; + var service = new FileService(this.StripeClient); + StripeList files = await service.ListAsync(options); + this.AssertRequest(HttpMethod.Get, "/v1/files", "limit=3"); + } + + [Fact] + public void TestFilesGetAutoPaging() + { + var options = new FileListOptions { Limit = 3 }; + var service = new FileService(this.StripeClient); + var file = service.ListAutoPaging(options).First(); + this.AssertRequest(HttpMethod.Get, "/v1/files", "limit=3"); + } + + [Fact] + public async Task TestFilesGetAutoPagingAsync() + { + var options = new FileListOptions { Limit = 3 }; + var service = new FileService(this.StripeClient); + var file = await service.ListAutoPagingAsync(options).FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/files", "limit=3"); + } + [Fact] public void TestFilesGet2() { @@ -1324,6 +3386,14 @@ public void TestFilesGet2() this.AssertRequest(HttpMethod.Get, "/v1/files/file_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestFilesGet2Async() + { + var service = new FileService(this.StripeClient); + File file = await service.GetAsync("file_xxxxxxxxxxxxx"); + this.AssertRequest(HttpMethod.Get, "/v1/files/file_xxxxxxxxxxxxx"); + } + [Fact] public void TestFilesPost() { @@ -1341,6 +3411,23 @@ public void TestFilesPost() this.AssertRequest(HttpMethod.Post, "/v1/files"); } + [Fact] + public async Task TestFilesPostAsync() + { + var options = new FileCreateOptions + { + Purpose = "account_requirement", + File = new Stripe.MultipartFileContent + { + Data = new System.IO.MemoryStream( + System.Text.Encoding.UTF8.GetBytes("File contents")), + }, + }; + var service = new FileService(this.StripeClient); + File file = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/files"); + } + [Fact] public void TestFinancialConnectionsAccountsDisconnectPost() { @@ -1353,6 +3440,18 @@ public void TestFinancialConnectionsAccountsDisconnectPost() "/v1/financial_connections/accounts/fca_xyz/disconnect"); } + [Fact] + public async Task TestFinancialConnectionsAccountsDisconnectPostAsync() + { + var service = new Stripe.FinancialConnections.AccountService( + this.StripeClient); + Stripe.FinancialConnections.Account account = await service + .DisconnectAsync("fca_xyz"); + this.AssertRequest( + HttpMethod.Post, + "/v1/financial_connections/accounts/fca_xyz/disconnect"); + } + [Fact] public void TestFinancialConnectionsAccountsDisconnectPost2() { @@ -1365,6 +3464,18 @@ public void TestFinancialConnectionsAccountsDisconnectPost2() "/v1/financial_connections/accounts/fca_xxxxxxxxxxxxx/disconnect"); } + [Fact] + public async Task TestFinancialConnectionsAccountsDisconnectPost2Async() + { + var service = new Stripe.FinancialConnections.AccountService( + this.StripeClient); + Stripe.FinancialConnections.Account account = await service + .DisconnectAsync("fca_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/financial_connections/accounts/fca_xxxxxxxxxxxxx/disconnect"); + } + [Fact] public void TestFinancialConnectionsAccountsGet() { @@ -1377,6 +3488,40 @@ public void TestFinancialConnectionsAccountsGet() "/v1/financial_connections/accounts"); } + [Fact] + public async Task TestFinancialConnectionsAccountsGetAsync() + { + var service = new Stripe.FinancialConnections.AccountService( + this.StripeClient); + StripeList accounts = await service + .ListAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/financial_connections/accounts"); + } + + [Fact] + public void TestFinancialConnectionsAccountsGetAutoPaging() + { + var service = new Stripe.FinancialConnections.AccountService( + this.StripeClient); + var account = service.ListAutoPaging().First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/financial_connections/accounts"); + } + + [Fact] + public async Task TestFinancialConnectionsAccountsGetAutoPagingAsync() + { + var service = new Stripe.FinancialConnections.AccountService( + this.StripeClient); + var account = await service.ListAutoPagingAsync().FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/financial_connections/accounts"); + } + [Fact] public void TestFinancialConnectionsAccountsGet2() { @@ -1389,6 +3534,18 @@ public void TestFinancialConnectionsAccountsGet2() "/v1/financial_connections/accounts/fca_xyz"); } + [Fact] + public async Task TestFinancialConnectionsAccountsGet2Async() + { + var service = new Stripe.FinancialConnections.AccountService( + this.StripeClient); + Stripe.FinancialConnections.Account account = await service + .GetAsync("fca_xyz"); + this.AssertRequest( + HttpMethod.Get, + "/v1/financial_connections/accounts/fca_xyz"); + } + [Fact] public void TestFinancialConnectionsAccountsGet3() { @@ -1409,6 +3566,65 @@ public void TestFinancialConnectionsAccountsGet3() "account_holder[customer]=cus_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestFinancialConnectionsAccountsGet3Async() + { + var options = new Stripe.FinancialConnections.AccountListOptions + { + AccountHolder = new Stripe.FinancialConnections.AccountAccountHolderOptions + { + Customer = "cus_xxxxxxxxxxxxx", + }, + }; + var service = new Stripe.FinancialConnections.AccountService( + this.StripeClient); + StripeList accounts = await service + .ListAsync(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/financial_connections/accounts", + "account_holder[customer]=cus_xxxxxxxxxxxxx"); + } + + [Fact] + public void TestFinancialConnectionsAccountsGet3AutoPaging() + { + var options = new Stripe.FinancialConnections.AccountListOptions + { + AccountHolder = new Stripe.FinancialConnections.AccountAccountHolderOptions + { + Customer = "cus_xxxxxxxxxxxxx", + }, + }; + var service = new Stripe.FinancialConnections.AccountService( + this.StripeClient); + var account = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/financial_connections/accounts", + "account_holder[customer]=cus_xxxxxxxxxxxxx"); + } + + [Fact] + public async Task TestFinancialConnectionsAccountsGet3AutoPagingAsync() + { + var options = new Stripe.FinancialConnections.AccountListOptions + { + AccountHolder = new Stripe.FinancialConnections.AccountAccountHolderOptions + { + Customer = "cus_xxxxxxxxxxxxx", + }, + }; + var service = new Stripe.FinancialConnections.AccountService( + this.StripeClient); + var account = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/financial_connections/accounts", + "account_holder[customer]=cus_xxxxxxxxxxxxx"); + } + [Fact] public void TestFinancialConnectionsAccountsGet4() { @@ -1421,6 +3637,18 @@ public void TestFinancialConnectionsAccountsGet4() "/v1/financial_connections/accounts/fca_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestFinancialConnectionsAccountsGet4Async() + { + var service = new Stripe.FinancialConnections.AccountService( + this.StripeClient); + Stripe.FinancialConnections.Account account = await service + .GetAsync("fca_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/financial_connections/accounts/fca_xxxxxxxxxxxxx"); + } + [Fact] public void TestFinancialConnectionsAccountsOwnersGet() { @@ -1439,44 +3667,171 @@ public void TestFinancialConnectionsAccountsOwnersGet() } [Fact] - public void TestFinancialConnectionsAccountsOwnersGet2() + public async Task TestFinancialConnectionsAccountsOwnersGetAsync() { var options = new Stripe.FinancialConnections.AccountOwnerListOptions { - Limit = 3, - Ownership = "fcaowns_xxxxxxxxxxxxx", + Ownership = "fcaowns_xyz", }; var service = new Stripe.FinancialConnections.AccountOwnerService( this.StripeClient); - StripeList accountOwners = service - .List("fca_xxxxxxxxxxxxx", options); + StripeList accountOwners = await service + .ListAsync("fca_xyz", options); this.AssertRequest( HttpMethod.Get, - "/v1/financial_connections/accounts/fca_xxxxxxxxxxxxx/owners", - "limit=3&ownership=fcaowns_xxxxxxxxxxxxx"); + "/v1/financial_connections/accounts/fca_xyz/owners", + "ownership=fcaowns_xyz"); } [Fact] - public void TestFinancialConnectionsAccountsRefreshPost() + public void TestFinancialConnectionsAccountsOwnersGetAutoPaging() { - var options = new Stripe.FinancialConnections.AccountRefreshOptions + var options = new Stripe.FinancialConnections.AccountOwnerListOptions { - Features = new List { "balance" }, + Ownership = "fcaowns_xyz", }; - var service = new Stripe.FinancialConnections.AccountService( + var service = new Stripe.FinancialConnections.AccountOwnerService( this.StripeClient); - Stripe.FinancialConnections.Account account = service.Refresh( - "fca_xyz", - options); + var accountOwner = service.ListAutoPaging("fca_xyz", options) + .First(); this.AssertRequest( - HttpMethod.Post, - "/v1/financial_connections/accounts/fca_xyz/refresh"); + HttpMethod.Get, + "/v1/financial_connections/accounts/fca_xyz/owners", + "ownership=fcaowns_xyz"); } [Fact] - public void TestFinancialConnectionsAccountsSubscribePost() + public async Task TestFinancialConnectionsAccountsOwnersGetAutoPagingAsync() { - var options = new Stripe.FinancialConnections.AccountSubscribeOptions + var options = new Stripe.FinancialConnections.AccountOwnerListOptions + { + Ownership = "fcaowns_xyz", + }; + var service = new Stripe.FinancialConnections.AccountOwnerService( + this.StripeClient); + var accountOwner = await service.ListAutoPagingAsync( + "fca_xyz", + options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/financial_connections/accounts/fca_xyz/owners", + "ownership=fcaowns_xyz"); + } + + [Fact] + public void TestFinancialConnectionsAccountsOwnersGet2() + { + var options = new Stripe.FinancialConnections.AccountOwnerListOptions + { + Limit = 3, + Ownership = "fcaowns_xxxxxxxxxxxxx", + }; + var service = new Stripe.FinancialConnections.AccountOwnerService( + this.StripeClient); + StripeList accountOwners = service + .List("fca_xxxxxxxxxxxxx", options); + this.AssertRequest( + HttpMethod.Get, + "/v1/financial_connections/accounts/fca_xxxxxxxxxxxxx/owners", + "limit=3&ownership=fcaowns_xxxxxxxxxxxxx"); + } + + [Fact] + public async Task TestFinancialConnectionsAccountsOwnersGet2Async() + { + var options = new Stripe.FinancialConnections.AccountOwnerListOptions + { + Limit = 3, + Ownership = "fcaowns_xxxxxxxxxxxxx", + }; + var service = new Stripe.FinancialConnections.AccountOwnerService( + this.StripeClient); + StripeList accountOwners = await service + .ListAsync("fca_xxxxxxxxxxxxx", options); + this.AssertRequest( + HttpMethod.Get, + "/v1/financial_connections/accounts/fca_xxxxxxxxxxxxx/owners", + "limit=3&ownership=fcaowns_xxxxxxxxxxxxx"); + } + + [Fact] + public void TestFinancialConnectionsAccountsOwnersGet2AutoPaging() + { + var options = new Stripe.FinancialConnections.AccountOwnerListOptions + { + Limit = 3, + Ownership = "fcaowns_xxxxxxxxxxxxx", + }; + var service = new Stripe.FinancialConnections.AccountOwnerService( + this.StripeClient); + var accountOwner = service.ListAutoPaging( + "fca_xxxxxxxxxxxxx", + options) + .First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/financial_connections/accounts/fca_xxxxxxxxxxxxx/owners", + "limit=3&ownership=fcaowns_xxxxxxxxxxxxx"); + } + + [Fact] + public async Task TestFinancialConnectionsAccountsOwnersGet2AutoPagingAsync() + { + var options = new Stripe.FinancialConnections.AccountOwnerListOptions + { + Limit = 3, + Ownership = "fcaowns_xxxxxxxxxxxxx", + }; + var service = new Stripe.FinancialConnections.AccountOwnerService( + this.StripeClient); + var accountOwner = await service.ListAutoPagingAsync( + "fca_xxxxxxxxxxxxx", + options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/financial_connections/accounts/fca_xxxxxxxxxxxxx/owners", + "limit=3&ownership=fcaowns_xxxxxxxxxxxxx"); + } + + [Fact] + public void TestFinancialConnectionsAccountsRefreshPost() + { + var options = new Stripe.FinancialConnections.AccountRefreshOptions + { + Features = new List { "balance" }, + }; + var service = new Stripe.FinancialConnections.AccountService( + this.StripeClient); + Stripe.FinancialConnections.Account account = service.Refresh( + "fca_xyz", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/financial_connections/accounts/fca_xyz/refresh"); + } + + [Fact] + public async Task TestFinancialConnectionsAccountsRefreshPostAsync() + { + var options = new Stripe.FinancialConnections.AccountRefreshOptions + { + Features = new List { "balance" }, + }; + var service = new Stripe.FinancialConnections.AccountService( + this.StripeClient); + Stripe.FinancialConnections.Account account = await service + .RefreshAsync("fca_xyz", options); + this.AssertRequest( + HttpMethod.Post, + "/v1/financial_connections/accounts/fca_xyz/refresh"); + } + + [Fact] + public void TestFinancialConnectionsAccountsSubscribePost() + { + var options = new Stripe.FinancialConnections.AccountSubscribeOptions { Features = new List { "transactions" }, }; @@ -1490,6 +3845,22 @@ public void TestFinancialConnectionsAccountsSubscribePost() "/v1/financial_connections/accounts/fa_123/subscribe"); } + [Fact] + public async Task TestFinancialConnectionsAccountsSubscribePostAsync() + { + var options = new Stripe.FinancialConnections.AccountSubscribeOptions + { + Features = new List { "transactions" }, + }; + var service = new Stripe.FinancialConnections.AccountService( + this.StripeClient); + Stripe.FinancialConnections.Account account = await service + .SubscribeAsync("fa_123", options); + this.AssertRequest( + HttpMethod.Post, + "/v1/financial_connections/accounts/fa_123/subscribe"); + } + [Fact] public void TestFinancialConnectionsAccountsUnsubscribePost() { @@ -1507,6 +3878,22 @@ public void TestFinancialConnectionsAccountsUnsubscribePost() "/v1/financial_connections/accounts/fa_123/unsubscribe"); } + [Fact] + public async Task TestFinancialConnectionsAccountsUnsubscribePostAsync() + { + var options = new Stripe.FinancialConnections.AccountUnsubscribeOptions + { + Features = new List { "transactions" }, + }; + var service = new Stripe.FinancialConnections.AccountService( + this.StripeClient); + Stripe.FinancialConnections.Account account = await service + .UnsubscribeAsync("fa_123", options); + this.AssertRequest( + HttpMethod.Post, + "/v1/financial_connections/accounts/fa_123/unsubscribe"); + } + [Fact] public void TestFinancialConnectionsSessionsGet() { @@ -1519,6 +3906,18 @@ public void TestFinancialConnectionsSessionsGet() "/v1/financial_connections/sessions/fcsess_xyz"); } + [Fact] + public async Task TestFinancialConnectionsSessionsGetAsync() + { + var service = new Stripe.FinancialConnections.SessionService( + this.StripeClient); + Stripe.FinancialConnections.Session session = await service + .GetAsync("fcsess_xyz"); + this.AssertRequest( + HttpMethod.Get, + "/v1/financial_connections/sessions/fcsess_xyz"); + } + [Fact] public void TestFinancialConnectionsSessionsGet2() { @@ -1531,6 +3930,18 @@ public void TestFinancialConnectionsSessionsGet2() "/v1/financial_connections/sessions/fcsess_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestFinancialConnectionsSessionsGet2Async() + { + var service = new Stripe.FinancialConnections.SessionService( + this.StripeClient); + Stripe.FinancialConnections.Session session = await service + .GetAsync("fcsess_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/financial_connections/sessions/fcsess_xxxxxxxxxxxxx"); + } + [Fact] public void TestFinancialConnectionsSessionsPost() { @@ -1552,6 +3963,27 @@ public void TestFinancialConnectionsSessionsPost() "/v1/financial_connections/sessions"); } + [Fact] + public async Task TestFinancialConnectionsSessionsPostAsync() + { + var options = new Stripe.FinancialConnections.SessionCreateOptions + { + AccountHolder = new Stripe.FinancialConnections.SessionAccountHolderOptions + { + Type = "customer", + Customer = "cus_123", + }, + Permissions = new List { "balances" }, + }; + var service = new Stripe.FinancialConnections.SessionService( + this.StripeClient); + Stripe.FinancialConnections.Session session = await service + .CreateAsync(options); + this.AssertRequest( + HttpMethod.Post, + "/v1/financial_connections/sessions"); + } + [Fact] public void TestFinancialConnectionsSessionsPost2() { @@ -1577,6 +4009,31 @@ public void TestFinancialConnectionsSessionsPost2() "/v1/financial_connections/sessions"); } + [Fact] + public async Task TestFinancialConnectionsSessionsPost2Async() + { + var options = new Stripe.FinancialConnections.SessionCreateOptions + { + AccountHolder = new Stripe.FinancialConnections.SessionAccountHolderOptions + { + Type = "customer", + Customer = "cus_xxxxxxxxxxxxx", + }, + Permissions = new List { "payment_method", "balances" }, + Filters = new Stripe.FinancialConnections.SessionFiltersOptions + { + Countries = new List { "US" }, + }, + }; + var service = new Stripe.FinancialConnections.SessionService( + this.StripeClient); + Stripe.FinancialConnections.Session session = await service + .CreateAsync(options); + this.AssertRequest( + HttpMethod.Post, + "/v1/financial_connections/sessions"); + } + [Fact] public void TestFinancialConnectionsTransactionsGet() { @@ -1589,6 +4046,18 @@ public void TestFinancialConnectionsTransactionsGet() "/v1/financial_connections/transactions/tr_123"); } + [Fact] + public async Task TestFinancialConnectionsTransactionsGetAsync() + { + var service = new Stripe.FinancialConnections.TransactionService( + this.StripeClient); + Stripe.FinancialConnections.Transaction transaction = await service + .GetAsync("tr_123"); + this.AssertRequest( + HttpMethod.Get, + "/v1/financial_connections/transactions/tr_123"); + } + [Fact] public void TestFinancialConnectionsTransactionsGet2() { @@ -1607,70 +4076,256 @@ public void TestFinancialConnectionsTransactionsGet2() } [Fact] - public void TestIdentityVerificationReportsGet() + public async Task TestFinancialConnectionsTransactionsGet2Async() { - var options = new Stripe.Identity.VerificationReportListOptions + var options = new Stripe.FinancialConnections.TransactionListOptions { - Limit = 3, + Account = "fca_xyz", }; - var service = new Stripe.Identity.VerificationReportService( + var service = new Stripe.FinancialConnections.TransactionService( this.StripeClient); - StripeList verificationReports = service - .List(options); + StripeList transactions = await service + .ListAsync(options); this.AssertRequest( HttpMethod.Get, - "/v1/identity/verification_reports", - "limit=3"); + "/v1/financial_connections/transactions", + "account=fca_xyz"); } [Fact] - public void TestIdentityVerificationReportsGet2() + public void TestFinancialConnectionsTransactionsGet2AutoPaging() { - var service = new Stripe.Identity.VerificationReportService( + var options = new Stripe.FinancialConnections.TransactionListOptions + { + Account = "fca_xyz", + }; + var service = new Stripe.FinancialConnections.TransactionService( this.StripeClient); - Stripe.Identity.VerificationReport verificationReport = service.Get( - "vr_xxxxxxxxxxxxx"); + var transaction = service.ListAutoPaging(options).First(); this.AssertRequest( HttpMethod.Get, - "/v1/identity/verification_reports/vr_xxxxxxxxxxxxx"); + "/v1/financial_connections/transactions", + "account=fca_xyz"); } [Fact] - public void TestIdentityVerificationSessionsCancelPost() + public async Task TestFinancialConnectionsTransactionsGet2AutoPagingAsync() { - var service = new Stripe.Identity.VerificationSessionService( + var options = new Stripe.FinancialConnections.TransactionListOptions + { + Account = "fca_xyz", + }; + var service = new Stripe.FinancialConnections.TransactionService( this.StripeClient); - Stripe.Identity.VerificationSession verificationSession = service - .Cancel("vs_xxxxxxxxxxxxx"); + var transaction = await service.ListAutoPagingAsync(options) + .FirstAsync(); this.AssertRequest( - HttpMethod.Post, - "/v1/identity/verification_sessions/vs_xxxxxxxxxxxxx/cancel"); + HttpMethod.Get, + "/v1/financial_connections/transactions", + "account=fca_xyz"); } [Fact] - public void TestIdentityVerificationSessionsGet() + public void TestIdentityVerificationReportsGet() { - var options = new Stripe.Identity.VerificationSessionListOptions + var options = new Stripe.Identity.VerificationReportListOptions { Limit = 3, }; - var service = new Stripe.Identity.VerificationSessionService( + var service = new Stripe.Identity.VerificationReportService( this.StripeClient); - StripeList verificationSessions = service + StripeList verificationReports = service .List(options); this.AssertRequest( HttpMethod.Get, - "/v1/identity/verification_sessions", + "/v1/identity/verification_reports", "limit=3"); } [Fact] - public void TestIdentityVerificationSessionsGet2() + public async Task TestIdentityVerificationReportsGetAsync() { - var service = new Stripe.Identity.VerificationSessionService( - this.StripeClient); - Stripe.Identity.VerificationSession verificationSession = service - .Get("vs_xxxxxxxxxxxxx"); + var options = new Stripe.Identity.VerificationReportListOptions + { + Limit = 3, + }; + var service = new Stripe.Identity.VerificationReportService( + this.StripeClient); + StripeList verificationReports = await service + .ListAsync(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/identity/verification_reports", + "limit=3"); + } + + [Fact] + public void TestIdentityVerificationReportsGetAutoPaging() + { + var options = new Stripe.Identity.VerificationReportListOptions + { + Limit = 3, + }; + var service = new Stripe.Identity.VerificationReportService( + this.StripeClient); + var verificationReport = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/identity/verification_reports", + "limit=3"); + } + + [Fact] + public async Task TestIdentityVerificationReportsGetAutoPagingAsync() + { + var options = new Stripe.Identity.VerificationReportListOptions + { + Limit = 3, + }; + var service = new Stripe.Identity.VerificationReportService( + this.StripeClient); + var verificationReport = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/identity/verification_reports", + "limit=3"); + } + + [Fact] + public void TestIdentityVerificationReportsGet2() + { + var service = new Stripe.Identity.VerificationReportService( + this.StripeClient); + Stripe.Identity.VerificationReport verificationReport = service.Get( + "vr_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/identity/verification_reports/vr_xxxxxxxxxxxxx"); + } + + [Fact] + public async Task TestIdentityVerificationReportsGet2Async() + { + var service = new Stripe.Identity.VerificationReportService( + this.StripeClient); + Stripe.Identity.VerificationReport verificationReport = await service + .GetAsync("vr_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/identity/verification_reports/vr_xxxxxxxxxxxxx"); + } + + [Fact] + public void TestIdentityVerificationSessionsCancelPost() + { + var service = new Stripe.Identity.VerificationSessionService( + this.StripeClient); + Stripe.Identity.VerificationSession verificationSession = service + .Cancel("vs_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/identity/verification_sessions/vs_xxxxxxxxxxxxx/cancel"); + } + + [Fact] + public async Task TestIdentityVerificationSessionsCancelPostAsync() + { + var service = new Stripe.Identity.VerificationSessionService( + this.StripeClient); + Stripe.Identity.VerificationSession verificationSession = await service + .CancelAsync("vs_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/identity/verification_sessions/vs_xxxxxxxxxxxxx/cancel"); + } + + [Fact] + public void TestIdentityVerificationSessionsGet() + { + var options = new Stripe.Identity.VerificationSessionListOptions + { + Limit = 3, + }; + var service = new Stripe.Identity.VerificationSessionService( + this.StripeClient); + StripeList verificationSessions = service + .List(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/identity/verification_sessions", + "limit=3"); + } + + [Fact] + public async Task TestIdentityVerificationSessionsGetAsync() + { + var options = new Stripe.Identity.VerificationSessionListOptions + { + Limit = 3, + }; + var service = new Stripe.Identity.VerificationSessionService( + this.StripeClient); + StripeList verificationSessions = await service + .ListAsync(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/identity/verification_sessions", + "limit=3"); + } + + [Fact] + public void TestIdentityVerificationSessionsGetAutoPaging() + { + var options = new Stripe.Identity.VerificationSessionListOptions + { + Limit = 3, + }; + var service = new Stripe.Identity.VerificationSessionService( + this.StripeClient); + var verificationSession = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/identity/verification_sessions", + "limit=3"); + } + + [Fact] + public async Task TestIdentityVerificationSessionsGetAutoPagingAsync() + { + var options = new Stripe.Identity.VerificationSessionListOptions + { + Limit = 3, + }; + var service = new Stripe.Identity.VerificationSessionService( + this.StripeClient); + var verificationSession = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/identity/verification_sessions", + "limit=3"); + } + + [Fact] + public void TestIdentityVerificationSessionsGet2() + { + var service = new Stripe.Identity.VerificationSessionService( + this.StripeClient); + Stripe.Identity.VerificationSession verificationSession = service + .Get("vs_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/identity/verification_sessions/vs_xxxxxxxxxxxxx"); + } + + [Fact] + public async Task TestIdentityVerificationSessionsGet2Async() + { + var service = new Stripe.Identity.VerificationSessionService( + this.StripeClient); + Stripe.Identity.VerificationSession verificationSession = await service + .GetAsync("vs_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, "/v1/identity/verification_sessions/vs_xxxxxxxxxxxxx"); @@ -1692,6 +4347,22 @@ public void TestIdentityVerificationSessionsPost() "/v1/identity/verification_sessions"); } + [Fact] + public async Task TestIdentityVerificationSessionsPostAsync() + { + var options = new Stripe.Identity.VerificationSessionCreateOptions + { + Type = "document", + }; + var service = new Stripe.Identity.VerificationSessionService( + this.StripeClient); + Stripe.Identity.VerificationSession verificationSession = await service + .CreateAsync(options); + this.AssertRequest( + HttpMethod.Post, + "/v1/identity/verification_sessions"); + } + [Fact] public void TestIdentityVerificationSessionsPost2() { @@ -1708,6 +4379,22 @@ public void TestIdentityVerificationSessionsPost2() "/v1/identity/verification_sessions/vs_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestIdentityVerificationSessionsPost2Async() + { + var options = new Stripe.Identity.VerificationSessionUpdateOptions + { + Type = "id_number", + }; + var service = new Stripe.Identity.VerificationSessionService( + this.StripeClient); + Stripe.Identity.VerificationSession verificationSession = await service + .UpdateAsync("vs_xxxxxxxxxxxxx", options); + this.AssertRequest( + HttpMethod.Post, + "/v1/identity/verification_sessions/vs_xxxxxxxxxxxxx"); + } + [Fact] public void TestIdentityVerificationSessionsRedactPost() { @@ -1720,6 +4407,18 @@ public void TestIdentityVerificationSessionsRedactPost() "/v1/identity/verification_sessions/vs_xxxxxxxxxxxxx/redact"); } + [Fact] + public async Task TestIdentityVerificationSessionsRedactPostAsync() + { + var service = new Stripe.Identity.VerificationSessionService( + this.StripeClient); + Stripe.Identity.VerificationSession verificationSession = await service + .RedactAsync("vs_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/identity/verification_sessions/vs_xxxxxxxxxxxxx/redact"); + } + [Fact] public void TestInvoiceitemsDelete() { @@ -1730,6 +4429,16 @@ public void TestInvoiceitemsDelete() "/v1/invoiceitems/ii_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestInvoiceitemsDeleteAsync() + { + var service = new InvoiceItemService(this.StripeClient); + InvoiceItem deleted = await service.DeleteAsync("ii_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Delete, + "/v1/invoiceitems/ii_xxxxxxxxxxxxx"); + } + [Fact] public void TestInvoiceitemsGet() { @@ -1739,6 +4448,35 @@ public void TestInvoiceitemsGet() this.AssertRequest(HttpMethod.Get, "/v1/invoiceitems", "limit=3"); } + [Fact] + public async Task TestInvoiceitemsGetAsync() + { + var options = new InvoiceItemListOptions { Limit = 3 }; + var service = new InvoiceItemService(this.StripeClient); + StripeList invoiceItems = await service.ListAsync( + options); + this.AssertRequest(HttpMethod.Get, "/v1/invoiceitems", "limit=3"); + } + + [Fact] + public void TestInvoiceitemsGetAutoPaging() + { + var options = new InvoiceItemListOptions { Limit = 3 }; + var service = new InvoiceItemService(this.StripeClient); + var invoiceItem = service.ListAutoPaging(options).First(); + this.AssertRequest(HttpMethod.Get, "/v1/invoiceitems", "limit=3"); + } + + [Fact] + public async Task TestInvoiceitemsGetAutoPagingAsync() + { + var options = new InvoiceItemListOptions { Limit = 3 }; + var service = new InvoiceItemService(this.StripeClient); + var invoiceItem = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/invoiceitems", "limit=3"); + } + [Fact] public void TestInvoiceitemsGet2() { @@ -1749,6 +4487,17 @@ public void TestInvoiceitemsGet2() "/v1/invoiceitems/ii_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestInvoiceitemsGet2Async() + { + var service = new InvoiceItemService(this.StripeClient); + InvoiceItem invoiceItem = await service.GetAsync( + "ii_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/invoiceitems/ii_xxxxxxxxxxxxx"); + } + [Fact] public void TestInvoiceitemsPost() { @@ -1761,6 +4510,18 @@ public void TestInvoiceitemsPost() this.AssertRequest(HttpMethod.Post, "/v1/invoiceitems"); } + [Fact] + public async Task TestInvoiceitemsPostAsync() + { + var options = new InvoiceItemCreateOptions + { + Customer = "cus_xxxxxxxxxxxxx", + }; + var service = new InvoiceItemService(this.StripeClient); + InvoiceItem invoiceItem = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/invoiceitems"); + } + [Fact] public void TestInvoiceitemsPost2() { @@ -1781,14 +4542,43 @@ public void TestInvoiceitemsPost2() } [Fact] - public void TestInvoicesDelete() + public async Task TestInvoiceitemsPost2Async() { - var service = new InvoiceService(this.StripeClient); - Invoice deleted = service.Delete("in_xxxxxxxxxxxxx"); + var options = new InvoiceItemUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new InvoiceItemService(this.StripeClient); + InvoiceItem invoiceItem = await service.UpdateAsync( + "ii_xxxxxxxxxxxxx", + options); this.AssertRequest( - HttpMethod.Delete, - "/v1/invoices/in_xxxxxxxxxxxxx"); - } + HttpMethod.Post, + "/v1/invoiceitems/ii_xxxxxxxxxxxxx"); + } + + [Fact] + public void TestInvoicesDelete() + { + var service = new InvoiceService(this.StripeClient); + Invoice deleted = service.Delete("in_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Delete, + "/v1/invoices/in_xxxxxxxxxxxxx"); + } + + [Fact] + public async Task TestInvoicesDeleteAsync() + { + var service = new InvoiceService(this.StripeClient); + Invoice deleted = await service.DeleteAsync("in_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Delete, + "/v1/invoices/in_xxxxxxxxxxxxx"); + } [Fact] public void TestInvoicesFinalizePost() @@ -1800,6 +4590,17 @@ public void TestInvoicesFinalizePost() "/v1/invoices/in_xxxxxxxxxxxxx/finalize"); } + [Fact] + public async Task TestInvoicesFinalizePostAsync() + { + var service = new InvoiceService(this.StripeClient); + Invoice invoice = await service.FinalizeInvoiceAsync( + "in_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/invoices/in_xxxxxxxxxxxxx/finalize"); + } + [Fact] public void TestInvoicesGet() { @@ -1809,6 +4610,34 @@ public void TestInvoicesGet() this.AssertRequest(HttpMethod.Get, "/v1/invoices", "limit=3"); } + [Fact] + public async Task TestInvoicesGetAsync() + { + var options = new InvoiceListOptions { Limit = 3 }; + var service = new InvoiceService(this.StripeClient); + StripeList invoices = await service.ListAsync(options); + this.AssertRequest(HttpMethod.Get, "/v1/invoices", "limit=3"); + } + + [Fact] + public void TestInvoicesGetAutoPaging() + { + var options = new InvoiceListOptions { Limit = 3 }; + var service = new InvoiceService(this.StripeClient); + var invoice = service.ListAutoPaging(options).First(); + this.AssertRequest(HttpMethod.Get, "/v1/invoices", "limit=3"); + } + + [Fact] + public async Task TestInvoicesGetAutoPagingAsync() + { + var options = new InvoiceListOptions { Limit = 3 }; + var service = new InvoiceService(this.StripeClient); + var invoice = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/invoices", "limit=3"); + } + [Fact] public void TestInvoicesGet2() { @@ -1817,6 +4646,14 @@ public void TestInvoicesGet2() this.AssertRequest(HttpMethod.Get, "/v1/invoices/in_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestInvoicesGet2Async() + { + var service = new InvoiceService(this.StripeClient); + Invoice invoice = await service.GetAsync("in_xxxxxxxxxxxxx"); + this.AssertRequest(HttpMethod.Get, "/v1/invoices/in_xxxxxxxxxxxxx"); + } + [Fact] public void TestInvoicesGet3() { @@ -1832,6 +4669,23 @@ public void TestInvoicesGet3() "expand[]=customer"); } + [Fact] + public async Task TestInvoicesGet3Async() + { + var options = new InvoiceGetOptions + { + Expand = new List { "customer" }, + }; + var service = new InvoiceService(this.StripeClient); + Invoice invoice = await service.GetAsync( + "in_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Get, + "/v1/invoices/in_xxxxxxxxxxxxx", + "expand[]=customer"); + } + [Fact] public void TestInvoicesMarkUncollectiblePost() { @@ -1842,6 +4696,17 @@ public void TestInvoicesMarkUncollectiblePost() "/v1/invoices/in_xxxxxxxxxxxxx/mark_uncollectible"); } + [Fact] + public async Task TestInvoicesMarkUncollectiblePostAsync() + { + var service = new InvoiceService(this.StripeClient); + Invoice invoice = await service.MarkUncollectibleAsync( + "in_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/invoices/in_xxxxxxxxxxxxx/mark_uncollectible"); + } + [Fact] public void TestInvoicesPayPost() { @@ -1852,6 +4717,16 @@ public void TestInvoicesPayPost() "/v1/invoices/in_xxxxxxxxxxxxx/pay"); } + [Fact] + public async Task TestInvoicesPayPostAsync() + { + var service = new InvoiceService(this.StripeClient); + Invoice invoice = await service.PayAsync("in_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/invoices/in_xxxxxxxxxxxxx/pay"); + } + [Fact] public void TestInvoicesPost() { @@ -1864,6 +4739,18 @@ public void TestInvoicesPost() this.AssertRequest(HttpMethod.Post, "/v1/invoices"); } + [Fact] + public async Task TestInvoicesPostAsync() + { + var options = new InvoiceCreateOptions + { + Customer = "cus_xxxxxxxxxxxxx", + }; + var service = new InvoiceService(this.StripeClient); + Invoice invoice = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/invoices"); + } + [Fact] public void TestInvoicesPost2() { @@ -1881,6 +4768,25 @@ public void TestInvoicesPost2() "/v1/invoices/in_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestInvoicesPost2Async() + { + var options = new InvoiceUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new InvoiceService(this.StripeClient); + Invoice invoice = await service.UpdateAsync( + "in_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/invoices/in_xxxxxxxxxxxxx"); + } + [Fact] public void TestInvoicesSearchGet() { @@ -1896,6 +4802,53 @@ public void TestInvoicesSearchGet() "query=total%3E999%20AND%20metadata%5B%27order_id%27%5D%3A%276735%27"); } + [Fact] + public async Task TestInvoicesSearchGetAsync() + { + var options = new InvoiceSearchOptions + { + Query = "total>999 AND metadata['order_id']:'6735'", + }; + var service = new InvoiceService(this.StripeClient); + StripeSearchResult invoices = await service.SearchAsync( + options); + this.AssertRequest( + HttpMethod.Get, + "/v1/invoices/search", + "query=total%3E999%20AND%20metadata%5B%27order_id%27%5D%3A%276735%27"); + } + + [Fact] + public void TestInvoicesSearchGetAutoPaging() + { + var options = new InvoiceSearchOptions + { + Query = "total>999 AND metadata['order_id']:'6735'", + }; + var service = new InvoiceService(this.StripeClient); + var invoice = service.SearchAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/invoices/search", + "query=total%3E999%20AND%20metadata%5B%27order_id%27%5D%3A%276735%27"); + } + + [Fact] + public async Task TestInvoicesSearchGetAutoPagingAsync() + { + var options = new InvoiceSearchOptions + { + Query = "total>999 AND metadata['order_id']:'6735'", + }; + var service = new InvoiceService(this.StripeClient); + var invoice = await service.SearchAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/invoices/search", + "query=total%3E999%20AND%20metadata%5B%27order_id%27%5D%3A%276735%27"); + } + [Fact] public void TestInvoicesSendPost() { @@ -1906,6 +4859,17 @@ public void TestInvoicesSendPost() "/v1/invoices/in_xxxxxxxxxxxxx/send"); } + [Fact] + public async Task TestInvoicesSendPostAsync() + { + var service = new InvoiceService(this.StripeClient); + Invoice invoice = await service.SendInvoiceAsync( + "in_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/invoices/in_xxxxxxxxxxxxx/send"); + } + [Fact] public void TestInvoicesVoidPost() { @@ -1916,6 +4880,17 @@ public void TestInvoicesVoidPost() "/v1/invoices/in_xxxxxxxxxxxxx/void"); } + [Fact] + public async Task TestInvoicesVoidPostAsync() + { + var service = new InvoiceService(this.StripeClient); + Invoice invoice = await service.VoidInvoiceAsync( + "in_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/invoices/in_xxxxxxxxxxxxx/void"); + } + [Fact] public void TestIssuingAuthorizationsApprovePost() { @@ -1928,6 +4903,18 @@ public void TestIssuingAuthorizationsApprovePost() "/v1/issuing/authorizations/iauth_xxxxxxxxxxxxx/approve"); } + [Fact] + public async Task TestIssuingAuthorizationsApprovePostAsync() + { + var service = new Stripe.Issuing.AuthorizationService( + this.StripeClient); + Stripe.Issuing.Authorization authorization = await service + .ApproveAsync("iauth_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/issuing/authorizations/iauth_xxxxxxxxxxxxx/approve"); + } + [Fact] public void TestIssuingAuthorizationsDeclinePost() { @@ -1940,6 +4927,18 @@ public void TestIssuingAuthorizationsDeclinePost() "/v1/issuing/authorizations/iauth_xxxxxxxxxxxxx/decline"); } + [Fact] + public async Task TestIssuingAuthorizationsDeclinePostAsync() + { + var service = new Stripe.Issuing.AuthorizationService( + this.StripeClient); + Stripe.Issuing.Authorization authorization = await service + .DeclineAsync("iauth_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/issuing/authorizations/iauth_xxxxxxxxxxxxx/decline"); + } + [Fact] public void TestIssuingAuthorizationsGet() { @@ -1957,6 +4956,56 @@ public void TestIssuingAuthorizationsGet() "limit=3"); } + [Fact] + public async Task TestIssuingAuthorizationsGetAsync() + { + var options = new Stripe.Issuing.AuthorizationListOptions + { + Limit = 3, + }; + var service = new Stripe.Issuing.AuthorizationService( + this.StripeClient); + StripeList authorizations = await service + .ListAsync(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/issuing/authorizations", + "limit=3"); + } + + [Fact] + public void TestIssuingAuthorizationsGetAutoPaging() + { + var options = new Stripe.Issuing.AuthorizationListOptions + { + Limit = 3, + }; + var service = new Stripe.Issuing.AuthorizationService( + this.StripeClient); + var authorization = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/issuing/authorizations", + "limit=3"); + } + + [Fact] + public async Task TestIssuingAuthorizationsGetAutoPagingAsync() + { + var options = new Stripe.Issuing.AuthorizationListOptions + { + Limit = 3, + }; + var service = new Stripe.Issuing.AuthorizationService( + this.StripeClient); + var authorization = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/issuing/authorizations", + "limit=3"); + } + [Fact] public void TestIssuingAuthorizationsGet2() { @@ -1969,6 +5018,18 @@ public void TestIssuingAuthorizationsGet2() "/v1/issuing/authorizations/iauth_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestIssuingAuthorizationsGet2Async() + { + var service = new Stripe.Issuing.AuthorizationService( + this.StripeClient); + Stripe.Issuing.Authorization authorization = await service.GetAsync( + "iauth_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/issuing/authorizations/iauth_xxxxxxxxxxxxx"); + } + [Fact] public void TestIssuingAuthorizationsPost() { @@ -1989,6 +5050,25 @@ public void TestIssuingAuthorizationsPost() "/v1/issuing/authorizations/iauth_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestIssuingAuthorizationsPostAsync() + { + var options = new Stripe.Issuing.AuthorizationUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new Stripe.Issuing.AuthorizationService( + this.StripeClient); + Stripe.Issuing.Authorization authorization = await service + .UpdateAsync("iauth_xxxxxxxxxxxxx", options); + this.AssertRequest( + HttpMethod.Post, + "/v1/issuing/authorizations/iauth_xxxxxxxxxxxxx"); + } + [Fact] public void TestIssuingCardholdersGet() { @@ -2007,9 +5087,59 @@ public void TestIssuingCardholdersGet() } [Fact] - public void TestIssuingCardholdersGet2() + public async Task TestIssuingCardholdersGetAsync() { - var service = new Stripe.Issuing.CardholderService( + var options = new Stripe.Issuing.CardholderListOptions + { + Limit = 3, + }; + var service = new Stripe.Issuing.CardholderService( + this.StripeClient); + StripeList cardholders = await service + .ListAsync(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/issuing/cardholders", + "limit=3"); + } + + [Fact] + public void TestIssuingCardholdersGetAutoPaging() + { + var options = new Stripe.Issuing.CardholderListOptions + { + Limit = 3, + }; + var service = new Stripe.Issuing.CardholderService( + this.StripeClient); + var cardholder = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/issuing/cardholders", + "limit=3"); + } + + [Fact] + public async Task TestIssuingCardholdersGetAutoPagingAsync() + { + var options = new Stripe.Issuing.CardholderListOptions + { + Limit = 3, + }; + var service = new Stripe.Issuing.CardholderService( + this.StripeClient); + var cardholder = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/issuing/cardholders", + "limit=3"); + } + + [Fact] + public void TestIssuingCardholdersGet2() + { + var service = new Stripe.Issuing.CardholderService( this.StripeClient); Stripe.Issuing.Cardholder cardholder = service.Get( "ich_xxxxxxxxxxxxx"); @@ -2018,6 +5148,18 @@ public void TestIssuingCardholdersGet2() "/v1/issuing/cardholders/ich_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestIssuingCardholdersGet2Async() + { + var service = new Stripe.Issuing.CardholderService( + this.StripeClient); + Stripe.Issuing.Cardholder cardholder = await service.GetAsync( + "ich_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/issuing/cardholders/ich_xxxxxxxxxxxxx"); + } + [Fact] public void TestIssuingCardholdersPost() { @@ -2045,6 +5187,34 @@ public void TestIssuingCardholdersPost() this.AssertRequest(HttpMethod.Post, "/v1/issuing/cardholders"); } + [Fact] + public async Task TestIssuingCardholdersPostAsync() + { + var options = new Stripe.Issuing.CardholderCreateOptions + { + Type = "individual", + Name = "Jenny Rosen", + Email = "jenny.rosen@example.com", + PhoneNumber = "+18888675309", + Billing = new Stripe.Issuing.CardholderBillingOptions + { + Address = new AddressOptions + { + Line1 = "1234 Main Street", + City = "San Francisco", + State = "CA", + Country = "US", + PostalCode = "94111", + }, + }, + }; + var service = new Stripe.Issuing.CardholderService( + this.StripeClient); + Stripe.Issuing.Cardholder cardholder = await service.CreateAsync( + options); + this.AssertRequest(HttpMethod.Post, "/v1/issuing/cardholders"); + } + [Fact] public void TestIssuingCardholdersPost2() { @@ -2065,6 +5235,26 @@ public void TestIssuingCardholdersPost2() "/v1/issuing/cardholders/ich_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestIssuingCardholdersPost2Async() + { + var options = new Stripe.Issuing.CardholderUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new Stripe.Issuing.CardholderService( + this.StripeClient); + Stripe.Issuing.Cardholder cardholder = await service.UpdateAsync( + "ich_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/issuing/cardholders/ich_xxxxxxxxxxxxx"); + } + [Fact] public void TestIssuingCardsGet() { @@ -2074,6 +5264,34 @@ public void TestIssuingCardsGet() this.AssertRequest(HttpMethod.Get, "/v1/issuing/cards", "limit=3"); } + [Fact] + public async Task TestIssuingCardsGetAsync() + { + var options = new Stripe.Issuing.CardListOptions { Limit = 3 }; + var service = new Stripe.Issuing.CardService(this.StripeClient); + StripeList cards = await service.ListAsync( + options); + this.AssertRequest(HttpMethod.Get, "/v1/issuing/cards", "limit=3"); + } + + [Fact] + public void TestIssuingCardsGetAutoPaging() + { + var options = new Stripe.Issuing.CardListOptions { Limit = 3 }; + var service = new Stripe.Issuing.CardService(this.StripeClient); + var card = service.ListAutoPaging(options).First(); + this.AssertRequest(HttpMethod.Get, "/v1/issuing/cards", "limit=3"); + } + + [Fact] + public async Task TestIssuingCardsGetAutoPagingAsync() + { + var options = new Stripe.Issuing.CardListOptions { Limit = 3 }; + var service = new Stripe.Issuing.CardService(this.StripeClient); + var card = await service.ListAutoPagingAsync(options).FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/issuing/cards", "limit=3"); + } + [Fact] public void TestIssuingCardsGet2() { @@ -2084,6 +5302,17 @@ public void TestIssuingCardsGet2() "/v1/issuing/cards/ic_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestIssuingCardsGet2Async() + { + var service = new Stripe.Issuing.CardService(this.StripeClient); + Stripe.Issuing.Card card = await service.GetAsync( + "ic_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/issuing/cards/ic_xxxxxxxxxxxxx"); + } + [Fact] public void TestIssuingCardsPost() { @@ -2098,6 +5327,20 @@ public void TestIssuingCardsPost() this.AssertRequest(HttpMethod.Post, "/v1/issuing/cards"); } + [Fact] + public async Task TestIssuingCardsPostAsync() + { + var options = new Stripe.Issuing.CardCreateOptions + { + Cardholder = "ich_xxxxxxxxxxxxx", + Currency = "usd", + Type = "virtual", + }; + var service = new Stripe.Issuing.CardService(this.StripeClient); + Stripe.Issuing.Card card = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/issuing/cards"); + } + [Fact] public void TestIssuingCardsPost2() { @@ -2117,6 +5360,25 @@ public void TestIssuingCardsPost2() "/v1/issuing/cards/ic_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestIssuingCardsPost2Async() + { + var options = new Stripe.Issuing.CardUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new Stripe.Issuing.CardService(this.StripeClient); + Stripe.Issuing.Card card = await service.UpdateAsync( + "ic_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/issuing/cards/ic_xxxxxxxxxxxxx"); + } + [Fact] public void TestIssuingDisputesGet() { @@ -2129,6 +5391,44 @@ public void TestIssuingDisputesGet() "limit=3"); } + [Fact] + public async Task TestIssuingDisputesGetAsync() + { + var options = new Stripe.Issuing.DisputeListOptions { Limit = 3 }; + var service = new Stripe.Issuing.DisputeService(this.StripeClient); + StripeList disputes = await service + .ListAsync(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/issuing/disputes", + "limit=3"); + } + + [Fact] + public void TestIssuingDisputesGetAutoPaging() + { + var options = new Stripe.Issuing.DisputeListOptions { Limit = 3 }; + var service = new Stripe.Issuing.DisputeService(this.StripeClient); + var dispute = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/issuing/disputes", + "limit=3"); + } + + [Fact] + public async Task TestIssuingDisputesGetAutoPagingAsync() + { + var options = new Stripe.Issuing.DisputeListOptions { Limit = 3 }; + var service = new Stripe.Issuing.DisputeService(this.StripeClient); + var dispute = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/issuing/disputes", + "limit=3"); + } + [Fact] public void TestIssuingDisputesGet2() { @@ -2139,6 +5439,17 @@ public void TestIssuingDisputesGet2() "/v1/issuing/disputes/idp_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestIssuingDisputesGet2Async() + { + var service = new Stripe.Issuing.DisputeService(this.StripeClient); + Stripe.Issuing.Dispute dispute = await service.GetAsync( + "idp_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/issuing/disputes/idp_xxxxxxxxxxxxx"); + } + [Fact] public void TestIssuingDisputesPost() { @@ -2159,6 +5470,26 @@ public void TestIssuingDisputesPost() this.AssertRequest(HttpMethod.Post, "/v1/issuing/disputes"); } + [Fact] + public async Task TestIssuingDisputesPostAsync() + { + var options = new Stripe.Issuing.DisputeCreateOptions + { + Transaction = "ipi_xxxxxxxxxxxxx", + Evidence = new Stripe.Issuing.DisputeEvidenceOptions + { + Reason = "fraudulent", + Fraudulent = new Stripe.Issuing.DisputeEvidenceFraudulentOptions + { + Explanation = "Purchase was unrecognized.", + }, + }, + }; + var service = new Stripe.Issuing.DisputeService(this.StripeClient); + Stripe.Issuing.Dispute dispute = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/issuing/disputes"); + } + [Fact] public void TestIssuingDisputesSubmitPost() { @@ -2170,6 +5501,17 @@ public void TestIssuingDisputesSubmitPost() "/v1/issuing/disputes/idp_xxxxxxxxxxxxx/submit"); } + [Fact] + public async Task TestIssuingDisputesSubmitPostAsync() + { + var service = new Stripe.Issuing.DisputeService(this.StripeClient); + Stripe.Issuing.Dispute dispute = await service.SubmitAsync( + "idp_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/issuing/disputes/idp_xxxxxxxxxxxxx/submit"); + } + [Fact] public void TestIssuingPersonalizationDesignsGet() { @@ -2183,56 +5525,161 @@ public void TestIssuingPersonalizationDesignsGet() } [Fact] - public void TestIssuingPersonalizationDesignsGet2() + public async Task TestIssuingPersonalizationDesignsGetAsync() { var service = new Stripe.Issuing.PersonalizationDesignService( this.StripeClient); - Stripe.Issuing.PersonalizationDesign personalizationDesign = service - .Get("pd_xyz"); + StripeList personalizationDesigns = await service + .ListAsync(); this.AssertRequest( HttpMethod.Get, - "/v1/issuing/personalization_designs/pd_xyz"); + "/v1/issuing/personalization_designs"); } [Fact] - public void TestIssuingPersonalizationDesignsPost() + public void TestIssuingPersonalizationDesignsGetAutoPaging() { - var options = new Stripe.Issuing.PersonalizationDesignCreateOptions - { - PhysicalBundle = "pb_xyz", - }; var service = new Stripe.Issuing.PersonalizationDesignService( this.StripeClient); - Stripe.Issuing.PersonalizationDesign personalizationDesign = service - .Create(options); + var personalizationDesign = service.ListAutoPaging().First(); this.AssertRequest( - HttpMethod.Post, + HttpMethod.Get, "/v1/issuing/personalization_designs"); } [Fact] - public void TestIssuingPersonalizationDesignsPost2() + public async Task TestIssuingPersonalizationDesignsGetAutoPagingAsync() + { + var service = new Stripe.Issuing.PersonalizationDesignService( + this.StripeClient); + var personalizationDesign = await service.ListAutoPagingAsync() + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/issuing/personalization_designs"); + } + + [Fact] + public void TestIssuingPersonalizationDesignsGet2() { - var options = new Stripe.Issuing.PersonalizationDesignUpdateOptions(); var service = new Stripe.Issuing.PersonalizationDesignService( this.StripeClient); Stripe.Issuing.PersonalizationDesign personalizationDesign = service - .Update("pd_xyz", options); + .Get("pd_xyz"); this.AssertRequest( - HttpMethod.Post, + HttpMethod.Get, "/v1/issuing/personalization_designs/pd_xyz"); } [Fact] - public void TestIssuingPhysicalBundlesGet() + public async Task TestIssuingPersonalizationDesignsGet2Async() { - var service = new Stripe.Issuing.PhysicalBundleService( + var service = new Stripe.Issuing.PersonalizationDesignService( + this.StripeClient); + Stripe.Issuing.PersonalizationDesign personalizationDesign = await service + .GetAsync("pd_xyz"); + this.AssertRequest( + HttpMethod.Get, + "/v1/issuing/personalization_designs/pd_xyz"); + } + + [Fact] + public void TestIssuingPersonalizationDesignsPost() + { + var options = new Stripe.Issuing.PersonalizationDesignCreateOptions + { + PhysicalBundle = "pb_xyz", + }; + var service = new Stripe.Issuing.PersonalizationDesignService( + this.StripeClient); + Stripe.Issuing.PersonalizationDesign personalizationDesign = service + .Create(options); + this.AssertRequest( + HttpMethod.Post, + "/v1/issuing/personalization_designs"); + } + + [Fact] + public async Task TestIssuingPersonalizationDesignsPostAsync() + { + var options = new Stripe.Issuing.PersonalizationDesignCreateOptions + { + PhysicalBundle = "pb_xyz", + }; + var service = new Stripe.Issuing.PersonalizationDesignService( + this.StripeClient); + Stripe.Issuing.PersonalizationDesign personalizationDesign = await service + .CreateAsync(options); + this.AssertRequest( + HttpMethod.Post, + "/v1/issuing/personalization_designs"); + } + + [Fact] + public void TestIssuingPersonalizationDesignsPost2() + { + var options = new Stripe.Issuing.PersonalizationDesignUpdateOptions(); + var service = new Stripe.Issuing.PersonalizationDesignService( + this.StripeClient); + Stripe.Issuing.PersonalizationDesign personalizationDesign = service + .Update("pd_xyz", options); + this.AssertRequest( + HttpMethod.Post, + "/v1/issuing/personalization_designs/pd_xyz"); + } + + [Fact] + public async Task TestIssuingPersonalizationDesignsPost2Async() + { + var options = new Stripe.Issuing.PersonalizationDesignUpdateOptions(); + var service = new Stripe.Issuing.PersonalizationDesignService( + this.StripeClient); + Stripe.Issuing.PersonalizationDesign personalizationDesign = await service + .UpdateAsync("pd_xyz", options); + this.AssertRequest( + HttpMethod.Post, + "/v1/issuing/personalization_designs/pd_xyz"); + } + + [Fact] + public void TestIssuingPhysicalBundlesGet() + { + var service = new Stripe.Issuing.PhysicalBundleService( this.StripeClient); StripeList physicalBundles = service .List(); this.AssertRequest(HttpMethod.Get, "/v1/issuing/physical_bundles"); } + [Fact] + public async Task TestIssuingPhysicalBundlesGetAsync() + { + var service = new Stripe.Issuing.PhysicalBundleService( + this.StripeClient); + StripeList physicalBundles = await service + .ListAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/issuing/physical_bundles"); + } + + [Fact] + public void TestIssuingPhysicalBundlesGetAutoPaging() + { + var service = new Stripe.Issuing.PhysicalBundleService( + this.StripeClient); + var physicalBundle = service.ListAutoPaging().First(); + this.AssertRequest(HttpMethod.Get, "/v1/issuing/physical_bundles"); + } + + [Fact] + public async Task TestIssuingPhysicalBundlesGetAutoPagingAsync() + { + var service = new Stripe.Issuing.PhysicalBundleService( + this.StripeClient); + var physicalBundle = await service.ListAutoPagingAsync() + .FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/issuing/physical_bundles"); + } + [Fact] public void TestIssuingPhysicalBundlesGet2() { @@ -2245,6 +5692,18 @@ public void TestIssuingPhysicalBundlesGet2() "/v1/issuing/physical_bundles/pb_xyz"); } + [Fact] + public async Task TestIssuingPhysicalBundlesGet2Async() + { + var service = new Stripe.Issuing.PhysicalBundleService( + this.StripeClient); + Stripe.Issuing.PhysicalBundle physicalBundle = await service + .GetAsync("pb_xyz"); + this.AssertRequest( + HttpMethod.Get, + "/v1/issuing/physical_bundles/pb_xyz"); + } + [Fact] public void TestIssuingTransactionsGet() { @@ -2262,6 +5721,56 @@ public void TestIssuingTransactionsGet() "limit=3"); } + [Fact] + public async Task TestIssuingTransactionsGetAsync() + { + var options = new Stripe.Issuing.TransactionListOptions + { + Limit = 3, + }; + var service = new Stripe.Issuing.TransactionService( + this.StripeClient); + StripeList transactions = await service + .ListAsync(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/issuing/transactions", + "limit=3"); + } + + [Fact] + public void TestIssuingTransactionsGetAutoPaging() + { + var options = new Stripe.Issuing.TransactionListOptions + { + Limit = 3, + }; + var service = new Stripe.Issuing.TransactionService( + this.StripeClient); + var transaction = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/issuing/transactions", + "limit=3"); + } + + [Fact] + public async Task TestIssuingTransactionsGetAutoPagingAsync() + { + var options = new Stripe.Issuing.TransactionListOptions + { + Limit = 3, + }; + var service = new Stripe.Issuing.TransactionService( + this.StripeClient); + var transaction = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/issuing/transactions", + "limit=3"); + } + [Fact] public void TestIssuingTransactionsGet2() { @@ -2274,6 +5783,18 @@ public void TestIssuingTransactionsGet2() "/v1/issuing/transactions/ipi_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestIssuingTransactionsGet2Async() + { + var service = new Stripe.Issuing.TransactionService( + this.StripeClient); + Stripe.Issuing.Transaction transaction = await service.GetAsync( + "ipi_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/issuing/transactions/ipi_xxxxxxxxxxxxx"); + } + [Fact] public void TestIssuingTransactionsPost() { @@ -2294,6 +5815,26 @@ public void TestIssuingTransactionsPost() "/v1/issuing/transactions/ipi_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestIssuingTransactionsPostAsync() + { + var options = new Stripe.Issuing.TransactionUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new Stripe.Issuing.TransactionService( + this.StripeClient); + Stripe.Issuing.Transaction transaction = await service.UpdateAsync( + "ipi_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/issuing/transactions/ipi_xxxxxxxxxxxxx"); + } + [Fact] public void TestMandatesGet() { @@ -2304,6 +5845,16 @@ public void TestMandatesGet() "/v1/mandates/mandate_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestMandatesGetAsync() + { + var service = new MandateService(this.StripeClient); + Mandate mandate = await service.GetAsync("mandate_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/mandates/mandate_xxxxxxxxxxxxx"); + } + [Fact] public void TestPaymentIntentsApplyCustomerBalancePost() { @@ -2315,6 +5866,17 @@ public void TestPaymentIntentsApplyCustomerBalancePost() "/v1/payment_intents/pi_xxxxxxxxxxxxx/apply_customer_balance"); } + [Fact] + public async Task TestPaymentIntentsApplyCustomerBalancePostAsync() + { + var service = new PaymentIntentService(this.StripeClient); + PaymentIntent paymentIntent = await service + .ApplyCustomerBalanceAsync("pi_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/payment_intents/pi_xxxxxxxxxxxxx/apply_customer_balance"); + } + [Fact] public void TestPaymentIntentsCancelPost() { @@ -2325,6 +5887,17 @@ public void TestPaymentIntentsCancelPost() "/v1/payment_intents/pi_xxxxxxxxxxxxx/cancel"); } + [Fact] + public async Task TestPaymentIntentsCancelPostAsync() + { + var service = new PaymentIntentService(this.StripeClient); + PaymentIntent paymentIntent = await service.CancelAsync( + "pi_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/payment_intents/pi_xxxxxxxxxxxxx/cancel"); + } + [Fact] public void TestPaymentIntentsCapturePost() { @@ -2335,6 +5908,17 @@ public void TestPaymentIntentsCapturePost() "/v1/payment_intents/pi_xxxxxxxxxxxxx/capture"); } + [Fact] + public async Task TestPaymentIntentsCapturePostAsync() + { + var service = new PaymentIntentService(this.StripeClient); + PaymentIntent paymentIntent = await service.CaptureAsync( + "pi_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/payment_intents/pi_xxxxxxxxxxxxx/capture"); + } + [Fact] public void TestPaymentIntentsConfirmPost() { @@ -2351,6 +5935,22 @@ public void TestPaymentIntentsConfirmPost() "/v1/payment_intents/pi_xxxxxxxxxxxxx/confirm"); } + [Fact] + public async Task TestPaymentIntentsConfirmPostAsync() + { + var options = new PaymentIntentConfirmOptions + { + PaymentMethod = "pm_card_visa", + }; + var service = new PaymentIntentService(this.StripeClient); + PaymentIntent paymentIntent = await service.ConfirmAsync( + "pi_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/payment_intents/pi_xxxxxxxxxxxxx/confirm"); + } + [Fact] public void TestPaymentIntentsGet() { @@ -2363,6 +5963,44 @@ public void TestPaymentIntentsGet() "limit=3"); } + [Fact] + public async Task TestPaymentIntentsGetAsync() + { + var options = new PaymentIntentListOptions { Limit = 3 }; + var service = new PaymentIntentService(this.StripeClient); + StripeList paymentIntents = await service.ListAsync( + options); + this.AssertRequest( + HttpMethod.Get, + "/v1/payment_intents", + "limit=3"); + } + + [Fact] + public void TestPaymentIntentsGetAutoPaging() + { + var options = new PaymentIntentListOptions { Limit = 3 }; + var service = new PaymentIntentService(this.StripeClient); + var paymentIntent = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/payment_intents", + "limit=3"); + } + + [Fact] + public async Task TestPaymentIntentsGetAutoPagingAsync() + { + var options = new PaymentIntentListOptions { Limit = 3 }; + var service = new PaymentIntentService(this.StripeClient); + var paymentIntent = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/payment_intents", + "limit=3"); + } + [Fact] public void TestPaymentIntentsGet2() { @@ -2373,6 +6011,17 @@ public void TestPaymentIntentsGet2() "/v1/payment_intents/pi_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestPaymentIntentsGet2Async() + { + var service = new PaymentIntentService(this.StripeClient); + PaymentIntent paymentIntent = await service.GetAsync( + "pi_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/payment_intents/pi_xxxxxxxxxxxxx"); + } + [Fact] public void TestPaymentIntentsIncrementAuthorizationPost() { @@ -2390,13 +6039,28 @@ public void TestPaymentIntentsIncrementAuthorizationPost() } [Fact] - public void TestPaymentIntentsPost() + public async Task TestPaymentIntentsIncrementAuthorizationPostAsync() { - var options = new PaymentIntentCreateOptions + var options = new PaymentIntentIncrementAuthorizationOptions { - Amount = 1099, - Currency = "eur", - AutomaticPaymentMethods = new PaymentIntentAutomaticPaymentMethodsOptions + Amount = 2099, + }; + var service = new PaymentIntentService(this.StripeClient); + PaymentIntent paymentIntent = await service + .IncrementAuthorizationAsync("pi_xxxxxxxxxxxxx", options); + this.AssertRequest( + HttpMethod.Post, + "/v1/payment_intents/pi_xxxxxxxxxxxxx/increment_authorization"); + } + + [Fact] + public void TestPaymentIntentsPost() + { + var options = new PaymentIntentCreateOptions + { + Amount = 1099, + Currency = "eur", + AutomaticPaymentMethods = new PaymentIntentAutomaticPaymentMethodsOptions { Enabled = true, }, @@ -2406,6 +6070,23 @@ public void TestPaymentIntentsPost() this.AssertRequest(HttpMethod.Post, "/v1/payment_intents"); } + [Fact] + public async Task TestPaymentIntentsPostAsync() + { + var options = new PaymentIntentCreateOptions + { + Amount = 1099, + Currency = "eur", + AutomaticPaymentMethods = new PaymentIntentAutomaticPaymentMethodsOptions + { + Enabled = true, + }, + }; + var service = new PaymentIntentService(this.StripeClient); + PaymentIntent paymentIntent = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/payment_intents"); + } + [Fact] public void TestPaymentIntentsPost2() { @@ -2423,6 +6104,23 @@ public void TestPaymentIntentsPost2() this.AssertRequest(HttpMethod.Post, "/v1/payment_intents"); } + [Fact] + public async Task TestPaymentIntentsPost2Async() + { + var options = new PaymentIntentCreateOptions + { + Amount = 2000, + Currency = "usd", + AutomaticPaymentMethods = new PaymentIntentAutomaticPaymentMethodsOptions + { + Enabled = true, + }, + }; + var service = new PaymentIntentService(this.StripeClient); + PaymentIntent paymentIntent = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/payment_intents"); + } + [Fact] public void TestPaymentIntentsPost3() { @@ -2442,6 +6140,25 @@ public void TestPaymentIntentsPost3() "/v1/payment_intents/pi_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestPaymentIntentsPost3Async() + { + var options = new PaymentIntentUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new PaymentIntentService(this.StripeClient); + PaymentIntent paymentIntent = await service.UpdateAsync( + "pi_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/payment_intents/pi_xxxxxxxxxxxxx"); + } + [Fact] public void TestPaymentIntentsPost4() { @@ -2463,6 +6180,27 @@ public void TestPaymentIntentsPost4() this.AssertRequest(HttpMethod.Post, "/v1/payment_intents"); } + [Fact] + public async Task TestPaymentIntentsPost4Async() + { + var options = new PaymentIntentCreateOptions + { + Amount = 200, + Currency = "usd", + PaymentMethodData = new PaymentIntentPaymentMethodDataOptions + { + Type = "p24", + P24 = new PaymentIntentPaymentMethodDataP24Options + { + Bank = "blik", + }, + }, + }; + var service = new PaymentIntentService(this.StripeClient); + PaymentIntent paymentIntent = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/payment_intents"); + } + [Fact] public void TestPaymentIntentsSearchGet() { @@ -2479,6 +6217,53 @@ public void TestPaymentIntentsSearchGet() "query=status%3A%27succeeded%27%20AND%20metadata%5B%27order_id%27%5D%3A%276735%27"); } + [Fact] + public async Task TestPaymentIntentsSearchGetAsync() + { + var options = new PaymentIntentSearchOptions + { + Query = "status:'succeeded' AND metadata['order_id']:'6735'", + }; + var service = new PaymentIntentService(this.StripeClient); + StripeSearchResult paymentIntents = await service + .SearchAsync(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/payment_intents/search", + "query=status%3A%27succeeded%27%20AND%20metadata%5B%27order_id%27%5D%3A%276735%27"); + } + + [Fact] + public void TestPaymentIntentsSearchGetAutoPaging() + { + var options = new PaymentIntentSearchOptions + { + Query = "status:'succeeded' AND metadata['order_id']:'6735'", + }; + var service = new PaymentIntentService(this.StripeClient); + var paymentIntent = service.SearchAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/payment_intents/search", + "query=status%3A%27succeeded%27%20AND%20metadata%5B%27order_id%27%5D%3A%276735%27"); + } + + [Fact] + public async Task TestPaymentIntentsSearchGetAutoPagingAsync() + { + var options = new PaymentIntentSearchOptions + { + Query = "status:'succeeded' AND metadata['order_id']:'6735'", + }; + var service = new PaymentIntentService(this.StripeClient); + var paymentIntent = await service.SearchAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/payment_intents/search", + "query=status%3A%27succeeded%27%20AND%20metadata%5B%27order_id%27%5D%3A%276735%27"); + } + [Fact] public void TestPaymentIntentsVerifyMicrodepositsPost() { @@ -2490,6 +6275,17 @@ public void TestPaymentIntentsVerifyMicrodepositsPost() "/v1/payment_intents/pi_xxxxxxxxxxxxx/verify_microdeposits"); } + [Fact] + public async Task TestPaymentIntentsVerifyMicrodepositsPostAsync() + { + var service = new PaymentIntentService(this.StripeClient); + PaymentIntent paymentIntent = await service + .VerifyMicrodepositsAsync("pi_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/payment_intents/pi_xxxxxxxxxxxxx/verify_microdeposits"); + } + [Fact] public void TestPaymentIntentsVerifyMicrodepositsPost2() { @@ -2506,6 +6302,21 @@ public void TestPaymentIntentsVerifyMicrodepositsPost2() "/v1/payment_intents/pi_xxxxxxxxxxxxx/verify_microdeposits"); } + [Fact] + public async Task TestPaymentIntentsVerifyMicrodepositsPost2Async() + { + var options = new PaymentIntentVerifyMicrodepositsOptions + { + Amounts = new List { 32, 45 }, + }; + var service = new PaymentIntentService(this.StripeClient); + PaymentIntent paymentIntent = await service + .VerifyMicrodepositsAsync("pi_xxxxxxxxxxxxx", options); + this.AssertRequest( + HttpMethod.Post, + "/v1/payment_intents/pi_xxxxxxxxxxxxx/verify_microdeposits"); + } + [Fact] public void TestPaymentLinksGet() { @@ -2514,6 +6325,14 @@ public void TestPaymentLinksGet() this.AssertRequest(HttpMethod.Get, "/v1/payment_links/pl_xyz"); } + [Fact] + public async Task TestPaymentLinksGetAsync() + { + var service = new PaymentLinkService(this.StripeClient); + PaymentLink paymentLink = await service.GetAsync("pl_xyz"); + this.AssertRequest(HttpMethod.Get, "/v1/payment_links/pl_xyz"); + } + [Fact] public void TestPaymentLinksGet2() { @@ -2523,6 +6342,35 @@ public void TestPaymentLinksGet2() this.AssertRequest(HttpMethod.Get, "/v1/payment_links", "limit=3"); } + [Fact] + public async Task TestPaymentLinksGet2Async() + { + var options = new PaymentLinkListOptions { Limit = 3 }; + var service = new PaymentLinkService(this.StripeClient); + StripeList paymentLinks = await service.ListAsync( + options); + this.AssertRequest(HttpMethod.Get, "/v1/payment_links", "limit=3"); + } + + [Fact] + public void TestPaymentLinksGet2AutoPaging() + { + var options = new PaymentLinkListOptions { Limit = 3 }; + var service = new PaymentLinkService(this.StripeClient); + var paymentLink = service.ListAutoPaging(options).First(); + this.AssertRequest(HttpMethod.Get, "/v1/payment_links", "limit=3"); + } + + [Fact] + public async Task TestPaymentLinksGet2AutoPagingAsync() + { + var options = new PaymentLinkListOptions { Limit = 3 }; + var service = new PaymentLinkService(this.StripeClient); + var paymentLink = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/payment_links", "limit=3"); + } + [Fact] public void TestPaymentLinksGet3() { @@ -2533,6 +6381,17 @@ public void TestPaymentLinksGet3() "/v1/payment_links/plink_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestPaymentLinksGet3Async() + { + var service = new PaymentLinkService(this.StripeClient); + PaymentLink paymentLink = await service.GetAsync( + "plink_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/payment_links/plink_xxxxxxxxxxxxx"); + } + [Fact] public void TestPaymentLinksLineItemsGet() { @@ -2543,6 +6402,37 @@ public void TestPaymentLinksLineItemsGet() "/v1/payment_links/pl_xyz/line_items"); } + [Fact] + public async Task TestPaymentLinksLineItemsGetAsync() + { + var service = new PaymentLinkLineItemService(this.StripeClient); + StripeList lineItems = await service.ListAsync("pl_xyz"); + this.AssertRequest( + HttpMethod.Get, + "/v1/payment_links/pl_xyz/line_items"); + } + + [Fact] + public void TestPaymentLinksLineItemsGetAutoPaging() + { + var service = new PaymentLinkLineItemService(this.StripeClient); + var lineItem = service.ListAutoPaging("pl_xyz").First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/payment_links/pl_xyz/line_items"); + } + + [Fact] + public async Task TestPaymentLinksLineItemsGetAutoPagingAsync() + { + var service = new PaymentLinkLineItemService(this.StripeClient); + var lineItem = await service.ListAutoPagingAsync("pl_xyz") + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/payment_links/pl_xyz/line_items"); + } + [Fact] public void TestPaymentLinksPost() { @@ -2562,6 +6452,25 @@ public void TestPaymentLinksPost() this.AssertRequest(HttpMethod.Post, "/v1/payment_links"); } + [Fact] + public async Task TestPaymentLinksPostAsync() + { + var options = new PaymentLinkCreateOptions + { + LineItems = new List + { + new PaymentLinkLineItemOptions + { + Price = "price_xxxxxxxxxxxxx", + Quantity = 1, + }, + }, + }; + var service = new PaymentLinkService(this.StripeClient); + PaymentLink paymentLink = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/payment_links"); + } + [Fact] public void TestPaymentLinksPost2() { @@ -2581,6 +6490,25 @@ public void TestPaymentLinksPost2() this.AssertRequest(HttpMethod.Post, "/v1/payment_links"); } + [Fact] + public async Task TestPaymentLinksPost2Async() + { + var options = new PaymentLinkCreateOptions + { + LineItems = new List + { + new PaymentLinkLineItemOptions + { + Price = "price_xxxxxxxxxxxxx", + Quantity = 1, + }, + }, + }; + var service = new PaymentLinkService(this.StripeClient); + PaymentLink paymentLink = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/payment_links"); + } + [Fact] public void TestPaymentLinksPost3() { @@ -2594,6 +6522,19 @@ public void TestPaymentLinksPost3() "/v1/payment_links/plink_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestPaymentLinksPost3Async() + { + var options = new PaymentLinkUpdateOptions { Active = false }; + var service = new PaymentLinkService(this.StripeClient); + PaymentLink paymentLink = await service.UpdateAsync( + "plink_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/payment_links/plink_xxxxxxxxxxxxx"); + } + [Fact] public void TestPaymentMethodConfigurationsGet() { @@ -2612,15 +6553,79 @@ public void TestPaymentMethodConfigurationsGet() } [Fact] - public void TestPaymentMethodConfigurationsGet2() + public async Task TestPaymentMethodConfigurationsGetAsync() { + var options = new PaymentMethodConfigurationListOptions + { + Application = "foo", + }; var service = new PaymentMethodConfigurationService( this.StripeClient); - PaymentMethodConfiguration paymentMethodConfiguration = service.Get( - "foo"); + StripeList paymentMethodConfigurations = await service + .ListAsync(options); this.AssertRequest( HttpMethod.Get, - "/v1/payment_method_configurations/foo"); + "/v1/payment_method_configurations", + "application=foo"); + } + + [Fact] + public void TestPaymentMethodConfigurationsGetAutoPaging() + { + var options = new PaymentMethodConfigurationListOptions + { + Application = "foo", + }; + var service = new PaymentMethodConfigurationService( + this.StripeClient); + var paymentMethodConfiguration = service.ListAutoPaging(options) + .First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/payment_method_configurations", + "application=foo"); + } + + [Fact] + public async Task TestPaymentMethodConfigurationsGetAutoPagingAsync() + { + var options = new PaymentMethodConfigurationListOptions + { + Application = "foo", + }; + var service = new PaymentMethodConfigurationService( + this.StripeClient); + var paymentMethodConfiguration = await service.ListAutoPagingAsync( + options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/payment_method_configurations", + "application=foo"); + } + + [Fact] + public void TestPaymentMethodConfigurationsGet2() + { + var service = new PaymentMethodConfigurationService( + this.StripeClient); + PaymentMethodConfiguration paymentMethodConfiguration = service.Get( + "foo"); + this.AssertRequest( + HttpMethod.Get, + "/v1/payment_method_configurations/foo"); + } + + [Fact] + public async Task TestPaymentMethodConfigurationsGet2Async() + { + var service = new PaymentMethodConfigurationService( + this.StripeClient); + PaymentMethodConfiguration paymentMethodConfiguration = await service + .GetAsync("foo"); + this.AssertRequest( + HttpMethod.Get, + "/v1/payment_method_configurations/foo"); } [Fact] @@ -2652,6 +6657,35 @@ public void TestPaymentMethodConfigurationsPost() "/v1/payment_method_configurations"); } + [Fact] + public async Task TestPaymentMethodConfigurationsPostAsync() + { + var options = new PaymentMethodConfigurationCreateOptions + { + AcssDebit = new PaymentMethodConfigurationAcssDebitOptions + { + DisplayPreference = new PaymentMethodConfigurationAcssDebitDisplayPreferenceOptions + { + Preference = "none", + }, + }, + Affirm = new PaymentMethodConfigurationAffirmOptions + { + DisplayPreference = new PaymentMethodConfigurationAffirmDisplayPreferenceOptions + { + Preference = "none", + }, + }, + }; + var service = new PaymentMethodConfigurationService( + this.StripeClient); + PaymentMethodConfiguration paymentMethodConfiguration = await service + .CreateAsync(options); + this.AssertRequest( + HttpMethod.Post, + "/v1/payment_method_configurations"); + } + [Fact] public void TestPaymentMethodConfigurationsPost2() { @@ -2674,6 +6708,28 @@ public void TestPaymentMethodConfigurationsPost2() "/v1/payment_method_configurations/foo"); } + [Fact] + public async Task TestPaymentMethodConfigurationsPost2Async() + { + var options = new PaymentMethodConfigurationUpdateOptions + { + AcssDebit = new PaymentMethodConfigurationAcssDebitOptions + { + DisplayPreference = new PaymentMethodConfigurationAcssDebitDisplayPreferenceOptions + { + Preference = "on", + }, + }, + }; + var service = new PaymentMethodConfigurationService( + this.StripeClient); + PaymentMethodConfiguration paymentMethodConfiguration = await service + .UpdateAsync("foo", options); + this.AssertRequest( + HttpMethod.Post, + "/v1/payment_method_configurations/foo"); + } + [Fact] public void TestPaymentMethodsAttachPost() { @@ -2690,6 +6746,22 @@ public void TestPaymentMethodsAttachPost() "/v1/payment_methods/pm_xxxxxxxxxxxxx/attach"); } + [Fact] + public async Task TestPaymentMethodsAttachPostAsync() + { + var options = new PaymentMethodAttachOptions + { + Customer = "cus_xxxxxxxxxxxxx", + }; + var service = new PaymentMethodService(this.StripeClient); + PaymentMethod paymentMethod = await service.AttachAsync( + "pm_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/payment_methods/pm_xxxxxxxxxxxxx/attach"); + } + [Fact] public void TestPaymentMethodsDetachPost() { @@ -2700,6 +6772,17 @@ public void TestPaymentMethodsDetachPost() "/v1/payment_methods/pm_xxxxxxxxxxxxx/detach"); } + [Fact] + public async Task TestPaymentMethodsDetachPostAsync() + { + var service = new PaymentMethodService(this.StripeClient); + PaymentMethod paymentMethod = await service.DetachAsync( + "pm_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/payment_methods/pm_xxxxxxxxxxxxx/detach"); + } + [Fact] public void TestPaymentMethodsGet() { @@ -2716,6 +6799,56 @@ public void TestPaymentMethodsGet() "customer=cus_xxxxxxxxxxxxx&type=card"); } + [Fact] + public async Task TestPaymentMethodsGetAsync() + { + var options = new PaymentMethodListOptions + { + Customer = "cus_xxxxxxxxxxxxx", + Type = "card", + }; + var service = new PaymentMethodService(this.StripeClient); + StripeList paymentMethods = await service.ListAsync( + options); + this.AssertRequest( + HttpMethod.Get, + "/v1/payment_methods", + "customer=cus_xxxxxxxxxxxxx&type=card"); + } + + [Fact] + public void TestPaymentMethodsGetAutoPaging() + { + var options = new PaymentMethodListOptions + { + Customer = "cus_xxxxxxxxxxxxx", + Type = "card", + }; + var service = new PaymentMethodService(this.StripeClient); + var paymentMethod = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/payment_methods", + "customer=cus_xxxxxxxxxxxxx&type=card"); + } + + [Fact] + public async Task TestPaymentMethodsGetAutoPagingAsync() + { + var options = new PaymentMethodListOptions + { + Customer = "cus_xxxxxxxxxxxxx", + Type = "card", + }; + var service = new PaymentMethodService(this.StripeClient); + var paymentMethod = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/payment_methods", + "customer=cus_xxxxxxxxxxxxx&type=card"); + } + [Fact] public void TestPaymentMethodsGet2() { @@ -2726,6 +6859,17 @@ public void TestPaymentMethodsGet2() "/v1/payment_methods/pm_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestPaymentMethodsGet2Async() + { + var service = new PaymentMethodService(this.StripeClient); + PaymentMethod paymentMethod = await service.GetAsync( + "pm_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/payment_methods/pm_xxxxxxxxxxxxx"); + } + [Fact] public void TestPaymentMethodsPost() { @@ -2745,6 +6889,25 @@ public void TestPaymentMethodsPost() this.AssertRequest(HttpMethod.Post, "/v1/payment_methods"); } + [Fact] + public async Task TestPaymentMethodsPostAsync() + { + var options = new PaymentMethodCreateOptions + { + Type = "card", + Card = new PaymentMethodCardOptions + { + Number = "4242424242424242", + ExpMonth = 8, + ExpYear = 2024, + Cvc = "314", + }, + }; + var service = new PaymentMethodService(this.StripeClient); + PaymentMethod paymentMethod = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/payment_methods"); + } + [Fact] public void TestPaymentMethodsPost2() { @@ -2764,6 +6927,25 @@ public void TestPaymentMethodsPost2() "/v1/payment_methods/pm_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestPaymentMethodsPost2Async() + { + var options = new PaymentMethodUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new PaymentMethodService(this.StripeClient); + PaymentMethod paymentMethod = await service.UpdateAsync( + "pm_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/payment_methods/pm_xxxxxxxxxxxxx"); + } + [Fact] public void TestPayoutsCancelPost() { @@ -2774,6 +6956,16 @@ public void TestPayoutsCancelPost() "/v1/payouts/po_xxxxxxxxxxxxx/cancel"); } + [Fact] + public async Task TestPayoutsCancelPostAsync() + { + var service = new PayoutService(this.StripeClient); + Payout payout = await service.CancelAsync("po_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/payouts/po_xxxxxxxxxxxxx/cancel"); + } + [Fact] public void TestPayoutsGet() { @@ -2783,6 +6975,34 @@ public void TestPayoutsGet() this.AssertRequest(HttpMethod.Get, "/v1/payouts", "limit=3"); } + [Fact] + public async Task TestPayoutsGetAsync() + { + var options = new PayoutListOptions { Limit = 3 }; + var service = new PayoutService(this.StripeClient); + StripeList payouts = await service.ListAsync(options); + this.AssertRequest(HttpMethod.Get, "/v1/payouts", "limit=3"); + } + + [Fact] + public void TestPayoutsGetAutoPaging() + { + var options = new PayoutListOptions { Limit = 3 }; + var service = new PayoutService(this.StripeClient); + var payout = service.ListAutoPaging(options).First(); + this.AssertRequest(HttpMethod.Get, "/v1/payouts", "limit=3"); + } + + [Fact] + public async Task TestPayoutsGetAutoPagingAsync() + { + var options = new PayoutListOptions { Limit = 3 }; + var service = new PayoutService(this.StripeClient); + var payout = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/payouts", "limit=3"); + } + [Fact] public void TestPayoutsGet2() { @@ -2791,6 +7011,14 @@ public void TestPayoutsGet2() this.AssertRequest(HttpMethod.Get, "/v1/payouts/po_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestPayoutsGet2Async() + { + var service = new PayoutService(this.StripeClient); + Payout payout = await service.GetAsync("po_xxxxxxxxxxxxx"); + this.AssertRequest(HttpMethod.Get, "/v1/payouts/po_xxxxxxxxxxxxx"); + } + [Fact] public void TestPayoutsPost() { @@ -2804,6 +7032,19 @@ public void TestPayoutsPost() this.AssertRequest(HttpMethod.Post, "/v1/payouts"); } + [Fact] + public async Task TestPayoutsPostAsync() + { + var options = new PayoutCreateOptions + { + Amount = 1100, + Currency = "usd", + }; + var service = new PayoutService(this.StripeClient); + Payout payout = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/payouts"); + } + [Fact] public void TestPayoutsPost2() { @@ -2820,10 +7061,37 @@ public void TestPayoutsPost2() } [Fact] - public void TestPayoutsReversePost() + public async Task TestPayoutsPost2Async() { + var options = new PayoutUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; var service = new PayoutService(this.StripeClient); - Payout payout = service.Reverse("po_xxxxxxxxxxxxx"); + Payout payout = await service.UpdateAsync( + "po_xxxxxxxxxxxxx", + options); + this.AssertRequest(HttpMethod.Post, "/v1/payouts/po_xxxxxxxxxxxxx"); + } + + [Fact] + public void TestPayoutsReversePost() + { + var service = new PayoutService(this.StripeClient); + Payout payout = service.Reverse("po_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/payouts/po_xxxxxxxxxxxxx/reverse"); + } + + [Fact] + public async Task TestPayoutsReversePostAsync() + { + var service = new PayoutService(this.StripeClient); + Payout payout = await service.ReverseAsync("po_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Post, "/v1/payouts/po_xxxxxxxxxxxxx/reverse"); @@ -2839,6 +7107,16 @@ public void TestPlansDelete() "/v1/plans/price_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestPlansDeleteAsync() + { + var service = new PlanService(this.StripeClient); + Plan deleted = await service.DeleteAsync("price_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Delete, + "/v1/plans/price_xxxxxxxxxxxxx"); + } + [Fact] public void TestPlansGet() { @@ -2848,6 +7126,33 @@ public void TestPlansGet() this.AssertRequest(HttpMethod.Get, "/v1/plans", "limit=3"); } + [Fact] + public async Task TestPlansGetAsync() + { + var options = new PlanListOptions { Limit = 3 }; + var service = new PlanService(this.StripeClient); + StripeList plans = await service.ListAsync(options); + this.AssertRequest(HttpMethod.Get, "/v1/plans", "limit=3"); + } + + [Fact] + public void TestPlansGetAutoPaging() + { + var options = new PlanListOptions { Limit = 3 }; + var service = new PlanService(this.StripeClient); + var plan = service.ListAutoPaging(options).First(); + this.AssertRequest(HttpMethod.Get, "/v1/plans", "limit=3"); + } + + [Fact] + public async Task TestPlansGetAutoPagingAsync() + { + var options = new PlanListOptions { Limit = 3 }; + var service = new PlanService(this.StripeClient); + var plan = await service.ListAutoPagingAsync(options).FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/plans", "limit=3"); + } + [Fact] public void TestPlansGet2() { @@ -2856,6 +7161,14 @@ public void TestPlansGet2() this.AssertRequest(HttpMethod.Get, "/v1/plans/price_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestPlansGet2Async() + { + var service = new PlanService(this.StripeClient); + Plan plan = await service.GetAsync("price_xxxxxxxxxxxxx"); + this.AssertRequest(HttpMethod.Get, "/v1/plans/price_xxxxxxxxxxxxx"); + } + [Fact] public void TestPlansPost() { @@ -2871,6 +7184,21 @@ public void TestPlansPost() this.AssertRequest(HttpMethod.Post, "/v1/plans"); } + [Fact] + public async Task TestPlansPostAsync() + { + var options = new PlanCreateOptions + { + Amount = 2000, + Currency = "usd", + Interval = "month", + Product = "prod_xxxxxxxxxxxxx", + }; + var service = new PlanService(this.StripeClient); + Plan plan = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/plans"); + } + [Fact] public void TestPlansPost2() { @@ -2886,6 +7214,21 @@ public void TestPlansPost2() this.AssertRequest(HttpMethod.Post, "/v1/plans"); } + [Fact] + public async Task TestPlansPost2Async() + { + var options = new PlanCreateOptions + { + Amount = 2000, + Currency = "usd", + Interval = "month", + Product = new PlanProductOptions { Name = "My product" }, + }; + var service = new PlanService(this.StripeClient); + Plan plan = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/plans"); + } + [Fact] public void TestPlansPost3() { @@ -2903,6 +7246,25 @@ public void TestPlansPost3() "/v1/plans/price_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestPlansPost3Async() + { + var options = new PlanUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new PlanService(this.StripeClient); + Plan plan = await service.UpdateAsync( + "price_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/plans/price_xxxxxxxxxxxxx"); + } + [Fact] public void TestPricesGet() { @@ -2912,6 +7274,33 @@ public void TestPricesGet() this.AssertRequest(HttpMethod.Get, "/v1/prices", "limit=3"); } + [Fact] + public async Task TestPricesGetAsync() + { + var options = new PriceListOptions { Limit = 3 }; + var service = new PriceService(this.StripeClient); + StripeList prices = await service.ListAsync(options); + this.AssertRequest(HttpMethod.Get, "/v1/prices", "limit=3"); + } + + [Fact] + public void TestPricesGetAutoPaging() + { + var options = new PriceListOptions { Limit = 3 }; + var service = new PriceService(this.StripeClient); + var price = service.ListAutoPaging(options).First(); + this.AssertRequest(HttpMethod.Get, "/v1/prices", "limit=3"); + } + + [Fact] + public async Task TestPricesGetAutoPagingAsync() + { + var options = new PriceListOptions { Limit = 3 }; + var service = new PriceService(this.StripeClient); + var price = await service.ListAutoPagingAsync(options).FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/prices", "limit=3"); + } + [Fact] public void TestPricesGet2() { @@ -2922,6 +7311,16 @@ public void TestPricesGet2() "/v1/prices/price_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestPricesGet2Async() + { + var service = new PriceService(this.StripeClient); + Price price = await service.GetAsync("price_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/prices/price_xxxxxxxxxxxxx"); + } + [Fact] public void TestPricesPost() { @@ -2952,6 +7351,36 @@ public void TestPricesPost() this.AssertRequest(HttpMethod.Post, "/v1/prices"); } + [Fact] + public async Task TestPricesPostAsync() + { + var options = new PriceCreateOptions + { + UnitAmount = 2000, + Currency = "usd", + CurrencyOptions = new Dictionary + { + { + "uah", new PriceCurrencyOptionsOptions + { + UnitAmount = 5000, + } + }, + { + "eur", new PriceCurrencyOptionsOptions + { + UnitAmount = 1800, + } + }, + }, + Recurring = new PriceRecurringOptions { Interval = "month" }, + Product = "prod_xxxxxxxxxxxxx", + }; + var service = new PriceService(this.StripeClient); + Price price = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/prices"); + } + [Fact] public void TestPricesPost2() { @@ -2967,6 +7396,21 @@ public void TestPricesPost2() this.AssertRequest(HttpMethod.Post, "/v1/prices"); } + [Fact] + public async Task TestPricesPost2Async() + { + var options = new PriceCreateOptions + { + UnitAmount = 2000, + Currency = "usd", + Recurring = new PriceRecurringOptions { Interval = "month" }, + Product = "prod_xxxxxxxxxxxxx", + }; + var service = new PriceService(this.StripeClient); + Price price = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/prices"); + } + [Fact] public void TestPricesPost3() { @@ -2984,6 +7428,25 @@ public void TestPricesPost3() "/v1/prices/price_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestPricesPost3Async() + { + var options = new PriceUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new PriceService(this.StripeClient); + Price price = await service.UpdateAsync( + "price_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/prices/price_xxxxxxxxxxxxx"); + } + [Fact] public void TestPricesSearchGet() { @@ -2999,6 +7462,53 @@ public void TestPricesSearchGet() "query=active%3A%27true%27%20AND%20metadata%5B%27order_id%27%5D%3A%276735%27"); } + [Fact] + public async Task TestPricesSearchGetAsync() + { + var options = new PriceSearchOptions + { + Query = "active:'true' AND metadata['order_id']:'6735'", + }; + var service = new PriceService(this.StripeClient); + StripeSearchResult prices = await service.SearchAsync( + options); + this.AssertRequest( + HttpMethod.Get, + "/v1/prices/search", + "query=active%3A%27true%27%20AND%20metadata%5B%27order_id%27%5D%3A%276735%27"); + } + + [Fact] + public void TestPricesSearchGetAutoPaging() + { + var options = new PriceSearchOptions + { + Query = "active:'true' AND metadata['order_id']:'6735'", + }; + var service = new PriceService(this.StripeClient); + var price = service.SearchAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/prices/search", + "query=active%3A%27true%27%20AND%20metadata%5B%27order_id%27%5D%3A%276735%27"); + } + + [Fact] + public async Task TestPricesSearchGetAutoPagingAsync() + { + var options = new PriceSearchOptions + { + Query = "active:'true' AND metadata['order_id']:'6735'", + }; + var service = new PriceService(this.StripeClient); + var price = await service.SearchAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/prices/search", + "query=active%3A%27true%27%20AND%20metadata%5B%27order_id%27%5D%3A%276735%27"); + } + [Fact] public void TestProductsDelete() { @@ -3009,6 +7519,16 @@ public void TestProductsDelete() "/v1/products/prod_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestProductsDeleteAsync() + { + var service = new ProductService(this.StripeClient); + Product deleted = await service.DeleteAsync("prod_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Delete, + "/v1/products/prod_xxxxxxxxxxxxx"); + } + [Fact] public void TestProductsGet() { @@ -3019,43 +7539,109 @@ public void TestProductsGet() } [Fact] - public void TestProductsGet2() + public async Task TestProductsGetAsync() { + var options = new ProductListOptions { Limit = 3 }; var service = new ProductService(this.StripeClient); - Product product = service.Get("prod_xxxxxxxxxxxxx"); - this.AssertRequest( - HttpMethod.Get, - "/v1/products/prod_xxxxxxxxxxxxx"); + StripeList products = await service.ListAsync(options); + this.AssertRequest(HttpMethod.Get, "/v1/products", "limit=3"); } [Fact] - public void TestProductsPost() + public void TestProductsGetAutoPaging() { - var options = new ProductCreateOptions { Name = "Gold Special" }; + var options = new ProductListOptions { Limit = 3 }; var service = new ProductService(this.StripeClient); - Product product = service.Create(options); - this.AssertRequest(HttpMethod.Post, "/v1/products"); + var product = service.ListAutoPaging(options).First(); + this.AssertRequest(HttpMethod.Get, "/v1/products", "limit=3"); } [Fact] - public void TestProductsPost2() + public async Task TestProductsGetAutoPagingAsync() { - var options = new ProductUpdateOptions - { - Metadata = new Dictionary - { - { "order_id", "6735" }, - }, - }; + var options = new ProductListOptions { Limit = 3 }; var service = new ProductService(this.StripeClient); - Product product = service.Update("prod_xxxxxxxxxxxxx", options); - this.AssertRequest( - HttpMethod.Post, - "/v1/products/prod_xxxxxxxxxxxxx"); + var product = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/products", "limit=3"); } [Fact] - public void TestProductsSearchGet() + public void TestProductsGet2() + { + var service = new ProductService(this.StripeClient); + Product product = service.Get("prod_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/products/prod_xxxxxxxxxxxxx"); + } + + [Fact] + public async Task TestProductsGet2Async() + { + var service = new ProductService(this.StripeClient); + Product product = await service.GetAsync("prod_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/products/prod_xxxxxxxxxxxxx"); + } + + [Fact] + public void TestProductsPost() + { + var options = new ProductCreateOptions { Name = "Gold Special" }; + var service = new ProductService(this.StripeClient); + Product product = service.Create(options); + this.AssertRequest(HttpMethod.Post, "/v1/products"); + } + + [Fact] + public async Task TestProductsPostAsync() + { + var options = new ProductCreateOptions { Name = "Gold Special" }; + var service = new ProductService(this.StripeClient); + Product product = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/products"); + } + + [Fact] + public void TestProductsPost2() + { + var options = new ProductUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new ProductService(this.StripeClient); + Product product = service.Update("prod_xxxxxxxxxxxxx", options); + this.AssertRequest( + HttpMethod.Post, + "/v1/products/prod_xxxxxxxxxxxxx"); + } + + [Fact] + public async Task TestProductsPost2Async() + { + var options = new ProductUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new ProductService(this.StripeClient); + Product product = await service.UpdateAsync( + "prod_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/products/prod_xxxxxxxxxxxxx"); + } + + [Fact] + public void TestProductsSearchGet() { var options = new ProductSearchOptions { @@ -3069,6 +7655,53 @@ public void TestProductsSearchGet() "query=active%3A%27true%27%20AND%20metadata%5B%27order_id%27%5D%3A%276735%27"); } + [Fact] + public async Task TestProductsSearchGetAsync() + { + var options = new ProductSearchOptions + { + Query = "active:'true' AND metadata['order_id']:'6735'", + }; + var service = new ProductService(this.StripeClient); + StripeSearchResult products = await service.SearchAsync( + options); + this.AssertRequest( + HttpMethod.Get, + "/v1/products/search", + "query=active%3A%27true%27%20AND%20metadata%5B%27order_id%27%5D%3A%276735%27"); + } + + [Fact] + public void TestProductsSearchGetAutoPaging() + { + var options = new ProductSearchOptions + { + Query = "active:'true' AND metadata['order_id']:'6735'", + }; + var service = new ProductService(this.StripeClient); + var product = service.SearchAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/products/search", + "query=active%3A%27true%27%20AND%20metadata%5B%27order_id%27%5D%3A%276735%27"); + } + + [Fact] + public async Task TestProductsSearchGetAutoPagingAsync() + { + var options = new ProductSearchOptions + { + Query = "active:'true' AND metadata['order_id']:'6735'", + }; + var service = new ProductService(this.StripeClient); + var product = await service.SearchAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/products/search", + "query=active%3A%27true%27%20AND%20metadata%5B%27order_id%27%5D%3A%276735%27"); + } + [Fact] public void TestPromotionCodesGet() { @@ -3081,6 +7714,44 @@ public void TestPromotionCodesGet() "limit=3"); } + [Fact] + public async Task TestPromotionCodesGetAsync() + { + var options = new PromotionCodeListOptions { Limit = 3 }; + var service = new PromotionCodeService(this.StripeClient); + StripeList promotionCodes = await service.ListAsync( + options); + this.AssertRequest( + HttpMethod.Get, + "/v1/promotion_codes", + "limit=3"); + } + + [Fact] + public void TestPromotionCodesGetAutoPaging() + { + var options = new PromotionCodeListOptions { Limit = 3 }; + var service = new PromotionCodeService(this.StripeClient); + var promotionCode = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/promotion_codes", + "limit=3"); + } + + [Fact] + public async Task TestPromotionCodesGetAutoPagingAsync() + { + var options = new PromotionCodeListOptions { Limit = 3 }; + var service = new PromotionCodeService(this.StripeClient); + var promotionCode = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/promotion_codes", + "limit=3"); + } + [Fact] public void TestPromotionCodesGet2() { @@ -3091,6 +7762,17 @@ public void TestPromotionCodesGet2() "/v1/promotion_codes/promo_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestPromotionCodesGet2Async() + { + var service = new PromotionCodeService(this.StripeClient); + PromotionCode promotionCode = await service.GetAsync( + "promo_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/promotion_codes/promo_xxxxxxxxxxxxx"); + } + [Fact] public void TestPromotionCodesPost() { @@ -3107,6 +7789,22 @@ public void TestPromotionCodesPost() this.AssertRequest(HttpMethod.Post, "/v1/promotion_codes"); } + [Fact] + public async Task TestPromotionCodesPostAsync() + { + var options = new PromotionCodeCreateOptions + { + Promotion = new PromotionCodePromotionOptions + { + Type = "coupon", + Coupon = "Z4OV52SU", + }, + }; + var service = new PromotionCodeService(this.StripeClient); + PromotionCode promotionCode = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/promotion_codes"); + } + [Fact] public void TestPromotionCodesPost2() { @@ -3126,6 +7824,25 @@ public void TestPromotionCodesPost2() "/v1/promotion_codes/promo_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestPromotionCodesPost2Async() + { + var options = new PromotionCodeUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new PromotionCodeService(this.StripeClient); + PromotionCode promotionCode = await service.UpdateAsync( + "promo_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/promotion_codes/promo_xxxxxxxxxxxxx"); + } + [Fact] public void TestQuotesAcceptPost() { @@ -3136,6 +7853,16 @@ public void TestQuotesAcceptPost() "/v1/quotes/qt_xxxxxxxxxxxxx/accept"); } + [Fact] + public async Task TestQuotesAcceptPostAsync() + { + var service = new QuoteService(this.StripeClient); + Quote quote = await service.AcceptAsync("qt_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/quotes/qt_xxxxxxxxxxxxx/accept"); + } + [Fact] public void TestQuotesCancelPost() { @@ -3146,6 +7873,16 @@ public void TestQuotesCancelPost() "/v1/quotes/qt_xxxxxxxxxxxxx/cancel"); } + [Fact] + public async Task TestQuotesCancelPostAsync() + { + var service = new QuoteService(this.StripeClient); + Quote quote = await service.CancelAsync("qt_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/quotes/qt_xxxxxxxxxxxxx/cancel"); + } + [Fact] public void TestQuotesFinalizePost() { @@ -3156,6 +7893,16 @@ public void TestQuotesFinalizePost() "/v1/quotes/qt_xxxxxxxxxxxxx/finalize"); } + [Fact] + public async Task TestQuotesFinalizePostAsync() + { + var service = new QuoteService(this.StripeClient); + Quote quote = await service.FinalizeQuoteAsync("qt_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/quotes/qt_xxxxxxxxxxxxx/finalize"); + } + [Fact] public void TestQuotesGet() { @@ -3165,6 +7912,33 @@ public void TestQuotesGet() this.AssertRequest(HttpMethod.Get, "/v1/quotes", "limit=3"); } + [Fact] + public async Task TestQuotesGetAsync() + { + var options = new QuoteListOptions { Limit = 3 }; + var service = new QuoteService(this.StripeClient); + StripeList quotes = await service.ListAsync(options); + this.AssertRequest(HttpMethod.Get, "/v1/quotes", "limit=3"); + } + + [Fact] + public void TestQuotesGetAutoPaging() + { + var options = new QuoteListOptions { Limit = 3 }; + var service = new QuoteService(this.StripeClient); + var quote = service.ListAutoPaging(options).First(); + this.AssertRequest(HttpMethod.Get, "/v1/quotes", "limit=3"); + } + + [Fact] + public async Task TestQuotesGetAutoPagingAsync() + { + var options = new QuoteListOptions { Limit = 3 }; + var service = new QuoteService(this.StripeClient); + var quote = await service.ListAutoPagingAsync(options).FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/quotes", "limit=3"); + } + [Fact] public void TestQuotesGet2() { @@ -3173,6 +7947,14 @@ public void TestQuotesGet2() this.AssertRequest(HttpMethod.Get, "/v1/quotes/qt_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestQuotesGet2Async() + { + var service = new QuoteService(this.StripeClient); + Quote quote = await service.GetAsync("qt_xxxxxxxxxxxxx"); + this.AssertRequest(HttpMethod.Get, "/v1/quotes/qt_xxxxxxxxxxxxx"); + } + [Fact] public void TestQuotesLineItemsGet() { @@ -3184,39 +7966,102 @@ public void TestQuotesLineItemsGet() } [Fact] - public void TestQuotesPdfGet() + public async Task TestQuotesLineItemsGetAsync() { - var service = new QuoteService(this.StripeClient); - service.Pdf("qt_xxxxxxxxxxxxx"); + var service = new QuoteLineItemService(this.StripeClient); + StripeList lineItems = await service.ListAsync( + "qt_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, - "/v1/quotes/qt_xxxxxxxxxxxxx/pdf"); + "/v1/quotes/qt_xxxxxxxxxxxxx/line_items"); } [Fact] - public void TestQuotesPost() + public void TestQuotesLineItemsGetAutoPaging() { - var options = new QuoteCreateOptions - { - Customer = "cus_xxxxxxxxxxxxx", - LineItems = new List - { - new QuoteLineItemOptions - { - Price = "price_xxxxxxxxxxxxx", - Quantity = 2, - }, - }, - }; - var service = new QuoteService(this.StripeClient); - Quote quote = service.Create(options); - this.AssertRequest(HttpMethod.Post, "/v1/quotes"); + var service = new QuoteLineItemService(this.StripeClient); + var lineItem = service.ListAutoPaging("qt_xxxxxxxxxxxxx").First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/quotes/qt_xxxxxxxxxxxxx/line_items"); } [Fact] - public void TestQuotesPost2() + public async Task TestQuotesLineItemsGetAutoPagingAsync() { - var options = new QuoteUpdateOptions + var service = new QuoteLineItemService(this.StripeClient); + var lineItem = await service.ListAutoPagingAsync("qt_xxxxxxxxxxxxx") + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/quotes/qt_xxxxxxxxxxxxx/line_items"); + } + + [Fact] + public void TestQuotesPdfGet() + { + var service = new QuoteService(this.StripeClient); + System.IO.Stream stream = service.Pdf("qt_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/quotes/qt_xxxxxxxxxxxxx/pdf"); + } + + [Fact] + public async Task TestQuotesPdfGetAsync() + { + var service = new QuoteService(this.StripeClient); + System.IO.Stream stream = await service.PdfAsync( + "qt_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/quotes/qt_xxxxxxxxxxxxx/pdf"); + } + + [Fact] + public void TestQuotesPost() + { + var options = new QuoteCreateOptions + { + Customer = "cus_xxxxxxxxxxxxx", + LineItems = new List + { + new QuoteLineItemOptions + { + Price = "price_xxxxxxxxxxxxx", + Quantity = 2, + }, + }, + }; + var service = new QuoteService(this.StripeClient); + Quote quote = service.Create(options); + this.AssertRequest(HttpMethod.Post, "/v1/quotes"); + } + + [Fact] + public async Task TestQuotesPostAsync() + { + var options = new QuoteCreateOptions + { + Customer = "cus_xxxxxxxxxxxxx", + LineItems = new List + { + new QuoteLineItemOptions + { + Price = "price_xxxxxxxxxxxxx", + Quantity = 2, + }, + }, + }; + var service = new QuoteService(this.StripeClient); + Quote quote = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/quotes"); + } + + [Fact] + public void TestQuotesPost2() + { + var options = new QuoteUpdateOptions { Metadata = new Dictionary { @@ -3228,6 +8073,23 @@ public void TestQuotesPost2() this.AssertRequest(HttpMethod.Post, "/v1/quotes/qt_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestQuotesPost2Async() + { + var options = new QuoteUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new QuoteService(this.StripeClient); + Quote quote = await service.UpdateAsync( + "qt_xxxxxxxxxxxxx", + options); + this.AssertRequest(HttpMethod.Post, "/v1/quotes/qt_xxxxxxxxxxxxx"); + } + [Fact] public void TestRadarEarlyFraudWarningsGet() { @@ -3245,6 +8107,56 @@ public void TestRadarEarlyFraudWarningsGet() "limit=3"); } + [Fact] + public async Task TestRadarEarlyFraudWarningsGetAsync() + { + var options = new Stripe.Radar.EarlyFraudWarningListOptions + { + Limit = 3, + }; + var service = new Stripe.Radar.EarlyFraudWarningService( + this.StripeClient); + StripeList earlyFraudWarnings = await service + .ListAsync(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/radar/early_fraud_warnings", + "limit=3"); + } + + [Fact] + public void TestRadarEarlyFraudWarningsGetAutoPaging() + { + var options = new Stripe.Radar.EarlyFraudWarningListOptions + { + Limit = 3, + }; + var service = new Stripe.Radar.EarlyFraudWarningService( + this.StripeClient); + var earlyFraudWarning = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/radar/early_fraud_warnings", + "limit=3"); + } + + [Fact] + public async Task TestRadarEarlyFraudWarningsGetAutoPagingAsync() + { + var options = new Stripe.Radar.EarlyFraudWarningListOptions + { + Limit = 3, + }; + var service = new Stripe.Radar.EarlyFraudWarningService( + this.StripeClient); + var earlyFraudWarning = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/radar/early_fraud_warnings", + "limit=3"); + } + [Fact] public void TestRadarEarlyFraudWarningsGet2() { @@ -3257,6 +8169,18 @@ public void TestRadarEarlyFraudWarningsGet2() "/v1/radar/early_fraud_warnings/issfr_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestRadarEarlyFraudWarningsGet2Async() + { + var service = new Stripe.Radar.EarlyFraudWarningService( + this.StripeClient); + Stripe.Radar.EarlyFraudWarning earlyFraudWarning = await service + .GetAsync("issfr_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/radar/early_fraud_warnings/issfr_xxxxxxxxxxxxx"); + } + [Fact] public void TestRadarValueListItemsDelete() { @@ -3269,6 +8193,18 @@ public void TestRadarValueListItemsDelete() "/v1/radar/value_list_items/rsli_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestRadarValueListItemsDeleteAsync() + { + var service = new Stripe.Radar.ValueListItemService( + this.StripeClient); + Stripe.Radar.ValueListItem deleted = await service.DeleteAsync( + "rsli_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Delete, + "/v1/radar/value_list_items/rsli_xxxxxxxxxxxxx"); + } + [Fact] public void TestRadarValueListItemsGet() { @@ -3287,6 +8223,59 @@ public void TestRadarValueListItemsGet() "limit=3&value_list=rsl_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestRadarValueListItemsGetAsync() + { + var options = new Stripe.Radar.ValueListItemListOptions + { + Limit = 3, + ValueList = "rsl_xxxxxxxxxxxxx", + }; + var service = new Stripe.Radar.ValueListItemService( + this.StripeClient); + StripeList valueListItems = await service + .ListAsync(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/radar/value_list_items", + "limit=3&value_list=rsl_xxxxxxxxxxxxx"); + } + + [Fact] + public void TestRadarValueListItemsGetAutoPaging() + { + var options = new Stripe.Radar.ValueListItemListOptions + { + Limit = 3, + ValueList = "rsl_xxxxxxxxxxxxx", + }; + var service = new Stripe.Radar.ValueListItemService( + this.StripeClient); + var valueListItem = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/radar/value_list_items", + "limit=3&value_list=rsl_xxxxxxxxxxxxx"); + } + + [Fact] + public async Task TestRadarValueListItemsGetAutoPagingAsync() + { + var options = new Stripe.Radar.ValueListItemListOptions + { + Limit = 3, + ValueList = "rsl_xxxxxxxxxxxxx", + }; + var service = new Stripe.Radar.ValueListItemService( + this.StripeClient); + var valueListItem = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/radar/value_list_items", + "limit=3&value_list=rsl_xxxxxxxxxxxxx"); + } + [Fact] public void TestRadarValueListItemsGet2() { @@ -3299,6 +8288,18 @@ public void TestRadarValueListItemsGet2() "/v1/radar/value_list_items/rsli_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestRadarValueListItemsGet2Async() + { + var service = new Stripe.Radar.ValueListItemService( + this.StripeClient); + Stripe.Radar.ValueListItem valueListItem = await service.GetAsync( + "rsli_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/radar/value_list_items/rsli_xxxxxxxxxxxxx"); + } + [Fact] public void TestRadarValueListItemsPost() { @@ -3313,6 +8314,21 @@ public void TestRadarValueListItemsPost() this.AssertRequest(HttpMethod.Post, "/v1/radar/value_list_items"); } + [Fact] + public async Task TestRadarValueListItemsPostAsync() + { + var options = new Stripe.Radar.ValueListItemCreateOptions + { + ValueList = "rsl_xxxxxxxxxxxxx", + Value = "1.2.3.4", + }; + var service = new Stripe.Radar.ValueListItemService( + this.StripeClient); + Stripe.Radar.ValueListItem valueListItem = await service + .CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/radar/value_list_items"); + } + [Fact] public void TestRadarValueListsDelete() { @@ -3324,6 +8340,17 @@ public void TestRadarValueListsDelete() "/v1/radar/value_lists/rsl_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestRadarValueListsDeleteAsync() + { + var service = new Stripe.Radar.ValueListService(this.StripeClient); + Stripe.Radar.ValueList deleted = await service.DeleteAsync( + "rsl_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Delete, + "/v1/radar/value_lists/rsl_xxxxxxxxxxxxx"); + } + [Fact] public void TestRadarValueListsGet() { @@ -3337,6 +8364,44 @@ public void TestRadarValueListsGet() "limit=3"); } + [Fact] + public async Task TestRadarValueListsGetAsync() + { + var options = new Stripe.Radar.ValueListListOptions { Limit = 3 }; + var service = new Stripe.Radar.ValueListService(this.StripeClient); + StripeList valueLists = await service + .ListAsync(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/radar/value_lists", + "limit=3"); + } + + [Fact] + public void TestRadarValueListsGetAutoPaging() + { + var options = new Stripe.Radar.ValueListListOptions { Limit = 3 }; + var service = new Stripe.Radar.ValueListService(this.StripeClient); + var valueList = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/radar/value_lists", + "limit=3"); + } + + [Fact] + public async Task TestRadarValueListsGetAutoPagingAsync() + { + var options = new Stripe.Radar.ValueListListOptions { Limit = 3 }; + var service = new Stripe.Radar.ValueListService(this.StripeClient); + var valueList = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/radar/value_lists", + "limit=3"); + } + [Fact] public void TestRadarValueListsGet2() { @@ -3347,6 +8412,17 @@ public void TestRadarValueListsGet2() "/v1/radar/value_lists/rsl_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestRadarValueListsGet2Async() + { + var service = new Stripe.Radar.ValueListService(this.StripeClient); + Stripe.Radar.ValueList valueList = await service.GetAsync( + "rsl_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/radar/value_lists/rsl_xxxxxxxxxxxxx"); + } + [Fact] public void TestRadarValueListsPost() { @@ -3362,7 +8438,22 @@ public void TestRadarValueListsPost() } [Fact] - public void TestRadarValueListsPost2() + public async Task TestRadarValueListsPostAsync() + { + var options = new Stripe.Radar.ValueListCreateOptions + { + Alias = "custom_ip_xxxxxxxxxxxxx", + Name = "Custom IP Blocklist", + ItemType = "ip_address", + }; + var service = new Stripe.Radar.ValueListService(this.StripeClient); + Stripe.Radar.ValueList valueList = await service.CreateAsync( + options); + this.AssertRequest(HttpMethod.Post, "/v1/radar/value_lists"); + } + + [Fact] + public void TestRadarValueListsPost2() { var options = new Stripe.Radar.ValueListUpdateOptions { @@ -3377,6 +8468,22 @@ public void TestRadarValueListsPost2() "/v1/radar/value_lists/rsl_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestRadarValueListsPost2Async() + { + var options = new Stripe.Radar.ValueListUpdateOptions + { + Name = "Updated IP Block List", + }; + var service = new Stripe.Radar.ValueListService(this.StripeClient); + Stripe.Radar.ValueList valueList = await service.UpdateAsync( + "rsl_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/radar/value_lists/rsl_xxxxxxxxxxxxx"); + } + [Fact] public void TestRefundsCancelPost() { @@ -3387,6 +8494,16 @@ public void TestRefundsCancelPost() "/v1/refunds/re_xxxxxxxxxxxxx/cancel"); } + [Fact] + public async Task TestRefundsCancelPostAsync() + { + var service = new RefundService(this.StripeClient); + Refund refund = await service.CancelAsync("re_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/refunds/re_xxxxxxxxxxxxx/cancel"); + } + [Fact] public void TestRefundsGet() { @@ -3396,6 +8513,34 @@ public void TestRefundsGet() this.AssertRequest(HttpMethod.Get, "/v1/refunds", "limit=3"); } + [Fact] + public async Task TestRefundsGetAsync() + { + var options = new RefundListOptions { Limit = 3 }; + var service = new RefundService(this.StripeClient); + StripeList refunds = await service.ListAsync(options); + this.AssertRequest(HttpMethod.Get, "/v1/refunds", "limit=3"); + } + + [Fact] + public void TestRefundsGetAutoPaging() + { + var options = new RefundListOptions { Limit = 3 }; + var service = new RefundService(this.StripeClient); + var refund = service.ListAutoPaging(options).First(); + this.AssertRequest(HttpMethod.Get, "/v1/refunds", "limit=3"); + } + + [Fact] + public async Task TestRefundsGetAutoPagingAsync() + { + var options = new RefundListOptions { Limit = 3 }; + var service = new RefundService(this.StripeClient); + var refund = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/refunds", "limit=3"); + } + [Fact] public void TestRefundsGet2() { @@ -3404,6 +8549,14 @@ public void TestRefundsGet2() this.AssertRequest(HttpMethod.Get, "/v1/refunds/re_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestRefundsGet2Async() + { + var service = new RefundService(this.StripeClient); + Refund refund = await service.GetAsync("re_xxxxxxxxxxxxx"); + this.AssertRequest(HttpMethod.Get, "/v1/refunds/re_xxxxxxxxxxxxx"); + } + [Fact] public void TestRefundsPost() { @@ -3416,6 +8569,18 @@ public void TestRefundsPost() this.AssertRequest(HttpMethod.Post, "/v1/refunds"); } + [Fact] + public async Task TestRefundsPostAsync() + { + var options = new RefundCreateOptions + { + Charge = "ch_xxxxxxxxxxxxx", + }; + var service = new RefundService(this.StripeClient); + Refund refund = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/refunds"); + } + [Fact] public void TestRefundsPost2() { @@ -3431,6 +8596,23 @@ public void TestRefundsPost2() this.AssertRequest(HttpMethod.Post, "/v1/refunds/re_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestRefundsPost2Async() + { + var options = new RefundUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new RefundService(this.StripeClient); + Refund refund = await service.UpdateAsync( + "re_xxxxxxxxxxxxx", + options); + this.AssertRequest(HttpMethod.Post, "/v1/refunds/re_xxxxxxxxxxxxx"); + } + [Fact] public void TestReportingReportRunsGet() { @@ -3448,6 +8630,56 @@ public void TestReportingReportRunsGet() "limit=3"); } + [Fact] + public async Task TestReportingReportRunsGetAsync() + { + var options = new Stripe.Reporting.ReportRunListOptions + { + Limit = 3, + }; + var service = new Stripe.Reporting.ReportRunService( + this.StripeClient); + StripeList reportRuns = await service + .ListAsync(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/reporting/report_runs", + "limit=3"); + } + + [Fact] + public void TestReportingReportRunsGetAutoPaging() + { + var options = new Stripe.Reporting.ReportRunListOptions + { + Limit = 3, + }; + var service = new Stripe.Reporting.ReportRunService( + this.StripeClient); + var reportRun = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/reporting/report_runs", + "limit=3"); + } + + [Fact] + public async Task TestReportingReportRunsGetAutoPagingAsync() + { + var options = new Stripe.Reporting.ReportRunListOptions + { + Limit = 3, + }; + var service = new Stripe.Reporting.ReportRunService( + this.StripeClient); + var reportRun = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/reporting/report_runs", + "limit=3"); + } + [Fact] public void TestReportingReportRunsGet2() { @@ -3460,6 +8692,18 @@ public void TestReportingReportRunsGet2() "/v1/reporting/report_runs/frr_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestReportingReportRunsGet2Async() + { + var service = new Stripe.Reporting.ReportRunService( + this.StripeClient); + Stripe.Reporting.ReportRun reportRun = await service.GetAsync( + "frr_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/reporting/report_runs/frr_xxxxxxxxxxxxx"); + } + [Fact] public void TestReportingReportRunsPost() { @@ -3481,6 +8725,28 @@ public void TestReportingReportRunsPost() this.AssertRequest(HttpMethod.Post, "/v1/reporting/report_runs"); } + [Fact] + public async Task TestReportingReportRunsPostAsync() + { + var options = new Stripe.Reporting.ReportRunCreateOptions + { + ReportType = "balance.summary.1", + Parameters = new Stripe.Reporting.ReportRunParametersOptions + { + IntervalStart = DateTimeOffset.FromUnixTimeSeconds( + 1522540800) + .UtcDateTime, + IntervalEnd = DateTimeOffset.FromUnixTimeSeconds(1525132800) + .UtcDateTime, + }, + }; + var service = new Stripe.Reporting.ReportRunService( + this.StripeClient); + Stripe.Reporting.ReportRun reportRun = await service.CreateAsync( + options); + this.AssertRequest(HttpMethod.Post, "/v1/reporting/report_runs"); + } + [Fact] public void TestReportingReportTypesGet() { @@ -3491,6 +8757,16 @@ public void TestReportingReportTypesGet() this.AssertRequest(HttpMethod.Get, "/v1/reporting/report_types"); } + [Fact] + public async Task TestReportingReportTypesGetAsync() + { + var service = new Stripe.Reporting.ReportTypeService( + this.StripeClient); + StripeList reportTypes = await service + .ListAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/reporting/report_types"); + } + [Fact] public void TestReportingReportTypesGet2() { @@ -3503,6 +8779,18 @@ public void TestReportingReportTypesGet2() "/v1/reporting/report_types/balance.summary.1"); } + [Fact] + public async Task TestReportingReportTypesGet2Async() + { + var service = new Stripe.Reporting.ReportTypeService( + this.StripeClient); + Stripe.Reporting.ReportType reportType = await service.GetAsync( + "balance.summary.1"); + this.AssertRequest( + HttpMethod.Get, + "/v1/reporting/report_types/balance.summary.1"); + } + [Fact] public void TestReviewsApprovePost() { @@ -3513,6 +8801,16 @@ public void TestReviewsApprovePost() "/v1/reviews/prv_xxxxxxxxxxxxx/approve"); } + [Fact] + public async Task TestReviewsApprovePostAsync() + { + var service = new ReviewService(this.StripeClient); + Review review = await service.ApproveAsync("prv_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/reviews/prv_xxxxxxxxxxxxx/approve"); + } + [Fact] public void TestReviewsGet() { @@ -3522,6 +8820,34 @@ public void TestReviewsGet() this.AssertRequest(HttpMethod.Get, "/v1/reviews", "limit=3"); } + [Fact] + public async Task TestReviewsGetAsync() + { + var options = new ReviewListOptions { Limit = 3 }; + var service = new ReviewService(this.StripeClient); + StripeList reviews = await service.ListAsync(options); + this.AssertRequest(HttpMethod.Get, "/v1/reviews", "limit=3"); + } + + [Fact] + public void TestReviewsGetAutoPaging() + { + var options = new ReviewListOptions { Limit = 3 }; + var service = new ReviewService(this.StripeClient); + var review = service.ListAutoPaging(options).First(); + this.AssertRequest(HttpMethod.Get, "/v1/reviews", "limit=3"); + } + + [Fact] + public async Task TestReviewsGetAutoPagingAsync() + { + var options = new ReviewListOptions { Limit = 3 }; + var service = new ReviewService(this.StripeClient); + var review = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/reviews", "limit=3"); + } + [Fact] public void TestReviewsGet2() { @@ -3530,6 +8856,14 @@ public void TestReviewsGet2() this.AssertRequest(HttpMethod.Get, "/v1/reviews/prv_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestReviewsGet2Async() + { + var service = new ReviewService(this.StripeClient); + Review review = await service.GetAsync("prv_xxxxxxxxxxxxx"); + this.AssertRequest(HttpMethod.Get, "/v1/reviews/prv_xxxxxxxxxxxxx"); + } + [Fact] public void TestSetupAttemptsGet() { @@ -3547,47 +8881,164 @@ public void TestSetupAttemptsGet() } [Fact] - public void TestSetupIntentsCancelPost() - { - var service = new SetupIntentService(this.StripeClient); - SetupIntent setupIntent = service.Cancel("seti_xxxxxxxxxxxxx"); - this.AssertRequest( - HttpMethod.Post, - "/v1/setup_intents/seti_xxxxxxxxxxxxx/cancel"); - } - - [Fact] - public void TestSetupIntentsConfirmPost() + public async Task TestSetupAttemptsGetAsync() { - var options = new SetupIntentConfirmOptions + var options = new SetupAttemptListOptions { - PaymentMethod = "pm_card_visa", + Limit = 3, + SetupIntent = "si_xyz", }; - var service = new SetupIntentService(this.StripeClient); - SetupIntent setupIntent = service.Confirm( - "seti_xxxxxxxxxxxxx", + var service = new SetupAttemptService(this.StripeClient); + StripeList setupAttempts = await service.ListAsync( options); this.AssertRequest( - HttpMethod.Post, - "/v1/setup_intents/seti_xxxxxxxxxxxxx/confirm"); + HttpMethod.Get, + "/v1/setup_attempts", + "limit=3&setup_intent=si_xyz"); } [Fact] - public void TestSetupIntentsGet() + public void TestSetupAttemptsGetAutoPaging() { - var options = new SetupIntentListOptions { Limit = 3 }; - var service = new SetupIntentService(this.StripeClient); - StripeList setupIntents = service.List(options); - this.AssertRequest(HttpMethod.Get, "/v1/setup_intents", "limit=3"); + var options = new SetupAttemptListOptions + { + Limit = 3, + SetupIntent = "si_xyz", + }; + var service = new SetupAttemptService(this.StripeClient); + var setupAttempt = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/setup_attempts", + "limit=3&setup_intent=si_xyz"); } [Fact] - public void TestSetupIntentsGet2() + public async Task TestSetupAttemptsGetAutoPagingAsync() { - var service = new SetupIntentService(this.StripeClient); - SetupIntent setupIntent = service.Get("seti_xxxxxxxxxxxxx"); - this.AssertRequest( - HttpMethod.Get, + var options = new SetupAttemptListOptions + { + Limit = 3, + SetupIntent = "si_xyz", + }; + var service = new SetupAttemptService(this.StripeClient); + var setupAttempt = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/setup_attempts", + "limit=3&setup_intent=si_xyz"); + } + + [Fact] + public void TestSetupIntentsCancelPost() + { + var service = new SetupIntentService(this.StripeClient); + SetupIntent setupIntent = service.Cancel("seti_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/setup_intents/seti_xxxxxxxxxxxxx/cancel"); + } + + [Fact] + public async Task TestSetupIntentsCancelPostAsync() + { + var service = new SetupIntentService(this.StripeClient); + SetupIntent setupIntent = await service.CancelAsync( + "seti_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/setup_intents/seti_xxxxxxxxxxxxx/cancel"); + } + + [Fact] + public void TestSetupIntentsConfirmPost() + { + var options = new SetupIntentConfirmOptions + { + PaymentMethod = "pm_card_visa", + }; + var service = new SetupIntentService(this.StripeClient); + SetupIntent setupIntent = service.Confirm( + "seti_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/setup_intents/seti_xxxxxxxxxxxxx/confirm"); + } + + [Fact] + public async Task TestSetupIntentsConfirmPostAsync() + { + var options = new SetupIntentConfirmOptions + { + PaymentMethod = "pm_card_visa", + }; + var service = new SetupIntentService(this.StripeClient); + SetupIntent setupIntent = await service.ConfirmAsync( + "seti_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/setup_intents/seti_xxxxxxxxxxxxx/confirm"); + } + + [Fact] + public void TestSetupIntentsGet() + { + var options = new SetupIntentListOptions { Limit = 3 }; + var service = new SetupIntentService(this.StripeClient); + StripeList setupIntents = service.List(options); + this.AssertRequest(HttpMethod.Get, "/v1/setup_intents", "limit=3"); + } + + [Fact] + public async Task TestSetupIntentsGetAsync() + { + var options = new SetupIntentListOptions { Limit = 3 }; + var service = new SetupIntentService(this.StripeClient); + StripeList setupIntents = await service.ListAsync( + options); + this.AssertRequest(HttpMethod.Get, "/v1/setup_intents", "limit=3"); + } + + [Fact] + public void TestSetupIntentsGetAutoPaging() + { + var options = new SetupIntentListOptions { Limit = 3 }; + var service = new SetupIntentService(this.StripeClient); + var setupIntent = service.ListAutoPaging(options).First(); + this.AssertRequest(HttpMethod.Get, "/v1/setup_intents", "limit=3"); + } + + [Fact] + public async Task TestSetupIntentsGetAutoPagingAsync() + { + var options = new SetupIntentListOptions { Limit = 3 }; + var service = new SetupIntentService(this.StripeClient); + var setupIntent = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/setup_intents", "limit=3"); + } + + [Fact] + public void TestSetupIntentsGet2() + { + var service = new SetupIntentService(this.StripeClient); + SetupIntent setupIntent = service.Get("seti_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/setup_intents/seti_xxxxxxxxxxxxx"); + } + + [Fact] + public async Task TestSetupIntentsGet2Async() + { + var service = new SetupIntentService(this.StripeClient); + SetupIntent setupIntent = await service.GetAsync( + "seti_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, "/v1/setup_intents/seti_xxxxxxxxxxxxx"); } @@ -3603,6 +9054,18 @@ public void TestSetupIntentsPost() this.AssertRequest(HttpMethod.Post, "/v1/setup_intents"); } + [Fact] + public async Task TestSetupIntentsPostAsync() + { + var options = new SetupIntentCreateOptions + { + PaymentMethodTypes = new List { "card" }, + }; + var service = new SetupIntentService(this.StripeClient); + SetupIntent setupIntent = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/setup_intents"); + } + [Fact] public void TestSetupIntentsPost2() { @@ -3622,6 +9085,25 @@ public void TestSetupIntentsPost2() "/v1/setup_intents/seti_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestSetupIntentsPost2Async() + { + var options = new SetupIntentUpdateOptions + { + Metadata = new Dictionary + { + { "user_id", "3435453" }, + }, + }; + var service = new SetupIntentService(this.StripeClient); + SetupIntent setupIntent = await service.UpdateAsync( + "seti_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/setup_intents/seti_xxxxxxxxxxxxx"); + } + [Fact] public void TestSetupIntentsVerifyMicrodepositsPost() { @@ -3633,6 +9115,17 @@ public void TestSetupIntentsVerifyMicrodepositsPost() "/v1/setup_intents/seti_xxxxxxxxxxxxx/verify_microdeposits"); } + [Fact] + public async Task TestSetupIntentsVerifyMicrodepositsPostAsync() + { + var service = new SetupIntentService(this.StripeClient); + SetupIntent setupIntent = await service.VerifyMicrodepositsAsync( + "seti_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/setup_intents/seti_xxxxxxxxxxxxx/verify_microdeposits"); + } + [Fact] public void TestSetupIntentsVerifyMicrodepositsPost2() { @@ -3649,6 +9142,22 @@ public void TestSetupIntentsVerifyMicrodepositsPost2() "/v1/setup_intents/seti_xxxxxxxxxxxxx/verify_microdeposits"); } + [Fact] + public async Task TestSetupIntentsVerifyMicrodepositsPost2Async() + { + var options = new SetupIntentVerifyMicrodepositsOptions + { + Amounts = new List { 32, 45 }, + }; + var service = new SetupIntentService(this.StripeClient); + SetupIntent setupIntent = await service.VerifyMicrodepositsAsync( + "seti_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/setup_intents/seti_xxxxxxxxxxxxx/verify_microdeposits"); + } + [Fact] public void TestShippingRatesGet() { @@ -3657,6 +9166,30 @@ public void TestShippingRatesGet() this.AssertRequest(HttpMethod.Get, "/v1/shipping_rates"); } + [Fact] + public async Task TestShippingRatesGetAsync() + { + var service = new ShippingRateService(this.StripeClient); + StripeList shippingRates = await service.ListAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/shipping_rates"); + } + + [Fact] + public void TestShippingRatesGetAutoPaging() + { + var service = new ShippingRateService(this.StripeClient); + var shippingRate = service.ListAutoPaging().First(); + this.AssertRequest(HttpMethod.Get, "/v1/shipping_rates"); + } + + [Fact] + public async Task TestShippingRatesGetAutoPagingAsync() + { + var service = new ShippingRateService(this.StripeClient); + var shippingRate = await service.ListAutoPagingAsync().FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/shipping_rates"); + } + [Fact] public void TestShippingRatesGet2() { @@ -3666,6 +9199,35 @@ public void TestShippingRatesGet2() this.AssertRequest(HttpMethod.Get, "/v1/shipping_rates", "limit=3"); } + [Fact] + public async Task TestShippingRatesGet2Async() + { + var options = new ShippingRateListOptions { Limit = 3 }; + var service = new ShippingRateService(this.StripeClient); + StripeList shippingRates = await service.ListAsync( + options); + this.AssertRequest(HttpMethod.Get, "/v1/shipping_rates", "limit=3"); + } + + [Fact] + public void TestShippingRatesGet2AutoPaging() + { + var options = new ShippingRateListOptions { Limit = 3 }; + var service = new ShippingRateService(this.StripeClient); + var shippingRate = service.ListAutoPaging(options).First(); + this.AssertRequest(HttpMethod.Get, "/v1/shipping_rates", "limit=3"); + } + + [Fact] + public async Task TestShippingRatesGet2AutoPagingAsync() + { + var options = new ShippingRateListOptions { Limit = 3 }; + var service = new ShippingRateService(this.StripeClient); + var shippingRate = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/shipping_rates", "limit=3"); + } + [Fact] public void TestShippingRatesGet3() { @@ -3676,6 +9238,17 @@ public void TestShippingRatesGet3() "/v1/shipping_rates/shr_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestShippingRatesGet3Async() + { + var service = new ShippingRateService(this.StripeClient); + ShippingRate shippingRate = await service.GetAsync( + "shr_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/shipping_rates/shr_xxxxxxxxxxxxx"); + } + [Fact] public void TestShippingRatesPost() { @@ -3694,6 +9267,24 @@ public void TestShippingRatesPost() this.AssertRequest(HttpMethod.Post, "/v1/shipping_rates"); } + [Fact] + public async Task TestShippingRatesPostAsync() + { + var options = new ShippingRateCreateOptions + { + DisplayName = "Sample Shipper", + FixedAmount = new ShippingRateFixedAmountOptions + { + Currency = "usd", + Amount = 400, + }, + Type = "fixed_amount", + }; + var service = new ShippingRateService(this.StripeClient); + ShippingRate shippingRate = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/shipping_rates"); + } + [Fact] public void TestShippingRatesPost2() { @@ -3712,6 +9303,24 @@ public void TestShippingRatesPost2() this.AssertRequest(HttpMethod.Post, "/v1/shipping_rates"); } + [Fact] + public async Task TestShippingRatesPost2Async() + { + var options = new ShippingRateCreateOptions + { + DisplayName = "Ground shipping", + Type = "fixed_amount", + FixedAmount = new ShippingRateFixedAmountOptions + { + Amount = 500, + Currency = "usd", + }, + }; + var service = new ShippingRateService(this.StripeClient); + ShippingRate shippingRate = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/shipping_rates"); + } + [Fact] public void TestShippingRatesPost3() { @@ -3731,6 +9340,25 @@ public void TestShippingRatesPost3() "/v1/shipping_rates/shr_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestShippingRatesPost3Async() + { + var options = new ShippingRateUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new ShippingRateService(this.StripeClient); + ShippingRate shippingRate = await service.UpdateAsync( + "shr_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/shipping_rates/shr_xxxxxxxxxxxxx"); + } + [Fact] public void TestSigmaScheduledQueryRunsGet() { @@ -3749,7 +9377,57 @@ public void TestSigmaScheduledQueryRunsGet() } [Fact] - public void TestSigmaScheduledQueryRunsGet2() + public async Task TestSigmaScheduledQueryRunsGetAsync() + { + var options = new Stripe.Sigma.ScheduledQueryRunListOptions + { + Limit = 3, + }; + var service = new Stripe.Sigma.ScheduledQueryRunService( + this.StripeClient); + StripeList scheduledQueryRuns = await service + .ListAsync(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/sigma/scheduled_query_runs", + "limit=3"); + } + + [Fact] + public void TestSigmaScheduledQueryRunsGetAutoPaging() + { + var options = new Stripe.Sigma.ScheduledQueryRunListOptions + { + Limit = 3, + }; + var service = new Stripe.Sigma.ScheduledQueryRunService( + this.StripeClient); + var scheduledQueryRun = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/sigma/scheduled_query_runs", + "limit=3"); + } + + [Fact] + public async Task TestSigmaScheduledQueryRunsGetAutoPagingAsync() + { + var options = new Stripe.Sigma.ScheduledQueryRunListOptions + { + Limit = 3, + }; + var service = new Stripe.Sigma.ScheduledQueryRunService( + this.StripeClient); + var scheduledQueryRun = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/sigma/scheduled_query_runs", + "limit=3"); + } + + [Fact] + public void TestSigmaScheduledQueryRunsGet2() { var service = new Stripe.Sigma.ScheduledQueryRunService( this.StripeClient); @@ -3760,6 +9438,18 @@ public void TestSigmaScheduledQueryRunsGet2() "/v1/sigma/scheduled_query_runs/sqr_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestSigmaScheduledQueryRunsGet2Async() + { + var service = new Stripe.Sigma.ScheduledQueryRunService( + this.StripeClient); + Stripe.Sigma.ScheduledQueryRun scheduledQueryRun = await service + .GetAsync("sqr_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/sigma/scheduled_query_runs/sqr_xxxxxxxxxxxxx"); + } + [Fact] public void TestSourcesGet() { @@ -3768,6 +9458,14 @@ public void TestSourcesGet() this.AssertRequest(HttpMethod.Get, "/v1/sources/src_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestSourcesGetAsync() + { + var service = new SourceService(this.StripeClient); + Source source = await service.GetAsync("src_xxxxxxxxxxxxx"); + this.AssertRequest(HttpMethod.Get, "/v1/sources/src_xxxxxxxxxxxxx"); + } + [Fact] public void TestSourcesGet2() { @@ -3776,6 +9474,14 @@ public void TestSourcesGet2() this.AssertRequest(HttpMethod.Get, "/v1/sources/src_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestSourcesGet2Async() + { + var service = new SourceService(this.StripeClient); + Source source = await service.GetAsync("src_xxxxxxxxxxxxx"); + this.AssertRequest(HttpMethod.Get, "/v1/sources/src_xxxxxxxxxxxxx"); + } + [Fact] public void TestSourcesPost() { @@ -3793,6 +9499,25 @@ public void TestSourcesPost() "/v1/sources/src_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestSourcesPostAsync() + { + var options = new SourceUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new SourceService(this.StripeClient); + Source source = await service.UpdateAsync( + "src_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/sources/src_xxxxxxxxxxxxx"); + } + [Fact] public void TestSubscriptionItemsDelete() { @@ -3803,6 +9528,17 @@ public void TestSubscriptionItemsDelete() "/v1/subscription_items/si_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestSubscriptionItemsDeleteAsync() + { + var service = new SubscriptionItemService(this.StripeClient); + SubscriptionItem deleted = await service.DeleteAsync( + "si_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Delete, + "/v1/subscription_items/si_xxxxxxxxxxxxx"); + } + [Fact] public void TestSubscriptionItemsGet() { @@ -3819,6 +9555,53 @@ public void TestSubscriptionItemsGet() "subscription=sub_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestSubscriptionItemsGetAsync() + { + var options = new SubscriptionItemListOptions + { + Subscription = "sub_xxxxxxxxxxxxx", + }; + var service = new SubscriptionItemService(this.StripeClient); + StripeList subscriptionItems = await service + .ListAsync(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/subscription_items", + "subscription=sub_xxxxxxxxxxxxx"); + } + + [Fact] + public void TestSubscriptionItemsGetAutoPaging() + { + var options = new SubscriptionItemListOptions + { + Subscription = "sub_xxxxxxxxxxxxx", + }; + var service = new SubscriptionItemService(this.StripeClient); + var subscriptionItem = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/subscription_items", + "subscription=sub_xxxxxxxxxxxxx"); + } + + [Fact] + public async Task TestSubscriptionItemsGetAutoPagingAsync() + { + var options = new SubscriptionItemListOptions + { + Subscription = "sub_xxxxxxxxxxxxx", + }; + var service = new SubscriptionItemService(this.StripeClient); + var subscriptionItem = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/subscription_items", + "subscription=sub_xxxxxxxxxxxxx"); + } + [Fact] public void TestSubscriptionItemsGet2() { @@ -3829,6 +9612,17 @@ public void TestSubscriptionItemsGet2() "/v1/subscription_items/si_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestSubscriptionItemsGet2Async() + { + var service = new SubscriptionItemService(this.StripeClient); + SubscriptionItem subscriptionItem = await service.GetAsync( + "si_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/subscription_items/si_xxxxxxxxxxxxx"); + } + [Fact] public void TestSubscriptionItemsPost() { @@ -3843,6 +9637,21 @@ public void TestSubscriptionItemsPost() this.AssertRequest(HttpMethod.Post, "/v1/subscription_items"); } + [Fact] + public async Task TestSubscriptionItemsPostAsync() + { + var options = new SubscriptionItemCreateOptions + { + Subscription = "sub_xxxxxxxxxxxxx", + Price = "price_xxxxxxxxxxxxx", + Quantity = 2, + }; + var service = new SubscriptionItemService(this.StripeClient); + SubscriptionItem subscriptionItem = await service.CreateAsync( + options); + this.AssertRequest(HttpMethod.Post, "/v1/subscription_items"); + } + [Fact] public void TestSubscriptionItemsPost2() { @@ -3862,6 +9671,25 @@ public void TestSubscriptionItemsPost2() "/v1/subscription_items/si_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestSubscriptionItemsPost2Async() + { + var options = new SubscriptionItemUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new SubscriptionItemService(this.StripeClient); + SubscriptionItem subscriptionItem = await service.UpdateAsync( + "si_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/subscription_items/si_xxxxxxxxxxxxx"); + } + [Fact] public void TestSubscriptionSchedulesCancelPost() { @@ -3873,6 +9701,17 @@ public void TestSubscriptionSchedulesCancelPost() "/v1/subscription_schedules/sub_sched_xxxxxxxxxxxxx/cancel"); } + [Fact] + public async Task TestSubscriptionSchedulesCancelPostAsync() + { + var service = new SubscriptionScheduleService(this.StripeClient); + SubscriptionSchedule subscriptionSchedule = await service + .CancelAsync("sub_sched_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/subscription_schedules/sub_sched_xxxxxxxxxxxxx/cancel"); + } + [Fact] public void TestSubscriptionSchedulesGet() { @@ -3886,6 +9725,45 @@ public void TestSubscriptionSchedulesGet() "limit=3"); } + [Fact] + public async Task TestSubscriptionSchedulesGetAsync() + { + var options = new SubscriptionScheduleListOptions { Limit = 3 }; + var service = new SubscriptionScheduleService(this.StripeClient); + StripeList subscriptionSchedules = await service + .ListAsync(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/subscription_schedules", + "limit=3"); + } + + [Fact] + public void TestSubscriptionSchedulesGetAutoPaging() + { + var options = new SubscriptionScheduleListOptions { Limit = 3 }; + var service = new SubscriptionScheduleService(this.StripeClient); + var subscriptionSchedule = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/subscription_schedules", + "limit=3"); + } + + [Fact] + public async Task TestSubscriptionSchedulesGetAutoPagingAsync() + { + var options = new SubscriptionScheduleListOptions { Limit = 3 }; + var service = new SubscriptionScheduleService(this.StripeClient); + var subscriptionSchedule = await service.ListAutoPagingAsync( + options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/subscription_schedules", + "limit=3"); + } + [Fact] public void TestSubscriptionSchedulesGet2() { @@ -3897,6 +9775,17 @@ public void TestSubscriptionSchedulesGet2() "/v1/subscription_schedules/sub_sched_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestSubscriptionSchedulesGet2Async() + { + var service = new SubscriptionScheduleService(this.StripeClient); + SubscriptionSchedule subscriptionSchedule = await service.GetAsync( + "sub_sched_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/subscription_schedules/sub_sched_xxxxxxxxxxxxx"); + } + [Fact] public void TestSubscriptionSchedulesPost() { @@ -3926,6 +9815,36 @@ public void TestSubscriptionSchedulesPost() this.AssertRequest(HttpMethod.Post, "/v1/subscription_schedules"); } + [Fact] + public async Task TestSubscriptionSchedulesPostAsync() + { + var options = new SubscriptionScheduleCreateOptions + { + Customer = "cus_xxxxxxxxxxxxx", + StartDate = DateTimeOffset.FromUnixTimeSeconds(1676070661) + .UtcDateTime, + EndBehavior = "release", + Phases = new List + { + new SubscriptionSchedulePhaseOptions + { + Items = new List + { + new SubscriptionSchedulePhaseItemOptions + { + Price = "price_xxxxxxxxxxxxx", + Quantity = 1, + }, + }, + }, + }, + }; + var service = new SubscriptionScheduleService(this.StripeClient); + SubscriptionSchedule subscriptionSchedule = await service + .CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/subscription_schedules"); + } + [Fact] public void TestSubscriptionSchedulesPost2() { @@ -3942,6 +9861,21 @@ public void TestSubscriptionSchedulesPost2() "/v1/subscription_schedules/sub_sched_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestSubscriptionSchedulesPost2Async() + { + var options = new SubscriptionScheduleUpdateOptions + { + EndBehavior = "release", + }; + var service = new SubscriptionScheduleService(this.StripeClient); + SubscriptionSchedule subscriptionSchedule = await service + .UpdateAsync("sub_sched_xxxxxxxxxxxxx", options); + this.AssertRequest( + HttpMethod.Post, + "/v1/subscription_schedules/sub_sched_xxxxxxxxxxxxx"); + } + [Fact] public void TestSubscriptionSchedulesReleasePost() { @@ -3954,12 +9888,34 @@ public void TestSubscriptionSchedulesReleasePost() } [Fact] - public void TestSubscriptionsDelete() + public async Task TestSubscriptionSchedulesReleasePostAsync() { - var service = new SubscriptionService(this.StripeClient); - Subscription subscription = service.Cancel("sub_xxxxxxxxxxxxx"); + var service = new SubscriptionScheduleService(this.StripeClient); + SubscriptionSchedule subscriptionSchedule = await service + .ReleaseAsync("sub_sched_xxxxxxxxxxxxx"); this.AssertRequest( - HttpMethod.Delete, + HttpMethod.Post, + "/v1/subscription_schedules/sub_sched_xxxxxxxxxxxxx/release"); + } + + [Fact] + public void TestSubscriptionsDelete() + { + var service = new SubscriptionService(this.StripeClient); + Subscription subscription = service.Cancel("sub_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Delete, + "/v1/subscriptions/sub_xxxxxxxxxxxxx"); + } + + [Fact] + public async Task TestSubscriptionsDeleteAsync() + { + var service = new SubscriptionService(this.StripeClient); + Subscription subscription = await service.CancelAsync( + "sub_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Delete, "/v1/subscriptions/sub_xxxxxxxxxxxxx"); } @@ -3973,6 +9929,16 @@ public void TestSubscriptionsDiscountDelete() "/v1/subscriptions/sub_xyz/discount"); } + [Fact] + public async Task TestSubscriptionsDiscountDeleteAsync() + { + var service = new SubscriptionService(this.StripeClient); + Discount discount = await service.DeleteDiscountAsync("sub_xyz"); + this.AssertRequest( + HttpMethod.Delete, + "/v1/subscriptions/sub_xyz/discount"); + } + [Fact] public void TestSubscriptionsGet() { @@ -3982,6 +9948,35 @@ public void TestSubscriptionsGet() this.AssertRequest(HttpMethod.Get, "/v1/subscriptions", "limit=3"); } + [Fact] + public async Task TestSubscriptionsGetAsync() + { + var options = new SubscriptionListOptions { Limit = 3 }; + var service = new SubscriptionService(this.StripeClient); + StripeList subscriptions = await service.ListAsync( + options); + this.AssertRequest(HttpMethod.Get, "/v1/subscriptions", "limit=3"); + } + + [Fact] + public void TestSubscriptionsGetAutoPaging() + { + var options = new SubscriptionListOptions { Limit = 3 }; + var service = new SubscriptionService(this.StripeClient); + var subscription = service.ListAutoPaging(options).First(); + this.AssertRequest(HttpMethod.Get, "/v1/subscriptions", "limit=3"); + } + + [Fact] + public async Task TestSubscriptionsGetAutoPagingAsync() + { + var options = new SubscriptionListOptions { Limit = 3 }; + var service = new SubscriptionService(this.StripeClient); + var subscription = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/subscriptions", "limit=3"); + } + [Fact] public void TestSubscriptionsGet2() { @@ -3992,6 +9987,17 @@ public void TestSubscriptionsGet2() "/v1/subscriptions/sub_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestSubscriptionsGet2Async() + { + var service = new SubscriptionService(this.StripeClient); + Subscription subscription = await service.GetAsync( + "sub_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/subscriptions/sub_xxxxxxxxxxxxx"); + } + [Fact] public void TestSubscriptionsPost() { @@ -4011,6 +10017,25 @@ public void TestSubscriptionsPost() this.AssertRequest(HttpMethod.Post, "/v1/subscriptions"); } + [Fact] + public async Task TestSubscriptionsPostAsync() + { + var options = new SubscriptionCreateOptions + { + Customer = "cus_xxxxxxxxxxxxx", + Items = new List + { + new SubscriptionItemOptions + { + Price = "price_xxxxxxxxxxxxx", + }, + }, + }; + var service = new SubscriptionService(this.StripeClient); + Subscription subscription = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/subscriptions"); + } + [Fact] public void TestSubscriptionsPost2() { @@ -4030,6 +10055,25 @@ public void TestSubscriptionsPost2() "/v1/subscriptions/sub_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestSubscriptionsPost2Async() + { + var options = new SubscriptionUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new SubscriptionService(this.StripeClient); + Subscription subscription = await service.UpdateAsync( + "sub_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/subscriptions/sub_xxxxxxxxxxxxx"); + } + [Fact] public void TestSubscriptionsSearchGet() { @@ -4046,6 +10090,53 @@ public void TestSubscriptionsSearchGet() "query=status%3A%27active%27%20AND%20metadata%5B%27order_id%27%5D%3A%276735%27"); } + [Fact] + public async Task TestSubscriptionsSearchGetAsync() + { + var options = new SubscriptionSearchOptions + { + Query = "status:'active' AND metadata['order_id']:'6735'", + }; + var service = new SubscriptionService(this.StripeClient); + StripeSearchResult subscriptions = await service + .SearchAsync(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/subscriptions/search", + "query=status%3A%27active%27%20AND%20metadata%5B%27order_id%27%5D%3A%276735%27"); + } + + [Fact] + public void TestSubscriptionsSearchGetAutoPaging() + { + var options = new SubscriptionSearchOptions + { + Query = "status:'active' AND metadata['order_id']:'6735'", + }; + var service = new SubscriptionService(this.StripeClient); + var subscription = service.SearchAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/subscriptions/search", + "query=status%3A%27active%27%20AND%20metadata%5B%27order_id%27%5D%3A%276735%27"); + } + + [Fact] + public async Task TestSubscriptionsSearchGetAutoPagingAsync() + { + var options = new SubscriptionSearchOptions + { + Query = "status:'active' AND metadata['order_id']:'6735'", + }; + var service = new SubscriptionService(this.StripeClient); + var subscription = await service.SearchAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/subscriptions/search", + "query=status%3A%27active%27%20AND%20metadata%5B%27order_id%27%5D%3A%276735%27"); + } + [Fact] public void TestTaxCalculationsLineItemsGet() { @@ -4058,6 +10149,41 @@ public void TestTaxCalculationsLineItemsGet() "/v1/tax/calculations/xxx/line_items"); } + [Fact] + public async Task TestTaxCalculationsLineItemsGetAsync() + { + var service = new Stripe.Tax.CalculationLineItemService( + this.StripeClient); + StripeList calculationLineItems = await service + .ListAsync("xxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/tax/calculations/xxx/line_items"); + } + + [Fact] + public void TestTaxCalculationsLineItemsGetAutoPaging() + { + var service = new Stripe.Tax.CalculationLineItemService( + this.StripeClient); + var calculationLineItem = service.ListAutoPaging("xxx").First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/tax/calculations/xxx/line_items"); + } + + [Fact] + public async Task TestTaxCalculationsLineItemsGetAutoPagingAsync() + { + var service = new Stripe.Tax.CalculationLineItemService( + this.StripeClient); + var calculationLineItem = await service.ListAutoPagingAsync("xxx") + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/tax/calculations/xxx/line_items"); + } + [Fact] public void TestTaxCalculationsPost() { @@ -4090,6 +10216,39 @@ public void TestTaxCalculationsPost() this.AssertRequest(HttpMethod.Post, "/v1/tax/calculations"); } + [Fact] + public async Task TestTaxCalculationsPostAsync() + { + var options = new Stripe.Tax.CalculationCreateOptions + { + Currency = "usd", + LineItems = new List + { + new Stripe.Tax.CalculationLineItemOptions + { + Amount = 1000, + Reference = "L1", + }, + }, + CustomerDetails = new Stripe.Tax.CalculationCustomerDetailsOptions + { + Address = new AddressOptions + { + Line1 = "354 Oyster Point Blvd", + City = "South San Francisco", + State = "CA", + PostalCode = "94080", + Country = "US", + }, + AddressSource = "shipping", + }, + }; + var service = new Stripe.Tax.CalculationService(this.StripeClient); + Stripe.Tax.Calculation calculation = await service.CreateAsync( + options); + this.AssertRequest(HttpMethod.Post, "/v1/tax/calculations"); + } + [Fact] public void TestTaxCodesGet() { @@ -4099,6 +10258,34 @@ public void TestTaxCodesGet() this.AssertRequest(HttpMethod.Get, "/v1/tax_codes", "limit=3"); } + [Fact] + public async Task TestTaxCodesGetAsync() + { + var options = new TaxCodeListOptions { Limit = 3 }; + var service = new TaxCodeService(this.StripeClient); + StripeList taxCodes = await service.ListAsync(options); + this.AssertRequest(HttpMethod.Get, "/v1/tax_codes", "limit=3"); + } + + [Fact] + public void TestTaxCodesGetAutoPaging() + { + var options = new TaxCodeListOptions { Limit = 3 }; + var service = new TaxCodeService(this.StripeClient); + var taxCode = service.ListAutoPaging(options).First(); + this.AssertRequest(HttpMethod.Get, "/v1/tax_codes", "limit=3"); + } + + [Fact] + public async Task TestTaxCodesGetAutoPagingAsync() + { + var options = new TaxCodeListOptions { Limit = 3 }; + var service = new TaxCodeService(this.StripeClient); + var taxCode = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/tax_codes", "limit=3"); + } + [Fact] public void TestTaxCodesGet2() { @@ -4109,6 +10296,16 @@ public void TestTaxCodesGet2() "/v1/tax_codes/txcd_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestTaxCodesGet2Async() + { + var service = new TaxCodeService(this.StripeClient); + TaxCode taxCode = await service.GetAsync("txcd_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/tax_codes/txcd_xxxxxxxxxxxxx"); + } + [Fact] public void TestTaxIdsDelete() { @@ -4117,6 +10314,14 @@ public void TestTaxIdsDelete() this.AssertRequest(HttpMethod.Delete, "/v1/tax_ids/taxid_123"); } + [Fact] + public async Task TestTaxIdsDeleteAsync() + { + var service = new TaxIdService(this.StripeClient); + TaxId deleted = await service.DeleteAsync("taxid_123"); + this.AssertRequest(HttpMethod.Delete, "/v1/tax_ids/taxid_123"); + } + [Fact] public void TestTaxIdsGet() { @@ -4125,6 +10330,30 @@ public void TestTaxIdsGet() this.AssertRequest(HttpMethod.Get, "/v1/tax_ids"); } + [Fact] + public async Task TestTaxIdsGetAsync() + { + var service = new TaxIdService(this.StripeClient); + StripeList taxIds = await service.ListAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/tax_ids"); + } + + [Fact] + public void TestTaxIdsGetAutoPaging() + { + var service = new TaxIdService(this.StripeClient); + var taxId = service.ListAutoPaging().First(); + this.AssertRequest(HttpMethod.Get, "/v1/tax_ids"); + } + + [Fact] + public async Task TestTaxIdsGetAutoPagingAsync() + { + var service = new TaxIdService(this.StripeClient); + var taxId = await service.ListAutoPagingAsync().FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/tax_ids"); + } + [Fact] public void TestTaxIdsGet2() { @@ -4133,6 +10362,14 @@ public void TestTaxIdsGet2() this.AssertRequest(HttpMethod.Get, "/v1/tax_ids/taxid_123"); } + [Fact] + public async Task TestTaxIdsGet2Async() + { + var service = new TaxIdService(this.StripeClient); + TaxId taxId = await service.GetAsync("taxid_123"); + this.AssertRequest(HttpMethod.Get, "/v1/tax_ids/taxid_123"); + } + [Fact] public void TestTaxIdsPost() { @@ -4147,16 +10384,57 @@ public void TestTaxIdsPost() } [Fact] - public void TestTaxRatesGet() + public async Task TestTaxIdsPostAsync() { - var options = new TaxRateListOptions { Limit = 3 }; - var service = new TaxRateService(this.StripeClient); - StripeList taxRates = service.List(options); - this.AssertRequest(HttpMethod.Get, "/v1/tax_rates", "limit=3"); - } - - [Fact] - public void TestTaxRatesGet2() + var options = new TaxIdCreateOptions + { + Type = "eu_vat", + Value = "123", + }; + var service = new TaxIdService(this.StripeClient); + TaxId taxId = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/tax_ids"); + } + + [Fact] + public void TestTaxRatesGet() + { + var options = new TaxRateListOptions { Limit = 3 }; + var service = new TaxRateService(this.StripeClient); + StripeList taxRates = service.List(options); + this.AssertRequest(HttpMethod.Get, "/v1/tax_rates", "limit=3"); + } + + [Fact] + public async Task TestTaxRatesGetAsync() + { + var options = new TaxRateListOptions { Limit = 3 }; + var service = new TaxRateService(this.StripeClient); + StripeList taxRates = await service.ListAsync(options); + this.AssertRequest(HttpMethod.Get, "/v1/tax_rates", "limit=3"); + } + + [Fact] + public void TestTaxRatesGetAutoPaging() + { + var options = new TaxRateListOptions { Limit = 3 }; + var service = new TaxRateService(this.StripeClient); + var taxRate = service.ListAutoPaging(options).First(); + this.AssertRequest(HttpMethod.Get, "/v1/tax_rates", "limit=3"); + } + + [Fact] + public async Task TestTaxRatesGetAutoPagingAsync() + { + var options = new TaxRateListOptions { Limit = 3 }; + var service = new TaxRateService(this.StripeClient); + var taxRate = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/tax_rates", "limit=3"); + } + + [Fact] + public void TestTaxRatesGet2() { var service = new TaxRateService(this.StripeClient); TaxRate taxRate = service.Get("txr_xxxxxxxxxxxxx"); @@ -4165,6 +10443,16 @@ public void TestTaxRatesGet2() "/v1/tax_rates/txr_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestTaxRatesGet2Async() + { + var service = new TaxRateService(this.StripeClient); + TaxRate taxRate = await service.GetAsync("txr_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/tax_rates/txr_xxxxxxxxxxxxx"); + } + [Fact] public void TestTaxRatesPost() { @@ -4181,6 +10469,22 @@ public void TestTaxRatesPost() this.AssertRequest(HttpMethod.Post, "/v1/tax_rates"); } + [Fact] + public async Task TestTaxRatesPostAsync() + { + var options = new TaxRateCreateOptions + { + DisplayName = "VAT", + Description = "VAT Germany", + Jurisdiction = "DE", + Percentage = 16M, + Inclusive = false, + }; + var service = new TaxRateService(this.StripeClient); + TaxRate taxRate = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/tax_rates"); + } + [Fact] public void TestTaxRatesPost2() { @@ -4192,6 +10496,19 @@ public void TestTaxRatesPost2() "/v1/tax_rates/txr_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestTaxRatesPost2Async() + { + var options = new TaxRateUpdateOptions { Active = false }; + var service = new TaxRateService(this.StripeClient); + TaxRate taxRate = await service.UpdateAsync( + "txr_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/tax_rates/txr_xxxxxxxxxxxxx"); + } + [Fact] public void TestTaxRegistrationsGet() { @@ -4208,6 +10525,53 @@ public void TestTaxRegistrationsGet() "status=all"); } + [Fact] + public async Task TestTaxRegistrationsGetAsync() + { + var options = new Stripe.Tax.RegistrationListOptions + { + Status = "all", + }; + var service = new Stripe.Tax.RegistrationService(this.StripeClient); + StripeList registrations = await service + .ListAsync(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/tax/registrations", + "status=all"); + } + + [Fact] + public void TestTaxRegistrationsGetAutoPaging() + { + var options = new Stripe.Tax.RegistrationListOptions + { + Status = "all", + }; + var service = new Stripe.Tax.RegistrationService(this.StripeClient); + var registration = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/tax/registrations", + "status=all"); + } + + [Fact] + public async Task TestTaxRegistrationsGetAutoPagingAsync() + { + var options = new Stripe.Tax.RegistrationListOptions + { + Status = "all", + }; + var service = new Stripe.Tax.RegistrationService(this.StripeClient); + var registration = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/tax/registrations", + "status=all"); + } + [Fact] public void TestTaxRegistrationsPost() { @@ -4228,6 +10592,27 @@ public void TestTaxRegistrationsPost() this.AssertRequest(HttpMethod.Post, "/v1/tax/registrations"); } + [Fact] + public async Task TestTaxRegistrationsPostAsync() + { + var options = new Stripe.Tax.RegistrationCreateOptions + { + Country = "IE", + CountryOptions = new Stripe.Tax.RegistrationCountryOptionsOptions + { + Ie = new Stripe.Tax.RegistrationCountryOptionsIeOptions + { + Type = "oss_union", + }, + }, + ActiveFrom = Stripe.Tax.RegistrationActiveFrom.Now, + }; + var service = new Stripe.Tax.RegistrationService(this.StripeClient); + Stripe.Tax.Registration registration = await service.CreateAsync( + options); + this.AssertRequest(HttpMethod.Post, "/v1/tax/registrations"); + } + [Fact] public void TestTaxRegistrationsPost2() { @@ -4244,6 +10629,22 @@ public void TestTaxRegistrationsPost2() "/v1/tax/registrations/taxreg_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestTaxRegistrationsPost2Async() + { + var options = new Stripe.Tax.RegistrationUpdateOptions + { + ExpiresAt = Stripe.Tax.RegistrationExpiresAt.Now, + }; + var service = new Stripe.Tax.RegistrationService(this.StripeClient); + Stripe.Tax.Registration registration = await service.UpdateAsync( + "taxreg_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/tax/registrations/taxreg_xxxxxxxxxxxxx"); + } + [Fact] public void TestTaxSettingsGet() { @@ -4253,6 +10654,15 @@ public void TestTaxSettingsGet() this.AssertRequest(HttpMethod.Get, "/v1/tax/settings"); } + [Fact] + public async Task TestTaxSettingsGetAsync() + { + var options = new Stripe.Tax.SettingsGetOptions(); + var service = new Stripe.Tax.SettingsService(this.StripeClient); + Stripe.Tax.Settings settings = await service.GetAsync(options); + this.AssertRequest(HttpMethod.Get, "/v1/tax/settings"); + } + [Fact] public void TestTaxSettingsPost() { @@ -4268,6 +10678,21 @@ public void TestTaxSettingsPost() this.AssertRequest(HttpMethod.Post, "/v1/tax/settings"); } + [Fact] + public async Task TestTaxSettingsPostAsync() + { + var options = new Stripe.Tax.SettingsUpdateOptions + { + Defaults = new Stripe.Tax.SettingsDefaultsOptions + { + TaxCode = "txcd_10000000", + }, + }; + var service = new Stripe.Tax.SettingsService(this.StripeClient); + Stripe.Tax.Settings settings = await service.UpdateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/tax/settings"); + } + [Fact] public void TestTaxTransactionsCreateFromCalculationPost() { @@ -4284,6 +10709,22 @@ public void TestTaxTransactionsCreateFromCalculationPost() "/v1/tax/transactions/create_from_calculation"); } + [Fact] + public async Task TestTaxTransactionsCreateFromCalculationPostAsync() + { + var options = new Stripe.Tax.TransactionCreateFromCalculationOptions + { + Calculation = "xxx", + Reference = "yyy", + }; + var service = new Stripe.Tax.TransactionService(this.StripeClient); + Stripe.Tax.Transaction transaction = await service + .CreateFromCalculationAsync(options); + this.AssertRequest( + HttpMethod.Post, + "/v1/tax/transactions/create_from_calculation"); + } + [Fact] public void TestTerminalConfigurationsDelete() { @@ -4295,6 +10736,18 @@ public void TestTerminalConfigurationsDelete() "/v1/terminal/configurations/uc_123"); } + [Fact] + public async Task TestTerminalConfigurationsDeleteAsync() + { + var service = new Stripe.Terminal.ConfigurationService( + this.StripeClient); + Stripe.Terminal.Configuration deleted = await service.DeleteAsync( + "uc_123"); + this.AssertRequest( + HttpMethod.Delete, + "/v1/terminal/configurations/uc_123"); + } + [Fact] public void TestTerminalConfigurationsDelete2() { @@ -4307,6 +10760,18 @@ public void TestTerminalConfigurationsDelete2() "/v1/terminal/configurations/tmc_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestTerminalConfigurationsDelete2Async() + { + var service = new Stripe.Terminal.ConfigurationService( + this.StripeClient); + Stripe.Terminal.Configuration deleted = await service.DeleteAsync( + "tmc_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Delete, + "/v1/terminal/configurations/tmc_xxxxxxxxxxxxx"); + } + [Fact] public void TestTerminalConfigurationsGet() { @@ -4317,6 +10782,35 @@ public void TestTerminalConfigurationsGet() this.AssertRequest(HttpMethod.Get, "/v1/terminal/configurations"); } + [Fact] + public async Task TestTerminalConfigurationsGetAsync() + { + var service = new Stripe.Terminal.ConfigurationService( + this.StripeClient); + StripeList configurations = await service + .ListAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/terminal/configurations"); + } + + [Fact] + public void TestTerminalConfigurationsGetAutoPaging() + { + var service = new Stripe.Terminal.ConfigurationService( + this.StripeClient); + var configuration = service.ListAutoPaging().First(); + this.AssertRequest(HttpMethod.Get, "/v1/terminal/configurations"); + } + + [Fact] + public async Task TestTerminalConfigurationsGetAutoPagingAsync() + { + var service = new Stripe.Terminal.ConfigurationService( + this.StripeClient); + var configuration = await service.ListAutoPagingAsync() + .FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/terminal/configurations"); + } + [Fact] public void TestTerminalConfigurationsGet2() { @@ -4328,6 +10822,18 @@ public void TestTerminalConfigurationsGet2() "/v1/terminal/configurations/uc_123"); } + [Fact] + public async Task TestTerminalConfigurationsGet2Async() + { + var service = new Stripe.Terminal.ConfigurationService( + this.StripeClient); + Stripe.Terminal.Configuration configuration = await service + .GetAsync("uc_123"); + this.AssertRequest( + HttpMethod.Get, + "/v1/terminal/configurations/uc_123"); + } + [Fact] public void TestTerminalConfigurationsGet3() { @@ -4346,36 +10852,109 @@ public void TestTerminalConfigurationsGet3() } [Fact] - public void TestTerminalConfigurationsGet4() + public async Task TestTerminalConfigurationsGet3Async() { + var options = new Stripe.Terminal.ConfigurationListOptions + { + Limit = 3, + }; var service = new Stripe.Terminal.ConfigurationService( this.StripeClient); - Stripe.Terminal.Configuration configuration = service.Get( - "tmc_xxxxxxxxxxxxx"); + StripeList configurations = await service + .ListAsync(options); this.AssertRequest( HttpMethod.Get, - "/v1/terminal/configurations/tmc_xxxxxxxxxxxxx"); + "/v1/terminal/configurations", + "limit=3"); } [Fact] - public void TestTerminalConfigurationsPost() + public void TestTerminalConfigurationsGet3AutoPaging() { - var options = new Stripe.Terminal.ConfigurationCreateOptions(); + var options = new Stripe.Terminal.ConfigurationListOptions + { + Limit = 3, + }; var service = new Stripe.Terminal.ConfigurationService( this.StripeClient); - Stripe.Terminal.Configuration configuration = service.Create( - options); - this.AssertRequest(HttpMethod.Post, "/v1/terminal/configurations"); + var configuration = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/terminal/configurations", + "limit=3"); } [Fact] - public void TestTerminalConfigurationsPost2() + public async Task TestTerminalConfigurationsGet3AutoPagingAsync() { - var options = new Stripe.Terminal.ConfigurationUpdateOptions + var options = new Stripe.Terminal.ConfigurationListOptions { - Tipping = new Stripe.Terminal.ConfigurationTippingOptions - { - Usd = new Stripe.Terminal.ConfigurationTippingUsdOptions + Limit = 3, + }; + var service = new Stripe.Terminal.ConfigurationService( + this.StripeClient); + var configuration = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/terminal/configurations", + "limit=3"); + } + + [Fact] + public void TestTerminalConfigurationsGet4() + { + var service = new Stripe.Terminal.ConfigurationService( + this.StripeClient); + Stripe.Terminal.Configuration configuration = service.Get( + "tmc_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/terminal/configurations/tmc_xxxxxxxxxxxxx"); + } + + [Fact] + public async Task TestTerminalConfigurationsGet4Async() + { + var service = new Stripe.Terminal.ConfigurationService( + this.StripeClient); + Stripe.Terminal.Configuration configuration = await service + .GetAsync("tmc_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/terminal/configurations/tmc_xxxxxxxxxxxxx"); + } + + [Fact] + public void TestTerminalConfigurationsPost() + { + var options = new Stripe.Terminal.ConfigurationCreateOptions(); + var service = new Stripe.Terminal.ConfigurationService( + this.StripeClient); + Stripe.Terminal.Configuration configuration = service.Create( + options); + this.AssertRequest(HttpMethod.Post, "/v1/terminal/configurations"); + } + + [Fact] + public async Task TestTerminalConfigurationsPostAsync() + { + var options = new Stripe.Terminal.ConfigurationCreateOptions(); + var service = new Stripe.Terminal.ConfigurationService( + this.StripeClient); + Stripe.Terminal.Configuration configuration = await service + .CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/terminal/configurations"); + } + + [Fact] + public void TestTerminalConfigurationsPost2() + { + var options = new Stripe.Terminal.ConfigurationUpdateOptions + { + Tipping = new Stripe.Terminal.ConfigurationTippingOptions + { + Usd = new Stripe.Terminal.ConfigurationTippingUsdOptions { FixedAmounts = new List { 10 }, }, @@ -4391,6 +10970,28 @@ public void TestTerminalConfigurationsPost2() "/v1/terminal/configurations/uc_123"); } + [Fact] + public async Task TestTerminalConfigurationsPost2Async() + { + var options = new Stripe.Terminal.ConfigurationUpdateOptions + { + Tipping = new Stripe.Terminal.ConfigurationTippingOptions + { + Usd = new Stripe.Terminal.ConfigurationTippingUsdOptions + { + FixedAmounts = new List { 10 }, + }, + }, + }; + var service = new Stripe.Terminal.ConfigurationService( + this.StripeClient); + Stripe.Terminal.Configuration configuration = await service + .UpdateAsync("uc_123", options); + this.AssertRequest( + HttpMethod.Post, + "/v1/terminal/configurations/uc_123"); + } + [Fact] public void TestTerminalConfigurationsPost3() { @@ -4408,6 +11009,23 @@ public void TestTerminalConfigurationsPost3() this.AssertRequest(HttpMethod.Post, "/v1/terminal/configurations"); } + [Fact] + public async Task TestTerminalConfigurationsPost3Async() + { + var options = new Stripe.Terminal.ConfigurationCreateOptions + { + BbposWiseposE = new Stripe.Terminal.ConfigurationBbposWiseposEOptions + { + Splashscreen = "file_xxxxxxxxxxxxx", + }, + }; + var service = new Stripe.Terminal.ConfigurationService( + this.StripeClient); + Stripe.Terminal.Configuration configuration = await service + .CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/terminal/configurations"); + } + [Fact] public void TestTerminalConfigurationsPost4() { @@ -4428,6 +11046,25 @@ public void TestTerminalConfigurationsPost4() "/v1/terminal/configurations/tmc_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestTerminalConfigurationsPost4Async() + { + var options = new Stripe.Terminal.ConfigurationUpdateOptions + { + BbposWiseposE = new Stripe.Terminal.ConfigurationBbposWiseposEOptions + { + Splashscreen = "file_xxxxxxxxxxxxx", + }, + }; + var service = new Stripe.Terminal.ConfigurationService( + this.StripeClient); + Stripe.Terminal.Configuration configuration = await service + .UpdateAsync("tmc_xxxxxxxxxxxxx", options); + this.AssertRequest( + HttpMethod.Post, + "/v1/terminal/configurations/tmc_xxxxxxxxxxxxx"); + } + [Fact] public void TestTerminalConnectionTokensPost() { @@ -4441,6 +11078,19 @@ public void TestTerminalConnectionTokensPost() "/v1/terminal/connection_tokens"); } + [Fact] + public async Task TestTerminalConnectionTokensPostAsync() + { + var options = new Stripe.Terminal.ConnectionTokenCreateOptions(); + var service = new Stripe.Terminal.ConnectionTokenService( + this.StripeClient); + Stripe.Terminal.ConnectionToken connectionToken = await service + .CreateAsync(options); + this.AssertRequest( + HttpMethod.Post, + "/v1/terminal/connection_tokens"); + } + [Fact] public void TestTerminalLocationsDelete() { @@ -4453,6 +11103,18 @@ public void TestTerminalLocationsDelete() "/v1/terminal/locations/tml_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestTerminalLocationsDeleteAsync() + { + var service = new Stripe.Terminal.LocationService( + this.StripeClient); + Stripe.Terminal.Location deleted = await service.DeleteAsync( + "tml_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Delete, + "/v1/terminal/locations/tml_xxxxxxxxxxxxx"); + } + [Fact] public void TestTerminalLocationsGet() { @@ -4467,6 +11129,47 @@ public void TestTerminalLocationsGet() "limit=3"); } + [Fact] + public async Task TestTerminalLocationsGetAsync() + { + var options = new Stripe.Terminal.LocationListOptions { Limit = 3 }; + var service = new Stripe.Terminal.LocationService( + this.StripeClient); + StripeList locations = await service + .ListAsync(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/terminal/locations", + "limit=3"); + } + + [Fact] + public void TestTerminalLocationsGetAutoPaging() + { + var options = new Stripe.Terminal.LocationListOptions { Limit = 3 }; + var service = new Stripe.Terminal.LocationService( + this.StripeClient); + var location = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/terminal/locations", + "limit=3"); + } + + [Fact] + public async Task TestTerminalLocationsGetAutoPagingAsync() + { + var options = new Stripe.Terminal.LocationListOptions { Limit = 3 }; + var service = new Stripe.Terminal.LocationService( + this.StripeClient); + var location = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/terminal/locations", + "limit=3"); + } + [Fact] public void TestTerminalLocationsGet2() { @@ -4479,6 +11182,18 @@ public void TestTerminalLocationsGet2() "/v1/terminal/locations/tml_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestTerminalLocationsGet2Async() + { + var service = new Stripe.Terminal.LocationService( + this.StripeClient); + Stripe.Terminal.Location location = await service.GetAsync( + "tml_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/terminal/locations/tml_xxxxxxxxxxxxx"); + } + [Fact] public void TestTerminalLocationsPost() { @@ -4500,6 +11215,28 @@ public void TestTerminalLocationsPost() this.AssertRequest(HttpMethod.Post, "/v1/terminal/locations"); } + [Fact] + public async Task TestTerminalLocationsPostAsync() + { + var options = new Stripe.Terminal.LocationCreateOptions + { + DisplayName = "My First Store", + Address = new AddressOptions + { + Line1 = "1234 Main Street", + City = "San Francisco", + PostalCode = "94111", + State = "CA", + Country = "US", + }, + }; + var service = new Stripe.Terminal.LocationService( + this.StripeClient); + Stripe.Terminal.Location location = await service.CreateAsync( + options); + this.AssertRequest(HttpMethod.Post, "/v1/terminal/locations"); + } + [Fact] public void TestTerminalLocationsPost2() { @@ -4517,6 +11254,23 @@ public void TestTerminalLocationsPost2() "/v1/terminal/locations/tml_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestTerminalLocationsPost2Async() + { + var options = new Stripe.Terminal.LocationUpdateOptions + { + DisplayName = "My First Store", + }; + var service = new Stripe.Terminal.LocationService( + this.StripeClient); + Stripe.Terminal.Location location = await service.UpdateAsync( + "tml_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/terminal/locations/tml_xxxxxxxxxxxxx"); + } + [Fact] public void TestTerminalReadersCancelActionPost() { @@ -4528,6 +11282,17 @@ public void TestTerminalReadersCancelActionPost() "/v1/terminal/readers/tmr_xxxxxxxxxxxxx/cancel_action"); } + [Fact] + public async Task TestTerminalReadersCancelActionPostAsync() + { + var service = new Stripe.Terminal.ReaderService(this.StripeClient); + Stripe.Terminal.Reader reader = await service.CancelActionAsync( + "tmr_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/terminal/readers/tmr_xxxxxxxxxxxxx/cancel_action"); + } + [Fact] public void TestTerminalReadersDelete() { @@ -4539,6 +11304,17 @@ public void TestTerminalReadersDelete() "/v1/terminal/readers/tmr_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestTerminalReadersDeleteAsync() + { + var service = new Stripe.Terminal.ReaderService(this.StripeClient); + Stripe.Terminal.Reader deleted = await service.DeleteAsync( + "tmr_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Delete, + "/v1/terminal/readers/tmr_xxxxxxxxxxxxx"); + } + [Fact] public void TestTerminalReadersGet() { @@ -4552,45 +11328,124 @@ public void TestTerminalReadersGet() } [Fact] - public void TestTerminalReadersGet2() + public async Task TestTerminalReadersGetAsync() { + var options = new Stripe.Terminal.ReaderListOptions { Limit = 3 }; var service = new Stripe.Terminal.ReaderService(this.StripeClient); - Stripe.Terminal.Reader reader = service.Get("tmr_xxxxxxxxxxxxx"); + StripeList readers = await service + .ListAsync(options); this.AssertRequest( HttpMethod.Get, - "/v1/terminal/readers/tmr_xxxxxxxxxxxxx"); + "/v1/terminal/readers", + "limit=3"); } [Fact] - public void TestTerminalReadersPost() + public void TestTerminalReadersGetAutoPaging() { - var options = new Stripe.Terminal.ReaderCreateOptions - { - RegistrationCode = "puppies-plug-could", - Label = "Blue Rabbit", - Location = "tml_1234", - }; + var options = new Stripe.Terminal.ReaderListOptions { Limit = 3 }; var service = new Stripe.Terminal.ReaderService(this.StripeClient); - Stripe.Terminal.Reader reader = service.Create(options); - this.AssertRequest(HttpMethod.Post, "/v1/terminal/readers"); + var reader = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/terminal/readers", + "limit=3"); } [Fact] - public void TestTerminalReadersPost2() + public async Task TestTerminalReadersGetAutoPagingAsync() { - var options = new Stripe.Terminal.ReaderUpdateOptions - { - Label = "Blue Rabbit", - }; + var options = new Stripe.Terminal.ReaderListOptions { Limit = 3 }; var service = new Stripe.Terminal.ReaderService(this.StripeClient); - Stripe.Terminal.Reader reader = service.Update( - "tmr_xxxxxxxxxxxxx", - options); + var reader = await service.ListAutoPagingAsync(options) + .FirstAsync(); this.AssertRequest( - HttpMethod.Post, - "/v1/terminal/readers/tmr_xxxxxxxxxxxxx"); - } - + HttpMethod.Get, + "/v1/terminal/readers", + "limit=3"); + } + + [Fact] + public void TestTerminalReadersGet2() + { + var service = new Stripe.Terminal.ReaderService(this.StripeClient); + Stripe.Terminal.Reader reader = service.Get("tmr_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/terminal/readers/tmr_xxxxxxxxxxxxx"); + } + + [Fact] + public async Task TestTerminalReadersGet2Async() + { + var service = new Stripe.Terminal.ReaderService(this.StripeClient); + Stripe.Terminal.Reader reader = await service.GetAsync( + "tmr_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/terminal/readers/tmr_xxxxxxxxxxxxx"); + } + + [Fact] + public void TestTerminalReadersPost() + { + var options = new Stripe.Terminal.ReaderCreateOptions + { + RegistrationCode = "puppies-plug-could", + Label = "Blue Rabbit", + Location = "tml_1234", + }; + var service = new Stripe.Terminal.ReaderService(this.StripeClient); + Stripe.Terminal.Reader reader = service.Create(options); + this.AssertRequest(HttpMethod.Post, "/v1/terminal/readers"); + } + + [Fact] + public async Task TestTerminalReadersPostAsync() + { + var options = new Stripe.Terminal.ReaderCreateOptions + { + RegistrationCode = "puppies-plug-could", + Label = "Blue Rabbit", + Location = "tml_1234", + }; + var service = new Stripe.Terminal.ReaderService(this.StripeClient); + Stripe.Terminal.Reader reader = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/terminal/readers"); + } + + [Fact] + public void TestTerminalReadersPost2() + { + var options = new Stripe.Terminal.ReaderUpdateOptions + { + Label = "Blue Rabbit", + }; + var service = new Stripe.Terminal.ReaderService(this.StripeClient); + Stripe.Terminal.Reader reader = service.Update( + "tmr_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/terminal/readers/tmr_xxxxxxxxxxxxx"); + } + + [Fact] + public async Task TestTerminalReadersPost2Async() + { + var options = new Stripe.Terminal.ReaderUpdateOptions + { + Label = "Blue Rabbit", + }; + var service = new Stripe.Terminal.ReaderService(this.StripeClient); + Stripe.Terminal.Reader reader = await service.UpdateAsync( + "tmr_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/terminal/readers/tmr_xxxxxxxxxxxxx"); + } + [Fact] public void TestTerminalReadersProcessPaymentIntentPost() { @@ -4607,6 +11462,21 @@ public void TestTerminalReadersProcessPaymentIntentPost() "/v1/terminal/readers/tmr_xxxxxxxxxxxxx/process_payment_intent"); } + [Fact] + public async Task TestTerminalReadersProcessPaymentIntentPostAsync() + { + var options = new Stripe.Terminal.ReaderProcessPaymentIntentOptions + { + PaymentIntent = "pi_xxxxxxxxxxxxx", + }; + var service = new Stripe.Terminal.ReaderService(this.StripeClient); + Stripe.Terminal.Reader reader = await service + .ProcessPaymentIntentAsync("tmr_xxxxxxxxxxxxx", options); + this.AssertRequest( + HttpMethod.Post, + "/v1/terminal/readers/tmr_xxxxxxxxxxxxx/process_payment_intent"); + } + [Fact] public void TestTerminalReadersProcessSetupIntentPost() { @@ -4624,6 +11494,22 @@ public void TestTerminalReadersProcessSetupIntentPost() "/v1/terminal/readers/tmr_xxxxxxxxxxxxx/process_setup_intent"); } + [Fact] + public async Task TestTerminalReadersProcessSetupIntentPostAsync() + { + var options = new Stripe.Terminal.ReaderProcessSetupIntentOptions + { + SetupIntent = "seti_xxxxxxxxxxxxx", + AllowRedisplay = "always", + }; + var service = new Stripe.Terminal.ReaderService(this.StripeClient); + Stripe.Terminal.Reader reader = await service + .ProcessSetupIntentAsync("tmr_xxxxxxxxxxxxx", options); + this.AssertRequest( + HttpMethod.Post, + "/v1/terminal/readers/tmr_xxxxxxxxxxxxx/process_setup_intent"); + } + [Fact] public void TestTestHelpersCustomersFundCashBalancePost() { @@ -4641,6 +11527,23 @@ public void TestTestHelpersCustomersFundCashBalancePost() "/v1/test_helpers/customers/cus_123/fund_cash_balance"); } + [Fact] + public async Task TestTestHelpersCustomersFundCashBalancePostAsync() + { + var options = new Stripe.TestHelpers.CustomerFundCashBalanceOptions + { + Amount = 30, + Currency = "eur", + }; + var service = new Stripe.TestHelpers.CustomerService( + this.StripeClient); + CustomerCashBalanceTransaction customerCashBalanceTransaction = await service + .FundCashBalanceAsync("cus_123", options); + this.AssertRequest( + HttpMethod.Post, + "/v1/test_helpers/customers/cus_123/fund_cash_balance"); + } + [Fact] public void TestTestHelpersIssuingAuthorizationsCapturePost() { @@ -4708,6 +11611,72 @@ public void TestTestHelpersIssuingAuthorizationsCapturePost() "/v1/test_helpers/issuing/authorizations/example_authorization/capture"); } + [Fact] + public async Task TestTestHelpersIssuingAuthorizationsCapturePostAsync() + { + var options = new Stripe.TestHelpers.Issuing.AuthorizationCaptureOptions + { + CaptureAmount = 100, + CloseAuthorization = true, + PurchaseDetails = new Stripe.TestHelpers.Issuing.AuthorizationPurchaseDetailsOptions + { + Flight = new Stripe.TestHelpers.Issuing.AuthorizationPurchaseDetailsFlightOptions + { + DepartureAt = DateTimeOffset.FromUnixTimeSeconds( + 1633651200) + .UtcDateTime, + PassengerName = "John Doe", + Refundable = true, + Segments = new List + { + new Stripe.TestHelpers.Issuing.AuthorizationPurchaseDetailsFlightSegmentOptions + { + ArrivalAirportCode = "SFO", + Carrier = "Delta", + DepartureAirportCode = "LAX", + FlightNumber = "DL100", + ServiceClass = "Economy", + StopoverAllowed = true, + }, + }, + TravelAgency = "Orbitz", + }, + Fuel = new Stripe.TestHelpers.Issuing.AuthorizationPurchaseDetailsFuelOptions + { + Type = "diesel", + Unit = "liter", + UnitCostDecimal = 3.5M, + QuantityDecimal = 10M, + }, + Lodging = new Stripe.TestHelpers.Issuing.AuthorizationPurchaseDetailsLodgingOptions + { + CheckInAt = DateTimeOffset.FromUnixTimeSeconds( + 1633651200) + .UtcDateTime, + Nights = 2, + }, + Receipt = new List + { + new Stripe.TestHelpers.Issuing.AuthorizationPurchaseDetailsReceiptOptions + { + Description = "Room charge", + Quantity = 1M, + Total = 200, + UnitCost = 200, + }, + }, + Reference = "foo", + }, + }; + var service = new Stripe.TestHelpers.Issuing.AuthorizationService( + this.StripeClient); + Stripe.Issuing.Authorization authorization = await service + .CaptureAsync("example_authorization", options); + this.AssertRequest( + HttpMethod.Post, + "/v1/test_helpers/issuing/authorizations/example_authorization/capture"); + } + [Fact] public void TestTestHelpersIssuingAuthorizationsExpirePost() { @@ -4720,6 +11689,18 @@ public void TestTestHelpersIssuingAuthorizationsExpirePost() "/v1/test_helpers/issuing/authorizations/example_authorization/expire"); } + [Fact] + public async Task TestTestHelpersIssuingAuthorizationsExpirePostAsync() + { + var service = new Stripe.TestHelpers.Issuing.AuthorizationService( + this.StripeClient); + Stripe.Issuing.Authorization authorization = await service + .ExpireAsync("example_authorization"); + this.AssertRequest( + HttpMethod.Post, + "/v1/test_helpers/issuing/authorizations/example_authorization/expire"); + } + [Fact] public void TestTestHelpersIssuingAuthorizationsIncrementPost() { @@ -4738,6 +11719,23 @@ public void TestTestHelpersIssuingAuthorizationsIncrementPost() "/v1/test_helpers/issuing/authorizations/example_authorization/increment"); } + [Fact] + public async Task TestTestHelpersIssuingAuthorizationsIncrementPostAsync() + { + var options = new Stripe.TestHelpers.Issuing.AuthorizationIncrementOptions + { + IncrementAmount = 50, + IsAmountControllable = true, + }; + var service = new Stripe.TestHelpers.Issuing.AuthorizationService( + this.StripeClient); + Stripe.Issuing.Authorization authorization = await service + .IncrementAsync("example_authorization", options); + this.AssertRequest( + HttpMethod.Post, + "/v1/test_helpers/issuing/authorizations/example_authorization/increment"); + } + [Fact] public void TestTestHelpersIssuingAuthorizationsPost() { @@ -4786,6 +11784,54 @@ public void TestTestHelpersIssuingAuthorizationsPost() "/v1/test_helpers/issuing/authorizations"); } + [Fact] + public async Task TestTestHelpersIssuingAuthorizationsPostAsync() + { + var options = new Stripe.TestHelpers.Issuing.AuthorizationCreateOptions + { + Amount = 100, + AmountDetails = new Stripe.TestHelpers.Issuing.AuthorizationAmountDetailsOptions + { + AtmFee = 10, + CashbackAmount = 5, + }, + AuthorizationMethod = "chip", + Card = "foo", + Currency = "usd", + IsAmountControllable = true, + MerchantData = new Stripe.TestHelpers.Issuing.AuthorizationMerchantDataOptions + { + Category = "ac_refrigeration_repair", + City = "foo", + Country = "bar", + Name = "foo", + NetworkId = "bar", + PostalCode = "foo", + State = "bar", + TerminalId = "foo", + }, + NetworkData = new Stripe.TestHelpers.Issuing.AuthorizationNetworkDataOptions + { + AcquiringInstitutionId = "foo", + }, + VerificationData = new Stripe.TestHelpers.Issuing.AuthorizationVerificationDataOptions + { + AddressLine1Check = "mismatch", + AddressPostalCodeCheck = "match", + CvcCheck = "match", + ExpiryCheck = "mismatch", + }, + Wallet = "apple_pay", + }; + var service = new Stripe.TestHelpers.Issuing.AuthorizationService( + this.StripeClient); + Stripe.Issuing.Authorization authorization = await service + .CreateAsync(options); + this.AssertRequest( + HttpMethod.Post, + "/v1/test_helpers/issuing/authorizations"); + } + [Fact] public void TestTestHelpersIssuingAuthorizationsReversePost() { @@ -4804,13 +11850,41 @@ public void TestTestHelpersIssuingAuthorizationsReversePost() } [Fact] - public void TestTestHelpersIssuingCardsShippingDeliverPost() + public async Task TestTestHelpersIssuingAuthorizationsReversePostAsync() { - var service = new Stripe.TestHelpers.Issuing.CardService( - this.StripeClient); - Stripe.Issuing.Card card = service.DeliverCard("card_123"); - this.AssertRequest( - HttpMethod.Post, + var options = new Stripe.TestHelpers.Issuing.AuthorizationReverseOptions + { + ReverseAmount = 20, + }; + var service = new Stripe.TestHelpers.Issuing.AuthorizationService( + this.StripeClient); + Stripe.Issuing.Authorization authorization = await service + .ReverseAsync("example_authorization", options); + this.AssertRequest( + HttpMethod.Post, + "/v1/test_helpers/issuing/authorizations/example_authorization/reverse"); + } + + [Fact] + public void TestTestHelpersIssuingCardsShippingDeliverPost() + { + var service = new Stripe.TestHelpers.Issuing.CardService( + this.StripeClient); + Stripe.Issuing.Card card = service.DeliverCard("card_123"); + this.AssertRequest( + HttpMethod.Post, + "/v1/test_helpers/issuing/cards/card_123/shipping/deliver"); + } + + [Fact] + public async Task TestTestHelpersIssuingCardsShippingDeliverPostAsync() + { + var service = new Stripe.TestHelpers.Issuing.CardService( + this.StripeClient); + Stripe.Issuing.Card card = await service.DeliverCardAsync( + "card_123"); + this.AssertRequest( + HttpMethod.Post, "/v1/test_helpers/issuing/cards/card_123/shipping/deliver"); } @@ -4825,6 +11899,17 @@ public void TestTestHelpersIssuingCardsShippingFailPost() "/v1/test_helpers/issuing/cards/card_123/shipping/fail"); } + [Fact] + public async Task TestTestHelpersIssuingCardsShippingFailPostAsync() + { + var service = new Stripe.TestHelpers.Issuing.CardService( + this.StripeClient); + Stripe.Issuing.Card card = await service.FailCardAsync("card_123"); + this.AssertRequest( + HttpMethod.Post, + "/v1/test_helpers/issuing/cards/card_123/shipping/fail"); + } + [Fact] public void TestTestHelpersIssuingCardsShippingReturnPost() { @@ -4836,6 +11921,18 @@ public void TestTestHelpersIssuingCardsShippingReturnPost() "/v1/test_helpers/issuing/cards/card_123/shipping/return"); } + [Fact] + public async Task TestTestHelpersIssuingCardsShippingReturnPostAsync() + { + var service = new Stripe.TestHelpers.Issuing.CardService( + this.StripeClient); + Stripe.Issuing.Card card = await service.ReturnCardAsync( + "card_123"); + this.AssertRequest( + HttpMethod.Post, + "/v1/test_helpers/issuing/cards/card_123/shipping/return"); + } + [Fact] public void TestTestHelpersIssuingCardsShippingShipPost() { @@ -4847,6 +11944,17 @@ public void TestTestHelpersIssuingCardsShippingShipPost() "/v1/test_helpers/issuing/cards/card_123/shipping/ship"); } + [Fact] + public async Task TestTestHelpersIssuingCardsShippingShipPostAsync() + { + var service = new Stripe.TestHelpers.Issuing.CardService( + this.StripeClient); + Stripe.Issuing.Card card = await service.ShipCardAsync("card_123"); + this.AssertRequest( + HttpMethod.Post, + "/v1/test_helpers/issuing/cards/card_123/shipping/ship"); + } + [Fact] public void TestTestHelpersIssuingPersonalizationDesignsActivatePost() { @@ -4859,6 +11967,18 @@ public void TestTestHelpersIssuingPersonalizationDesignsActivatePost() "/v1/test_helpers/issuing/personalization_designs/pd_xyz/activate"); } + [Fact] + public async Task TestTestHelpersIssuingPersonalizationDesignsActivatePostAsync() + { + var service = new Stripe.TestHelpers.Issuing.PersonalizationDesignService( + this.StripeClient); + Stripe.Issuing.PersonalizationDesign personalizationDesign = await service + .ActivateAsync("pd_xyz"); + this.AssertRequest( + HttpMethod.Post, + "/v1/test_helpers/issuing/personalization_designs/pd_xyz/activate"); + } + [Fact] public void TestTestHelpersIssuingPersonalizationDesignsDeactivatePost() { @@ -4871,6 +11991,18 @@ public void TestTestHelpersIssuingPersonalizationDesignsDeactivatePost() "/v1/test_helpers/issuing/personalization_designs/pd_xyz/deactivate"); } + [Fact] + public async Task TestTestHelpersIssuingPersonalizationDesignsDeactivatePostAsync() + { + var service = new Stripe.TestHelpers.Issuing.PersonalizationDesignService( + this.StripeClient); + Stripe.Issuing.PersonalizationDesign personalizationDesign = await service + .DeactivateAsync("pd_xyz"); + this.AssertRequest( + HttpMethod.Post, + "/v1/test_helpers/issuing/personalization_designs/pd_xyz/deactivate"); + } + [Fact] public void TestTestHelpersIssuingPersonalizationDesignsRejectPost() { @@ -4890,6 +12022,25 @@ public void TestTestHelpersIssuingPersonalizationDesignsRejectPost() "/v1/test_helpers/issuing/personalization_designs/pd_xyz/reject"); } + [Fact] + public async Task TestTestHelpersIssuingPersonalizationDesignsRejectPostAsync() + { + var options = new Stripe.TestHelpers.Issuing.PersonalizationDesignRejectOptions + { + RejectionReasons = new Stripe.TestHelpers.Issuing.PersonalizationDesignRejectionReasonsOptions + { + CardLogo = new List { "geographic_location" }, + }, + }; + var service = new Stripe.TestHelpers.Issuing.PersonalizationDesignService( + this.StripeClient); + Stripe.Issuing.PersonalizationDesign personalizationDesign = await service + .RejectAsync("pd_xyz", options); + this.AssertRequest( + HttpMethod.Post, + "/v1/test_helpers/issuing/personalization_designs/pd_xyz/reject"); + } + [Fact] public void TestTestHelpersIssuingTransactionsCreateForceCapturePost() { @@ -4968,6 +12119,84 @@ public void TestTestHelpersIssuingTransactionsCreateForceCapturePost() "/v1/test_helpers/issuing/transactions/create_force_capture"); } + [Fact] + public async Task TestTestHelpersIssuingTransactionsCreateForceCapturePostAsync() + { + var options = new Stripe.TestHelpers.Issuing.TransactionCreateForceCaptureOptions + { + Amount = 100, + Card = "foo", + Currency = "usd", + MerchantData = new Stripe.TestHelpers.Issuing.TransactionMerchantDataOptions + { + Category = "ac_refrigeration_repair", + City = "foo", + Country = "US", + Name = "foo", + NetworkId = "bar", + PostalCode = "10001", + State = "NY", + TerminalId = "foo", + }, + PurchaseDetails = new Stripe.TestHelpers.Issuing.TransactionPurchaseDetailsOptions + { + Flight = new Stripe.TestHelpers.Issuing.TransactionPurchaseDetailsFlightOptions + { + DepartureAt = DateTimeOffset.FromUnixTimeSeconds( + 1633651200) + .UtcDateTime, + PassengerName = "John Doe", + Refundable = true, + Segments = new List + { + new Stripe.TestHelpers.Issuing.TransactionPurchaseDetailsFlightSegmentOptions + { + ArrivalAirportCode = "SFO", + Carrier = "Delta", + DepartureAirportCode = "LAX", + FlightNumber = "DL100", + ServiceClass = "Economy", + StopoverAllowed = true, + }, + }, + TravelAgency = "Orbitz", + }, + Fuel = new Stripe.TestHelpers.Issuing.TransactionPurchaseDetailsFuelOptions + { + Type = "diesel", + Unit = "liter", + UnitCostDecimal = 3.5M, + QuantityDecimal = 10M, + }, + Lodging = new Stripe.TestHelpers.Issuing.TransactionPurchaseDetailsLodgingOptions + { + CheckInAt = DateTimeOffset.FromUnixTimeSeconds( + 1533651200) + .UtcDateTime, + Nights = 2, + }, + Receipt = new List + { + new Stripe.TestHelpers.Issuing.TransactionPurchaseDetailsReceiptOptions + { + Description = "Room charge", + Quantity = 1M, + Total = 200, + UnitCost = 200, + }, + }, + Reference = "foo", + }, + }; + var service = new Stripe.TestHelpers.Issuing.TransactionService( + this.StripeClient); + Stripe.Issuing.Transaction transaction = await service + .CreateForceCaptureAsync(options); + this.AssertRequest( + HttpMethod.Post, + "/v1/test_helpers/issuing/transactions/create_force_capture"); + } + [Fact] public void TestTestHelpersIssuingTransactionsCreateUnlinkedRefundPost() { @@ -5046,6 +12275,84 @@ public void TestTestHelpersIssuingTransactionsCreateUnlinkedRefundPost() "/v1/test_helpers/issuing/transactions/create_unlinked_refund"); } + [Fact] + public async Task TestTestHelpersIssuingTransactionsCreateUnlinkedRefundPostAsync() + { + var options = new Stripe.TestHelpers.Issuing.TransactionCreateUnlinkedRefundOptions + { + Amount = 100, + Card = "foo", + Currency = "usd", + MerchantData = new Stripe.TestHelpers.Issuing.TransactionMerchantDataOptions + { + Category = "ac_refrigeration_repair", + City = "foo", + Country = "bar", + Name = "foo", + NetworkId = "bar", + PostalCode = "foo", + State = "bar", + TerminalId = "foo", + }, + PurchaseDetails = new Stripe.TestHelpers.Issuing.TransactionPurchaseDetailsOptions + { + Flight = new Stripe.TestHelpers.Issuing.TransactionPurchaseDetailsFlightOptions + { + DepartureAt = DateTimeOffset.FromUnixTimeSeconds( + 1533651200) + .UtcDateTime, + PassengerName = "John Doe", + Refundable = true, + Segments = new List + { + new Stripe.TestHelpers.Issuing.TransactionPurchaseDetailsFlightSegmentOptions + { + ArrivalAirportCode = "SFO", + Carrier = "Delta", + DepartureAirportCode = "LAX", + FlightNumber = "DL100", + ServiceClass = "Economy", + StopoverAllowed = true, + }, + }, + TravelAgency = "Orbitz", + }, + Fuel = new Stripe.TestHelpers.Issuing.TransactionPurchaseDetailsFuelOptions + { + Type = "diesel", + Unit = "liter", + UnitCostDecimal = 3.5M, + QuantityDecimal = 10M, + }, + Lodging = new Stripe.TestHelpers.Issuing.TransactionPurchaseDetailsLodgingOptions + { + CheckInAt = DateTimeOffset.FromUnixTimeSeconds( + 1533651200) + .UtcDateTime, + Nights = 2, + }, + Receipt = new List + { + new Stripe.TestHelpers.Issuing.TransactionPurchaseDetailsReceiptOptions + { + Description = "Room charge", + Quantity = 1M, + Total = 200, + UnitCost = 200, + }, + }, + Reference = "foo", + }, + }; + var service = new Stripe.TestHelpers.Issuing.TransactionService( + this.StripeClient); + Stripe.Issuing.Transaction transaction = await service + .CreateUnlinkedRefundAsync(options); + this.AssertRequest( + HttpMethod.Post, + "/v1/test_helpers/issuing/transactions/create_unlinked_refund"); + } + [Fact] public void TestTestHelpersIssuingTransactionsRefundPost() { @@ -5063,6 +12370,23 @@ public void TestTestHelpersIssuingTransactionsRefundPost() "/v1/test_helpers/issuing/transactions/example_transaction/refund"); } + [Fact] + public async Task TestTestHelpersIssuingTransactionsRefundPostAsync() + { + var options = new Stripe.TestHelpers.Issuing.TransactionRefundOptions + { + RefundAmount = 50, + }; + var service = new Stripe.TestHelpers.Issuing.TransactionService( + this.StripeClient); + Stripe.Issuing.Transaction transaction = await service.RefundAsync( + "example_transaction", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/test_helpers/issuing/transactions/example_transaction/refund"); + } + [Fact] public void TestTestHelpersRefundsExpirePost() { @@ -5075,9 +12399,20 @@ public void TestTestHelpersRefundsExpirePost() } [Fact] - public void TestTestHelpersTestClocksAdvancePost() + public async Task TestTestHelpersRefundsExpirePostAsync() { - var options = new Stripe.TestHelpers.TestClockAdvanceOptions + var service = new Stripe.TestHelpers.RefundService( + this.StripeClient); + Refund refund = await service.ExpireAsync("re_123"); + this.AssertRequest( + HttpMethod.Post, + "/v1/test_helpers/refunds/re_123/expire"); + } + + [Fact] + public void TestTestHelpersTestClocksAdvancePost() + { + var options = new Stripe.TestHelpers.TestClockAdvanceOptions { FrozenTime = DateTimeOffset.FromUnixTimeSeconds(142) .UtcDateTime, @@ -5092,6 +12427,24 @@ public void TestTestHelpersTestClocksAdvancePost() "/v1/test_helpers/test_clocks/clock_xyz/advance"); } + [Fact] + public async Task TestTestHelpersTestClocksAdvancePostAsync() + { + var options = new Stripe.TestHelpers.TestClockAdvanceOptions + { + FrozenTime = DateTimeOffset.FromUnixTimeSeconds(142) + .UtcDateTime, + }; + var service = new Stripe.TestHelpers.TestClockService( + this.StripeClient); + Stripe.TestHelpers.TestClock testClock = await service.AdvanceAsync( + "clock_xyz", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/test_helpers/test_clocks/clock_xyz/advance"); + } + [Fact] public void TestTestHelpersTestClocksAdvancePost2() { @@ -5110,6 +12463,24 @@ public void TestTestHelpersTestClocksAdvancePost2() "/v1/test_helpers/test_clocks/clock_xxxxxxxxxxxxx/advance"); } + [Fact] + public async Task TestTestHelpersTestClocksAdvancePost2Async() + { + var options = new Stripe.TestHelpers.TestClockAdvanceOptions + { + FrozenTime = DateTimeOffset.FromUnixTimeSeconds(1675552261) + .UtcDateTime, + }; + var service = new Stripe.TestHelpers.TestClockService( + this.StripeClient); + Stripe.TestHelpers.TestClock testClock = await service.AdvanceAsync( + "clock_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/test_helpers/test_clocks/clock_xxxxxxxxxxxxx/advance"); + } + [Fact] public void TestTestHelpersTestClocksDelete() { @@ -5121,6 +12492,18 @@ public void TestTestHelpersTestClocksDelete() "/v1/test_helpers/test_clocks/clock_xyz"); } + [Fact] + public async Task TestTestHelpersTestClocksDeleteAsync() + { + var service = new Stripe.TestHelpers.TestClockService( + this.StripeClient); + Stripe.TestHelpers.TestClock deleted = await service.DeleteAsync( + "clock_xyz"); + this.AssertRequest( + HttpMethod.Delete, + "/v1/test_helpers/test_clocks/clock_xyz"); + } + [Fact] public void TestTestHelpersTestClocksDelete2() { @@ -5133,6 +12516,18 @@ public void TestTestHelpersTestClocksDelete2() "/v1/test_helpers/test_clocks/clock_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestTestHelpersTestClocksDelete2Async() + { + var service = new Stripe.TestHelpers.TestClockService( + this.StripeClient); + Stripe.TestHelpers.TestClock deleted = await service.DeleteAsync( + "clock_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Delete, + "/v1/test_helpers/test_clocks/clock_xxxxxxxxxxxxx"); + } + [Fact] public void TestTestHelpersTestClocksGet() { @@ -5143,6 +12538,34 @@ public void TestTestHelpersTestClocksGet() this.AssertRequest(HttpMethod.Get, "/v1/test_helpers/test_clocks"); } + [Fact] + public async Task TestTestHelpersTestClocksGetAsync() + { + var service = new Stripe.TestHelpers.TestClockService( + this.StripeClient); + StripeList testClocks = await service + .ListAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/test_helpers/test_clocks"); + } + + [Fact] + public void TestTestHelpersTestClocksGetAutoPaging() + { + var service = new Stripe.TestHelpers.TestClockService( + this.StripeClient); + var testClock = service.ListAutoPaging().First(); + this.AssertRequest(HttpMethod.Get, "/v1/test_helpers/test_clocks"); + } + + [Fact] + public async Task TestTestHelpersTestClocksGetAutoPagingAsync() + { + var service = new Stripe.TestHelpers.TestClockService( + this.StripeClient); + var testClock = await service.ListAutoPagingAsync().FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/test_helpers/test_clocks"); + } + [Fact] public void TestTestHelpersTestClocksGet2() { @@ -5154,6 +12577,18 @@ public void TestTestHelpersTestClocksGet2() "/v1/test_helpers/test_clocks/clock_xyz"); } + [Fact] + public async Task TestTestHelpersTestClocksGet2Async() + { + var service = new Stripe.TestHelpers.TestClockService( + this.StripeClient); + Stripe.TestHelpers.TestClock testClock = await service.GetAsync( + "clock_xyz"); + this.AssertRequest( + HttpMethod.Get, + "/v1/test_helpers/test_clocks/clock_xyz"); + } + [Fact] public void TestTestHelpersTestClocksGet3() { @@ -5171,6 +12606,56 @@ public void TestTestHelpersTestClocksGet3() "limit=3"); } + [Fact] + public async Task TestTestHelpersTestClocksGet3Async() + { + var options = new Stripe.TestHelpers.TestClockListOptions + { + Limit = 3, + }; + var service = new Stripe.TestHelpers.TestClockService( + this.StripeClient); + StripeList testClocks = await service + .ListAsync(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/test_helpers/test_clocks", + "limit=3"); + } + + [Fact] + public void TestTestHelpersTestClocksGet3AutoPaging() + { + var options = new Stripe.TestHelpers.TestClockListOptions + { + Limit = 3, + }; + var service = new Stripe.TestHelpers.TestClockService( + this.StripeClient); + var testClock = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/test_helpers/test_clocks", + "limit=3"); + } + + [Fact] + public async Task TestTestHelpersTestClocksGet3AutoPagingAsync() + { + var options = new Stripe.TestHelpers.TestClockListOptions + { + Limit = 3, + }; + var service = new Stripe.TestHelpers.TestClockService( + this.StripeClient); + var testClock = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/test_helpers/test_clocks", + "limit=3"); + } + [Fact] public void TestTestHelpersTestClocksGet4() { @@ -5183,6 +12668,18 @@ public void TestTestHelpersTestClocksGet4() "/v1/test_helpers/test_clocks/clock_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestTestHelpersTestClocksGet4Async() + { + var service = new Stripe.TestHelpers.TestClockService( + this.StripeClient); + Stripe.TestHelpers.TestClock testClock = await service.GetAsync( + "clock_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/test_helpers/test_clocks/clock_xxxxxxxxxxxxx"); + } + [Fact] public void TestTestHelpersTestClocksPost() { @@ -5198,6 +12695,22 @@ public void TestTestHelpersTestClocksPost() this.AssertRequest(HttpMethod.Post, "/v1/test_helpers/test_clocks"); } + [Fact] + public async Task TestTestHelpersTestClocksPostAsync() + { + var options = new Stripe.TestHelpers.TestClockCreateOptions + { + FrozenTime = DateTimeOffset.FromUnixTimeSeconds(123) + .UtcDateTime, + Name = "cogsworth", + }; + var service = new Stripe.TestHelpers.TestClockService( + this.StripeClient); + Stripe.TestHelpers.TestClock testClock = await service.CreateAsync( + options); + this.AssertRequest(HttpMethod.Post, "/v1/test_helpers/test_clocks"); + } + [Fact] public void TestTestHelpersTestClocksPost2() { @@ -5212,6 +12725,21 @@ public void TestTestHelpersTestClocksPost2() this.AssertRequest(HttpMethod.Post, "/v1/test_helpers/test_clocks"); } + [Fact] + public async Task TestTestHelpersTestClocksPost2Async() + { + var options = new Stripe.TestHelpers.TestClockCreateOptions + { + FrozenTime = DateTimeOffset.FromUnixTimeSeconds(1577836800) + .UtcDateTime, + }; + var service = new Stripe.TestHelpers.TestClockService( + this.StripeClient); + Stripe.TestHelpers.TestClock testClock = await service.CreateAsync( + options); + this.AssertRequest(HttpMethod.Post, "/v1/test_helpers/test_clocks"); + } + [Fact] public void TestTestHelpersTreasuryInboundTransfersFailPost() { @@ -5232,6 +12760,25 @@ public void TestTestHelpersTreasuryInboundTransfersFailPost() "/v1/test_helpers/treasury/inbound_transfers/ibt_123/fail"); } + [Fact] + public async Task TestTestHelpersTreasuryInboundTransfersFailPostAsync() + { + var options = new Stripe.TestHelpers.Treasury.InboundTransferFailOptions + { + FailureDetails = new Stripe.TestHelpers.Treasury.InboundTransferFailureDetailsOptions + { + Code = "account_closed", + }, + }; + var service = new Stripe.TestHelpers.Treasury.InboundTransferService( + this.StripeClient); + Stripe.Treasury.InboundTransfer inboundTransfer = await service + .FailAsync("ibt_123", options); + this.AssertRequest( + HttpMethod.Post, + "/v1/test_helpers/treasury/inbound_transfers/ibt_123/fail"); + } + [Fact] public void TestTestHelpersTreasuryInboundTransfersReturnPost() { @@ -5244,6 +12791,18 @@ public void TestTestHelpersTreasuryInboundTransfersReturnPost() "/v1/test_helpers/treasury/inbound_transfers/ibt_123/return"); } + [Fact] + public async Task TestTestHelpersTreasuryInboundTransfersReturnPostAsync() + { + var service = new Stripe.TestHelpers.Treasury.InboundTransferService( + this.StripeClient); + Stripe.Treasury.InboundTransfer inboundTransfer = await service + .ReturnInboundTransferAsync("ibt_123"); + this.AssertRequest( + HttpMethod.Post, + "/v1/test_helpers/treasury/inbound_transfers/ibt_123/return"); + } + [Fact] public void TestTestHelpersTreasuryInboundTransfersSucceedPost() { @@ -5256,6 +12815,18 @@ public void TestTestHelpersTreasuryInboundTransfersSucceedPost() "/v1/test_helpers/treasury/inbound_transfers/ibt_123/succeed"); } + [Fact] + public async Task TestTestHelpersTreasuryInboundTransfersSucceedPostAsync() + { + var service = new Stripe.TestHelpers.Treasury.InboundTransferService( + this.StripeClient); + Stripe.Treasury.InboundTransfer inboundTransfer = await service + .SucceedAsync("ibt_123"); + this.AssertRequest( + HttpMethod.Post, + "/v1/test_helpers/treasury/inbound_transfers/ibt_123/succeed"); + } + [Fact] public void TestTestHelpersTreasuryOutboundTransfersFailPost() { @@ -5268,6 +12839,18 @@ public void TestTestHelpersTreasuryOutboundTransfersFailPost() "/v1/test_helpers/treasury/outbound_transfers/obt_123/fail"); } + [Fact] + public async Task TestTestHelpersTreasuryOutboundTransfersFailPostAsync() + { + var service = new Stripe.TestHelpers.Treasury.OutboundTransferService( + this.StripeClient); + Stripe.Treasury.OutboundTransfer outboundTransfer = await service + .FailAsync("obt_123"); + this.AssertRequest( + HttpMethod.Post, + "/v1/test_helpers/treasury/outbound_transfers/obt_123/fail"); + } + [Fact] public void TestTestHelpersTreasuryOutboundTransfersPostPost() { @@ -5280,6 +12863,18 @@ public void TestTestHelpersTreasuryOutboundTransfersPostPost() "/v1/test_helpers/treasury/outbound_transfers/obt_123/post"); } + [Fact] + public async Task TestTestHelpersTreasuryOutboundTransfersPostPostAsync() + { + var service = new Stripe.TestHelpers.Treasury.OutboundTransferService( + this.StripeClient); + Stripe.Treasury.OutboundTransfer outboundTransfer = await service + .PostAsync("obt_123"); + this.AssertRequest( + HttpMethod.Post, + "/v1/test_helpers/treasury/outbound_transfers/obt_123/post"); + } + [Fact] public void TestTestHelpersTreasuryOutboundTransfersReturnPost() { @@ -5299,6 +12894,25 @@ public void TestTestHelpersTreasuryOutboundTransfersReturnPost() "/v1/test_helpers/treasury/outbound_transfers/obt_123/return"); } + [Fact] + public async Task TestTestHelpersTreasuryOutboundTransfersReturnPostAsync() + { + var options = new Stripe.TestHelpers.Treasury.OutboundTransferReturnOutboundTransferOptions + { + ReturnedDetails = new Stripe.TestHelpers.Treasury.OutboundTransferReturnedDetailsOptions + { + Code = "account_closed", + }, + }; + var service = new Stripe.TestHelpers.Treasury.OutboundTransferService( + this.StripeClient); + Stripe.Treasury.OutboundTransfer outboundTransfer = await service + .ReturnOutboundTransferAsync("obt_123", options); + this.AssertRequest( + HttpMethod.Post, + "/v1/test_helpers/treasury/outbound_transfers/obt_123/return"); + } + [Fact] public void TestTestHelpersTreasuryReceivedCreditsPost() { @@ -5318,6 +12932,25 @@ public void TestTestHelpersTreasuryReceivedCreditsPost() "/v1/test_helpers/treasury/received_credits"); } + [Fact] + public async Task TestTestHelpersTreasuryReceivedCreditsPostAsync() + { + var options = new Stripe.TestHelpers.Treasury.ReceivedCreditCreateOptions + { + FinancialAccount = "fa_123", + Network = "ach", + Amount = 1234, + Currency = "usd", + }; + var service = new Stripe.TestHelpers.Treasury.ReceivedCreditService( + this.StripeClient); + Stripe.Treasury.ReceivedCredit receivedCredit = await service + .CreateAsync(options); + this.AssertRequest( + HttpMethod.Post, + "/v1/test_helpers/treasury/received_credits"); + } + [Fact] public void TestTestHelpersTreasuryReceivedDebitsPost() { @@ -5338,13 +12971,40 @@ public void TestTestHelpersTreasuryReceivedDebitsPost() } [Fact] - public void TestTokensGet() + public async Task TestTestHelpersTreasuryReceivedDebitsPostAsync() + { + var options = new Stripe.TestHelpers.Treasury.ReceivedDebitCreateOptions + { + FinancialAccount = "fa_123", + Network = "ach", + Amount = 1234, + Currency = "usd", + }; + var service = new Stripe.TestHelpers.Treasury.ReceivedDebitService( + this.StripeClient); + Stripe.Treasury.ReceivedDebit receivedDebit = await service + .CreateAsync(options); + this.AssertRequest( + HttpMethod.Post, + "/v1/test_helpers/treasury/received_debits"); + } + + [Fact] + public void TestTokensGet() { var service = new TokenService(this.StripeClient); Token token = service.Get("tok_xxxx"); this.AssertRequest(HttpMethod.Get, "/v1/tokens/tok_xxxx"); } + [Fact] + public async Task TestTokensGetAsync() + { + var service = new TokenService(this.StripeClient); + Token token = await service.GetAsync("tok_xxxx"); + this.AssertRequest(HttpMethod.Get, "/v1/tokens/tok_xxxx"); + } + [Fact] public void TestTokensPost() { @@ -5363,6 +13023,24 @@ public void TestTokensPost() this.AssertRequest(HttpMethod.Post, "/v1/tokens"); } + [Fact] + public async Task TestTokensPostAsync() + { + var options = new TokenCreateOptions + { + Card = new TokenCardOptions + { + Number = "4242424242424242", + ExpMonth = "5", + ExpYear = "2023", + Cvc = "314", + }, + }; + var service = new TokenService(this.StripeClient); + Token token = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/tokens"); + } + [Fact] public void TestTokensPost2() { @@ -5383,6 +13061,26 @@ public void TestTokensPost2() this.AssertRequest(HttpMethod.Post, "/v1/tokens"); } + [Fact] + public async Task TestTokensPost2Async() + { + var options = new TokenCreateOptions + { + BankAccount = new TokenBankAccountOptions + { + Country = "US", + Currency = "usd", + AccountHolderName = "Jenny Rosen", + AccountHolderType = "individual", + RoutingNumber = "110000000", + AccountNumber = "000123456789", + }, + }; + var service = new TokenService(this.StripeClient); + Token token = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/tokens"); + } + [Fact] public void TestTokensPost3() { @@ -5395,6 +13093,18 @@ public void TestTokensPost3() this.AssertRequest(HttpMethod.Post, "/v1/tokens"); } + [Fact] + public async Task TestTokensPost3Async() + { + var options = new TokenCreateOptions + { + Pii = new TokenPiiOptions { IdNumber = "000000000" }, + }; + var service = new TokenService(this.StripeClient); + Token token = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/tokens"); + } + [Fact] public void TestTokensPost4() { @@ -5415,6 +13125,26 @@ public void TestTokensPost4() this.AssertRequest(HttpMethod.Post, "/v1/tokens"); } + [Fact] + public async Task TestTokensPost4Async() + { + var options = new TokenCreateOptions + { + Account = new TokenAccountOptions + { + Individual = new TokenAccountIndividualOptions + { + FirstName = "Jane", + LastName = "Doe", + }, + TosShownAndAccepted = true, + }, + }; + var service = new TokenService(this.StripeClient); + Token token = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/tokens"); + } + [Fact] public void TestTokensPost5() { @@ -5435,6 +13165,26 @@ public void TestTokensPost5() this.AssertRequest(HttpMethod.Post, "/v1/tokens"); } + [Fact] + public async Task TestTokensPost5Async() + { + var options = new TokenCreateOptions + { + Person = new TokenPersonOptions + { + FirstName = "Jane", + LastName = "Doe", + Relationship = new TokenPersonRelationshipOptions + { + Owner = true, + }, + }, + }; + var service = new TokenService(this.StripeClient); + Token token = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/tokens"); + } + [Fact] public void TestTokensPost6() { @@ -5447,6 +13197,18 @@ public void TestTokensPost6() this.AssertRequest(HttpMethod.Post, "/v1/tokens"); } + [Fact] + public async Task TestTokensPost6Async() + { + var options = new TokenCreateOptions + { + CvcUpdate = new TokenCvcUpdateOptions { Cvc = "123" }, + }; + var service = new TokenService(this.StripeClient); + Token token = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/tokens"); + } + [Fact] public void TestTopupsCancelPost() { @@ -5457,6 +13219,16 @@ public void TestTopupsCancelPost() "/v1/topups/tu_xxxxxxxxxxxxx/cancel"); } + [Fact] + public async Task TestTopupsCancelPostAsync() + { + var service = new TopupService(this.StripeClient); + Topup topup = await service.CancelAsync("tu_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/topups/tu_xxxxxxxxxxxxx/cancel"); + } + [Fact] public void TestTopupsGet() { @@ -5466,6 +13238,33 @@ public void TestTopupsGet() this.AssertRequest(HttpMethod.Get, "/v1/topups", "limit=3"); } + [Fact] + public async Task TestTopupsGetAsync() + { + var options = new TopupListOptions { Limit = 3 }; + var service = new TopupService(this.StripeClient); + StripeList topups = await service.ListAsync(options); + this.AssertRequest(HttpMethod.Get, "/v1/topups", "limit=3"); + } + + [Fact] + public void TestTopupsGetAutoPaging() + { + var options = new TopupListOptions { Limit = 3 }; + var service = new TopupService(this.StripeClient); + var topup = service.ListAutoPaging(options).First(); + this.AssertRequest(HttpMethod.Get, "/v1/topups", "limit=3"); + } + + [Fact] + public async Task TestTopupsGetAutoPagingAsync() + { + var options = new TopupListOptions { Limit = 3 }; + var service = new TopupService(this.StripeClient); + var topup = await service.ListAutoPagingAsync(options).FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/topups", "limit=3"); + } + [Fact] public void TestTopupsGet2() { @@ -5474,6 +13273,14 @@ public void TestTopupsGet2() this.AssertRequest(HttpMethod.Get, "/v1/topups/tu_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestTopupsGet2Async() + { + var service = new TopupService(this.StripeClient); + Topup topup = await service.GetAsync("tu_xxxxxxxxxxxxx"); + this.AssertRequest(HttpMethod.Get, "/v1/topups/tu_xxxxxxxxxxxxx"); + } + [Fact] public void TestTopupsPost() { @@ -5489,6 +13296,21 @@ public void TestTopupsPost() this.AssertRequest(HttpMethod.Post, "/v1/topups"); } + [Fact] + public async Task TestTopupsPostAsync() + { + var options = new TopupCreateOptions + { + Amount = 2000, + Currency = "usd", + Description = "Top-up for Jenny Rosen", + StatementDescriptor = "Top-up", + }; + var service = new TopupService(this.StripeClient); + Topup topup = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/topups"); + } + [Fact] public void TestTopupsPost2() { @@ -5504,6 +13326,23 @@ public void TestTopupsPost2() this.AssertRequest(HttpMethod.Post, "/v1/topups/tu_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestTopupsPost2Async() + { + var options = new TopupUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new TopupService(this.StripeClient); + Topup topup = await service.UpdateAsync( + "tu_xxxxxxxxxxxxx", + options); + this.AssertRequest(HttpMethod.Post, "/v1/topups/tu_xxxxxxxxxxxxx"); + } + [Fact] public void TestTransfersGet() { @@ -5513,6 +13352,34 @@ public void TestTransfersGet() this.AssertRequest(HttpMethod.Get, "/v1/transfers", "limit=3"); } + [Fact] + public async Task TestTransfersGetAsync() + { + var options = new TransferListOptions { Limit = 3 }; + var service = new TransferService(this.StripeClient); + StripeList transfers = await service.ListAsync(options); + this.AssertRequest(HttpMethod.Get, "/v1/transfers", "limit=3"); + } + + [Fact] + public void TestTransfersGetAutoPaging() + { + var options = new TransferListOptions { Limit = 3 }; + var service = new TransferService(this.StripeClient); + var transfer = service.ListAutoPaging(options).First(); + this.AssertRequest(HttpMethod.Get, "/v1/transfers", "limit=3"); + } + + [Fact] + public async Task TestTransfersGetAutoPagingAsync() + { + var options = new TransferListOptions { Limit = 3 }; + var service = new TransferService(this.StripeClient); + var transfer = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v1/transfers", "limit=3"); + } + [Fact] public void TestTransfersGet2() { @@ -5523,6 +13390,16 @@ public void TestTransfersGet2() "/v1/transfers/tr_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestTransfersGet2Async() + { + var service = new TransferService(this.StripeClient); + Transfer transfer = await service.GetAsync("tr_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/transfers/tr_xxxxxxxxxxxxx"); + } + [Fact] public void TestTransfersPost() { @@ -5538,6 +13415,21 @@ public void TestTransfersPost() this.AssertRequest(HttpMethod.Post, "/v1/transfers"); } + [Fact] + public async Task TestTransfersPostAsync() + { + var options = new TransferCreateOptions + { + Amount = 400, + Currency = "usd", + Destination = "acct_xxxxxxxxxxxxx", + TransferGroup = "ORDER_95", + }; + var service = new TransferService(this.StripeClient); + Transfer transfer = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/transfers"); + } + [Fact] public void TestTransfersPost2() { @@ -5555,6 +13447,25 @@ public void TestTransfersPost2() "/v1/transfers/tr_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestTransfersPost2Async() + { + var options = new TransferUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new TransferService(this.StripeClient); + Transfer transfer = await service.UpdateAsync( + "tr_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/transfers/tr_xxxxxxxxxxxxx"); + } + [Fact] public void TestTransfersReversalsGet() { @@ -5570,36 +13481,104 @@ public void TestTransfersReversalsGet() } [Fact] - public void TestTransfersReversalsGet2() + public async Task TestTransfersReversalsGetAsync() { + var options = new TransferReversalListOptions { Limit = 3 }; var service = new TransferReversalService(this.StripeClient); - TransferReversal transferReversal = service.Get( - "tr_xxxxxxxxxxxxx", - "trr_xxxxxxxxxxxxx"); + StripeList transferReversals = await service + .ListAsync("tr_xxxxxxxxxxxxx", options); this.AssertRequest( HttpMethod.Get, - "/v1/transfers/tr_xxxxxxxxxxxxx/reversals/trr_xxxxxxxxxxxxx"); + "/v1/transfers/tr_xxxxxxxxxxxxx/reversals", + "limit=3"); } [Fact] - public void TestTransfersReversalsPost() + public void TestTransfersReversalsGetAutoPaging() { - var options = new TransferReversalCreateOptions { Amount = 100 }; + var options = new TransferReversalListOptions { Limit = 3 }; var service = new TransferReversalService(this.StripeClient); - TransferReversal transferReversal = service.Create( + var transferReversal = service.ListAutoPaging( "tr_xxxxxxxxxxxxx", - options); + options) + .First(); this.AssertRequest( - HttpMethod.Post, - "/v1/transfers/tr_xxxxxxxxxxxxx/reversals"); + HttpMethod.Get, + "/v1/transfers/tr_xxxxxxxxxxxxx/reversals", + "limit=3"); } [Fact] - public void TestTransfersReversalsPost2() + public async Task TestTransfersReversalsGetAutoPagingAsync() { - var options = new TransferReversalUpdateOptions - { - Metadata = new Dictionary + var options = new TransferReversalListOptions { Limit = 3 }; + var service = new TransferReversalService(this.StripeClient); + var transferReversal = await service.ListAutoPagingAsync( + "tr_xxxxxxxxxxxxx", + options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/transfers/tr_xxxxxxxxxxxxx/reversals", + "limit=3"); + } + + [Fact] + public void TestTransfersReversalsGet2() + { + var service = new TransferReversalService(this.StripeClient); + TransferReversal transferReversal = service.Get( + "tr_xxxxxxxxxxxxx", + "trr_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/transfers/tr_xxxxxxxxxxxxx/reversals/trr_xxxxxxxxxxxxx"); + } + + [Fact] + public async Task TestTransfersReversalsGet2Async() + { + var service = new TransferReversalService(this.StripeClient); + TransferReversal transferReversal = await service.GetAsync( + "tr_xxxxxxxxxxxxx", + "trr_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/transfers/tr_xxxxxxxxxxxxx/reversals/trr_xxxxxxxxxxxxx"); + } + + [Fact] + public void TestTransfersReversalsPost() + { + var options = new TransferReversalCreateOptions { Amount = 100 }; + var service = new TransferReversalService(this.StripeClient); + TransferReversal transferReversal = service.Create( + "tr_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/transfers/tr_xxxxxxxxxxxxx/reversals"); + } + + [Fact] + public async Task TestTransfersReversalsPostAsync() + { + var options = new TransferReversalCreateOptions { Amount = 100 }; + var service = new TransferReversalService(this.StripeClient); + TransferReversal transferReversal = await service.CreateAsync( + "tr_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/transfers/tr_xxxxxxxxxxxxx/reversals"); + } + + [Fact] + public void TestTransfersReversalsPost2() + { + var options = new TransferReversalUpdateOptions + { + Metadata = new Dictionary { { "order_id", "6735" }, }, @@ -5614,6 +13593,26 @@ public void TestTransfersReversalsPost2() "/v1/transfers/tr_xxxxxxxxxxxxx/reversals/trr_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestTransfersReversalsPost2Async() + { + var options = new TransferReversalUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new TransferReversalService(this.StripeClient); + TransferReversal transferReversal = await service.UpdateAsync( + "tr_xxxxxxxxxxxxx", + "trr_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/transfers/tr_xxxxxxxxxxxxx/reversals/trr_xxxxxxxxxxxxx"); + } + [Fact] public void TestTreasuryCreditReversalsGet() { @@ -5632,6 +13631,59 @@ public void TestTreasuryCreditReversalsGet() "financial_account=fa_xxxxxxxxxxxxx&limit=3"); } + [Fact] + public async Task TestTreasuryCreditReversalsGetAsync() + { + var options = new Stripe.Treasury.CreditReversalListOptions + { + FinancialAccount = "fa_xxxxxxxxxxxxx", + Limit = 3, + }; + var service = new Stripe.Treasury.CreditReversalService( + this.StripeClient); + StripeList creditReversals = await service + .ListAsync(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/credit_reversals", + "financial_account=fa_xxxxxxxxxxxxx&limit=3"); + } + + [Fact] + public void TestTreasuryCreditReversalsGetAutoPaging() + { + var options = new Stripe.Treasury.CreditReversalListOptions + { + FinancialAccount = "fa_xxxxxxxxxxxxx", + Limit = 3, + }; + var service = new Stripe.Treasury.CreditReversalService( + this.StripeClient); + var creditReversal = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/credit_reversals", + "financial_account=fa_xxxxxxxxxxxxx&limit=3"); + } + + [Fact] + public async Task TestTreasuryCreditReversalsGetAutoPagingAsync() + { + var options = new Stripe.Treasury.CreditReversalListOptions + { + FinancialAccount = "fa_xxxxxxxxxxxxx", + Limit = 3, + }; + var service = new Stripe.Treasury.CreditReversalService( + this.StripeClient); + var creditReversal = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/credit_reversals", + "financial_account=fa_xxxxxxxxxxxxx&limit=3"); + } + [Fact] public void TestTreasuryCreditReversalsGet2() { @@ -5644,6 +13696,18 @@ public void TestTreasuryCreditReversalsGet2() "/v1/treasury/credit_reversals/credrev_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestTreasuryCreditReversalsGet2Async() + { + var service = new Stripe.Treasury.CreditReversalService( + this.StripeClient); + Stripe.Treasury.CreditReversal creditReversal = await service + .GetAsync("credrev_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/credit_reversals/credrev_xxxxxxxxxxxxx"); + } + [Fact] public void TestTreasuryCreditReversalsPost() { @@ -5660,6 +13724,22 @@ public void TestTreasuryCreditReversalsPost() "/v1/treasury/credit_reversals"); } + [Fact] + public async Task TestTreasuryCreditReversalsPostAsync() + { + var options = new Stripe.Treasury.CreditReversalCreateOptions + { + ReceivedCredit = "rc_xxxxxxxxxxxxx", + }; + var service = new Stripe.Treasury.CreditReversalService( + this.StripeClient); + Stripe.Treasury.CreditReversal creditReversal = await service + .CreateAsync(options); + this.AssertRequest( + HttpMethod.Post, + "/v1/treasury/credit_reversals"); + } + [Fact] public void TestTreasuryDebitReversalsGet() { @@ -5674,393 +13754,1122 @@ public void TestTreasuryDebitReversalsGet() .List(options); this.AssertRequest( HttpMethod.Get, - "/v1/treasury/debit_reversals", + "/v1/treasury/debit_reversals", + "financial_account=fa_xxxxxxxxxxxxx&limit=3"); + } + + [Fact] + public async Task TestTreasuryDebitReversalsGetAsync() + { + var options = new Stripe.Treasury.DebitReversalListOptions + { + FinancialAccount = "fa_xxxxxxxxxxxxx", + Limit = 3, + }; + var service = new Stripe.Treasury.DebitReversalService( + this.StripeClient); + StripeList debitReversals = await service + .ListAsync(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/debit_reversals", + "financial_account=fa_xxxxxxxxxxxxx&limit=3"); + } + + [Fact] + public void TestTreasuryDebitReversalsGetAutoPaging() + { + var options = new Stripe.Treasury.DebitReversalListOptions + { + FinancialAccount = "fa_xxxxxxxxxxxxx", + Limit = 3, + }; + var service = new Stripe.Treasury.DebitReversalService( + this.StripeClient); + var debitReversal = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/debit_reversals", + "financial_account=fa_xxxxxxxxxxxxx&limit=3"); + } + + [Fact] + public async Task TestTreasuryDebitReversalsGetAutoPagingAsync() + { + var options = new Stripe.Treasury.DebitReversalListOptions + { + FinancialAccount = "fa_xxxxxxxxxxxxx", + Limit = 3, + }; + var service = new Stripe.Treasury.DebitReversalService( + this.StripeClient); + var debitReversal = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/debit_reversals", + "financial_account=fa_xxxxxxxxxxxxx&limit=3"); + } + + [Fact] + public void TestTreasuryDebitReversalsGet2() + { + var service = new Stripe.Treasury.DebitReversalService( + this.StripeClient); + Stripe.Treasury.DebitReversal debitReversal = service.Get( + "debrev_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/debit_reversals/debrev_xxxxxxxxxxxxx"); + } + + [Fact] + public async Task TestTreasuryDebitReversalsGet2Async() + { + var service = new Stripe.Treasury.DebitReversalService( + this.StripeClient); + Stripe.Treasury.DebitReversal debitReversal = await service + .GetAsync("debrev_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/debit_reversals/debrev_xxxxxxxxxxxxx"); + } + + [Fact] + public void TestTreasuryDebitReversalsPost() + { + var options = new Stripe.Treasury.DebitReversalCreateOptions + { + ReceivedDebit = "rd_xxxxxxxxxxxxx", + }; + var service = new Stripe.Treasury.DebitReversalService( + this.StripeClient); + Stripe.Treasury.DebitReversal debitReversal = service.Create( + options); + this.AssertRequest(HttpMethod.Post, "/v1/treasury/debit_reversals"); + } + + [Fact] + public async Task TestTreasuryDebitReversalsPostAsync() + { + var options = new Stripe.Treasury.DebitReversalCreateOptions + { + ReceivedDebit = "rd_xxxxxxxxxxxxx", + }; + var service = new Stripe.Treasury.DebitReversalService( + this.StripeClient); + Stripe.Treasury.DebitReversal debitReversal = await service + .CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v1/treasury/debit_reversals"); + } + + [Fact] + public void TestTreasuryFinancialAccountsFeaturesGet() + { + var service = new Stripe.Treasury.FinancialAccountFeaturesService( + this.StripeClient); + Stripe.Treasury.FinancialAccountFeatures financialAccountFeatures = service + .Get("fa_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/financial_accounts/fa_xxxxxxxxxxxxx/features"); + } + + [Fact] + public async Task TestTreasuryFinancialAccountsFeaturesGetAsync() + { + var service = new Stripe.Treasury.FinancialAccountFeaturesService( + this.StripeClient); + Stripe.Treasury.FinancialAccountFeatures financialAccountFeatures = await service + .GetAsync("fa_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/financial_accounts/fa_xxxxxxxxxxxxx/features"); + } + + [Fact] + public void TestTreasuryFinancialAccountsGet() + { + var options = new Stripe.Treasury.FinancialAccountListOptions + { + Limit = 3, + }; + var service = new Stripe.Treasury.FinancialAccountService( + this.StripeClient); + StripeList financialAccounts = service + .List(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/financial_accounts", + "limit=3"); + } + + [Fact] + public async Task TestTreasuryFinancialAccountsGetAsync() + { + var options = new Stripe.Treasury.FinancialAccountListOptions + { + Limit = 3, + }; + var service = new Stripe.Treasury.FinancialAccountService( + this.StripeClient); + StripeList financialAccounts = await service + .ListAsync(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/financial_accounts", + "limit=3"); + } + + [Fact] + public void TestTreasuryFinancialAccountsGetAutoPaging() + { + var options = new Stripe.Treasury.FinancialAccountListOptions + { + Limit = 3, + }; + var service = new Stripe.Treasury.FinancialAccountService( + this.StripeClient); + var financialAccount = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/financial_accounts", + "limit=3"); + } + + [Fact] + public async Task TestTreasuryFinancialAccountsGetAutoPagingAsync() + { + var options = new Stripe.Treasury.FinancialAccountListOptions + { + Limit = 3, + }; + var service = new Stripe.Treasury.FinancialAccountService( + this.StripeClient); + var financialAccount = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/financial_accounts", + "limit=3"); + } + + [Fact] + public void TestTreasuryFinancialAccountsGet2() + { + var service = new Stripe.Treasury.FinancialAccountService( + this.StripeClient); + Stripe.Treasury.FinancialAccount financialAccount = service.Get( + "fa_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/financial_accounts/fa_xxxxxxxxxxxxx"); + } + + [Fact] + public async Task TestTreasuryFinancialAccountsGet2Async() + { + var service = new Stripe.Treasury.FinancialAccountService( + this.StripeClient); + Stripe.Treasury.FinancialAccount financialAccount = await service + .GetAsync("fa_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/financial_accounts/fa_xxxxxxxxxxxxx"); + } + + [Fact] + public void TestTreasuryFinancialAccountsPost() + { + var options = new Stripe.Treasury.FinancialAccountCreateOptions + { + SupportedCurrencies = new List { "usd" }, + Features = new Stripe.Treasury.FinancialAccountFeaturesOptions(), + }; + var service = new Stripe.Treasury.FinancialAccountService( + this.StripeClient); + Stripe.Treasury.FinancialAccount financialAccount = service.Create( + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/treasury/financial_accounts"); + } + + [Fact] + public async Task TestTreasuryFinancialAccountsPostAsync() + { + var options = new Stripe.Treasury.FinancialAccountCreateOptions + { + SupportedCurrencies = new List { "usd" }, + Features = new Stripe.Treasury.FinancialAccountFeaturesOptions(), + }; + var service = new Stripe.Treasury.FinancialAccountService( + this.StripeClient); + Stripe.Treasury.FinancialAccount financialAccount = await service + .CreateAsync(options); + this.AssertRequest( + HttpMethod.Post, + "/v1/treasury/financial_accounts"); + } + + [Fact] + public void TestTreasuryFinancialAccountsPost2() + { + var options = new Stripe.Treasury.FinancialAccountUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new Stripe.Treasury.FinancialAccountService( + this.StripeClient); + Stripe.Treasury.FinancialAccount financialAccount = service.Update( + "fa_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/treasury/financial_accounts/fa_xxxxxxxxxxxxx"); + } + + [Fact] + public async Task TestTreasuryFinancialAccountsPost2Async() + { + var options = new Stripe.Treasury.FinancialAccountUpdateOptions + { + Metadata = new Dictionary + { + { "order_id", "6735" }, + }, + }; + var service = new Stripe.Treasury.FinancialAccountService( + this.StripeClient); + Stripe.Treasury.FinancialAccount financialAccount = await service + .UpdateAsync("fa_xxxxxxxxxxxxx", options); + this.AssertRequest( + HttpMethod.Post, + "/v1/treasury/financial_accounts/fa_xxxxxxxxxxxxx"); + } + + [Fact] + public void TestTreasuryInboundTransfersCancelPost() + { + var service = new Stripe.Treasury.InboundTransferService( + this.StripeClient); + Stripe.Treasury.InboundTransfer inboundTransfer = service.Cancel( + "ibt_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/treasury/inbound_transfers/ibt_xxxxxxxxxxxxx/cancel"); + } + + [Fact] + public async Task TestTreasuryInboundTransfersCancelPostAsync() + { + var service = new Stripe.Treasury.InboundTransferService( + this.StripeClient); + Stripe.Treasury.InboundTransfer inboundTransfer = await service + .CancelAsync("ibt_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/treasury/inbound_transfers/ibt_xxxxxxxxxxxxx/cancel"); + } + + [Fact] + public void TestTreasuryInboundTransfersGet() + { + var options = new Stripe.Treasury.InboundTransferListOptions + { + FinancialAccount = "fa_xxxxxxxxxxxxx", + Limit = 3, + }; + var service = new Stripe.Treasury.InboundTransferService( + this.StripeClient); + StripeList inboundTransfers = service + .List(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/inbound_transfers", + "financial_account=fa_xxxxxxxxxxxxx&limit=3"); + } + + [Fact] + public async Task TestTreasuryInboundTransfersGetAsync() + { + var options = new Stripe.Treasury.InboundTransferListOptions + { + FinancialAccount = "fa_xxxxxxxxxxxxx", + Limit = 3, + }; + var service = new Stripe.Treasury.InboundTransferService( + this.StripeClient); + StripeList inboundTransfers = await service + .ListAsync(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/inbound_transfers", + "financial_account=fa_xxxxxxxxxxxxx&limit=3"); + } + + [Fact] + public void TestTreasuryInboundTransfersGetAutoPaging() + { + var options = new Stripe.Treasury.InboundTransferListOptions + { + FinancialAccount = "fa_xxxxxxxxxxxxx", + Limit = 3, + }; + var service = new Stripe.Treasury.InboundTransferService( + this.StripeClient); + var inboundTransfer = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/inbound_transfers", + "financial_account=fa_xxxxxxxxxxxxx&limit=3"); + } + + [Fact] + public async Task TestTreasuryInboundTransfersGetAutoPagingAsync() + { + var options = new Stripe.Treasury.InboundTransferListOptions + { + FinancialAccount = "fa_xxxxxxxxxxxxx", + Limit = 3, + }; + var service = new Stripe.Treasury.InboundTransferService( + this.StripeClient); + var inboundTransfer = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/inbound_transfers", + "financial_account=fa_xxxxxxxxxxxxx&limit=3"); + } + + [Fact] + public void TestTreasuryInboundTransfersGet2() + { + var service = new Stripe.Treasury.InboundTransferService( + this.StripeClient); + Stripe.Treasury.InboundTransfer inboundTransfer = service.Get( + "ibt_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/inbound_transfers/ibt_xxxxxxxxxxxxx"); + } + + [Fact] + public async Task TestTreasuryInboundTransfersGet2Async() + { + var service = new Stripe.Treasury.InboundTransferService( + this.StripeClient); + Stripe.Treasury.InboundTransfer inboundTransfer = await service + .GetAsync("ibt_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/inbound_transfers/ibt_xxxxxxxxxxxxx"); + } + + [Fact] + public void TestTreasuryInboundTransfersPost() + { + var options = new Stripe.Treasury.InboundTransferCreateOptions + { + FinancialAccount = "fa_xxxxxxxxxxxxx", + Amount = 10000, + Currency = "usd", + OriginPaymentMethod = "pm_xxxxxxxxxxxxx", + Description = "InboundTransfer from my bank account", + }; + var service = new Stripe.Treasury.InboundTransferService( + this.StripeClient); + Stripe.Treasury.InboundTransfer inboundTransfer = service.Create( + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/treasury/inbound_transfers"); + } + + [Fact] + public async Task TestTreasuryInboundTransfersPostAsync() + { + var options = new Stripe.Treasury.InboundTransferCreateOptions + { + FinancialAccount = "fa_xxxxxxxxxxxxx", + Amount = 10000, + Currency = "usd", + OriginPaymentMethod = "pm_xxxxxxxxxxxxx", + Description = "InboundTransfer from my bank account", + }; + var service = new Stripe.Treasury.InboundTransferService( + this.StripeClient); + Stripe.Treasury.InboundTransfer inboundTransfer = await service + .CreateAsync(options); + this.AssertRequest( + HttpMethod.Post, + "/v1/treasury/inbound_transfers"); + } + + [Fact] + public void TestTreasuryOutboundPaymentsCancelPost() + { + var service = new Stripe.Treasury.OutboundPaymentService( + this.StripeClient); + Stripe.Treasury.OutboundPayment outboundPayment = service.Cancel( + "bot_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/treasury/outbound_payments/bot_xxxxxxxxxxxxx/cancel"); + } + + [Fact] + public async Task TestTreasuryOutboundPaymentsCancelPostAsync() + { + var service = new Stripe.Treasury.OutboundPaymentService( + this.StripeClient); + Stripe.Treasury.OutboundPayment outboundPayment = await service + .CancelAsync("bot_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/treasury/outbound_payments/bot_xxxxxxxxxxxxx/cancel"); + } + + [Fact] + public void TestTreasuryOutboundPaymentsGet() + { + var options = new Stripe.Treasury.OutboundPaymentListOptions + { + FinancialAccount = "fa_xxxxxxxxxxxxx", + Limit = 3, + }; + var service = new Stripe.Treasury.OutboundPaymentService( + this.StripeClient); + StripeList outboundPayments = service + .List(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/outbound_payments", + "financial_account=fa_xxxxxxxxxxxxx&limit=3"); + } + + [Fact] + public async Task TestTreasuryOutboundPaymentsGetAsync() + { + var options = new Stripe.Treasury.OutboundPaymentListOptions + { + FinancialAccount = "fa_xxxxxxxxxxxxx", + Limit = 3, + }; + var service = new Stripe.Treasury.OutboundPaymentService( + this.StripeClient); + StripeList outboundPayments = await service + .ListAsync(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/outbound_payments", + "financial_account=fa_xxxxxxxxxxxxx&limit=3"); + } + + [Fact] + public void TestTreasuryOutboundPaymentsGetAutoPaging() + { + var options = new Stripe.Treasury.OutboundPaymentListOptions + { + FinancialAccount = "fa_xxxxxxxxxxxxx", + Limit = 3, + }; + var service = new Stripe.Treasury.OutboundPaymentService( + this.StripeClient); + var outboundPayment = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/outbound_payments", + "financial_account=fa_xxxxxxxxxxxxx&limit=3"); + } + + [Fact] + public async Task TestTreasuryOutboundPaymentsGetAutoPagingAsync() + { + var options = new Stripe.Treasury.OutboundPaymentListOptions + { + FinancialAccount = "fa_xxxxxxxxxxxxx", + Limit = 3, + }; + var service = new Stripe.Treasury.OutboundPaymentService( + this.StripeClient); + var outboundPayment = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/outbound_payments", + "financial_account=fa_xxxxxxxxxxxxx&limit=3"); + } + + [Fact] + public void TestTreasuryOutboundPaymentsGet2() + { + var service = new Stripe.Treasury.OutboundPaymentService( + this.StripeClient); + Stripe.Treasury.OutboundPayment outboundPayment = service.Get( + "bot_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/outbound_payments/bot_xxxxxxxxxxxxx"); + } + + [Fact] + public async Task TestTreasuryOutboundPaymentsGet2Async() + { + var service = new Stripe.Treasury.OutboundPaymentService( + this.StripeClient); + Stripe.Treasury.OutboundPayment outboundPayment = await service + .GetAsync("bot_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/outbound_payments/bot_xxxxxxxxxxxxx"); + } + + [Fact] + public void TestTreasuryOutboundPaymentsPost() + { + var options = new Stripe.Treasury.OutboundPaymentCreateOptions + { + FinancialAccount = "fa_xxxxxxxxxxxxx", + Amount = 10000, + Currency = "usd", + Customer = "cus_xxxxxxxxxxxxx", + DestinationPaymentMethod = "pm_xxxxxxxxxxxxx", + Description = "OutboundPayment to a 3rd party", + }; + var service = new Stripe.Treasury.OutboundPaymentService( + this.StripeClient); + Stripe.Treasury.OutboundPayment outboundPayment = service.Create( + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/treasury/outbound_payments"); + } + + [Fact] + public async Task TestTreasuryOutboundPaymentsPostAsync() + { + var options = new Stripe.Treasury.OutboundPaymentCreateOptions + { + FinancialAccount = "fa_xxxxxxxxxxxxx", + Amount = 10000, + Currency = "usd", + Customer = "cus_xxxxxxxxxxxxx", + DestinationPaymentMethod = "pm_xxxxxxxxxxxxx", + Description = "OutboundPayment to a 3rd party", + }; + var service = new Stripe.Treasury.OutboundPaymentService( + this.StripeClient); + Stripe.Treasury.OutboundPayment outboundPayment = await service + .CreateAsync(options); + this.AssertRequest( + HttpMethod.Post, + "/v1/treasury/outbound_payments"); + } + + [Fact] + public void TestTreasuryOutboundTransfersCancelPost() + { + var service = new Stripe.Treasury.OutboundTransferService( + this.StripeClient); + Stripe.Treasury.OutboundTransfer outboundTransfer = service.Cancel( + "obt_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/treasury/outbound_transfers/obt_xxxxxxxxxxxxx/cancel"); + } + + [Fact] + public async Task TestTreasuryOutboundTransfersCancelPostAsync() + { + var service = new Stripe.Treasury.OutboundTransferService( + this.StripeClient); + Stripe.Treasury.OutboundTransfer outboundTransfer = await service + .CancelAsync("obt_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Post, + "/v1/treasury/outbound_transfers/obt_xxxxxxxxxxxxx/cancel"); + } + + [Fact] + public void TestTreasuryOutboundTransfersGet() + { + var options = new Stripe.Treasury.OutboundTransferListOptions + { + FinancialAccount = "fa_xxxxxxxxxxxxx", + Limit = 3, + }; + var service = new Stripe.Treasury.OutboundTransferService( + this.StripeClient); + StripeList outboundTransfers = service + .List(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/outbound_transfers", "financial_account=fa_xxxxxxxxxxxxx&limit=3"); } [Fact] - public void TestTreasuryDebitReversalsGet2() + public async Task TestTreasuryOutboundTransfersGetAsync() { - var service = new Stripe.Treasury.DebitReversalService( + var options = new Stripe.Treasury.OutboundTransferListOptions + { + FinancialAccount = "fa_xxxxxxxxxxxxx", + Limit = 3, + }; + var service = new Stripe.Treasury.OutboundTransferService( this.StripeClient); - Stripe.Treasury.DebitReversal debitReversal = service.Get( - "debrev_xxxxxxxxxxxxx"); + StripeList outboundTransfers = await service + .ListAsync(options); this.AssertRequest( HttpMethod.Get, - "/v1/treasury/debit_reversals/debrev_xxxxxxxxxxxxx"); + "/v1/treasury/outbound_transfers", + "financial_account=fa_xxxxxxxxxxxxx&limit=3"); } [Fact] - public void TestTreasuryDebitReversalsPost() + public void TestTreasuryOutboundTransfersGetAutoPaging() { - var options = new Stripe.Treasury.DebitReversalCreateOptions + var options = new Stripe.Treasury.OutboundTransferListOptions { - ReceivedDebit = "rd_xxxxxxxxxxxxx", + FinancialAccount = "fa_xxxxxxxxxxxxx", + Limit = 3, }; - var service = new Stripe.Treasury.DebitReversalService( + var service = new Stripe.Treasury.OutboundTransferService( this.StripeClient); - Stripe.Treasury.DebitReversal debitReversal = service.Create( - options); - this.AssertRequest(HttpMethod.Post, "/v1/treasury/debit_reversals"); + var outboundTransfer = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/outbound_transfers", + "financial_account=fa_xxxxxxxxxxxxx&limit=3"); } [Fact] - public void TestTreasuryFinancialAccountsFeaturesGet() + public async Task TestTreasuryOutboundTransfersGetAutoPagingAsync() { - var service = new Stripe.Treasury.FinancialAccountFeaturesService( + var options = new Stripe.Treasury.OutboundTransferListOptions + { + FinancialAccount = "fa_xxxxxxxxxxxxx", + Limit = 3, + }; + var service = new Stripe.Treasury.OutboundTransferService( this.StripeClient); - Stripe.Treasury.FinancialAccountFeatures financialAccountFeatures = service - .Get("fa_xxxxxxxxxxxxx"); + var outboundTransfer = await service.ListAutoPagingAsync(options) + .FirstAsync(); this.AssertRequest( HttpMethod.Get, - "/v1/treasury/financial_accounts/fa_xxxxxxxxxxxxx/features"); + "/v1/treasury/outbound_transfers", + "financial_account=fa_xxxxxxxxxxxxx&limit=3"); } [Fact] - public void TestTreasuryFinancialAccountsGet() + public void TestTreasuryOutboundTransfersGet2() { - var options = new Stripe.Treasury.FinancialAccountListOptions - { - Limit = 3, - }; - var service = new Stripe.Treasury.FinancialAccountService( + var service = new Stripe.Treasury.OutboundTransferService( this.StripeClient); - StripeList financialAccounts = service - .List(options); + Stripe.Treasury.OutboundTransfer outboundTransfer = service.Get( + "obt_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, - "/v1/treasury/financial_accounts", - "limit=3"); + "/v1/treasury/outbound_transfers/obt_xxxxxxxxxxxxx"); } [Fact] - public void TestTreasuryFinancialAccountsGet2() + public async Task TestTreasuryOutboundTransfersGet2Async() { - var service = new Stripe.Treasury.FinancialAccountService( + var service = new Stripe.Treasury.OutboundTransferService( this.StripeClient); - Stripe.Treasury.FinancialAccount financialAccount = service.Get( - "fa_xxxxxxxxxxxxx"); + Stripe.Treasury.OutboundTransfer outboundTransfer = await service + .GetAsync("obt_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, - "/v1/treasury/financial_accounts/fa_xxxxxxxxxxxxx"); + "/v1/treasury/outbound_transfers/obt_xxxxxxxxxxxxx"); } [Fact] - public void TestTreasuryFinancialAccountsPost() + public void TestTreasuryOutboundTransfersPost() { - var options = new Stripe.Treasury.FinancialAccountCreateOptions + var options = new Stripe.Treasury.OutboundTransferCreateOptions { - SupportedCurrencies = new List { "usd" }, - Features = new Stripe.Treasury.FinancialAccountFeaturesOptions(), + FinancialAccount = "fa_xxxxxxxxxxxxx", + DestinationPaymentMethod = "pm_xxxxxxxxxxxxx", + Amount = 500, + Currency = "usd", + Description = "OutboundTransfer to my external bank account", }; - var service = new Stripe.Treasury.FinancialAccountService( + var service = new Stripe.Treasury.OutboundTransferService( this.StripeClient); - Stripe.Treasury.FinancialAccount financialAccount = service.Create( + Stripe.Treasury.OutboundTransfer outboundTransfer = service.Create( options); this.AssertRequest( HttpMethod.Post, - "/v1/treasury/financial_accounts"); + "/v1/treasury/outbound_transfers"); } [Fact] - public void TestTreasuryFinancialAccountsPost2() + public async Task TestTreasuryOutboundTransfersPostAsync() { - var options = new Stripe.Treasury.FinancialAccountUpdateOptions + var options = new Stripe.Treasury.OutboundTransferCreateOptions { - Metadata = new Dictionary - { - { "order_id", "6735" }, - }, + FinancialAccount = "fa_xxxxxxxxxxxxx", + DestinationPaymentMethod = "pm_xxxxxxxxxxxxx", + Amount = 500, + Currency = "usd", + Description = "OutboundTransfer to my external bank account", }; - var service = new Stripe.Treasury.FinancialAccountService( + var service = new Stripe.Treasury.OutboundTransferService( this.StripeClient); - Stripe.Treasury.FinancialAccount financialAccount = service.Update( - "fa_xxxxxxxxxxxxx", - options); + Stripe.Treasury.OutboundTransfer outboundTransfer = await service + .CreateAsync(options); this.AssertRequest( HttpMethod.Post, - "/v1/treasury/financial_accounts/fa_xxxxxxxxxxxxx"); + "/v1/treasury/outbound_transfers"); } [Fact] - public void TestTreasuryInboundTransfersCancelPost() + public void TestTreasuryReceivedCreditsGet() { - var service = new Stripe.Treasury.InboundTransferService( + var options = new Stripe.Treasury.ReceivedCreditListOptions + { + FinancialAccount = "fa_xxxxxxxxxxxxx", + Limit = 3, + }; + var service = new Stripe.Treasury.ReceivedCreditService( this.StripeClient); - Stripe.Treasury.InboundTransfer inboundTransfer = service.Cancel( - "ibt_xxxxxxxxxxxxx"); + StripeList receivedCredits = service + .List(options); this.AssertRequest( - HttpMethod.Post, - "/v1/treasury/inbound_transfers/ibt_xxxxxxxxxxxxx/cancel"); + HttpMethod.Get, + "/v1/treasury/received_credits", + "financial_account=fa_xxxxxxxxxxxxx&limit=3"); } [Fact] - public void TestTreasuryInboundTransfersGet() + public async Task TestTreasuryReceivedCreditsGetAsync() { - var options = new Stripe.Treasury.InboundTransferListOptions + var options = new Stripe.Treasury.ReceivedCreditListOptions { FinancialAccount = "fa_xxxxxxxxxxxxx", Limit = 3, }; - var service = new Stripe.Treasury.InboundTransferService( + var service = new Stripe.Treasury.ReceivedCreditService( this.StripeClient); - StripeList inboundTransfers = service - .List(options); + StripeList receivedCredits = await service + .ListAsync(options); this.AssertRequest( HttpMethod.Get, - "/v1/treasury/inbound_transfers", + "/v1/treasury/received_credits", "financial_account=fa_xxxxxxxxxxxxx&limit=3"); } [Fact] - public void TestTreasuryInboundTransfersGet2() + public void TestTreasuryReceivedCreditsGetAutoPaging() { - var service = new Stripe.Treasury.InboundTransferService( + var options = new Stripe.Treasury.ReceivedCreditListOptions + { + FinancialAccount = "fa_xxxxxxxxxxxxx", + Limit = 3, + }; + var service = new Stripe.Treasury.ReceivedCreditService( this.StripeClient); - Stripe.Treasury.InboundTransfer inboundTransfer = service.Get( - "ibt_xxxxxxxxxxxxx"); + var receivedCredit = service.ListAutoPaging(options).First(); this.AssertRequest( HttpMethod.Get, - "/v1/treasury/inbound_transfers/ibt_xxxxxxxxxxxxx"); + "/v1/treasury/received_credits", + "financial_account=fa_xxxxxxxxxxxxx&limit=3"); } [Fact] - public void TestTreasuryInboundTransfersPost() + public async Task TestTreasuryReceivedCreditsGetAutoPagingAsync() { - var options = new Stripe.Treasury.InboundTransferCreateOptions + var options = new Stripe.Treasury.ReceivedCreditListOptions { FinancialAccount = "fa_xxxxxxxxxxxxx", - Amount = 10000, - Currency = "usd", - OriginPaymentMethod = "pm_xxxxxxxxxxxxx", - Description = "InboundTransfer from my bank account", + Limit = 3, }; - var service = new Stripe.Treasury.InboundTransferService( + var service = new Stripe.Treasury.ReceivedCreditService( this.StripeClient); - Stripe.Treasury.InboundTransfer inboundTransfer = service.Create( - options); + var receivedCredit = await service.ListAutoPagingAsync(options) + .FirstAsync(); this.AssertRequest( - HttpMethod.Post, - "/v1/treasury/inbound_transfers"); + HttpMethod.Get, + "/v1/treasury/received_credits", + "financial_account=fa_xxxxxxxxxxxxx&limit=3"); } [Fact] - public void TestTreasuryOutboundPaymentsCancelPost() + public void TestTreasuryReceivedCreditsGet2() { - var service = new Stripe.Treasury.OutboundPaymentService( + var service = new Stripe.Treasury.ReceivedCreditService( this.StripeClient); - Stripe.Treasury.OutboundPayment outboundPayment = service.Cancel( - "bot_xxxxxxxxxxxxx"); + Stripe.Treasury.ReceivedCredit receivedCredit = service.Get( + "rc_xxxxxxxxxxxxx"); this.AssertRequest( - HttpMethod.Post, - "/v1/treasury/outbound_payments/bot_xxxxxxxxxxxxx/cancel"); + HttpMethod.Get, + "/v1/treasury/received_credits/rc_xxxxxxxxxxxxx"); } [Fact] - public void TestTreasuryOutboundPaymentsGet() + public async Task TestTreasuryReceivedCreditsGet2Async() { - var options = new Stripe.Treasury.OutboundPaymentListOptions + var service = new Stripe.Treasury.ReceivedCreditService( + this.StripeClient); + Stripe.Treasury.ReceivedCredit receivedCredit = await service + .GetAsync("rc_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/received_credits/rc_xxxxxxxxxxxxx"); + } + + [Fact] + public void TestTreasuryReceivedDebitsGet() + { + var options = new Stripe.Treasury.ReceivedDebitListOptions { FinancialAccount = "fa_xxxxxxxxxxxxx", Limit = 3, }; - var service = new Stripe.Treasury.OutboundPaymentService( + var service = new Stripe.Treasury.ReceivedDebitService( this.StripeClient); - StripeList outboundPayments = service + StripeList receivedDebits = service .List(options); this.AssertRequest( HttpMethod.Get, - "/v1/treasury/outbound_payments", + "/v1/treasury/received_debits", "financial_account=fa_xxxxxxxxxxxxx&limit=3"); } [Fact] - public void TestTreasuryOutboundPaymentsGet2() + public async Task TestTreasuryReceivedDebitsGetAsync() { - var service = new Stripe.Treasury.OutboundPaymentService( + var options = new Stripe.Treasury.ReceivedDebitListOptions + { + FinancialAccount = "fa_xxxxxxxxxxxxx", + Limit = 3, + }; + var service = new Stripe.Treasury.ReceivedDebitService( this.StripeClient); - Stripe.Treasury.OutboundPayment outboundPayment = service.Get( - "bot_xxxxxxxxxxxxx"); + StripeList receivedDebits = await service + .ListAsync(options); this.AssertRequest( HttpMethod.Get, - "/v1/treasury/outbound_payments/bot_xxxxxxxxxxxxx"); + "/v1/treasury/received_debits", + "financial_account=fa_xxxxxxxxxxxxx&limit=3"); } [Fact] - public void TestTreasuryOutboundPaymentsPost() + public void TestTreasuryReceivedDebitsGetAutoPaging() { - var options = new Stripe.Treasury.OutboundPaymentCreateOptions + var options = new Stripe.Treasury.ReceivedDebitListOptions { FinancialAccount = "fa_xxxxxxxxxxxxx", - Amount = 10000, - Currency = "usd", - Customer = "cus_xxxxxxxxxxxxx", - DestinationPaymentMethod = "pm_xxxxxxxxxxxxx", - Description = "OutboundPayment to a 3rd party", + Limit = 3, }; - var service = new Stripe.Treasury.OutboundPaymentService( + var service = new Stripe.Treasury.ReceivedDebitService( this.StripeClient); - Stripe.Treasury.OutboundPayment outboundPayment = service.Create( - options); + var receivedDebit = service.ListAutoPaging(options).First(); this.AssertRequest( - HttpMethod.Post, - "/v1/treasury/outbound_payments"); + HttpMethod.Get, + "/v1/treasury/received_debits", + "financial_account=fa_xxxxxxxxxxxxx&limit=3"); } [Fact] - public void TestTreasuryOutboundTransfersCancelPost() + public async Task TestTreasuryReceivedDebitsGetAutoPagingAsync() { - var service = new Stripe.Treasury.OutboundTransferService( + var options = new Stripe.Treasury.ReceivedDebitListOptions + { + FinancialAccount = "fa_xxxxxxxxxxxxx", + Limit = 3, + }; + var service = new Stripe.Treasury.ReceivedDebitService( this.StripeClient); - Stripe.Treasury.OutboundTransfer outboundTransfer = service.Cancel( - "obt_xxxxxxxxxxxxx"); + var receivedDebit = await service.ListAutoPagingAsync(options) + .FirstAsync(); this.AssertRequest( - HttpMethod.Post, - "/v1/treasury/outbound_transfers/obt_xxxxxxxxxxxxx/cancel"); + HttpMethod.Get, + "/v1/treasury/received_debits", + "financial_account=fa_xxxxxxxxxxxxx&limit=3"); + } + + [Fact] + public void TestTreasuryReceivedDebitsGet2() + { + var service = new Stripe.Treasury.ReceivedDebitService( + this.StripeClient); + Stripe.Treasury.ReceivedDebit receivedDebit = service.Get( + "rd_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/received_debits/rd_xxxxxxxxxxxxx"); + } + + [Fact] + public async Task TestTreasuryReceivedDebitsGet2Async() + { + var service = new Stripe.Treasury.ReceivedDebitService( + this.StripeClient); + Stripe.Treasury.ReceivedDebit receivedDebit = await service + .GetAsync("rd_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/received_debits/rd_xxxxxxxxxxxxx"); } [Fact] - public void TestTreasuryOutboundTransfersGet() + public void TestTreasuryTransactionEntriesGet() { - var options = new Stripe.Treasury.OutboundTransferListOptions + var options = new Stripe.Treasury.TransactionEntryListOptions { FinancialAccount = "fa_xxxxxxxxxxxxx", Limit = 3, }; - var service = new Stripe.Treasury.OutboundTransferService( + var service = new Stripe.Treasury.TransactionEntryService( this.StripeClient); - StripeList outboundTransfers = service + StripeList transactionEntries = service .List(options); this.AssertRequest( HttpMethod.Get, - "/v1/treasury/outbound_transfers", + "/v1/treasury/transaction_entries", "financial_account=fa_xxxxxxxxxxxxx&limit=3"); } [Fact] - public void TestTreasuryOutboundTransfersGet2() + public async Task TestTreasuryTransactionEntriesGetAsync() { - var service = new Stripe.Treasury.OutboundTransferService( + var options = new Stripe.Treasury.TransactionEntryListOptions + { + FinancialAccount = "fa_xxxxxxxxxxxxx", + Limit = 3, + }; + var service = new Stripe.Treasury.TransactionEntryService( this.StripeClient); - Stripe.Treasury.OutboundTransfer outboundTransfer = service.Get( - "obt_xxxxxxxxxxxxx"); + StripeList transactionEntries = await service + .ListAsync(options); this.AssertRequest( HttpMethod.Get, - "/v1/treasury/outbound_transfers/obt_xxxxxxxxxxxxx"); + "/v1/treasury/transaction_entries", + "financial_account=fa_xxxxxxxxxxxxx&limit=3"); } [Fact] - public void TestTreasuryOutboundTransfersPost() + public void TestTreasuryTransactionEntriesGetAutoPaging() { - var options = new Stripe.Treasury.OutboundTransferCreateOptions + var options = new Stripe.Treasury.TransactionEntryListOptions { FinancialAccount = "fa_xxxxxxxxxxxxx", - DestinationPaymentMethod = "pm_xxxxxxxxxxxxx", - Amount = 500, - Currency = "usd", - Description = "OutboundTransfer to my external bank account", + Limit = 3, }; - var service = new Stripe.Treasury.OutboundTransferService( + var service = new Stripe.Treasury.TransactionEntryService( this.StripeClient); - Stripe.Treasury.OutboundTransfer outboundTransfer = service.Create( - options); + var transactionEntry = service.ListAutoPaging(options).First(); this.AssertRequest( - HttpMethod.Post, - "/v1/treasury/outbound_transfers"); + HttpMethod.Get, + "/v1/treasury/transaction_entries", + "financial_account=fa_xxxxxxxxxxxxx&limit=3"); } [Fact] - public void TestTreasuryReceivedCreditsGet() + public async Task TestTreasuryTransactionEntriesGetAutoPagingAsync() { - var options = new Stripe.Treasury.ReceivedCreditListOptions + var options = new Stripe.Treasury.TransactionEntryListOptions { FinancialAccount = "fa_xxxxxxxxxxxxx", Limit = 3, }; - var service = new Stripe.Treasury.ReceivedCreditService( + var service = new Stripe.Treasury.TransactionEntryService( this.StripeClient); - StripeList receivedCredits = service - .List(options); + var transactionEntry = await service.ListAutoPagingAsync(options) + .FirstAsync(); this.AssertRequest( HttpMethod.Get, - "/v1/treasury/received_credits", + "/v1/treasury/transaction_entries", "financial_account=fa_xxxxxxxxxxxxx&limit=3"); } [Fact] - public void TestTreasuryReceivedCreditsGet2() + public void TestTreasuryTransactionEntriesGet2() { - var service = new Stripe.Treasury.ReceivedCreditService( + var service = new Stripe.Treasury.TransactionEntryService( this.StripeClient); - Stripe.Treasury.ReceivedCredit receivedCredit = service.Get( - "rc_xxxxxxxxxxxxx"); + Stripe.Treasury.TransactionEntry transactionEntry = service.Get( + "trxne_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, - "/v1/treasury/received_credits/rc_xxxxxxxxxxxxx"); + "/v1/treasury/transaction_entries/trxne_xxxxxxxxxxxxx"); } [Fact] - public void TestTreasuryReceivedDebitsGet() + public async Task TestTreasuryTransactionEntriesGet2Async() { - var options = new Stripe.Treasury.ReceivedDebitListOptions - { - FinancialAccount = "fa_xxxxxxxxxxxxx", - Limit = 3, - }; - var service = new Stripe.Treasury.ReceivedDebitService( + var service = new Stripe.Treasury.TransactionEntryService( this.StripeClient); - StripeList receivedDebits = service - .List(options); + Stripe.Treasury.TransactionEntry transactionEntry = await service + .GetAsync("trxne_xxxxxxxxxxxxx"); this.AssertRequest( HttpMethod.Get, - "/v1/treasury/received_debits", - "financial_account=fa_xxxxxxxxxxxxx&limit=3"); + "/v1/treasury/transaction_entries/trxne_xxxxxxxxxxxxx"); } [Fact] - public void TestTreasuryReceivedDebitsGet2() + public void TestTreasuryTransactionsGet() { - var service = new Stripe.Treasury.ReceivedDebitService( + var options = new Stripe.Treasury.TransactionListOptions + { + FinancialAccount = "fa_xxxxxxxxxxxxx", + Limit = 3, + }; + var service = new Stripe.Treasury.TransactionService( this.StripeClient); - Stripe.Treasury.ReceivedDebit receivedDebit = service.Get( - "rd_xxxxxxxxxxxxx"); + StripeList transactions = service.List( + options); this.AssertRequest( HttpMethod.Get, - "/v1/treasury/received_debits/rd_xxxxxxxxxxxxx"); + "/v1/treasury/transactions", + "financial_account=fa_xxxxxxxxxxxxx&limit=3"); } [Fact] - public void TestTreasuryTransactionEntriesGet() + public async Task TestTreasuryTransactionsGetAsync() { - var options = new Stripe.Treasury.TransactionEntryListOptions + var options = new Stripe.Treasury.TransactionListOptions { FinancialAccount = "fa_xxxxxxxxxxxxx", Limit = 3, }; - var service = new Stripe.Treasury.TransactionEntryService( + var service = new Stripe.Treasury.TransactionService( this.StripeClient); - StripeList transactionEntries = service - .List(options); + StripeList transactions = await service + .ListAsync(options); this.AssertRequest( HttpMethod.Get, - "/v1/treasury/transaction_entries", + "/v1/treasury/transactions", "financial_account=fa_xxxxxxxxxxxxx&limit=3"); } [Fact] - public void TestTreasuryTransactionEntriesGet2() + public void TestTreasuryTransactionsGetAutoPaging() { - var service = new Stripe.Treasury.TransactionEntryService( + var options = new Stripe.Treasury.TransactionListOptions + { + FinancialAccount = "fa_xxxxxxxxxxxxx", + Limit = 3, + }; + var service = new Stripe.Treasury.TransactionService( this.StripeClient); - Stripe.Treasury.TransactionEntry transactionEntry = service.Get( - "trxne_xxxxxxxxxxxxx"); + var transaction = service.ListAutoPaging(options).First(); this.AssertRequest( HttpMethod.Get, - "/v1/treasury/transaction_entries/trxne_xxxxxxxxxxxxx"); + "/v1/treasury/transactions", + "financial_account=fa_xxxxxxxxxxxxx&limit=3"); } [Fact] - public void TestTreasuryTransactionsGet() + public async Task TestTreasuryTransactionsGetAutoPagingAsync() { var options = new Stripe.Treasury.TransactionListOptions { @@ -6069,8 +14878,8 @@ public void TestTreasuryTransactionsGet() }; var service = new Stripe.Treasury.TransactionService( this.StripeClient); - StripeList transactions = service.List( - options); + var transaction = await service.ListAutoPagingAsync(options) + .FirstAsync(); this.AssertRequest( HttpMethod.Get, "/v1/treasury/transactions", @@ -6089,6 +14898,18 @@ public void TestTreasuryTransactionsGet2() "/v1/treasury/transactions/trxn_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestTreasuryTransactionsGet2Async() + { + var service = new Stripe.Treasury.TransactionService( + this.StripeClient); + Stripe.Treasury.Transaction transaction = await service.GetAsync( + "trxn_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/treasury/transactions/trxn_xxxxxxxxxxxxx"); + } + [Fact] public void TestWebhookEndpointsDelete() { @@ -6099,6 +14920,17 @@ public void TestWebhookEndpointsDelete() "/v1/webhook_endpoints/we_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestWebhookEndpointsDeleteAsync() + { + var service = new WebhookEndpointService(this.StripeClient); + WebhookEndpoint deleted = await service.DeleteAsync( + "we_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Delete, + "/v1/webhook_endpoints/we_xxxxxxxxxxxxx"); + } + [Fact] public void TestWebhookEndpointsGet() { @@ -6112,6 +14944,44 @@ public void TestWebhookEndpointsGet() "limit=3"); } + [Fact] + public async Task TestWebhookEndpointsGetAsync() + { + var options = new WebhookEndpointListOptions { Limit = 3 }; + var service = new WebhookEndpointService(this.StripeClient); + StripeList webhookEndpoints = await service + .ListAsync(options); + this.AssertRequest( + HttpMethod.Get, + "/v1/webhook_endpoints", + "limit=3"); + } + + [Fact] + public void TestWebhookEndpointsGetAutoPaging() + { + var options = new WebhookEndpointListOptions { Limit = 3 }; + var service = new WebhookEndpointService(this.StripeClient); + var webhookEndpoint = service.ListAutoPaging(options).First(); + this.AssertRequest( + HttpMethod.Get, + "/v1/webhook_endpoints", + "limit=3"); + } + + [Fact] + public async Task TestWebhookEndpointsGetAutoPagingAsync() + { + var options = new WebhookEndpointListOptions { Limit = 3 }; + var service = new WebhookEndpointService(this.StripeClient); + var webhookEndpoint = await service.ListAutoPagingAsync(options) + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v1/webhook_endpoints", + "limit=3"); + } + [Fact] public void TestWebhookEndpointsGet2() { @@ -6122,6 +14992,17 @@ public void TestWebhookEndpointsGet2() "/v1/webhook_endpoints/we_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestWebhookEndpointsGet2Async() + { + var service = new WebhookEndpointService(this.StripeClient); + WebhookEndpoint webhookEndpoint = await service.GetAsync( + "we_xxxxxxxxxxxxx"); + this.AssertRequest( + HttpMethod.Get, + "/v1/webhook_endpoints/we_xxxxxxxxxxxxx"); + } + [Fact] public void TestWebhookEndpointsPost() { @@ -6139,6 +15020,24 @@ public void TestWebhookEndpointsPost() this.AssertRequest(HttpMethod.Post, "/v1/webhook_endpoints"); } + [Fact] + public async Task TestWebhookEndpointsPostAsync() + { + var options = new WebhookEndpointCreateOptions + { + Url = "https://example.com/my/webhook/endpoint", + EnabledEvents = new List + { + "charge.failed", + "charge.succeeded", + }, + }; + var service = new WebhookEndpointService(this.StripeClient); + WebhookEndpoint webhookEndpoint = await service.CreateAsync( + options); + this.AssertRequest(HttpMethod.Post, "/v1/webhook_endpoints"); + } + [Fact] public void TestWebhookEndpointsPost2() { @@ -6155,6 +15054,22 @@ public void TestWebhookEndpointsPost2() "/v1/webhook_endpoints/we_xxxxxxxxxxxxx"); } + [Fact] + public async Task TestWebhookEndpointsPost2Async() + { + var options = new WebhookEndpointUpdateOptions + { + Url = "https://example.com/new_endpoint", + }; + var service = new WebhookEndpointService(this.StripeClient); + WebhookEndpoint webhookEndpoint = await service.UpdateAsync( + "we_xxxxxxxxxxxxx", + options); + this.AssertRequest( + HttpMethod.Post, + "/v1/webhook_endpoints/we_xxxxxxxxxxxxx"); + } + [Fact] public void TestV2BillingMeterEventPost() { @@ -6177,6 +15092,29 @@ public void TestV2BillingMeterEventPost() this.AssertRequest(HttpMethod.Post, "/v2/billing/meter_events"); } + [Fact] + public async Task TestV2BillingMeterEventPostAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/meter_events", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.meter_event\",\"created\":\"1970-01-12T21:42:34.472Z\",\"event_name\":\"event_name\",\"identifier\":\"identifier\",\"livemode\":true,\"payload\":{\"key\":\"payload\"},\"timestamp\":\"1970-01-01T15:18:46.294Z\"}"); + var options = new Stripe.V2.Billing.MeterEventCreateOptions + { + EventName = "event_name", + Payload = new Dictionary + { + { "key", "payload" }, + }, + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.MeterEvents; + Stripe.V2.Billing.MeterEvent meterEvent = await service.CreateAsync( + options); + this.AssertRequest(HttpMethod.Post, "/v2/billing/meter_events"); + } + [Fact] public void TestV2BillingMeterEventAdjustmentPost() { @@ -6195,16 +15133,60 @@ public void TestV2BillingMeterEventAdjustmentPost() Type = "cancel", }; var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.MeterEventAdjustments; - Stripe.V2.Billing.MeterEventAdjustment meterEventAdjustment = service + var service = client.V2.Billing.MeterEventAdjustments; + Stripe.V2.Billing.MeterEventAdjustment meterEventAdjustment = service + .Create(options); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/meter_event_adjustments"); + } + + [Fact] + public async Task TestV2BillingMeterEventAdjustmentPostAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/meter_event_adjustments", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.meter_event_adjustment\",\"cancel\":{\"identifier\":\"identifier\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"event_name\":\"event_name\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"complete\",\"type\":\"cancel\"}"); + var options = new Stripe.V2.Billing.MeterEventAdjustmentCreateOptions + { + Cancel = new Stripe.V2.Billing.MeterEventAdjustmentCreateCancelOptions + { + Identifier = "identifier", + }, + EventName = "event_name", + Type = "cancel", + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.MeterEventAdjustments; + Stripe.V2.Billing.MeterEventAdjustment meterEventAdjustment = await service + .CreateAsync(options); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/meter_event_adjustments"); + } + + [Fact] + public void TestV2BillingMeterEventSessionPost() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/meter_event_session", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.meter_event_session\",\"authentication_token\":\"authentication_token\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true}"); + var options = new Stripe.V2.Billing.MeterEventSessionCreateOptions(); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.MeterEventSession; + Stripe.V2.Billing.MeterEventSession meterEventSession = service .Create(options); this.AssertRequest( HttpMethod.Post, - "/v2/billing/meter_event_adjustments"); + "/v2/billing/meter_event_session"); } [Fact] - public void TestV2BillingMeterEventSessionPost() + public async Task TestV2BillingMeterEventSessionPostAsync() { this.StubRequest( HttpMethod.Post, @@ -6214,8 +15196,8 @@ public void TestV2BillingMeterEventSessionPost() var options = new Stripe.V2.Billing.MeterEventSessionCreateOptions(); var client = new StripeClient(this.Requestor); var service = client.V2.Billing.MeterEventSession; - Stripe.V2.Billing.MeterEventSession meterEventSession = service - .Create(options); + Stripe.V2.Billing.MeterEventSession meterEventSession = await service + .CreateAsync(options); this.AssertRequest( HttpMethod.Post, "/v2/billing/meter_event_session"); @@ -6255,6 +15237,40 @@ public void TestV2BillingMeterEventStreamPost() "/v2/billing/meter_event_stream"); } + [Fact] + public async Task TestV2BillingMeterEventStreamPostAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/meter_event_stream", + (HttpStatusCode)200, + "{}"); + var options = new Stripe.V2.Billing.MeterEventStreamCreateOptions + { + Events = new List + { + new Stripe.V2.Billing.MeterEventStreamCreateEventOptions + { + EventName = "event_name", + Identifier = "identifier", + Payload = new Dictionary + { + { "key", "payload" }, + }, + Timestamp = DateTimeOffset.Parse( + "1970-01-01T15:18:46.294Z") + .UtcDateTime, + }, + }, + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.MeterEventStream; + await service.CreateAsync(options); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/meter_event_stream"); + } + [Fact] public void TestV2CommerceProductCatalogImportGet() { @@ -6272,6 +15288,56 @@ public void TestV2CommerceProductCatalogImportGet() "/v2/commerce/product_catalog/imports"); } + [Fact] + public async Task TestV2CommerceProductCatalogImportGetAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/commerce/product_catalog/imports", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.commerce.product_catalog_import\",\"created\":\"1970-01-12T21:42:34.472Z\",\"feed_type\":\"pricing\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"status\":\"awaiting_upload\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Commerce.ProductCatalog.Imports; + Stripe.V2.StripeList productCatalogImports = await service + .ListAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v2/commerce/product_catalog/imports"); + } + + [Fact] + public void TestV2CommerceProductCatalogImportGetAutoPaging() + { + this.StubRequest( + HttpMethod.Get, + "/v2/commerce/product_catalog/imports", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.commerce.product_catalog_import\",\"created\":\"1970-01-12T21:42:34.472Z\",\"feed_type\":\"pricing\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"status\":\"awaiting_upload\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Commerce.ProductCatalog.Imports; + var productCatalogImport = service.ListAutoPaging().First(); + this.AssertRequest( + HttpMethod.Get, + "/v2/commerce/product_catalog/imports"); + } + + [Fact] + public async Task TestV2CommerceProductCatalogImportGetAutoPagingAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/commerce/product_catalog/imports", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.commerce.product_catalog_import\",\"created\":\"1970-01-12T21:42:34.472Z\",\"feed_type\":\"pricing\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"status\":\"awaiting_upload\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Commerce.ProductCatalog.Imports; + var productCatalogImport = await service.ListAutoPagingAsync() + .FirstAsync(); + this.AssertRequest( + HttpMethod.Get, + "/v2/commerce/product_catalog/imports"); + } + [Fact] public void TestV2CommerceProductCatalogImportPost() { @@ -6298,6 +15364,32 @@ public void TestV2CommerceProductCatalogImportPost() "/v2/commerce/product_catalog/imports"); } + [Fact] + public async Task TestV2CommerceProductCatalogImportPostAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/commerce/product_catalog/imports", + (HttpStatusCode)200, + "{\"object\":\"v2.commerce.product_catalog_import\",\"created\":\"1970-01-12T21:42:34.472Z\",\"feed_type\":\"pricing\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"status\":\"awaiting_upload\"}"); + var options = new Stripe.V2.Commerce.ProductCatalog.ImportCreateOptions + { + FeedType = "pricing", + Metadata = new Dictionary + { + { "key", "metadata" }, + }, + Mode = "upsert", + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Commerce.ProductCatalog.Imports; + Stripe.V2.Commerce.ProductCatalogImport productCatalogImport = await service + .CreateAsync(options); + this.AssertRequest( + HttpMethod.Post, + "/v2/commerce/product_catalog/imports"); + } + [Fact] public void TestV2CommerceProductCatalogImportGet2() { @@ -6315,6 +15407,23 @@ public void TestV2CommerceProductCatalogImportGet2() "/v2/commerce/product_catalog/imports/id_123"); } + [Fact] + public async Task TestV2CommerceProductCatalogImportGet2Async() + { + this.StubRequest( + HttpMethod.Get, + "/v2/commerce/product_catalog/imports/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.commerce.product_catalog_import\",\"created\":\"1970-01-12T21:42:34.472Z\",\"feed_type\":\"pricing\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"status\":\"awaiting_upload\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Commerce.ProductCatalog.Imports; + Stripe.V2.Commerce.ProductCatalogImport productCatalogImport = await service + .GetAsync("id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/commerce/product_catalog/imports/id_123"); + } + [Fact] public void TestV2CoreAccountGet() { @@ -6330,6 +15439,49 @@ public void TestV2CoreAccountGet() this.AssertRequest(HttpMethod.Get, "/v2/core/accounts"); } + [Fact] + public async Task TestV2CoreAccountGetAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/accounts", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.core.account\",\"applied_configurations\":[\"recipient\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Accounts; + Stripe.V2.StripeList accounts = await service + .ListAsync(); + this.AssertRequest(HttpMethod.Get, "/v2/core/accounts"); + } + + [Fact] + public void TestV2CoreAccountGetAutoPaging() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/accounts", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.core.account\",\"applied_configurations\":[\"recipient\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Accounts; + var account = service.ListAutoPaging().First(); + this.AssertRequest(HttpMethod.Get, "/v2/core/accounts"); + } + + [Fact] + public async Task TestV2CoreAccountGetAutoPagingAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/accounts", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.core.account\",\"applied_configurations\":[\"recipient\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Accounts; + var account = await service.ListAutoPagingAsync().FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v2/core/accounts"); + } + [Fact] public void TestV2CoreAccountPost() { @@ -6346,52 +15498,165 @@ public void TestV2CoreAccountPost() } [Fact] - public void TestV2CoreAccountGet2() + public async Task TestV2CoreAccountPostAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/accounts", + (HttpStatusCode)200, + "{\"object\":\"v2.core.account\",\"applied_configurations\":[\"recipient\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true}"); + var options = new Stripe.V2.Core.AccountCreateOptions(); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Accounts; + Stripe.V2.Core.Account account = await service.CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v2/core/accounts"); + } + + [Fact] + public void TestV2CoreAccountGet2() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/accounts/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.core.account\",\"applied_configurations\":[\"recipient\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Accounts; + Stripe.V2.Core.Account account = service.Get("id_123"); + this.AssertRequest(HttpMethod.Get, "/v2/core/accounts/id_123"); + } + + [Fact] + public async Task TestV2CoreAccountGet2Async() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/accounts/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.core.account\",\"applied_configurations\":[\"recipient\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Accounts; + Stripe.V2.Core.Account account = await service.GetAsync("id_123"); + this.AssertRequest(HttpMethod.Get, "/v2/core/accounts/id_123"); + } + + [Fact] + public void TestV2CoreAccountPost2() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/accounts/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.core.account\",\"applied_configurations\":[\"recipient\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true}"); + var options = new Stripe.V2.Core.AccountUpdateOptions(); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Accounts; + Stripe.V2.Core.Account account = service.Update("id_123", options); + this.AssertRequest(HttpMethod.Post, "/v2/core/accounts/id_123"); + } + + [Fact] + public async Task TestV2CoreAccountPost2Async() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/accounts/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.core.account\",\"applied_configurations\":[\"recipient\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true}"); + var options = new Stripe.V2.Core.AccountUpdateOptions(); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Accounts; + Stripe.V2.Core.Account account = await service.UpdateAsync( + "id_123", + options); + this.AssertRequest(HttpMethod.Post, "/v2/core/accounts/id_123"); + } + + [Fact] + public void TestV2CoreAccountPost3() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/accounts/id_123/close", + (HttpStatusCode)200, + "{\"object\":\"v2.core.account\",\"applied_configurations\":[\"recipient\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Accounts; + Stripe.V2.Core.Account account = service.Close("id_123"); + this.AssertRequest( + HttpMethod.Post, + "/v2/core/accounts/id_123/close"); + } + + [Fact] + public async Task TestV2CoreAccountPost3Async() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/accounts/id_123/close", + (HttpStatusCode)200, + "{\"object\":\"v2.core.account\",\"applied_configurations\":[\"recipient\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Accounts; + Stripe.V2.Core.Account account = await service.CloseAsync("id_123"); + this.AssertRequest( + HttpMethod.Post, + "/v2/core/accounts/id_123/close"); + } + + [Fact] + public void TestV2CoreAccountsPersonGet() { this.StubRequest( HttpMethod.Get, - "/v2/core/accounts/id_123", + "/v2/core/accounts/account_id_123/persons", (HttpStatusCode)200, - "{\"object\":\"v2.core.account\",\"applied_configurations\":[\"recipient\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true}"); + "{\"data\":[{\"object\":\"v2.core.account_person\",\"account\":\"account\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"updated\":\"1970-01-03T17:07:10.277Z\"}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Core.Accounts; - Stripe.V2.Core.Account account = service.Get("id_123"); - this.AssertRequest(HttpMethod.Get, "/v2/core/accounts/id_123"); + var service = client.V2.Core.Accounts.Persons; + Stripe.V2.StripeList accountPersons = service + .List("account_id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/core/accounts/account_id_123/persons"); } [Fact] - public void TestV2CoreAccountPost2() + public async Task TestV2CoreAccountsPersonGetAsync() { this.StubRequest( - HttpMethod.Post, - "/v2/core/accounts/id_123", + HttpMethod.Get, + "/v2/core/accounts/account_id_123/persons", (HttpStatusCode)200, - "{\"object\":\"v2.core.account\",\"applied_configurations\":[\"recipient\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true}"); - var options = new Stripe.V2.Core.AccountUpdateOptions(); + "{\"data\":[{\"object\":\"v2.core.account_person\",\"account\":\"account\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"updated\":\"1970-01-03T17:07:10.277Z\"}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Core.Accounts; - Stripe.V2.Core.Account account = service.Update("id_123", options); - this.AssertRequest(HttpMethod.Post, "/v2/core/accounts/id_123"); + var service = client.V2.Core.Accounts.Persons; + Stripe.V2.StripeList accountPersons = await service + .ListAsync("account_id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/core/accounts/account_id_123/persons"); } [Fact] - public void TestV2CoreAccountPost3() + public void TestV2CoreAccountsPersonGetAutoPaging() { this.StubRequest( - HttpMethod.Post, - "/v2/core/accounts/id_123/close", + HttpMethod.Get, + "/v2/core/accounts/account_id_123/persons", (HttpStatusCode)200, - "{\"object\":\"v2.core.account\",\"applied_configurations\":[\"recipient\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true}"); + "{\"data\":[{\"object\":\"v2.core.account_person\",\"account\":\"account\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"updated\":\"1970-01-03T17:07:10.277Z\"}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Core.Accounts; - Stripe.V2.Core.Account account = service.Close("id_123"); + var service = client.V2.Core.Accounts.Persons; + var accountPerson = service.ListAutoPaging("account_id_123") + .First(); this.AssertRequest( - HttpMethod.Post, - "/v2/core/accounts/id_123/close"); + HttpMethod.Get, + "/v2/core/accounts/account_id_123/persons"); } [Fact] - public void TestV2CoreAccountsPersonGet() + public async Task TestV2CoreAccountsPersonGetAutoPagingAsync() { this.StubRequest( HttpMethod.Get, @@ -6400,8 +15665,9 @@ public void TestV2CoreAccountsPersonGet() "{\"data\":[{\"object\":\"v2.core.account_person\",\"account\":\"account\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"updated\":\"1970-01-03T17:07:10.277Z\"}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); var service = client.V2.Core.Accounts.Persons; - Stripe.V2.StripeList accountPersons = service - .List("account_id_123"); + var accountPerson = await service.ListAutoPagingAsync( + "account_id_123") + .FirstAsync(); this.AssertRequest( HttpMethod.Get, "/v2/core/accounts/account_id_123/persons"); @@ -6426,6 +15692,24 @@ public void TestV2CoreAccountsPersonPost() "/v2/core/accounts/account_id_123/persons"); } + [Fact] + public async Task TestV2CoreAccountsPersonPostAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/accounts/account_id_123/persons", + (HttpStatusCode)200, + "{\"object\":\"v2.core.account_person\",\"account\":\"account\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"updated\":\"1970-01-03T17:07:10.277Z\"}"); + var options = new Stripe.V2.Core.Accounts.PersonCreateOptions(); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Accounts.Persons; + Stripe.V2.Core.AccountPerson accountPerson = await service + .CreateAsync("account_id_123", options); + this.AssertRequest( + HttpMethod.Post, + "/v2/core/accounts/account_id_123/persons"); + } + [Fact] public void TestV2CoreAccountsPersonDelete() { @@ -6444,6 +15728,24 @@ public void TestV2CoreAccountsPersonDelete() "/v2/core/accounts/account_id_123/persons/id_123"); } + [Fact] + public async Task TestV2CoreAccountsPersonDeleteAsync() + { + this.StubRequest( + HttpMethod.Delete, + "/v2/core/accounts/account_id_123/persons/id_123", + (HttpStatusCode)200, + "{\"id\":\"abc_123\",\"object\":\"some.object.tag\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Accounts.Persons; + Stripe.V2.DeletedObject deleted = await service.DeleteAsync( + "account_id_123", + "id_123"); + this.AssertRequest( + HttpMethod.Delete, + "/v2/core/accounts/account_id_123/persons/id_123"); + } + [Fact] public void TestV2CoreAccountsPersonGet2() { @@ -6462,6 +15764,24 @@ public void TestV2CoreAccountsPersonGet2() "/v2/core/accounts/account_id_123/persons/id_123"); } + [Fact] + public async Task TestV2CoreAccountsPersonGet2Async() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/accounts/account_id_123/persons/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.core.account_person\",\"account\":\"account\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"updated\":\"1970-01-03T17:07:10.277Z\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Accounts.Persons; + Stripe.V2.Core.AccountPerson accountPerson = await service.GetAsync( + "account_id_123", + "id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/core/accounts/account_id_123/persons/id_123"); + } + [Fact] public void TestV2CoreAccountsPersonPost2() { @@ -6482,6 +15802,24 @@ public void TestV2CoreAccountsPersonPost2() "/v2/core/accounts/account_id_123/persons/id_123"); } + [Fact] + public async Task TestV2CoreAccountsPersonPost2Async() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/accounts/account_id_123/persons/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.core.account_person\",\"account\":\"account\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"updated\":\"1970-01-03T17:07:10.277Z\"}"); + var options = new Stripe.V2.Core.Accounts.PersonUpdateOptions(); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Accounts.Persons; + Stripe.V2.Core.AccountPerson accountPerson = await service + .UpdateAsync("account_id_123", "id_123", options); + this.AssertRequest( + HttpMethod.Post, + "/v2/core/accounts/account_id_123/persons/id_123"); + } + [Fact] public void TestV2CoreAccountsPersonTokenPost() { @@ -6500,6 +15838,24 @@ public void TestV2CoreAccountsPersonTokenPost() "/v2/core/accounts/account_id_123/person_tokens"); } + [Fact] + public async Task TestV2CoreAccountsPersonTokenPostAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/accounts/account_id_123/person_tokens", + (HttpStatusCode)200, + "{\"object\":\"v2.core.account_person_token\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"used\":true}"); + var options = new Stripe.V2.Core.Accounts.PersonTokenCreateOptions(); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Accounts.PersonTokens; + Stripe.V2.Core.AccountPersonToken accountPersonToken = await service + .CreateAsync("account_id_123", options); + this.AssertRequest( + HttpMethod.Post, + "/v2/core/accounts/account_id_123/person_tokens"); + } + [Fact] public void TestV2CoreAccountsPersonTokenGet() { @@ -6518,6 +15874,23 @@ public void TestV2CoreAccountsPersonTokenGet() "/v2/core/accounts/account_id_123/person_tokens/id_123"); } + [Fact] + public async Task TestV2CoreAccountsPersonTokenGetAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/accounts/account_id_123/person_tokens/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.core.account_person_token\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"used\":true}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Accounts.PersonTokens; + Stripe.V2.Core.AccountPersonToken accountPersonToken = await service + .GetAsync("account_id_123", "id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/core/accounts/account_id_123/person_tokens/id_123"); + } + [Fact] public void TestV2CoreAccountLinkPost() { @@ -6563,38 +15936,159 @@ public void TestV2CoreAccountLinkPost() } [Fact] - public void TestV2CoreAccountTokenPost() + public async Task TestV2CoreAccountLinkPostAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/account_links", + (HttpStatusCode)200, + "{\"object\":\"v2.core.account_link\",\"account\":\"account\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"livemode\":true,\"url\":\"url\",\"use_case\":{\"type\":\"account_onboarding\"}}"); + var options = new Stripe.V2.Core.AccountLinkCreateOptions + { + Account = "account", + UseCase = new Stripe.V2.Core.AccountLinkCreateUseCaseOptions + { + AccountOnboarding = new Stripe.V2.Core.AccountLinkCreateUseCaseAccountOnboardingOptions + { + CollectionOptions = new Stripe.V2.Core.AccountLinkCreateUseCaseAccountOnboardingCollectionOptionsOptions + { + Fields = "eventually_due", + FutureRequirements = "include", + }, + Configurations = new List { "merchant" }, + RefreshUrl = "refresh_url", + ReturnUrl = "return_url", + }, + AccountUpdate = new Stripe.V2.Core.AccountLinkCreateUseCaseAccountUpdateOptions + { + CollectionOptions = new Stripe.V2.Core.AccountLinkCreateUseCaseAccountUpdateCollectionOptionsOptions + { + Fields = "eventually_due", + FutureRequirements = "include", + }, + Configurations = new List { "merchant" }, + RefreshUrl = "refresh_url", + ReturnUrl = "return_url", + }, + Type = "account_onboarding", + }, + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.AccountLinks; + Stripe.V2.Core.AccountLink accountLink = await service.CreateAsync( + options); + this.AssertRequest(HttpMethod.Post, "/v2/core/account_links"); + } + + [Fact] + public void TestV2CoreAccountTokenPost() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/account_tokens", + (HttpStatusCode)200, + "{\"object\":\"v2.core.account_token\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"used\":true}"); + var options = new Stripe.V2.Core.AccountTokenCreateOptions(); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.AccountTokens; + Stripe.V2.Core.AccountToken accountToken = service.Create(options); + this.AssertRequest(HttpMethod.Post, "/v2/core/account_tokens"); + } + + [Fact] + public async Task TestV2CoreAccountTokenPostAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/account_tokens", + (HttpStatusCode)200, + "{\"object\":\"v2.core.account_token\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"used\":true}"); + var options = new Stripe.V2.Core.AccountTokenCreateOptions(); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.AccountTokens; + Stripe.V2.Core.AccountToken accountToken = await service + .CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v2/core/account_tokens"); + } + + [Fact] + public void TestV2CoreAccountTokenGet() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/account_tokens/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.core.account_token\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"used\":true}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.AccountTokens; + Stripe.V2.Core.AccountToken accountToken = service.Get("id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/core/account_tokens/id_123"); + } + + [Fact] + public async Task TestV2CoreAccountTokenGetAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/account_tokens/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.core.account_token\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"used\":true}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.AccountTokens; + Stripe.V2.Core.AccountToken accountToken = await service.GetAsync( + "id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/core/account_tokens/id_123"); + } + + [Fact] + public void TestV2CoreEventGet() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/events", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.core.event\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"type\":\"type\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Events; + Stripe.V2.StripeList events = service.List(); + this.AssertRequest(HttpMethod.Get, "/v2/core/events"); + } + + [Fact] + public async Task TestV2CoreEventGetAsync() { this.StubRequest( - HttpMethod.Post, - "/v2/core/account_tokens", + HttpMethod.Get, + "/v2/core/events", (HttpStatusCode)200, - "{\"object\":\"v2.core.account_token\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"used\":true}"); - var options = new Stripe.V2.Core.AccountTokenCreateOptions(); + "{\"data\":[{\"object\":\"v2.core.event\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"type\":\"type\"}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Core.AccountTokens; - Stripe.V2.Core.AccountToken accountToken = service.Create(options); - this.AssertRequest(HttpMethod.Post, "/v2/core/account_tokens"); + var service = client.V2.Core.Events; + Stripe.V2.StripeList events = await service + .ListAsync(); + this.AssertRequest(HttpMethod.Get, "/v2/core/events"); } [Fact] - public void TestV2CoreAccountTokenGet() + public void TestV2CoreEventGetAutoPaging() { this.StubRequest( HttpMethod.Get, - "/v2/core/account_tokens/id_123", + "/v2/core/events", (HttpStatusCode)200, - "{\"object\":\"v2.core.account_token\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"used\":true}"); + "{\"data\":[{\"object\":\"v2.core.event\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"type\":\"type\"}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); - var service = client.V2.Core.AccountTokens; - Stripe.V2.Core.AccountToken accountToken = service.Get("id_123"); - this.AssertRequest( - HttpMethod.Get, - "/v2/core/account_tokens/id_123"); + var service = client.V2.Core.Events; + var result = service.ListAutoPaging().First(); + this.AssertRequest(HttpMethod.Get, "/v2/core/events"); } [Fact] - public void TestV2CoreEventGet() + public async Task TestV2CoreEventGetAutoPagingAsync() { this.StubRequest( HttpMethod.Get, @@ -6603,7 +16097,7 @@ public void TestV2CoreEventGet() "{\"data\":[{\"object\":\"v2.core.event\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"type\":\"type\"}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); var service = client.V2.Core.Events; - Stripe.V2.StripeList events = service.List(); + var result = await service.ListAutoPagingAsync().FirstAsync(); this.AssertRequest(HttpMethod.Get, "/v2/core/events"); } @@ -6621,6 +16115,20 @@ public void TestV2CoreEventGet2() this.AssertRequest(HttpMethod.Get, "/v2/core/events/id_123"); } + [Fact] + public async Task TestV2CoreEventGet2Async() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/events/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.core.event\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"type\":\"type\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Events; + Stripe.V2.Core.Event result = await service.GetAsync("id_123"); + this.AssertRequest(HttpMethod.Get, "/v2/core/events/id_123"); + } + [Fact] public void TestV2CoreEventDestinationGet() { @@ -6636,6 +16144,50 @@ public void TestV2CoreEventDestinationGet() this.AssertRequest(HttpMethod.Get, "/v2/core/event_destinations"); } + [Fact] + public async Task TestV2CoreEventDestinationGetAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/event_destinations", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.core.event_destination\",\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"id\":\"obj_123\",\"livemode\":true,\"name\":\"name\",\"status\":\"disabled\",\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.EventDestinations; + Stripe.V2.StripeList eventDestinations = await service + .ListAsync(); + this.AssertRequest(HttpMethod.Get, "/v2/core/event_destinations"); + } + + [Fact] + public void TestV2CoreEventDestinationGetAutoPaging() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/event_destinations", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.core.event_destination\",\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"id\":\"obj_123\",\"livemode\":true,\"name\":\"name\",\"status\":\"disabled\",\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.EventDestinations; + var eventDestination = service.ListAutoPaging().First(); + this.AssertRequest(HttpMethod.Get, "/v2/core/event_destinations"); + } + + [Fact] + public async Task TestV2CoreEventDestinationGetAutoPagingAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/event_destinations", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.core.event_destination\",\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"id\":\"obj_123\",\"livemode\":true,\"name\":\"name\",\"status\":\"disabled\",\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.EventDestinations; + var eventDestination = await service.ListAutoPagingAsync() + .FirstAsync(); + this.AssertRequest(HttpMethod.Get, "/v2/core/event_destinations"); + } + [Fact] public void TestV2CoreEventDestinationPost() { @@ -6658,6 +16210,28 @@ public void TestV2CoreEventDestinationPost() this.AssertRequest(HttpMethod.Post, "/v2/core/event_destinations"); } + [Fact] + public async Task TestV2CoreEventDestinationPostAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/event_destinations", + (HttpStatusCode)200, + "{\"object\":\"v2.core.event_destination\",\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"id\":\"obj_123\",\"livemode\":true,\"name\":\"name\",\"status\":\"disabled\",\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\"}"); + var options = new Stripe.V2.Core.EventDestinationCreateOptions + { + EnabledEvents = new List { "enabled_events" }, + EventPayload = "thin", + Name = "name", + Type = "amazon_eventbridge", + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.EventDestinations; + Stripe.V2.Core.EventDestination eventDestination = await service + .CreateAsync(options); + this.AssertRequest(HttpMethod.Post, "/v2/core/event_destinations"); + } + [Fact] public void TestV2CoreEventDestinationDelete() { @@ -6674,6 +16248,23 @@ public void TestV2CoreEventDestinationDelete() "/v2/core/event_destinations/id_123"); } + [Fact] + public async Task TestV2CoreEventDestinationDeleteAsync() + { + this.StubRequest( + HttpMethod.Delete, + "/v2/core/event_destinations/id_123", + (HttpStatusCode)200, + "{\"id\":\"abc_123\",\"object\":\"some.object.tag\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.EventDestinations; + Stripe.V2.DeletedObject deleted = await service.DeleteAsync( + "id_123"); + this.AssertRequest( + HttpMethod.Delete, + "/v2/core/event_destinations/id_123"); + } + [Fact] public void TestV2CoreEventDestinationGet2() { @@ -6691,6 +16282,23 @@ public void TestV2CoreEventDestinationGet2() "/v2/core/event_destinations/id_123"); } + [Fact] + public async Task TestV2CoreEventDestinationGet2Async() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/event_destinations/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.core.event_destination\",\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"id\":\"obj_123\",\"livemode\":true,\"name\":\"name\",\"status\":\"disabled\",\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.EventDestinations; + Stripe.V2.Core.EventDestination eventDestination = await service + .GetAsync("id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/core/event_destinations/id_123"); + } + [Fact] public void TestV2CoreEventDestinationPost2() { @@ -6710,6 +16318,24 @@ public void TestV2CoreEventDestinationPost2() "/v2/core/event_destinations/id_123"); } + [Fact] + public async Task TestV2CoreEventDestinationPost2Async() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/event_destinations/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.core.event_destination\",\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"id\":\"obj_123\",\"livemode\":true,\"name\":\"name\",\"status\":\"disabled\",\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\"}"); + var options = new Stripe.V2.Core.EventDestinationUpdateOptions(); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.EventDestinations; + Stripe.V2.Core.EventDestination eventDestination = await service + .UpdateAsync("id_123", options); + this.AssertRequest( + HttpMethod.Post, + "/v2/core/event_destinations/id_123"); + } + [Fact] public void TestV2CoreEventDestinationPost3() { @@ -6727,6 +16353,23 @@ public void TestV2CoreEventDestinationPost3() "/v2/core/event_destinations/id_123/disable"); } + [Fact] + public async Task TestV2CoreEventDestinationPost3Async() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/event_destinations/id_123/disable", + (HttpStatusCode)200, + "{\"object\":\"v2.core.event_destination\",\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"id\":\"obj_123\",\"livemode\":true,\"name\":\"name\",\"status\":\"disabled\",\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.EventDestinations; + Stripe.V2.Core.EventDestination eventDestination = await service + .DisableAsync("id_123"); + this.AssertRequest( + HttpMethod.Post, + "/v2/core/event_destinations/id_123/disable"); + } + [Fact] public void TestV2CoreEventDestinationPost4() { @@ -6744,6 +16387,23 @@ public void TestV2CoreEventDestinationPost4() "/v2/core/event_destinations/id_123/enable"); } + [Fact] + public async Task TestV2CoreEventDestinationPost4Async() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/event_destinations/id_123/enable", + (HttpStatusCode)200, + "{\"object\":\"v2.core.event_destination\",\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"id\":\"obj_123\",\"livemode\":true,\"name\":\"name\",\"status\":\"disabled\",\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.EventDestinations; + Stripe.V2.Core.EventDestination eventDestination = await service + .EnableAsync("id_123"); + this.AssertRequest( + HttpMethod.Post, + "/v2/core/event_destinations/id_123/enable"); + } + [Fact] public void TestV2CoreEventDestinationPost5() { @@ -6760,6 +16420,22 @@ public void TestV2CoreEventDestinationPost5() "/v2/core/event_destinations/id_123/ping"); } + [Fact] + public async Task TestV2CoreEventDestinationPost5Async() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/event_destinations/id_123/ping", + (HttpStatusCode)200, + "{\"object\":\"v2.core.event\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"type\":\"type\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.EventDestinations; + Stripe.V2.Core.Event result = await service.PingAsync("id_123"); + this.AssertRequest( + HttpMethod.Post, + "/v2/core/event_destinations/id_123/ping"); + } + [Fact] public void TestRateLimitError() { @@ -6779,6 +16455,61 @@ public void TestRateLimitError() this.AssertRequest(HttpMethod.Get, "/v2/core/accounts"); } + [Fact] + public async Task TestRateLimitErrorAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/accounts", + (HttpStatusCode)400, + "{\"error\":{\"type\":\"rate_limit\",\"code\":\"account_rate_limit_exceeded\"}}"); + var exception = await Assert.ThrowsAsync( + async () => + { + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Accounts; + Stripe.V2.StripeList accounts = await service + .ListAsync(); + }); + this.AssertRequest(HttpMethod.Get, "/v2/core/accounts"); + } + + [Fact] + public void TestRateLimitErrorAutoPaging() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/accounts", + (HttpStatusCode)400, + "{\"error\":{\"type\":\"rate_limit\",\"code\":\"account_rate_limit_exceeded\"}}"); + var exception = Assert.Throws( + () => + { + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Accounts; + var account = service.ListAutoPaging().First(); + }); + this.AssertRequest(HttpMethod.Get, "/v2/core/accounts"); + } + + [Fact] + public async Task TestRateLimitErrorAutoPagingAsync() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/accounts", + (HttpStatusCode)400, + "{\"error\":{\"type\":\"rate_limit\",\"code\":\"account_rate_limit_exceeded\"}}"); + var exception = await Assert.ThrowsAsync( + async () => + { + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Accounts; + var account = await service.ListAutoPagingAsync().FirstAsync(); + }); + this.AssertRequest(HttpMethod.Get, "/v2/core/accounts"); + } + [Fact] public void TestTemporarySessionExpiredError() { @@ -6812,5 +16543,39 @@ public void TestTemporarySessionExpiredError() HttpMethod.Post, "/v2/billing/meter_event_stream"); } + + [Fact] + public async Task TestTemporarySessionExpiredErrorAsync() + { + this.StubRequest( + HttpMethod.Post, + "/v2/billing/meter_event_stream", + (HttpStatusCode)400, + "{\"error\":{\"type\":\"temporary_session_expired\",\"code\":\"billing_meter_event_session_expired\"}}"); + var exception = await Assert.ThrowsAsync( + async () => + { + var options = new Stripe.V2.Billing.MeterEventStreamCreateOptions + { + Events = new List + { + new Stripe.V2.Billing.MeterEventStreamCreateEventOptions + { + EventName = "event_name", + Payload = new Dictionary + { + { "key", "payload" }, + }, + }, + }, + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.MeterEventStream; + await service.CreateAsync(options); + }); + this.AssertRequest( + HttpMethod.Post, + "/v2/billing/meter_event_stream"); + } } } diff --git a/src/StripeTests/Services/Identity/VerificationReports/VerificationReportServiceTest.cs b/src/StripeTests/Services/Identity/VerificationReports/VerificationReportServiceTest.cs deleted file mode 100644 index aed8e9422a..0000000000 --- a/src/StripeTests/Services/Identity/VerificationReports/VerificationReportServiceTest.cs +++ /dev/null @@ -1,63 +0,0 @@ -namespace StripeTests.Identity -{ - using System.Collections.Generic; - using System.Linq; - using System.Net.Http; - using System.Threading.Tasks; - - using Stripe.Identity; - using Xunit; - - public class VerificationReportServiceTest : BaseStripeTest - { - private const string VerificationReportId = "vr_123"; - - private readonly VerificationReportService service; - private readonly VerificationReportListOptions listOptions; - - public VerificationReportServiceTest( - StripeMockFixture stripeMockFixture, - MockHttpClientFixture mockHttpClientFixture) - : base(stripeMockFixture, mockHttpClientFixture) - { - this.service = new VerificationReportService(this.StripeClient); - - this.listOptions = new VerificationReportListOptions - { - Limit = 1, - }; - } - - [Fact] - public void Get() - { - var verificationReport = this.service.Get(VerificationReportId); - this.AssertRequest(HttpMethod.Get, "/v1/identity/verification_reports/vr_123"); - Assert.NotNull(verificationReport); - } - - [Fact] - public async Task GetAsync() - { - var verificationReport = await this.service.GetAsync(VerificationReportId); - this.AssertRequest(HttpMethod.Get, "/v1/identity/verification_reports/vr_123"); - Assert.NotNull(verificationReport); - } - - [Fact] - public void List() - { - var verificationReports = this.service.List(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/identity/verification_reports"); - Assert.NotNull(verificationReports); - } - - [Fact] - public async Task ListAsync() - { - var verificationReports = await this.service.ListAsync(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/identity/verification_reports"); - Assert.NotNull(verificationReports); - } - } -} diff --git a/src/StripeTests/Services/Identity/VerificationSessions/VerificationSessionServiceTest.cs b/src/StripeTests/Services/Identity/VerificationSessions/VerificationSessionServiceTest.cs deleted file mode 100644 index 7f40d417b3..0000000000 --- a/src/StripeTests/Services/Identity/VerificationSessions/VerificationSessionServiceTest.cs +++ /dev/null @@ -1,158 +0,0 @@ -namespace StripeTests.Identity -{ - using System.Collections.Generic; - using System.Linq; - using System.Net.Http; - using System.Threading.Tasks; - - using Stripe.Identity; - using Xunit; - - public class VerificationSessionServiceTest : BaseStripeTest - { - private const string VerificationSessionId = "vs_123"; - - private readonly VerificationSessionService service; - private readonly VerificationSessionCreateOptions createOptions; - private readonly VerificationSessionUpdateOptions updateOptions; - private readonly VerificationSessionListOptions listOptions; - - public VerificationSessionServiceTest( - StripeMockFixture stripeMockFixture, - MockHttpClientFixture mockHttpClientFixture) - : base(stripeMockFixture, mockHttpClientFixture) - { - this.service = new VerificationSessionService(this.StripeClient); - - this.createOptions = new VerificationSessionCreateOptions - { - Type = "id_number", - }; - - this.updateOptions = new VerificationSessionUpdateOptions - { - Metadata = new Dictionary - { - { "key", "value" }, - }, - }; - - this.listOptions = new VerificationSessionListOptions - { - Limit = 1, - }; - } - - [Fact] - public void Cancel() - { - var verificationSession = this.service.Cancel(VerificationSessionId); - this.AssertRequest(HttpMethod.Post, "/v1/identity/verification_sessions/vs_123/cancel"); - Assert.NotNull(verificationSession); - } - - [Fact] - public async Task CancelAsync() - { - var verificationSession = await this.service.CancelAsync(VerificationSessionId); - this.AssertRequest(HttpMethod.Post, "/v1/identity/verification_sessions/vs_123/cancel"); - Assert.NotNull(verificationSession); - } - - [Fact] - public void Redact() - { - var verificationSession = this.service.Redact(VerificationSessionId); - this.AssertRequest(HttpMethod.Post, "/v1/identity/verification_sessions/vs_123/redact"); - Assert.NotNull(verificationSession); - } - - [Fact] - public async Task RedactAsync() - { - var verificationSession = await this.service.RedactAsync(VerificationSessionId); - this.AssertRequest(HttpMethod.Post, "/v1/identity/verification_sessions/vs_123/redact"); - Assert.NotNull(verificationSession); - } - - [Fact] - public void Get() - { - var verificationSession = this.service.Get(VerificationSessionId); - this.AssertRequest(HttpMethod.Get, "/v1/identity/verification_sessions/vs_123"); - Assert.NotNull(verificationSession); - } - - [Fact] - public async Task GetAsync() - { - var verificationSession = await this.service.GetAsync(VerificationSessionId); - this.AssertRequest(HttpMethod.Get, "/v1/identity/verification_sessions/vs_123"); - Assert.NotNull(verificationSession); - } - - [Fact] - public void Create() - { - var verificationSession = this.service.Create(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/identity/verification_sessions"); - Assert.NotNull(verificationSession); - } - - [Fact] - public async Task CreateAsync() - { - var verificationSession = await this.service.CreateAsync(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/identity/verification_sessions"); - Assert.NotNull(verificationSession); - } - - [Fact] - public void List() - { - var verificationSession = this.service.List(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/identity/verification_sessions"); - Assert.NotNull(verificationSession); - } - - [Fact] - public async Task ListAsync() - { - var verificationSession = await this.service.ListAsync(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/identity/verification_sessions"); - Assert.NotNull(verificationSession); - } - - [Fact] - public void ListAutoPaging() - { - var verificationSession = this.service.ListAutoPaging(this.listOptions).First(); - Assert.NotNull(verificationSession); - Assert.Equal("identity.verification_session", verificationSession.Object); - } - - [Fact] - public async Task ListAutoPagingAsync() - { - var verificationSession = await this.service.ListAutoPagingAsync(this.listOptions).FirstAsync(); - Assert.NotNull(verificationSession); - Assert.Equal("identity.verification_session", verificationSession.Object); - } - - [Fact] - public void Update() - { - var verificationSession = this.service.Update(VerificationSessionId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/identity/verification_sessions/vs_123"); - Assert.NotNull(verificationSession); - } - - [Fact] - public async Task UpdateAsync() - { - var verificationSession = await this.service.UpdateAsync(VerificationSessionId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/identity/verification_sessions/vs_123"); - Assert.NotNull(verificationSession); - } - } -} diff --git a/src/StripeTests/Services/InvoiceItems/InvoiceItemServiceTest.cs b/src/StripeTests/Services/InvoiceItems/InvoiceItemServiceTest.cs deleted file mode 100644 index 573c52a6db..0000000000 --- a/src/StripeTests/Services/InvoiceItems/InvoiceItemServiceTest.cs +++ /dev/null @@ -1,156 +0,0 @@ -namespace StripeTests -{ - using System.Collections.Generic; - using System.Linq; - using System.Net.Http; - using System.Threading.Tasks; - - using Stripe; - using Xunit; - - public class InvoiceItemServiceTest : BaseStripeTest - { - private const string InvoiceItemId = "ii_123"; - - private readonly InvoiceItemService service; - private readonly InvoiceItemCreateOptions createOptions; - private readonly InvoiceItemUpdateOptions updateOptions; - private readonly InvoiceItemListOptions listOptions; - - public InvoiceItemServiceTest( - StripeMockFixture stripeMockFixture, - MockHttpClientFixture mockHttpClientFixture) - : base(stripeMockFixture, mockHttpClientFixture) - { - this.service = new InvoiceItemService(this.StripeClient); - - this.createOptions = new InvoiceItemCreateOptions - { - Amount = 123, - Currency = "usd", - Customer = "cus_123", - }; - - this.updateOptions = new InvoiceItemUpdateOptions - { - Metadata = new Dictionary - { - { "key", "value" }, - }, - }; - - this.listOptions = new InvoiceItemListOptions - { - Limit = 1, - }; - } - - [Fact] - public void Create() - { - var invoiceItem = this.service.Create(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/invoiceitems"); - Assert.NotNull(invoiceItem); - Assert.Equal("invoiceitem", invoiceItem.Object); - } - - [Fact] - public async Task CreateAsync() - { - var invoiceItem = await this.service.CreateAsync(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/invoiceitems"); - Assert.NotNull(invoiceItem); - Assert.Equal("invoiceitem", invoiceItem.Object); - } - - [Fact] - public void Delete() - { - var deleted = this.service.Delete(InvoiceItemId); - this.AssertRequest(HttpMethod.Delete, "/v1/invoiceitems/ii_123"); - Assert.NotNull(deleted); - } - - [Fact] - public async Task DeleteAsync() - { - var deleted = await this.service.DeleteAsync(InvoiceItemId); - this.AssertRequest(HttpMethod.Delete, "/v1/invoiceitems/ii_123"); - Assert.NotNull(deleted); - } - - [Fact] - public void Get() - { - var invoiceItem = this.service.Get(InvoiceItemId); - this.AssertRequest(HttpMethod.Get, "/v1/invoiceitems/ii_123"); - Assert.NotNull(invoiceItem); - Assert.Equal("invoiceitem", invoiceItem.Object); - } - - [Fact] - public async Task GetAsync() - { - var invoiceItem = await this.service.GetAsync(InvoiceItemId); - this.AssertRequest(HttpMethod.Get, "/v1/invoiceitems/ii_123"); - Assert.NotNull(invoiceItem); - Assert.Equal("invoiceitem", invoiceItem.Object); - } - - [Fact] - public void List() - { - var invoiceItems = this.service.List(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/invoiceitems"); - Assert.NotNull(invoiceItems); - Assert.Equal("list", invoiceItems.Object); - Assert.Single(invoiceItems.Data); - Assert.Equal("invoiceitem", invoiceItems.Data[0].Object); - } - - [Fact] - public async Task ListAsync() - { - var invoiceItems = await this.service.ListAsync(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/invoiceitems"); - Assert.NotNull(invoiceItems); - Assert.Equal("list", invoiceItems.Object); - Assert.Single(invoiceItems.Data); - Assert.Equal("invoiceitem", invoiceItems.Data[0].Object); - } - - [Fact] - public void ListAutoPaging() - { - var invoiceItem = this.service.ListAutoPaging(this.listOptions).First(); - Assert.NotNull(invoiceItem); - Assert.Equal("invoiceitem", invoiceItem.Object); - } - - [Fact] - public async Task ListAutoPagingAsync() - { - var invoiceItem = await this.service.ListAutoPagingAsync(this.listOptions).FirstAsync(); - Assert.NotNull(invoiceItem); - Assert.Equal("invoiceitem", invoiceItem.Object); - } - - [Fact] - public void Update() - { - var invoiceItem = this.service.Update(InvoiceItemId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/invoiceitems/ii_123"); - Assert.NotNull(invoiceItem); - Assert.Equal("invoiceitem", invoiceItem.Object); - } - - [Fact] - public async Task UpdateAsync() - { - var invoiceItem = await this.service.UpdateAsync(InvoiceItemId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/invoiceitems/ii_123"); - Assert.NotNull(invoiceItem); - Assert.Equal("invoiceitem", invoiceItem.Object); - } - } -} diff --git a/src/StripeTests/Services/Invoices/InvoiceServiceTest.cs b/src/StripeTests/Services/Invoices/InvoiceServiceTest.cs deleted file mode 100644 index 45abed162c..0000000000 --- a/src/StripeTests/Services/Invoices/InvoiceServiceTest.cs +++ /dev/null @@ -1,317 +0,0 @@ -namespace StripeTests -{ - using System.Collections.Generic; - using System.Linq; - using System.Net.Http; - using System.Threading.Tasks; - - using Stripe; - using Xunit; - - public class InvoiceServiceTest : BaseStripeTest - { - private const string InvoiceId = "in_123"; - - private readonly InvoiceService service; - private readonly InvoiceCreateOptions createOptions; - private readonly InvoiceUpdateOptions updateOptions; - private readonly InvoicePayOptions payOptions; - private readonly InvoiceListOptions listOptions; - private readonly InvoiceLineItemListOptions lineItemListOptions; - private readonly InvoiceFinalizeOptions finalizeOptions; - private readonly InvoiceMarkUncollectibleOptions markUncollectibleOptions; - private readonly InvoiceSendOptions sendOptions; - private readonly InvoiceVoidOptions voidOptions; - - public InvoiceServiceTest( - StripeMockFixture stripeMockFixture, - MockHttpClientFixture mockHttpClientFixture) - : base(stripeMockFixture, mockHttpClientFixture) - { - this.service = new InvoiceService(this.StripeClient); - - this.createOptions = new InvoiceCreateOptions - { - Customer = "cus_123", - }; - - this.updateOptions = new InvoiceUpdateOptions - { - Metadata = new Dictionary - { - { "key", "value" }, - }, - }; - - this.payOptions = new InvoicePayOptions - { - Forgive = true, - Source = "src_123", - }; - - this.listOptions = new InvoiceListOptions - { - Limit = 1, - }; - - this.lineItemListOptions = new InvoiceLineItemListOptions - { - Limit = 1, - }; - - this.finalizeOptions = new InvoiceFinalizeOptions - { - }; - - this.markUncollectibleOptions = new InvoiceMarkUncollectibleOptions - { - }; - - this.sendOptions = new InvoiceSendOptions - { - }; - - this.voidOptions = new InvoiceVoidOptions - { - }; - } - - [Fact] - public void Create() - { - var invoice = this.service.Create(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/invoices"); - Assert.NotNull(invoice); - Assert.Equal("invoice", invoice.Object); - } - - [Fact] - public async Task CreateAsync() - { - var invoice = await this.service.CreateAsync(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/invoices"); - Assert.NotNull(invoice); - Assert.Equal("invoice", invoice.Object); - } - - [Fact] - public void Delete() - { - var invoice = this.service.Delete(InvoiceId); - this.AssertRequest(HttpMethod.Delete, "/v1/invoices/in_123"); - Assert.NotNull(invoice); - Assert.Equal("invoice", invoice.Object); - } - - [Fact] - public async Task DeleteAsync() - { - var invoice = await this.service.DeleteAsync(InvoiceId); - this.AssertRequest(HttpMethod.Delete, "/v1/invoices/in_123"); - Assert.NotNull(invoice); - Assert.Equal("invoice", invoice.Object); - } - - [Fact] - public void FinalizeInvoice() - { - var invoice = this.service.FinalizeInvoice(InvoiceId, this.finalizeOptions); - this.AssertRequest(HttpMethod.Post, "/v1/invoices/in_123/finalize"); - Assert.NotNull(invoice); - Assert.Equal("invoice", invoice.Object); - } - - [Fact] - public async Task FinalizeInvoiceAsync() - { - var invoice = await this.service.FinalizeInvoiceAsync(InvoiceId, this.finalizeOptions); - this.AssertRequest(HttpMethod.Post, "/v1/invoices/in_123/finalize"); - Assert.NotNull(invoice); - Assert.Equal("invoice", invoice.Object); - } - - [Fact] - public void Get() - { - var invoice = this.service.Get(InvoiceId); - this.AssertRequest(HttpMethod.Get, "/v1/invoices/in_123"); - Assert.NotNull(invoice); - Assert.Equal("invoice", invoice.Object); - } - - [Fact] - public async Task GetAsync() - { - var invoice = await this.service.GetAsync(InvoiceId); - this.AssertRequest(HttpMethod.Get, "/v1/invoices/in_123"); - Assert.NotNull(invoice); - Assert.Equal("invoice", invoice.Object); - } - - [Fact] - public void List() - { - var invoices = this.service.List(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/invoices"); - Assert.NotNull(invoices); - Assert.Equal("list", invoices.Object); - Assert.Single(invoices.Data); - Assert.Equal("invoice", invoices.Data[0].Object); - } - - [Fact] - public async Task ListAsync() - { - var invoices = await this.service.ListAsync(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/invoices"); - Assert.NotNull(invoices); - Assert.Equal("list", invoices.Object); - Assert.Single(invoices.Data); - Assert.Equal("invoice", invoices.Data[0].Object); - } - - [Fact] - public void ListAutoPaging() - { - var invoice = this.service.ListAutoPaging(this.listOptions).First(); - Assert.NotNull(invoice); - Assert.Equal("invoice", invoice.Object); - } - - [Fact] - public async Task ListAutoPagingAsync() - { - var invoice = await this.service.ListAutoPagingAsync(this.listOptions).FirstAsync(); - Assert.NotNull(invoice); - Assert.Equal("invoice", invoice.Object); - } - - [Fact] - public void ListLineItems() - { - var lineItems = this.service.LineItems.List(InvoiceId, this.lineItemListOptions); - this.AssertRequest(HttpMethod.Get, "/v1/invoices/in_123/lines"); - Assert.NotNull(lineItems); - Assert.Equal("list", lineItems.Object); - Assert.Single(lineItems.Data); - Assert.Equal("line_item", lineItems.Data[0].Object); - } - - [Fact] - public async Task ListLineItemsAsync() - { - var lineItems = await this.service.LineItems.ListAsync(InvoiceId, this.lineItemListOptions); - this.AssertRequest(HttpMethod.Get, "/v1/invoices/in_123/lines"); - Assert.NotNull(lineItems); - Assert.Equal("list", lineItems.Object); - Assert.Single(lineItems.Data); - Assert.Equal("line_item", lineItems.Data[0].Object); - } - - [Fact] - public void ListLineItemsAutoPaging() - { - var lineItem = this.service.LineItems.ListAutoPaging(InvoiceId, this.lineItemListOptions).First(); - Assert.NotNull(lineItem); - Assert.Equal("line_item", lineItem.Object); - } - - [Fact] - public async Task ListLineItemsAutoPagingAsync() - { - var lineItem = await this.service.LineItems.ListAutoPagingAsync(InvoiceId, this.lineItemListOptions).FirstAsync(); - Assert.NotNull(lineItem); - Assert.Equal("line_item", lineItem.Object); - } - - [Fact] - public void MarkUncollectible() - { - var invoice = this.service.MarkUncollectible(InvoiceId, this.markUncollectibleOptions); - this.AssertRequest(HttpMethod.Post, "/v1/invoices/in_123/mark_uncollectible"); - Assert.NotNull(invoice); - Assert.Equal("invoice", invoice.Object); - } - - [Fact] - public async Task MarkUncollectibleAsync() - { - var invoice = await this.service.MarkUncollectibleAsync(InvoiceId, this.markUncollectibleOptions); - this.AssertRequest(HttpMethod.Post, "/v1/invoices/in_123/mark_uncollectible"); - Assert.NotNull(invoice); - Assert.Equal("invoice", invoice.Object); - } - - [Fact] - public void Pay() - { - var invoice = this.service.Pay(InvoiceId, this.payOptions); - this.AssertRequest(HttpMethod.Post, "/v1/invoices/in_123/pay"); - Assert.NotNull(invoice); - Assert.Equal("invoice", invoice.Object); - } - - [Fact] - public async Task PayAsync() - { - var invoice = await this.service.PayAsync(InvoiceId, this.payOptions); - this.AssertRequest(HttpMethod.Post, "/v1/invoices/in_123/pay"); - Assert.NotNull(invoice); - Assert.Equal("invoice", invoice.Object); - } - - [Fact] - public void SendInvoice() - { - var invoice = this.service.SendInvoice(InvoiceId, this.sendOptions); - this.AssertRequest(HttpMethod.Post, "/v1/invoices/in_123/send"); - Assert.NotNull(invoice); - Assert.Equal("invoice", invoice.Object); - } - - [Fact] - public async Task SendInvoiceAsync() - { - var invoice = await this.service.SendInvoiceAsync(InvoiceId, this.sendOptions); - this.AssertRequest(HttpMethod.Post, "/v1/invoices/in_123/send"); - Assert.NotNull(invoice); - Assert.Equal("invoice", invoice.Object); - } - - [Fact] - public void Update() - { - var invoice = this.service.Update(InvoiceId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/invoices/in_123"); - Assert.NotNull(invoice); - Assert.Equal("invoice", invoice.Object); - } - - [Fact] - public async Task UpdateAsync() - { - var invoice = await this.service.UpdateAsync(InvoiceId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/invoices/in_123"); - Assert.NotNull(invoice); - Assert.Equal("invoice", invoice.Object); - } - - [Fact] - public void VoidInvoice() - { - var invoice = this.service.VoidInvoice(InvoiceId, this.voidOptions); - this.AssertRequest(HttpMethod.Post, "/v1/invoices/in_123/void"); - Assert.NotNull(invoice); - Assert.Equal("invoice", invoice.Object); - } - - [Fact] - public async Task VoidInvoiceAsync() - { - var invoice = await this.service.VoidInvoiceAsync(InvoiceId, this.voidOptions); - this.AssertRequest(HttpMethod.Post, "/v1/invoices/in_123/void"); - Assert.NotNull(invoice); - Assert.Equal("invoice", invoice.Object); - } - } -} diff --git a/src/StripeTests/Services/Issuing/Authorizations/AuthorizationServiceTest.cs b/src/StripeTests/Services/Issuing/Authorizations/AuthorizationServiceTest.cs deleted file mode 100644 index b95327e129..0000000000 --- a/src/StripeTests/Services/Issuing/Authorizations/AuthorizationServiceTest.cs +++ /dev/null @@ -1,136 +0,0 @@ -namespace StripeTests.Issuing -{ - using System.Collections.Generic; - using System.Linq; - using System.Net.Http; - using System.Threading.Tasks; - - using Stripe.Issuing; - using Xunit; - - public class AuthorizationServiceTest : BaseStripeTest - { - private const string AuthorizationId = "iauth_123"; - - private readonly AuthorizationService service; - private readonly AuthorizationUpdateOptions updateOptions; - private readonly AuthorizationListOptions listOptions; - - public AuthorizationServiceTest( - StripeMockFixture stripeMockFixture, - MockHttpClientFixture mockHttpClientFixture) - : base(stripeMockFixture, mockHttpClientFixture) - { - this.service = new AuthorizationService(this.StripeClient); - - this.updateOptions = new AuthorizationUpdateOptions - { - Metadata = new Dictionary - { - { "key", "value" }, - }, - }; - - this.listOptions = new AuthorizationListOptions - { - Limit = 1, - }; - } - - [Fact] - public void Approve() - { - var authorization = this.service.Approve(AuthorizationId); - this.AssertRequest(HttpMethod.Post, "/v1/issuing/authorizations/iauth_123/approve"); - Assert.NotNull(authorization); - } - - [Fact] - public async Task ApproveAsync() - { - var authorization = await this.service.ApproveAsync(AuthorizationId); - this.AssertRequest(HttpMethod.Post, "/v1/issuing/authorizations/iauth_123/approve"); - Assert.NotNull(authorization); - } - - [Fact] - public void Decline() - { - var authorization = this.service.Decline(AuthorizationId); - this.AssertRequest(HttpMethod.Post, "/v1/issuing/authorizations/iauth_123/decline"); - Assert.NotNull(authorization); - } - - [Fact] - public async Task DeclineAsync() - { - var authorization = await this.service.DeclineAsync(AuthorizationId); - this.AssertRequest(HttpMethod.Post, "/v1/issuing/authorizations/iauth_123/decline"); - Assert.NotNull(authorization); - } - - [Fact] - public void Get() - { - var authorization = this.service.Get(AuthorizationId); - this.AssertRequest(HttpMethod.Get, "/v1/issuing/authorizations/iauth_123"); - Assert.NotNull(authorization); - } - - [Fact] - public async Task GetAsync() - { - var authorization = await this.service.GetAsync(AuthorizationId); - this.AssertRequest(HttpMethod.Get, "/v1/issuing/authorizations/iauth_123"); - Assert.NotNull(authorization); - } - - [Fact] - public void List() - { - var authorizations = this.service.List(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/issuing/authorizations"); - Assert.NotNull(authorizations); - } - - [Fact] - public async Task ListAsync() - { - var authorizations = await this.service.ListAsync(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/issuing/authorizations"); - Assert.NotNull(authorizations); - } - - [Fact] - public void ListAutoPaging() - { - var authorization = this.service.ListAutoPaging(this.listOptions).First(); - Assert.NotNull(authorization); - Assert.Equal("issuing.authorization", authorization.Object); - } - - [Fact] - public async Task ListAutoPagingAsync() - { - var authorization = await this.service.ListAutoPagingAsync(this.listOptions).FirstAsync(); - Assert.NotNull(authorization); - Assert.Equal("issuing.authorization", authorization.Object); - } - - [Fact] - public void Update() - { - var authorization = this.service.Update(AuthorizationId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/issuing/authorizations/iauth_123"); - Assert.NotNull(authorization); - } - - [Fact] - public async Task UpdateAsync() - { - var authorization = await this.service.UpdateAsync(AuthorizationId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/issuing/authorizations/iauth_123"); - Assert.NotNull(authorization); - } - } -} diff --git a/src/StripeTests/Services/Issuing/Cardholders/CardholderServiceTest.cs b/src/StripeTests/Services/Issuing/Cardholders/CardholderServiceTest.cs deleted file mode 100644 index 4c38521b20..0000000000 --- a/src/StripeTests/Services/Issuing/Cardholders/CardholderServiceTest.cs +++ /dev/null @@ -1,173 +0,0 @@ -namespace StripeTests.Issuing -{ - using System.Collections.Generic; - using System.Linq; - using System.Net.Http; - using System.Threading.Tasks; - - using Stripe; - using Stripe.Issuing; - using Xunit; - - public class CardholderServiceTest : BaseStripeTest - { - private const string CardholderId = "ich_123"; - - private readonly CardholderService service; - private readonly CardholderCreateOptions createOptions; - private readonly CardholderUpdateOptions updateOptions; - private readonly CardholderListOptions listOptions; - - public CardholderServiceTest( - StripeMockFixture stripeMockFixture, - MockHttpClientFixture mockHttpClientFixture) - : base(stripeMockFixture, mockHttpClientFixture) - { - this.service = new CardholderService(this.StripeClient); - - this.createOptions = new CardholderCreateOptions - { - Billing = new CardholderBillingOptions - { - Address = new AddressOptions - { - City = "city", - Country = "US", - Line1 = "line1", - PostalCode = "90210", - State = "CA", - }, - }, - Individual = new CardholderIndividualOptions - { - Dob = new CardholderIndividualDobOptions - { - Day = 1, - Month = 1, - Year = 1980, - }, - FirstName = "John", - LastName = "Doe", - Verification = new CardholderIndividualVerificationOptions - { - Document = new CardholderIndividualVerificationDocumentOptions - { - Back = "file_123", - Front = "file_234", - }, - }, - }, - Name = "John Doe", - SpendingControls = new CardholderSpendingControlsOptions - { - SpendingLimits = new List - { - new CardholderSpendingControlsSpendingLimitOptions - { - Amount = 1000, - Categories = new List - { - "financial_institutions", - }, - Interval = "all_time", - }, - }, - }, - Type = "individual", - }; - - this.updateOptions = new CardholderUpdateOptions - { - Metadata = new Dictionary - { - { "key", "value" }, - }, - }; - - this.listOptions = new CardholderListOptions - { - Limit = 1, - }; - } - - [Fact] - public void Create() - { - var cardholder = this.service.Create(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/issuing/cardholders"); - Assert.NotNull(cardholder); - } - - [Fact] - public async Task CreateAsync() - { - var cardholder = await this.service.CreateAsync(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/issuing/cardholders"); - Assert.NotNull(cardholder); - } - - [Fact] - public void Get() - { - var cardholder = this.service.Get(CardholderId); - this.AssertRequest(HttpMethod.Get, "/v1/issuing/cardholders/ich_123"); - Assert.NotNull(cardholder); - } - - [Fact] - public async Task GetAsync() - { - var cardholder = await this.service.GetAsync(CardholderId); - this.AssertRequest(HttpMethod.Get, "/v1/issuing/cardholders/ich_123"); - Assert.NotNull(cardholder); - } - - [Fact] - public void List() - { - var cardholders = this.service.List(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/issuing/cardholders"); - Assert.NotNull(cardholders); - } - - [Fact] - public async Task ListAsync() - { - var cardholders = await this.service.ListAsync(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/issuing/cardholders"); - Assert.NotNull(cardholders); - } - - [Fact] - public void ListAutoPaging() - { - var cardholder = this.service.ListAutoPaging(this.listOptions).First(); - Assert.NotNull(cardholder); - Assert.Equal("issuing.cardholder", cardholder.Object); - } - - [Fact] - public async Task ListAutoPagingAsync() - { - var cardholder = await this.service.ListAutoPagingAsync(this.listOptions).FirstAsync(); - Assert.NotNull(cardholder); - Assert.Equal("issuing.cardholder", cardholder.Object); - } - - [Fact] - public void Update() - { - var cardholder = this.service.Update(CardholderId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/issuing/cardholders/ich_123"); - Assert.NotNull(cardholder); - } - - [Fact] - public async Task UpdateAsync() - { - var cardholder = await this.service.UpdateAsync(CardholderId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/issuing/cardholders/ich_123"); - Assert.NotNull(cardholder); - } - } -} diff --git a/src/StripeTests/Services/Issuing/Cards/IssuingCardServiceTest.cs b/src/StripeTests/Services/Issuing/Cards/IssuingCardServiceTest.cs deleted file mode 100644 index 143a584b60..0000000000 --- a/src/StripeTests/Services/Issuing/Cards/IssuingCardServiceTest.cs +++ /dev/null @@ -1,143 +0,0 @@ -namespace StripeTests.Issuing -{ - using System.Collections.Generic; - using System.Linq; - using System.Net.Http; - using System.Threading.Tasks; - - using Stripe.Issuing; - using Xunit; - - public class IssuingCardServiceTest : BaseStripeTest - { - private const string CardId = "ic_123"; - - private readonly CardService service; - private readonly CardCreateOptions createOptions; - private readonly CardUpdateOptions updateOptions; - private readonly CardListOptions listOptions; - - public IssuingCardServiceTest( - StripeMockFixture stripeMockFixture, - MockHttpClientFixture mockHttpClientFixture) - : base(stripeMockFixture, mockHttpClientFixture) - { - this.service = new CardService(this.StripeClient); - - this.createOptions = new CardCreateOptions - { - Cardholder = "ich_123", - Currency = "usd", - SpendingControls = new CardSpendingControlsOptions - { - SpendingLimits = new List - { - new CardSpendingControlsSpendingLimitOptions - { - Amount = 1000, - Categories = new List - { - "financial_institutions", - }, - Interval = "all_time", - }, - }, - }, - Type = "virtual", - }; - - this.updateOptions = new CardUpdateOptions - { - Metadata = new Dictionary - { - { "key", "value" }, - }, - }; - - this.listOptions = new CardListOptions - { - Limit = 1, - }; - } - - [Fact] - public void Create() - { - var card = this.service.Create(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/issuing/cards"); - Assert.NotNull(card); - } - - [Fact] - public async Task CreateAsync() - { - var card = await this.service.CreateAsync(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/issuing/cards"); - Assert.NotNull(card); - } - - [Fact] - public void Get() - { - var card = this.service.Get(CardId); - this.AssertRequest(HttpMethod.Get, "/v1/issuing/cards/ic_123"); - Assert.NotNull(card); - } - - [Fact] - public async Task GetAsync() - { - var card = await this.service.GetAsync(CardId); - this.AssertRequest(HttpMethod.Get, "/v1/issuing/cards/ic_123"); - Assert.NotNull(card); - } - - [Fact] - public void List() - { - var cards = this.service.List(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/issuing/cards"); - Assert.NotNull(cards); - } - - [Fact] - public async Task ListAsync() - { - var cards = await this.service.ListAsync(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/issuing/cards"); - Assert.NotNull(cards); - } - - [Fact] - public void ListAutoPaging() - { - var card = this.service.ListAutoPaging(this.listOptions).First(); - Assert.NotNull(card); - Assert.Equal("issuing.card", card.Object); - } - - [Fact] - public async Task ListAutoPagingAsync() - { - var card = await this.service.ListAutoPagingAsync(this.listOptions).FirstAsync(); - Assert.NotNull(card); - Assert.Equal("issuing.card", card.Object); - } - - [Fact] - public void Update() - { - var card = this.service.Update(CardId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/issuing/cards/ic_123"); - Assert.NotNull(card); - } - - [Fact] - public async Task UpdateAsync() - { - var card = await this.service.UpdateAsync(CardId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/issuing/cards/ic_123"); - Assert.NotNull(card); - } - } -} diff --git a/src/StripeTests/Services/Issuing/Disputes/IssuingDisputeServiceTest.cs b/src/StripeTests/Services/Issuing/Disputes/IssuingDisputeServiceTest.cs deleted file mode 100644 index 06a5e8778b..0000000000 --- a/src/StripeTests/Services/Issuing/Disputes/IssuingDisputeServiceTest.cs +++ /dev/null @@ -1,164 +0,0 @@ -namespace StripeTests.Issuing -{ - using System; - using System.Collections.Generic; - using System.Linq; - using System.Net.Http; - using System.Threading.Tasks; - - using Stripe.Issuing; - using Xunit; - - public class IssuingDisputeServiceTest : BaseStripeTest - { - private const string DisputeId = "idp_123"; - - private readonly DisputeService service; - private readonly DisputeCreateOptions createOptions; - private readonly DisputeSubmitOptions submitOptions; - private readonly DisputeUpdateOptions updateOptions; - private readonly DisputeListOptions listOptions; - - public IssuingDisputeServiceTest( - StripeMockFixture stripeMockFixture, - MockHttpClientFixture mockHttpClientFixture) - : base(stripeMockFixture, mockHttpClientFixture) - { - this.service = new DisputeService(this.StripeClient); - - this.createOptions = new DisputeCreateOptions - { - Evidence = new DisputeEvidenceOptions - { - NotReceived = new DisputeEvidenceNotReceivedOptions - { - AdditionalDocumentation = "file_123", - ExpectedAt = DateTime.Now, - Explanation = "Dispute explanation", - ProductDescription = "Product description", - ProductType = "merchandise", - }, - Reason = "not_received", - }, - Transaction = "ipi_123", - }; - - this.submitOptions = new DisputeSubmitOptions - { - Metadata = new Dictionary - { - { "key", "value" }, - }, - }; - - this.updateOptions = new DisputeUpdateOptions - { - Metadata = new Dictionary - { - { "key", "value" }, - }, - }; - - this.listOptions = new DisputeListOptions - { - Limit = 1, - }; - } - - [Fact] - public void Create() - { - var dispute = this.service.Create(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/issuing/disputes"); - Assert.NotNull(dispute); - } - - [Fact] - public async Task CreateAsync() - { - var dispute = await this.service.CreateAsync(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/issuing/disputes"); - Assert.NotNull(dispute); - } - - [Fact] - public void Get() - { - var dispute = this.service.Get(DisputeId); - this.AssertRequest(HttpMethod.Get, "/v1/issuing/disputes/idp_123"); - Assert.NotNull(dispute); - } - - [Fact] - public async Task GetAsync() - { - var dispute = await this.service.GetAsync(DisputeId); - this.AssertRequest(HttpMethod.Get, "/v1/issuing/disputes/idp_123"); - Assert.NotNull(dispute); - } - - [Fact] - public void List() - { - var disputes = this.service.List(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/issuing/disputes"); - Assert.NotNull(disputes); - } - - [Fact] - public async Task ListAsync() - { - var disputes = await this.service.ListAsync(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/issuing/disputes"); - Assert.NotNull(disputes); - } - - [Fact] - public void ListAutoPaging() - { - var dispute = this.service.ListAutoPaging(this.listOptions).First(); - Assert.NotNull(dispute); - Assert.Equal("issuing.dispute", dispute.Object); - } - - [Fact] - public async Task ListAutoPagingAsync() - { - var dispute = await this.service.ListAutoPagingAsync(this.listOptions).FirstAsync(); - Assert.NotNull(dispute); - Assert.Equal("issuing.dispute", dispute.Object); - } - - [Fact] - public void Submit() - { - var dispute = this.service.Submit(DisputeId, this.submitOptions); - this.AssertRequest(HttpMethod.Post, "/v1/issuing/disputes/idp_123/submit"); - Assert.NotNull(dispute); - } - - [Fact] - public async Task SubmitAsync() - { - var dispute = await this.service.SubmitAsync(DisputeId, this.submitOptions); - this.AssertRequest(HttpMethod.Post, "/v1/issuing/disputes/idp_123/submit"); - Assert.NotNull(dispute); - } - - [Fact] - public void Update() - { - var dispute = this.service.Update(DisputeId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/issuing/disputes/idp_123"); - Assert.NotNull(dispute); - } - - [Fact] - public async Task UpdateAsync() - { - var dispute = await this.service.UpdateAsync(DisputeId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/issuing/disputes/idp_123"); - Assert.NotNull(dispute); - } - } -} diff --git a/src/StripeTests/Services/Issuing/Transactions/TransactionServiceTest.cs b/src/StripeTests/Services/Issuing/Transactions/TransactionServiceTest.cs deleted file mode 100644 index b2e3f886f4..0000000000 --- a/src/StripeTests/Services/Issuing/Transactions/TransactionServiceTest.cs +++ /dev/null @@ -1,104 +0,0 @@ -namespace StripeTests.Issuing -{ - using System.Collections.Generic; - using System.Linq; - using System.Net.Http; - using System.Threading.Tasks; - - using Stripe.Issuing; - using Xunit; - - public class TransactionServiceTest : BaseStripeTest - { - private const string TransactionId = "ipi_123"; - - private readonly TransactionService service; - private readonly TransactionUpdateOptions updateOptions; - private readonly TransactionListOptions listOptions; - - public TransactionServiceTest( - StripeMockFixture stripeMockFixture, - MockHttpClientFixture mockHttpClientFixture) - : base(stripeMockFixture, mockHttpClientFixture) - { - this.service = new TransactionService(this.StripeClient); - - this.updateOptions = new TransactionUpdateOptions - { - Metadata = new Dictionary - { - { "key", "value" }, - }, - }; - - this.listOptions = new TransactionListOptions - { - Limit = 1, - }; - } - - [Fact] - public void Get() - { - var transaction = this.service.Get(TransactionId); - this.AssertRequest(HttpMethod.Get, "/v1/issuing/transactions/ipi_123"); - Assert.NotNull(transaction); - } - - [Fact] - public async Task GetAsync() - { - var transaction = await this.service.GetAsync(TransactionId); - this.AssertRequest(HttpMethod.Get, "/v1/issuing/transactions/ipi_123"); - Assert.NotNull(transaction); - } - - [Fact] - public void List() - { - var transactions = this.service.List(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/issuing/transactions"); - Assert.NotNull(transactions); - } - - [Fact] - public async Task ListAsync() - { - var transactions = await this.service.ListAsync(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/issuing/transactions"); - Assert.NotNull(transactions); - } - - [Fact] - public void ListAutoPaging() - { - var transaction = this.service.ListAutoPaging(this.listOptions).First(); - Assert.NotNull(transaction); - Assert.Equal("issuing.transaction", transaction.Object); - } - - [Fact] - public async Task ListAutoPagingAsync() - { - var transaction = await this.service.ListAutoPagingAsync(this.listOptions).FirstAsync(); - Assert.NotNull(transaction); - Assert.Equal("issuing.transaction", transaction.Object); - } - - [Fact] - public void Update() - { - var transaction = this.service.Update(TransactionId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/issuing/transactions/ipi_123"); - Assert.NotNull(transaction); - } - - [Fact] - public async Task UpdateAsync() - { - var transaction = await this.service.UpdateAsync(TransactionId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/issuing/transactions/ipi_123"); - Assert.NotNull(transaction); - } - } -} diff --git a/src/StripeTests/Services/LoginLinks/AccountLoginLinkServiceTest.cs b/src/StripeTests/Services/LoginLinks/AccountLoginLinkServiceTest.cs deleted file mode 100644 index f3f748b0ea..0000000000 --- a/src/StripeTests/Services/LoginLinks/AccountLoginLinkServiceTest.cs +++ /dev/null @@ -1,45 +0,0 @@ -namespace StripeTests -{ - using System.Collections.Generic; - using System.Net.Http; - using System.Threading.Tasks; - - using Stripe; - using Xunit; - - public class AccountLoginLinkServiceTest : BaseStripeTest - { - private const string AccountId = "acct_123"; - - private readonly AccountLoginLinkService service; - private readonly AccountLoginLinkCreateOptions createOptions; - - public AccountLoginLinkServiceTest( - StripeMockFixture stripeMockFixture, - MockHttpClientFixture mockHttpClientFixture) - : base(stripeMockFixture, mockHttpClientFixture) - { - this.service = new AccountLoginLinkService(this.StripeClient); - - this.createOptions = new AccountLoginLinkCreateOptions(); - } - - [Fact] - public void Create() - { - var loginLink = this.service.Create(AccountId, this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/accounts/acct_123/login_links"); - Assert.NotNull(loginLink); - Assert.Equal("login_link", loginLink.Object); - } - - [Fact] - public async Task CreateAsync() - { - var loginLink = await this.service.CreateAsync(AccountId, this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/accounts/acct_123/login_links"); - Assert.NotNull(loginLink); - Assert.Equal("login_link", loginLink.Object); - } - } -} diff --git a/src/StripeTests/Services/Mandates/MandateServiceTest.cs b/src/StripeTests/Services/Mandates/MandateServiceTest.cs deleted file mode 100644 index 7c54df9471..0000000000 --- a/src/StripeTests/Services/Mandates/MandateServiceTest.cs +++ /dev/null @@ -1,43 +0,0 @@ -namespace StripeTests -{ - using System.Collections.Generic; - using System.Linq; - using System.Net.Http; - using System.Threading.Tasks; - - using Stripe; - using Xunit; - - public class MandateServiceTest : BaseStripeTest - { - private const string MandateId = "mandate_123"; - - private readonly MandateService service; - - public MandateServiceTest( - StripeMockFixture stripeMockFixture, - MockHttpClientFixture mockHttpClientFixture) - : base(stripeMockFixture, mockHttpClientFixture) - { - this.service = new MandateService(this.StripeClient); - } - - [Fact] - public void Get() - { - var mandate = this.service.Get(MandateId); - this.AssertRequest(HttpMethod.Get, "/v1/mandates/mandate_123"); - Assert.NotNull(mandate); - Assert.Equal("mandate", mandate.Object); - } - - [Fact] - public async Task GetAsync() - { - var mandate = await this.service.GetAsync(MandateId); - this.AssertRequest(HttpMethod.Get, "/v1/mandates/mandate_123"); - Assert.NotNull(mandate); - Assert.Equal("mandate", mandate.Object); - } - } -} diff --git a/src/StripeTests/Services/PaymentIntents/PaymentIntentConfirmOptionsTest.cs b/src/StripeTests/Services/PaymentIntents/PaymentIntentConfirmOptionsTest.cs deleted file mode 100644 index 2a049aefcb..0000000000 --- a/src/StripeTests/Services/PaymentIntents/PaymentIntentConfirmOptionsTest.cs +++ /dev/null @@ -1,20 +0,0 @@ -namespace StripeTests -{ - using Stripe; - using Stripe.Infrastructure.FormEncoding; - using Xunit; - - public class PaymentIntentConfirmOptionsTest : BaseStripeTest - { - [Fact] - public void SerializeObjectProperly() - { - var options_bool = new PaymentIntentConfirmOptions - { - OffSession = true, - }; - - Assert.Equal("off_session=true", ContentEncoder.CreateQueryString(options_bool)); - } - } -} diff --git a/src/StripeTests/Services/PaymentIntents/PaymentIntentCreateOptionsTest.cs b/src/StripeTests/Services/PaymentIntents/PaymentIntentCreateOptionsTest.cs deleted file mode 100644 index ea099904b7..0000000000 --- a/src/StripeTests/Services/PaymentIntents/PaymentIntentCreateOptionsTest.cs +++ /dev/null @@ -1,20 +0,0 @@ -namespace StripeTests -{ - using Stripe; - using Stripe.Infrastructure.FormEncoding; - using Xunit; - - public class PaymentIntentCreateOptionsTest : BaseStripeTest - { - [Fact] - public void SerializeObjectProperly() - { - var options_bool = new PaymentIntentCreateOptions - { - OffSession = true, - }; - - Assert.Equal("off_session=true", ContentEncoder.CreateQueryString(options_bool)); - } - } -} diff --git a/src/StripeTests/Services/PaymentIntents/PaymentIntentServiceTest.cs b/src/StripeTests/Services/PaymentIntents/PaymentIntentServiceTest.cs deleted file mode 100644 index 7ea8b7214d..0000000000 --- a/src/StripeTests/Services/PaymentIntents/PaymentIntentServiceTest.cs +++ /dev/null @@ -1,232 +0,0 @@ -namespace StripeTests -{ - using System.Collections.Generic; - using System.Linq; - using System.Net.Http; - using System.Threading.Tasks; - - using Stripe; - using Xunit; - - public class PaymentIntentServiceTest : BaseStripeTest - { - private const string PaymentIntentId = "pi_123"; - - private readonly PaymentIntentService service; - private readonly PaymentIntentCancelOptions cancelOptions; - private readonly PaymentIntentCaptureOptions captureOptions; - private readonly PaymentIntentConfirmOptions confirmOptions; - private readonly PaymentIntentCreateOptions createOptions; - private readonly PaymentIntentListOptions listOptions; - private readonly PaymentIntentUpdateOptions updateOptions; - - public PaymentIntentServiceTest( - StripeMockFixture stripeMockFixture, - MockHttpClientFixture mockHttpClientFixture) - : base(stripeMockFixture, mockHttpClientFixture) - { - this.service = new PaymentIntentService(this.StripeClient); - - this.cancelOptions = new PaymentIntentCancelOptions - { - }; - - this.captureOptions = new PaymentIntentCaptureOptions - { - AmountToCapture = 123, - }; - - this.confirmOptions = new PaymentIntentConfirmOptions - { - ReceiptEmail = "stripe@stripe.com", - }; - - this.createOptions = new PaymentIntentCreateOptions - { - Amount = 1000, - Currency = "usd", - PaymentMethodTypes = new List - { - "card", - }, - TransferData = new PaymentIntentTransferDataOptions - { - Amount = 100, - Destination = "acct_123", - }, - }; - - this.listOptions = new PaymentIntentListOptions - { - Limit = 1, - }; - - this.updateOptions = new PaymentIntentUpdateOptions - { - Metadata = new Dictionary - { - { "key", "value" }, - }, - }; - } - - [Fact] - public void Cancel() - { - var intent = this.service.Cancel(PaymentIntentId, this.cancelOptions); - this.AssertRequest(HttpMethod.Post, "/v1/payment_intents/pi_123/cancel"); - Assert.NotNull(intent); - Assert.Equal("payment_intent", intent.Object); - } - - [Fact] - public async Task CancelAsync() - { - var intent = await this.service.CancelAsync(PaymentIntentId, this.cancelOptions); - this.AssertRequest(HttpMethod.Post, "/v1/payment_intents/pi_123/cancel"); - Assert.NotNull(intent); - Assert.Equal("payment_intent", intent.Object); - } - - [Fact] - public void Capture() - { - var intent = this.service.Capture(PaymentIntentId, this.captureOptions); - this.AssertRequest(HttpMethod.Post, "/v1/payment_intents/pi_123/capture"); - Assert.NotNull(intent); - Assert.Equal("payment_intent", intent.Object); - } - - [Fact] - public async Task CaptureAsync() - { - var intent = await this.service.CaptureAsync(PaymentIntentId, this.captureOptions); - this.AssertRequest(HttpMethod.Post, "/v1/payment_intents/pi_123/capture"); - Assert.NotNull(intent); - Assert.Equal("payment_intent", intent.Object); - } - - [Fact] - public void Confirm() - { - var intent = this.service.Confirm(PaymentIntentId, this.confirmOptions); - this.AssertRequest(HttpMethod.Post, "/v1/payment_intents/pi_123/confirm"); - Assert.NotNull(intent); - Assert.Equal("payment_intent", intent.Object); - } - - [Fact] - public async Task ConfirmAsync() - { - var intent = await this.service.ConfirmAsync(PaymentIntentId, this.confirmOptions); - this.AssertRequest(HttpMethod.Post, "/v1/payment_intents/pi_123/confirm"); - Assert.NotNull(intent); - Assert.Equal("payment_intent", intent.Object); - } - - [Fact] - public void Create() - { - var intent = this.service.Create(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/payment_intents"); - Assert.NotNull(intent); - Assert.Equal("payment_intent", intent.Object); - } - - [Fact] - public async Task CreateAsync() - { - var intent = await this.service.CreateAsync(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/payment_intents"); - Assert.NotNull(intent); - Assert.Equal("payment_intent", intent.Object); - } - - [Fact] - public void Get() - { - var intent = this.service.Get(PaymentIntentId); - this.AssertRequest(HttpMethod.Get, "/v1/payment_intents/pi_123"); - Assert.NotNull(intent); - Assert.Equal("payment_intent", intent.Object); - } - - [Fact] - public async Task GetAsync() - { - var intent = await this.service.GetAsync(PaymentIntentId); - this.AssertRequest(HttpMethod.Get, "/v1/payment_intents/pi_123"); - Assert.NotNull(intent); - Assert.Equal("payment_intent", intent.Object); - } - - [Fact] - public void GetWithClientSecret() - { - var options = new PaymentIntentGetOptions - { - ClientSecret = "pi_client_secret_123", - }; - var intent = this.service.Get(PaymentIntentId, options); - this.AssertRequest(HttpMethod.Get, "/v1/payment_intents/pi_123"); - Assert.NotNull(intent); - Assert.Equal("payment_intent", intent.Object); - } - - [Fact] - public void List() - { - var intents = this.service.List(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/payment_intents"); - Assert.NotNull(intents); - Assert.Equal("list", intents.Object); - Assert.Single(intents.Data); - Assert.Equal("payment_intent", intents.Data[0].Object); - } - - [Fact] - public async Task ListAsync() - { - var intents = await this.service.ListAsync(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/payment_intents"); - Assert.NotNull(intents); - Assert.Equal("list", intents.Object); - Assert.Single(intents.Data); - Assert.Equal("payment_intent", intents.Data[0].Object); - } - - [Fact] - public void ListAutoPaging() - { - var intent = this.service.ListAutoPaging(this.listOptions).First(); - Assert.NotNull(intent); - Assert.Equal("payment_intent", intent.Object); - } - - [Fact] - public async Task ListAutoPagingAsync() - { - var intent = await this.service.ListAutoPagingAsync(this.listOptions).FirstAsync(); - Assert.NotNull(intent); - Assert.Equal("payment_intent", intent.Object); - } - - [Fact] - public void Update() - { - var intent = this.service.Update(PaymentIntentId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/payment_intents/pi_123"); - Assert.NotNull(intent); - Assert.Equal("payment_intent", intent.Object); - } - - [Fact] - public async Task UpdateAsync() - { - var intent = await this.service.UpdateAsync(PaymentIntentId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/payment_intents/pi_123"); - Assert.NotNull(intent); - Assert.Equal("payment_intent", intent.Object); - } - } -} diff --git a/src/StripeTests/Services/PaymentMethods/PaymentMethodServiceTest.cs b/src/StripeTests/Services/PaymentMethods/PaymentMethodServiceTest.cs deleted file mode 100644 index c9865c4465..0000000000 --- a/src/StripeTests/Services/PaymentMethods/PaymentMethodServiceTest.cs +++ /dev/null @@ -1,189 +0,0 @@ -namespace StripeTests -{ - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; - using Moq.Protected; - using Stripe; - using Xunit; - - public class PaymentMethodServiceTest : BaseStripeTest - { - private const string PaymentMethodId = "pm_123"; - - private readonly PaymentMethodService service; - private readonly PaymentMethodAttachOptions attachOptions; - private readonly PaymentMethodCreateOptions createOptions; - private readonly PaymentMethodDetachOptions detachOptions; - private readonly PaymentMethodListOptions listOptions; - private readonly PaymentMethodUpdateOptions updateOptions; - - public PaymentMethodServiceTest( - StripeMockFixture stripeMockFixture, - MockHttpClientFixture mockHttpClientFixture) - : base(stripeMockFixture, mockHttpClientFixture) - { - this.service = new PaymentMethodService(this.StripeClient); - - this.attachOptions = new PaymentMethodAttachOptions - { - Customer = "cus_123", - }; - - this.createOptions = new PaymentMethodCreateOptions - { - Card = new PaymentMethodCardOptions - { - Token = "tok_123", - }, - Type = "card", - }; - - this.detachOptions = new PaymentMethodDetachOptions - { - }; - - this.listOptions = new PaymentMethodListOptions - { - Customer = "cus_123", - Type = "card", - }; - - this.updateOptions = new PaymentMethodUpdateOptions - { - Metadata = new Dictionary - { - { "key", "value" }, - }, - }; - } - - [Fact] - public void Attach() - { - var payment_method = this.service.Attach(PaymentMethodId, this.attachOptions); - this.AssertRequest(HttpMethod.Post, "/v1/payment_methods/pm_123/attach"); - Assert.NotNull(payment_method); - Assert.Equal("payment_method", payment_method.Object); - } - - [Fact] - public async Task AttachAsync() - { - var payment_method = await this.service.AttachAsync(PaymentMethodId, this.attachOptions); - this.AssertRequest(HttpMethod.Post, "/v1/payment_methods/pm_123/attach"); - Assert.NotNull(payment_method); - Assert.Equal("payment_method", payment_method.Object); - } - - [Fact] - public void Create() - { - var payment_method = this.service.Create(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/payment_methods"); - Assert.NotNull(payment_method); - Assert.Equal("payment_method", payment_method.Object); - } - - [Fact] - public async Task CreateAsync() - { - var payment_method = await this.service.CreateAsync(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/payment_methods"); - Assert.NotNull(payment_method); - Assert.Equal("payment_method", payment_method.Object); - } - - [Fact] - public void Detach() - { - var payment_method = this.service.Detach(PaymentMethodId, this.detachOptions); - this.AssertRequest(HttpMethod.Post, "/v1/payment_methods/pm_123/detach"); - Assert.NotNull(payment_method); - Assert.Equal("payment_method", payment_method.Object); - } - - [Fact] - public async Task DetachAsync() - { - var payment_method = await this.service.DetachAsync(PaymentMethodId, this.detachOptions); - this.AssertRequest(HttpMethod.Post, "/v1/payment_methods/pm_123/detach"); - Assert.NotNull(payment_method); - Assert.Equal("payment_method", payment_method.Object); - } - - [Fact] - public void Get() - { - var payment_method = this.service.Get(PaymentMethodId); - this.AssertRequest(HttpMethod.Get, "/v1/payment_methods/pm_123"); - Assert.NotNull(payment_method); - Assert.Equal("payment_method", payment_method.Object); - } - - // load bearing test - this ensures that autogen methods with ids in the url - // encode those params across all classes - [Fact] - public void GetEncodesParams() - { - // we don't want to hit stripe-mock becuase it handles path traversals weirdly - this.StubRequest(HttpMethod.Get, "/v1/payment_methods/very%2Fcool", HttpStatusCode.OK, "{}"); - - // this ID should get URL encoded in the request - this.service.Get("very/cool"); - - // assert that that was the case - this.AssertRequest(HttpMethod.Get, "/v1/payment_methods/very%2Fcool"); - } - - [Fact] - public async Task GetAsync() - { - var payment_method = await this.service.GetAsync(PaymentMethodId); - this.AssertRequest(HttpMethod.Get, "/v1/payment_methods/pm_123"); - Assert.NotNull(payment_method); - Assert.Equal("payment_method", payment_method.Object); - } - - [Fact] - public void List() - { - var payment_methods = this.service.List(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/payment_methods"); - Assert.NotNull(payment_methods); - Assert.Equal("list", payment_methods.Object); - Assert.Single(payment_methods.Data); - Assert.Equal("payment_method", payment_methods.Data[0].Object); - } - - [Fact] - public async Task ListAsync() - { - var payment_methods = await this.service.ListAsync(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/payment_methods"); - Assert.NotNull(payment_methods); - Assert.Equal("list", payment_methods.Object); - Assert.Single(payment_methods.Data); - Assert.Equal("payment_method", payment_methods.Data[0].Object); - } - - [Fact] - public void ListAutoPaging() - { - var payment_method = this.service.ListAutoPaging(this.listOptions).First(); - Assert.NotNull(payment_method); - Assert.Equal("payment_method", payment_method.Object); - } - - [Fact] - public async Task ListAutoPagingAsync() - { - var payment_method = await this.service.ListAutoPagingAsync(this.listOptions).FirstAsync(); - Assert.NotNull(payment_method); - Assert.Equal("payment_method", payment_method.Object); - } - } -} diff --git a/src/StripeTests/Services/Payouts/PayoutServiceTest.cs b/src/StripeTests/Services/Payouts/PayoutServiceTest.cs deleted file mode 100644 index fde4296c7c..0000000000 --- a/src/StripeTests/Services/Payouts/PayoutServiceTest.cs +++ /dev/null @@ -1,175 +0,0 @@ -namespace StripeTests -{ - using System.Collections.Generic; - using System.Linq; - using System.Net.Http; - using System.Threading.Tasks; - - using Stripe; - using Xunit; - - public class PayoutServiceTest : BaseStripeTest - { - private const string PayoutId = "po_123"; - - private readonly PayoutService service; - private readonly PayoutCreateOptions createOptions; - private readonly PayoutUpdateOptions updateOptions; - private readonly PayoutListOptions listOptions; - - public PayoutServiceTest( - StripeMockFixture stripeMockFixture, - MockHttpClientFixture mockHttpClientFixture) - : base(stripeMockFixture, mockHttpClientFixture) - { - this.service = new PayoutService(this.StripeClient); - - this.createOptions = new PayoutCreateOptions - { - Amount = 123, - Currency = "usd", - }; - - this.updateOptions = new PayoutUpdateOptions - { - Metadata = new Dictionary - { - { "key", "value" }, - }, - }; - - this.listOptions = new PayoutListOptions - { - Limit = 1, - }; - } - - [Fact] - public void Create() - { - var payout = this.service.Create(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/payouts"); - Assert.NotNull(payout); - Assert.Equal("payout", payout.Object); - } - - [Fact] - public async Task CreateAsync() - { - var payout = await this.service.CreateAsync(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/payouts"); - Assert.NotNull(payout); - Assert.Equal("payout", payout.Object); - } - - [Fact] - public void Cancel() - { - var payout = this.service.Cancel(PayoutId); - this.AssertRequest(HttpMethod.Post, "/v1/payouts/po_123/cancel"); - Assert.NotNull(payout); - Assert.Equal("payout", payout.Object); - } - - [Fact] - public async Task CancelAsync() - { - var payout = await this.service.CancelAsync(PayoutId); - this.AssertRequest(HttpMethod.Post, "/v1/payouts/po_123/cancel"); - Assert.NotNull(payout); - Assert.Equal("payout", payout.Object); - } - - [Fact] - public void Get() - { - var payout = this.service.Get(PayoutId); - this.AssertRequest(HttpMethod.Get, "/v1/payouts/po_123"); - Assert.NotNull(payout); - Assert.Equal("payout", payout.Object); - } - - [Fact] - public async Task GetAsync() - { - var payout = await this.service.GetAsync(PayoutId); - this.AssertRequest(HttpMethod.Get, "/v1/payouts/po_123"); - Assert.NotNull(payout); - Assert.Equal("payout", payout.Object); - } - - [Fact] - public void List() - { - var payouts = this.service.List(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/payouts"); - Assert.NotNull(payouts); - Assert.Equal("list", payouts.Object); - Assert.Single(payouts.Data); - Assert.Equal("payout", payouts.Data[0].Object); - } - - [Fact] - public async Task ListAsync() - { - var payouts = await this.service.ListAsync(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/payouts"); - Assert.NotNull(payouts); - Assert.Equal("list", payouts.Object); - Assert.Single(payouts.Data); - Assert.Equal("payout", payouts.Data[0].Object); - } - - [Fact] - public void ListAutoPaging() - { - var payout = this.service.ListAutoPaging(this.listOptions).First(); - Assert.NotNull(payout); - Assert.Equal("payout", payout.Object); - } - - [Fact] - public async Task ListAutoPagingAsync() - { - var payout = await this.service.ListAutoPagingAsync(this.listOptions).FirstAsync(); - Assert.NotNull(payout); - Assert.Equal("payout", payout.Object); - } - - [Fact] - public void Reverse() - { - var payout = this.service.Reverse(PayoutId); - this.AssertRequest(HttpMethod.Post, "/v1/payouts/po_123/reverse"); - Assert.NotNull(payout); - Assert.Equal("payout", payout.Object); - } - - [Fact] - public async Task ReverseAsync() - { - var payout = await this.service.ReverseAsync(PayoutId); - this.AssertRequest(HttpMethod.Post, "/v1/payouts/po_123/reverse"); - Assert.NotNull(payout); - Assert.Equal("payout", payout.Object); - } - - [Fact] - public void Update() - { - var payout = this.service.Update(PayoutId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/payouts/po_123"); - Assert.NotNull(payout); - Assert.Equal("payout", payout.Object); - } - - [Fact] - public async Task UpdateAsync() - { - var payout = await this.service.UpdateAsync(PayoutId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/payouts/po_123"); - Assert.NotNull(payout); - Assert.Equal("payout", payout.Object); - } - } -} diff --git a/src/StripeTests/Services/Persons/AccountPersonServiceTest.cs b/src/StripeTests/Services/Persons/AccountPersonServiceTest.cs deleted file mode 100644 index 70179464c2..0000000000 --- a/src/StripeTests/Services/Persons/AccountPersonServiceTest.cs +++ /dev/null @@ -1,182 +0,0 @@ -namespace StripeTests -{ - using System.Linq; - using System.Net.Http; - using System.Threading.Tasks; - - using Stripe; - using Xunit; - - public class AccountPersonServiceTest : BaseStripeTest - { - private const string AccountId = "acct_123"; - private const string PersonId = "person_123"; - - private readonly AccountPersonService service; - private readonly AccountPersonCreateOptions createOptions; - private readonly AccountPersonUpdateOptions updateOptions; - private readonly AccountPersonListOptions listOptions; - - public AccountPersonServiceTest( - StripeMockFixture stripeMockFixture, - MockHttpClientFixture mockHttpClientFixture) - : base(stripeMockFixture, mockHttpClientFixture) - { - this.service = new AccountPersonService(this.StripeClient); - - this.createOptions = new AccountPersonCreateOptions - { - FirstName = "John", - Relationship = new AccountPersonRelationshipOptions - { - Owner = true, - PercentOwnership = 30.5m, - Representative = true, - }, - Verification = new AccountPersonVerificationOptions - { - AdditionalDocument = new AccountPersonVerificationAdditionalDocumentOptions - { - Back = "file_abc", - Front = "file_def", - }, - Document = new AccountPersonVerificationDocumentOptions - { - Back = "file_123", - Front = "file_345", - }, - }, - }; - - this.updateOptions = new AccountPersonUpdateOptions - { - FirstName = "John", - Relationship = new AccountPersonRelationshipOptions - { - Owner = true, - PercentOwnership = 30.5m, - Representative = true, - }, - }; - - this.listOptions = new AccountPersonListOptions - { - Limit = 1, - Relationship = new AccountPersonRelationshipOptions - { - Director = true, - }, - }; - } - - [Fact] - public void Create() - { - var person = this.service.Create(AccountId, this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/accounts/acct_123/persons"); - Assert.NotNull(person); - Assert.Equal("person", person.Object); - } - - [Fact] - public async Task CreateAsync() - { - var person = await this.service.CreateAsync(AccountId, this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/accounts/acct_123/persons"); - Assert.NotNull(person); - Assert.Equal("person", person.Object); - } - - [Fact] - public void Delete() - { - var person = this.service.Delete(AccountId, PersonId); - this.AssertRequest(HttpMethod.Delete, "/v1/accounts/acct_123/persons/person_123"); - Assert.NotNull(person); - Assert.Equal("person", person.Object); - } - - [Fact] - public async Task DeleteAsync() - { - var person = await this.service.DeleteAsync(AccountId, PersonId); - this.AssertRequest(HttpMethod.Delete, "/v1/accounts/acct_123/persons/person_123"); - Assert.NotNull(person); - Assert.Equal("person", person.Object); - } - - [Fact] - public void Get() - { - var person = this.service.Get(AccountId, PersonId); - this.AssertRequest(HttpMethod.Get, "/v1/accounts/acct_123/persons/person_123"); - Assert.NotNull(person); - Assert.Equal("person", person.Object); - } - - [Fact] - public async Task GetAsync() - { - var person = await this.service.GetAsync(AccountId, PersonId); - this.AssertRequest(HttpMethod.Get, "/v1/accounts/acct_123/persons/person_123"); - Assert.NotNull(person); - Assert.Equal("person", person.Object); - } - - [Fact] - public void List() - { - var persons = this.service.List(AccountId, this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/accounts/acct_123/persons"); - Assert.NotNull(persons); - Assert.Equal("list", persons.Object); - Assert.Single(persons.Data); - Assert.Equal("person", persons.Data[0].Object); - } - - [Fact] - public async Task ListAsync() - { - var persons = await this.service.ListAsync(AccountId, this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/accounts/acct_123/persons"); - Assert.NotNull(persons); - Assert.Equal("list", persons.Object); - Assert.Single(persons.Data); - Assert.Equal("person", persons.Data[0].Object); - } - - [Fact] - public void ListAutoPaging() - { - var person = this.service.ListAutoPaging(AccountId, this.listOptions).First(); - Assert.NotNull(person); - Assert.Equal("person", person.Object); - } - - [Fact] - public async Task ListAutoPagingAsync() - { - var person = await this.service.ListAutoPagingAsync(AccountId, this.listOptions).FirstAsync(); - Assert.NotNull(person); - Assert.Equal("person", person.Object); - } - - [Fact] - public void Update() - { - var person = this.service.Update(AccountId, PersonId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/accounts/acct_123/persons/person_123"); - Assert.NotNull(person); - Assert.Equal("person", person.Object); - } - - [Fact] - public async Task UpdateAsync() - { - var person = await this.service.UpdateAsync(AccountId, PersonId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/accounts/acct_123/persons/person_123"); - Assert.NotNull(person); - Assert.Equal("person", person.Object); - } - } -} diff --git a/src/StripeTests/Services/Plans/PlanCreateOptionsTest.cs b/src/StripeTests/Services/Plans/PlanCreateOptionsTest.cs deleted file mode 100644 index 3e8690acc2..0000000000 --- a/src/StripeTests/Services/Plans/PlanCreateOptionsTest.cs +++ /dev/null @@ -1,64 +0,0 @@ -namespace StripeTests -{ - using System.Collections.Generic; - using Stripe; - using Stripe.Infrastructure.FormEncoding; - using Xunit; - - public class PlanCreateOptionsTest : BaseStripeTest - { - [Fact] - public void SerializeTiersProperly() - { - var options = new PlanCreateOptions - { - Tiers = new List - { - new PlanTierOptions - { - UnitAmount = 1000, - UpTo = 10, - }, - new PlanTierOptions - { - UnitAmount = 2000, - UpTo = PlanTierUpTo.Inf, - }, - }, - }; - - Assert.Equal( - "tiers[0][unit_amount]=1000&tiers[0][up_to]=10&" + - "tiers[1][unit_amount]=2000&tiers[1][up_to]=inf", - ContentEncoder.CreateQueryString(options)); - } - - [Fact] - public void SerializeDecimalTiersProperly() - { - var options = new PlanCreateOptions - { - Tiers = new List - { - new PlanTierOptions - { - UnitAmountDecimal = 0.003m, - FlatAmountDecimal = 0.12m, - UpTo = 10, - }, - new PlanTierOptions - { - UnitAmountDecimal = 0.004m, - FlatAmountDecimal = 0.24m, - UpTo = PlanTierUpTo.Inf, - }, - }, - }; - - Assert.Equal( - "tiers[0][flat_amount_decimal]=0.12&tiers[0][unit_amount_decimal]=0.003&tiers[0][up_to]=10&" + - "tiers[1][flat_amount_decimal]=0.24&tiers[1][unit_amount_decimal]=0.004&tiers[1][up_to]=inf", - ContentEncoder.CreateQueryString(options)); - } - } -} diff --git a/src/StripeTests/Services/Plans/PlanServiceTest.cs b/src/StripeTests/Services/Plans/PlanServiceTest.cs deleted file mode 100644 index 9c5a758937..0000000000 --- a/src/StripeTests/Services/Plans/PlanServiceTest.cs +++ /dev/null @@ -1,204 +0,0 @@ -namespace StripeTests -{ - using System.Collections.Generic; - using System.Linq; - using System.Net.Http; - using System.Threading.Tasks; - - using Stripe; - using Xunit; - - public class PlanServiceTest : BaseStripeTest - { - private const string PlanId = "plan_123"; - - private readonly PlanService service; - private readonly PlanCreateOptions createOptions; - private readonly PlanCreateOptions createDecimalTierOptions; - private readonly PlanUpdateOptions updateOptions; - private readonly PlanListOptions listOptions; - - public PlanServiceTest( - StripeMockFixture stripeMockFixture, - MockHttpClientFixture mockHttpClientFixture) - : base(stripeMockFixture, mockHttpClientFixture) - { - this.service = new PlanService(this.StripeClient); - - this.createOptions = new PlanCreateOptions - { - AmountDecimal = 0.01234567890m, // Ensure decimals work - Currency = "usd", - Interval = "month", - Nickname = "Plan Nickmame", - Product = new PlanProductOptions - { - Name = "Product Name", - }, - }; - - this.createDecimalTierOptions = new PlanCreateOptions - { - Currency = "usd", - Interval = "month", - Nickname = "Plan Nickmame", - Product = new PlanProductOptions - { - Name = "Product Name", - }, - Tiers = new List - { - new PlanTierOptions - { - UnitAmountDecimal = 0.04m, - UpTo = 10, - }, - new PlanTierOptions - { - UnitAmountDecimal = 0.03m, - UpTo = PlanTierUpTo.Inf, - }, - }, - }; - - this.updateOptions = new PlanUpdateOptions - { - Metadata = new Dictionary - { - { "key", "value" }, - }, - }; - - this.listOptions = new PlanListOptions - { - Limit = 1, - }; - } - - [Fact] - public void Create() - { - var plan = this.service.Create(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/plans"); - Assert.NotNull(plan); - Assert.Equal("plan", plan.Object); - } - - [Fact] - public void Create_DecimalTiers() - { - var plan = this.service.Create(this.createDecimalTierOptions); - this.AssertRequest(HttpMethod.Post, "/v1/plans"); - Assert.NotNull(plan); - Assert.Equal("plan", plan.Object); - } - - [Fact] - public async Task CreateAsync_DecimalTiers() - { - var plan = await this.service.CreateAsync(this.createDecimalTierOptions); - this.AssertRequest(HttpMethod.Post, "/v1/plans"); - Assert.NotNull(plan); - Assert.Equal("plan", plan.Object); - } - - [Fact] - public async Task CreateAsync() - { - var plan = await this.service.CreateAsync(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/plans"); - Assert.NotNull(plan); - Assert.Equal("plan", plan.Object); - } - - [Fact] - public void Delete() - { - var deleted = this.service.Delete(PlanId); - this.AssertRequest(HttpMethod.Delete, "/v1/plans/plan_123"); - Assert.NotNull(deleted); - } - - [Fact] - public async Task DeleteAsync() - { - var deleted = await this.service.DeleteAsync(PlanId); - this.AssertRequest(HttpMethod.Delete, "/v1/plans/plan_123"); - Assert.NotNull(deleted); - } - - [Fact] - public void Get() - { - var plan = this.service.Get(PlanId); - this.AssertRequest(HttpMethod.Get, "/v1/plans/plan_123"); - Assert.NotNull(plan); - Assert.Equal("plan", plan.Object); - } - - [Fact] - public async Task GetAsync() - { - var plan = await this.service.GetAsync(PlanId); - this.AssertRequest(HttpMethod.Get, "/v1/plans/plan_123"); - Assert.NotNull(plan); - Assert.Equal("plan", plan.Object); - } - - [Fact] - public void List() - { - var plans = this.service.List(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/plans"); - Assert.NotNull(plans); - Assert.Equal("list", plans.Object); - Assert.Single(plans.Data); - Assert.Equal("plan", plans.Data[0].Object); - } - - [Fact] - public async Task ListAsync() - { - var plans = await this.service.ListAsync(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/plans"); - Assert.NotNull(plans); - Assert.Equal("list", plans.Object); - Assert.Single(plans.Data); - Assert.Equal("plan", plans.Data[0].Object); - } - - [Fact] - public void ListAutoPaging() - { - var plan = this.service.ListAutoPaging(this.listOptions).First(); - Assert.NotNull(plan); - Assert.Equal("plan", plan.Object); - } - - [Fact] - public async Task ListAutoPagingAsync() - { - var plan = await this.service.ListAutoPagingAsync(this.listOptions).FirstAsync(); - Assert.NotNull(plan); - Assert.Equal("plan", plan.Object); - } - - [Fact] - public void Update() - { - var plan = this.service.Update(PlanId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/plans/plan_123"); - Assert.NotNull(plan); - Assert.Equal("plan", plan.Object); - } - - [Fact] - public async Task UpdateAsync() - { - var plan = await this.service.UpdateAsync(PlanId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/plans/plan_123"); - Assert.NotNull(plan); - Assert.Equal("plan", plan.Object); - } - } -} diff --git a/src/StripeTests/Services/Prices/PriceCreateOptionsTest.cs b/src/StripeTests/Services/Prices/PriceCreateOptionsTest.cs deleted file mode 100644 index 2e7ac95e68..0000000000 --- a/src/StripeTests/Services/Prices/PriceCreateOptionsTest.cs +++ /dev/null @@ -1,64 +0,0 @@ -namespace StripeTests -{ - using System.Collections.Generic; - using Stripe; - using Stripe.Infrastructure.FormEncoding; - using Xunit; - - public class PriceCreateOptionsTest : BaseStripeTest - { - [Fact] - public void SerializeTiersProperly() - { - var options = new PriceCreateOptions - { - Tiers = new List - { - new PriceTierOptions - { - UnitAmount = 1000, - UpTo = 10, - }, - new PriceTierOptions - { - UnitAmount = 2000, - UpTo = PriceTierUpTo.Inf, - }, - }, - }; - - Assert.Equal( - "tiers[0][unit_amount]=1000&tiers[0][up_to]=10&" + - "tiers[1][unit_amount]=2000&tiers[1][up_to]=inf", - ContentEncoder.CreateQueryString(options)); - } - - [Fact] - public void SerializeDecimalTiersProperly() - { - var options = new PriceCreateOptions - { - Tiers = new List - { - new PriceTierOptions - { - UnitAmountDecimal = 0.003m, - FlatAmountDecimal = 0.12m, - UpTo = 10, - }, - new PriceTierOptions - { - UnitAmountDecimal = 0.004m, - FlatAmountDecimal = 0.24m, - UpTo = PriceTierUpTo.Inf, - }, - }, - }; - - Assert.Equal( - "tiers[0][flat_amount_decimal]=0.12&tiers[0][unit_amount_decimal]=0.003&tiers[0][up_to]=10&" + - "tiers[1][flat_amount_decimal]=0.24&tiers[1][unit_amount_decimal]=0.004&tiers[1][up_to]=inf", - ContentEncoder.CreateQueryString(options)); - } - } -} diff --git a/src/StripeTests/Services/Prices/PriceServiceTest.cs b/src/StripeTests/Services/Prices/PriceServiceTest.cs deleted file mode 100644 index 475e89f827..0000000000 --- a/src/StripeTests/Services/Prices/PriceServiceTest.cs +++ /dev/null @@ -1,202 +0,0 @@ -namespace StripeTests -{ - using System.Collections.Generic; - using System.Linq; - using System.Net.Http; - using System.Threading.Tasks; - - using Stripe; - using Xunit; - - public class PriceServiceTest : BaseStripeTest - { - private const string PriceId = "price_123"; - - private readonly PriceService service; - private readonly PriceCreateOptions createOptions; - private readonly PriceCreateOptions createDecimalTierOptions; - private readonly PriceUpdateOptions updateOptions; - private readonly PriceListOptions listOptions; - - public PriceServiceTest( - StripeMockFixture stripeMockFixture, - MockHttpClientFixture mockHttpClientFixture) - : base(stripeMockFixture, mockHttpClientFixture) - { - this.service = new PriceService(this.StripeClient); - - this.createOptions = new PriceCreateOptions - { - Currency = "usd", - Nickname = "Price Nickmame", - ProductData = new PriceProductDataOptions - { - Name = "Product Name", - }, - Recurring = new PriceRecurringOptions - { - Interval = "day", - IntervalCount = 15, - }, - UnitAmountDecimal = 0.01234567890m, // Ensure decimals work - }; - - this.createDecimalTierOptions = new PriceCreateOptions - { - Currency = "usd", - Nickname = "Price Nickmame", - ProductData = new PriceProductDataOptions - { - Name = "Product Name", - }, - Recurring = new PriceRecurringOptions - { - Interval = "day", - IntervalCount = 15, - }, - Tiers = new List - { - new PriceTierOptions - { - UnitAmountDecimal = 0.01234567890m, - UpTo = 10, - }, - new PriceTierOptions - { - UnitAmountDecimal = 0.02223m, - UpTo = PriceTierUpTo.Inf, - }, - }, - TiersMode = "graduated", - }; - - this.updateOptions = new PriceUpdateOptions - { - Metadata = new Dictionary - { - { "key", "value" }, - }, - }; - - this.listOptions = new PriceListOptions - { - Limit = 1, - LookupKeys = new List - { - "lookup_1", - "lookup_2", - }, - }; - } - - [Fact] - public void Create() - { - var price = this.service.Create(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/prices"); - Assert.NotNull(price); - Assert.Equal("price", price.Object); - } - - [Fact] - public void Create_DecimalTiers() - { - var price = this.service.Create(this.createDecimalTierOptions); - this.AssertRequest(HttpMethod.Post, "/v1/prices"); - Assert.NotNull(price); - Assert.Equal("price", price.Object); - } - - [Fact] - public async Task CreateAsync_DecimalTiers() - { - var price = await this.service.CreateAsync(this.createDecimalTierOptions); - this.AssertRequest(HttpMethod.Post, "/v1/prices"); - Assert.NotNull(price); - Assert.Equal("price", price.Object); - } - - [Fact] - public async Task CreateAsync() - { - var price = await this.service.CreateAsync(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/prices"); - Assert.NotNull(price); - Assert.Equal("price", price.Object); - } - - [Fact] - public void Get() - { - var price = this.service.Get(PriceId); - this.AssertRequest(HttpMethod.Get, "/v1/prices/price_123"); - Assert.NotNull(price); - Assert.Equal("price", price.Object); - } - - [Fact] - public async Task GetAsync() - { - var price = await this.service.GetAsync(PriceId); - this.AssertRequest(HttpMethod.Get, "/v1/prices/price_123"); - Assert.NotNull(price); - Assert.Equal("price", price.Object); - } - - [Fact] - public void List() - { - var prices = this.service.List(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/prices"); - Assert.NotNull(prices); - Assert.Equal("list", prices.Object); - Assert.Single(prices.Data); - Assert.Equal("price", prices.Data[0].Object); - } - - [Fact] - public async Task ListAsync() - { - var prices = await this.service.ListAsync(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/prices"); - Assert.NotNull(prices); - Assert.Equal("list", prices.Object); - Assert.Single(prices.Data); - Assert.Equal("price", prices.Data[0].Object); - } - - [Fact] - public void ListAutoPaging() - { - var price = this.service.ListAutoPaging(this.listOptions).First(); - Assert.NotNull(price); - Assert.Equal("price", price.Object); - } - - [Fact] - public async Task ListAutoPagingAsync() - { - var price = await this.service.ListAutoPagingAsync(this.listOptions).FirstAsync(); - Assert.NotNull(price); - Assert.Equal("price", price.Object); - } - - [Fact] - public void Update() - { - var price = this.service.Update(PriceId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/prices/price_123"); - Assert.NotNull(price); - Assert.Equal("price", price.Object); - } - - [Fact] - public async Task UpdateAsync() - { - var price = await this.service.UpdateAsync(PriceId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/prices/price_123"); - Assert.NotNull(price); - Assert.Equal("price", price.Object); - } - } -} diff --git a/src/StripeTests/Services/Products/ProductServiceTest.cs b/src/StripeTests/Services/Products/ProductServiceTest.cs deleted file mode 100644 index 340983266b..0000000000 --- a/src/StripeTests/Services/Products/ProductServiceTest.cs +++ /dev/null @@ -1,161 +0,0 @@ -namespace StripeTests -{ - using System.Collections.Generic; - using System.Linq; - using System.Net.Http; - using System.Threading.Tasks; - - using Stripe; - using Xunit; - - public class ProductServiceTest : BaseStripeTest - { - private const string ProductId = "prod_123"; - - private readonly ProductService service; - private readonly ProductCreateOptions createOptions; - private readonly ProductUpdateOptions updateOptions; - private readonly ProductListOptions listOptions; - - public ProductServiceTest( - StripeMockFixture stripeMockFixture, - MockHttpClientFixture mockHttpClientFixture) - : base(stripeMockFixture, mockHttpClientFixture) - { - this.service = new ProductService(this.StripeClient); - - this.createOptions = new ProductCreateOptions - { - Name = "product name", - PackageDimensions = new ProductPackageDimensionsOptions - { - Height = 100, - Length = 100, - Weight = 100, - Width = 100, - }, - }; - - this.updateOptions = new ProductUpdateOptions - { - Metadata = new Dictionary - { - { "key", "value" }, - }, - }; - - this.listOptions = new ProductListOptions - { - Limit = 1, - }; - } - - [Fact] - public void Create() - { - var product = this.service.Create(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/products"); - Assert.NotNull(product); - Assert.Equal("product", product.Object); - } - - [Fact] - public async Task CreateAsync() - { - var product = await this.service.CreateAsync(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/products"); - Assert.NotNull(product); - Assert.Equal("product", product.Object); - } - - [Fact] - public void Delete() - { - var deleted = this.service.Delete(ProductId); - this.AssertRequest(HttpMethod.Delete, "/v1/products/prod_123"); - Assert.NotNull(deleted); - } - - [Fact] - public async Task DeleteAsync() - { - var deleted = await this.service.DeleteAsync(ProductId); - this.AssertRequest(HttpMethod.Delete, "/v1/products/prod_123"); - Assert.NotNull(deleted); - } - - [Fact] - public void Get() - { - var product = this.service.Get(ProductId); - this.AssertRequest(HttpMethod.Get, "/v1/products/prod_123"); - Assert.NotNull(product); - Assert.Equal("product", product.Object); - } - - [Fact] - public async Task GetAsync() - { - var product = await this.service.GetAsync(ProductId); - this.AssertRequest(HttpMethod.Get, "/v1/products/prod_123"); - Assert.NotNull(product); - Assert.Equal("product", product.Object); - } - - [Fact] - public void List() - { - var products = this.service.List(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/products"); - Assert.NotNull(products); - Assert.Equal("list", products.Object); - Assert.Single(products.Data); - Assert.Equal("product", products.Data[0].Object); - } - - [Fact] - public async Task ListAsync() - { - var products = await this.service.ListAsync(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/products"); - Assert.NotNull(products); - Assert.Equal("list", products.Object); - Assert.Single(products.Data); - Assert.Equal("product", products.Data[0].Object); - } - - [Fact] - public void ListAutoPaging() - { - var product = this.service.ListAutoPaging(this.listOptions).First(); - Assert.NotNull(product); - Assert.Equal("product", product.Object); - } - - [Fact] - public async Task ListAutoPagingAsync() - { - var product = await this.service.ListAutoPagingAsync(this.listOptions).FirstAsync(); - Assert.NotNull(product); - Assert.Equal("product", product.Object); - } - - [Fact] - public void Update() - { - var product = this.service.Update(ProductId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/products/prod_123"); - Assert.NotNull(product); - Assert.Equal("product", product.Object); - } - - [Fact] - public async Task UpdateAsync() - { - var product = await this.service.UpdateAsync(ProductId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/products/prod_123"); - Assert.NotNull(product); - Assert.Equal("product", product.Object); - } - } -} diff --git a/src/StripeTests/Services/PromotionCodes/PromotionCodeServiceTest.cs b/src/StripeTests/Services/PromotionCodes/PromotionCodeServiceTest.cs deleted file mode 100644 index 1e25c13853..0000000000 --- a/src/StripeTests/Services/PromotionCodes/PromotionCodeServiceTest.cs +++ /dev/null @@ -1,144 +0,0 @@ -namespace StripeTests -{ - using System.Collections.Generic; - using System.Linq; - using System.Net.Http; - using System.Threading.Tasks; - - using Stripe; - using Xunit; - - public class PromotionCodeServiceTest : BaseStripeTest - { - private const string PromotionCodeId = "promo_123"; - - private readonly PromotionCodeService service; - private readonly PromotionCodeCreateOptions createOptions; - private readonly PromotionCodeUpdateOptions updateOptions; - private readonly PromotionCodeListOptions listOptions; - - public PromotionCodeServiceTest( - StripeMockFixture stripeMockFixture, - MockHttpClientFixture mockHttpClientFixture) - : base(stripeMockFixture, mockHttpClientFixture) - { - this.service = new PromotionCodeService(this.StripeClient); - - this.createOptions = new PromotionCodeCreateOptions - { - Promotion = new PromotionCodePromotionOptions - { - Coupon = "co_123", - }, - Code = "TESTCODE", - }; - - this.updateOptions = new PromotionCodeUpdateOptions - { - Metadata = new Dictionary - { - { "key", "value" }, - }, - }; - - this.listOptions = new PromotionCodeListOptions - { - Limit = 1, - }; - } - - /*[Fact] - public void Create() - { - var promotionCode = this.service.Create(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/promotion_codes"); - Assert.NotNull(promotionCode); - Assert.Equal("promotion_code", promotionCode.Object); - } - - [Fact] - public async Task CreateAsync() - { - var promotionCode = await this.service.CreateAsync(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/promotion_codes"); - Assert.NotNull(promotionCode); - Assert.Equal("promotion_code", promotionCode.Object); - } */ - - [Fact] - public void Get() - { - var promotionCode = this.service.Get(PromotionCodeId); - this.AssertRequest(HttpMethod.Get, "/v1/promotion_codes/promo_123"); - Assert.NotNull(promotionCode); - Assert.Equal("promotion_code", promotionCode.Object); - } - - [Fact] - public async Task GetAsync() - { - var promotionCode = await this.service.GetAsync(PromotionCodeId); - this.AssertRequest(HttpMethod.Get, "/v1/promotion_codes/promo_123"); - Assert.NotNull(promotionCode); - Assert.Equal("promotion_code", promotionCode.Object); - } - - [Fact] - public void List() - { - var promotionCodes = this.service.List(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/promotion_codes"); - Assert.NotNull(promotionCodes); - Assert.Equal("list", promotionCodes.Object); - Assert.Single(promotionCodes.Data); - Assert.Equal("promotion_code", promotionCodes.Data[0].Object); - } - - [Fact] - public async Task ListAsync() - { - var promotionCodes = await this.service.ListAsync(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/promotion_codes"); - Assert.NotNull(promotionCodes); - Assert.Equal("list", promotionCodes.Object); - Assert.Single(promotionCodes.Data); - Assert.Equal("promotion_code", promotionCodes.Data[0].Object); - } - - [Fact] - public void ListAutoPaging() - { - var promotionCode = this.service.ListAutoPaging(this.listOptions).First(); - Assert.NotNull(promotionCode); - Assert.Equal("promotion_code", promotionCode.Object); - } - -#if !NET45 - [Fact] - public async Task ListAutoPagingAsync() - { - var promotionCode = await this.service.ListAutoPagingAsync(this.listOptions).FirstAsync(); - Assert.NotNull(promotionCode); - Assert.Equal("promotion_code", promotionCode.Object); - } -#endif - - [Fact] - public void Update() - { - var promotionCode = this.service.Update(PromotionCodeId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/promotion_codes/promo_123"); - Assert.NotNull(promotionCode); - Assert.Equal("promotion_code", promotionCode.Object); - } - - [Fact] - public async Task UpdateAsync() - { - var promotionCode = await this.service.UpdateAsync(PromotionCodeId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/promotion_codes/promo_123"); - Assert.NotNull(promotionCode); - Assert.Equal("promotion_code", promotionCode.Object); - } - } -} diff --git a/src/StripeTests/Services/Quotes/QuoteServiceTest.cs b/src/StripeTests/Services/Quotes/QuoteServiceTest.cs deleted file mode 100644 index 4cb29b9501..0000000000 --- a/src/StripeTests/Services/Quotes/QuoteServiceTest.cs +++ /dev/null @@ -1,353 +0,0 @@ -namespace StripeTests -{ - using System.Collections.Generic; - using System.IO; - using System.Linq; - using System.Net.Http; - using System.Threading.Tasks; - - using Stripe; - using Xunit; - - public class QuoteServiceTest : BaseStripeTest - { - private const string QuoteId = "qt_123"; - - private readonly QuoteService service; - private readonly QuoteCreateOptions createOptions; - private readonly QuoteUpdateOptions updateOptions; - private readonly QuoteUpdateOptions updateOptionsWithCurrentPeriodEnd; - private readonly QuoteUpdateOptions updateOptionsWithDateTime; - private readonly QuoteListOptions listOptions; - private readonly QuoteAcceptOptions acceptOptions; - private readonly QuoteCancelOptions cancelOptions; - private readonly QuoteFinalizeOptions finalizeOptions; - private readonly QuoteLineItemListOptions listLineItemsOptions; - private readonly QuoteComputedUpfrontLineItemsListOptions listComputedUpfrontLineItemsOptions; - private readonly QuotePdfOptions pdfOptions; - - public QuoteServiceTest( - StripeMockFixture stripeMockFixture, - MockHttpClientFixture mockHttpClientFixture) - : base(stripeMockFixture, mockHttpClientFixture) - { - this.service = new QuoteService(this.StripeClient); - - this.createOptions = new QuoteCreateOptions - { - Customer = "cus_123", - }; - - this.updateOptions = new QuoteUpdateOptions - { - Metadata = new Dictionary - { - { "key", "value" }, - }, - }; - - this.updateOptionsWithCurrentPeriodEnd = new QuoteUpdateOptions - { - SubscriptionData = new QuoteSubscriptionDataOptions - { - EffectiveDate = QuoteSubscriptionDataEffectiveDate.CurrentPeriodEnd, - }, - }; - - this.updateOptionsWithDateTime = new QuoteUpdateOptions - { - SubscriptionData = new QuoteSubscriptionDataOptions - { - EffectiveDate = System.DateTime.Now, - }, - }; - - this.listOptions = new QuoteListOptions - { - Limit = 1, - }; - - this.acceptOptions = new QuoteAcceptOptions - { - }; - - this.cancelOptions = new QuoteCancelOptions - { - }; - - this.finalizeOptions = new QuoteFinalizeOptions - { - }; - - this.listLineItemsOptions = new QuoteLineItemListOptions - { - Limit = 1, - }; - - this.listComputedUpfrontLineItemsOptions = new QuoteComputedUpfrontLineItemsListOptions - { - Limit = 1, - }; - - this.pdfOptions = new QuotePdfOptions - { - }; - } - - [Fact] - public void Create() - { - var quote = this.service.Create(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/quotes"); - Assert.NotNull(quote); - Assert.Equal("quote", quote.Object); - } - - [Fact] - public async Task CreateAsync() - { - var quote = await this.service.CreateAsync(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/quotes"); - Assert.NotNull(quote); - Assert.Equal("quote", quote.Object); - } - - [Fact] - public void Accept() - { - var quote = this.service.Accept(QuoteId, this.acceptOptions); - this.AssertRequest(HttpMethod.Post, "/v1/quotes/qt_123/accept"); - Assert.NotNull(quote); - Assert.Equal("quote", quote.Object); - } - - [Fact] - public async Task AcceptAsync() - { - var quote = await this.service.AcceptAsync(QuoteId, this.acceptOptions); - this.AssertRequest(HttpMethod.Post, "/v1/quotes/qt_123/accept"); - Assert.NotNull(quote); - Assert.Equal("quote", quote.Object); - } - - [Fact] - public void Cancel() - { - var quote = this.service.Cancel(QuoteId, this.cancelOptions); - this.AssertRequest(HttpMethod.Post, "/v1/quotes/qt_123/cancel"); - Assert.NotNull(quote); - Assert.Equal("quote", quote.Object); - } - - [Fact] - public async Task CancelAsync() - { - var quote = await this.service.CancelAsync(QuoteId, this.cancelOptions); - this.AssertRequest(HttpMethod.Post, "/v1/quotes/qt_123/cancel"); - Assert.NotNull(quote); - Assert.Equal("quote", quote.Object); - } - - [Fact] - public void FinalizeQuote() - { - var quote = this.service.FinalizeQuote(QuoteId, this.finalizeOptions); - this.AssertRequest(HttpMethod.Post, "/v1/quotes/qt_123/finalize"); - Assert.NotNull(quote); - Assert.Equal("quote", quote.Object); - } - - [Fact] - public async Task FinalizeQuoteAsync() - { - var quote = await this.service.FinalizeQuoteAsync(QuoteId, this.finalizeOptions); - this.AssertRequest(HttpMethod.Post, "/v1/quotes/qt_123/finalize"); - Assert.NotNull(quote); - Assert.Equal("quote", quote.Object); - } - - [Fact] - public void Get() - { - var quote = this.service.Get(QuoteId); - this.AssertRequest(HttpMethod.Get, "/v1/quotes/qt_123"); - Assert.NotNull(quote); - Assert.Equal("quote", quote.Object); - } - - [Fact] - public async Task GetAsync() - { - var quote = await this.service.GetAsync(QuoteId); - this.AssertRequest(HttpMethod.Get, "/v1/quotes/qt_123"); - Assert.NotNull(quote); - Assert.Equal("quote", quote.Object); - } - - [Fact] - public void List() - { - var quotes = this.service.List(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/quotes"); - Assert.NotNull(quotes); - Assert.Equal("list", quotes.Object); - Assert.Single(quotes.Data); - Assert.Equal("quote", quotes.Data[0].Object); - } - - [Fact] - public async Task ListAsync() - { - var quotes = await this.service.ListAsync(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/quotes"); - Assert.NotNull(quotes); - Assert.Equal("list", quotes.Object); - Assert.Single(quotes.Data); - Assert.Equal("quote", quotes.Data[0].Object); - } - - [Fact] - public void ListAutoPaging() - { - var quote = this.service.ListAutoPaging(this.listOptions).First(); - Assert.NotNull(quote); - Assert.Equal("quote", quote.Object); - } - - [Fact] - public async Task ListAutoPagingAsync() - { - var quote = await this.service.ListAutoPagingAsync(this.listOptions).FirstAsync(); - Assert.NotNull(quote); - Assert.Equal("quote", quote.Object); - } - - [Fact] - public void ListLineItems() - { - var lineItems = this.service.LineItems.List(QuoteId, this.listLineItemsOptions); - this.AssertRequest(HttpMethod.Get, "/v1/quotes/qt_123/line_items"); - Assert.NotNull(lineItems); - Assert.Equal("list", lineItems.Object); - Assert.Single(lineItems.Data); - Assert.Equal("item", lineItems.Data[0].Object); - } - - [Fact] - public async Task ListLineItemsAsync() - { - var lineItems = await this.service.LineItems.ListAsync(QuoteId, this.listLineItemsOptions); - this.AssertRequest(HttpMethod.Get, "/v1/quotes/qt_123/line_items"); - Assert.NotNull(lineItems); - Assert.Equal("list", lineItems.Object); - Assert.Single(lineItems.Data); - Assert.Equal("item", lineItems.Data[0].Object); - } - - [Fact] - public void ListLineItemsAutoPaging() - { - var lineItem = this.service.LineItems.ListAutoPaging(QuoteId, this.listLineItemsOptions).First(); - Assert.NotNull(lineItem); - Assert.Equal("item", lineItem.Object); - } - - [Fact] - public async Task ListLineItemsAutoPagingAsync() - { - var lineItem = await this.service.LineItems.ListAutoPagingAsync(QuoteId, this.listLineItemsOptions).FirstAsync(); - Assert.NotNull(lineItem); - Assert.Equal("item", lineItem.Object); - } - - [Fact] - public void ListComputedUpfrontLineItems() - { - var lineItems = this.service.ComputedUpfrontLineItems.List(QuoteId, this.listComputedUpfrontLineItemsOptions); - this.AssertRequest(HttpMethod.Get, "/v1/quotes/qt_123/computed_upfront_line_items"); - Assert.NotNull(lineItems); - Assert.Equal("list", lineItems.Object); - Assert.Single(lineItems.Data); - Assert.Equal("item", lineItems.Data[0].Object); - } - - [Fact] - public async Task ListComputedUpfrontLineItemsAsync() - { - var lineItems = await this.service.ComputedUpfrontLineItems.ListAsync(QuoteId, this.listComputedUpfrontLineItemsOptions); - this.AssertRequest(HttpMethod.Get, "/v1/quotes/qt_123/computed_upfront_line_items"); - Assert.NotNull(lineItems); - Assert.Equal("list", lineItems.Object); - Assert.Single(lineItems.Data); - Assert.Equal("item", lineItems.Data[0].Object); - } - - [Fact] - public void ListComputedUpfrontLineItemsAutoPaging() - { - var lineItem = this.service.ComputedUpfrontLineItems.ListAutoPaging(QuoteId, this.listComputedUpfrontLineItemsOptions).First(); - Assert.NotNull(lineItem); - Assert.Equal("item", lineItem.Object); - } - - [Fact] - public async Task ListComputedUpfrontLineItemsAutoPagingAsync() - { - var lineItem = await this.service.ComputedUpfrontLineItems.ListAutoPagingAsync(QuoteId, this.listComputedUpfrontLineItemsOptions).FirstAsync(); - Assert.NotNull(lineItem); - Assert.Equal("item", lineItem.Object); - } - - [Fact] - public void Pdf() - { - var stream = this.service.Pdf(QuoteId, this.pdfOptions); - this.AssertRequest(HttpMethod.Get, "/v1/quotes/qt_123/pdf"); - Assert.Equal("Stripe binary response", new StreamReader(stream).ReadToEnd()); - } - - [Fact] - public async Task PdfAsync() - { - var stream = await this.service.PdfAsync(QuoteId, this.pdfOptions); - this.AssertRequest(HttpMethod.Get, "/v1/quotes/qt_123/pdf"); - Assert.Equal("Stripe binary response", new StreamReader(stream).ReadToEnd()); - } - - [Fact] - public void Update() - { - var quote = this.service.Update(QuoteId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/quotes/qt_123"); - Assert.NotNull(quote); - Assert.Equal("quote", quote.Object); - } - - [Fact] - public async Task UpdateAsync() - { - var quote = await this.service.UpdateAsync(QuoteId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/quotes/qt_123"); - Assert.NotNull(quote); - Assert.Equal("quote", quote.Object); - } - - [Fact] - public void UpdateWithCurrentPeriodEnd() - { - var quote = this.service.Update(QuoteId, this.updateOptionsWithCurrentPeriodEnd); - this.AssertRequest(HttpMethod.Post, "/v1/quotes/qt_123"); - Assert.NotNull(quote); - Assert.Equal("quote", quote.Object); - } - - [Fact] - public void UpdateWithDateTime() - { - var quote = this.service.Update(QuoteId, this.updateOptionsWithDateTime); - this.AssertRequest(HttpMethod.Post, "/v1/quotes/qt_123"); - Assert.NotNull(quote); - Assert.Equal("quote", quote.Object); - } - } -} diff --git a/src/StripeTests/Services/Radar/EarlyFraudWarnings/EarlyFraudWarningServiceTest.cs b/src/StripeTests/Services/Radar/EarlyFraudWarnings/EarlyFraudWarningServiceTest.cs deleted file mode 100644 index c70e01ce29..0000000000 --- a/src/StripeTests/Services/Radar/EarlyFraudWarnings/EarlyFraudWarningServiceTest.cs +++ /dev/null @@ -1,88 +0,0 @@ -namespace StripeTests.Radar -{ - using System.Collections.Generic; - using System.Linq; - using System.Net.Http; - using System.Threading.Tasks; - - using Stripe.Radar; - using Xunit; - - public class EarlyFraudWarningServiceTest : BaseStripeTest - { - private const string EarlyFraudWarningId = "issfr_123"; - - private readonly EarlyFraudWarningService service; - private readonly EarlyFraudWarningListOptions listOptions; - - public EarlyFraudWarningServiceTest( - StripeMockFixture stripeMockFixture, - MockHttpClientFixture mockHttpClientFixture) - : base(stripeMockFixture, mockHttpClientFixture) - { - this.service = new EarlyFraudWarningService(this.StripeClient); - - this.listOptions = new EarlyFraudWarningListOptions - { - Charge = "ch_123", - Limit = 1, - }; - } - - [Fact] - public void Get() - { - var warning = this.service.Get(EarlyFraudWarningId); - this.AssertRequest(HttpMethod.Get, "/v1/radar/early_fraud_warnings/issfr_123"); - Assert.NotNull(warning); - Assert.Equal("radar.early_fraud_warning", warning.Object); - } - - [Fact] - public async Task GetAsync() - { - var warning = await this.service.GetAsync(EarlyFraudWarningId); - this.AssertRequest(HttpMethod.Get, "/v1/radar/early_fraud_warnings/issfr_123"); - Assert.NotNull(warning); - Assert.Equal("radar.early_fraud_warning", warning.Object); - } - - [Fact] - public void List() - { - var warnings = this.service.List(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/radar/early_fraud_warnings"); - Assert.NotNull(warnings); - Assert.Equal("list", warnings.Object); - Assert.Single(warnings.Data); - Assert.Equal("radar.early_fraud_warning", warnings.Data[0].Object); - } - - [Fact] - public async Task ListAsync() - { - var warnings = await this.service.ListAsync(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/radar/early_fraud_warnings"); - Assert.NotNull(warnings); - Assert.Equal("list", warnings.Object); - Assert.Single(warnings.Data); - Assert.Equal("radar.early_fraud_warning", warnings.Data[0].Object); - } - - [Fact] - public void ListAutoPaging() - { - var warning = this.service.ListAutoPaging(this.listOptions).First(); - Assert.NotNull(warning); - Assert.Equal("radar.early_fraud_warning", warning.Object); - } - - [Fact] - public async Task ListAutoPagingAsync() - { - var warning = await this.service.ListAutoPagingAsync(this.listOptions).FirstAsync(); - Assert.NotNull(warning); - Assert.Equal("radar.early_fraud_warning", warning.Object); - } - } -} diff --git a/src/StripeTests/Services/Radar/ValueListItems/ValueListItemServiceTest.cs b/src/StripeTests/Services/Radar/ValueListItems/ValueListItemServiceTest.cs deleted file mode 100644 index 3eb311db5d..0000000000 --- a/src/StripeTests/Services/Radar/ValueListItems/ValueListItemServiceTest.cs +++ /dev/null @@ -1,128 +0,0 @@ -namespace StripeTests.Radar -{ - using System.Linq; - using System.Net.Http; - using System.Threading.Tasks; - - using Stripe.Radar; - using Xunit; - - public class ValueListItemServiceTest : BaseStripeTest - { - private const string ValueListItemId = "rsli_123"; - - private readonly ValueListItemService service; - private readonly ValueListItemCreateOptions createOptions; - private readonly ValueListItemListOptions listOptions; - - public ValueListItemServiceTest( - StripeMockFixture stripeMockFixture, - MockHttpClientFixture mockHttpClientFixture) - : base(stripeMockFixture, mockHttpClientFixture) - { - this.service = new ValueListItemService(this.StripeClient); - - this.createOptions = new ValueListItemCreateOptions - { - Value = "value", - ValueList = "rsl_123", - }; - - this.listOptions = new ValueListItemListOptions - { - Limit = 1, - ValueList = "rsl_123", - }; - } - - [Fact] - public void Create() - { - var valueListItem = this.service.Create(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/radar/value_list_items"); - Assert.NotNull(valueListItem); - Assert.Equal("radar.value_list_item", valueListItem.Object); - } - - [Fact] - public async Task CreateAsync() - { - var valueListItem = await this.service.CreateAsync(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/radar/value_list_items"); - Assert.NotNull(valueListItem); - Assert.Equal("radar.value_list_item", valueListItem.Object); - } - - [Fact] - public void Delete() - { - var deleted = this.service.Delete(ValueListItemId); - this.AssertRequest(HttpMethod.Delete, "/v1/radar/value_list_items/rsli_123"); - Assert.NotNull(deleted); - } - - [Fact] - public async Task DeleteAsync() - { - var deleted = await this.service.DeleteAsync(ValueListItemId); - this.AssertRequest(HttpMethod.Delete, "/v1/radar/value_list_items/rsli_123"); - Assert.NotNull(deleted); - } - - [Fact] - public void Get() - { - var valueListItem = this.service.Get(ValueListItemId); - this.AssertRequest(HttpMethod.Get, "/v1/radar/value_list_items/rsli_123"); - Assert.NotNull(valueListItem); - Assert.Equal("radar.value_list_item", valueListItem.Object); - } - - [Fact] - public async Task GetAsync() - { - var valueListItem = await this.service.GetAsync(ValueListItemId); - this.AssertRequest(HttpMethod.Get, "/v1/radar/value_list_items/rsli_123"); - Assert.NotNull(valueListItem); - Assert.Equal("radar.value_list_item", valueListItem.Object); - } - - [Fact] - public void List() - { - var valueListItems = this.service.List(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/radar/value_list_items"); - Assert.NotNull(valueListItems); - Assert.Equal("list", valueListItems.Object); - Assert.Single(valueListItems.Data); - Assert.Equal("radar.value_list_item", valueListItems.Data[0].Object); - } - - [Fact] - public async Task ListAsync() - { - var valueListItems = await this.service.ListAsync(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/radar/value_list_items"); - Assert.NotNull(valueListItems); - Assert.Equal("list", valueListItems.Object); - Assert.Single(valueListItems.Data); - Assert.Equal("radar.value_list_item", valueListItems.Data[0].Object); - } - - [Fact] - public void ListAutoPaging() - { - var valueListItem = this.service.ListAutoPaging(this.listOptions).First(); - Assert.NotNull(valueListItem); - Assert.Equal("radar.value_list_item", valueListItem.Object); - } - - [Fact] - public async Task ListAutoPagingAsync() - { - var valueListItem = await this.service.ListAutoPagingAsync(this.listOptions).FirstAsync(); - Assert.NotNull(valueListItem); - Assert.Equal("radar.value_list_item", valueListItem.Object); - } - } -} diff --git a/src/StripeTests/Services/Radar/ValueLists/ValueListServiceTest.cs b/src/StripeTests/Services/Radar/ValueLists/ValueListServiceTest.cs deleted file mode 100644 index d3891a94e2..0000000000 --- a/src/StripeTests/Services/Radar/ValueLists/ValueListServiceTest.cs +++ /dev/null @@ -1,157 +0,0 @@ -namespace StripeTests.Radar -{ - using System.Collections.Generic; - using System.Linq; - using System.Net.Http; - using System.Threading.Tasks; - - using Stripe.Radar; - using Xunit; - - public class ValueListServiceTest : BaseStripeTest - { - private const string ValueListId = "rsl_123"; - - private readonly ValueListService service; - private readonly ValueListCreateOptions createOptions; - private readonly ValueListUpdateOptions updateOptions; - private readonly ValueListListOptions listOptions; - - public ValueListServiceTest( - StripeMockFixture stripeMockFixture, - MockHttpClientFixture mockHttpClientFixture) - : base(stripeMockFixture, mockHttpClientFixture) - { - this.service = new ValueListService(this.StripeClient); - - this.createOptions = new ValueListCreateOptions - { - Alias = "alias", - ItemType = "ip_address", - Name = "name", - }; - - this.updateOptions = new ValueListUpdateOptions - { - Metadata = new Dictionary - { - { "key", "value" }, - }, - }; - - this.listOptions = new ValueListListOptions - { - Alias = "alias", - Limit = 1, - }; - } - - [Fact] - public void Create() - { - var valueList = this.service.Create(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/radar/value_lists"); - Assert.NotNull(valueList); - Assert.Equal("radar.value_list", valueList.Object); - } - - [Fact] - public async Task CreateAsync() - { - var valueList = await this.service.CreateAsync(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/radar/value_lists"); - Assert.NotNull(valueList); - Assert.Equal("radar.value_list", valueList.Object); - } - - [Fact] - public void Delete() - { - var deleted = this.service.Delete(ValueListId); - this.AssertRequest(HttpMethod.Delete, "/v1/radar/value_lists/rsl_123"); - Assert.NotNull(deleted); - } - - [Fact] - public async Task DeleteAsync() - { - var deleted = await this.service.DeleteAsync(ValueListId); - this.AssertRequest(HttpMethod.Delete, "/v1/radar/value_lists/rsl_123"); - Assert.NotNull(deleted); - } - - [Fact] - public void Get() - { - var valueList = this.service.Get(ValueListId); - this.AssertRequest(HttpMethod.Get, "/v1/radar/value_lists/rsl_123"); - Assert.NotNull(valueList); - Assert.Equal("radar.value_list", valueList.Object); - } - - [Fact] - public async Task GetAsync() - { - var valueList = await this.service.GetAsync(ValueListId); - this.AssertRequest(HttpMethod.Get, "/v1/radar/value_lists/rsl_123"); - Assert.NotNull(valueList); - Assert.Equal("radar.value_list", valueList.Object); - } - - [Fact] - public void List() - { - var valueLists = this.service.List(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/radar/value_lists"); - Assert.NotNull(valueLists); - Assert.Equal("list", valueLists.Object); - Assert.Single(valueLists.Data); - Assert.Equal("radar.value_list", valueLists.Data[0].Object); - } - - [Fact] - public async Task ListAsync() - { - var valueLists = await this.service.ListAsync(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/radar/value_lists"); - Assert.NotNull(valueLists); - Assert.Equal("list", valueLists.Object); - Assert.Single(valueLists.Data); - Assert.Equal("radar.value_list", valueLists.Data[0].Object); - } - - [Fact] - public void ListAutoPaging() - { - var valueList = this.service.ListAutoPaging(this.listOptions).First(); - Assert.NotNull(valueList); - Assert.Equal("radar.value_list", valueList.Object); - } - - [Fact] - public async Task ListAutoPagingAsync() - { - var valueList = await this.service.ListAutoPagingAsync(this.listOptions).FirstAsync(); - Assert.NotNull(valueList); - Assert.Equal("radar.value_list", valueList.Object); - } - - [Fact] - public void Update() - { - var valueList = this.service.Update(ValueListId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/radar/value_lists/rsl_123"); - Assert.NotNull(valueList); - Assert.Equal("radar.value_list", valueList.Object); - } - - [Fact] - public async Task UpdateAsync() - { - var valueList = await this.service.UpdateAsync(ValueListId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/radar/value_lists/rsl_123"); - Assert.NotNull(valueList); - Assert.Equal("radar.value_list", valueList.Object); - } - } -} diff --git a/src/StripeTests/Services/Refunds/RefundServiceTest.cs b/src/StripeTests/Services/Refunds/RefundServiceTest.cs deleted file mode 100644 index 1df4a4c5d4..0000000000 --- a/src/StripeTests/Services/Refunds/RefundServiceTest.cs +++ /dev/null @@ -1,139 +0,0 @@ -namespace StripeTests -{ - using System.Collections.Generic; - using System.Linq; - using System.Net.Http; - using System.Threading.Tasks; - - using Stripe; - using Xunit; - - public class RefundServiceTest : BaseStripeTest - { - private const string RefundId = "re_123"; - - private readonly RefundService service; - private readonly RefundCreateOptions createOptions; - private readonly RefundUpdateOptions updateOptions; - private readonly RefundListOptions listOptions; - - public RefundServiceTest( - StripeMockFixture stripeMockFixture, - MockHttpClientFixture mockHttpClientFixture) - : base(stripeMockFixture, mockHttpClientFixture) - { - this.service = new RefundService(this.StripeClient); - - this.createOptions = new RefundCreateOptions - { - Amount = 123, - Charge = "ch_123", - }; - - this.updateOptions = new RefundUpdateOptions - { - Metadata = new Dictionary - { - { "key", "value" }, - }, - }; - - this.listOptions = new RefundListOptions - { - Limit = 1, - }; - } - - [Fact] - public void Create() - { - var refund = this.service.Create(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/refunds"); - Assert.NotNull(refund); - Assert.Equal("refund", refund.Object); - } - - [Fact] - public async Task CreateAsync() - { - var refund = await this.service.CreateAsync(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/refunds"); - Assert.NotNull(refund); - Assert.Equal("refund", refund.Object); - } - - [Fact] - public void Get() - { - var refund = this.service.Get(RefundId); - this.AssertRequest(HttpMethod.Get, "/v1/refunds/re_123"); - Assert.NotNull(refund); - Assert.Equal("refund", refund.Object); - } - - [Fact] - public async Task GetAsync() - { - var refund = await this.service.GetAsync(RefundId); - this.AssertRequest(HttpMethod.Get, "/v1/refunds/re_123"); - Assert.NotNull(refund); - Assert.Equal("refund", refund.Object); - } - - [Fact] - public void List() - { - var refunds = this.service.List(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/refunds"); - Assert.NotNull(refunds); - Assert.Equal("list", refunds.Object); - Assert.Single(refunds.Data); - Assert.Equal("refund", refunds.Data[0].Object); - } - - [Fact] - public async Task ListAsync() - { - var refunds = await this.service.ListAsync(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/refunds"); - Assert.NotNull(refunds); - Assert.Equal("list", refunds.Object); - Assert.Single(refunds.Data); - Assert.Equal("refund", refunds.Data[0].Object); - } - - [Fact] - public void ListAutoPaging() - { - var refund = this.service.ListAutoPaging(this.listOptions).First(); - Assert.NotNull(refund); - Assert.Equal("refund", refund.Object); - } - - [Fact] - public async Task ListAutoPagingAsync() - { - var refund = await this.service.ListAutoPagingAsync(this.listOptions).FirstAsync(); - Assert.NotNull(refund); - Assert.Equal("refund", refund.Object); - } - - [Fact] - public void Update() - { - var refund = this.service.Update(RefundId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/refunds/re_123"); - Assert.NotNull(refund); - Assert.Equal("refund", refund.Object); - } - - [Fact] - public async Task UpdateAsync() - { - var refund = await this.service.UpdateAsync(RefundId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/refunds/re_123"); - Assert.NotNull(refund); - Assert.Equal("refund", refund.Object); - } - } -} diff --git a/src/StripeTests/Services/Reporting/ReportRuns/ReportRunServiceTest.cs b/src/StripeTests/Services/Reporting/ReportRuns/ReportRunServiceTest.cs deleted file mode 100644 index f3d2ce65c7..0000000000 --- a/src/StripeTests/Services/Reporting/ReportRuns/ReportRunServiceTest.cs +++ /dev/null @@ -1,103 +0,0 @@ -namespace StripeTests.Reporting -{ - using System; - using System.Linq; - using System.Net.Http; - using System.Threading.Tasks; - - using Stripe.Reporting; - using Xunit; - - public class ReportRunServiceTest : BaseStripeTest - { - private const string ReportRunId = "frr_123"; - - private readonly ReportRunService service; - private readonly ReportRunCreateOptions createOptions; - private readonly ReportRunListOptions listOptions; - - public ReportRunServiceTest( - StripeMockFixture stripeMockFixture, - MockHttpClientFixture mockHttpClientFixture) - : base(stripeMockFixture, mockHttpClientFixture) - { - this.service = new ReportRunService(this.StripeClient); - - this.createOptions = new ReportRunCreateOptions - { - Parameters = new ReportRunParametersOptions - { - ConnectedAccount = "acct_123", - IntervalStart = DateTime.Now, - }, - ReportType = "activity.summary.1", - }; - - this.listOptions = new ReportRunListOptions - { - }; - } - - [Fact] - public void Create() - { - var reportRun = this.service.Create(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/reporting/report_runs"); - Assert.NotNull(reportRun); - } - - [Fact] - public async Task CreateAsync() - { - var reportRun = await this.service.CreateAsync(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/reporting/report_runs"); - Assert.NotNull(reportRun); - } - - [Fact] - public void Get() - { - var reportRun = this.service.Get(ReportRunId); - this.AssertRequest(HttpMethod.Get, "/v1/reporting/report_runs/frr_123"); - Assert.NotNull(reportRun); - } - - [Fact] - public async Task GetAsync() - { - var reportRun = await this.service.GetAsync(ReportRunId); - this.AssertRequest(HttpMethod.Get, "/v1/reporting/report_runs/frr_123"); - Assert.NotNull(reportRun); - } - - [Fact] - public void List() - { - var reportRuns = this.service.List(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/reporting/report_runs"); - Assert.NotNull(reportRuns); - } - - [Fact] - public async Task ListAsync() - { - var reportRuns = await this.service.ListAsync(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/reporting/report_runs"); - Assert.NotNull(reportRuns); - } - - [Fact] - public void ListAutoPaging() - { - var reportRun = this.service.ListAutoPaging(this.listOptions).First(); - Assert.NotNull(reportRun); - } - - [Fact] - public async Task ListAutoPagingAsync() - { - var reportRun = await this.service.ListAutoPagingAsync(this.listOptions).FirstAsync(); - Assert.NotNull(reportRun); - } - } -} diff --git a/src/StripeTests/Services/Reporting/ReportTypes/ReportTypeServiceTest.cs b/src/StripeTests/Services/Reporting/ReportTypes/ReportTypeServiceTest.cs deleted file mode 100644 index 87950e7092..0000000000 --- a/src/StripeTests/Services/Reporting/ReportTypes/ReportTypeServiceTest.cs +++ /dev/null @@ -1,61 +0,0 @@ -namespace StripeTests.Reporting -{ - using System.Linq; - using System.Net.Http; - using System.Threading.Tasks; - - using Stripe.Reporting; - using Xunit; - - public class ReportTypeServiceTest : BaseStripeTest - { - private const string ReportTypeId = "activity.summary.1"; - - private readonly ReportTypeService service; - private readonly ReportTypeListOptions listOptions; - - public ReportTypeServiceTest( - StripeMockFixture stripeMockFixture, - MockHttpClientFixture mockHttpClientFixture) - : base(stripeMockFixture, mockHttpClientFixture) - { - this.service = new ReportTypeService(this.StripeClient); - - this.listOptions = new ReportTypeListOptions - { - }; - } - - [Fact] - public void Get() - { - var reportType = this.service.Get(ReportTypeId); - this.AssertRequest(HttpMethod.Get, "/v1/reporting/report_types/activity.summary.1"); - Assert.NotNull(reportType); - } - - [Fact] - public async Task GetAsync() - { - var reportType = await this.service.GetAsync(ReportTypeId); - this.AssertRequest(HttpMethod.Get, "/v1/reporting/report_types/activity.summary.1"); - Assert.NotNull(reportType); - } - - [Fact] - public void List() - { - var reportTypes = this.service.List(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/reporting/report_types"); - Assert.NotNull(reportTypes); - } - - [Fact] - public async Task ListAsync() - { - var reportTypes = await this.service.ListAsync(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/reporting/report_types"); - Assert.NotNull(reportTypes); - } - } -} diff --git a/src/StripeTests/Services/Reviews/ReviewServiceTest.cs b/src/StripeTests/Services/Reviews/ReviewServiceTest.cs deleted file mode 100644 index 6f006e302b..0000000000 --- a/src/StripeTests/Services/Reviews/ReviewServiceTest.cs +++ /dev/null @@ -1,108 +0,0 @@ -namespace StripeTests -{ - using System.Linq; - using System.Net.Http; - using System.Threading.Tasks; - - using Stripe; - using Xunit; - - public class ReviewServiceTest : BaseStripeTest - { - private const string ReviewId = "prv_123"; - - private readonly ReviewService service; - private readonly ReviewApproveOptions approveOptions; - private readonly ReviewListOptions listOptions; - - public ReviewServiceTest( - StripeMockFixture stripeMockFixture, - MockHttpClientFixture mockHttpClientFixture) - : base(stripeMockFixture, mockHttpClientFixture) - { - this.service = new ReviewService(this.StripeClient); - - this.approveOptions = new ReviewApproveOptions - { - }; - - this.listOptions = new ReviewListOptions - { - }; - } - - [Fact] - public void Approve() - { - var review = this.service.Approve(ReviewId, this.approveOptions); - this.AssertRequest(HttpMethod.Post, "/v1/reviews/prv_123/approve"); - Assert.NotNull(review); - Assert.Equal("review", review.Object); - } - - [Fact] - public async Task ApproveAsync() - { - var review = await this.service.ApproveAsync(ReviewId, this.approveOptions); - this.AssertRequest(HttpMethod.Post, "/v1/reviews/prv_123/approve"); - Assert.NotNull(review); - Assert.Equal("review", review.Object); - } - - [Fact] - public void Get() - { - var review = this.service.Get(ReviewId); - this.AssertRequest(HttpMethod.Get, "/v1/reviews/prv_123"); - Assert.NotNull(review); - Assert.Equal("review", review.Object); - } - - [Fact] - public async Task GetAsync() - { - var review = await this.service.GetAsync(ReviewId); - this.AssertRequest(HttpMethod.Get, "/v1/reviews/prv_123"); - Assert.NotNull(review); - Assert.Equal("review", review.Object); - } - - [Fact] - public void List() - { - var reviews = this.service.List(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/reviews"); - Assert.NotNull(reviews); - Assert.Equal("list", reviews.Object); - Assert.Single(reviews.Data); - Assert.Equal("review", reviews.Data[0].Object); - } - - [Fact] - public async Task ListAsync() - { - var reviews = await this.service.ListAsync(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/reviews"); - Assert.NotNull(reviews); - Assert.Equal("list", reviews.Object); - Assert.Single(reviews.Data); - Assert.Equal("review", reviews.Data[0].Object); - } - - [Fact] - public void ListAutoPaging() - { - var review = this.service.ListAutoPaging(this.listOptions).First(); - Assert.NotNull(review); - Assert.Equal("review", review.Object); - } - - [Fact] - public async Task ListAutoPagingAsync() - { - var review = await this.service.ListAutoPagingAsync(this.listOptions).FirstAsync(); - Assert.NotNull(review); - Assert.Equal("review", review.Object); - } - } -} diff --git a/src/StripeTests/Services/SetupAttempts/SetupAttemptServiceTest.cs b/src/StripeTests/Services/SetupAttempts/SetupAttemptServiceTest.cs deleted file mode 100644 index 9973fd8c25..0000000000 --- a/src/StripeTests/Services/SetupAttempts/SetupAttemptServiceTest.cs +++ /dev/null @@ -1,67 +0,0 @@ -namespace StripeTests -{ - using System.Collections.Generic; - using System.Linq; - using System.Net.Http; - using System.Threading.Tasks; - - using Stripe; - using Xunit; - - public class SetupAttemptServiceTest : BaseStripeTest - { - private readonly SetupAttemptService service; - private readonly SetupAttemptListOptions listOptions; - - public SetupAttemptServiceTest( - StripeMockFixture stripeMockFixture, - MockHttpClientFixture mockHttpClientFixture) - : base(stripeMockFixture, mockHttpClientFixture) - { - this.service = new SetupAttemptService(this.StripeClient); - - this.listOptions = new SetupAttemptListOptions - { - SetupIntent = "seti_123", - }; - } - - [Fact] - public void List() - { - var attempts = this.service.List(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/setup_attempts"); - Assert.NotNull(attempts); - Assert.Equal("list", attempts.Object); - Assert.Single(attempts.Data); - Assert.Equal("setup_attempt", attempts.Data[0].Object); - } - - [Fact] - public async Task ListAsync() - { - var attempts = await this.service.ListAsync(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/setup_attempts"); - Assert.NotNull(attempts); - Assert.Equal("list", attempts.Object); - Assert.Single(attempts.Data); - Assert.Equal("setup_attempt", attempts.Data[0].Object); - } - - [Fact] - public void ListAutoPaging() - { - var attempt = this.service.ListAutoPaging(this.listOptions).First(); - Assert.NotNull(attempt); - Assert.Equal("setup_attempt", attempt.Object); - } - - [Fact] - public async Task ListAutoPagingAsync() - { - var attempt = await this.service.ListAutoPagingAsync(this.listOptions).FirstAsync(); - Assert.NotNull(attempt); - Assert.Equal("setup_attempt", attempt.Object); - } - } -} diff --git a/src/StripeTests/Services/SetupIntents/SetupIntentServiceTest.cs b/src/StripeTests/Services/SetupIntents/SetupIntentServiceTest.cs deleted file mode 100644 index b700518b4f..0000000000 --- a/src/StripeTests/Services/SetupIntents/SetupIntentServiceTest.cs +++ /dev/null @@ -1,200 +0,0 @@ -namespace StripeTests -{ - using System.Collections.Generic; - using System.Linq; - using System.Net.Http; - using System.Threading.Tasks; - - using Stripe; - using Xunit; - - public class SetupIntentServiceTest : BaseStripeTest - { - private const string SetupIntentId = "seti_123"; - - private readonly SetupIntentService service; - private readonly SetupIntentCancelOptions cancelOptions; - private readonly SetupIntentConfirmOptions confirmOptions; - private readonly SetupIntentCreateOptions createOptions; - private readonly SetupIntentListOptions listOptions; - private readonly SetupIntentUpdateOptions updateOptions; - - public SetupIntentServiceTest( - StripeMockFixture stripeMockFixture, - MockHttpClientFixture mockHttpClientFixture) - : base(stripeMockFixture, mockHttpClientFixture) - { - this.service = new SetupIntentService(this.StripeClient); - - this.cancelOptions = new SetupIntentCancelOptions - { - }; - - this.confirmOptions = new SetupIntentConfirmOptions - { - }; - - this.createOptions = new SetupIntentCreateOptions - { - PaymentMethodTypes = new List - { - "card", - }, - }; - - this.listOptions = new SetupIntentListOptions - { - Limit = 1, - }; - - this.updateOptions = new SetupIntentUpdateOptions - { - Metadata = new Dictionary - { - { "key", "value" }, - }, - }; - } - - [Fact] - public void Cancel() - { - var intent = this.service.Cancel(SetupIntentId, this.cancelOptions); - this.AssertRequest(HttpMethod.Post, "/v1/setup_intents/seti_123/cancel"); - Assert.NotNull(intent); - Assert.Equal("setup_intent", intent.Object); - } - - [Fact] - public async Task CancelAsync() - { - var intent = await this.service.CancelAsync(SetupIntentId, this.cancelOptions); - this.AssertRequest(HttpMethod.Post, "/v1/setup_intents/seti_123/cancel"); - Assert.NotNull(intent); - Assert.Equal("setup_intent", intent.Object); - } - - [Fact] - public void Confirm() - { - var intent = this.service.Confirm(SetupIntentId, this.confirmOptions); - this.AssertRequest(HttpMethod.Post, "/v1/setup_intents/seti_123/confirm"); - Assert.NotNull(intent); - Assert.Equal("setup_intent", intent.Object); - } - - [Fact] - public async Task ConfirmAsync() - { - var intent = await this.service.ConfirmAsync(SetupIntentId, this.confirmOptions); - this.AssertRequest(HttpMethod.Post, "/v1/setup_intents/seti_123/confirm"); - Assert.NotNull(intent); - Assert.Equal("setup_intent", intent.Object); - } - - [Fact] - public void Create() - { - var intent = this.service.Create(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/setup_intents"); - Assert.NotNull(intent); - Assert.Equal("setup_intent", intent.Object); - } - - [Fact] - public async Task CreateAsync() - { - var intent = await this.service.CreateAsync(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/setup_intents"); - Assert.NotNull(intent); - Assert.Equal("setup_intent", intent.Object); - } - - [Fact] - public void Get() - { - var intent = this.service.Get(SetupIntentId); - this.AssertRequest(HttpMethod.Get, "/v1/setup_intents/seti_123"); - Assert.NotNull(intent); - Assert.Equal("setup_intent", intent.Object); - } - - [Fact] - public async Task GetAsync() - { - var intent = await this.service.GetAsync(SetupIntentId); - this.AssertRequest(HttpMethod.Get, "/v1/setup_intents/seti_123"); - Assert.NotNull(intent); - Assert.Equal("setup_intent", intent.Object); - } - - [Fact] - public void GetWithClientSecret() - { - var options = new SetupIntentGetOptions - { - ClientSecret = "seti_client_secret_123", - }; - var intent = this.service.Get(SetupIntentId, options); - this.AssertRequest(HttpMethod.Get, "/v1/setup_intents/seti_123"); - Assert.NotNull(intent); - Assert.Equal("setup_intent", intent.Object); - } - - [Fact] - public void List() - { - var intents = this.service.List(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/setup_intents"); - Assert.NotNull(intents); - Assert.Equal("list", intents.Object); - Assert.Single(intents.Data); - Assert.Equal("setup_intent", intents.Data[0].Object); - } - - [Fact] - public async Task ListAsync() - { - var intents = await this.service.ListAsync(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/setup_intents"); - Assert.NotNull(intents); - Assert.Equal("list", intents.Object); - Assert.Single(intents.Data); - Assert.Equal("setup_intent", intents.Data[0].Object); - } - - [Fact] - public void ListAutoPaging() - { - var intent = this.service.ListAutoPaging(this.listOptions).First(); - Assert.NotNull(intent); - Assert.Equal("setup_intent", intent.Object); - } - - [Fact] - public async Task ListAutoPagingAsync() - { - var intent = await this.service.ListAutoPagingAsync(this.listOptions).FirstAsync(); - Assert.NotNull(intent); - Assert.Equal("setup_intent", intent.Object); - } - - [Fact] - public void Update() - { - var intent = this.service.Update(SetupIntentId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/setup_intents/seti_123"); - Assert.NotNull(intent); - Assert.Equal("setup_intent", intent.Object); - } - - [Fact] - public async Task UpdateAsync() - { - var intent = await this.service.UpdateAsync(SetupIntentId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/setup_intents/seti_123"); - Assert.NotNull(intent); - Assert.Equal("setup_intent", intent.Object); - } - } -} diff --git a/src/StripeTests/Services/Sigma/ScheduledQueryRuns/ScheduledQueryRunServiceTest.cs b/src/StripeTests/Services/Sigma/ScheduledQueryRuns/ScheduledQueryRunServiceTest.cs deleted file mode 100644 index 1533b4feec..0000000000 --- a/src/StripeTests/Services/Sigma/ScheduledQueryRuns/ScheduledQueryRunServiceTest.cs +++ /dev/null @@ -1,86 +0,0 @@ -namespace StripeTests -{ - using System.Linq; - using System.Net.Http; - using System.Threading.Tasks; - - using Stripe.Sigma; - using Xunit; - - public class ScheduledQueryRunServiceTest : BaseStripeTest - { - private const string ScheduledQueryId = "sqr_123"; - - private readonly ScheduledQueryRunService service; - private readonly ScheduledQueryRunListOptions listOptions; - - public ScheduledQueryRunServiceTest( - StripeMockFixture stripeMockFixture, - MockHttpClientFixture mockHttpClientFixture) - : base(stripeMockFixture, mockHttpClientFixture) - { - this.service = new ScheduledQueryRunService(this.StripeClient); - - this.listOptions = new ScheduledQueryRunListOptions - { - Limit = 1, - }; - } - - [Fact] - public void Get() - { - var run = this.service.Get(ScheduledQueryId); - this.AssertRequest(HttpMethod.Get, "/v1/sigma/scheduled_query_runs/sqr_123"); - Assert.NotNull(run); - Assert.Equal("scheduled_query_run", run.Object); - } - - [Fact] - public async Task GetAsync() - { - var run = await this.service.GetAsync(ScheduledQueryId); - this.AssertRequest(HttpMethod.Get, "/v1/sigma/scheduled_query_runs/sqr_123"); - Assert.NotNull(run); - Assert.Equal("scheduled_query_run", run.Object); - } - - [Fact] - public void List() - { - var runs = this.service.List(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/sigma/scheduled_query_runs"); - Assert.NotNull(runs); - Assert.Equal("list", runs.Object); - Assert.Single(runs.Data); - Assert.Equal("scheduled_query_run", runs.Data[0].Object); - } - - [Fact] - public async Task ListAsync() - { - var runs = await this.service.ListAsync(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/sigma/scheduled_query_runs"); - Assert.NotNull(runs); - Assert.Equal("list", runs.Object); - Assert.Single(runs.Data); - Assert.Equal("scheduled_query_run", runs.Data[0].Object); - } - - [Fact] - public void ListAutoPaging() - { - var run = this.service.ListAutoPaging(this.listOptions).First(); - Assert.NotNull(run); - Assert.Equal("scheduled_query_run", run.Object); - } - - [Fact] - public async Task ListAutoPagingAsync() - { - var run = await this.service.ListAutoPagingAsync(this.listOptions).FirstAsync(); - Assert.NotNull(run); - Assert.Equal("scheduled_query_run", run.Object); - } - } -} diff --git a/src/StripeTests/Services/SubscriptionItems/SubscriptionItemServiceTest.cs b/src/StripeTests/Services/SubscriptionItems/SubscriptionItemServiceTest.cs deleted file mode 100644 index 3f643a053b..0000000000 --- a/src/StripeTests/Services/SubscriptionItems/SubscriptionItemServiceTest.cs +++ /dev/null @@ -1,173 +0,0 @@ -namespace StripeTests -{ - using System.Collections.Generic; - using System.Linq; - using System.Net.Http; - using System.Threading.Tasks; - - using Stripe; - using Xunit; - - public class SubscriptionItemServiceTest : BaseStripeTest - { - private const string SubscriptionItemId = "si_123"; - - private readonly SubscriptionItemService service; - private readonly SubscriptionItemCreateOptions createOptions; - private readonly SubscriptionItemDeleteOptions deleteOptions; - private readonly SubscriptionItemUpdateOptions updateOptions; - private readonly SubscriptionItemListOptions listOptions; - - public SubscriptionItemServiceTest( - StripeMockFixture stripeMockFixture, - MockHttpClientFixture mockHttpClientFixture) - : base(stripeMockFixture, mockHttpClientFixture) - { - this.service = new SubscriptionItemService(this.StripeClient); - - this.createOptions = new SubscriptionItemCreateOptions - { - PriceData = new SubscriptionItemPriceDataOptions - { - Currency = "usd", - Product = "prod_123", - Recurring = new SubscriptionItemPriceDataRecurringOptions - { - Interval = "day", - IntervalCount = 15, - }, - UnitAmountDecimal = 0.01234567890m, // Ensure decimals work - }, - Quantity = 1, - Subscription = "sub_123", - }; - - this.deleteOptions = new SubscriptionItemDeleteOptions - { - ClearUsage = true, - }; - - this.updateOptions = new SubscriptionItemUpdateOptions - { - Metadata = new Dictionary - { - { "key", "value" }, - }, - }; - - this.listOptions = new SubscriptionItemListOptions - { - Limit = 1, - Subscription = "sub_123", - }; - } - - [Fact] - public void Create() - { - var subscriptionItem = this.service.Create(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/subscription_items"); - Assert.NotNull(subscriptionItem); - Assert.Equal("subscription_item", subscriptionItem.Object); - } - - [Fact] - public async Task CreateAsync() - { - var subscriptionItem = await this.service.CreateAsync(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/subscription_items"); - Assert.NotNull(subscriptionItem); - Assert.Equal("subscription_item", subscriptionItem.Object); - } - - [Fact] - public void Delete() - { - var deleted = this.service.Delete(SubscriptionItemId, this.deleteOptions); - this.AssertRequest(HttpMethod.Delete, "/v1/subscription_items/si_123"); - Assert.NotNull(deleted); - } - - [Fact] - public async Task DeleteAsync() - { - var deleted = await this.service.DeleteAsync(SubscriptionItemId, this.deleteOptions); - this.AssertRequest(HttpMethod.Delete, "/v1/subscription_items/si_123"); - Assert.NotNull(deleted); - } - - [Fact] - public void Get() - { - var subscriptionItem = this.service.Get(SubscriptionItemId); - this.AssertRequest(HttpMethod.Get, "/v1/subscription_items/si_123"); - Assert.NotNull(subscriptionItem); - Assert.Equal("subscription_item", subscriptionItem.Object); - } - - [Fact] - public async Task GetAsync() - { - var subscriptionItem = await this.service.GetAsync(SubscriptionItemId); - this.AssertRequest(HttpMethod.Get, "/v1/subscription_items/si_123"); - Assert.NotNull(subscriptionItem); - Assert.Equal("subscription_item", subscriptionItem.Object); - } - - [Fact] - public void List() - { - var subscriptionItems = this.service.List(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/subscription_items"); - Assert.NotNull(subscriptionItems); - Assert.Equal("list", subscriptionItems.Object); - Assert.Single(subscriptionItems.Data); - Assert.Equal("subscription_item", subscriptionItems.Data[0].Object); - } - - [Fact] - public async Task ListAsync() - { - var subscriptionItems = await this.service.ListAsync(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/subscription_items"); - Assert.NotNull(subscriptionItems); - Assert.Equal("list", subscriptionItems.Object); - Assert.Single(subscriptionItems.Data); - Assert.Equal("subscription_item", subscriptionItems.Data[0].Object); - } - - [Fact] - public void ListAutoPaging() - { - var subscriptionItem = this.service.ListAutoPaging(this.listOptions).First(); - Assert.NotNull(subscriptionItem); - Assert.Equal("subscription_item", subscriptionItem.Object); - } - - [Fact] - public async Task ListAutoPagingAsync() - { - var subscriptionItem = await this.service.ListAutoPagingAsync(this.listOptions).FirstAsync(); - Assert.NotNull(subscriptionItem); - Assert.Equal("subscription_item", subscriptionItem.Object); - } - - [Fact] - public void Update() - { - var subscriptionItem = this.service.Update(SubscriptionItemId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/subscription_items/si_123"); - Assert.NotNull(subscriptionItem); - Assert.Equal("subscription_item", subscriptionItem.Object); - } - - [Fact] - public async Task UpdateAsync() - { - var subscriptionItem = await this.service.UpdateAsync(SubscriptionItemId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/subscription_items/si_123"); - Assert.NotNull(subscriptionItem); - Assert.Equal("subscription_item", subscriptionItem.Object); - } - } -} diff --git a/src/StripeTests/Services/SubscriptionSchedules/SubscriptionScheduleServiceTest.cs b/src/StripeTests/Services/SubscriptionSchedules/SubscriptionScheduleServiceTest.cs deleted file mode 100644 index 28318f96d8..0000000000 --- a/src/StripeTests/Services/SubscriptionSchedules/SubscriptionScheduleServiceTest.cs +++ /dev/null @@ -1,205 +0,0 @@ -namespace StripeTests -{ - using System.Collections.Generic; - using System.Linq; - using System.Net.Http; - using System.Threading.Tasks; - - using Stripe; - using Xunit; - - public class SubscriptionScheduleServiceTest : BaseStripeTest - { - private const string ScheduleId = "sub_sched_123"; - - private readonly SubscriptionScheduleService service; - private readonly SubscriptionScheduleCancelOptions cancelOptions; - private readonly SubscriptionScheduleCreateOptions createOptions; - private readonly SubscriptionScheduleListOptions listOptions; - private readonly SubscriptionScheduleReleaseOptions releaseOptions; - private readonly SubscriptionScheduleUpdateOptions updateOptions; - - public SubscriptionScheduleServiceTest( - StripeMockFixture stripeMockFixture, - MockHttpClientFixture mockHttpClientFixture) - : base(stripeMockFixture, mockHttpClientFixture) - { - this.service = new SubscriptionScheduleService(this.StripeClient); - - this.cancelOptions = new SubscriptionScheduleCancelOptions - { - InvoiceNow = true, - Prorate = true, - }; - - this.createOptions = new SubscriptionScheduleCreateOptions - { - Customer = "cus_123", - StartDate = SubscriptionScheduleStartDate.Now, - DefaultSettings = new SubscriptionScheduleDefaultSettingsOptions - { - CollectionMethod = "send_invoice", - }, - Phases = new List - { - new SubscriptionSchedulePhaseOptions - { - Items = new List - { - new SubscriptionSchedulePhaseItemOptions - { - Price = "price_123", - }, - }, - }, - }, - }; - - this.releaseOptions = new SubscriptionScheduleReleaseOptions - { - PreserveCancelDate = true, - }; - - this.updateOptions = new SubscriptionScheduleUpdateOptions - { - Metadata = new Dictionary - { - { "key", "value" }, - }, - }; - - this.listOptions = new SubscriptionScheduleListOptions - { - Limit = 1, - }; - } - - [Fact] - public void Cancel() - { - var subscription = this.service.Cancel(ScheduleId, this.cancelOptions); - this.AssertRequest(HttpMethod.Post, "/v1/subscription_schedules/sub_sched_123/cancel"); - Assert.NotNull(subscription); - Assert.Equal("subscription_schedule", subscription.Object); - } - - [Fact] - public async Task CancelAsync() - { - var subscription = await this.service.CancelAsync(ScheduleId, this.cancelOptions); - this.AssertRequest(HttpMethod.Post, "/v1/subscription_schedules/sub_sched_123/cancel"); - Assert.NotNull(subscription); - Assert.Equal("subscription_schedule", subscription.Object); - } - - [Fact] - public void Create() - { - var subscription = this.service.Create(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/subscription_schedules"); - Assert.NotNull(subscription); - Assert.Equal("subscription_schedule", subscription.Object); - } - - [Fact] - public async Task CreateAsync() - { - var subscription = await this.service.CreateAsync(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/subscription_schedules"); - Assert.NotNull(subscription); - Assert.Equal("subscription_schedule", subscription.Object); - } - - [Fact] - public void Get() - { - var subscription = this.service.Get(ScheduleId); - this.AssertRequest(HttpMethod.Get, "/v1/subscription_schedules/sub_sched_123"); - Assert.NotNull(subscription); - Assert.Equal("subscription_schedule", subscription.Object); - } - - [Fact] - public async Task GetAsync() - { - var subscription = await this.service.GetAsync(ScheduleId); - this.AssertRequest(HttpMethod.Get, "/v1/subscription_schedules/sub_sched_123"); - Assert.NotNull(subscription); - Assert.Equal("subscription_schedule", subscription.Object); - } - - [Fact] - public void List() - { - var subscriptions = this.service.List(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/subscription_schedules"); - Assert.NotNull(subscriptions); - Assert.Equal("list", subscriptions.Object); - Assert.Single(subscriptions.Data); - Assert.Equal("subscription_schedule", subscriptions.Data[0].Object); - } - - [Fact] - public async Task ListAsync() - { - var subscriptions = await this.service.ListAsync(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/subscription_schedules"); - Assert.NotNull(subscriptions); - Assert.Equal("list", subscriptions.Object); - Assert.Single(subscriptions.Data); - Assert.Equal("subscription_schedule", subscriptions.Data[0].Object); - } - - [Fact] - public void ListAutoPaging() - { - var subscription = this.service.ListAutoPaging(this.listOptions).First(); - Assert.NotNull(subscription); - Assert.Equal("subscription_schedule", subscription.Object); - } - - [Fact] - public async Task ListAutoPagingAsync() - { - var subscription = await this.service.ListAutoPagingAsync(this.listOptions).FirstAsync(); - Assert.NotNull(subscription); - Assert.Equal("subscription_schedule", subscription.Object); - } - - [Fact] - public void Release() - { - var subscription = this.service.Release(ScheduleId, this.releaseOptions); - this.AssertRequest(HttpMethod.Post, "/v1/subscription_schedules/sub_sched_123/release"); - Assert.NotNull(subscription); - Assert.Equal("subscription_schedule", subscription.Object); - } - - [Fact] - public async Task ReleaseAsync() - { - var subscription = await this.service.ReleaseAsync(ScheduleId, this.releaseOptions); - this.AssertRequest(HttpMethod.Post, "/v1/subscription_schedules/sub_sched_123/release"); - Assert.NotNull(subscription); - Assert.Equal("subscription_schedule", subscription.Object); - } - - [Fact] - public void Update() - { - var subscription = this.service.Update(ScheduleId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/subscription_schedules/sub_sched_123"); - Assert.NotNull(subscription); - Assert.Equal("subscription_schedule", subscription.Object); - } - - [Fact] - public async Task UpdateAsync() - { - var subscription = await this.service.UpdateAsync(ScheduleId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/subscription_schedules/sub_sched_123"); - Assert.NotNull(subscription); - Assert.Equal("subscription_schedule", subscription.Object); - } - } -} diff --git a/src/StripeTests/Services/Subscriptions/SubscriptionCreateOptionsTest.cs b/src/StripeTests/Services/Subscriptions/SubscriptionCreateOptionsTest.cs deleted file mode 100644 index 83ecbb5af0..0000000000 --- a/src/StripeTests/Services/Subscriptions/SubscriptionCreateOptionsTest.cs +++ /dev/null @@ -1,61 +0,0 @@ -namespace StripeTests -{ - using System; - using System.Collections.Generic; - using Stripe; - using Stripe.Infrastructure.FormEncoding; - using Xunit; - - public class SubscriptionCreateOptionsTest : BaseStripeTest - { - [Fact] - public void SerializeItems() - { - var options = new SubscriptionCreateOptions - { - Customer = "cus_123", - Items = new List - { - new SubscriptionItemOptions - { - Plan = "plan_123", - Quantity = 2, - }, - new SubscriptionItemOptions - { - Plan = "plan_124", - Quantity = 3, - }, - }, - }; - - Assert.Equal( - "customer=cus_123&" + - "items[0][plan]=plan_123&items[0][quantity]=2&" + - "items[1][plan]=plan_124&items[1][quantity]=3", - ContentEncoder.CreateQueryString(options)); - } - - [Fact] - public void SerializeTrialEndDateTime() - { - var options = new SubscriptionCreateOptions - { - TrialEnd = DateTime.Parse("Fri, 13 Feb 2009 23:31:30Z"), - }; - - Assert.Equal("trial_end=1234567890", ContentEncoder.CreateQueryString(options)); - } - - [Fact] - public void SerializeTrialEndNow() - { - var options = new SubscriptionCreateOptions - { - TrialEnd = SubscriptionTrialEnd.Now, - }; - - Assert.Equal("trial_end=now", ContentEncoder.CreateQueryString(options)); - } - } -} diff --git a/src/StripeTests/Services/Subscriptions/SubscriptionServiceTest.cs b/src/StripeTests/Services/Subscriptions/SubscriptionServiceTest.cs deleted file mode 100644 index d3f2d33ebe..0000000000 --- a/src/StripeTests/Services/Subscriptions/SubscriptionServiceTest.cs +++ /dev/null @@ -1,186 +0,0 @@ -namespace StripeTests -{ - using System.Collections.Generic; - using System.Linq; - using System.Net.Http; - using System.Threading.Tasks; - - using Stripe; - using Xunit; - - public class SubscriptionServiceTest : BaseStripeTest - { - private const string SubscriptionId = "sub_123"; - - private readonly SubscriptionService service; - private readonly SubscriptionCancelOptions cancelOptions; - private readonly SubscriptionCreateOptions createOptions; - private readonly SubscriptionUpdateOptions updateOptions; - private readonly SubscriptionListOptions listOptions; - - public SubscriptionServiceTest( - StripeMockFixture stripeMockFixture, - MockHttpClientFixture mockHttpClientFixture) - : base(stripeMockFixture, mockHttpClientFixture) - { - this.service = new SubscriptionService(this.StripeClient); - - this.cancelOptions = new SubscriptionCancelOptions - { - InvoiceNow = true, - Prorate = true, - }; - - this.createOptions = new SubscriptionCreateOptions - { - Customer = "cus_123", - Items = new List - { - new SubscriptionItemOptions - { - Price = "price_123", - Quantity = 2, - }, - new SubscriptionItemOptions - { - PriceData = new SubscriptionItemPriceDataOptions - { - Currency = "usd", - Product = "prod_123", - Recurring = new SubscriptionItemPriceDataRecurringOptions - { - Interval = "day", - IntervalCount = 15, - }, - UnitAmountDecimal = 0.01234567890m, // Ensure decimals work - }, - Quantity = 3, - }, - }, - }; - - this.updateOptions = new SubscriptionUpdateOptions - { - Metadata = new Dictionary - { - { "key", "value" }, - }, - }; - - this.listOptions = new SubscriptionListOptions - { - Limit = 1, - }; - } - - [Fact] - public void Cancel() - { - var subscription = this.service.Cancel(SubscriptionId, this.cancelOptions); - this.AssertRequest(HttpMethod.Delete, "/v1/subscriptions/sub_123"); - Assert.NotNull(subscription); - Assert.Equal("subscription", subscription.Object); - } - - [Fact] - public async Task CancelAsync() - { - var subscription = await this.service.CancelAsync(SubscriptionId, this.cancelOptions); - this.AssertRequest(HttpMethod.Delete, "/v1/subscriptions/sub_123"); - Assert.NotNull(subscription); - Assert.Equal("subscription", subscription.Object); - } - - [Fact] - public void Create() - { - var subscription = this.service.Create(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/subscriptions"); - Assert.NotNull(subscription); - Assert.Equal("subscription", subscription.Object); - } - - [Fact] - public async Task CreateAsync() - { - var subscription = await this.service.CreateAsync(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/subscriptions"); - Assert.NotNull(subscription); - Assert.Equal("subscription", subscription.Object); - } - - [Fact] - public void Get() - { - var subscription = this.service.Get(SubscriptionId); - this.AssertRequest(HttpMethod.Get, "/v1/subscriptions/sub_123"); - Assert.NotNull(subscription); - Assert.Equal("subscription", subscription.Object); - } - - [Fact] - public async Task GetAsync() - { - var subscription = await this.service.GetAsync(SubscriptionId); - this.AssertRequest(HttpMethod.Get, "/v1/subscriptions/sub_123"); - Assert.NotNull(subscription); - Assert.Equal("subscription", subscription.Object); - } - - [Fact] - public void List() - { - var subscriptions = this.service.List(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/subscriptions"); - Assert.NotNull(subscriptions); - Assert.Equal("list", subscriptions.Object); - Assert.Single(subscriptions.Data); - Assert.Equal("subscription", subscriptions.Data[0].Object); - } - - [Fact] - public async Task ListAsync() - { - var subscriptions = await this.service.ListAsync(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/subscriptions"); - Assert.NotNull(subscriptions); - Assert.Equal("list", subscriptions.Object); - Assert.Single(subscriptions.Data); - Assert.Equal("subscription", subscriptions.Data[0].Object); - } - - [Fact] - public void ListAutoPaging() - { - var subscription = this.service.ListAutoPaging(this.listOptions).First(); - Assert.NotNull(subscription); - Assert.Equal("subscription", subscription.Object); - } - - [Fact] - public async Task ListAutoPagingAsync() - { - var subscription = await this.service.ListAutoPagingAsync(this.listOptions).FirstAsync(); - Assert.NotNull(subscription); - Assert.Equal("subscription", subscription.Object); - } - - [Fact] - public void Update() - { - var subscription = this.service.Update(SubscriptionId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/subscriptions/sub_123"); - Assert.NotNull(subscription); - Assert.Equal("subscription", subscription.Object); - } - - [Fact] - public async Task UpdateAsync() - { - var subscription = await this.service.UpdateAsync(SubscriptionId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/subscriptions/sub_123"); - Assert.NotNull(subscription); - Assert.Equal("subscription", subscription.Object); - } - } -} diff --git a/src/StripeTests/Services/TaxCodes/TaxCodeServiceTest.cs b/src/StripeTests/Services/TaxCodes/TaxCodeServiceTest.cs deleted file mode 100644 index d12d7f1720..0000000000 --- a/src/StripeTests/Services/TaxCodes/TaxCodeServiceTest.cs +++ /dev/null @@ -1,71 +0,0 @@ -namespace StripeTests -{ - using System.Collections.Generic; - using System.Linq; - using System.Net.Http; - using System.Threading.Tasks; - - using Stripe; - using Xunit; - - public class TaxCodeServiceTest : BaseStripeTest - { - private const string ScheduleId = "sub_sched_123"; - - private readonly TaxCodeService service; - private readonly TaxCodeListOptions listOptions; - - public TaxCodeServiceTest( - StripeMockFixture stripeMockFixture, - MockHttpClientFixture mockHttpClientFixture) - : base(stripeMockFixture, mockHttpClientFixture) - { - this.service = new TaxCodeService(this.StripeClient); - - this.listOptions = new TaxCodeListOptions - { - Limit = 1, - }; - } - - [Fact] - public void Get() - { - var subscription = this.service.Get(ScheduleId); - this.AssertRequest(HttpMethod.Get, "/v1/tax_codes/sub_sched_123"); - Assert.NotNull(subscription); - Assert.Equal("tax_code", subscription.Object); - } - - [Fact] - public async Task GetAsync() - { - var subscription = await this.service.GetAsync(ScheduleId); - this.AssertRequest(HttpMethod.Get, "/v1/tax_codes/sub_sched_123"); - Assert.NotNull(subscription); - Assert.Equal("tax_code", subscription.Object); - } - - [Fact] - public void List() - { - var taxCodes = this.service.List(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/tax_codes"); - Assert.NotNull(taxCodes); - Assert.Equal("list", taxCodes.Object); - Assert.Single(taxCodes.Data); - Assert.Equal("tax_code", taxCodes.Data[0].Object); - } - - [Fact] - public async Task ListAsync() - { - var taxCodes = await this.service.ListAsync(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/tax_codes"); - Assert.NotNull(taxCodes); - Assert.Equal("list", taxCodes.Object); - Assert.Single(taxCodes.Data); - Assert.Equal("tax_code", taxCodes.Data[0].Object); - } - } -} diff --git a/src/StripeTests/Services/TaxIds/TaxIdServiceTest.cs b/src/StripeTests/Services/TaxIds/TaxIdServiceTest.cs deleted file mode 100644 index e1e7da84d2..0000000000 --- a/src/StripeTests/Services/TaxIds/TaxIdServiceTest.cs +++ /dev/null @@ -1,130 +0,0 @@ -namespace StripeTests -{ - using System.Linq; - using System.Net.Http; - using System.Threading.Tasks; - - using Stripe; - using Xunit; - - public class TaxIdServiceTest : BaseStripeTest - { - private const string CustomerId = "cus_123"; - private const string TaxIdId = "txi_123"; - - private readonly CustomerTaxIdService service; - private readonly CustomerTaxIdCreateOptions createOptions; - private readonly CustomerTaxIdListOptions listOptions; - - public TaxIdServiceTest( - StripeMockFixture stripeMockFixture, - MockHttpClientFixture mockHttpClientFixture) - : base(stripeMockFixture, mockHttpClientFixture) - { - this.service = new CustomerTaxIdService(this.StripeClient); - - this.createOptions = new CustomerTaxIdCreateOptions - { - Type = "eu_vat", - Value = "11111", - }; - - this.listOptions = new CustomerTaxIdListOptions - { - Limit = 1, - }; - } - - [Fact] - public void Create() - { - var person = this.service.Create(CustomerId, this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/customers/cus_123/tax_ids"); - Assert.NotNull(person); - Assert.Equal("tax_id", person.Object); - } - - [Fact] - public async Task CreateAsync() - { - var person = await this.service.CreateAsync(CustomerId, this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/customers/cus_123/tax_ids"); - Assert.NotNull(person); - Assert.Equal("tax_id", person.Object); - } - - [Fact] - public void Delete() - { - var person = this.service.Delete(CustomerId, TaxIdId); - this.AssertRequest(HttpMethod.Delete, "/v1/customers/cus_123/tax_ids/txi_123"); - Assert.NotNull(person); - Assert.Equal("tax_id", person.Object); - } - - [Fact] - public async Task DeleteAsync() - { - var person = await this.service.DeleteAsync(CustomerId, TaxIdId); - this.AssertRequest(HttpMethod.Delete, "/v1/customers/cus_123/tax_ids/txi_123"); - Assert.NotNull(person); - Assert.Equal("tax_id", person.Object); - } - - [Fact] - public void Get() - { - var person = this.service.Get(CustomerId, TaxIdId); - this.AssertRequest(HttpMethod.Get, "/v1/customers/cus_123/tax_ids/txi_123"); - Assert.NotNull(person); - Assert.Equal("tax_id", person.Object); - } - - [Fact] - public async Task GetAsync() - { - var person = await this.service.GetAsync(CustomerId, TaxIdId); - this.AssertRequest(HttpMethod.Get, "/v1/customers/cus_123/tax_ids/txi_123"); - Assert.NotNull(person); - Assert.Equal("tax_id", person.Object); - } - - [Fact] - public void List() - { - var persons = this.service.List(CustomerId, this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/customers/cus_123/tax_ids"); - Assert.NotNull(persons); - Assert.Equal("list", persons.Object); - Assert.Single(persons.Data); - Assert.Equal("tax_id", persons.Data[0].Object); - } - - [Fact] - public async Task ListAsync() - { - var persons = await this.service.ListAsync(CustomerId, this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/customers/cus_123/tax_ids"); - Assert.NotNull(persons); - Assert.Equal("list", persons.Object); - Assert.Single(persons.Data); - Assert.Equal("tax_id", persons.Data[0].Object); - } - - [Fact] - public void ListAutoPaging() - { - var person = this.service.ListAutoPaging(CustomerId, this.listOptions).First(); - Assert.NotNull(person); - Assert.Equal("tax_id", person.Object); - } - - [Fact] - public async Task ListAutoPagingAsync() - { - var person = await this.service.ListAutoPagingAsync(CustomerId, this.listOptions).FirstAsync(); - Assert.NotNull(person); - Assert.Equal("tax_id", person.Object); - } - } -} diff --git a/src/StripeTests/Services/TaxRates/TaxRateServiceTest.cs b/src/StripeTests/Services/TaxRates/TaxRateServiceTest.cs deleted file mode 100644 index 04ebd0e796..0000000000 --- a/src/StripeTests/Services/TaxRates/TaxRateServiceTest.cs +++ /dev/null @@ -1,140 +0,0 @@ -namespace StripeTests -{ - using System.Collections.Generic; - using System.Linq; - using System.Net.Http; - using System.Threading.Tasks; - - using Stripe; - using Xunit; - - public class TaxRateServiceTest : BaseStripeTest - { - private const string TaxRateId = "txr_123"; - - private readonly TaxRateService service; - private readonly TaxRateCreateOptions createOptions; - private readonly TaxRateUpdateOptions updateOptions; - private readonly TaxRateListOptions listOptions; - - public TaxRateServiceTest( - StripeMockFixture stripeMockFixture, - MockHttpClientFixture mockHttpClientFixture) - : base(stripeMockFixture, mockHttpClientFixture) - { - this.service = new TaxRateService(this.StripeClient); - - this.createOptions = new TaxRateCreateOptions - { - DisplayName = "Name", - Inclusive = true, - Percentage = 12.5m, - }; - - this.updateOptions = new TaxRateUpdateOptions - { - Metadata = new Dictionary - { - { "key", "value" }, - }, - }; - - this.listOptions = new TaxRateListOptions - { - Limit = 1, - }; - } - - [Fact] - public void Create() - { - var taxRate = this.service.Create(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/tax_rates"); - Assert.NotNull(taxRate); - Assert.Equal("tax_rate", taxRate.Object); - } - - [Fact] - public async Task CreateAsync() - { - var taxRate = await this.service.CreateAsync(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/tax_rates"); - Assert.NotNull(taxRate); - Assert.Equal("tax_rate", taxRate.Object); - } - - [Fact] - public void Get() - { - var taxRate = this.service.Get(TaxRateId); - this.AssertRequest(HttpMethod.Get, "/v1/tax_rates/txr_123"); - Assert.NotNull(taxRate); - Assert.Equal("tax_rate", taxRate.Object); - } - - [Fact] - public async Task GetAsync() - { - var taxRate = await this.service.GetAsync(TaxRateId); - this.AssertRequest(HttpMethod.Get, "/v1/tax_rates/txr_123"); - Assert.NotNull(taxRate); - Assert.Equal("tax_rate", taxRate.Object); - } - - [Fact] - public void List() - { - var taxRates = this.service.List(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/tax_rates"); - Assert.NotNull(taxRates); - Assert.Equal("list", taxRates.Object); - Assert.Single(taxRates.Data); - Assert.Equal("tax_rate", taxRates.Data[0].Object); - } - - [Fact] - public async Task ListAsync() - { - var taxRates = await this.service.ListAsync(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/tax_rates"); - Assert.NotNull(taxRates); - Assert.Equal("list", taxRates.Object); - Assert.Single(taxRates.Data); - Assert.Equal("tax_rate", taxRates.Data[0].Object); - } - - [Fact] - public void ListAutoPaging() - { - var taxRate = this.service.ListAutoPaging(this.listOptions).First(); - Assert.NotNull(taxRate); - Assert.Equal("tax_rate", taxRate.Object); - } - - [Fact] - public async Task ListAutoPagingAsync() - { - var taxRate = await this.service.ListAutoPagingAsync(this.listOptions).FirstAsync(); - Assert.NotNull(taxRate); - Assert.Equal("tax_rate", taxRate.Object); - } - - [Fact] - public void Update() - { - var taxRate = this.service.Update(TaxRateId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/tax_rates/txr_123"); - Assert.NotNull(taxRate); - Assert.Equal("tax_rate", taxRate.Object); - } - - [Fact] - public async Task UpdateAsync() - { - var taxRate = await this.service.UpdateAsync(TaxRateId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/tax_rates/txr_123"); - Assert.NotNull(taxRate); - Assert.Equal("tax_rate", taxRate.Object); - } - } -} diff --git a/src/StripeTests/Services/Terminal/ConnectionTokens/ConnectionTokenServiceTest.cs b/src/StripeTests/Services/Terminal/ConnectionTokens/ConnectionTokenServiceTest.cs deleted file mode 100644 index 6fc0c40fb1..0000000000 --- a/src/StripeTests/Services/Terminal/ConnectionTokens/ConnectionTokenServiceTest.cs +++ /dev/null @@ -1,44 +0,0 @@ -namespace StripeTests.Terminal -{ - using System; - using System.Collections.Generic; - using System.Net.Http; - using System.Threading.Tasks; - - using Stripe.Terminal; - using Xunit; - - public class ConnectionTokenServiceTest : BaseStripeTest - { - private readonly ConnectionTokenService service; - private readonly ConnectionTokenCreateOptions createOptions; - - public ConnectionTokenServiceTest( - StripeMockFixture stripeMockFixture, - MockHttpClientFixture mockHttpClientFixture) - : base(stripeMockFixture, mockHttpClientFixture) - { - this.service = new ConnectionTokenService(this.StripeClient); - - this.createOptions = new ConnectionTokenCreateOptions - { - }; - } - - [Fact] - public void Create() - { - var connectionToken = this.service.Create(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/terminal/connection_tokens"); - Assert.NotNull(connectionToken); - } - - [Fact] - public async Task CreateAsync() - { - var connectionToken = await this.service.CreateAsync(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/terminal/connection_tokens"); - Assert.NotNull(connectionToken); - } - } -} diff --git a/src/StripeTests/Services/Terminal/Locations/LocationServiceTest.cs b/src/StripeTests/Services/Terminal/Locations/LocationServiceTest.cs deleted file mode 100644 index aeea6fa81b..0000000000 --- a/src/StripeTests/Services/Terminal/Locations/LocationServiceTest.cs +++ /dev/null @@ -1,146 +0,0 @@ -namespace StripeTests.Terminal -{ - using System.Linq; - using System.Net.Http; - using System.Threading.Tasks; - using Stripe; - using Stripe.Terminal; - using Xunit; - - public class LocationServiceTest : BaseStripeTest - { - private const string LocationId = "loc_123"; - - private readonly LocationService service; - private readonly LocationCreateOptions createOptions; - private readonly LocationListOptions listOptions; - private readonly LocationUpdateOptions updateOptions; - - public LocationServiceTest( - StripeMockFixture stripeMockFixture, - MockHttpClientFixture mockHttpClientFixture) - : base(stripeMockFixture, mockHttpClientFixture) - { - this.service = new LocationService(this.StripeClient); - - this.createOptions = new LocationCreateOptions - { - Address = new AddressOptions - { - State = "CA", - City = "City", - Line1 = "Line1", - Line2 = "Line2", - PostalCode = "90210", - Country = "US", - }, - DisplayName = "my location", - }; - - this.listOptions = new LocationListOptions - { - }; - - this.updateOptions = new LocationUpdateOptions - { - DisplayName = "my_location_update", - }; - } - - [Fact] - public void Create() - { - var location = this.service.Create(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/terminal/locations"); - Assert.NotNull(location); - } - - [Fact] - public async Task CreateAsync() - { - var location = await this.service.CreateAsync(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/terminal/locations"); - Assert.NotNull(location); - } - - [Fact] - public void Delete() - { - var deleted = this.service.Delete(LocationId); - this.AssertRequest(HttpMethod.Delete, "/v1/terminal/locations/loc_123"); - Assert.NotNull(deleted); - } - - [Fact] - public async Task DeleteAsync() - { - var deleted = await this.service.DeleteAsync(LocationId); - this.AssertRequest(HttpMethod.Delete, "/v1/terminal/locations/loc_123"); - Assert.NotNull(deleted); - } - - [Fact] - public void Get() - { - var location = this.service.Get(LocationId); - this.AssertRequest(HttpMethod.Get, "/v1/terminal/locations/loc_123"); - Assert.NotNull(location); - } - - [Fact] - public async Task GetAsync() - { - var location = await this.service.GetAsync(LocationId); - this.AssertRequest(HttpMethod.Get, "/v1/terminal/locations/loc_123"); - Assert.NotNull(location); - } - - [Fact] - public void List() - { - var locations = this.service.List(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/terminal/locations"); - Assert.NotNull(locations); - } - - [Fact] - public async Task ListAsync() - { - var locations = await this.service.ListAsync(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/terminal/locations"); - Assert.NotNull(locations); - } - - [Fact] - public void ListAutoPaging() - { - var location = this.service.ListAutoPaging(this.listOptions).First(); - Assert.NotNull(location); - Assert.Equal("terminal.location", location.Object); - } - - [Fact] - public async Task ListAutoPagingAsync() - { - var location = await this.service.ListAutoPagingAsync(this.listOptions).FirstAsync(); - Assert.NotNull(location); - Assert.Equal("terminal.location", location.Object); - } - - [Fact] - public void Update() - { - var location = this.service.Update(LocationId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/terminal/locations/loc_123"); - Assert.NotNull(location); - } - - [Fact] - public async Task UpdateAsync() - { - var location = await this.service.UpdateAsync(LocationId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/terminal/locations/loc_123"); - Assert.NotNull(location); - } - } -} diff --git a/src/StripeTests/Services/Terminal/Readers/ReaderServiceTest.cs b/src/StripeTests/Services/Terminal/Readers/ReaderServiceTest.cs deleted file mode 100644 index 0c05a3a865..0000000000 --- a/src/StripeTests/Services/Terminal/Readers/ReaderServiceTest.cs +++ /dev/null @@ -1,139 +0,0 @@ -namespace StripeTests.Terminal -{ - using System.Linq; - using System.Net.Http; - using System.Threading.Tasks; - using Stripe.Terminal; - using Xunit; - - public class ReaderServiceTest : BaseStripeTest - { - private const string ReaderId = "ds_123"; - - private readonly ReaderService service; - private readonly ReaderCreateOptions createOptions; - private readonly ReaderListOptions listOptions; - private readonly ReaderUpdateOptions updateOptions; - - public ReaderServiceTest( - StripeMockFixture stripeMockFixture, - MockHttpClientFixture mockHttpClientFixture) - : base(stripeMockFixture, mockHttpClientFixture) - { - this.service = new ReaderService(this.StripeClient); - - this.createOptions = new ReaderCreateOptions - { - Label = "my_reader", - Location = "loc_123", - RegistrationCode = "a-b-c", - }; - - this.listOptions = new ReaderListOptions - { - Location = "loc_123", - }; - - this.updateOptions = new ReaderUpdateOptions - { - Label = "my_reader_update", - }; - } - - [Fact] - public void Create() - { - var reader = this.service.Create(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/terminal/readers"); - Assert.NotNull(reader); - } - - [Fact] - public async Task CreateAsync() - { - var reader = await this.service.CreateAsync(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/terminal/readers"); - Assert.NotNull(reader); - } - - [Fact] - public void Delete() - { - var deleted = this.service.Delete(ReaderId); - this.AssertRequest(HttpMethod.Delete, "/v1/terminal/readers/ds_123"); - Assert.NotNull(deleted); - } - - [Fact] - public async Task DeleteAsync() - { - var deleted = await this.service.DeleteAsync(ReaderId); - this.AssertRequest(HttpMethod.Delete, "/v1/terminal/readers/ds_123"); - Assert.NotNull(deleted); - } - - [Fact] - public void Get() - { - var reader = this.service.Get(ReaderId); - this.AssertRequest(HttpMethod.Get, "/v1/terminal/readers/ds_123"); - Assert.NotNull(reader); - } - - [Fact] - public async Task GetAsync() - { - var reader = await this.service.GetAsync(ReaderId); - this.AssertRequest(HttpMethod.Get, "/v1/terminal/readers/ds_123"); - Assert.NotNull(reader); - } - - [Fact] - public void List() - { - var readers = this.service.List(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/terminal/readers"); - Assert.NotNull(readers); - } - - [Fact] - public async Task ListAsync() - { - var readers = await this.service.ListAsync(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/terminal/readers"); - Assert.NotNull(readers); - } - - [Fact] - public void ListAutoPaging() - { - var reader = this.service.ListAutoPaging(this.listOptions).First(); - Assert.NotNull(reader); - Assert.Equal("terminal.reader", reader.Object); - } - - [Fact] - public async Task ListAutoPagingAsync() - { - var reader = await this.service.ListAutoPagingAsync(this.listOptions).FirstAsync(); - Assert.NotNull(reader); - Assert.Equal("terminal.reader", reader.Object); - } - - [Fact] - public void Update() - { - var reader = this.service.Update(ReaderId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/terminal/readers/ds_123"); - Assert.NotNull(reader); - } - - [Fact] - public async Task UpdateAsync() - { - var reader = await this.service.UpdateAsync(ReaderId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/terminal/readers/ds_123"); - Assert.NotNull(reader); - } - } -} diff --git a/src/StripeTests/Services/Tokens/TokenServiceTest.cs b/src/StripeTests/Services/Tokens/TokenServiceTest.cs deleted file mode 100644 index 6800e4ef9a..0000000000 --- a/src/StripeTests/Services/Tokens/TokenServiceTest.cs +++ /dev/null @@ -1,126 +0,0 @@ -namespace StripeTests -{ - using System; - using System.Collections.Generic; - using System.Net.Http; - using System.Threading.Tasks; - - using Stripe; - using Xunit; - - public class TokenServiceTest : BaseStripeTest - { - private const string TokenId = "tok_123"; - - private readonly TokenService service; - private readonly TokenCreateOptions createOptions; - private readonly TokenCreateOptions createPersonOptions; - - public TokenServiceTest( - StripeMockFixture stripeMockFixture, - MockHttpClientFixture mockHttpClientFixture) - : base(stripeMockFixture, mockHttpClientFixture) - { - this.service = new TokenService(this.StripeClient); - - this.createOptions = new TokenCreateOptions - { - Card = new TokenCardOptions - { - AddressCity = "City", - AddressCountry = "US", - AddressLine1 = "Line 1", - AddressLine2 = "Line 2", - AddressState = "CA", - AddressZip = "90210", - Cvc = "123", - ExpMonth = "10", - ExpYear = (DateTime.Now.Year + 1).ToString(), - Name = "Name", - Number = "4242424242424242", - }, - }; - - this.createPersonOptions = new TokenCreateOptions - { - Person = new TokenPersonOptions - { - Address = new AddressOptions - { - State = "CA", - City = "City", - Line1 = "Line1", - Line2 = "Line2", - PostalCode = "90210", - Country = "US", - }, - FirstName = "John", - Relationship = new TokenPersonRelationshipOptions - { - Owner = true, - PercentOwnership = 30.5m, - Representative = true, - }, - Verification = new TokenPersonVerificationOptions - { - AdditionalDocument = new TokenPersonVerificationAdditionalDocumentOptions - { - Back = "file_abc", - Front = "file_def", - }, - Document = new TokenPersonVerificationDocumentOptions - { - Back = "file_123", - Front = "file_345", - }, - }, - }, - }; - } - - [Fact] - public void Create() - { - var token = this.service.Create(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/tokens"); - Assert.NotNull(token); - Assert.Equal("token", token.Object); - } - - [Fact] - public void CreateTokenPerson() - { - var tokenPerson = this.service.Create(this.createPersonOptions); - this.AssertRequest(HttpMethod.Post, "/v1/tokens"); - Assert.NotNull(tokenPerson); - Assert.Equal("token", tokenPerson.Object); - } - - [Fact] - public async Task CreateAsync() - { - var token = await this.service.CreateAsync(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/tokens"); - Assert.NotNull(token); - Assert.Equal("token", token.Object); - } - - [Fact] - public void Get() - { - var token = this.service.Get(TokenId); - this.AssertRequest(HttpMethod.Get, "/v1/tokens/tok_123"); - Assert.NotNull(token); - Assert.Equal("token", token.Object); - } - - [Fact] - public async Task GetAsync() - { - var token = await this.service.GetAsync(TokenId); - this.AssertRequest(HttpMethod.Get, "/v1/tokens/tok_123"); - Assert.NotNull(token); - Assert.Equal("token", token.Object); - } - } -} diff --git a/src/StripeTests/Services/Topups/TopupServiceTest.cs b/src/StripeTests/Services/Topups/TopupServiceTest.cs deleted file mode 100644 index 858a6b688c..0000000000 --- a/src/StripeTests/Services/Topups/TopupServiceTest.cs +++ /dev/null @@ -1,158 +0,0 @@ -namespace StripeTests -{ - using System.Collections.Generic; - using System.Linq; - using System.Net.Http; - using System.Threading.Tasks; - - using Stripe; - using Xunit; - - public class TopupServiceTest : BaseStripeTest - { - private const string TopupId = "tu_123"; - - private readonly TopupService service; - private readonly TopupCreateOptions createOptions; - private readonly TopupUpdateOptions updateOptions; - private readonly TopupListOptions listOptions; - - public TopupServiceTest( - StripeMockFixture stripeMockFixture, - MockHttpClientFixture mockHttpClientFixture) - : base(stripeMockFixture, mockHttpClientFixture) - { - this.service = new TopupService(this.StripeClient); - - this.createOptions = new TopupCreateOptions - { - Amount = 123, - Currency = "usd", - StatementDescriptor = "descriptor", - }; - - this.updateOptions = new TopupUpdateOptions - { - Metadata = new Dictionary - { - { "key", "value" }, - }, - }; - - this.listOptions = new TopupListOptions - { - Limit = 1, - }; - } - - [Fact] - public void Cancel() - { - var topup = this.service.Cancel(TopupId); - this.AssertRequest(HttpMethod.Post, "/v1/topups/tu_123/cancel"); - Assert.NotNull(topup); - Assert.Equal("topup", topup.Object); - } - - [Fact] - public async Task CancelAsync() - { - var topup = await this.service.CancelAsync(TopupId); - this.AssertRequest(HttpMethod.Post, "/v1/topups/tu_123/cancel"); - Assert.NotNull(topup); - Assert.Equal("topup", topup.Object); - } - - [Fact] - public void Create() - { - var topup = this.service.Create(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/topups"); - Assert.NotNull(topup); - Assert.Equal("topup", topup.Object); - } - - [Fact] - public async Task CreateAsync() - { - var topup = await this.service.CreateAsync(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/topups"); - Assert.NotNull(topup); - Assert.Equal("topup", topup.Object); - } - - [Fact] - public void Get() - { - var topup = this.service.Get(TopupId); - this.AssertRequest(HttpMethod.Get, "/v1/topups/tu_123"); - Assert.NotNull(topup); - Assert.Equal("topup", topup.Object); - } - - [Fact] - public async Task GetAsync() - { - var topup = await this.service.GetAsync(TopupId); - this.AssertRequest(HttpMethod.Get, "/v1/topups/tu_123"); - Assert.NotNull(topup); - Assert.Equal("topup", topup.Object); - } - - [Fact] - public void List() - { - var topups = this.service.List(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/topups"); - Assert.NotNull(topups); - Assert.Equal("list", topups.Object); - Assert.Single(topups.Data); - Assert.Equal("topup", topups.Data[0].Object); - } - - [Fact] - public async Task ListAsync() - { - var topups = await this.service.ListAsync(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/topups"); - Assert.NotNull(topups); - Assert.Equal("list", topups.Object); - Assert.Single(topups.Data); - Assert.Equal("topup", topups.Data[0].Object); - } - - [Fact] - public void ListAutoPaging() - { - var topup = this.service.ListAutoPaging(this.listOptions).First(); - Assert.NotNull(topup); - Assert.Equal("topup", topup.Object); - } - - [Fact] - public async Task ListAutoPagingAsync() - { - var topup = await this.service.ListAutoPagingAsync(this.listOptions).FirstAsync(); - Assert.NotNull(topup); - Assert.Equal("topup", topup.Object); - } - - [Fact] - public void Update() - { - var topup = this.service.Update(TopupId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/topups/tu_123"); - Assert.NotNull(topup); - Assert.Equal("topup", topup.Object); - } - - [Fact] - public async Task UpdateAsync() - { - var topup = await this.service.UpdateAsync(TopupId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/topups/tu_123"); - Assert.NotNull(topup); - Assert.Equal("topup", topup.Object); - } - } -} diff --git a/src/StripeTests/Services/TransferReversals/TransferReversalServiceTest.cs b/src/StripeTests/Services/TransferReversals/TransferReversalServiceTest.cs deleted file mode 100644 index cf6563628a..0000000000 --- a/src/StripeTests/Services/TransferReversals/TransferReversalServiceTest.cs +++ /dev/null @@ -1,139 +0,0 @@ -namespace StripeTests -{ - using System.Collections.Generic; - using System.Linq; - using System.Net.Http; - using System.Threading.Tasks; - - using Stripe; - using Xunit; - - public class TransferReversalServiceTest : BaseStripeTest - { - private const string TransferId = "tr_123"; - private const string TransferReversalId = "trr_123"; - - private readonly TransferReversalService service; - private readonly TransferReversalCreateOptions createOptions; - private readonly TransferReversalUpdateOptions updateOptions; - private readonly TransferReversalListOptions listOptions; - - public TransferReversalServiceTest( - StripeMockFixture stripeMockFixture, - MockHttpClientFixture mockHttpClientFixture) - : base(stripeMockFixture, mockHttpClientFixture) - { - this.service = new TransferReversalService(this.StripeClient); - - this.createOptions = new TransferReversalCreateOptions - { - Amount = 123, - }; - - this.updateOptions = new TransferReversalUpdateOptions - { - Metadata = new Dictionary - { - { "key", "value" }, - }, - }; - - this.listOptions = new TransferReversalListOptions - { - Limit = 1, - }; - } - - [Fact] - public void Create() - { - var transferReversal = this.service.Create(TransferId, this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/transfers/tr_123/reversals"); - Assert.NotNull(transferReversal); - Assert.Equal("transfer_reversal", transferReversal.Object); - } - - [Fact] - public async Task CreateAsync() - { - var transferReversal = await this.service.CreateAsync(TransferId, this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/transfers/tr_123/reversals"); - Assert.NotNull(transferReversal); - Assert.Equal("transfer_reversal", transferReversal.Object); - } - - [Fact] - public void Get() - { - var transferReversal = this.service.Get(TransferId, TransferReversalId); - this.AssertRequest(HttpMethod.Get, "/v1/transfers/tr_123/reversals/trr_123"); - Assert.NotNull(transferReversal); - Assert.Equal("transfer_reversal", transferReversal.Object); - } - - [Fact] - public async Task GetAsync() - { - var transferReversal = await this.service.GetAsync(TransferId, TransferReversalId); - this.AssertRequest(HttpMethod.Get, "/v1/transfers/tr_123/reversals/trr_123"); - Assert.NotNull(transferReversal); - Assert.Equal("transfer_reversal", transferReversal.Object); - } - - [Fact] - public void List() - { - var transferReversals = this.service.List(TransferId, this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/transfers/tr_123/reversals"); - Assert.NotNull(transferReversals); - Assert.Equal("list", transferReversals.Object); - Assert.Single(transferReversals.Data); - Assert.Equal("transfer_reversal", transferReversals.Data[0].Object); - } - - [Fact] - public async Task ListAsync() - { - var transferReversals = await this.service.ListAsync(TransferId, this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/transfers/tr_123/reversals"); - Assert.NotNull(transferReversals); - Assert.Equal("list", transferReversals.Object); - Assert.Single(transferReversals.Data); - Assert.Equal("transfer_reversal", transferReversals.Data[0].Object); - } - - [Fact] - public void ListAutoPaging() - { - var transferReversal = this.service.ListAutoPaging(TransferId, this.listOptions).First(); - Assert.NotNull(transferReversal); - Assert.Equal("transfer_reversal", transferReversal.Object); - } - - [Fact] - public async Task ListAutoPagingAsync() - { - var transferReversal = await this.service.ListAutoPagingAsync(TransferId, this.listOptions).FirstAsync(); - Assert.NotNull(transferReversal); - Assert.Equal("transfer_reversal", transferReversal.Object); - } - - [Fact] - public void Update() - { - var transferReversal = this.service.Update(TransferId, TransferReversalId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/transfers/tr_123/reversals/trr_123"); - Assert.NotNull(transferReversal); - Assert.Equal("transfer_reversal", transferReversal.Object); - } - - [Fact] - public async Task UpdateAsync() - { - var transferReversal = await this.service.UpdateAsync(TransferId, TransferReversalId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/transfers/tr_123/reversals/trr_123"); - Assert.NotNull(transferReversal); - Assert.Equal("transfer_reversal", transferReversal.Object); - } - } -} diff --git a/src/StripeTests/Services/Transfers/TransferServiceTest.cs b/src/StripeTests/Services/Transfers/TransferServiceTest.cs deleted file mode 100644 index be94f6426d..0000000000 --- a/src/StripeTests/Services/Transfers/TransferServiceTest.cs +++ /dev/null @@ -1,140 +0,0 @@ -namespace StripeTests -{ - using System.Collections.Generic; - using System.Linq; - using System.Net.Http; - using System.Threading.Tasks; - - using Stripe; - using Xunit; - - public class TransferServiceTest : BaseStripeTest - { - private const string TransferId = "tr_123"; - - private readonly TransferService service; - private readonly TransferCreateOptions createOptions; - private readonly TransferUpdateOptions updateOptions; - private readonly TransferListOptions listOptions; - - public TransferServiceTest( - StripeMockFixture stripeMockFixture, - MockHttpClientFixture mockHttpClientFixture) - : base(stripeMockFixture, mockHttpClientFixture) - { - this.service = new TransferService(this.StripeClient); - - this.createOptions = new TransferCreateOptions - { - Amount = 123, - Currency = "usd", - Destination = "acct_123", - }; - - this.updateOptions = new TransferUpdateOptions - { - Metadata = new Dictionary - { - { "key", "value" }, - }, - }; - - this.listOptions = new TransferListOptions - { - Limit = 1, - }; - } - - [Fact] - public void Create() - { - var transfer = this.service.Create(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/transfers"); - Assert.NotNull(transfer); - Assert.Equal("transfer", transfer.Object); - } - - [Fact] - public async Task CreateAsync() - { - var transfer = await this.service.CreateAsync(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/transfers"); - Assert.NotNull(transfer); - Assert.Equal("transfer", transfer.Object); - } - - [Fact] - public void Get() - { - var transfer = this.service.Get(TransferId); - this.AssertRequest(HttpMethod.Get, "/v1/transfers/tr_123"); - Assert.NotNull(transfer); - Assert.Equal("transfer", transfer.Object); - } - - [Fact] - public async Task GetAsync() - { - var transfer = await this.service.GetAsync(TransferId); - this.AssertRequest(HttpMethod.Get, "/v1/transfers/tr_123"); - Assert.NotNull(transfer); - Assert.Equal("transfer", transfer.Object); - } - - [Fact] - public void List() - { - var transfers = this.service.List(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/transfers"); - Assert.NotNull(transfers); - Assert.Equal("list", transfers.Object); - Assert.Single(transfers.Data); - Assert.Equal("transfer", transfers.Data[0].Object); - } - - [Fact] - public async Task ListAsync() - { - var transfers = await this.service.ListAsync(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/transfers"); - Assert.NotNull(transfers); - Assert.Equal("list", transfers.Object); - Assert.Single(transfers.Data); - Assert.Equal("transfer", transfers.Data[0].Object); - } - - [Fact] - public void ListAutoPaging() - { - var transfer = this.service.ListAutoPaging(this.listOptions).First(); - Assert.NotNull(transfer); - Assert.Equal("transfer", transfer.Object); - } - - [Fact] - public async Task ListAutoPagingAsync() - { - var transfer = await this.service.ListAutoPagingAsync(this.listOptions).FirstAsync(); - Assert.NotNull(transfer); - Assert.Equal("transfer", transfer.Object); - } - - [Fact] - public void Update() - { - var transfer = this.service.Update(TransferId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/transfers/tr_123"); - Assert.NotNull(transfer); - Assert.Equal("transfer", transfer.Object); - } - - [Fact] - public async Task UpdateAsync() - { - var transfer = await this.service.UpdateAsync(TransferId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/transfers/tr_123"); - Assert.NotNull(transfer); - Assert.Equal("transfer", transfer.Object); - } - } -} diff --git a/src/StripeTests/Services/WebhookEndpoints/WebhookEndpointServiceTest.cs b/src/StripeTests/Services/WebhookEndpoints/WebhookEndpointServiceTest.cs deleted file mode 100644 index a664ab4b1b..0000000000 --- a/src/StripeTests/Services/WebhookEndpoints/WebhookEndpointServiceTest.cs +++ /dev/null @@ -1,158 +0,0 @@ -namespace StripeTests -{ - using System.Collections.Generic; - using System.Linq; - using System.Net.Http; - using System.Threading.Tasks; - - using Stripe; - using Xunit; - - public class WebhookEndpointServiceTest : BaseStripeTest - { - private const string WebhookEndpointId = "we_123"; - - private readonly WebhookEndpointService service; - private readonly WebhookEndpointCreateOptions createOptions; - private readonly WebhookEndpointUpdateOptions updateOptions; - private readonly WebhookEndpointListOptions listOptions; - - public WebhookEndpointServiceTest( - StripeMockFixture stripeMockFixture, - MockHttpClientFixture mockHttpClientFixture) - : base(stripeMockFixture, mockHttpClientFixture) - { - this.service = new WebhookEndpointService(this.StripeClient); - - this.createOptions = new WebhookEndpointCreateOptions - { - EnabledEvents = new List - { - "charge.succeeded", - }, - Url = "https://stripe.com", - }; - - this.updateOptions = new WebhookEndpointUpdateOptions - { - EnabledEvents = new List - { - "charge.succeeded", - }, - }; - - this.listOptions = new WebhookEndpointListOptions - { - Limit = 1, - }; - } - - [Fact] - public void Create() - { - var endpoint = this.service.Create(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/webhook_endpoints"); - Assert.NotNull(endpoint); - Assert.Equal("webhook_endpoint", endpoint.Object); - } - - [Fact] - public async Task CreateAsync() - { - var endpoint = await this.service.CreateAsync(this.createOptions); - this.AssertRequest(HttpMethod.Post, "/v1/webhook_endpoints"); - Assert.NotNull(endpoint); - Assert.Equal("webhook_endpoint", endpoint.Object); - } - - [Fact] - public void Delete() - { - var deleted = this.service.Delete(WebhookEndpointId); - this.AssertRequest(HttpMethod.Delete, "/v1/webhook_endpoints/we_123"); - Assert.NotNull(deleted); - } - - [Fact] - public async Task DeleteAsync() - { - var deleted = await this.service.DeleteAsync(WebhookEndpointId); - this.AssertRequest(HttpMethod.Delete, "/v1/webhook_endpoints/we_123"); - Assert.NotNull(deleted); - } - - [Fact] - public void Get() - { - var endpoint = this.service.Get(WebhookEndpointId); - this.AssertRequest(HttpMethod.Get, "/v1/webhook_endpoints/we_123"); - Assert.NotNull(endpoint); - Assert.Equal("webhook_endpoint", endpoint.Object); - } - - [Fact] - public async Task GetAsync() - { - var endpoint = await this.service.GetAsync(WebhookEndpointId); - this.AssertRequest(HttpMethod.Get, "/v1/webhook_endpoints/we_123"); - Assert.NotNull(endpoint); - Assert.Equal("webhook_endpoint", endpoint.Object); - } - - [Fact] - public void List() - { - var endpoints = this.service.List(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/webhook_endpoints"); - Assert.NotNull(endpoints); - Assert.Equal("list", endpoints.Object); - Assert.Single(endpoints.Data); - Assert.Equal("webhook_endpoint", endpoints.Data[0].Object); - } - - [Fact] - public async Task ListAsync() - { - var endpoints = await this.service.ListAsync(this.listOptions); - this.AssertRequest(HttpMethod.Get, "/v1/webhook_endpoints"); - Assert.NotNull(endpoints); - Assert.Equal("list", endpoints.Object); - Assert.Single(endpoints.Data); - Assert.Equal("webhook_endpoint", endpoints.Data[0].Object); - } - - [Fact] - public void ListAutoPaging() - { - var endpoint = this.service.ListAutoPaging(this.listOptions).First(); - Assert.NotNull(endpoint); - Assert.Equal("webhook_endpoint", endpoint.Object); - } - - [Fact] - public async Task ListAutoPagingAsync() - { - var endpoint = await this.service.ListAutoPagingAsync(this.listOptions).FirstAsync(); - Assert.NotNull(endpoint); - Assert.Equal("webhook_endpoint", endpoint.Object); - } - - [Fact] - public void Update() - { - var endpoint = this.service.Update(WebhookEndpointId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/webhook_endpoints/we_123"); - Assert.NotNull(endpoint); - Assert.Equal("webhook_endpoint", endpoint.Object); - } - - [Fact] - public async Task UpdateAsync() - { - var endpoint = await this.service.UpdateAsync(WebhookEndpointId, this.updateOptions); - this.AssertRequest(HttpMethod.Post, "/v1/webhook_endpoints/we_123"); - Assert.NotNull(endpoint); - Assert.Equal("webhook_endpoint", endpoint.Object); - } - } -}