diff --git a/API_VERSION b/API_VERSION index 0336d6a3a5..fb72506858 100644 --- a/API_VERSION +++ b/API_VERSION @@ -1 +1 @@ -2025-08-27.basil \ No newline at end of file +2025-09-30.clover \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index a13383ca67..328de8c992 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -f4b80890ea17e89a543a77a389f29ca9be6fe615 \ No newline at end of file +9de7288a5c444f47d15545549303c3de4c226c71 \ No newline at end of file diff --git a/justfile b/justfile index 871aa51e5a..b891bed6de 100644 --- a/justfile +++ b/justfile @@ -20,7 +20,7 @@ ci-test: (_test "--no-build" "" "Release") # ⭐ format all files format *args: # This sets TargetFramework because of a race condition in dotnet format when it tries to format to multiple targets at a time, which could lead to code with compiler errors after it completes - TargetFramework=net5.0 dotnet format src/Stripe.net/Stripe.net.csproj --severity warn {{args}} + TargetFramework=net5.0 dotnet format src/Stripe.net.sln --severity warn {{args}} # verify, but don't modify, the project's formatting format-check: (format "--verify-no-changes") diff --git a/src/Examples/Program.cs b/src/Examples/Program.cs index 4d0ac5f52d..74514af254 100644 --- a/src/Examples/Program.cs +++ b/src/Examples/Program.cs @@ -27,7 +27,7 @@ public Program() /// are set before running the example. /// /// - /// command line args + /// command line args. /// public static async Task Main(string[] args) { diff --git a/src/Examples/V2/PushedEventWebhookHandler.cs b/src/Examples/V2/PushedEventWebhookHandler.cs index 373696e267..943bc4b19f 100644 --- a/src/Examples/V2/PushedEventWebhookHandler.cs +++ b/src/Examples/V2/PushedEventWebhookHandler.cs @@ -20,15 +20,15 @@ [ApiController] public class PushedEventWebhookHandler : ControllerBase { - private readonly StripeClient _client; - private readonly string _webhookSecret; + private readonly StripeClient client; + private readonly string webhookSecret; public PushedEventWebhookHandler() { var apiKey = Environment.GetEnvironmentVariable("STRIPE_API_KEY"); - _client = new StripeClient(apiKey); + client = new StripeClient(apiKey); - _webhookSecret = Environment.GetEnvironmentVariable("WEBHOOK_SECRET"); + webhookSecret = Environment.GetEnvironmentVariable("WEBHOOK_SECRET"); } [HttpPost] @@ -37,7 +37,7 @@ public async Task Index() var json = await new StreamReader(HttpContext.Request.Body).ReadToEndAsync(); try { - var pushedEvent = _client.ParseThinEvent__Experimental(json, Request.Headers["Stripe-Signature"], _webhookSecret); + var pushedEvent = client.ParseThinEvent__Experimental(json, Request.Headers["Stripe-Signature"], webhookSecret); if (pushedEvent is PushedV1BillingMeterErrorReportTriggeredEvent pushedV1BillingEvent) { var pulledEvent = await pushedV1BillingEvent.PullAsync(); diff --git a/src/Examples/V2/ThinEventWebhookHandler.cs b/src/Examples/V2/ThinEventWebhookHandler.cs index dd4e53f889..dbec0d14dc 100644 --- a/src/Examples/V2/ThinEventWebhookHandler.cs +++ b/src/Examples/V2/ThinEventWebhookHandler.cs @@ -22,15 +22,15 @@ namespace Examples.V2 [ApiController] public class ThinEventWebhookHandler : ControllerBase { - private readonly StripeClient _client; - private readonly string _webhookSecret; + private readonly StripeClient client; + private readonly string webhookSecret; public ThinEventWebhookHandler() { var apiKey = Environment.GetEnvironmentVariable("STRIPE_API_KEY"); - _client = new StripeClient(apiKey); + client = new StripeClient(apiKey); - _webhookSecret = Environment.GetEnvironmentVariable("WEBHOOK_SECRET"); + webhookSecret = Environment.GetEnvironmentVariable("WEBHOOK_SECRET"); } [HttpPost] @@ -39,10 +39,10 @@ public async Task Index() var json = await new StreamReader(HttpContext.Request.Body).ReadToEndAsync(); try { - var thinEvent = _client.ParseThinEvent(json, Request.Headers["Stripe-Signature"], _webhookSecret); + var thinEvent = client.ParseThinEvent(json, Request.Headers["Stripe-Signature"], webhookSecret); // Fetch the event data to understand the failure - var baseEvent = await _client.V2.Core.Events.GetAsync(thinEvent.Id); + var baseEvent = await client.V2.Core.Events.GetAsync(thinEvent.Id); if (baseEvent is V1BillingMeterErrorReportTriggeredEvent fullEvent) { var meter = await fullEvent.FetchRelatedObjectAsync(); diff --git a/src/Stripe.net/Entities/V2/Billing/Cadences/Cadence.cs b/src/Stripe.net/Entities/V2/Billing/Cadences/Cadence.cs index 511ce05738..6da8ea1d67 100644 --- a/src/Stripe.net/Entities/V2/Billing/Cadences/Cadence.cs +++ b/src/Stripe.net/Entities/V2/Billing/Cadences/Cadence.cs @@ -84,7 +84,7 @@ public class Cadence : StripeEntity, IHasId, IHasMetadata, IHasObject #if NET6_0_OR_GREATER [STJS.JsonPropertyName("next_billing_date")] #endif - public DateTime? NextBillingDate { get; set; } + public DateTime NextBillingDate { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// /// The payer determines the entity financially responsible for the bill. diff --git a/src/Stripe.net/Entities/V2/Billing/Cadences/CadenceBillingCycleDayTime.cs b/src/Stripe.net/Entities/V2/Billing/Cadences/CadenceBillingCycleDayTime.cs index 056ba1ad9c..bc6b77ba96 100644 --- a/src/Stripe.net/Entities/V2/Billing/Cadences/CadenceBillingCycleDayTime.cs +++ b/src/Stripe.net/Entities/V2/Billing/Cadences/CadenceBillingCycleDayTime.cs @@ -36,6 +36,6 @@ public class CadenceBillingCycleDayTime : StripeEntity #endif public long DayOfMonth { get; set; } - /// - /// The month to anchor the billing on for a type="month" billing cycle from 1-12. - /// Occurrences are calculated from the month anchor. - /// - [JsonProperty("month_of_year")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("month_of_year")] -#endif - public long? MonthOfYear { get; set; } - /// /// The time at which the billing cycle ends. /// diff --git a/src/Stripe.net/Entities/V2/Billing/Cadences/CadenceBillingCycleMonthTime.cs b/src/Stripe.net/Entities/V2/Billing/Cadences/CadenceBillingCycleMonthTime.cs index 33f8a0ad2b..695ff998d0 100644 --- a/src/Stripe.net/Entities/V2/Billing/Cadences/CadenceBillingCycleMonthTime.cs +++ b/src/Stripe.net/Entities/V2/Billing/Cadences/CadenceBillingCycleMonthTime.cs @@ -36,6 +36,6 @@ public class CadenceBillingCycleMonthTime : StripeEntity Konbini { get; set; } /// /// This sub-hash contains details about the SEPA Direct Debit payment method options. @@ -61,7 +62,7 @@ public class CollectionSettingVersionPaymentMethodOptions : StripeEntity SepaDebit { get; set; } /// /// This sub-hash contains details about the ACH direct debit payment method options. diff --git a/src/Stripe.net/Entities/V2/Billing/CollectionSettingVersions/CollectionSettingVersionPaymentMethodOptionsCardMandateOptions.cs b/src/Stripe.net/Entities/V2/Billing/CollectionSettingVersions/CollectionSettingVersionPaymentMethodOptionsCardMandateOptions.cs index 24a0082bdf..63c7c8fcb6 100644 --- a/src/Stripe.net/Entities/V2/Billing/CollectionSettingVersions/CollectionSettingVersionPaymentMethodOptionsCardMandateOptions.cs +++ b/src/Stripe.net/Entities/V2/Billing/CollectionSettingVersions/CollectionSettingVersionPaymentMethodOptionsCardMandateOptions.cs @@ -15,7 +15,7 @@ public class CollectionSettingVersionPaymentMethodOptionsCardMandateOptions : St #if NET6_0_OR_GREATER [STJS.JsonPropertyName("amount")] #endif - public long? Amount { get; set; } + public long Amount { get; set; } /// /// The AmountType for the mandate. One of fixed or maximum. diff --git a/src/Stripe.net/Entities/V2/Billing/CollectionSettingVersions/CollectionSettingVersionPaymentMethodOptionsKonbini.cs b/src/Stripe.net/Entities/V2/Billing/CollectionSettingVersions/CollectionSettingVersionPaymentMethodOptionsKonbini.cs deleted file mode 100644 index 210573d833..0000000000 --- a/src/Stripe.net/Entities/V2/Billing/CollectionSettingVersions/CollectionSettingVersionPaymentMethodOptionsKonbini.cs +++ /dev/null @@ -1,7 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.V2.Billing -{ - public class CollectionSettingVersionPaymentMethodOptionsKonbini : StripeEntity - { - } -} diff --git a/src/Stripe.net/Entities/V2/Billing/CollectionSettingVersions/CollectionSettingVersionPaymentMethodOptionsSepaDebit.cs b/src/Stripe.net/Entities/V2/Billing/CollectionSettingVersions/CollectionSettingVersionPaymentMethodOptionsSepaDebit.cs deleted file mode 100644 index c89f5b2e4f..0000000000 --- a/src/Stripe.net/Entities/V2/Billing/CollectionSettingVersions/CollectionSettingVersionPaymentMethodOptionsSepaDebit.cs +++ /dev/null @@ -1,7 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.V2.Billing -{ - public class CollectionSettingVersionPaymentMethodOptionsSepaDebit : StripeEntity - { - } -} diff --git a/src/Stripe.net/Entities/V2/Billing/CollectionSettings/CollectionSettingPaymentMethodOptions.cs b/src/Stripe.net/Entities/V2/Billing/CollectionSettings/CollectionSettingPaymentMethodOptions.cs index 80a2c675a5..1b9a3d787b 100644 --- a/src/Stripe.net/Entities/V2/Billing/CollectionSettings/CollectionSettingPaymentMethodOptions.cs +++ b/src/Stripe.net/Entities/V2/Billing/CollectionSettings/CollectionSettingPaymentMethodOptions.cs @@ -1,6 +1,7 @@ // File generated from our OpenAPI spec namespace Stripe.V2.Billing { + using System.Collections.Generic; using Newtonsoft.Json; #if NET6_0_OR_GREATER using STJS = System.Text.Json.Serialization; @@ -52,7 +53,7 @@ public class CollectionSettingPaymentMethodOptions : StripeEntity Konbini { get; set; } /// /// This sub-hash contains details about the SEPA Direct Debit payment method options. @@ -61,7 +62,7 @@ public class CollectionSettingPaymentMethodOptions : StripeEntity SepaDebit { get; set; } /// /// This sub-hash contains details about the ACH direct debit payment method options. diff --git a/src/Stripe.net/Entities/V2/Billing/CollectionSettings/CollectionSettingPaymentMethodOptionsCardMandateOptions.cs b/src/Stripe.net/Entities/V2/Billing/CollectionSettings/CollectionSettingPaymentMethodOptionsCardMandateOptions.cs index 05a993e08d..33a25f5792 100644 --- a/src/Stripe.net/Entities/V2/Billing/CollectionSettings/CollectionSettingPaymentMethodOptionsCardMandateOptions.cs +++ b/src/Stripe.net/Entities/V2/Billing/CollectionSettings/CollectionSettingPaymentMethodOptionsCardMandateOptions.cs @@ -15,7 +15,7 @@ public class CollectionSettingPaymentMethodOptionsCardMandateOptions : StripeEnt #if NET6_0_OR_GREATER [STJS.JsonPropertyName("amount")] #endif - public long? Amount { get; set; } + public long Amount { get; set; } /// /// The AmountType for the mandate. One of fixed or maximum. diff --git a/src/Stripe.net/Entities/V2/Billing/CollectionSettings/CollectionSettingPaymentMethodOptionsKonbini.cs b/src/Stripe.net/Entities/V2/Billing/CollectionSettings/CollectionSettingPaymentMethodOptionsKonbini.cs deleted file mode 100644 index e8f748cccd..0000000000 --- a/src/Stripe.net/Entities/V2/Billing/CollectionSettings/CollectionSettingPaymentMethodOptionsKonbini.cs +++ /dev/null @@ -1,7 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.V2.Billing -{ - public class CollectionSettingPaymentMethodOptionsKonbini : StripeEntity - { - } -} diff --git a/src/Stripe.net/Entities/V2/Billing/CollectionSettings/CollectionSettingPaymentMethodOptionsSepaDebit.cs b/src/Stripe.net/Entities/V2/Billing/CollectionSettings/CollectionSettingPaymentMethodOptionsSepaDebit.cs deleted file mode 100644 index e632854299..0000000000 --- a/src/Stripe.net/Entities/V2/Billing/CollectionSettings/CollectionSettingPaymentMethodOptionsSepaDebit.cs +++ /dev/null @@ -1,7 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.V2.Billing -{ - public class CollectionSettingPaymentMethodOptionsSepaDebit : StripeEntity - { - } -} diff --git a/src/Stripe.net/Entities/V2/Billing/IntentActions/IntentActionApplyInvoiceDiscountRulePercentOff.cs b/src/Stripe.net/Entities/V2/Billing/IntentActions/IntentActionApplyInvoiceDiscountRulePercentOff.cs index b5325cebad..e1347611c7 100644 --- a/src/Stripe.net/Entities/V2/Billing/IntentActions/IntentActionApplyInvoiceDiscountRulePercentOff.cs +++ b/src/Stripe.net/Entities/V2/Billing/IntentActions/IntentActionApplyInvoiceDiscountRulePercentOff.cs @@ -25,6 +25,6 @@ public class IntentActionApplyInvoiceDiscountRulePercentOff : StripeEntity /// When the deactivate action will take effect. - /// One of: current_billing_period_end, current_billing_period_start, - /// on_reserve, or timestamp. + /// One of: current_billing_period_start, on_reserve, or timestamp. /// [JsonProperty("type")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/V2/Billing/IntentActions/IntentActionModifyEffectiveAt.cs b/src/Stripe.net/Entities/V2/Billing/IntentActions/IntentActionModifyEffectiveAt.cs index 2d2c560a4c..6b6cb3bd4e 100644 --- a/src/Stripe.net/Entities/V2/Billing/IntentActions/IntentActionModifyEffectiveAt.cs +++ b/src/Stripe.net/Entities/V2/Billing/IntentActions/IntentActionModifyEffectiveAt.cs @@ -17,7 +17,7 @@ public class IntentActionModifyEffectiveAt : StripeEntity /// When the modify action will take effect. diff --git a/src/Stripe.net/Entities/V2/Billing/IntentActions/IntentActionModifyPricingPlanSubscriptionDetailsComponentConfiguration.cs b/src/Stripe.net/Entities/V2/Billing/IntentActions/IntentActionModifyPricingPlanSubscriptionDetailsComponentConfiguration.cs index 68bdd7cc2a..c7d053b8f9 100644 --- a/src/Stripe.net/Entities/V2/Billing/IntentActions/IntentActionModifyPricingPlanSubscriptionDetailsComponentConfiguration.cs +++ b/src/Stripe.net/Entities/V2/Billing/IntentActions/IntentActionModifyPricingPlanSubscriptionDetailsComponentConfiguration.cs @@ -15,7 +15,7 @@ public class IntentActionModifyPricingPlanSubscriptionDetailsComponentConfigurat #if NET6_0_OR_GREATER [STJS.JsonPropertyName("quantity")] #endif - public long? Quantity { get; set; } + public long Quantity { get; set; } /// /// Lookup key for the pricing plan component. diff --git a/src/Stripe.net/Entities/V2/Billing/IntentActions/IntentActionSubscribeEffectiveAt.cs b/src/Stripe.net/Entities/V2/Billing/IntentActions/IntentActionSubscribeEffectiveAt.cs index 57a8e3fec9..f069ea1bb3 100644 --- a/src/Stripe.net/Entities/V2/Billing/IntentActions/IntentActionSubscribeEffectiveAt.cs +++ b/src/Stripe.net/Entities/V2/Billing/IntentActions/IntentActionSubscribeEffectiveAt.cs @@ -17,7 +17,7 @@ public class IntentActionSubscribeEffectiveAt : StripeEntity /// When the subscribe action will take effect. diff --git a/src/Stripe.net/Entities/V2/Billing/IntentActions/IntentActionSubscribePricingPlanSubscriptionDetailsComponentConfiguration.cs b/src/Stripe.net/Entities/V2/Billing/IntentActions/IntentActionSubscribePricingPlanSubscriptionDetailsComponentConfiguration.cs index 2d2b6ae464..2379009531 100644 --- a/src/Stripe.net/Entities/V2/Billing/IntentActions/IntentActionSubscribePricingPlanSubscriptionDetailsComponentConfiguration.cs +++ b/src/Stripe.net/Entities/V2/Billing/IntentActions/IntentActionSubscribePricingPlanSubscriptionDetailsComponentConfiguration.cs @@ -15,7 +15,7 @@ public class IntentActionSubscribePricingPlanSubscriptionDetailsComponentConfigu #if NET6_0_OR_GREATER [STJS.JsonPropertyName("quantity")] #endif - public long? Quantity { get; set; } + public long Quantity { get; set; } /// /// Lookup key for the pricing plan component. diff --git a/src/Stripe.net/Entities/V2/Billing/IntentActions/IntentActionSubscribeV1SubscriptionDetailsItem.cs b/src/Stripe.net/Entities/V2/Billing/IntentActions/IntentActionSubscribeV1SubscriptionDetailsItem.cs index 9c3d529eb6..09eb8bac9b 100644 --- a/src/Stripe.net/Entities/V2/Billing/IntentActions/IntentActionSubscribeV1SubscriptionDetailsItem.cs +++ b/src/Stripe.net/Entities/V2/Billing/IntentActions/IntentActionSubscribeV1SubscriptionDetailsItem.cs @@ -35,6 +35,6 @@ public class IntentActionSubscribeV1SubscriptionDetailsItem : StripeEntity #if NET6_0_OR_GREATER [STJS.JsonPropertyName("canceled_at")] #endif - public DateTime? CanceledAt { get; set; } + public DateTime CanceledAt { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// /// Time at which the Billing Intent was committed. @@ -25,7 +25,7 @@ public class IntentStatusTransitions : StripeEntity #if NET6_0_OR_GREATER [STJS.JsonPropertyName("committed_at")] #endif - public DateTime? CommittedAt { get; set; } + public DateTime CommittedAt { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// /// Time at which the Billing Intent was drafted. @@ -34,7 +34,7 @@ public class IntentStatusTransitions : StripeEntity #if NET6_0_OR_GREATER [STJS.JsonPropertyName("drafted_at")] #endif - public DateTime? DraftedAt { get; set; } + public DateTime DraftedAt { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// /// Time at which the Billing Intent was reserved. @@ -43,6 +43,6 @@ public class IntentStatusTransitions : StripeEntity #if NET6_0_OR_GREATER [STJS.JsonPropertyName("reserved_at")] #endif - public DateTime? ReservedAt { get; set; } + public DateTime ReservedAt { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; } } diff --git a/src/Stripe.net/Entities/V2/Billing/LicenseFeeVersions/LicenseFeeVersionTier.cs b/src/Stripe.net/Entities/V2/Billing/LicenseFeeVersions/LicenseFeeVersionTier.cs index 652eef640b..0caddb61f7 100644 --- a/src/Stripe.net/Entities/V2/Billing/LicenseFeeVersions/LicenseFeeVersionTier.cs +++ b/src/Stripe.net/Entities/V2/Billing/LicenseFeeVersions/LicenseFeeVersionTier.cs @@ -36,7 +36,7 @@ public class LicenseFeeVersionTier : StripeEntity #if NET6_0_OR_GREATER [STJS.JsonPropertyName("up_to_decimal")] #endif - public string UpToDecimal { get; set; } + public decimal UpToDecimal { get; set; } /// /// No upper bound to this tier. Only one of up_to_decimal and up_to_inf may diff --git a/src/Stripe.net/Entities/V2/Billing/LicenseFees/LicenseFee.cs b/src/Stripe.net/Entities/V2/Billing/LicenseFees/LicenseFee.cs index 58a10bf3fc..4c6d498e22 100644 --- a/src/Stripe.net/Entities/V2/Billing/LicenseFees/LicenseFee.cs +++ b/src/Stripe.net/Entities/V2/Billing/LicenseFees/LicenseFee.cs @@ -78,7 +78,8 @@ public class LicenseFee : StripeEntity, IHasId, IHasMetadata, IHasOb public string LatestVersion { get; set; } /// - /// The Licensed Item that this License Fee binds to. + /// A Licensed Item represents a billable item whose pricing is based on license fees. You + /// can use license fees to specify the pricing and create subscriptions to these items. /// [JsonProperty("licensed_item")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/V2/Billing/LicenseFees/LicenseFeeTier.cs b/src/Stripe.net/Entities/V2/Billing/LicenseFees/LicenseFeeTier.cs index 371f711656..b279e7f1d4 100644 --- a/src/Stripe.net/Entities/V2/Billing/LicenseFees/LicenseFeeTier.cs +++ b/src/Stripe.net/Entities/V2/Billing/LicenseFees/LicenseFeeTier.cs @@ -36,7 +36,7 @@ public class LicenseFeeTier : StripeEntity #if NET6_0_OR_GREATER [STJS.JsonPropertyName("up_to_decimal")] #endif - public string UpToDecimal { get; set; } + public decimal UpToDecimal { get; set; } /// /// No upper bound to this tier. Only one of up_to_decimal and up_to_inf may diff --git a/src/Stripe.net/Entities/V2/Billing/PricingPlanSubscriptions/PricingPlanSubscriptionServicingStatusTransitions.cs b/src/Stripe.net/Entities/V2/Billing/PricingPlanSubscriptions/PricingPlanSubscriptionServicingStatusTransitions.cs index c85226072e..569e405f85 100644 --- a/src/Stripe.net/Entities/V2/Billing/PricingPlanSubscriptions/PricingPlanSubscriptionServicingStatusTransitions.cs +++ b/src/Stripe.net/Entities/V2/Billing/PricingPlanSubscriptions/PricingPlanSubscriptionServicingStatusTransitions.cs @@ -34,23 +34,5 @@ public class PricingPlanSubscriptionServicingStatusTransitions : StripeEntity - /// When the servicing is scheduled to transition to activate. - /// - [JsonProperty("will_activate_at")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("will_activate_at")] -#endif - public string WillActivateAt { get; set; } - - /// - /// When the servicing is scheduled to cancel. - /// - [JsonProperty("will_cancel_at")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("will_cancel_at")] -#endif - public string WillCancelAt { get; set; } } } diff --git a/src/Stripe.net/Entities/V2/Billing/PricingPlanVersions/PricingPlanVersion.cs b/src/Stripe.net/Entities/V2/Billing/PricingPlanVersions/PricingPlanVersion.cs index f2d412fd8b..be285e7b78 100644 --- a/src/Stripe.net/Entities/V2/Billing/PricingPlanVersions/PricingPlanVersion.cs +++ b/src/Stripe.net/Entities/V2/Billing/PricingPlanVersions/PricingPlanVersion.cs @@ -44,7 +44,7 @@ public class PricingPlanVersion : StripeEntity, IHasId, IHas #if NET6_0_OR_GREATER [STJS.JsonPropertyName("end_date")] #endif - public DateTime? EndDate { get; set; } + public DateTime EndDate { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// /// Has the value true if the object exists in live mode or the value false if diff --git a/src/Stripe.net/Entities/V2/Billing/RateCardRates/RateCardRate.cs b/src/Stripe.net/Entities/V2/Billing/RateCardRates/RateCardRate.cs index 04f2442620..450ef6fe4b 100644 --- a/src/Stripe.net/Entities/V2/Billing/RateCardRates/RateCardRate.cs +++ b/src/Stripe.net/Entities/V2/Billing/RateCardRates/RateCardRate.cs @@ -69,7 +69,9 @@ public class RateCardRate : StripeEntity, IHasId, IHasMetadata, IH public Dictionary Metadata { get; set; } /// - /// The Metered Item that this rate binds to. + /// A Metered Item represents a billable item whose pricing is based on usage, measured by a + /// meter. You can use rate cards to specify the pricing and create subscriptions to these + /// items. /// [JsonProperty("metered_item")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/V2/Billing/RateCardRates/RateCardRateTier.cs b/src/Stripe.net/Entities/V2/Billing/RateCardRates/RateCardRateTier.cs index 05bab16512..13ea40ab12 100644 --- a/src/Stripe.net/Entities/V2/Billing/RateCardRates/RateCardRateTier.cs +++ b/src/Stripe.net/Entities/V2/Billing/RateCardRates/RateCardRateTier.cs @@ -36,7 +36,7 @@ public class RateCardRateTier : StripeEntity #if NET6_0_OR_GREATER [STJS.JsonPropertyName("up_to_decimal")] #endif - public string UpToDecimal { get; set; } + public decimal UpToDecimal { get; set; } /// /// No upper bound to this tier. Only one of up_to_decimal and up_to_inf may diff --git a/src/Stripe.net/Entities/V2/Billing/RateCardSubscriptions/RateCardSubscriptionServicingStatusTransitions.cs b/src/Stripe.net/Entities/V2/Billing/RateCardSubscriptions/RateCardSubscriptionServicingStatusTransitions.cs index f5cde657d6..01dbb69b2c 100644 --- a/src/Stripe.net/Entities/V2/Billing/RateCardSubscriptions/RateCardSubscriptionServicingStatusTransitions.cs +++ b/src/Stripe.net/Entities/V2/Billing/RateCardSubscriptions/RateCardSubscriptionServicingStatusTransitions.cs @@ -34,23 +34,5 @@ public class RateCardSubscriptionServicingStatusTransitions : StripeEntity - /// When the servicing is scheduled to transition to activate. - /// - [JsonProperty("will_activate_at")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("will_activate_at")] -#endif - public string WillActivateAt { get; set; } - - /// - /// When the servicing is scheduled to cancel. - /// - [JsonProperty("will_cancel_at")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("will_cancel_at")] -#endif - public string WillCancelAt { get; set; } } } diff --git a/src/Stripe.net/Entities/V2/Billing/ServiceActions/ServiceActionCreditGrant.cs b/src/Stripe.net/Entities/V2/Billing/ServiceActions/ServiceActionCreditGrant.cs index a0f09c9023..1d2921acac 100644 --- a/src/Stripe.net/Entities/V2/Billing/ServiceActions/ServiceActionCreditGrant.cs +++ b/src/Stripe.net/Entities/V2/Billing/ServiceActions/ServiceActionCreditGrant.cs @@ -26,16 +26,6 @@ public class ServiceActionCreditGrant : StripeEntity #endif public ServiceActionCreditGrantApplicabilityConfig ApplicabilityConfig { get; set; } - /// - /// The category of the credit grant. - /// One of: paid, or promotional. - /// - [JsonProperty("category")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("category")] -#endif - public string Category { get; set; } - /// /// The expiry configuration for the credit grant. /// @@ -53,15 +43,5 @@ public class ServiceActionCreditGrant : StripeEntity [STJS.JsonPropertyName("name")] #endif public string Name { get; set; } - - /// - /// The desired priority for applying this credit grant. If not specified, it will be set to - /// the default value of 50. The highest priority is 0 and the lowest is 100. - /// - [JsonProperty("priority")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("priority")] -#endif - public long? Priority { get; set; } } } diff --git a/src/Stripe.net/Entities/V2/Billing/ServiceActions/ServiceActionCreditGrantAmountCustomPricingUnit.cs b/src/Stripe.net/Entities/V2/Billing/ServiceActions/ServiceActionCreditGrantAmountCustomPricingUnit.cs index c521e2be7e..5adf4b46af 100644 --- a/src/Stripe.net/Entities/V2/Billing/ServiceActions/ServiceActionCreditGrantAmountCustomPricingUnit.cs +++ b/src/Stripe.net/Entities/V2/Billing/ServiceActions/ServiceActionCreditGrantAmountCustomPricingUnit.cs @@ -24,6 +24,6 @@ public class ServiceActionCreditGrantAmountCustomPricingUnit : StripeEntity - /// The category of the credit grant. - /// One of: paid, or promotional. - /// - [JsonProperty("category")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("category")] -#endif - public string Category { get; set; } - /// /// The expiry configuration for the credit grant. /// @@ -53,15 +43,5 @@ public class ServiceActionCreditGrantPerTenant : StripeEntity - /// The desired priority for applying this credit grant. If not specified, it will be set to - /// the default value of 50. The highest priority is 0 and the lowest is 100. - /// - [JsonProperty("priority")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("priority")] -#endif - public long? Priority { get; set; } } } diff --git a/src/Stripe.net/Entities/V2/Billing/ServiceActions/ServiceActionCreditGrantPerTenantAmountCustomPricingUnit.cs b/src/Stripe.net/Entities/V2/Billing/ServiceActions/ServiceActionCreditGrantPerTenantAmountCustomPricingUnit.cs index 1b06f1fa4f..0dc5368eea 100644 --- a/src/Stripe.net/Entities/V2/Billing/ServiceActions/ServiceActionCreditGrantPerTenantAmountCustomPricingUnit.cs +++ b/src/Stripe.net/Entities/V2/Billing/ServiceActions/ServiceActionCreditGrantPerTenantAmountCustomPricingUnit.cs @@ -24,6 +24,6 @@ public class ServiceActionCreditGrantPerTenantAmountCustomPricingUnit : StripeEn #if NET6_0_OR_GREATER [STJS.JsonPropertyName("value")] #endif - public string Value { get; set; } + public decimal Value { get; set; } } } diff --git a/src/Stripe.net/Entities/V2/Core/Persons/Person.cs b/src/Stripe.net/Entities/V2/Core/AccountPersons/AccountPerson.cs similarity index 64% rename from src/Stripe.net/Entities/V2/Core/Persons/Person.cs rename to src/Stripe.net/Entities/V2/Core/AccountPersons/AccountPerson.cs index f7289b3bb1..fb21623590 100644 --- a/src/Stripe.net/Entities/V2/Core/Persons/Person.cs +++ b/src/Stripe.net/Entities/V2/Core/AccountPersons/AccountPerson.cs @@ -11,7 +11,7 @@ namespace Stripe.V2.Core /// /// Person retrieval response schema. /// - public class Person : StripeEntity, IHasId, IHasMetadata, IHasObject + public class AccountPerson : StripeEntity, IHasId, IHasMetadata, IHasObject { /// /// Unique identifier for the Person. @@ -48,7 +48,7 @@ public class Person : StripeEntity, IHasId, IHasMetadata, IHasObject #if NET6_0_OR_GREATER [STJS.JsonPropertyName("additional_addresses")] #endif - public List AdditionalAddresses { get; set; } + public List AdditionalAddresses { get; set; } /// /// Additional names (e.g. aliases) associated with the person. @@ -57,7 +57,7 @@ public class Person : StripeEntity, IHasId, IHasMetadata, IHasObject #if NET6_0_OR_GREATER [STJS.JsonPropertyName("additional_names")] #endif - public List AdditionalNames { get; set; } + public List AdditionalNames { get; set; } /// /// Attestations of accepted terms of service agreements. @@ -66,7 +66,7 @@ public class Person : StripeEntity, IHasId, IHasMetadata, IHasObject #if NET6_0_OR_GREATER [STJS.JsonPropertyName("additional_terms_of_service")] #endif - public PersonAdditionalTermsOfService AdditionalTermsOfService { get; set; } + public AccountPersonAdditionalTermsOfService AdditionalTermsOfService { get; set; } /// /// The person's residential address. @@ -75,7 +75,7 @@ public class Person : StripeEntity, IHasId, IHasMetadata, IHasObject #if NET6_0_OR_GREATER [STJS.JsonPropertyName("address")] #endif - public PersonAddress Address { get; set; } + public AccountPersonAddress Address { get; set; } /// /// Time at which the object was created. Represented as a RFC 3339 date & time UTC @@ -94,7 +94,7 @@ public class Person : StripeEntity, IHasId, IHasMetadata, IHasObject #if NET6_0_OR_GREATER [STJS.JsonPropertyName("date_of_birth")] #endif - public PersonDateOfBirth DateOfBirth { get; set; } + public AccountPersonDateOfBirth DateOfBirth { get; set; } /// /// Documents that may be submitted to satisfy various informational requests. @@ -103,7 +103,7 @@ public class Person : StripeEntity, IHasId, IHasMetadata, IHasObject #if NET6_0_OR_GREATER [STJS.JsonPropertyName("documents")] #endif - public PersonDocuments Documents { get; set; } + public AccountPersonDocuments Documents { get; set; } /// /// The person's email address. @@ -130,7 +130,7 @@ public class Person : StripeEntity, IHasId, IHasMetadata, IHasObject #if NET6_0_OR_GREATER [STJS.JsonPropertyName("id_numbers")] #endif - public List IdNumbers { get; set; } + public List IdNumbers { get; set; } /// /// The person's gender (International regulations require either "male" or "female"). @@ -165,38 +165,6 @@ public class Person : StripeEntity, IHasId, IHasMetadata, IHasObject /// /// The countries where the person is a national. Two-letter country code (ISO 3166-1 alpha-2). - /// One of: ad, ae, af, ag, ai, al, am, - /// ao, aq, ar, as, at, au, aw, ax, - /// az, ba, bb, bd, be, bf, bg, bh, - /// bi, bj, bl, bm, bn, bo, bq, br, - /// bs, bt, bv, bw, by, bz, ca, cc, - /// cd, cf, cg, ch, ci, ck, cl, cm, - /// cn, co, cr, cu, cv, cw, cx, cy, - /// cz, de, dj, dk, dm, do, dz, ec, - /// ee, eg, eh, er, es, et, fi, fj, - /// fk, fm, fo, fr, ga, gb, gd, ge, - /// gf, gg, gh, gi, gl, gm, gn, gp, - /// gq, gr, gs, gt, gu, gw, gy, hk, - /// hm, hn, hr, ht, hu, id, ie, il, - /// im, in, io, iq, ir, is, it, je, - /// jm, jo, jp, ke, kg, kh, ki, km, - /// kn, kp, kr, kw, ky, kz, la, lb, - /// lc, li, lk, lr, ls, lt, lu, lv, - /// ly, ma, mc, md, me, mf, mg, mh, - /// mk, ml, mm, mn, mo, mp, mq, mr, - /// ms, mt, mu, mv, mw, mx, my, mz, - /// na, nc, ne, nf, ng, ni, nl, no, - /// np, nr, nu, nz, om, pa, pe, pf, - /// pg, ph, pk, pl, pm, pn, pr, ps, - /// pt, pw, py, qa, qz, re, ro, rs, - /// ru, rw, sa, sb, sc, sd, se, sg, - /// sh, si, sj, sk, sl, sm, sn, so, - /// sr, ss, st, sv, sx, sy, sz, tc, - /// td, tf, tg, th, tj, tk, tl, tm, - /// tn, to, tr, tt, tv, tw, tz, ua, - /// ug, um, us, uy, uz, va, vc, ve, - /// vg, vi, vn, vu, wf, ws, xx, ye, - /// yt, za, zm, or zw. /// [JsonProperty("nationalities")] #if NET6_0_OR_GREATER @@ -230,7 +198,7 @@ public class Person : StripeEntity, IHasId, IHasMetadata, IHasObject #if NET6_0_OR_GREATER [STJS.JsonPropertyName("relationship")] #endif - public PersonRelationship Relationship { get; set; } + public AccountPersonRelationship Relationship { get; set; } /// /// The script addresses (e.g., non-Latin characters) associated with the person. @@ -239,7 +207,7 @@ public class Person : StripeEntity, IHasId, IHasMetadata, IHasObject #if NET6_0_OR_GREATER [STJS.JsonPropertyName("script_addresses")] #endif - public PersonScriptAddresses ScriptAddresses { get; set; } + public AccountPersonScriptAddresses ScriptAddresses { get; set; } /// /// The script names (e.g. non-Latin characters) associated with the person. @@ -248,7 +216,7 @@ public class Person : StripeEntity, IHasId, IHasMetadata, IHasObject #if NET6_0_OR_GREATER [STJS.JsonPropertyName("script_names")] #endif - public PersonScriptNames ScriptNames { get; set; } + public AccountPersonScriptNames ScriptNames { get; set; } /// /// The person's last name. diff --git a/src/Stripe.net/Entities/V2/Core/AccountPersons/AccountPersonAdditionalAddress.cs b/src/Stripe.net/Entities/V2/Core/AccountPersons/AccountPersonAdditionalAddress.cs new file mode 100644 index 0000000000..876fbc68c9 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/AccountPersons/AccountPersonAdditionalAddress.cs @@ -0,0 +1,84 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountPersonAdditionalAddress : StripeEntity + { + /// + /// City, district, suburb, town, or village. + /// + [JsonProperty("city")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("city")] +#endif + public string City { get; set; } + + /// + /// Two-letter country code (ISO + /// 3166-1 alpha-2). + /// + [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif + public string Country { get; set; } + + /// + /// Address line 1 (e.g., street, PO Box, or company name). + /// + [JsonProperty("line1")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("line1")] +#endif + public string Line1 { get; set; } + + /// + /// Address line 2 (e.g., apartment, suite, unit, or building). + /// + [JsonProperty("line2")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("line2")] +#endif + public string Line2 { get; set; } + + /// + /// ZIP or postal code. + /// + [JsonProperty("postal_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("postal_code")] +#endif + public string PostalCode { get; set; } + + /// + /// Purpose of additional address. + /// + [JsonProperty("purpose")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("purpose")] +#endif + public string Purpose { get; set; } + + /// + /// State, county, province, or region. + /// + [JsonProperty("state")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("state")] +#endif + public string State { get; set; } + + /// + /// Town or cho-me. + /// + [JsonProperty("town")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("town")] +#endif + public string Town { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Persons/PersonAdditionalName.cs b/src/Stripe.net/Entities/V2/Core/AccountPersons/AccountPersonAdditionalName.cs similarity index 93% rename from src/Stripe.net/Entities/V2/Core/Persons/PersonAdditionalName.cs rename to src/Stripe.net/Entities/V2/Core/AccountPersons/AccountPersonAdditionalName.cs index d507a4202c..ea0835c066 100644 --- a/src/Stripe.net/Entities/V2/Core/Persons/PersonAdditionalName.cs +++ b/src/Stripe.net/Entities/V2/Core/AccountPersons/AccountPersonAdditionalName.cs @@ -6,7 +6,7 @@ namespace Stripe.V2.Core using STJS = System.Text.Json.Serialization; #endif - public class PersonAdditionalName : StripeEntity + public class AccountPersonAdditionalName : StripeEntity { /// /// The individual's full name. diff --git a/src/Stripe.net/Entities/V2/Core/Persons/PersonAdditionalTermsOfService.cs b/src/Stripe.net/Entities/V2/Core/AccountPersons/AccountPersonAdditionalTermsOfService.cs similarity index 66% rename from src/Stripe.net/Entities/V2/Core/Persons/PersonAdditionalTermsOfService.cs rename to src/Stripe.net/Entities/V2/Core/AccountPersons/AccountPersonAdditionalTermsOfService.cs index 62dbfa79dc..8864e9ec1e 100644 --- a/src/Stripe.net/Entities/V2/Core/Persons/PersonAdditionalTermsOfService.cs +++ b/src/Stripe.net/Entities/V2/Core/AccountPersons/AccountPersonAdditionalTermsOfService.cs @@ -6,7 +6,7 @@ namespace Stripe.V2.Core using STJS = System.Text.Json.Serialization; #endif - public class PersonAdditionalTermsOfService : StripeEntity + public class AccountPersonAdditionalTermsOfService : StripeEntity { /// /// Stripe terms of service agreement. @@ -15,6 +15,6 @@ public class PersonAdditionalTermsOfService : StripeEntity + public class AccountPersonAdditionalTermsOfServiceAccount : StripeEntity { /// /// The time when the Account's representative accepted the terms of service. Represented as @@ -18,7 +18,7 @@ public class PersonAdditionalTermsOfServiceAccount : StripeEntity /// The IP address from which the Account's representative accepted the terms of service. diff --git a/src/Stripe.net/Entities/V2/Core/AccountPersons/AccountPersonAddress.cs b/src/Stripe.net/Entities/V2/Core/AccountPersons/AccountPersonAddress.cs new file mode 100644 index 0000000000..3e51ef6e43 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/AccountPersons/AccountPersonAddress.cs @@ -0,0 +1,75 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountPersonAddress : StripeEntity + { + /// + /// City, district, suburb, town, or village. + /// + [JsonProperty("city")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("city")] +#endif + public string City { get; set; } + + /// + /// Two-letter country code (ISO + /// 3166-1 alpha-2). + /// + [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif + public string Country { get; set; } + + /// + /// Address line 1 (e.g., street, PO Box, or company name). + /// + [JsonProperty("line1")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("line1")] +#endif + public string Line1 { get; set; } + + /// + /// Address line 2 (e.g., apartment, suite, unit, or building). + /// + [JsonProperty("line2")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("line2")] +#endif + public string Line2 { get; set; } + + /// + /// ZIP or postal code. + /// + [JsonProperty("postal_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("postal_code")] +#endif + public string PostalCode { get; set; } + + /// + /// State, county, province, or region. + /// + [JsonProperty("state")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("state")] +#endif + public string State { get; set; } + + /// + /// Town or cho-me. + /// + [JsonProperty("town")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("town")] +#endif + public string Town { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Persons/PersonDateOfBirth.cs b/src/Stripe.net/Entities/V2/Core/AccountPersons/AccountPersonDateOfBirth.cs similarity index 91% rename from src/Stripe.net/Entities/V2/Core/Persons/PersonDateOfBirth.cs rename to src/Stripe.net/Entities/V2/Core/AccountPersons/AccountPersonDateOfBirth.cs index ec9e997af7..2a4c9cc316 100644 --- a/src/Stripe.net/Entities/V2/Core/Persons/PersonDateOfBirth.cs +++ b/src/Stripe.net/Entities/V2/Core/AccountPersons/AccountPersonDateOfBirth.cs @@ -6,7 +6,7 @@ namespace Stripe.V2.Core using STJS = System.Text.Json.Serialization; #endif - public class PersonDateOfBirth : StripeEntity + public class AccountPersonDateOfBirth : StripeEntity { /// /// The day of birth, between 1 and 31. diff --git a/src/Stripe.net/Entities/V2/Core/Persons/PersonDocuments.cs b/src/Stripe.net/Entities/V2/Core/AccountPersons/AccountPersonDocuments.cs similarity index 76% rename from src/Stripe.net/Entities/V2/Core/Persons/PersonDocuments.cs rename to src/Stripe.net/Entities/V2/Core/AccountPersons/AccountPersonDocuments.cs index 24d0cf583a..d5f64dc7f7 100644 --- a/src/Stripe.net/Entities/V2/Core/Persons/PersonDocuments.cs +++ b/src/Stripe.net/Entities/V2/Core/AccountPersons/AccountPersonDocuments.cs @@ -6,7 +6,7 @@ namespace Stripe.V2.Core using STJS = System.Text.Json.Serialization; #endif - public class PersonDocuments : StripeEntity + public class AccountPersonDocuments : StripeEntity { /// /// One or more documents that demonstrate proof that this person is authorized to represent @@ -16,7 +16,7 @@ public class PersonDocuments : StripeEntity #if NET6_0_OR_GREATER [STJS.JsonPropertyName("company_authorization")] #endif - public PersonDocumentsCompanyAuthorization CompanyAuthorization { get; set; } + public AccountPersonDocumentsCompanyAuthorization CompanyAuthorization { get; set; } /// /// One or more documents showing the person’s passport page with photo and personal data. @@ -25,7 +25,7 @@ public class PersonDocuments : StripeEntity #if NET6_0_OR_GREATER [STJS.JsonPropertyName("passport")] #endif - public PersonDocumentsPassport Passport { get; set; } + public AccountPersonDocumentsPassport Passport { get; set; } /// /// An identifying document showing the person's name, either a passport or local ID card. @@ -34,7 +34,7 @@ public class PersonDocuments : StripeEntity #if NET6_0_OR_GREATER [STJS.JsonPropertyName("primary_verification")] #endif - public PersonDocumentsPrimaryVerification PrimaryVerification { get; set; } + public AccountPersonDocumentsPrimaryVerification PrimaryVerification { get; set; } /// /// A document showing address, either a passport, local ID card, or utility bill from a @@ -44,7 +44,7 @@ public class PersonDocuments : StripeEntity #if NET6_0_OR_GREATER [STJS.JsonPropertyName("secondary_verification")] #endif - public PersonDocumentsSecondaryVerification SecondaryVerification { get; set; } + public AccountPersonDocumentsSecondaryVerification SecondaryVerification { get; set; } /// /// One or more documents showing the person’s visa required for living in the country where @@ -54,6 +54,6 @@ public class PersonDocuments : StripeEntity #if NET6_0_OR_GREATER [STJS.JsonPropertyName("visa")] #endif - public PersonDocumentsVisa Visa { get; set; } + public AccountPersonDocumentsVisa Visa { get; set; } } } diff --git a/src/Stripe.net/Entities/V2/Core/Persons/PersonDocumentsCompanyAuthorization.cs b/src/Stripe.net/Entities/V2/Core/AccountPersons/AccountPersonDocumentsCompanyAuthorization.cs similarity index 88% rename from src/Stripe.net/Entities/V2/Core/Persons/PersonDocumentsCompanyAuthorization.cs rename to src/Stripe.net/Entities/V2/Core/AccountPersons/AccountPersonDocumentsCompanyAuthorization.cs index 2ee668b52c..72720f4dd2 100644 --- a/src/Stripe.net/Entities/V2/Core/Persons/PersonDocumentsCompanyAuthorization.cs +++ b/src/Stripe.net/Entities/V2/Core/AccountPersons/AccountPersonDocumentsCompanyAuthorization.cs @@ -7,7 +7,7 @@ namespace Stripe.V2.Core using STJS = System.Text.Json.Serialization; #endif - public class PersonDocumentsCompanyAuthorization : StripeEntity + public class AccountPersonDocumentsCompanyAuthorization : StripeEntity { /// /// One or more document IDs returned by a + public class AccountPersonDocumentsPassport : StripeEntity { /// /// One or more document IDs returned by a + public class AccountPersonDocumentsPrimaryVerification : StripeEntity { /// /// The file upload @@ -16,7 +16,7 @@ public class PersonDocumentsPrimaryVerification : StripeEntity /// The format of the verification document. Currently supports front_back only. diff --git a/src/Stripe.net/Entities/V2/Core/Persons/PersonDocumentsPrimaryVerificationFrontBack.cs b/src/Stripe.net/Entities/V2/Core/AccountPersons/AccountPersonDocumentsPrimaryVerificationFrontBack.cs similarity index 90% rename from src/Stripe.net/Entities/V2/Core/Persons/PersonDocumentsPrimaryVerificationFrontBack.cs rename to src/Stripe.net/Entities/V2/Core/AccountPersons/AccountPersonDocumentsPrimaryVerificationFrontBack.cs index 9e87603629..d2429abf92 100644 --- a/src/Stripe.net/Entities/V2/Core/Persons/PersonDocumentsPrimaryVerificationFrontBack.cs +++ b/src/Stripe.net/Entities/V2/Core/AccountPersons/AccountPersonDocumentsPrimaryVerificationFrontBack.cs @@ -6,7 +6,7 @@ namespace Stripe.V2.Core using STJS = System.Text.Json.Serialization; #endif - public class PersonDocumentsPrimaryVerificationFrontBack : StripeEntity + public class AccountPersonDocumentsPrimaryVerificationFrontBack : StripeEntity { /// /// A file upload token diff --git a/src/Stripe.net/Entities/V2/Core/Persons/PersonDocumentsSecondaryVerification.cs b/src/Stripe.net/Entities/V2/Core/AccountPersons/AccountPersonDocumentsSecondaryVerification.cs similarity index 78% rename from src/Stripe.net/Entities/V2/Core/Persons/PersonDocumentsSecondaryVerification.cs rename to src/Stripe.net/Entities/V2/Core/AccountPersons/AccountPersonDocumentsSecondaryVerification.cs index b821b8f0cf..8cb8f2a8a2 100644 --- a/src/Stripe.net/Entities/V2/Core/Persons/PersonDocumentsSecondaryVerification.cs +++ b/src/Stripe.net/Entities/V2/Core/AccountPersons/AccountPersonDocumentsSecondaryVerification.cs @@ -6,7 +6,7 @@ namespace Stripe.V2.Core using STJS = System.Text.Json.Serialization; #endif - public class PersonDocumentsSecondaryVerification : StripeEntity + public class AccountPersonDocumentsSecondaryVerification : StripeEntity { /// /// The file upload @@ -16,7 +16,7 @@ public class PersonDocumentsSecondaryVerification : StripeEntity /// The format of the verification document. Currently supports front_back only. diff --git a/src/Stripe.net/Entities/V2/Core/Persons/PersonDocumentsSecondaryVerificationFrontBack.cs b/src/Stripe.net/Entities/V2/Core/AccountPersons/AccountPersonDocumentsSecondaryVerificationFrontBack.cs similarity index 90% rename from src/Stripe.net/Entities/V2/Core/Persons/PersonDocumentsSecondaryVerificationFrontBack.cs rename to src/Stripe.net/Entities/V2/Core/AccountPersons/AccountPersonDocumentsSecondaryVerificationFrontBack.cs index 969001c546..302bf3427e 100644 --- a/src/Stripe.net/Entities/V2/Core/Persons/PersonDocumentsSecondaryVerificationFrontBack.cs +++ b/src/Stripe.net/Entities/V2/Core/AccountPersons/AccountPersonDocumentsSecondaryVerificationFrontBack.cs @@ -6,7 +6,7 @@ namespace Stripe.V2.Core using STJS = System.Text.Json.Serialization; #endif - public class PersonDocumentsSecondaryVerificationFrontBack : StripeEntity + public class AccountPersonDocumentsSecondaryVerificationFrontBack : StripeEntity { /// /// A file upload token diff --git a/src/Stripe.net/Entities/V2/Core/Persons/PersonDocumentsVisa.cs b/src/Stripe.net/Entities/V2/Core/AccountPersons/AccountPersonDocumentsVisa.cs similarity index 91% rename from src/Stripe.net/Entities/V2/Core/Persons/PersonDocumentsVisa.cs rename to src/Stripe.net/Entities/V2/Core/AccountPersons/AccountPersonDocumentsVisa.cs index 4d972ef5f4..6853e6cf1a 100644 --- a/src/Stripe.net/Entities/V2/Core/Persons/PersonDocumentsVisa.cs +++ b/src/Stripe.net/Entities/V2/Core/AccountPersons/AccountPersonDocumentsVisa.cs @@ -7,7 +7,7 @@ namespace Stripe.V2.Core using STJS = System.Text.Json.Serialization; #endif - public class PersonDocumentsVisa : StripeEntity + public class AccountPersonDocumentsVisa : StripeEntity { /// /// One or more document IDs returned by a + public class AccountPersonIdNumber : StripeEntity { /// /// The ID number type of an individual. diff --git a/src/Stripe.net/Entities/V2/Core/Persons/PersonRelationship.cs b/src/Stripe.net/Entities/V2/Core/AccountPersons/AccountPersonRelationship.cs similarity index 86% rename from src/Stripe.net/Entities/V2/Core/Persons/PersonRelationship.cs rename to src/Stripe.net/Entities/V2/Core/AccountPersons/AccountPersonRelationship.cs index d46cb48900..1c3e6bcd0d 100644 --- a/src/Stripe.net/Entities/V2/Core/Persons/PersonRelationship.cs +++ b/src/Stripe.net/Entities/V2/Core/AccountPersons/AccountPersonRelationship.cs @@ -6,7 +6,7 @@ namespace Stripe.V2.Core using STJS = System.Text.Json.Serialization; #endif - public class PersonRelationship : StripeEntity + public class AccountPersonRelationship : StripeEntity { /// /// Whether the individual is an authorizer of the Account’s legal entity. @@ -15,7 +15,7 @@ public class PersonRelationship : StripeEntity #if NET6_0_OR_GREATER [STJS.JsonPropertyName("authorizer")] #endif - public bool? Authorizer { get; set; } + public bool Authorizer { get; set; } /// /// Whether the individual is a director of the Account’s legal entity. Directors are @@ -26,7 +26,7 @@ public class PersonRelationship : StripeEntity #if NET6_0_OR_GREATER [STJS.JsonPropertyName("director")] #endif - public bool? Director { get; set; } + public bool Director { get; set; } /// /// Whether the individual has significant responsibility to control, manage, or direct the @@ -36,7 +36,7 @@ public class PersonRelationship : StripeEntity #if NET6_0_OR_GREATER [STJS.JsonPropertyName("executive")] #endif - public bool? Executive { get; set; } + public bool Executive { get; set; } /// /// Whether the individual is the legal guardian of the Account’s representative. @@ -45,7 +45,7 @@ public class PersonRelationship : StripeEntity #if NET6_0_OR_GREATER [STJS.JsonPropertyName("legal_guardian")] #endif - public bool? LegalGuardian { get; set; } + public bool LegalGuardian { get; set; } /// /// Whether the individual is an owner of the Account’s legal entity. @@ -54,7 +54,7 @@ public class PersonRelationship : StripeEntity #if NET6_0_OR_GREATER [STJS.JsonPropertyName("owner")] #endif - public bool? Owner { get; set; } + public bool Owner { get; set; } /// /// The percent owned by the individual of the Account’s legal entity. @@ -63,7 +63,7 @@ public class PersonRelationship : StripeEntity #if NET6_0_OR_GREATER [STJS.JsonPropertyName("percent_ownership")] #endif - public string PercentOwnership { get; set; } + public decimal PercentOwnership { get; set; } /// /// Whether the individual is authorized as the primary representative of the Account. This @@ -76,7 +76,7 @@ public class PersonRelationship : StripeEntity #if NET6_0_OR_GREATER [STJS.JsonPropertyName("representative")] #endif - public bool? Representative { get; set; } + public bool Representative { get; set; } /// /// The individual's title (e.g., CEO, Support Engineer). diff --git a/src/Stripe.net/Entities/V2/Core/Persons/PersonScriptAddresses.cs b/src/Stripe.net/Entities/V2/Core/AccountPersons/AccountPersonScriptAddresses.cs similarity index 70% rename from src/Stripe.net/Entities/V2/Core/Persons/PersonScriptAddresses.cs rename to src/Stripe.net/Entities/V2/Core/AccountPersons/AccountPersonScriptAddresses.cs index 343868e952..9be684f0ab 100644 --- a/src/Stripe.net/Entities/V2/Core/Persons/PersonScriptAddresses.cs +++ b/src/Stripe.net/Entities/V2/Core/AccountPersons/AccountPersonScriptAddresses.cs @@ -6,7 +6,7 @@ namespace Stripe.V2.Core using STJS = System.Text.Json.Serialization; #endif - public class PersonScriptAddresses : StripeEntity + public class AccountPersonScriptAddresses : StripeEntity { /// /// Kana Address. @@ -15,7 +15,7 @@ public class PersonScriptAddresses : StripeEntity #if NET6_0_OR_GREATER [STJS.JsonPropertyName("kana")] #endif - public PersonScriptAddressesKana Kana { get; set; } + public AccountPersonScriptAddressesKana Kana { get; set; } /// /// Kanji Address. @@ -24,6 +24,6 @@ public class PersonScriptAddresses : StripeEntity #if NET6_0_OR_GREATER [STJS.JsonPropertyName("kanji")] #endif - public PersonScriptAddressesKanji Kanji { get; set; } + public AccountPersonScriptAddressesKanji Kanji { get; set; } } } diff --git a/src/Stripe.net/Entities/V2/Core/AccountPersons/AccountPersonScriptAddressesKana.cs b/src/Stripe.net/Entities/V2/Core/AccountPersons/AccountPersonScriptAddressesKana.cs new file mode 100644 index 0000000000..741b958943 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/AccountPersons/AccountPersonScriptAddressesKana.cs @@ -0,0 +1,75 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountPersonScriptAddressesKana : StripeEntity + { + /// + /// City, district, suburb, town, or village. + /// + [JsonProperty("city")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("city")] +#endif + public string City { get; set; } + + /// + /// Two-letter country code (ISO + /// 3166-1 alpha-2). + /// + [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif + public string Country { get; set; } + + /// + /// Address line 1 (e.g., street, PO Box, or company name). + /// + [JsonProperty("line1")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("line1")] +#endif + public string Line1 { get; set; } + + /// + /// Address line 2 (e.g., apartment, suite, unit, or building). + /// + [JsonProperty("line2")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("line2")] +#endif + public string Line2 { get; set; } + + /// + /// ZIP or postal code. + /// + [JsonProperty("postal_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("postal_code")] +#endif + public string PostalCode { get; set; } + + /// + /// State, county, province, or region. + /// + [JsonProperty("state")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("state")] +#endif + public string State { get; set; } + + /// + /// Town or cho-me. + /// + [JsonProperty("town")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("town")] +#endif + public string Town { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/AccountPersons/AccountPersonScriptAddressesKanji.cs b/src/Stripe.net/Entities/V2/Core/AccountPersons/AccountPersonScriptAddressesKanji.cs new file mode 100644 index 0000000000..663ef13d15 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/AccountPersons/AccountPersonScriptAddressesKanji.cs @@ -0,0 +1,75 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountPersonScriptAddressesKanji : StripeEntity + { + /// + /// City, district, suburb, town, or village. + /// + [JsonProperty("city")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("city")] +#endif + public string City { get; set; } + + /// + /// Two-letter country code (ISO + /// 3166-1 alpha-2). + /// + [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif + public string Country { get; set; } + + /// + /// Address line 1 (e.g., street, PO Box, or company name). + /// + [JsonProperty("line1")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("line1")] +#endif + public string Line1 { get; set; } + + /// + /// Address line 2 (e.g., apartment, suite, unit, or building). + /// + [JsonProperty("line2")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("line2")] +#endif + public string Line2 { get; set; } + + /// + /// ZIP or postal code. + /// + [JsonProperty("postal_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("postal_code")] +#endif + public string PostalCode { get; set; } + + /// + /// State, county, province, or region. + /// + [JsonProperty("state")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("state")] +#endif + public string State { get; set; } + + /// + /// Town or cho-me. + /// + [JsonProperty("town")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("town")] +#endif + public string Town { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Persons/PersonScriptNames.cs b/src/Stripe.net/Entities/V2/Core/AccountPersons/AccountPersonScriptNames.cs similarity index 72% rename from src/Stripe.net/Entities/V2/Core/Persons/PersonScriptNames.cs rename to src/Stripe.net/Entities/V2/Core/AccountPersons/AccountPersonScriptNames.cs index f2ec24eb20..7053ff0b64 100644 --- a/src/Stripe.net/Entities/V2/Core/Persons/PersonScriptNames.cs +++ b/src/Stripe.net/Entities/V2/Core/AccountPersons/AccountPersonScriptNames.cs @@ -6,7 +6,7 @@ namespace Stripe.V2.Core using STJS = System.Text.Json.Serialization; #endif - public class PersonScriptNames : StripeEntity + public class AccountPersonScriptNames : StripeEntity { /// /// Persons name in kana script. @@ -15,7 +15,7 @@ public class PersonScriptNames : StripeEntity #if NET6_0_OR_GREATER [STJS.JsonPropertyName("kana")] #endif - public PersonScriptNamesKana Kana { get; set; } + public AccountPersonScriptNamesKana Kana { get; set; } /// /// Persons name in kanji script. @@ -24,6 +24,6 @@ public class PersonScriptNames : StripeEntity #if NET6_0_OR_GREATER [STJS.JsonPropertyName("kanji")] #endif - public PersonScriptNamesKanji Kanji { get; set; } + public AccountPersonScriptNamesKanji Kanji { get; set; } } } diff --git a/src/Stripe.net/Entities/V2/Core/Persons/PersonScriptNamesKana.cs b/src/Stripe.net/Entities/V2/Core/AccountPersons/AccountPersonScriptNamesKana.cs similarity index 88% rename from src/Stripe.net/Entities/V2/Core/Persons/PersonScriptNamesKana.cs rename to src/Stripe.net/Entities/V2/Core/AccountPersons/AccountPersonScriptNamesKana.cs index 9cc380965f..922e7dca03 100644 --- a/src/Stripe.net/Entities/V2/Core/Persons/PersonScriptNamesKana.cs +++ b/src/Stripe.net/Entities/V2/Core/AccountPersons/AccountPersonScriptNamesKana.cs @@ -6,7 +6,7 @@ namespace Stripe.V2.Core using STJS = System.Text.Json.Serialization; #endif - public class PersonScriptNamesKana : StripeEntity + public class AccountPersonScriptNamesKana : StripeEntity { /// /// The person's first or given name. diff --git a/src/Stripe.net/Entities/V2/Core/Persons/PersonScriptNamesKanji.cs b/src/Stripe.net/Entities/V2/Core/AccountPersons/AccountPersonScriptNamesKanji.cs similarity index 87% rename from src/Stripe.net/Entities/V2/Core/Persons/PersonScriptNamesKanji.cs rename to src/Stripe.net/Entities/V2/Core/AccountPersons/AccountPersonScriptNamesKanji.cs index 53ff0b2994..699d71e1bd 100644 --- a/src/Stripe.net/Entities/V2/Core/Persons/PersonScriptNamesKanji.cs +++ b/src/Stripe.net/Entities/V2/Core/AccountPersons/AccountPersonScriptNamesKanji.cs @@ -6,7 +6,7 @@ namespace Stripe.V2.Core using STJS = System.Text.Json.Serialization; #endif - public class PersonScriptNamesKanji : StripeEntity + public class AccountPersonScriptNamesKanji : StripeEntity { /// /// The person's first or given name. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCustomerAutomaticIndirectTaxLocation.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCustomerAutomaticIndirectTaxLocation.cs index ae386ac268..bb82f1bc04 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCustomerAutomaticIndirectTaxLocation.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCustomerAutomaticIndirectTaxLocation.cs @@ -10,38 +10,6 @@ public class AccountConfigurationCustomerAutomaticIndirectTaxLocation : StripeEn { /// /// The identified tax country of the customer. - /// One of: ad, ae, af, ag, ai, al, am, - /// ao, aq, ar, as, at, au, aw, ax, - /// az, ba, bb, bd, be, bf, bg, bh, - /// bi, bj, bl, bm, bn, bo, bq, br, - /// bs, bt, bv, bw, by, bz, ca, cc, - /// cd, cf, cg, ch, ci, ck, cl, cm, - /// cn, co, cr, cu, cv, cw, cx, cy, - /// cz, de, dj, dk, dm, do, dz, ec, - /// ee, eg, eh, er, es, et, fi, fj, - /// fk, fm, fo, fr, ga, gb, gd, ge, - /// gf, gg, gh, gi, gl, gm, gn, gp, - /// gq, gr, gs, gt, gu, gw, gy, hk, - /// hm, hn, hr, ht, hu, id, ie, il, - /// im, in, io, iq, ir, is, it, je, - /// jm, jo, jp, ke, kg, kh, ki, km, - /// kn, kp, kr, kw, ky, kz, la, lb, - /// lc, li, lk, lr, ls, lt, lu, lv, - /// ly, ma, mc, md, me, mf, mg, mh, - /// mk, ml, mm, mn, mo, mp, mq, mr, - /// ms, mt, mu, mv, mw, mx, my, mz, - /// na, nc, ne, nf, ng, ni, nl, no, - /// np, nr, nu, nz, om, pa, pe, pf, - /// pg, ph, pk, pl, pm, pn, pr, ps, - /// pt, pw, py, qa, qz, re, ro, rs, - /// ru, rw, sa, sb, sc, sd, se, sg, - /// sh, si, sj, sk, sl, sm, sn, so, - /// sr, ss, st, sv, sx, sy, sz, tc, - /// td, tf, tg, th, tj, tk, tl, tm, - /// tn, to, tr, tt, tv, tw, tz, ua, - /// ug, um, us, uy, uz, va, vc, ve, - /// vg, vi, vn, vu, wf, ws, xx, ye, - /// yt, za, zm, or zw. /// [JsonProperty("country")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCustomerBillingInvoice.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCustomerBillingInvoice.cs index 0863e19f5b..7cc8f4bd85 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCustomerBillingInvoice.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCustomerBillingInvoice.cs @@ -35,7 +35,7 @@ public class AccountConfigurationCustomerBillingInvoice : StripeEntity /// The prefix for the customer used to generate unique invoice numbers. Must be 3–12 diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCustomerShippingAddress.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCustomerShippingAddress.cs index 345fbc2e9e..a3d7f45555 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCustomerShippingAddress.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCustomerShippingAddress.cs @@ -20,38 +20,6 @@ public class AccountConfigurationCustomerShippingAddress : StripeEntity /// Two-letter country code (ISO /// 3166-1 alpha-2). - /// One of: ad, ae, af, ag, ai, al, am, - /// ao, aq, ar, as, at, au, aw, ax, - /// az, ba, bb, bd, be, bf, bg, bh, - /// bi, bj, bl, bm, bn, bo, bq, br, - /// bs, bt, bv, bw, by, bz, ca, cc, - /// cd, cf, cg, ch, ci, ck, cl, cm, - /// cn, co, cr, cu, cv, cw, cx, cy, - /// cz, de, dj, dk, dm, do, dz, ec, - /// ee, eg, eh, er, es, et, fi, fj, - /// fk, fm, fo, fr, ga, gb, gd, ge, - /// gf, gg, gh, gi, gl, gm, gn, gp, - /// gq, gr, gs, gt, gu, gw, gy, hk, - /// hm, hn, hr, ht, hu, id, ie, il, - /// im, in, io, iq, ir, is, it, je, - /// jm, jo, jp, ke, kg, kh, ki, km, - /// kn, kp, kr, kw, ky, kz, la, lb, - /// lc, li, lk, lr, ls, lt, lu, lv, - /// ly, ma, mc, md, me, mf, mg, mh, - /// mk, ml, mm, mn, mo, mp, mq, mr, - /// ms, mt, mu, mv, mw, mx, my, mz, - /// na, nc, ne, nf, ng, ni, nl, no, - /// np, nr, nu, nz, om, pa, pe, pf, - /// pg, ph, pk, pl, pm, pn, pr, ps, - /// pt, pw, py, qa, qz, re, ro, rs, - /// ru, rw, sa, sb, sc, sd, se, sg, - /// sh, si, sj, sk, sl, sm, sn, so, - /// sr, ss, st, sv, sx, sy, sz, tc, - /// td, tf, tg, th, tj, tk, tl, tm, - /// tn, to, tr, tt, tv, tw, tz, ua, - /// ug, um, us, uy, uz, va, vc, ve, - /// vg, vi, vn, vu, wf, ws, xx, ye, - /// yt, za, zm, or zw. /// [JsonProperty("country")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCardPaymentsDeclineOn.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCardPaymentsDeclineOn.cs index c6a655e8eb..16eedf2a96 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCardPaymentsDeclineOn.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationMerchantCardPaymentsDeclineOn.cs @@ -17,7 +17,7 @@ public class AccountConfigurationMerchantCardPaymentsDeclineOn : StripeEntity /// Whether Stripe automatically declines charges with an incorrect CVC. This setting only @@ -27,6 +27,6 @@ public class AccountConfigurationMerchantCardPaymentsDeclineOn : StripeEntity /// Two-letter country code (ISO /// 3166-1 alpha-2). - /// One of: ad, ae, af, ag, ai, al, am, - /// ao, aq, ar, as, at, au, aw, ax, - /// az, ba, bb, bd, be, bf, bg, bh, - /// bi, bj, bl, bm, bn, bo, bq, br, - /// bs, bt, bv, bw, by, bz, ca, cc, - /// cd, cf, cg, ch, ci, ck, cl, cm, - /// cn, co, cr, cu, cv, cw, cx, cy, - /// cz, de, dj, dk, dm, do, dz, ec, - /// ee, eg, eh, er, es, et, fi, fj, - /// fk, fm, fo, fr, ga, gb, gd, ge, - /// gf, gg, gh, gi, gl, gm, gn, gp, - /// gq, gr, gs, gt, gu, gw, gy, hk, - /// hm, hn, hr, ht, hu, id, ie, il, - /// im, in, io, iq, ir, is, it, je, - /// jm, jo, jp, ke, kg, kh, ki, km, - /// kn, kp, kr, kw, ky, kz, la, lb, - /// lc, li, lk, lr, ls, lt, lu, lv, - /// ly, ma, mc, md, me, mf, mg, mh, - /// mk, ml, mm, mn, mo, mp, mq, mr, - /// ms, mt, mu, mv, mw, mx, my, mz, - /// na, nc, ne, nf, ng, ni, nl, no, - /// np, nr, nu, nz, om, pa, pe, pf, - /// pg, ph, pk, pl, pm, pn, pr, ps, - /// pt, pw, py, qa, qz, re, ro, rs, - /// ru, rw, sa, sb, sc, sd, se, sg, - /// sh, si, sj, sk, sl, sm, sn, so, - /// sr, ss, st, sv, sx, sy, sz, tc, - /// td, tf, tg, th, tj, tk, tl, tm, - /// tn, to, tr, tt, tv, tw, tz, ua, - /// ug, um, us, uy, uz, va, vc, ve, - /// vg, vi, vn, vu, wf, ws, xx, ye, - /// yt, za, zm, or zw. /// [JsonProperty("country")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountDefaults.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountDefaults.cs index e5c129922c..41d8527cf9 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountDefaults.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountDefaults.cs @@ -13,32 +13,6 @@ public class AccountDefaults : StripeEntity /// Three-letter ISO currency /// code, in lowercase. Must be a supported /// currency. - /// One of: aed, afn, all, amd, ang, aoa, - /// ars, aud, awg, azn, bam, bbd, bdt, - /// bgn, bhd, bif, bmd, bnd, bob, bov, - /// brl, bsd, btn, bwp, byn, byr, bzd, - /// cad, cdf, che, chf, chw, clf, clp, - /// cny, cop, cou, crc, cuc, cup, cve, - /// czk, djf, dkk, dop, dzd, eek, egp, - /// ern, etb, eur, fjd, fkp, gbp, gel, - /// ghc, ghs, gip, gmd, gnf, gtq, gyd, - /// hkd, hnl, hrk, htg, huf, idr, ils, - /// inr, iqd, irr, isk, jmd, jod, jpy, - /// kes, kgs, khr, kmf, kpw, krw, kwd, - /// kyd, kzt, lak, lbp, lkr, lrd, lsl, - /// ltl, lvl, lyd, mad, mdl, mga, mkd, - /// mmk, mnt, mop, mro, mru, mur, mvr, - /// mwk, mxn, mxv, myr, mzn, nad, ngn, - /// nio, nok, npr, nzd, omr, pab, pen, - /// pgk, php, pkr, pln, pyg, qar, ron, - /// rsd, rub, rwf, sar, sbd, scr, sdg, - /// sek, sgd, shp, sle, sll, sos, srd, - /// ssp, std, stn, svc, syp, szl, thb, - /// tjs, tmt, tnd, top, try, ttd, twd, - /// tzs, uah, ugx, usd, usdb, usdc, usn, - /// uyi, uyu, uzs, vef, ves, vnd, vuv, - /// wst, xaf, xcd, xcg, xof, xpf, yer, - /// zar, zmk, zmw, zwd, zwg, or zwl. /// [JsonProperty("currency")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentity.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentity.cs index af4381f387..d15bee9335 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentity.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentity.cs @@ -31,38 +31,6 @@ public class AccountIdentity : StripeEntity /// established. This should be an ISO 3166-1 alpha-2 country /// code. - /// One of: ad, ae, af, ag, ai, al, am, - /// ao, aq, ar, as, at, au, aw, ax, - /// az, ba, bb, bd, be, bf, bg, bh, - /// bi, bj, bl, bm, bn, bo, bq, br, - /// bs, bt, bv, bw, by, bz, ca, cc, - /// cd, cf, cg, ch, ci, ck, cl, cm, - /// cn, co, cr, cu, cv, cw, cx, cy, - /// cz, de, dj, dk, dm, do, dz, ec, - /// ee, eg, eh, er, es, et, fi, fj, - /// fk, fm, fo, fr, ga, gb, gd, ge, - /// gf, gg, gh, gi, gl, gm, gn, gp, - /// gq, gr, gs, gt, gu, gw, gy, hk, - /// hm, hn, hr, ht, hu, id, ie, il, - /// im, in, io, iq, ir, is, it, je, - /// jm, jo, jp, ke, kg, kh, ki, km, - /// kn, kp, kr, kw, ky, kz, la, lb, - /// lc, li, lk, lr, ls, lt, lu, lv, - /// ly, ma, mc, md, me, mf, mg, mh, - /// mk, ml, mm, mn, mo, mp, mq, mr, - /// ms, mt, mu, mv, mw, mx, my, mz, - /// na, nc, ne, nf, ng, ni, nl, no, - /// np, nr, nu, nz, om, pa, pe, pf, - /// pg, ph, pk, pl, pm, pn, pr, ps, - /// pt, pw, py, qa, qz, re, ro, rs, - /// ru, rw, sa, sb, sc, sd, se, sg, - /// sh, si, sj, sk, sl, sm, sn, so, - /// sr, ss, st, sv, sx, sy, sz, tc, - /// td, tf, tg, th, tj, tk, tl, tm, - /// tn, to, tr, tt, tv, tw, tz, ua, - /// ug, um, us, uy, uz, va, vc, ve, - /// vg, vi, vn, vu, wf, ws, xx, ye, - /// yt, za, zm, or zw. /// [JsonProperty("country")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityAttestationsDirectorshipDeclaration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityAttestationsDirectorshipDeclaration.cs index 4609c22994..c1422da9e4 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityAttestationsDirectorshipDeclaration.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityAttestationsDirectorshipDeclaration.cs @@ -17,7 +17,7 @@ public class AccountIdentityAttestationsDirectorshipDeclaration : StripeEntity /// The IP address from which the director attestation was made. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityAttestationsOwnershipDeclaration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityAttestationsOwnershipDeclaration.cs index 546b838eda..eac0c7b061 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityAttestationsOwnershipDeclaration.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityAttestationsOwnershipDeclaration.cs @@ -18,7 +18,7 @@ public class AccountIdentityAttestationsOwnershipDeclaration : StripeEntity /// The IP address from which the beneficial owner attestation was made. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityAttestationsPersonsProvided.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityAttestationsPersonsProvided.cs index 2bb260c843..b3d7068c57 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityAttestationsPersonsProvided.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityAttestationsPersonsProvided.cs @@ -17,7 +17,7 @@ public class AccountIdentityAttestationsPersonsProvided : StripeEntity /// Whether the company’s executives have been provided. Set this Boolean to true after @@ -28,7 +28,7 @@ public class AccountIdentityAttestationsPersonsProvided : StripeEntity /// Whether the company’s owners have been provided. Set this Boolean to true after creating @@ -39,7 +39,7 @@ public class AccountIdentityAttestationsPersonsProvided : StripeEntity /// Reason for why the company is exempt from providing ownership information. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityAttestationsTermsOfServiceAccount.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityAttestationsTermsOfServiceAccount.cs index 013fa3243e..7a38f158b9 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityAttestationsTermsOfServiceAccount.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityAttestationsTermsOfServiceAccount.cs @@ -18,7 +18,7 @@ public class AccountIdentityAttestationsTermsOfServiceAccount : StripeEntity /// The IP address from which the Account's representative accepted the terms of service. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityAttestationsTermsOfServiceStorer.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityAttestationsTermsOfServiceStorer.cs index b6d4772b64..9da4960180 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityAttestationsTermsOfServiceStorer.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityAttestationsTermsOfServiceStorer.cs @@ -18,7 +18,7 @@ public class AccountIdentityAttestationsTermsOfServiceStorer : StripeEntity /// The IP address from which the Account's representative accepted the terms of service. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityBusinessDetails.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityBusinessDetails.cs index bec5bd2351..c9dd01471c 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityBusinessDetails.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityBusinessDetails.cs @@ -53,7 +53,7 @@ public class AccountIdentityBusinessDetails : StripeEntity /// The provided ID numbers of a business entity. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityBusinessDetailsAddress.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityBusinessDetailsAddress.cs index a93b75b145..4163476b76 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityBusinessDetailsAddress.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityBusinessDetailsAddress.cs @@ -20,38 +20,6 @@ public class AccountIdentityBusinessDetailsAddress : StripeEntity /// Two-letter country code (ISO /// 3166-1 alpha-2). - /// One of: ad, ae, af, ag, ai, al, am, - /// ao, aq, ar, as, at, au, aw, ax, - /// az, ba, bb, bd, be, bf, bg, bh, - /// bi, bj, bl, bm, bn, bo, bq, br, - /// bs, bt, bv, bw, by, bz, ca, cc, - /// cd, cf, cg, ch, ci, ck, cl, cm, - /// cn, co, cr, cu, cv, cw, cx, cy, - /// cz, de, dj, dk, dm, do, dz, ec, - /// ee, eg, eh, er, es, et, fi, fj, - /// fk, fm, fo, fr, ga, gb, gd, ge, - /// gf, gg, gh, gi, gl, gm, gn, gp, - /// gq, gr, gs, gt, gu, gw, gy, hk, - /// hm, hn, hr, ht, hu, id, ie, il, - /// im, in, io, iq, ir, is, it, je, - /// jm, jo, jp, ke, kg, kh, ki, km, - /// kn, kp, kr, kw, ky, kz, la, lb, - /// lc, li, lk, lr, ls, lt, lu, lv, - /// ly, ma, mc, md, me, mf, mg, mh, - /// mk, ml, mm, mn, mo, mp, mq, mr, - /// ms, mt, mu, mv, mw, mx, my, mz, - /// na, nc, ne, nf, ng, ni, nl, no, - /// np, nr, nu, nz, om, pa, pe, pf, - /// pg, ph, pk, pl, pm, pn, pr, ps, - /// pt, pw, py, qa, qz, re, ro, rs, - /// ru, rw, sa, sb, sc, sd, se, sg, - /// sh, si, sj, sk, sl, sm, sn, so, - /// sr, ss, st, sv, sx, sy, sz, tc, - /// td, tf, tg, th, tj, tk, tl, tm, - /// tn, to, tr, tt, tv, tw, tz, ua, - /// ug, um, us, uy, uz, va, vc, ve, - /// vg, vi, vn, vu, wf, ws, xx, ye, - /// yt, za, zm, or zw. /// [JsonProperty("country")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityBusinessDetailsScriptAddressesKana.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityBusinessDetailsScriptAddressesKana.cs index 2b11c58826..c53353b13e 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityBusinessDetailsScriptAddressesKana.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityBusinessDetailsScriptAddressesKana.cs @@ -20,38 +20,6 @@ public class AccountIdentityBusinessDetailsScriptAddressesKana : StripeEntity /// Two-letter country code (ISO /// 3166-1 alpha-2). - /// One of: ad, ae, af, ag, ai, al, am, - /// ao, aq, ar, as, at, au, aw, ax, - /// az, ba, bb, bd, be, bf, bg, bh, - /// bi, bj, bl, bm, bn, bo, bq, br, - /// bs, bt, bv, bw, by, bz, ca, cc, - /// cd, cf, cg, ch, ci, ck, cl, cm, - /// cn, co, cr, cu, cv, cw, cx, cy, - /// cz, de, dj, dk, dm, do, dz, ec, - /// ee, eg, eh, er, es, et, fi, fj, - /// fk, fm, fo, fr, ga, gb, gd, ge, - /// gf, gg, gh, gi, gl, gm, gn, gp, - /// gq, gr, gs, gt, gu, gw, gy, hk, - /// hm, hn, hr, ht, hu, id, ie, il, - /// im, in, io, iq, ir, is, it, je, - /// jm, jo, jp, ke, kg, kh, ki, km, - /// kn, kp, kr, kw, ky, kz, la, lb, - /// lc, li, lk, lr, ls, lt, lu, lv, - /// ly, ma, mc, md, me, mf, mg, mh, - /// mk, ml, mm, mn, mo, mp, mq, mr, - /// ms, mt, mu, mv, mw, mx, my, mz, - /// na, nc, ne, nf, ng, ni, nl, no, - /// np, nr, nu, nz, om, pa, pe, pf, - /// pg, ph, pk, pl, pm, pn, pr, ps, - /// pt, pw, py, qa, qz, re, ro, rs, - /// ru, rw, sa, sb, sc, sd, se, sg, - /// sh, si, sj, sk, sl, sm, sn, so, - /// sr, ss, st, sv, sx, sy, sz, tc, - /// td, tf, tg, th, tj, tk, tl, tm, - /// tn, to, tr, tt, tv, tw, tz, ua, - /// ug, um, us, uy, uz, va, vc, ve, - /// vg, vi, vn, vu, wf, ws, xx, ye, - /// yt, za, zm, or zw. /// [JsonProperty("country")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityBusinessDetailsScriptAddressesKanji.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityBusinessDetailsScriptAddressesKanji.cs index 8961139591..38f32eb9bb 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityBusinessDetailsScriptAddressesKanji.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityBusinessDetailsScriptAddressesKanji.cs @@ -20,38 +20,6 @@ public class AccountIdentityBusinessDetailsScriptAddressesKanji : StripeEntity /// Two-letter country code (ISO /// 3166-1 alpha-2). - /// One of: ad, ae, af, ag, ai, al, am, - /// ao, aq, ar, as, at, au, aw, ax, - /// az, ba, bb, bd, be, bf, bg, bh, - /// bi, bj, bl, bm, bn, bo, bq, br, - /// bs, bt, bv, bw, by, bz, ca, cc, - /// cd, cf, cg, ch, ci, ck, cl, cm, - /// cn, co, cr, cu, cv, cw, cx, cy, - /// cz, de, dj, dk, dm, do, dz, ec, - /// ee, eg, eh, er, es, et, fi, fj, - /// fk, fm, fo, fr, ga, gb, gd, ge, - /// gf, gg, gh, gi, gl, gm, gn, gp, - /// gq, gr, gs, gt, gu, gw, gy, hk, - /// hm, hn, hr, ht, hu, id, ie, il, - /// im, in, io, iq, ir, is, it, je, - /// jm, jo, jp, ke, kg, kh, ki, km, - /// kn, kp, kr, kw, ky, kz, la, lb, - /// lc, li, lk, lr, ls, lt, lu, lv, - /// ly, ma, mc, md, me, mf, mg, mh, - /// mk, ml, mm, mn, mo, mp, mq, mr, - /// ms, mt, mu, mv, mw, mx, my, mz, - /// na, nc, ne, nf, ng, ni, nl, no, - /// np, nr, nu, nz, om, pa, pe, pf, - /// pg, ph, pk, pl, pm, pn, pr, ps, - /// pt, pw, py, qa, qz, re, ro, rs, - /// ru, rw, sa, sb, sc, sd, se, sg, - /// sh, si, sj, sk, sl, sm, sn, so, - /// sr, ss, st, sv, sx, sy, sz, tc, - /// td, tf, tg, th, tj, tk, tl, tm, - /// tn, to, tr, tt, tv, tw, tz, ua, - /// ug, um, us, uy, uz, va, vc, ve, - /// vg, vi, vn, vu, wf, ws, xx, ye, - /// yt, za, zm, or zw. /// [JsonProperty("country")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityIndividual.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityIndividual.cs index 43450dbead..ff9d7aedd5 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityIndividual.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityIndividual.cs @@ -142,38 +142,6 @@ public class AccountIdentityIndividual : StripeEntity /// /// The countries where the individual is a national. Two-letter country code (ISO 3166-1 alpha-2). - /// One of: ad, ae, af, ag, ai, al, am, - /// ao, aq, ar, as, at, au, aw, ax, - /// az, ba, bb, bd, be, bf, bg, bh, - /// bi, bj, bl, bm, bn, bo, bq, br, - /// bs, bt, bv, bw, by, bz, ca, cc, - /// cd, cf, cg, ch, ci, ck, cl, cm, - /// cn, co, cr, cu, cv, cw, cx, cy, - /// cz, de, dj, dk, dm, do, dz, ec, - /// ee, eg, eh, er, es, et, fi, fj, - /// fk, fm, fo, fr, ga, gb, gd, ge, - /// gf, gg, gh, gi, gl, gm, gn, gp, - /// gq, gr, gs, gt, gu, gw, gy, hk, - /// hm, hn, hr, ht, hu, id, ie, il, - /// im, in, io, iq, ir, is, it, je, - /// jm, jo, jp, ke, kg, kh, ki, km, - /// kn, kp, kr, kw, ky, kz, la, lb, - /// lc, li, lk, lr, ls, lt, lu, lv, - /// ly, ma, mc, md, me, mf, mg, mh, - /// mk, ml, mm, mn, mo, mp, mq, mr, - /// ms, mt, mu, mv, mw, mx, my, mz, - /// na, nc, ne, nf, ng, ni, nl, no, - /// np, nr, nu, nz, om, pa, pe, pf, - /// pg, ph, pk, pl, pm, pn, pr, ps, - /// pt, pw, py, qa, qz, re, ro, rs, - /// ru, rw, sa, sb, sc, sd, se, sg, - /// sh, si, sj, sk, sl, sm, sn, so, - /// sr, ss, st, sv, sx, sy, sz, tc, - /// td, tf, tg, th, tj, tk, tl, tm, - /// tn, to, tr, tt, tv, tw, tz, ua, - /// ug, um, us, uy, uz, va, vc, ve, - /// vg, vi, vn, vu, wf, ws, xx, ye, - /// yt, za, zm, or zw. /// [JsonProperty("nationalities")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityIndividualAdditionalAddress.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityIndividualAdditionalAddress.cs index 48f7a957fc..2a1f483837 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityIndividualAdditionalAddress.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityIndividualAdditionalAddress.cs @@ -20,38 +20,6 @@ public class AccountIdentityIndividualAdditionalAddress : StripeEntity /// Two-letter country code (ISO /// 3166-1 alpha-2). - /// One of: ad, ae, af, ag, ai, al, am, - /// ao, aq, ar, as, at, au, aw, ax, - /// az, ba, bb, bd, be, bf, bg, bh, - /// bi, bj, bl, bm, bn, bo, bq, br, - /// bs, bt, bv, bw, by, bz, ca, cc, - /// cd, cf, cg, ch, ci, ck, cl, cm, - /// cn, co, cr, cu, cv, cw, cx, cy, - /// cz, de, dj, dk, dm, do, dz, ec, - /// ee, eg, eh, er, es, et, fi, fj, - /// fk, fm, fo, fr, ga, gb, gd, ge, - /// gf, gg, gh, gi, gl, gm, gn, gp, - /// gq, gr, gs, gt, gu, gw, gy, hk, - /// hm, hn, hr, ht, hu, id, ie, il, - /// im, in, io, iq, ir, is, it, je, - /// jm, jo, jp, ke, kg, kh, ki, km, - /// kn, kp, kr, kw, ky, kz, la, lb, - /// lc, li, lk, lr, ls, lt, lu, lv, - /// ly, ma, mc, md, me, mf, mg, mh, - /// mk, ml, mm, mn, mo, mp, mq, mr, - /// ms, mt, mu, mv, mw, mx, my, mz, - /// na, nc, ne, nf, ng, ni, nl, no, - /// np, nr, nu, nz, om, pa, pe, pf, - /// pg, ph, pk, pl, pm, pn, pr, ps, - /// pt, pw, py, qa, qz, re, ro, rs, - /// ru, rw, sa, sb, sc, sd, se, sg, - /// sh, si, sj, sk, sl, sm, sn, so, - /// sr, ss, st, sv, sx, sy, sz, tc, - /// td, tf, tg, th, tj, tk, tl, tm, - /// tn, to, tr, tt, tv, tw, tz, ua, - /// ug, um, us, uy, uz, va, vc, ve, - /// vg, vi, vn, vu, wf, ws, xx, ye, - /// yt, za, zm, or zw. /// [JsonProperty("country")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityIndividualAdditionalTermsOfServiceAccount.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityIndividualAdditionalTermsOfServiceAccount.cs index 10c1737f3f..3abc65b4eb 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityIndividualAdditionalTermsOfServiceAccount.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityIndividualAdditionalTermsOfServiceAccount.cs @@ -18,7 +18,7 @@ public class AccountIdentityIndividualAdditionalTermsOfServiceAccount : StripeEn #if NET6_0_OR_GREATER [STJS.JsonPropertyName("date")] #endif - public DateTime? Date { get; set; } + public DateTime Date { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// /// The IP address from which the Account's representative accepted the terms of service. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityIndividualAddress.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityIndividualAddress.cs index 835b117e97..da6bcd85c3 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityIndividualAddress.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityIndividualAddress.cs @@ -20,38 +20,6 @@ public class AccountIdentityIndividualAddress : StripeEntity /// Two-letter country code (ISO /// 3166-1 alpha-2). - /// One of: ad, ae, af, ag, ai, al, am, - /// ao, aq, ar, as, at, au, aw, ax, - /// az, ba, bb, bd, be, bf, bg, bh, - /// bi, bj, bl, bm, bn, bo, bq, br, - /// bs, bt, bv, bw, by, bz, ca, cc, - /// cd, cf, cg, ch, ci, ck, cl, cm, - /// cn, co, cr, cu, cv, cw, cx, cy, - /// cz, de, dj, dk, dm, do, dz, ec, - /// ee, eg, eh, er, es, et, fi, fj, - /// fk, fm, fo, fr, ga, gb, gd, ge, - /// gf, gg, gh, gi, gl, gm, gn, gp, - /// gq, gr, gs, gt, gu, gw, gy, hk, - /// hm, hn, hr, ht, hu, id, ie, il, - /// im, in, io, iq, ir, is, it, je, - /// jm, jo, jp, ke, kg, kh, ki, km, - /// kn, kp, kr, kw, ky, kz, la, lb, - /// lc, li, lk, lr, ls, lt, lu, lv, - /// ly, ma, mc, md, me, mf, mg, mh, - /// mk, ml, mm, mn, mo, mp, mq, mr, - /// ms, mt, mu, mv, mw, mx, my, mz, - /// na, nc, ne, nf, ng, ni, nl, no, - /// np, nr, nu, nz, om, pa, pe, pf, - /// pg, ph, pk, pl, pm, pn, pr, ps, - /// pt, pw, py, qa, qz, re, ro, rs, - /// ru, rw, sa, sb, sc, sd, se, sg, - /// sh, si, sj, sk, sl, sm, sn, so, - /// sr, ss, st, sv, sx, sy, sz, tc, - /// td, tf, tg, th, tj, tk, tl, tm, - /// tn, to, tr, tt, tv, tw, tz, ua, - /// ug, um, us, uy, uz, va, vc, ve, - /// vg, vi, vn, vu, wf, ws, xx, ye, - /// yt, za, zm, or zw. /// [JsonProperty("country")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityIndividualRelationship.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityIndividualRelationship.cs index 7e08ecf5cd..699691d73f 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityIndividualRelationship.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityIndividualRelationship.cs @@ -15,7 +15,7 @@ public class AccountIdentityIndividualRelationship : StripeEntity /// Whether the individual is a director of the Account’s legal entity. Directors are @@ -26,7 +26,7 @@ public class AccountIdentityIndividualRelationship : StripeEntity /// Whether the individual has significant responsibility to control, manage, or direct the @@ -36,7 +36,7 @@ public class AccountIdentityIndividualRelationship : StripeEntity /// Whether the individual is the legal guardian of the Account’s representative. @@ -45,7 +45,7 @@ public class AccountIdentityIndividualRelationship : StripeEntity /// Whether the individual is an owner of the Account’s legal entity. @@ -54,7 +54,7 @@ public class AccountIdentityIndividualRelationship : StripeEntity /// The percent owned by the individual of the Account’s legal entity. @@ -63,7 +63,7 @@ public class AccountIdentityIndividualRelationship : StripeEntity /// Whether the individual is authorized as the primary representative of the Account. This @@ -76,7 +76,7 @@ public class AccountIdentityIndividualRelationship : StripeEntity /// The individual's title (e.g., CEO, Support Engineer). diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityIndividualScriptAddressesKana.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityIndividualScriptAddressesKana.cs index 07df059d5e..3552bd2b1a 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityIndividualScriptAddressesKana.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityIndividualScriptAddressesKana.cs @@ -20,38 +20,6 @@ public class AccountIdentityIndividualScriptAddressesKana : StripeEntity /// Two-letter country code (ISO /// 3166-1 alpha-2). - /// One of: ad, ae, af, ag, ai, al, am, - /// ao, aq, ar, as, at, au, aw, ax, - /// az, ba, bb, bd, be, bf, bg, bh, - /// bi, bj, bl, bm, bn, bo, bq, br, - /// bs, bt, bv, bw, by, bz, ca, cc, - /// cd, cf, cg, ch, ci, ck, cl, cm, - /// cn, co, cr, cu, cv, cw, cx, cy, - /// cz, de, dj, dk, dm, do, dz, ec, - /// ee, eg, eh, er, es, et, fi, fj, - /// fk, fm, fo, fr, ga, gb, gd, ge, - /// gf, gg, gh, gi, gl, gm, gn, gp, - /// gq, gr, gs, gt, gu, gw, gy, hk, - /// hm, hn, hr, ht, hu, id, ie, il, - /// im, in, io, iq, ir, is, it, je, - /// jm, jo, jp, ke, kg, kh, ki, km, - /// kn, kp, kr, kw, ky, kz, la, lb, - /// lc, li, lk, lr, ls, lt, lu, lv, - /// ly, ma, mc, md, me, mf, mg, mh, - /// mk, ml, mm, mn, mo, mp, mq, mr, - /// ms, mt, mu, mv, mw, mx, my, mz, - /// na, nc, ne, nf, ng, ni, nl, no, - /// np, nr, nu, nz, om, pa, pe, pf, - /// pg, ph, pk, pl, pm, pn, pr, ps, - /// pt, pw, py, qa, qz, re, ro, rs, - /// ru, rw, sa, sb, sc, sd, se, sg, - /// sh, si, sj, sk, sl, sm, sn, so, - /// sr, ss, st, sv, sx, sy, sz, tc, - /// td, tf, tg, th, tj, tk, tl, tm, - /// tn, to, tr, tt, tv, tw, tz, ua, - /// ug, um, us, uy, uz, va, vc, ve, - /// vg, vi, vn, vu, wf, ws, xx, ye, - /// yt, za, zm, or zw. /// [JsonProperty("country")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityIndividualScriptAddressesKanji.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityIndividualScriptAddressesKanji.cs index c0e1f3e291..4904b33207 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityIndividualScriptAddressesKanji.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityIndividualScriptAddressesKanji.cs @@ -20,38 +20,6 @@ public class AccountIdentityIndividualScriptAddressesKanji : StripeEntity /// Two-letter country code (ISO /// 3166-1 alpha-2). - /// One of: ad, ae, af, ag, ai, al, am, - /// ao, aq, ar, as, at, au, aw, ax, - /// az, ba, bb, bd, be, bf, bg, bh, - /// bi, bj, bl, bm, bn, bo, bq, br, - /// bs, bt, bv, bw, by, bz, ca, cc, - /// cd, cf, cg, ch, ci, ck, cl, cm, - /// cn, co, cr, cu, cv, cw, cx, cy, - /// cz, de, dj, dk, dm, do, dz, ec, - /// ee, eg, eh, er, es, et, fi, fj, - /// fk, fm, fo, fr, ga, gb, gd, ge, - /// gf, gg, gh, gi, gl, gm, gn, gp, - /// gq, gr, gs, gt, gu, gw, gy, hk, - /// hm, hn, hr, ht, hu, id, ie, il, - /// im, in, io, iq, ir, is, it, je, - /// jm, jo, jp, ke, kg, kh, ki, km, - /// kn, kp, kr, kw, ky, kz, la, lb, - /// lc, li, lk, lr, ls, lt, lu, lv, - /// ly, ma, mc, md, me, mf, mg, mh, - /// mk, ml, mm, mn, mo, mp, mq, mr, - /// ms, mt, mu, mv, mw, mx, my, mz, - /// na, nc, ne, nf, ng, ni, nl, no, - /// np, nr, nu, nz, om, pa, pe, pf, - /// pg, ph, pk, pl, pm, pn, pr, ps, - /// pt, pw, py, qa, qz, re, ro, rs, - /// ru, rw, sa, sb, sc, sd, se, sg, - /// sh, si, sj, sk, sl, sm, sn, so, - /// sr, ss, st, sv, sx, sy, sz, tc, - /// td, tf, tg, th, tj, tk, tl, tm, - /// tn, to, tr, tt, tv, tw, tz, ua, - /// ug, um, us, uy, uz, va, vc, ve, - /// vg, vi, vn, vu, wf, ws, xx, ye, - /// yt, za, zm, or zw. /// [JsonProperty("country")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountRequirementsSummaryMinimumDeadline.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountRequirementsSummaryMinimumDeadline.cs index b7174d1f8c..8e5985b959 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountRequirementsSummaryMinimumDeadline.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountRequirementsSummaryMinimumDeadline.cs @@ -26,6 +26,6 @@ public class AccountRequirementsSummaryMinimumDeadline : StripeEntity, IHasId, IHasObje public string Object { get; set; } /// - /// URL for user to claim sandbox into their existing Stripe account. The value will be null - /// if the sandbox status is claimed or expired. + /// Keys that can be used to set up an integration for this sandbox and operate on the + /// account. /// - [JsonProperty("claim_url")] + [JsonProperty("api_keys")] #if NET6_0_OR_GREATER - [STJS.JsonPropertyName("claim_url")] + [STJS.JsonPropertyName("api_keys")] #endif - public string ClaimUrl { get; set; } + public ClaimableSandboxApiKeys ApiKeys { get; set; } /// - /// The timestamp the sandbox was claimed. The value will be null if the sandbox status is - /// not claimed. + /// URL for user to claim sandbox into their existing Stripe account. /// - [JsonProperty("claimed_at")] + [JsonProperty("claim_url")] #if NET6_0_OR_GREATER - [STJS.JsonPropertyName("claimed_at")] + [STJS.JsonPropertyName("claim_url")] #endif - public DateTime? ClaimedAt { get; set; } + public string ClaimUrl { get; set; } /// /// When the sandbox is created. @@ -66,16 +65,6 @@ public class ClaimableSandbox : StripeEntity, IHasId, IHasObje #endif public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; - /// - /// The timestamp the sandbox will expire. The value will be null if the sandbox is - /// claimed. - /// - [JsonProperty("expires_at")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("expires_at")] -#endif - public DateTime? ExpiresAt { get; set; } - /// /// Has the value true if the object exists in live mode or the value false if /// the object exists in test mode. @@ -94,24 +83,5 @@ public class ClaimableSandbox : StripeEntity, IHasId, IHasObje [STJS.JsonPropertyName("prefill")] #endif public ClaimableSandboxPrefill Prefill { get; set; } - - /// - /// Data about the Stripe sandbox object. - /// - [JsonProperty("sandbox_details")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("sandbox_details")] -#endif - public ClaimableSandboxSandboxDetails SandboxDetails { get; set; } - - /// - /// Status of the sandbox. One of unclaimed, expired, claimed. - /// One of: claimed, expired, or unclaimed. - /// - [JsonProperty("status")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("status")] -#endif - public string Status { get; set; } } } diff --git a/src/Stripe.net/Entities/V2/Core/ClaimableSandboxes/ClaimableSandboxSandboxDetailsApiKeys.cs b/src/Stripe.net/Entities/V2/Core/ClaimableSandboxes/ClaimableSandboxApiKeys.cs similarity index 91% rename from src/Stripe.net/Entities/V2/Core/ClaimableSandboxes/ClaimableSandboxSandboxDetailsApiKeys.cs rename to src/Stripe.net/Entities/V2/Core/ClaimableSandboxes/ClaimableSandboxApiKeys.cs index 2c204f3847..b846bdd5c6 100644 --- a/src/Stripe.net/Entities/V2/Core/ClaimableSandboxes/ClaimableSandboxSandboxDetailsApiKeys.cs +++ b/src/Stripe.net/Entities/V2/Core/ClaimableSandboxes/ClaimableSandboxApiKeys.cs @@ -6,7 +6,7 @@ namespace Stripe.V2.Core using STJS = System.Text.Json.Serialization; #endif - public class ClaimableSandboxSandboxDetailsApiKeys : StripeEntity + public class ClaimableSandboxApiKeys : StripeEntity { /// /// Used to communicate with Stripe's MCP server. diff --git a/src/Stripe.net/Entities/V2/Core/ClaimableSandboxes/ClaimableSandboxPrefill.cs b/src/Stripe.net/Entities/V2/Core/ClaimableSandboxes/ClaimableSandboxPrefill.cs index 43566804ed..b8eacff98c 100644 --- a/src/Stripe.net/Entities/V2/Core/ClaimableSandboxes/ClaimableSandboxPrefill.cs +++ b/src/Stripe.net/Entities/V2/Core/ClaimableSandboxes/ClaimableSandboxPrefill.cs @@ -12,38 +12,6 @@ public class ClaimableSandboxPrefill : StripeEntity /// Country in which the account holder resides, or in which the business is legally /// established. Use two-letter country code (ISO 3166-1 alpha-2). - /// One of: ad, ae, af, ag, ai, al, am, - /// ao, aq, ar, as, at, au, aw, ax, - /// az, ba, bb, bd, be, bf, bg, bh, - /// bi, bj, bl, bm, bn, bo, bq, br, - /// bs, bt, bv, bw, by, bz, ca, cc, - /// cd, cf, cg, ch, ci, ck, cl, cm, - /// cn, co, cr, cu, cv, cw, cx, cy, - /// cz, de, dj, dk, dm, do, dz, ec, - /// ee, eg, eh, er, es, et, fi, fj, - /// fk, fm, fo, fr, ga, gb, gd, ge, - /// gf, gg, gh, gi, gl, gm, gn, gp, - /// gq, gr, gs, gt, gu, gw, gy, hk, - /// hm, hn, hr, ht, hu, id, ie, il, - /// im, in, io, iq, ir, is, it, je, - /// jm, jo, jp, ke, kg, kh, ki, km, - /// kn, kp, kr, kw, ky, kz, la, lb, - /// lc, li, lk, lr, ls, lt, lu, lv, - /// ly, ma, mc, md, me, mf, mg, mh, - /// mk, ml, mm, mn, mo, mp, mq, mr, - /// ms, mt, mu, mv, mw, mx, my, mz, - /// na, nc, ne, nf, ng, ni, nl, no, - /// np, nr, nu, nz, om, pa, pe, pf, - /// pg, ph, pk, pl, pm, pn, pr, ps, - /// pt, pw, py, qa, qz, re, ro, rs, - /// ru, rw, sa, sb, sc, sd, se, sg, - /// sh, si, sj, sk, sl, sm, sn, so, - /// sr, ss, st, sv, sx, sy, sz, tc, - /// td, tf, tg, th, tj, tk, tl, tm, - /// tn, to, tr, tt, tv, tw, tz, ua, - /// ug, um, us, uy, uz, va, vc, ve, - /// vg, vi, vn, vu, wf, ws, xx, ye, - /// yt, za, zm, or zw. /// [JsonProperty("country")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/V2/Core/ClaimableSandboxes/ClaimableSandboxSandboxDetails.cs b/src/Stripe.net/Entities/V2/Core/ClaimableSandboxes/ClaimableSandboxSandboxDetails.cs deleted file mode 100644 index 566800c6d9..0000000000 --- a/src/Stripe.net/Entities/V2/Core/ClaimableSandboxes/ClaimableSandboxSandboxDetails.cs +++ /dev/null @@ -1,40 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.V2.Core -{ - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - public class ClaimableSandboxSandboxDetails : StripeEntity - { - /// - /// The sandbox's Stripe account ID. - /// - [JsonProperty("account")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("account")] -#endif - public string Account { get; set; } - - /// - /// Keys that can be used to set up an integration for this sandbox and operate on the - /// account. - /// - [JsonProperty("api_keys")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("api_keys")] -#endif - public ClaimableSandboxSandboxDetailsApiKeys ApiKeys { get; set; } - - /// - /// The livemode sandbox Stripe account ID. This field is only set if the user activates - /// their sandbox and chooses to install your platform's Stripe App in their live account. - /// - [JsonProperty("owner_account")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("owner_account")] -#endif - public string OwnerAccount { get; set; } - } -} diff --git a/src/Stripe.net/Entities/V2/Core/Persons/PersonAdditionalAddress.cs b/src/Stripe.net/Entities/V2/Core/Persons/PersonAdditionalAddress.cs deleted file mode 100644 index 400d19984f..0000000000 --- a/src/Stripe.net/Entities/V2/Core/Persons/PersonAdditionalAddress.cs +++ /dev/null @@ -1,116 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.V2.Core -{ - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - public class PersonAdditionalAddress : StripeEntity - { - /// - /// City, district, suburb, town, or village. - /// - [JsonProperty("city")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("city")] -#endif - public string City { get; set; } - - /// - /// Two-letter country code (ISO - /// 3166-1 alpha-2). - /// One of: ad, ae, af, ag, ai, al, am, - /// ao, aq, ar, as, at, au, aw, ax, - /// az, ba, bb, bd, be, bf, bg, bh, - /// bi, bj, bl, bm, bn, bo, bq, br, - /// bs, bt, bv, bw, by, bz, ca, cc, - /// cd, cf, cg, ch, ci, ck, cl, cm, - /// cn, co, cr, cu, cv, cw, cx, cy, - /// cz, de, dj, dk, dm, do, dz, ec, - /// ee, eg, eh, er, es, et, fi, fj, - /// fk, fm, fo, fr, ga, gb, gd, ge, - /// gf, gg, gh, gi, gl, gm, gn, gp, - /// gq, gr, gs, gt, gu, gw, gy, hk, - /// hm, hn, hr, ht, hu, id, ie, il, - /// im, in, io, iq, ir, is, it, je, - /// jm, jo, jp, ke, kg, kh, ki, km, - /// kn, kp, kr, kw, ky, kz, la, lb, - /// lc, li, lk, lr, ls, lt, lu, lv, - /// ly, ma, mc, md, me, mf, mg, mh, - /// mk, ml, mm, mn, mo, mp, mq, mr, - /// ms, mt, mu, mv, mw, mx, my, mz, - /// na, nc, ne, nf, ng, ni, nl, no, - /// np, nr, nu, nz, om, pa, pe, pf, - /// pg, ph, pk, pl, pm, pn, pr, ps, - /// pt, pw, py, qa, qz, re, ro, rs, - /// ru, rw, sa, sb, sc, sd, se, sg, - /// sh, si, sj, sk, sl, sm, sn, so, - /// sr, ss, st, sv, sx, sy, sz, tc, - /// td, tf, tg, th, tj, tk, tl, tm, - /// tn, to, tr, tt, tv, tw, tz, ua, - /// ug, um, us, uy, uz, va, vc, ve, - /// vg, vi, vn, vu, wf, ws, xx, ye, - /// yt, za, zm, or zw. - /// - [JsonProperty("country")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("country")] -#endif - public string Country { get; set; } - - /// - /// Address line 1 (e.g., street, PO Box, or company name). - /// - [JsonProperty("line1")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("line1")] -#endif - public string Line1 { get; set; } - - /// - /// Address line 2 (e.g., apartment, suite, unit, or building). - /// - [JsonProperty("line2")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("line2")] -#endif - public string Line2 { get; set; } - - /// - /// ZIP or postal code. - /// - [JsonProperty("postal_code")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("postal_code")] -#endif - public string PostalCode { get; set; } - - /// - /// Purpose of additional address. - /// - [JsonProperty("purpose")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("purpose")] -#endif - public string Purpose { get; set; } - - /// - /// State, county, province, or region. - /// - [JsonProperty("state")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("state")] -#endif - public string State { get; set; } - - /// - /// Town or cho-me. - /// - [JsonProperty("town")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("town")] -#endif - public string Town { get; set; } - } -} diff --git a/src/Stripe.net/Entities/V2/Core/Persons/PersonAddress.cs b/src/Stripe.net/Entities/V2/Core/Persons/PersonAddress.cs deleted file mode 100644 index 5a5feb6beb..0000000000 --- a/src/Stripe.net/Entities/V2/Core/Persons/PersonAddress.cs +++ /dev/null @@ -1,107 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.V2.Core -{ - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - public class PersonAddress : StripeEntity - { - /// - /// City, district, suburb, town, or village. - /// - [JsonProperty("city")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("city")] -#endif - public string City { get; set; } - - /// - /// Two-letter country code (ISO - /// 3166-1 alpha-2). - /// One of: ad, ae, af, ag, ai, al, am, - /// ao, aq, ar, as, at, au, aw, ax, - /// az, ba, bb, bd, be, bf, bg, bh, - /// bi, bj, bl, bm, bn, bo, bq, br, - /// bs, bt, bv, bw, by, bz, ca, cc, - /// cd, cf, cg, ch, ci, ck, cl, cm, - /// cn, co, cr, cu, cv, cw, cx, cy, - /// cz, de, dj, dk, dm, do, dz, ec, - /// ee, eg, eh, er, es, et, fi, fj, - /// fk, fm, fo, fr, ga, gb, gd, ge, - /// gf, gg, gh, gi, gl, gm, gn, gp, - /// gq, gr, gs, gt, gu, gw, gy, hk, - /// hm, hn, hr, ht, hu, id, ie, il, - /// im, in, io, iq, ir, is, it, je, - /// jm, jo, jp, ke, kg, kh, ki, km, - /// kn, kp, kr, kw, ky, kz, la, lb, - /// lc, li, lk, lr, ls, lt, lu, lv, - /// ly, ma, mc, md, me, mf, mg, mh, - /// mk, ml, mm, mn, mo, mp, mq, mr, - /// ms, mt, mu, mv, mw, mx, my, mz, - /// na, nc, ne, nf, ng, ni, nl, no, - /// np, nr, nu, nz, om, pa, pe, pf, - /// pg, ph, pk, pl, pm, pn, pr, ps, - /// pt, pw, py, qa, qz, re, ro, rs, - /// ru, rw, sa, sb, sc, sd, se, sg, - /// sh, si, sj, sk, sl, sm, sn, so, - /// sr, ss, st, sv, sx, sy, sz, tc, - /// td, tf, tg, th, tj, tk, tl, tm, - /// tn, to, tr, tt, tv, tw, tz, ua, - /// ug, um, us, uy, uz, va, vc, ve, - /// vg, vi, vn, vu, wf, ws, xx, ye, - /// yt, za, zm, or zw. - /// - [JsonProperty("country")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("country")] -#endif - public string Country { get; set; } - - /// - /// Address line 1 (e.g., street, PO Box, or company name). - /// - [JsonProperty("line1")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("line1")] -#endif - public string Line1 { get; set; } - - /// - /// Address line 2 (e.g., apartment, suite, unit, or building). - /// - [JsonProperty("line2")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("line2")] -#endif - public string Line2 { get; set; } - - /// - /// ZIP or postal code. - /// - [JsonProperty("postal_code")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("postal_code")] -#endif - public string PostalCode { get; set; } - - /// - /// State, county, province, or region. - /// - [JsonProperty("state")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("state")] -#endif - public string State { get; set; } - - /// - /// Town or cho-me. - /// - [JsonProperty("town")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("town")] -#endif - public string Town { get; set; } - } -} diff --git a/src/Stripe.net/Entities/V2/Core/Persons/PersonScriptAddressesKana.cs b/src/Stripe.net/Entities/V2/Core/Persons/PersonScriptAddressesKana.cs deleted file mode 100644 index abf3ac5a83..0000000000 --- a/src/Stripe.net/Entities/V2/Core/Persons/PersonScriptAddressesKana.cs +++ /dev/null @@ -1,107 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.V2.Core -{ - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - public class PersonScriptAddressesKana : StripeEntity - { - /// - /// City, district, suburb, town, or village. - /// - [JsonProperty("city")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("city")] -#endif - public string City { get; set; } - - /// - /// Two-letter country code (ISO - /// 3166-1 alpha-2). - /// One of: ad, ae, af, ag, ai, al, am, - /// ao, aq, ar, as, at, au, aw, ax, - /// az, ba, bb, bd, be, bf, bg, bh, - /// bi, bj, bl, bm, bn, bo, bq, br, - /// bs, bt, bv, bw, by, bz, ca, cc, - /// cd, cf, cg, ch, ci, ck, cl, cm, - /// cn, co, cr, cu, cv, cw, cx, cy, - /// cz, de, dj, dk, dm, do, dz, ec, - /// ee, eg, eh, er, es, et, fi, fj, - /// fk, fm, fo, fr, ga, gb, gd, ge, - /// gf, gg, gh, gi, gl, gm, gn, gp, - /// gq, gr, gs, gt, gu, gw, gy, hk, - /// hm, hn, hr, ht, hu, id, ie, il, - /// im, in, io, iq, ir, is, it, je, - /// jm, jo, jp, ke, kg, kh, ki, km, - /// kn, kp, kr, kw, ky, kz, la, lb, - /// lc, li, lk, lr, ls, lt, lu, lv, - /// ly, ma, mc, md, me, mf, mg, mh, - /// mk, ml, mm, mn, mo, mp, mq, mr, - /// ms, mt, mu, mv, mw, mx, my, mz, - /// na, nc, ne, nf, ng, ni, nl, no, - /// np, nr, nu, nz, om, pa, pe, pf, - /// pg, ph, pk, pl, pm, pn, pr, ps, - /// pt, pw, py, qa, qz, re, ro, rs, - /// ru, rw, sa, sb, sc, sd, se, sg, - /// sh, si, sj, sk, sl, sm, sn, so, - /// sr, ss, st, sv, sx, sy, sz, tc, - /// td, tf, tg, th, tj, tk, tl, tm, - /// tn, to, tr, tt, tv, tw, tz, ua, - /// ug, um, us, uy, uz, va, vc, ve, - /// vg, vi, vn, vu, wf, ws, xx, ye, - /// yt, za, zm, or zw. - /// - [JsonProperty("country")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("country")] -#endif - public string Country { get; set; } - - /// - /// Address line 1 (e.g., street, PO Box, or company name). - /// - [JsonProperty("line1")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("line1")] -#endif - public string Line1 { get; set; } - - /// - /// Address line 2 (e.g., apartment, suite, unit, or building). - /// - [JsonProperty("line2")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("line2")] -#endif - public string Line2 { get; set; } - - /// - /// ZIP or postal code. - /// - [JsonProperty("postal_code")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("postal_code")] -#endif - public string PostalCode { get; set; } - - /// - /// State, county, province, or region. - /// - [JsonProperty("state")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("state")] -#endif - public string State { get; set; } - - /// - /// Town or cho-me. - /// - [JsonProperty("town")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("town")] -#endif - public string Town { get; set; } - } -} diff --git a/src/Stripe.net/Entities/V2/Core/Persons/PersonScriptAddressesKanji.cs b/src/Stripe.net/Entities/V2/Core/Persons/PersonScriptAddressesKanji.cs deleted file mode 100644 index 06fd558ffc..0000000000 --- a/src/Stripe.net/Entities/V2/Core/Persons/PersonScriptAddressesKanji.cs +++ /dev/null @@ -1,107 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.V2.Core -{ - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - public class PersonScriptAddressesKanji : StripeEntity - { - /// - /// City, district, suburb, town, or village. - /// - [JsonProperty("city")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("city")] -#endif - public string City { get; set; } - - /// - /// Two-letter country code (ISO - /// 3166-1 alpha-2). - /// One of: ad, ae, af, ag, ai, al, am, - /// ao, aq, ar, as, at, au, aw, ax, - /// az, ba, bb, bd, be, bf, bg, bh, - /// bi, bj, bl, bm, bn, bo, bq, br, - /// bs, bt, bv, bw, by, bz, ca, cc, - /// cd, cf, cg, ch, ci, ck, cl, cm, - /// cn, co, cr, cu, cv, cw, cx, cy, - /// cz, de, dj, dk, dm, do, dz, ec, - /// ee, eg, eh, er, es, et, fi, fj, - /// fk, fm, fo, fr, ga, gb, gd, ge, - /// gf, gg, gh, gi, gl, gm, gn, gp, - /// gq, gr, gs, gt, gu, gw, gy, hk, - /// hm, hn, hr, ht, hu, id, ie, il, - /// im, in, io, iq, ir, is, it, je, - /// jm, jo, jp, ke, kg, kh, ki, km, - /// kn, kp, kr, kw, ky, kz, la, lb, - /// lc, li, lk, lr, ls, lt, lu, lv, - /// ly, ma, mc, md, me, mf, mg, mh, - /// mk, ml, mm, mn, mo, mp, mq, mr, - /// ms, mt, mu, mv, mw, mx, my, mz, - /// na, nc, ne, nf, ng, ni, nl, no, - /// np, nr, nu, nz, om, pa, pe, pf, - /// pg, ph, pk, pl, pm, pn, pr, ps, - /// pt, pw, py, qa, qz, re, ro, rs, - /// ru, rw, sa, sb, sc, sd, se, sg, - /// sh, si, sj, sk, sl, sm, sn, so, - /// sr, ss, st, sv, sx, sy, sz, tc, - /// td, tf, tg, th, tj, tk, tl, tm, - /// tn, to, tr, tt, tv, tw, tz, ua, - /// ug, um, us, uy, uz, va, vc, ve, - /// vg, vi, vn, vu, wf, ws, xx, ye, - /// yt, za, zm, or zw. - /// - [JsonProperty("country")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("country")] -#endif - public string Country { get; set; } - - /// - /// Address line 1 (e.g., street, PO Box, or company name). - /// - [JsonProperty("line1")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("line1")] -#endif - public string Line1 { get; set; } - - /// - /// Address line 2 (e.g., apartment, suite, unit, or building). - /// - [JsonProperty("line2")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("line2")] -#endif - public string Line2 { get; set; } - - /// - /// ZIP or postal code. - /// - [JsonProperty("postal_code")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("postal_code")] -#endif - public string PostalCode { get; set; } - - /// - /// State, county, province, or region. - /// - [JsonProperty("state")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("state")] -#endif - public string State { get; set; } - - /// - /// Town or cho-me. - /// - [JsonProperty("town")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("town")] -#endif - public string Town { get; set; } - } -} diff --git a/src/Stripe.net/Entities/V2/DeletedObject/DeletedObject.cs b/src/Stripe.net/Entities/V2/DeletedObject/DeletedObject.cs new file mode 100644 index 0000000000..3fca381bbc --- /dev/null +++ b/src/Stripe.net/Entities/V2/DeletedObject/DeletedObject.cs @@ -0,0 +1,30 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2 +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class DeletedObject : StripeEntity, IHasId, IHasObject + { + /// + /// The ID of the object that's being deleted. + /// + [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif + public string Id { get; set; } + + /// + /// String representing the type of the object that has been deleted. Objects of the same + /// type share the same value of the object field. + /// + [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif + public string Object { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/MoneyManagement/FinancialAccounts/FinancialAccount.cs b/src/Stripe.net/Entities/V2/MoneyManagement/FinancialAccounts/FinancialAccount.cs index 1125979063..861b2aebc4 100644 --- a/src/Stripe.net/Entities/V2/MoneyManagement/FinancialAccounts/FinancialAccount.cs +++ b/src/Stripe.net/Entities/V2/MoneyManagement/FinancialAccounts/FinancialAccount.cs @@ -47,38 +47,6 @@ public class FinancialAccount : StripeEntity, IHasId, IHasMeta /// /// Open Enum. Two-letter country code that represents the country where the LegalEntity /// associated with the FinancialAccount is based in. - /// One of: ad, ae, af, ag, ai, al, am, - /// ao, aq, ar, as, at, au, aw, ax, - /// az, ba, bb, bd, be, bf, bg, bh, - /// bi, bj, bl, bm, bn, bo, bq, br, - /// bs, bt, bv, bw, by, bz, ca, cc, - /// cd, cf, cg, ch, ci, ck, cl, cm, - /// cn, co, cr, cu, cv, cw, cx, cy, - /// cz, de, dj, dk, dm, do, dz, ec, - /// ee, eg, eh, er, es, et, fi, fj, - /// fk, fm, fo, fr, ga, gb, gd, ge, - /// gf, gg, gh, gi, gl, gm, gn, gp, - /// gq, gr, gs, gt, gu, gw, gy, hk, - /// hm, hn, hr, ht, hu, id, ie, il, - /// im, in, io, iq, ir, is, it, je, - /// jm, jo, jp, ke, kg, kh, ki, km, - /// kn, kp, kr, kw, ky, kz, la, lb, - /// lc, li, lk, lr, ls, lt, lu, lv, - /// ly, ma, mc, md, me, mf, mg, mh, - /// mk, ml, mm, mn, mo, mp, mq, mr, - /// ms, mt, mu, mv, mw, mx, my, mz, - /// na, nc, ne, nf, ng, ni, nl, no, - /// np, nr, nu, nz, om, pa, pe, pf, - /// pg, ph, pk, pl, pm, pn, pr, ps, - /// pt, pw, py, qa, qz, re, ro, rs, - /// ru, rw, sa, sb, sc, sd, se, sg, - /// sh, si, sj, sk, sl, sm, sn, so, - /// sr, ss, st, sv, sx, sy, sz, tc, - /// td, tf, tg, th, tj, tk, tl, tm, - /// tn, to, tr, tt, tv, tw, tz, ua, - /// ug, um, us, uy, uz, va, vc, ve, - /// vg, vi, vn, vu, wf, ws, xx, ye, - /// yt, za, zm, or zw. /// [JsonProperty("country")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/V2/MoneyManagement/FinancialAccounts/FinancialAccountStorage.cs b/src/Stripe.net/Entities/V2/MoneyManagement/FinancialAccounts/FinancialAccountStorage.cs index abed85183a..312e1e7c5b 100644 --- a/src/Stripe.net/Entities/V2/MoneyManagement/FinancialAccounts/FinancialAccountStorage.cs +++ b/src/Stripe.net/Entities/V2/MoneyManagement/FinancialAccounts/FinancialAccountStorage.cs @@ -11,32 +11,6 @@ public class FinancialAccountStorage : StripeEntity { /// /// The currencies that this FinancialAccount can hold. - /// One of: aed, afn, all, amd, ang, aoa, - /// ars, aud, awg, azn, bam, bbd, bdt, - /// bgn, bhd, bif, bmd, bnd, bob, bov, - /// brl, bsd, btn, bwp, byn, byr, bzd, - /// cad, cdf, che, chf, chw, clf, clp, - /// cny, cop, cou, crc, cuc, cup, cve, - /// czk, djf, dkk, dop, dzd, eek, egp, - /// ern, etb, eur, fjd, fkp, gbp, gel, - /// ghc, ghs, gip, gmd, gnf, gtq, gyd, - /// hkd, hnl, hrk, htg, huf, idr, ils, - /// inr, iqd, irr, isk, jmd, jod, jpy, - /// kes, kgs, khr, kmf, kpw, krw, kwd, - /// kyd, kzt, lak, lbp, lkr, lrd, lsl, - /// ltl, lvl, lyd, mad, mdl, mga, mkd, - /// mmk, mnt, mop, mro, mru, mur, mvr, - /// mwk, mxn, mxv, myr, mzn, nad, ngn, - /// nio, nok, npr, nzd, omr, pab, pen, - /// pgk, php, pkr, pln, pyg, qar, ron, - /// rsd, rub, rwf, sar, sbd, scr, sdg, - /// sek, sgd, shp, sle, sll, sos, srd, - /// ssp, std, stn, svc, syp, szl, thb, - /// tjs, tmt, tnd, top, try, ttd, twd, - /// tzs, uah, ugx, usd, usdb, usdc, usn, - /// uyi, uyu, uzs, vef, ves, vnd, vuv, - /// wst, xaf, xcd, xcg, xof, xpf, yer, - /// zar, zmk, zmw, zwd, zwg, or zwl. /// [JsonProperty("holds_currencies")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/V2/MoneyManagement/FinancialAddresses/FinancialAddress.cs b/src/Stripe.net/Entities/V2/MoneyManagement/FinancialAddresses/FinancialAddress.cs index 4b77bdf04a..53dae5e16b 100644 --- a/src/Stripe.net/Entities/V2/MoneyManagement/FinancialAddresses/FinancialAddress.cs +++ b/src/Stripe.net/Entities/V2/MoneyManagement/FinancialAddresses/FinancialAddress.cs @@ -55,32 +55,6 @@ public class FinancialAddress : StripeEntity, IHasId, IHasObje /// /// Open Enum. The currency the FinancialAddress supports. - /// One of: aed, afn, all, amd, ang, aoa, - /// ars, aud, awg, azn, bam, bbd, bdt, - /// bgn, bhd, bif, bmd, bnd, bob, bov, - /// brl, bsd, btn, bwp, byn, byr, bzd, - /// cad, cdf, che, chf, chw, clf, clp, - /// cny, cop, cou, crc, cuc, cup, cve, - /// czk, djf, dkk, dop, dzd, eek, egp, - /// ern, etb, eur, fjd, fkp, gbp, gel, - /// ghc, ghs, gip, gmd, gnf, gtq, gyd, - /// hkd, hnl, hrk, htg, huf, idr, ils, - /// inr, iqd, irr, isk, jmd, jod, jpy, - /// kes, kgs, khr, kmf, kpw, krw, kwd, - /// kyd, kzt, lak, lbp, lkr, lrd, lsl, - /// ltl, lvl, lyd, mad, mdl, mga, mkd, - /// mmk, mnt, mop, mro, mru, mur, mvr, - /// mwk, mxn, mxv, myr, mzn, nad, ngn, - /// nio, nok, npr, nzd, omr, pab, pen, - /// pgk, php, pkr, pln, pyg, qar, ron, - /// rsd, rub, rwf, sar, sbd, scr, sdg, - /// sek, sgd, shp, sle, sll, sos, srd, - /// ssp, std, stn, svc, syp, szl, thb, - /// tjs, tmt, tnd, top, try, ttd, twd, - /// tzs, uah, ugx, usd, usdb, usdc, usn, - /// uyi, uyu, uzs, vef, ves, vnd, vuv, - /// wst, xaf, xcd, xcg, xof, xpf, yer, - /// zar, zmk, zmw, zwd, zwg, or zwl. /// [JsonProperty("currency")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/V2/MoneyManagement/InboundTransfers/InboundTransferTransferHistory.cs b/src/Stripe.net/Entities/V2/MoneyManagement/InboundTransfers/InboundTransferTransferHistory.cs index 3717c1d5d8..d3b18b9ef0 100644 --- a/src/Stripe.net/Entities/V2/MoneyManagement/InboundTransfers/InboundTransferTransferHistory.cs +++ b/src/Stripe.net/Entities/V2/MoneyManagement/InboundTransfers/InboundTransferTransferHistory.cs @@ -2,6 +2,7 @@ namespace Stripe.V2.MoneyManagement { using System; + using System.Collections.Generic; using Newtonsoft.Json; #if NET6_0_OR_GREATER using STJS = System.Text.Json.Serialization; @@ -73,7 +74,7 @@ public class InboundTransferTransferHistory : StripeEntity BankDebitProcessing { get; set; } /// /// The history entry for a queued InboundTransfer. @@ -82,7 +83,7 @@ public class InboundTransferTransferHistory : StripeEntity BankDebitQueued { get; set; } /// /// The history entry for a returned InboundTransfer. @@ -100,6 +101,6 @@ public class InboundTransferTransferHistory : StripeEntity BankDebitSucceeded { get; set; } } } diff --git a/src/Stripe.net/Entities/V2/MoneyManagement/InboundTransfers/InboundTransferTransferHistoryBankDebitProcessing.cs b/src/Stripe.net/Entities/V2/MoneyManagement/InboundTransfers/InboundTransferTransferHistoryBankDebitProcessing.cs deleted file mode 100644 index 19d6cde79b..0000000000 --- a/src/Stripe.net/Entities/V2/MoneyManagement/InboundTransfers/InboundTransferTransferHistoryBankDebitProcessing.cs +++ /dev/null @@ -1,7 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.V2.MoneyManagement -{ - public class InboundTransferTransferHistoryBankDebitProcessing : StripeEntity - { - } -} diff --git a/src/Stripe.net/Entities/V2/MoneyManagement/InboundTransfers/InboundTransferTransferHistoryBankDebitQueued.cs b/src/Stripe.net/Entities/V2/MoneyManagement/InboundTransfers/InboundTransferTransferHistoryBankDebitQueued.cs deleted file mode 100644 index d985a9ef84..0000000000 --- a/src/Stripe.net/Entities/V2/MoneyManagement/InboundTransfers/InboundTransferTransferHistoryBankDebitQueued.cs +++ /dev/null @@ -1,7 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.V2.MoneyManagement -{ - public class InboundTransferTransferHistoryBankDebitQueued : StripeEntity - { - } -} diff --git a/src/Stripe.net/Entities/V2/MoneyManagement/InboundTransfers/InboundTransferTransferHistoryBankDebitSucceeded.cs b/src/Stripe.net/Entities/V2/MoneyManagement/InboundTransfers/InboundTransferTransferHistoryBankDebitSucceeded.cs deleted file mode 100644 index e8fc8891c7..0000000000 --- a/src/Stripe.net/Entities/V2/MoneyManagement/InboundTransfers/InboundTransferTransferHistoryBankDebitSucceeded.cs +++ /dev/null @@ -1,7 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.V2.MoneyManagement -{ - public class InboundTransferTransferHistoryBankDebitSucceeded : StripeEntity - { - } -} diff --git a/src/Stripe.net/Entities/V2/MoneyManagement/OutboundPayments/OutboundPayment.cs b/src/Stripe.net/Entities/V2/MoneyManagement/OutboundPayments/OutboundPayment.cs index 1e018f24ed..6fd1d7e924 100644 --- a/src/Stripe.net/Entities/V2/MoneyManagement/OutboundPayments/OutboundPayment.cs +++ b/src/Stripe.net/Entities/V2/MoneyManagement/OutboundPayments/OutboundPayment.cs @@ -90,7 +90,7 @@ public class OutboundPayment : StripeEntity, IHasId, IHasMetada #if NET6_0_OR_GREATER [STJS.JsonPropertyName("expected_arrival_date")] #endif - public DateTime? ExpectedArrivalDate { get; set; } + public DateTime ExpectedArrivalDate { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// /// The FinancialAccount that funds were pulled from. diff --git a/src/Stripe.net/Entities/V2/MoneyManagement/OutboundPayments/OutboundPaymentStatusTransitions.cs b/src/Stripe.net/Entities/V2/MoneyManagement/OutboundPayments/OutboundPaymentStatusTransitions.cs index bfc7806af7..5f35f64f8c 100644 --- a/src/Stripe.net/Entities/V2/MoneyManagement/OutboundPayments/OutboundPaymentStatusTransitions.cs +++ b/src/Stripe.net/Entities/V2/MoneyManagement/OutboundPayments/OutboundPaymentStatusTransitions.cs @@ -18,7 +18,7 @@ public class OutboundPaymentStatusTransitions : StripeEntity /// Timestamp describing when an OutboundPayment changed status to failed. @@ -29,7 +29,7 @@ public class OutboundPaymentStatusTransitions : StripeEntity /// Timestamp describing when an OutboundPayment changed status to posted. @@ -40,7 +40,7 @@ public class OutboundPaymentStatusTransitions : StripeEntity /// Timestamp describing when an OutboundPayment changed status to returned. @@ -51,6 +51,6 @@ public class OutboundPaymentStatusTransitions : StripeEntity, IHasId, IH public OutboundSetupIntentNextAction NextAction { get; set; } /// - /// Information about the payout method that’s created and linked to this outbound setup - /// intent. + /// Use the PayoutMethods API to list and interact with PayoutMethod objects. /// [JsonProperty("payout_method")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/V2/MoneyManagement/OutboundTransfers/OutboundTransfer.cs b/src/Stripe.net/Entities/V2/MoneyManagement/OutboundTransfers/OutboundTransfer.cs index 15f98b642a..6d4dd73d28 100644 --- a/src/Stripe.net/Entities/V2/MoneyManagement/OutboundTransfers/OutboundTransfer.cs +++ b/src/Stripe.net/Entities/V2/MoneyManagement/OutboundTransfers/OutboundTransfer.cs @@ -90,7 +90,7 @@ public class OutboundTransfer : StripeEntity, IHasId, IHasMeta #if NET6_0_OR_GREATER [STJS.JsonPropertyName("expected_arrival_date")] #endif - public DateTime? ExpectedArrivalDate { get; set; } + public DateTime ExpectedArrivalDate { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// /// The FinancialAccount that funds were pulled from. diff --git a/src/Stripe.net/Entities/V2/MoneyManagement/OutboundTransfers/OutboundTransferStatusTransitions.cs b/src/Stripe.net/Entities/V2/MoneyManagement/OutboundTransfers/OutboundTransferStatusTransitions.cs index 8a4604cca9..6b580921a9 100644 --- a/src/Stripe.net/Entities/V2/MoneyManagement/OutboundTransfers/OutboundTransferStatusTransitions.cs +++ b/src/Stripe.net/Entities/V2/MoneyManagement/OutboundTransfers/OutboundTransferStatusTransitions.cs @@ -18,7 +18,7 @@ public class OutboundTransferStatusTransitions : StripeEntity /// Timestamp describing when an OutboundTransfer changed status to failed. @@ -29,7 +29,7 @@ public class OutboundTransferStatusTransitions : StripeEntity /// Timestamp describing when an OutboundTransfer changed status to posted. @@ -40,7 +40,7 @@ public class OutboundTransferStatusTransitions : StripeEntity /// Timestamp describing when an OutboundTransfer changed status to returned. @@ -51,6 +51,6 @@ public class OutboundTransferStatusTransitions : StripeEntity { + /// + /// The default content of the localizable string. + /// [JsonProperty("content")] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("content")] #endif public string Content { get; set; } + /// + /// A unique key representing the instance of this localizable string. + /// [JsonProperty("localization_key")] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("localization_key")] diff --git a/src/Stripe.net/Entities/V2/MoneyManagement/ReceivedCredits/ReceivedCreditStatusTransitions.cs b/src/Stripe.net/Entities/V2/MoneyManagement/ReceivedCredits/ReceivedCreditStatusTransitions.cs index a7a0d93258..e97779bf19 100644 --- a/src/Stripe.net/Entities/V2/MoneyManagement/ReceivedCredits/ReceivedCreditStatusTransitions.cs +++ b/src/Stripe.net/Entities/V2/MoneyManagement/ReceivedCredits/ReceivedCreditStatusTransitions.cs @@ -18,7 +18,7 @@ public class ReceivedCreditStatusTransitions : StripeEntity /// Timestamp describing when the ReceivedCredit changed status to returned. @@ -29,7 +29,7 @@ public class ReceivedCreditStatusTransitions : StripeEntity /// Timestamp describing when the ReceivedCredit was marked as succeeded. Represented @@ -40,6 +40,6 @@ public class ReceivedCreditStatusTransitions : StripeEntity /// The time when the ReceivedDebit was marked as failed. Represented as a RFC 3339 @@ -29,7 +29,7 @@ public class ReceivedDebitStatusTransitions : StripeEntity /// The time when the ReceivedDebit was marked as succeeded. Represented as a RFC @@ -40,6 +40,6 @@ public class ReceivedDebitStatusTransitions : StripeEntity /// The time at which the Transaction became void. Only present if status == void. @@ -25,6 +25,6 @@ public class TransactionStatusTransitions : StripeEntity /// The account (if any) that the payment is attributed to for tax reporting, and where diff --git a/src/Stripe.net/Entities/V2/Reporting/ReportRuns/ReportRun.cs b/src/Stripe.net/Entities/V2/Reporting/ReportRuns/ReportRun.cs deleted file mode 100644 index a0b08bdbab..0000000000 --- a/src/Stripe.net/Entities/V2/Reporting/ReportRuns/ReportRun.cs +++ /dev/null @@ -1,123 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.V2.Reporting -{ - using System; - using System.Collections.Generic; - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - /// - /// The ReportRun object represents an instance of a Report generated with - /// specific run parameters. Once the object is created, Stripe begins processing the - /// report. When the report has finished running, it will give you a reference to the - /// results. - /// - public class ReportRun : StripeEntity, IHasId, IHasObject - { - /// - /// The unique identifier of the ReportRun object. - /// - [JsonProperty("id")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("id")] -#endif - public string Id { get; set; } - - /// - /// String representing the object's type. Objects of the same type share the same value of - /// the object field. - /// - [JsonProperty("object")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("object")] -#endif - public string Object { get; set; } - - /// - /// Time at which the object was created. - /// - [JsonProperty("created")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("created")] -#endif - public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; - - /// - /// Has the value true if the object exists in live mode or the value false if - /// the object exists in test mode. - /// - [JsonProperty("livemode")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("livemode")] -#endif - public bool Livemode { get; set; } - - /// - /// The unique identifier of the Report object which was run. - /// - [JsonProperty("report")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("report")] -#endif - public string Report { get; set; } - - /// - /// The human-readable name of the Report which was run. - /// - [JsonProperty("report_name")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("report_name")] -#endif - public string ReportName { get; set; } - - /// - /// The parameters used to customize the generation of the report. - /// - [JsonProperty("report_parameters")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("report_parameters")] -#endif - public Dictionary ReportParameters { get; set; } - - /// - /// Details how to retrieve the results of a successfully completed ReportRun. - /// - [JsonProperty("result")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("result")] -#endif - public ReportRunResult Result { get; set; } - - /// - /// The options specified for customizing the output file of the ReportRun. - /// - [JsonProperty("result_options")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("result_options")] -#endif - public ReportRunResultOptions ResultOptions { get; set; } - - /// - /// The current status of the ReportRun. - /// One of: failed, running, or succeeded. - /// - [JsonProperty("status")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("status")] -#endif - public string Status { get; set; } - - /// - /// Additional details about the current state of the ReportRun. The field is - /// currently only populated when a ReportRun is in the failed state, - /// providing more information about why the report failed to generate successfully. - /// - [JsonProperty("status_details")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("status_details")] -#endif - public Dictionary StatusDetails { get; set; } - } -} diff --git a/src/Stripe.net/Entities/V2/Reporting/ReportRuns/ReportRunReportParameters.cs b/src/Stripe.net/Entities/V2/Reporting/ReportRuns/ReportRunReportParameters.cs deleted file mode 100644 index dd0cbccb9c..0000000000 --- a/src/Stripe.net/Entities/V2/Reporting/ReportRuns/ReportRunReportParameters.cs +++ /dev/null @@ -1,39 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.V2.Reporting -{ - using System; - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - public class ReportRunReportParameters : StripeEntity - { - /// - /// Parameter with an array data type. - /// - [JsonProperty("array_value")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("array_value")] -#endif - public ReportRunReportParametersArrayValue ArrayValue { get; set; } - - /// - /// Parameter with a string data type. - /// - [JsonProperty("string_value")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("string_value")] -#endif - public string StringValue { get; set; } - - /// - /// Parameter with a timestamp data type. - /// - [JsonProperty("timestamp_value")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("timestamp_value")] -#endif - public DateTime? TimestampValue { get; set; } - } -} diff --git a/src/Stripe.net/Entities/V2/Reporting/ReportRuns/ReportRunReportParametersArrayValue.cs b/src/Stripe.net/Entities/V2/Reporting/ReportRuns/ReportRunReportParametersArrayValue.cs deleted file mode 100644 index cef47f1bf7..0000000000 --- a/src/Stripe.net/Entities/V2/Reporting/ReportRuns/ReportRunReportParametersArrayValue.cs +++ /dev/null @@ -1,21 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.V2.Reporting -{ - using System.Collections.Generic; - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - public class ReportRunReportParametersArrayValue : StripeEntity - { - /// - /// The list of string values in the array. - /// - [JsonProperty("items")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("items")] -#endif - public List Items { get; set; } - } -} diff --git a/src/Stripe.net/Entities/V2/Reporting/ReportRuns/ReportRunResult.cs b/src/Stripe.net/Entities/V2/Reporting/ReportRuns/ReportRunResult.cs deleted file mode 100644 index 8f46067333..0000000000 --- a/src/Stripe.net/Entities/V2/Reporting/ReportRuns/ReportRunResult.cs +++ /dev/null @@ -1,30 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.V2.Reporting -{ - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - public class ReportRunResult : StripeEntity - { - /// - /// Contains metadata about the file produced by the ReportRun, including its content - /// type, size, and a URL to download its contents. - /// - [JsonProperty("file")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("file")] -#endif - public ReportRunResultFile File { get; set; } - - /// - /// The type of the ReportRun result. - /// - [JsonProperty("type")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("type")] -#endif - public string Type { get; set; } - } -} diff --git a/src/Stripe.net/Entities/V2/Reporting/ReportRuns/ReportRunResultFile.cs b/src/Stripe.net/Entities/V2/Reporting/ReportRuns/ReportRunResultFile.cs deleted file mode 100644 index b6a0372eb2..0000000000 --- a/src/Stripe.net/Entities/V2/Reporting/ReportRuns/ReportRunResultFile.cs +++ /dev/null @@ -1,39 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.V2.Reporting -{ - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - public class ReportRunResultFile : StripeEntity - { - /// - /// The content type of the file. - /// One of: csv, or zip. - /// - [JsonProperty("content_type")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("content_type")] -#endif - public string ContentType { get; set; } - - /// - /// A pre-signed URL that allows secure, time-limited access to download the file. - /// - [JsonProperty("download_url")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("download_url")] -#endif - public ReportRunResultFileDownloadUrl DownloadUrl { get; set; } - - /// - /// The total size of the file in bytes. - /// - [JsonProperty("size")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("size")] -#endif - public long Size { get; set; } - } -} diff --git a/src/Stripe.net/Entities/V2/Reporting/ReportRuns/ReportRunResultFileDownloadUrl.cs b/src/Stripe.net/Entities/V2/Reporting/ReportRuns/ReportRunResultFileDownloadUrl.cs deleted file mode 100644 index eb4bf879d3..0000000000 --- a/src/Stripe.net/Entities/V2/Reporting/ReportRuns/ReportRunResultFileDownloadUrl.cs +++ /dev/null @@ -1,30 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.V2.Reporting -{ - using System; - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - public class ReportRunResultFileDownloadUrl : StripeEntity - { - /// - /// The time that the URL expires. - /// - [JsonProperty("expires_at")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("expires_at")] -#endif - public DateTime? ExpiresAt { get; set; } - - /// - /// The URL that can be used for accessing the file. - /// - [JsonProperty("url")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("url")] -#endif - public string Url { get; set; } - } -} diff --git a/src/Stripe.net/Entities/V2/Reporting/ReportRuns/ReportRunResultOptions.cs b/src/Stripe.net/Entities/V2/Reporting/ReportRuns/ReportRunResultOptions.cs deleted file mode 100644 index 3e27e36c7a..0000000000 --- a/src/Stripe.net/Entities/V2/Reporting/ReportRuns/ReportRunResultOptions.cs +++ /dev/null @@ -1,21 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.V2.Reporting -{ - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - public class ReportRunResultOptions : StripeEntity - { - /// - /// If set, the generated report file will be compressed into a ZIP folder. This is useful - /// for reducing file size and download time for large reports. - /// - [JsonProperty("compress_file")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("compress_file")] -#endif - public bool? CompressFile { get; set; } - } -} diff --git a/src/Stripe.net/Entities/V2/Reporting/ReportRuns/ReportRunStatusDetails.cs b/src/Stripe.net/Entities/V2/Reporting/ReportRuns/ReportRunStatusDetails.cs deleted file mode 100644 index d43391b7f9..0000000000 --- a/src/Stripe.net/Entities/V2/Reporting/ReportRuns/ReportRunStatusDetails.cs +++ /dev/null @@ -1,30 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.V2.Reporting -{ - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - public class ReportRunStatusDetails : StripeEntity - { - /// - /// Error code categorizing the reason the ReportRun failed. - /// One of: file_size_above_limit, or internal_error. - /// - [JsonProperty("error_code")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("error_code")] -#endif - public string ErrorCode { get; set; } - - /// - /// Error message with additional details about the failure. - /// - [JsonProperty("error_message")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("error_message")] -#endif - public string ErrorMessage { get; set; } - } -} diff --git a/src/Stripe.net/Entities/V2/Reporting/Reports/Report.cs b/src/Stripe.net/Entities/V2/Reporting/Reports/Report.cs deleted file mode 100644 index 32e5dc1dce..0000000000 --- a/src/Stripe.net/Entities/V2/Reporting/Reports/Report.cs +++ /dev/null @@ -1,64 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.V2.Reporting -{ - using System.Collections.Generic; - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - /// - /// The Report resource represents a customizable report template that provides insights - /// into various aspects of your Stripe integration. - /// - public class Report : StripeEntity, IHasId, IHasObject - { - /// - /// The unique identifier of the Report object. - /// - [JsonProperty("id")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("id")] -#endif - public string Id { get; set; } - - /// - /// String representing the object's type. Objects of the same type share the same value of - /// the object field. - /// - [JsonProperty("object")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("object")] -#endif - public string Object { get; set; } - - /// - /// Has the value true if the object exists in live mode or the value false if - /// the object exists in test mode. - /// - [JsonProperty("livemode")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("livemode")] -#endif - public bool Livemode { get; set; } - - /// - /// The human-readable name of the Report. - /// - [JsonProperty("name")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("name")] -#endif - public string Name { get; set; } - - /// - /// Specification of the parameters that the Report accepts. It details each - /// parameter's name, description, whether it is required, and any validations performed. - /// - [JsonProperty("parameters")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("parameters")] -#endif - public Dictionary Parameters { get; set; } - } -} diff --git a/src/Stripe.net/Entities/V2/Reporting/Reports/ReportParameters.cs b/src/Stripe.net/Entities/V2/Reporting/Reports/ReportParameters.cs deleted file mode 100644 index 9f36768272..0000000000 --- a/src/Stripe.net/Entities/V2/Reporting/Reports/ReportParameters.cs +++ /dev/null @@ -1,66 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.V2.Reporting -{ - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - public class ReportParameters : StripeEntity - { - /// - /// For array parameters, provides details about the array elements. - /// - [JsonProperty("array_details")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("array_details")] -#endif - public ReportParametersArrayDetails ArrayDetails { get; set; } - - /// - /// Explains the purpose and usage of the parameter. - /// - [JsonProperty("description")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("description")] -#endif - public string Description { get; set; } - - /// - /// For enum parameters, provides the list of allowed values. - /// - [JsonProperty("enum_details")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("enum_details")] -#endif - public ReportParametersEnumDetails EnumDetails { get; set; } - - /// - /// Indicates whether the parameter must be provided. - /// - [JsonProperty("required")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("required")] -#endif - public bool Required { get; set; } - - /// - /// For timestamp parameters, specifies the allowed date range. - /// - [JsonProperty("timestamp_details")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("timestamp_details")] -#endif - public ReportParametersTimestampDetails TimestampDetails { get; set; } - - /// - /// The data type of the parameter. - /// One of: array, enum, string, or timestamp. - /// - [JsonProperty("type")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("type")] -#endif - public string Type { get; set; } - } -} diff --git a/src/Stripe.net/Entities/V2/Reporting/Reports/ReportParametersArrayDetails.cs b/src/Stripe.net/Entities/V2/Reporting/Reports/ReportParametersArrayDetails.cs deleted file mode 100644 index b2d13551ff..0000000000 --- a/src/Stripe.net/Entities/V2/Reporting/Reports/ReportParametersArrayDetails.cs +++ /dev/null @@ -1,29 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.V2.Reporting -{ - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - public class ReportParametersArrayDetails : StripeEntity - { - /// - /// Data type of the elements in the array. - /// - [JsonProperty("element_type")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("element_type")] -#endif - public string ElementType { get; set; } - - /// - /// Details about enum elements in the array. - /// - [JsonProperty("enum_details")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("enum_details")] -#endif - public ReportParametersArrayDetailsEnumDetails EnumDetails { get; set; } - } -} diff --git a/src/Stripe.net/Entities/V2/Reporting/Reports/ReportParametersArrayDetailsEnumDetails.cs b/src/Stripe.net/Entities/V2/Reporting/Reports/ReportParametersArrayDetailsEnumDetails.cs deleted file mode 100644 index 0be53e65fd..0000000000 --- a/src/Stripe.net/Entities/V2/Reporting/Reports/ReportParametersArrayDetailsEnumDetails.cs +++ /dev/null @@ -1,21 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.V2.Reporting -{ - using System.Collections.Generic; - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - public class ReportParametersArrayDetailsEnumDetails : StripeEntity - { - /// - /// Allowed values of the enum. - /// - [JsonProperty("allowed_values")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("allowed_values")] -#endif - public List AllowedValues { get; set; } - } -} diff --git a/src/Stripe.net/Entities/V2/Reporting/Reports/ReportParametersEnumDetails.cs b/src/Stripe.net/Entities/V2/Reporting/Reports/ReportParametersEnumDetails.cs deleted file mode 100644 index 03054e31d3..0000000000 --- a/src/Stripe.net/Entities/V2/Reporting/Reports/ReportParametersEnumDetails.cs +++ /dev/null @@ -1,21 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.V2.Reporting -{ - using System.Collections.Generic; - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - public class ReportParametersEnumDetails : StripeEntity - { - /// - /// Allowed values of the enum. - /// - [JsonProperty("allowed_values")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("allowed_values")] -#endif - public List AllowedValues { get; set; } - } -} diff --git a/src/Stripe.net/Entities/V2/Reporting/Reports/ReportParametersTimestampDetails.cs b/src/Stripe.net/Entities/V2/Reporting/Reports/ReportParametersTimestampDetails.cs deleted file mode 100644 index 241b5ba234..0000000000 --- a/src/Stripe.net/Entities/V2/Reporting/Reports/ReportParametersTimestampDetails.cs +++ /dev/null @@ -1,30 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.V2.Reporting -{ - using System; - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - public class ReportParametersTimestampDetails : StripeEntity - { - /// - /// Maximum permitted timestamp which can be requested. - /// - [JsonProperty("max")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("max")] -#endif - public DateTime Max { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; - - /// - /// Minimum permitted timestamp which can be requested. - /// - [JsonProperty("min")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("min")] -#endif - public DateTime Min { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; - } -} diff --git a/src/Stripe.net/Events/PushedV2ReportingReportRunUpdatedEvent.cs b/src/Stripe.net/Events/PushedV2BillingCadenceErroredEvent.cs similarity index 57% rename from src/Stripe.net/Events/PushedV2ReportingReportRunUpdatedEvent.cs rename to src/Stripe.net/Events/PushedV2BillingCadenceErroredEvent.cs index 008c105f0b..78e9ae23c5 100644 --- a/src/Stripe.net/Events/PushedV2ReportingReportRunUpdatedEvent.cs +++ b/src/Stripe.net/Events/PushedV2BillingCadenceErroredEvent.cs @@ -8,9 +8,9 @@ namespace Stripe.Events #endif /// - /// Occurs when a ReportRun is updated. + /// Occurs when a billing Cadence encounters an error during a tick. /// - public class PushedV2ReportingReportRunUpdatedEvent : V2.PushedEvent + public class PushedV2BillingCadenceErroredEvent : V2.PushedEvent { /// /// Object containing the reference to API resource relevant to the event. @@ -26,27 +26,27 @@ public class PushedV2ReportingReportRunUpdatedEvent : V2.PushedEvent /// Asynchronously retrieves the related object from the API. Make an API request on every /// call. /// - public Task FetchRelatedObjectAsync() + public Task FetchRelatedObjectAsync() { - return this.FetchRelatedObjectAsync(this.RelatedObject); + return this.FetchRelatedObjectAsync(this.RelatedObject); } /// /// Retrieves the related object from the API. Make an API request on every call. /// - public V2.Reporting.ReportRun FetchRelatedObject() + public V2.Billing.Cadence FetchRelatedObject() { - return this.FetchRelatedObject(this.RelatedObject); + return this.FetchRelatedObject(this.RelatedObject); } - public V2ReportingReportRunUpdatedEvent Pull() + public V2BillingCadenceErroredEvent Pull() { - return this.PullEvent(); + return this.PullEvent(); } - public Task PullAsync() + public Task PullAsync() { - return this.PullEventAsync(); + return this.PullEventAsync(); } } } diff --git a/src/Stripe.net/Events/PushedV2CoreAccountPersonCreatedEvent.cs b/src/Stripe.net/Events/PushedV2CoreAccountPersonCreatedEvent.cs index 5020b9caf1..1430882d62 100644 --- a/src/Stripe.net/Events/PushedV2CoreAccountPersonCreatedEvent.cs +++ b/src/Stripe.net/Events/PushedV2CoreAccountPersonCreatedEvent.cs @@ -26,17 +26,17 @@ public class PushedV2CoreAccountPersonCreatedEvent : V2.PushedEvent /// Asynchronously retrieves the related object from the API. Make an API request on every /// call. /// - public Task FetchRelatedObjectAsync() + public Task FetchRelatedObjectAsync() { - return this.FetchRelatedObjectAsync(this.RelatedObject); + return this.FetchRelatedObjectAsync(this.RelatedObject); } /// /// Retrieves the related object from the API. Make an API request on every call. /// - public V2.Core.Person FetchRelatedObject() + public V2.Core.AccountPerson FetchRelatedObject() { - return this.FetchRelatedObject(this.RelatedObject); + return this.FetchRelatedObject(this.RelatedObject); } public V2CoreAccountPersonCreatedEvent Pull() diff --git a/src/Stripe.net/Events/PushedV2CoreAccountPersonDeletedEvent.cs b/src/Stripe.net/Events/PushedV2CoreAccountPersonDeletedEvent.cs index 428567358c..83ffe5df91 100644 --- a/src/Stripe.net/Events/PushedV2CoreAccountPersonDeletedEvent.cs +++ b/src/Stripe.net/Events/PushedV2CoreAccountPersonDeletedEvent.cs @@ -26,17 +26,17 @@ public class PushedV2CoreAccountPersonDeletedEvent : V2.PushedEvent /// Asynchronously retrieves the related object from the API. Make an API request on every /// call. /// - public Task FetchRelatedObjectAsync() + public Task FetchRelatedObjectAsync() { - return this.FetchRelatedObjectAsync(this.RelatedObject); + return this.FetchRelatedObjectAsync(this.RelatedObject); } /// /// Retrieves the related object from the API. Make an API request on every call. /// - public V2.Core.Person FetchRelatedObject() + public V2.Core.AccountPerson FetchRelatedObject() { - return this.FetchRelatedObject(this.RelatedObject); + return this.FetchRelatedObject(this.RelatedObject); } public V2CoreAccountPersonDeletedEvent Pull() diff --git a/src/Stripe.net/Events/PushedV2CoreAccountPersonUpdatedEvent.cs b/src/Stripe.net/Events/PushedV2CoreAccountPersonUpdatedEvent.cs index dc98bc0e31..64fe964241 100644 --- a/src/Stripe.net/Events/PushedV2CoreAccountPersonUpdatedEvent.cs +++ b/src/Stripe.net/Events/PushedV2CoreAccountPersonUpdatedEvent.cs @@ -26,17 +26,17 @@ public class PushedV2CoreAccountPersonUpdatedEvent : V2.PushedEvent /// Asynchronously retrieves the related object from the API. Make an API request on every /// call. /// - public Task FetchRelatedObjectAsync() + public Task FetchRelatedObjectAsync() { - return this.FetchRelatedObjectAsync(this.RelatedObject); + return this.FetchRelatedObjectAsync(this.RelatedObject); } /// /// Retrieves the related object from the API. Make an API request on every call. /// - public V2.Core.Person FetchRelatedObject() + public V2.Core.AccountPerson FetchRelatedObject() { - return this.FetchRelatedObject(this.RelatedObject); + return this.FetchRelatedObject(this.RelatedObject); } public V2CoreAccountPersonUpdatedEvent Pull() diff --git a/src/Stripe.net/Events/PushedV2CoreClaimableSandboxClaimedEvent.cs b/src/Stripe.net/Events/PushedV2CoreClaimableSandboxClaimedEvent.cs deleted file mode 100644 index 7c03fb5405..0000000000 --- a/src/Stripe.net/Events/PushedV2CoreClaimableSandboxClaimedEvent.cs +++ /dev/null @@ -1,52 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.Events -{ - using System.Threading.Tasks; - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - /// - /// Occurs when a claimable sandbox is claimed. - /// - public class PushedV2CoreClaimableSandboxClaimedEvent : V2.PushedEvent - { - /// - /// Object containing the reference to API resource relevant to the event. - /// - [JsonProperty("related_object")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("related_object")] -#endif - - public V2.EventRelatedObject RelatedObject { get; set; } - - /// - /// Asynchronously retrieves the related object from the API. Make an API request on every - /// call. - /// - public Task FetchRelatedObjectAsync() - { - return this.FetchRelatedObjectAsync(this.RelatedObject); - } - - /// - /// Retrieves the related object from the API. Make an API request on every call. - /// - public V2.Core.ClaimableSandbox FetchRelatedObject() - { - return this.FetchRelatedObject(this.RelatedObject); - } - - public V2CoreClaimableSandboxClaimedEvent Pull() - { - return this.PullEvent(); - } - - public Task PullAsync() - { - return this.PullEventAsync(); - } - } -} diff --git a/src/Stripe.net/Events/PushedV2CoreClaimableSandboxExpiredEvent.cs b/src/Stripe.net/Events/PushedV2CoreClaimableSandboxExpiredEvent.cs deleted file mode 100644 index e282d7fc91..0000000000 --- a/src/Stripe.net/Events/PushedV2CoreClaimableSandboxExpiredEvent.cs +++ /dev/null @@ -1,52 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.Events -{ - using System.Threading.Tasks; - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - /// - /// Occurs when a claimable sandbox expires. - /// - public class PushedV2CoreClaimableSandboxExpiredEvent : V2.PushedEvent - { - /// - /// Object containing the reference to API resource relevant to the event. - /// - [JsonProperty("related_object")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("related_object")] -#endif - - public V2.EventRelatedObject RelatedObject { get; set; } - - /// - /// Asynchronously retrieves the related object from the API. Make an API request on every - /// call. - /// - public Task FetchRelatedObjectAsync() - { - return this.FetchRelatedObjectAsync(this.RelatedObject); - } - - /// - /// Retrieves the related object from the API. Make an API request on every call. - /// - public V2.Core.ClaimableSandbox FetchRelatedObject() - { - return this.FetchRelatedObject(this.RelatedObject); - } - - public V2CoreClaimableSandboxExpiredEvent Pull() - { - return this.PullEvent(); - } - - public Task PullAsync() - { - return this.PullEventAsync(); - } - } -} diff --git a/src/Stripe.net/Events/PushedV2CoreClaimableSandboxExpiringEvent.cs b/src/Stripe.net/Events/PushedV2CoreClaimableSandboxExpiringEvent.cs deleted file mode 100644 index 802b6d0d51..0000000000 --- a/src/Stripe.net/Events/PushedV2CoreClaimableSandboxExpiringEvent.cs +++ /dev/null @@ -1,52 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.Events -{ - using System.Threading.Tasks; - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - /// - /// Occurs when a claimable sandbox is expiring in 7 days. - /// - public class PushedV2CoreClaimableSandboxExpiringEvent : V2.PushedEvent - { - /// - /// Object containing the reference to API resource relevant to the event. - /// - [JsonProperty("related_object")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("related_object")] -#endif - - public V2.EventRelatedObject RelatedObject { get; set; } - - /// - /// Asynchronously retrieves the related object from the API. Make an API request on every - /// call. - /// - public Task FetchRelatedObjectAsync() - { - return this.FetchRelatedObjectAsync(this.RelatedObject); - } - - /// - /// Retrieves the related object from the API. Make an API request on every call. - /// - public V2.Core.ClaimableSandbox FetchRelatedObject() - { - return this.FetchRelatedObject(this.RelatedObject); - } - - public V2CoreClaimableSandboxExpiringEvent Pull() - { - return this.PullEvent(); - } - - public Task PullAsync() - { - return this.PullEventAsync(); - } - } -} diff --git a/src/Stripe.net/Events/PushedV2CoreClaimableSandboxSandboxDetailsOwnerAccountUpdatedEvent.cs b/src/Stripe.net/Events/PushedV2CoreClaimableSandboxSandboxDetailsOwnerAccountUpdatedEvent.cs deleted file mode 100644 index 53aedd3541..0000000000 --- a/src/Stripe.net/Events/PushedV2CoreClaimableSandboxSandboxDetailsOwnerAccountUpdatedEvent.cs +++ /dev/null @@ -1,53 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.Events -{ - using System.Threading.Tasks; - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - /// - /// Occurs when a claimable sandbox is activated by the user with the intention to go live - /// and your Stripe app is installed on the live account. - /// - public class PushedV2CoreClaimableSandboxSandboxDetailsOwnerAccountUpdatedEvent : V2.PushedEvent - { - /// - /// Object containing the reference to API resource relevant to the event. - /// - [JsonProperty("related_object")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("related_object")] -#endif - - public V2.EventRelatedObject RelatedObject { get; set; } - - /// - /// Asynchronously retrieves the related object from the API. Make an API request on every - /// call. - /// - public Task FetchRelatedObjectAsync() - { - return this.FetchRelatedObjectAsync(this.RelatedObject); - } - - /// - /// Retrieves the related object from the API. Make an API request on every call. - /// - public V2.Core.ClaimableSandbox FetchRelatedObject() - { - return this.FetchRelatedObject(this.RelatedObject); - } - - public V2CoreClaimableSandboxSandboxDetailsOwnerAccountUpdatedEvent Pull() - { - return this.PullEvent(); - } - - public Task PullAsync() - { - return this.PullEventAsync(); - } - } -} diff --git a/src/Stripe.net/Events/PushedV2ReportingReportRunCreatedEvent.cs b/src/Stripe.net/Events/PushedV2ReportingReportRunCreatedEvent.cs deleted file mode 100644 index db2ad325ac..0000000000 --- a/src/Stripe.net/Events/PushedV2ReportingReportRunCreatedEvent.cs +++ /dev/null @@ -1,52 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.Events -{ - using System.Threading.Tasks; - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - /// - /// Occurs when a ReportRun is created. - /// - public class PushedV2ReportingReportRunCreatedEvent : V2.PushedEvent - { - /// - /// Object containing the reference to API resource relevant to the event. - /// - [JsonProperty("related_object")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("related_object")] -#endif - - public V2.EventRelatedObject RelatedObject { get; set; } - - /// - /// Asynchronously retrieves the related object from the API. Make an API request on every - /// call. - /// - public Task FetchRelatedObjectAsync() - { - return this.FetchRelatedObjectAsync(this.RelatedObject); - } - - /// - /// Retrieves the related object from the API. Make an API request on every call. - /// - public V2.Reporting.ReportRun FetchRelatedObject() - { - return this.FetchRelatedObject(this.RelatedObject); - } - - public V2ReportingReportRunCreatedEvent Pull() - { - return this.PullEvent(); - } - - public Task PullAsync() - { - return this.PullEventAsync(); - } - } -} diff --git a/src/Stripe.net/Events/PushedV2ReportingReportRunFailedEvent.cs b/src/Stripe.net/Events/PushedV2ReportingReportRunFailedEvent.cs deleted file mode 100644 index be1e4cc96a..0000000000 --- a/src/Stripe.net/Events/PushedV2ReportingReportRunFailedEvent.cs +++ /dev/null @@ -1,52 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.Events -{ - using System.Threading.Tasks; - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - /// - /// Occurs when a ReportRun has failed to complete. - /// - public class PushedV2ReportingReportRunFailedEvent : V2.PushedEvent - { - /// - /// Object containing the reference to API resource relevant to the event. - /// - [JsonProperty("related_object")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("related_object")] -#endif - - public V2.EventRelatedObject RelatedObject { get; set; } - - /// - /// Asynchronously retrieves the related object from the API. Make an API request on every - /// call. - /// - public Task FetchRelatedObjectAsync() - { - return this.FetchRelatedObjectAsync(this.RelatedObject); - } - - /// - /// Retrieves the related object from the API. Make an API request on every call. - /// - public V2.Reporting.ReportRun FetchRelatedObject() - { - return this.FetchRelatedObject(this.RelatedObject); - } - - public V2ReportingReportRunFailedEvent Pull() - { - return this.PullEvent(); - } - - public Task PullAsync() - { - return this.PullEventAsync(); - } - } -} diff --git a/src/Stripe.net/Events/PushedV2ReportingReportRunSucceededEvent.cs b/src/Stripe.net/Events/PushedV2ReportingReportRunSucceededEvent.cs deleted file mode 100644 index 4925bc2477..0000000000 --- a/src/Stripe.net/Events/PushedV2ReportingReportRunSucceededEvent.cs +++ /dev/null @@ -1,52 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.Events -{ - using System.Threading.Tasks; - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - /// - /// Occurs when a ReportRun has successfully completed. - /// - public class PushedV2ReportingReportRunSucceededEvent : V2.PushedEvent - { - /// - /// Object containing the reference to API resource relevant to the event. - /// - [JsonProperty("related_object")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("related_object")] -#endif - - public V2.EventRelatedObject RelatedObject { get; set; } - - /// - /// Asynchronously retrieves the related object from the API. Make an API request on every - /// call. - /// - public Task FetchRelatedObjectAsync() - { - return this.FetchRelatedObjectAsync(this.RelatedObject); - } - - /// - /// Retrieves the related object from the API. Make an API request on every call. - /// - public V2.Reporting.ReportRun FetchRelatedObject() - { - return this.FetchRelatedObject(this.RelatedObject); - } - - public V2ReportingReportRunSucceededEvent Pull() - { - return this.PullEvent(); - } - - public Task PullAsync() - { - return this.PullEventAsync(); - } - } -} diff --git a/src/Stripe.net/Events/V2BillingCadenceBilledEvent.cs b/src/Stripe.net/Events/V2BillingCadenceBilledEvent.cs index d9054641e6..7c20818fe2 100644 --- a/src/Stripe.net/Events/V2BillingCadenceBilledEvent.cs +++ b/src/Stripe.net/Events/V2BillingCadenceBilledEvent.cs @@ -12,16 +12,6 @@ namespace Stripe.Events /// public class V2BillingCadenceBilledEvent : V2.Event { - /// - /// Data for the v2.billing.cadence.billed event. - /// - [JsonProperty("data")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("data")] -#endif - - public V2BillingCadenceBilledEventData Data { get; set; } - /// /// Object containing the reference to API resource relevant to the event. /// diff --git a/src/Stripe.net/Events/V2BillingCadenceBilledEventData.cs b/src/Stripe.net/Events/V2BillingCadenceBilledEventData.cs deleted file mode 100644 index 1a87a0c626..0000000000 --- a/src/Stripe.net/Events/V2BillingCadenceBilledEventData.cs +++ /dev/null @@ -1,22 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.Events -{ - using System.Collections.Generic; - using System.Threading.Tasks; - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - public class V2BillingCadenceBilledEventData : StripeEntity - { - /// - /// The IDs of the invoices that were generated by the tick for this Cadence. - /// - [JsonProperty("invoices")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("invoices")] -#endif - public List Invoices { get; set; } - } -} diff --git a/src/Stripe.net/Events/V2ReportingReportRunUpdatedEvent.cs b/src/Stripe.net/Events/V2BillingCadenceErroredEvent.cs similarity index 68% rename from src/Stripe.net/Events/V2ReportingReportRunUpdatedEvent.cs rename to src/Stripe.net/Events/V2BillingCadenceErroredEvent.cs index f0208a5ad2..038011e6b8 100644 --- a/src/Stripe.net/Events/V2ReportingReportRunUpdatedEvent.cs +++ b/src/Stripe.net/Events/V2BillingCadenceErroredEvent.cs @@ -8,9 +8,9 @@ namespace Stripe.Events #endif /// - /// Occurs when a ReportRun is updated. + /// Occurs when a billing Cadence encounters an error during a tick. /// - public class V2ReportingReportRunUpdatedEvent : V2.Event + public class V2BillingCadenceErroredEvent : V2.Event { /// /// Object containing the reference to API resource relevant to the event. @@ -26,17 +26,17 @@ public class V2ReportingReportRunUpdatedEvent : V2.Event /// Asynchronously retrieves the related object from the API. Make an API request on every /// call. /// - public Task FetchRelatedObjectAsync() + public Task FetchRelatedObjectAsync() { - return this.FetchRelatedObjectAsync(this.RelatedObject); + return this.FetchRelatedObjectAsync(this.RelatedObject); } /// /// Retrieves the related object from the API. Make an API request on every call. /// - public V2.Reporting.ReportRun FetchRelatedObject() + public V2.Billing.Cadence FetchRelatedObject() { - return this.FetchRelatedObject(this.RelatedObject); + return this.FetchRelatedObject(this.RelatedObject); } } } diff --git a/src/Stripe.net/Events/V2CoreAccountPersonCreatedEvent.cs b/src/Stripe.net/Events/V2CoreAccountPersonCreatedEvent.cs index ecc27c6bac..6d9514ff63 100644 --- a/src/Stripe.net/Events/V2CoreAccountPersonCreatedEvent.cs +++ b/src/Stripe.net/Events/V2CoreAccountPersonCreatedEvent.cs @@ -36,17 +36,17 @@ public class V2CoreAccountPersonCreatedEvent : V2.Event /// Asynchronously retrieves the related object from the API. Make an API request on every /// call. /// - public Task FetchRelatedObjectAsync() + public Task FetchRelatedObjectAsync() { - return this.FetchRelatedObjectAsync(this.RelatedObject); + return this.FetchRelatedObjectAsync(this.RelatedObject); } /// /// Retrieves the related object from the API. Make an API request on every call. /// - public V2.Core.Person FetchRelatedObject() + public V2.Core.AccountPerson FetchRelatedObject() { - return this.FetchRelatedObject(this.RelatedObject); + return this.FetchRelatedObject(this.RelatedObject); } } } diff --git a/src/Stripe.net/Events/V2CoreAccountPersonDeletedEvent.cs b/src/Stripe.net/Events/V2CoreAccountPersonDeletedEvent.cs index 9b6440a80c..c78213c273 100644 --- a/src/Stripe.net/Events/V2CoreAccountPersonDeletedEvent.cs +++ b/src/Stripe.net/Events/V2CoreAccountPersonDeletedEvent.cs @@ -36,17 +36,17 @@ public class V2CoreAccountPersonDeletedEvent : V2.Event /// Asynchronously retrieves the related object from the API. Make an API request on every /// call. /// - public Task FetchRelatedObjectAsync() + public Task FetchRelatedObjectAsync() { - return this.FetchRelatedObjectAsync(this.RelatedObject); + return this.FetchRelatedObjectAsync(this.RelatedObject); } /// /// Retrieves the related object from the API. Make an API request on every call. /// - public V2.Core.Person FetchRelatedObject() + public V2.Core.AccountPerson FetchRelatedObject() { - return this.FetchRelatedObject(this.RelatedObject); + return this.FetchRelatedObject(this.RelatedObject); } } } diff --git a/src/Stripe.net/Events/V2CoreAccountPersonUpdatedEvent.cs b/src/Stripe.net/Events/V2CoreAccountPersonUpdatedEvent.cs index ff8f715718..d58a4df7ca 100644 --- a/src/Stripe.net/Events/V2CoreAccountPersonUpdatedEvent.cs +++ b/src/Stripe.net/Events/V2CoreAccountPersonUpdatedEvent.cs @@ -36,17 +36,17 @@ public class V2CoreAccountPersonUpdatedEvent : V2.Event /// Asynchronously retrieves the related object from the API. Make an API request on every /// call. /// - public Task FetchRelatedObjectAsync() + public Task FetchRelatedObjectAsync() { - return this.FetchRelatedObjectAsync(this.RelatedObject); + return this.FetchRelatedObjectAsync(this.RelatedObject); } /// /// Retrieves the related object from the API. Make an API request on every call. /// - public V2.Core.Person FetchRelatedObject() + public V2.Core.AccountPerson FetchRelatedObject() { - return this.FetchRelatedObject(this.RelatedObject); + return this.FetchRelatedObject(this.RelatedObject); } } } diff --git a/src/Stripe.net/Events/V2CoreClaimableSandboxClaimedEvent.cs b/src/Stripe.net/Events/V2CoreClaimableSandboxClaimedEvent.cs deleted file mode 100644 index 257e70dd76..0000000000 --- a/src/Stripe.net/Events/V2CoreClaimableSandboxClaimedEvent.cs +++ /dev/null @@ -1,42 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.Events -{ - using System.Threading.Tasks; - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - /// - /// Occurs when a claimable sandbox is claimed. - /// - public class V2CoreClaimableSandboxClaimedEvent : V2.Event - { - /// - /// Object containing the reference to API resource relevant to the event. - /// - [JsonProperty("related_object")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("related_object")] -#endif - - public V2.EventRelatedObject RelatedObject { get; set; } - - /// - /// Asynchronously retrieves the related object from the API. Make an API request on every - /// call. - /// - public Task FetchRelatedObjectAsync() - { - return this.FetchRelatedObjectAsync(this.RelatedObject); - } - - /// - /// Retrieves the related object from the API. Make an API request on every call. - /// - public V2.Core.ClaimableSandbox FetchRelatedObject() - { - return this.FetchRelatedObject(this.RelatedObject); - } - } -} diff --git a/src/Stripe.net/Events/V2CoreClaimableSandboxExpiredEvent.cs b/src/Stripe.net/Events/V2CoreClaimableSandboxExpiredEvent.cs deleted file mode 100644 index 3f8e44b974..0000000000 --- a/src/Stripe.net/Events/V2CoreClaimableSandboxExpiredEvent.cs +++ /dev/null @@ -1,42 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.Events -{ - using System.Threading.Tasks; - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - /// - /// Occurs when a claimable sandbox expires. - /// - public class V2CoreClaimableSandboxExpiredEvent : V2.Event - { - /// - /// Object containing the reference to API resource relevant to the event. - /// - [JsonProperty("related_object")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("related_object")] -#endif - - public V2.EventRelatedObject RelatedObject { get; set; } - - /// - /// Asynchronously retrieves the related object from the API. Make an API request on every - /// call. - /// - public Task FetchRelatedObjectAsync() - { - return this.FetchRelatedObjectAsync(this.RelatedObject); - } - - /// - /// Retrieves the related object from the API. Make an API request on every call. - /// - public V2.Core.ClaimableSandbox FetchRelatedObject() - { - return this.FetchRelatedObject(this.RelatedObject); - } - } -} diff --git a/src/Stripe.net/Events/V2CoreClaimableSandboxExpiringEvent.cs b/src/Stripe.net/Events/V2CoreClaimableSandboxExpiringEvent.cs deleted file mode 100644 index 60a63d8bdc..0000000000 --- a/src/Stripe.net/Events/V2CoreClaimableSandboxExpiringEvent.cs +++ /dev/null @@ -1,42 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.Events -{ - using System.Threading.Tasks; - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - /// - /// Occurs when a claimable sandbox is expiring in 7 days. - /// - public class V2CoreClaimableSandboxExpiringEvent : V2.Event - { - /// - /// Object containing the reference to API resource relevant to the event. - /// - [JsonProperty("related_object")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("related_object")] -#endif - - public V2.EventRelatedObject RelatedObject { get; set; } - - /// - /// Asynchronously retrieves the related object from the API. Make an API request on every - /// call. - /// - public Task FetchRelatedObjectAsync() - { - return this.FetchRelatedObjectAsync(this.RelatedObject); - } - - /// - /// Retrieves the related object from the API. Make an API request on every call. - /// - public V2.Core.ClaimableSandbox FetchRelatedObject() - { - return this.FetchRelatedObject(this.RelatedObject); - } - } -} diff --git a/src/Stripe.net/Events/V2CoreClaimableSandboxSandboxDetailsOwnerAccountUpdatedEvent.cs b/src/Stripe.net/Events/V2CoreClaimableSandboxSandboxDetailsOwnerAccountUpdatedEvent.cs deleted file mode 100644 index 57f6583068..0000000000 --- a/src/Stripe.net/Events/V2CoreClaimableSandboxSandboxDetailsOwnerAccountUpdatedEvent.cs +++ /dev/null @@ -1,43 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.Events -{ - using System.Threading.Tasks; - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - /// - /// Occurs when a claimable sandbox is activated by the user with the intention to go live - /// and your Stripe app is installed on the live account. - /// - public class V2CoreClaimableSandboxSandboxDetailsOwnerAccountUpdatedEvent : V2.Event - { - /// - /// Object containing the reference to API resource relevant to the event. - /// - [JsonProperty("related_object")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("related_object")] -#endif - - public V2.EventRelatedObject RelatedObject { get; set; } - - /// - /// Asynchronously retrieves the related object from the API. Make an API request on every - /// call. - /// - public Task FetchRelatedObjectAsync() - { - return this.FetchRelatedObjectAsync(this.RelatedObject); - } - - /// - /// Retrieves the related object from the API. Make an API request on every call. - /// - public V2.Core.ClaimableSandbox FetchRelatedObject() - { - return this.FetchRelatedObject(this.RelatedObject); - } - } -} diff --git a/src/Stripe.net/Events/V2CoreHealthAuthorizationRateDropFiringEventDataImpact.cs b/src/Stripe.net/Events/V2CoreHealthAuthorizationRateDropFiringEventDataImpact.cs index 5455e2cf48..afda2a9c13 100644 --- a/src/Stripe.net/Events/V2CoreHealthAuthorizationRateDropFiringEventDataImpact.cs +++ b/src/Stripe.net/Events/V2CoreHealthAuthorizationRateDropFiringEventDataImpact.cs @@ -27,7 +27,7 @@ public class V2CoreHealthAuthorizationRateDropFiringEventDataImpact : StripeEnti #if NET6_0_OR_GREATER [STJS.JsonPropertyName("current_percentage")] #endif - public string CurrentPercentage { get; set; } + public decimal CurrentPercentage { get; set; } /// /// Dimensions that describe what subset of payments are impacted. @@ -64,6 +64,6 @@ public class V2CoreHealthAuthorizationRateDropFiringEventDataImpact : StripeEnti #if NET6_0_OR_GREATER [STJS.JsonPropertyName("previous_percentage")] #endif - public string PreviousPercentage { get; set; } + public decimal PreviousPercentage { get; set; } } } diff --git a/src/Stripe.net/Events/V2CoreHealthAuthorizationRateDropResolvedEventDataImpact.cs b/src/Stripe.net/Events/V2CoreHealthAuthorizationRateDropResolvedEventDataImpact.cs index 7cb5ee0446..1f4829366b 100644 --- a/src/Stripe.net/Events/V2CoreHealthAuthorizationRateDropResolvedEventDataImpact.cs +++ b/src/Stripe.net/Events/V2CoreHealthAuthorizationRateDropResolvedEventDataImpact.cs @@ -27,7 +27,7 @@ public class V2CoreHealthAuthorizationRateDropResolvedEventDataImpact : StripeEn #if NET6_0_OR_GREATER [STJS.JsonPropertyName("current_percentage")] #endif - public string CurrentPercentage { get; set; } + public decimal CurrentPercentage { get; set; } /// /// Dimensions that describe what subset of payments are impacted. @@ -64,6 +64,6 @@ public class V2CoreHealthAuthorizationRateDropResolvedEventDataImpact : StripeEn #if NET6_0_OR_GREATER [STJS.JsonPropertyName("previous_percentage")] #endif - public string PreviousPercentage { get; set; } + public decimal PreviousPercentage { get; set; } } } diff --git a/src/Stripe.net/Events/V2CoreHealthFraudRateIncreasedEventData.cs b/src/Stripe.net/Events/V2CoreHealthFraudRateIncreasedEventData.cs index 1719956d07..347af15b76 100644 --- a/src/Stripe.net/Events/V2CoreHealthFraudRateIncreasedEventData.cs +++ b/src/Stripe.net/Events/V2CoreHealthFraudRateIncreasedEventData.cs @@ -44,7 +44,7 @@ public class V2CoreHealthFraudRateIncreasedEventData : StripeEntity /// The time when impact on the user experience was first detected. diff --git a/src/Stripe.net/Events/V2CoreHealthIssuingAuthorizationRequestTimeoutFiringEventDataImpact.cs b/src/Stripe.net/Events/V2CoreHealthIssuingAuthorizationRequestTimeoutFiringEventDataImpact.cs index 72ac902f57..00f6fc74b1 100644 --- a/src/Stripe.net/Events/V2CoreHealthIssuingAuthorizationRequestTimeoutFiringEventDataImpact.cs +++ b/src/Stripe.net/Events/V2CoreHealthIssuingAuthorizationRequestTimeoutFiringEventDataImpact.cs @@ -25,7 +25,7 @@ public class V2CoreHealthIssuingAuthorizationRequestTimeoutFiringEventDataImpact #if NET6_0_OR_GREATER [STJS.JsonPropertyName("approved_impacted_requests")] #endif - public long? ApprovedImpactedRequests { get; set; } + public long ApprovedImpactedRequests { get; set; } /// /// Estimated aggregated amount for the declined requests. @@ -43,6 +43,6 @@ public class V2CoreHealthIssuingAuthorizationRequestTimeoutFiringEventDataImpact #if NET6_0_OR_GREATER [STJS.JsonPropertyName("declined_impacted_requests")] #endif - public long? DeclinedImpactedRequests { get; set; } + public long DeclinedImpactedRequests { get; set; } } } diff --git a/src/Stripe.net/Events/V2CoreHealthIssuingAuthorizationRequestTimeoutResolvedEventDataImpact.cs b/src/Stripe.net/Events/V2CoreHealthIssuingAuthorizationRequestTimeoutResolvedEventDataImpact.cs index 88385d2b40..73043ce8aa 100644 --- a/src/Stripe.net/Events/V2CoreHealthIssuingAuthorizationRequestTimeoutResolvedEventDataImpact.cs +++ b/src/Stripe.net/Events/V2CoreHealthIssuingAuthorizationRequestTimeoutResolvedEventDataImpact.cs @@ -25,7 +25,7 @@ public class V2CoreHealthIssuingAuthorizationRequestTimeoutResolvedEventDataImpa #if NET6_0_OR_GREATER [STJS.JsonPropertyName("approved_impacted_requests")] #endif - public long? ApprovedImpactedRequests { get; set; } + public long ApprovedImpactedRequests { get; set; } /// /// Estimated aggregated amount for the declined requests. @@ -43,6 +43,6 @@ public class V2CoreHealthIssuingAuthorizationRequestTimeoutResolvedEventDataImpa #if NET6_0_OR_GREATER [STJS.JsonPropertyName("declined_impacted_requests")] #endif - public long? DeclinedImpactedRequests { get; set; } + public long DeclinedImpactedRequests { get; set; } } } diff --git a/src/Stripe.net/Events/V2CoreHealthTrafficVolumeDropFiringEventDataImpact.cs b/src/Stripe.net/Events/V2CoreHealthTrafficVolumeDropFiringEventDataImpact.cs index 5cf4cd3701..011b01d18e 100644 --- a/src/Stripe.net/Events/V2CoreHealthTrafficVolumeDropFiringEventDataImpact.cs +++ b/src/Stripe.net/Events/V2CoreHealthTrafficVolumeDropFiringEventDataImpact.cs @@ -25,7 +25,7 @@ public class V2CoreHealthTrafficVolumeDropFiringEventDataImpact : StripeEntity /// The size of the observation time window. diff --git a/src/Stripe.net/Events/V2CoreHealthTrafficVolumeDropResolvedEventDataImpact.cs b/src/Stripe.net/Events/V2CoreHealthTrafficVolumeDropResolvedEventDataImpact.cs index b24f23a896..d0d8ce6130 100644 --- a/src/Stripe.net/Events/V2CoreHealthTrafficVolumeDropResolvedEventDataImpact.cs +++ b/src/Stripe.net/Events/V2CoreHealthTrafficVolumeDropResolvedEventDataImpact.cs @@ -25,7 +25,7 @@ public class V2CoreHealthTrafficVolumeDropResolvedEventDataImpact : StripeEntity #if NET6_0_OR_GREATER [STJS.JsonPropertyName("expected_traffic")] #endif - public long? ExpectedTraffic { get; set; } + public long ExpectedTraffic { get; set; } /// /// The size of the observation time window. diff --git a/src/Stripe.net/Events/V2ReportingReportRunCreatedEvent.cs b/src/Stripe.net/Events/V2ReportingReportRunCreatedEvent.cs deleted file mode 100644 index ed0c8e4528..0000000000 --- a/src/Stripe.net/Events/V2ReportingReportRunCreatedEvent.cs +++ /dev/null @@ -1,42 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.Events -{ - using System.Threading.Tasks; - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - /// - /// Occurs when a ReportRun is created. - /// - public class V2ReportingReportRunCreatedEvent : V2.Event - { - /// - /// Object containing the reference to API resource relevant to the event. - /// - [JsonProperty("related_object")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("related_object")] -#endif - - public V2.EventRelatedObject RelatedObject { get; set; } - - /// - /// Asynchronously retrieves the related object from the API. Make an API request on every - /// call. - /// - public Task FetchRelatedObjectAsync() - { - return this.FetchRelatedObjectAsync(this.RelatedObject); - } - - /// - /// Retrieves the related object from the API. Make an API request on every call. - /// - public V2.Reporting.ReportRun FetchRelatedObject() - { - return this.FetchRelatedObject(this.RelatedObject); - } - } -} diff --git a/src/Stripe.net/Events/V2ReportingReportRunFailedEvent.cs b/src/Stripe.net/Events/V2ReportingReportRunFailedEvent.cs deleted file mode 100644 index 2963e02e1d..0000000000 --- a/src/Stripe.net/Events/V2ReportingReportRunFailedEvent.cs +++ /dev/null @@ -1,42 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.Events -{ - using System.Threading.Tasks; - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - /// - /// Occurs when a ReportRun has failed to complete. - /// - public class V2ReportingReportRunFailedEvent : V2.Event - { - /// - /// Object containing the reference to API resource relevant to the event. - /// - [JsonProperty("related_object")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("related_object")] -#endif - - public V2.EventRelatedObject RelatedObject { get; set; } - - /// - /// Asynchronously retrieves the related object from the API. Make an API request on every - /// call. - /// - public Task FetchRelatedObjectAsync() - { - return this.FetchRelatedObjectAsync(this.RelatedObject); - } - - /// - /// Retrieves the related object from the API. Make an API request on every call. - /// - public V2.Reporting.ReportRun FetchRelatedObject() - { - return this.FetchRelatedObject(this.RelatedObject); - } - } -} diff --git a/src/Stripe.net/Events/V2ReportingReportRunSucceededEvent.cs b/src/Stripe.net/Events/V2ReportingReportRunSucceededEvent.cs deleted file mode 100644 index 55c90fb173..0000000000 --- a/src/Stripe.net/Events/V2ReportingReportRunSucceededEvent.cs +++ /dev/null @@ -1,42 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.Events -{ - using System.Threading.Tasks; - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - /// - /// Occurs when a ReportRun has successfully completed. - /// - public class V2ReportingReportRunSucceededEvent : V2.Event - { - /// - /// Object containing the reference to API resource relevant to the event. - /// - [JsonProperty("related_object")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("related_object")] -#endif - - public V2.EventRelatedObject RelatedObject { get; set; } - - /// - /// Asynchronously retrieves the related object from the API. Make an API request on every - /// call. - /// - public Task FetchRelatedObjectAsync() - { - return this.FetchRelatedObjectAsync(this.RelatedObject); - } - - /// - /// Retrieves the related object from the API. Make an API request on every call. - /// - public V2.Reporting.ReportRun FetchRelatedObject() - { - return this.FetchRelatedObject(this.RelatedObject); - } - } -} diff --git a/src/Stripe.net/Exceptions/V2/RateLimitException.cs b/src/Stripe.net/Exceptions/V2/RateLimitException.cs deleted file mode 100644 index 7428b94f83..0000000000 --- a/src/Stripe.net/Exceptions/V2/RateLimitException.cs +++ /dev/null @@ -1,25 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.V2 -{ - using System.Net; - using Newtonsoft.Json.Linq; - - public class RateLimitException : StripeException - { - private RateLimitException( - HttpStatusCode httpStatusCode, - StripeError stripeError, - string message) - : base(httpStatusCode, stripeError) - { - } - - internal static RateLimitException Parse( - HttpStatusCode httpStatusCode, - JToken body) - { - var stripeError = StripeError.FromJson(body); - return new RateLimitException(httpStatusCode, stripeError, stripeError.Message); - } - } -} \ No newline at end of file diff --git a/src/Stripe.net/Infrastructure/FormEncoding/ContentEncoder.cs b/src/Stripe.net/Infrastructure/FormEncoding/ContentEncoder.cs index aeb2453cc8..32733e638c 100644 --- a/src/Stripe.net/Infrastructure/FormEncoding/ContentEncoder.cs +++ b/src/Stripe.net/Infrastructure/FormEncoding/ContentEncoder.cs @@ -145,6 +145,10 @@ private static List> FlattenParamsValue(object valu flatParams = SingleParam(keyPrefix, s); break; + case MultipartFileContent f: + flatParams = SingleParam(keyPrefix, f); + break; + case Stream s: flatParams = SingleParam(keyPrefix, s); break; diff --git a/src/Stripe.net/Infrastructure/FormEncoding/FormEncoder.cs b/src/Stripe.net/Infrastructure/FormEncoding/FormEncoder.cs index 53b2441bae..2c9bca954d 100644 --- a/src/Stripe.net/Infrastructure/FormEncoding/FormEncoder.cs +++ b/src/Stripe.net/Infrastructure/FormEncoding/FormEncoder.cs @@ -116,6 +116,10 @@ private static List> FlattenParamsValue(object valu flatParams = SingleParam(keyPrefix, s); break; + case MultipartFileContent f: + flatParams = SingleParam(keyPrefix, f); + break; + case Stream s: flatParams = SingleParam(keyPrefix, s); break; diff --git a/src/Stripe.net/Infrastructure/FormEncoding/MultipartFormDataContent.cs b/src/Stripe.net/Infrastructure/FormEncoding/MultipartFormDataContent.cs index d7ff9b3427..4c2c46d290 100644 --- a/src/Stripe.net/Infrastructure/FormEncoding/MultipartFormDataContent.cs +++ b/src/Stripe.net/Infrastructure/FormEncoding/MultipartFormDataContent.cs @@ -41,26 +41,29 @@ public MultipartFormDataContent( private static StringContent CreateStringContent(string value) => new StringContent(value, System.Text.Encoding.UTF8); - private static StreamContent CreateStreamContent(Stream value, string name) + private static StreamContent CreateStreamContent(MultipartFileContent value, string name) { - var fileName = "blob"; - var extension = string.Empty; + var fileName = value.Name ?? "blob"; + var extension = Path.GetExtension(fileName); + var stream = value.Data; - FileStream fileStream = value as FileStream; + FileStream fileStream = stream as FileStream; if ((fileStream != null) && (!string.IsNullOrEmpty(fileStream.Name))) { fileName = fileStream.Name; extension = Path.GetExtension(fileName); } - var content = new StreamContent(value); + var type = value.Type ?? MimeTypes.GetMimeType(extension); + + var content = new StreamContent(stream); content.Headers.ContentDisposition = new ContentDispositionHeaderValue("form-data") { Name = name, FileName = fileName, FileNameStar = fileName, }; - content.Headers.ContentType = new MediaTypeHeaderValue(MimeTypes.GetMimeType(extension)); + content.Headers.ContentType = new MediaTypeHeaderValue(type); return content; } @@ -79,8 +82,16 @@ private void ProcessParameters(IEnumerable> nameVal this.Add(CreateStringContent(s), QuoteString(kvp.Key)); break; + case MultipartFileContent f: + this.Add(CreateStreamContent(f, QuoteString(kvp.Key))); + break; + case Stream s: - this.Add(CreateStreamContent(s, QuoteString(kvp.Key))); + var fileData = new MultipartFileContent + { + Data = s, + }; + this.Add(CreateStreamContent(fileData, QuoteString(kvp.Key))); break; default: diff --git a/src/Stripe.net/Infrastructure/Public/ApiRequestorAdapter.cs b/src/Stripe.net/Infrastructure/Public/ApiRequestorAdapter.cs index c2a366da5d..95751ea666 100644 --- a/src/Stripe.net/Infrastructure/Public/ApiRequestorAdapter.cs +++ b/src/Stripe.net/Infrastructure/Public/ApiRequestorAdapter.cs @@ -54,7 +54,7 @@ public override Task RequestAsync( if (baseAddress != BaseAddress.Api) { requestOptions ??= new RequestOptions(); - requestOptions.BaseUrl = this.GetBaseUrl(baseAddress); + requestOptions.InternalBaseUrl = this.GetBaseUrl(baseAddress); } return this.client.RequestAsync(method, path, options, requestOptions, cancellationToken); diff --git a/src/Stripe.net/Infrastructure/Public/LiveApiRequestor.cs b/src/Stripe.net/Infrastructure/Public/LiveApiRequestor.cs index 652b563171..e478935b8b 100644 --- a/src/Stripe.net/Infrastructure/Public/LiveApiRequestor.cs +++ b/src/Stripe.net/Infrastructure/Public/LiveApiRequestor.cs @@ -231,7 +231,7 @@ private StripeRequest MakeStripeRequest( } var uri = StripeRequest.BuildUri( - requestOptions?.BaseUrl ?? this.GetBaseUrl(baseAddress), + requestOptions?.InternalBaseUrl ?? this.GetBaseUrl(baseAddress), method, path, options, diff --git a/src/Stripe.net/Infrastructure/Public/StripeException.cs b/src/Stripe.net/Infrastructure/Public/StripeException.cs index 99bc07d2ae..fd6df15dd1 100644 --- a/src/Stripe.net/Infrastructure/Public/StripeException.cs +++ b/src/Stripe.net/Infrastructure/Public/StripeException.cs @@ -95,10 +95,6 @@ internal static StripeException ParseV2Exception(string type, StripeResponse res ret = Stripe.V2.QuotaExceededException.Parse(httpStatusCode, body); break; - case "rate_limit": - ret = Stripe.V2.RateLimitException.Parse(httpStatusCode, body); - break; - case "recipient_not_notifiable": ret = Stripe.V2.RecipientNotNotifiableException.Parse(httpStatusCode, body); break; diff --git a/src/Stripe.net/Infrastructure/Public/StripeTypeRegistry.cs b/src/Stripe.net/Infrastructure/Public/StripeTypeRegistry.cs index b4116a1c2c..4f06714fae 100644 --- a/src/Stripe.net/Infrastructure/Public/StripeTypeRegistry.cs +++ b/src/Stripe.net/Infrastructure/Public/StripeTypeRegistry.cs @@ -268,7 +268,7 @@ public static class StripeTypeRegistry { "v2.billing.service_action", typeof(V2.Billing.ServiceAction) }, { "v2.core.account", typeof(V2.Core.Account) }, { "v2.core.account_link", typeof(V2.Core.AccountLink) }, - { "v2.core.account_person", typeof(V2.Core.Person) }, + { "v2.core.account_person", typeof(V2.Core.AccountPerson) }, { "v2.core.claimable_sandbox", typeof(V2.Core.ClaimableSandbox) }, { "v2.core.event", typeof(V2.Event) }, { "v2.core.event_destination", typeof(V2.EventDestination) }, @@ -322,8 +322,6 @@ public static class StripeTypeRegistry V2.MoneyManagement.TransactionEntry) }, { "v2.payments.off_session_payment", typeof(V2.Payments.OffSessionPayment) }, - { "v2.reporting.report", typeof(V2.Reporting.Report) }, - { "v2.reporting.report_run", typeof(V2.Reporting.ReportRun) }, { "v2.tax.automatic_rule", typeof(V2.Tax.AutomaticRule) }, // V2ObjectsToTypes: The end of the section generated from our OpenAPI spec @@ -344,6 +342,7 @@ public static class StripeTypeRegistry { "v2.billing.cadence.billed", typeof(Events.V2BillingCadenceBilledEvent) }, { "v2.billing.cadence.canceled", typeof(Events.V2BillingCadenceCanceledEvent) }, { "v2.billing.cadence.created", typeof(Events.V2BillingCadenceCreatedEvent) }, + { "v2.billing.cadence.errored", typeof(Events.V2BillingCadenceErroredEvent) }, { "v2.billing.license_fee.created", typeof( Events.V2BillingLicenseFeeCreatedEvent) @@ -537,22 +536,6 @@ public static class StripeTypeRegistry "v2.core.account_person.updated", typeof( Events.V2CoreAccountPersonUpdatedEvent) }, - { - "v2.core.claimable_sandbox.claimed", typeof( - Events.V2CoreClaimableSandboxClaimedEvent) - }, - { - "v2.core.claimable_sandbox.expired", typeof( - Events.V2CoreClaimableSandboxExpiredEvent) - }, - { - "v2.core.claimable_sandbox.expiring", typeof( - Events.V2CoreClaimableSandboxExpiringEvent) - }, - { - "v2.core.claimable_sandbox.sandbox_details_owner_account_updated", typeof( - Events.V2CoreClaimableSandboxSandboxDetailsOwnerAccountUpdatedEvent) - }, { "v2.core.event_destination.ping", typeof( Events.V2CoreEventDestinationPingEvent) @@ -785,22 +768,6 @@ public static class StripeTypeRegistry "v2.payments.off_session_payment.succeeded", typeof( Events.V2PaymentsOffSessionPaymentSucceededEvent) }, - { - "v2.reporting.report_run.created", typeof( - Events.V2ReportingReportRunCreatedEvent) - }, - { - "v2.reporting.report_run.failed", typeof( - Events.V2ReportingReportRunFailedEvent) - }, - { - "v2.reporting.report_run.succeeded", typeof( - Events.V2ReportingReportRunSucceededEvent) - }, - { - "v2.reporting.report_run.updated", typeof( - Events.V2ReportingReportRunUpdatedEvent) - }, // ThinTypesToEventTypes: The end of the section generated from our OpenAPI spec }); @@ -829,6 +796,10 @@ public static class StripeTypeRegistry "v2.billing.cadence.created", typeof( Events.PushedV2BillingCadenceCreatedEvent) }, + { + "v2.billing.cadence.errored", typeof( + Events.PushedV2BillingCadenceErroredEvent) + }, { "v2.billing.license_fee.created", typeof( Events.PushedV2BillingLicenseFeeCreatedEvent) @@ -1028,22 +999,6 @@ public static class StripeTypeRegistry "v2.core.account_person.updated", typeof( Events.PushedV2CoreAccountPersonUpdatedEvent) }, - { - "v2.core.claimable_sandbox.claimed", typeof( - Events.PushedV2CoreClaimableSandboxClaimedEvent) - }, - { - "v2.core.claimable_sandbox.expired", typeof( - Events.PushedV2CoreClaimableSandboxExpiredEvent) - }, - { - "v2.core.claimable_sandbox.expiring", typeof( - Events.PushedV2CoreClaimableSandboxExpiringEvent) - }, - { - "v2.core.claimable_sandbox.sandbox_details_owner_account_updated", typeof( - Events.PushedV2CoreClaimableSandboxSandboxDetailsOwnerAccountUpdatedEvent) - }, { "v2.core.event_destination.ping", typeof( Events.PushedV2CoreEventDestinationPingEvent) @@ -1276,22 +1231,6 @@ public static class StripeTypeRegistry "v2.payments.off_session_payment.succeeded", typeof( Events.PushedV2PaymentsOffSessionPaymentSucceededEvent) }, - { - "v2.reporting.report_run.created", typeof( - Events.PushedV2ReportingReportRunCreatedEvent) - }, - { - "v2.reporting.report_run.failed", typeof( - Events.PushedV2ReportingReportRunFailedEvent) - }, - { - "v2.reporting.report_run.succeeded", typeof( - Events.PushedV2ReportingReportRunSucceededEvent) - }, - { - "v2.reporting.report_run.updated", typeof( - Events.PushedV2ReportingReportRunUpdatedEvent) - }, // PushedTypesToEventTypes: The end of the section generated from our OpenAPI spec }); diff --git a/src/Stripe.net/Services/Files/FileCreateOptions.cs b/src/Stripe.net/Services/Files/FileCreateOptions.cs index a252e950b2..093dcefc53 100644 --- a/src/Stripe.net/Services/Files/FileCreateOptions.cs +++ b/src/Stripe.net/Services/Files/FileCreateOptions.cs @@ -1,7 +1,6 @@ // File generated from our OpenAPI spec namespace Stripe { - using System.IO; using Newtonsoft.Json; #if NET6_0_OR_GREATER using STJS = System.Text.Json.Serialization; @@ -17,7 +16,7 @@ public class FileCreateOptions : BaseOptions #if NET6_0_OR_GREATER [STJS.JsonPropertyName("file")] #endif - public Stream File { get; set; } + public MultipartFileContent File { get; set; } /// /// Optional parameters that automatically create a - /// The month to anchor the billing on for a type="month" billing cycle from 1-12. If not - /// provided, this will default to the month the cadence was created. This setting can only - /// be used for monthly billing cycles with interval_count of 2, 3, 4 or 6. All - /// occurrences will be calculated from month provided. - /// - [JsonProperty("month_of_year")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("month_of_year")] -#endif - public long? MonthOfYear { get; set; } - /// /// The time at which the billing cycle ends. This field is optional, and if not provided, /// it will default to the time at which the cadence was created in UTC timezone. diff --git a/src/Stripe.net/Services/V2/Billing/Cadences/CadenceUpdateSettingsBillOptions.cs b/src/Stripe.net/Services/V2/Billing/Cadences/CadenceUpdateSettingsBillOptions.cs index efc4f3ac9a..d23debe252 100644 --- a/src/Stripe.net/Services/V2/Billing/Cadences/CadenceUpdateSettingsBillOptions.cs +++ b/src/Stripe.net/Services/V2/Billing/Cadences/CadenceUpdateSettingsBillOptions.cs @@ -2,14 +2,10 @@ namespace Stripe.V2.Billing { using Newtonsoft.Json; - using Stripe.Infrastructure; #if NET6_0_OR_GREATER using STJS = System.Text.Json.Serialization; #endif -#if NET6_0_OR_GREATER - [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] -#endif public class CadenceUpdateSettingsBillOptions : INestedOptions, IHasId { /// @@ -21,28 +17,6 @@ public class CadenceUpdateSettingsBillOptions : INestedOptions, IHasId #endif public string Id { get; set; } - [JsonProperty("version")] - [JsonConverter(typeof(EmptyableConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("version")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalVersion { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public bool EmptyVersion - { - get => this.InternalVersion?.Empty ?? false; - set - { - this.InternalVersion ??= new Emptyable(); - this.InternalVersion.Empty = value; - } - } - /// /// An optional field to specify the version of Settings to use. If not provided, this will /// always default to the live_version specified on the setting, any time the @@ -50,18 +24,10 @@ public bool EmptyVersion /// updating, and is discouraged for cadences. To clear a pinned version, set the version to /// null. /// - [JsonIgnore] + [JsonProperty("version")] #if NET6_0_OR_GREATER - [STJS.JsonIgnore] + [STJS.JsonPropertyName("version")] #endif - public string Version - { - get => this.InternalVersion?.Value; - set - { - this.InternalVersion ??= new Emptyable(); - this.InternalVersion.Value = value; - } - } + public string Version { get; set; } } } diff --git a/src/Stripe.net/Services/V2/Billing/Cadences/CadenceUpdateSettingsCollectionOptions.cs b/src/Stripe.net/Services/V2/Billing/Cadences/CadenceUpdateSettingsCollectionOptions.cs index fa191bb95c..49da48beb8 100644 --- a/src/Stripe.net/Services/V2/Billing/Cadences/CadenceUpdateSettingsCollectionOptions.cs +++ b/src/Stripe.net/Services/V2/Billing/Cadences/CadenceUpdateSettingsCollectionOptions.cs @@ -2,14 +2,10 @@ namespace Stripe.V2.Billing { using Newtonsoft.Json; - using Stripe.Infrastructure; #if NET6_0_OR_GREATER using STJS = System.Text.Json.Serialization; #endif -#if NET6_0_OR_GREATER - [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] -#endif public class CadenceUpdateSettingsCollectionOptions : INestedOptions, IHasId { /// @@ -21,28 +17,6 @@ public class CadenceUpdateSettingsCollectionOptions : INestedOptions, IHasId #endif public string Id { get; set; } - [JsonProperty("version")] - [JsonConverter(typeof(EmptyableConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("version")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalVersion { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public bool EmptyVersion - { - get => this.InternalVersion?.Empty ?? false; - set - { - this.InternalVersion ??= new Emptyable(); - this.InternalVersion.Empty = value; - } - } - /// /// An optional field to specify the version of Settings to use. If not provided, this will /// always default to the live_version specified on the setting, any time the @@ -50,18 +24,10 @@ public bool EmptyVersion /// updating, and is discouraged for cadences. To clear a pinned version, set the version to /// null. /// - [JsonIgnore] + [JsonProperty("version")] #if NET6_0_OR_GREATER - [STJS.JsonIgnore] + [STJS.JsonPropertyName("version")] #endif - public string Version - { - get => this.InternalVersion?.Value; - set - { - this.InternalVersion ??= new Emptyable(); - this.InternalVersion.Value = value; - } - } + public string Version { get; set; } } } diff --git a/src/Stripe.net/Services/V2/Billing/Cadences/CadenceUpdateSettingsOptions.cs b/src/Stripe.net/Services/V2/Billing/Cadences/CadenceUpdateSettingsOptions.cs index a282dc06b7..96b6453a57 100644 --- a/src/Stripe.net/Services/V2/Billing/Cadences/CadenceUpdateSettingsOptions.cs +++ b/src/Stripe.net/Services/V2/Billing/Cadences/CadenceUpdateSettingsOptions.cs @@ -2,95 +2,31 @@ namespace Stripe.V2.Billing { using Newtonsoft.Json; - using Stripe.Infrastructure; #if NET6_0_OR_GREATER using STJS = System.Text.Json.Serialization; #endif -#if NET6_0_OR_GREATER - [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] -#endif public class CadenceUpdateSettingsOptions : INestedOptions { - [JsonProperty("bill")] - [JsonConverter(typeof(EmptyableConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("bill")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalBill { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public bool EmptyBill - { - get => this.InternalBill?.Empty ?? false; - set - { - this.InternalBill ??= new Emptyable(); - this.InternalBill.Empty = value; - } - } - /// /// Settings that configure bills generation, which includes calculating totals, tax, and /// presenting invoices. If null is provided, the current bill settings will be removed from /// the billing cadence. /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public CadenceUpdateSettingsBillOptions Bill - { - get => this.InternalBill?.Value; - set - { - this.InternalBill ??= new Emptyable(); - this.InternalBill.Value = value; - } - } - - [JsonProperty("collection")] - [JsonConverter(typeof(EmptyableConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("collection")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalCollection { get; set; } - - [JsonIgnore] + [JsonProperty("bill")] #if NET6_0_OR_GREATER - [STJS.JsonIgnore] + [STJS.JsonPropertyName("bill")] #endif - public bool EmptyCollection - { - get => this.InternalCollection?.Empty ?? false; - set - { - this.InternalCollection ??= new Emptyable(); - this.InternalCollection.Empty = value; - } - } + public CadenceUpdateSettingsBillOptions Bill { get; set; } /// /// Settings that configure and manage the behavior of collecting payments. If null is /// provided, the current collection settings will be removed from the billing cadence. /// - [JsonIgnore] + [JsonProperty("collection")] #if NET6_0_OR_GREATER - [STJS.JsonIgnore] + [STJS.JsonPropertyName("collection")] #endif - public CadenceUpdateSettingsCollectionOptions Collection - { - get => this.InternalCollection?.Value; - set - { - this.InternalCollection ??= new Emptyable(); - this.InternalCollection.Value = value; - } - } + public CadenceUpdateSettingsCollectionOptions Collection { get; set; } } } diff --git a/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingCreatePaymentMethodOptionsKonbiniOptions.cs b/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingCreatePaymentMethodOptionsKonbiniOptions.cs deleted file mode 100644 index a82d44fa21..0000000000 --- a/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingCreatePaymentMethodOptionsKonbiniOptions.cs +++ /dev/null @@ -1,7 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.V2.Billing -{ - public class CollectionSettingCreatePaymentMethodOptionsKonbiniOptions : INestedOptions - { - } -} diff --git a/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingCreatePaymentMethodOptionsOptions.cs b/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingCreatePaymentMethodOptionsOptions.cs index af79b1c255..64cf216852 100644 --- a/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingCreatePaymentMethodOptionsOptions.cs +++ b/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingCreatePaymentMethodOptionsOptions.cs @@ -1,6 +1,7 @@ // File generated from our OpenAPI spec namespace Stripe.V2.Billing { + using System.Collections.Generic; using Newtonsoft.Json; #if NET6_0_OR_GREATER using STJS = System.Text.Json.Serialization; @@ -52,7 +53,7 @@ public class CollectionSettingCreatePaymentMethodOptionsOptions : INestedOptions #if NET6_0_OR_GREATER [STJS.JsonPropertyName("konbini")] #endif - public CollectionSettingCreatePaymentMethodOptionsKonbiniOptions Konbini { get; set; } + public Dictionary Konbini { get; set; } /// /// This sub-hash contains details about the SEPA Direct Debit payment method options. @@ -61,7 +62,7 @@ public class CollectionSettingCreatePaymentMethodOptionsOptions : INestedOptions #if NET6_0_OR_GREATER [STJS.JsonPropertyName("sepa_debit")] #endif - public CollectionSettingCreatePaymentMethodOptionsSepaDebitOptions SepaDebit { get; set; } + public Dictionary SepaDebit { get; set; } /// /// This sub-hash contains details about the ACH direct debit payment method options. diff --git a/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingCreatePaymentMethodOptionsSepaDebitOptions.cs b/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingCreatePaymentMethodOptionsSepaDebitOptions.cs deleted file mode 100644 index 9dff04fd87..0000000000 --- a/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingCreatePaymentMethodOptionsSepaDebitOptions.cs +++ /dev/null @@ -1,7 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.V2.Billing -{ - public class CollectionSettingCreatePaymentMethodOptionsSepaDebitOptions : INestedOptions - { - } -} diff --git a/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingUpdateOptions.cs b/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingUpdateOptions.cs index 8dac387bc3..ae57cd7e36 100644 --- a/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingUpdateOptions.cs +++ b/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingUpdateOptions.cs @@ -2,14 +2,10 @@ namespace Stripe.V2.Billing { using Newtonsoft.Json; - using Stripe.Infrastructure; #if NET6_0_OR_GREATER using STJS = System.Text.Json.Serialization; #endif -#if NET6_0_OR_GREATER - [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] -#endif public class CollectionSettingUpdateOptions : BaseOptions { /// @@ -36,44 +32,14 @@ public class CollectionSettingUpdateOptions : BaseOptions #endif public string DisplayName { get; set; } - [JsonProperty("email_delivery")] - [JsonConverter(typeof(EmptyableConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("email_delivery")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalEmailDelivery { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public bool EmptyEmailDelivery - { - get => this.InternalEmailDelivery?.Empty ?? false; - set - { - this.InternalEmailDelivery ??= new Emptyable(); - this.InternalEmailDelivery.Empty = value; - } - } - /// /// Email delivery settings. /// - [JsonIgnore] + [JsonProperty("email_delivery")] #if NET6_0_OR_GREATER - [STJS.JsonIgnore] + [STJS.JsonPropertyName("email_delivery")] #endif - public CollectionSettingUpdateEmailDeliveryOptions EmailDelivery - { - get => this.InternalEmailDelivery?.Value; - set - { - this.InternalEmailDelivery ??= new Emptyable(); - this.InternalEmailDelivery.Value = value; - } - } + public CollectionSettingUpdateEmailDeliveryOptions EmailDelivery { get; set; } /// /// Optionally change the live version of the CollectionSetting. Billing Cadences and other diff --git a/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingUpdatePaymentMethodOptionsKonbiniOptions.cs b/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingUpdatePaymentMethodOptionsKonbiniOptions.cs deleted file mode 100644 index 711e89e0c9..0000000000 --- a/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingUpdatePaymentMethodOptionsKonbiniOptions.cs +++ /dev/null @@ -1,7 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.V2.Billing -{ - public class CollectionSettingUpdatePaymentMethodOptionsKonbiniOptions : INestedOptions - { - } -} diff --git a/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingUpdatePaymentMethodOptionsOptions.cs b/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingUpdatePaymentMethodOptionsOptions.cs index 797559032b..e0ff6a0a02 100644 --- a/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingUpdatePaymentMethodOptionsOptions.cs +++ b/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingUpdatePaymentMethodOptionsOptions.cs @@ -1,6 +1,7 @@ // File generated from our OpenAPI spec namespace Stripe.V2.Billing { + using System.Collections.Generic; using Newtonsoft.Json; #if NET6_0_OR_GREATER using STJS = System.Text.Json.Serialization; @@ -52,7 +53,7 @@ public class CollectionSettingUpdatePaymentMethodOptionsOptions : INestedOptions #if NET6_0_OR_GREATER [STJS.JsonPropertyName("konbini")] #endif - public CollectionSettingUpdatePaymentMethodOptionsKonbiniOptions Konbini { get; set; } + public Dictionary Konbini { get; set; } /// /// This sub-hash contains details about the SEPA Direct Debit payment method options. @@ -61,7 +62,7 @@ public class CollectionSettingUpdatePaymentMethodOptionsOptions : INestedOptions #if NET6_0_OR_GREATER [STJS.JsonPropertyName("sepa_debit")] #endif - public CollectionSettingUpdatePaymentMethodOptionsSepaDebitOptions SepaDebit { get; set; } + public Dictionary SepaDebit { get; set; } /// /// This sub-hash contains details about the ACH direct debit payment method options. diff --git a/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingUpdatePaymentMethodOptionsSepaDebitOptions.cs b/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingUpdatePaymentMethodOptionsSepaDebitOptions.cs deleted file mode 100644 index e26302c6ca..0000000000 --- a/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingUpdatePaymentMethodOptionsSepaDebitOptions.cs +++ /dev/null @@ -1,7 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.V2.Billing -{ - public class CollectionSettingUpdatePaymentMethodOptionsSepaDebitOptions : INestedOptions - { - } -} diff --git a/src/Stripe.net/Services/V2/Billing/CustomPricingUnits/CustomPricingUnitUpdateOptions.cs b/src/Stripe.net/Services/V2/Billing/CustomPricingUnits/CustomPricingUnitUpdateOptions.cs index 0d150cf32d..ea452c0634 100644 --- a/src/Stripe.net/Services/V2/Billing/CustomPricingUnits/CustomPricingUnitUpdateOptions.cs +++ b/src/Stripe.net/Services/V2/Billing/CustomPricingUnits/CustomPricingUnitUpdateOptions.cs @@ -3,14 +3,10 @@ namespace Stripe.V2.Billing { using System.Collections.Generic; using Newtonsoft.Json; - using Stripe.Infrastructure; #if NET6_0_OR_GREATER using STJS = System.Text.Json.Serialization; #endif -#if NET6_0_OR_GREATER - [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] -#endif public class CustomPricingUnitUpdateOptions : BaseOptions, IHasMetadata { /// @@ -31,44 +27,14 @@ public class CustomPricingUnitUpdateOptions : BaseOptions, IHasMetadata #endif public string DisplayName { get; set; } - [JsonProperty("lookup_key")] - [JsonConverter(typeof(EmptyableConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("lookup_key")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalLookupKey { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public bool EmptyLookupKey - { - get => this.InternalLookupKey?.Empty ?? false; - set - { - this.InternalLookupKey ??= new Emptyable(); - this.InternalLookupKey.Empty = value; - } - } - /// /// An internal key you can use to search for a particular CustomPricingUnit item. /// - [JsonIgnore] + [JsonProperty("lookup_key")] #if NET6_0_OR_GREATER - [STJS.JsonIgnore] + [STJS.JsonPropertyName("lookup_key")] #endif - public string LookupKey - { - get => this.InternalLookupKey?.Value; - set - { - this.InternalLookupKey ??= new Emptyable(); - this.InternalLookupKey.Value = value; - } - } + public string LookupKey { get; set; } /// /// Set of key-value pairs that you can attach to an object. diff --git a/src/Stripe.net/Services/V2/Billing/Intents/IntentCreateActionApplyInvoiceDiscountRulePercentOffOptions.cs b/src/Stripe.net/Services/V2/Billing/Intents/IntentCreateActionApplyInvoiceDiscountRulePercentOffOptions.cs index f5014b9d2c..68b77ba675 100644 --- a/src/Stripe.net/Services/V2/Billing/Intents/IntentCreateActionApplyInvoiceDiscountRulePercentOffOptions.cs +++ b/src/Stripe.net/Services/V2/Billing/Intents/IntentCreateActionApplyInvoiceDiscountRulePercentOffOptions.cs @@ -25,6 +25,6 @@ public class IntentCreateActionApplyInvoiceDiscountRulePercentOffOptions : INest #if NET6_0_OR_GREATER [STJS.JsonPropertyName("percent_off")] #endif - public string PercentOff { get; set; } + public decimal? PercentOff { get; set; } } } diff --git a/src/Stripe.net/Services/V2/Billing/Intents/IntentCreateActionDeactivateEffectiveAtOptions.cs b/src/Stripe.net/Services/V2/Billing/Intents/IntentCreateActionDeactivateEffectiveAtOptions.cs index a40712ae82..dd5c325d34 100644 --- a/src/Stripe.net/Services/V2/Billing/Intents/IntentCreateActionDeactivateEffectiveAtOptions.cs +++ b/src/Stripe.net/Services/V2/Billing/Intents/IntentCreateActionDeactivateEffectiveAtOptions.cs @@ -21,8 +21,7 @@ public class IntentCreateActionDeactivateEffectiveAtOptions : INestedOptions /// /// When the deactivate action will take effect. - /// One of: current_billing_period_end, current_billing_period_start, - /// on_reserve, or timestamp. + /// One of: current_billing_period_start, on_reserve, or timestamp. /// [JsonProperty("type")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/V2/Billing/LicenseFees/LicenseFeeCreateTierOptions.cs b/src/Stripe.net/Services/V2/Billing/LicenseFees/LicenseFeeCreateTierOptions.cs index 205be249cc..d2f3a1a553 100644 --- a/src/Stripe.net/Services/V2/Billing/LicenseFees/LicenseFeeCreateTierOptions.cs +++ b/src/Stripe.net/Services/V2/Billing/LicenseFees/LicenseFeeCreateTierOptions.cs @@ -36,7 +36,7 @@ public class LicenseFeeCreateTierOptions : INestedOptions #if NET6_0_OR_GREATER [STJS.JsonPropertyName("up_to_decimal")] #endif - public string UpToDecimal { get; set; } + public decimal? UpToDecimal { get; set; } /// /// No upper bound to this tier. Only one of up_to_decimal and up_to_inf may diff --git a/src/Stripe.net/Services/V2/Billing/LicenseFees/LicenseFeeUpdateTierOptions.cs b/src/Stripe.net/Services/V2/Billing/LicenseFees/LicenseFeeUpdateTierOptions.cs index e1086b9525..1a91ed5179 100644 --- a/src/Stripe.net/Services/V2/Billing/LicenseFees/LicenseFeeUpdateTierOptions.cs +++ b/src/Stripe.net/Services/V2/Billing/LicenseFees/LicenseFeeUpdateTierOptions.cs @@ -36,7 +36,7 @@ public class LicenseFeeUpdateTierOptions : INestedOptions #if NET6_0_OR_GREATER [STJS.JsonPropertyName("up_to_decimal")] #endif - public string UpToDecimal { get; set; } + public decimal? UpToDecimal { get; set; } /// /// No upper bound to this tier. Only one of up_to_decimal and up_to_inf may diff --git a/src/Stripe.net/Services/V2/Billing/LicensedItems/LicensedItemUpdateOptions.cs b/src/Stripe.net/Services/V2/Billing/LicensedItems/LicensedItemUpdateOptions.cs index f1d6b49c62..c3eb9f3b2e 100644 --- a/src/Stripe.net/Services/V2/Billing/LicensedItems/LicensedItemUpdateOptions.cs +++ b/src/Stripe.net/Services/V2/Billing/LicensedItems/LicensedItemUpdateOptions.cs @@ -3,14 +3,10 @@ namespace Stripe.V2.Billing { using System.Collections.Generic; using Newtonsoft.Json; - using Stripe.Infrastructure; #if NET6_0_OR_GREATER using STJS = System.Text.Json.Serialization; #endif -#if NET6_0_OR_GREATER - [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] -#endif public class LicensedItemUpdateOptions : BaseOptions, IHasMetadata { /// @@ -23,45 +19,15 @@ public class LicensedItemUpdateOptions : BaseOptions, IHasMetadata #endif public string DisplayName { get; set; } - [JsonProperty("lookup_key")] - [JsonConverter(typeof(EmptyableConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("lookup_key")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalLookupKey { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public bool EmptyLookupKey - { - get => this.InternalLookupKey?.Empty ?? false; - set - { - this.InternalLookupKey ??= new Emptyable(); - this.InternalLookupKey.Empty = value; - } - } - /// /// An internal key you can use to search for a particular billable item. Maximum length of /// 200 characters. To remove the lookup_key from the object, set it to null in the request. /// - [JsonIgnore] + [JsonProperty("lookup_key")] #if NET6_0_OR_GREATER - [STJS.JsonIgnore] + [STJS.JsonPropertyName("lookup_key")] #endif - public string LookupKey - { - get => this.InternalLookupKey?.Value; - set - { - this.InternalLookupKey ??= new Emptyable(); - this.InternalLookupKey.Value = value; - } - } + public string LookupKey { get; set; } /// /// Set of key-value pairs that you can @@ -83,45 +49,15 @@ public string LookupKey #endif public LicensedItemUpdateTaxDetailsOptions TaxDetails { get; set; } - [JsonProperty("unit_label")] - [JsonConverter(typeof(EmptyableConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("unit_label")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalUnitLabel { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public bool EmptyUnitLabel - { - get => this.InternalUnitLabel?.Empty ?? false; - set - { - this.InternalUnitLabel ??= new Emptyable(); - this.InternalUnitLabel.Empty = value; - } - } - /// /// The unit to use when displaying prices for this billable item in places like Checkout. /// For example, set this field to "seat" for Checkout to display "(price) per seat", or /// "environment" to display "(price) per environment". Maximum length of 100 characters. /// - [JsonIgnore] + [JsonProperty("unit_label")] #if NET6_0_OR_GREATER - [STJS.JsonIgnore] + [STJS.JsonPropertyName("unit_label")] #endif - public string UnitLabel - { - get => this.InternalUnitLabel?.Value; - set - { - this.InternalUnitLabel ??= new Emptyable(); - this.InternalUnitLabel.Value = value; - } - } + public string UnitLabel { get; set; } } } diff --git a/src/Stripe.net/Services/V2/Billing/MeterEventStreams/MeterEventStreamCreateOptions.cs b/src/Stripe.net/Services/V2/Billing/MeterEventStreams/MeterEventStreamCreateOptions.cs index 8917d41b17..e928d13fbd 100644 --- a/src/Stripe.net/Services/V2/Billing/MeterEventStreams/MeterEventStreamCreateOptions.cs +++ b/src/Stripe.net/Services/V2/Billing/MeterEventStreams/MeterEventStreamCreateOptions.cs @@ -10,7 +10,7 @@ namespace Stripe.V2.Billing public class MeterEventStreamCreateOptions : BaseOptions { /// - /// List of meter events to include in the request. Supports up to 100 events per request. + /// List of meter events to include in the request. /// [JsonProperty("events")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/V2/Billing/MeteredItems/MeteredItemUpdateOptions.cs b/src/Stripe.net/Services/V2/Billing/MeteredItems/MeteredItemUpdateOptions.cs index 360b1668f1..069bd6bfa3 100644 --- a/src/Stripe.net/Services/V2/Billing/MeteredItems/MeteredItemUpdateOptions.cs +++ b/src/Stripe.net/Services/V2/Billing/MeteredItems/MeteredItemUpdateOptions.cs @@ -3,14 +3,10 @@ namespace Stripe.V2.Billing { using System.Collections.Generic; using Newtonsoft.Json; - using Stripe.Infrastructure; #if NET6_0_OR_GREATER using STJS = System.Text.Json.Serialization; #endif -#if NET6_0_OR_GREATER - [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] -#endif public class MeteredItemUpdateOptions : BaseOptions, IHasMetadata { /// @@ -23,45 +19,15 @@ public class MeteredItemUpdateOptions : BaseOptions, IHasMetadata #endif public string DisplayName { get; set; } - [JsonProperty("lookup_key")] - [JsonConverter(typeof(EmptyableConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("lookup_key")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalLookupKey { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public bool EmptyLookupKey - { - get => this.InternalLookupKey?.Empty ?? false; - set - { - this.InternalLookupKey ??= new Emptyable(); - this.InternalLookupKey.Empty = value; - } - } - /// /// An internal key you can use to search for a particular billable item. Maximum length of /// 200 characters. To remove the lookup_key from the object, set it to null in the request. /// - [JsonIgnore] + [JsonProperty("lookup_key")] #if NET6_0_OR_GREATER - [STJS.JsonIgnore] + [STJS.JsonPropertyName("lookup_key")] #endif - public string LookupKey - { - get => this.InternalLookupKey?.Value; - set - { - this.InternalLookupKey ??= new Emptyable(); - this.InternalLookupKey.Value = value; - } - } + public string LookupKey { get; set; } /// /// Set of key-value pairs that you can @@ -83,28 +49,6 @@ public string LookupKey #endif public MeteredItemUpdateTaxDetailsOptions TaxDetails { get; set; } - [JsonProperty("unit_label")] - [JsonConverter(typeof(EmptyableConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("unit_label")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalUnitLabel { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public bool EmptyUnitLabel - { - get => this.InternalUnitLabel?.Empty ?? false; - set - { - this.InternalUnitLabel ??= new Emptyable(); - this.InternalUnitLabel.Empty = value; - } - } - /// /// The unit to use when displaying prices for this billable item in places like Checkout. /// For example, set this field to "CPU-hour" for Checkout to display "(price) per @@ -112,18 +56,10 @@ public bool EmptyUnitLabel /// length of 100 characters. To remove the unit_label from the object, set it to null in /// the request. /// - [JsonIgnore] + [JsonProperty("unit_label")] #if NET6_0_OR_GREATER - [STJS.JsonIgnore] + [STJS.JsonPropertyName("unit_label")] #endif - public string UnitLabel - { - get => this.InternalUnitLabel?.Value; - set - { - this.InternalUnitLabel ??= new Emptyable(); - this.InternalUnitLabel.Value = value; - } - } + public string UnitLabel { get; set; } } } diff --git a/src/Stripe.net/Services/V2/Billing/PricingPlans/Components/ComponentService.cs b/src/Stripe.net/Services/V2/Billing/PricingPlans/Components/ComponentService.cs index 13e5d5ed40..90b9693e4a 100644 --- a/src/Stripe.net/Services/V2/Billing/PricingPlans/Components/ComponentService.cs +++ b/src/Stripe.net/Services/V2/Billing/PricingPlans/Components/ComponentService.cs @@ -39,17 +39,17 @@ public virtual V2.Billing.PricingPlanComponent Create(string id, ComponentCreate /// /// Remove a Pricing Plan Component from the latest version of a Pricing Plan. /// - public virtual V2.Billing.PricingPlanComponent Delete(string parentId, string id, ComponentDeleteOptions options = null, RequestOptions requestOptions = null) + public virtual V2.DeletedObject Delete(string parentId, string id, ComponentDeleteOptions options = null, RequestOptions requestOptions = null) { - return this.Request(BaseAddress.Api, HttpMethod.Delete, $"/v2/billing/pricing_plans/{WebUtility.UrlEncode(parentId)}/components/{WebUtility.UrlEncode(id)}", options, requestOptions); + return this.Request(BaseAddress.Api, HttpMethod.Delete, $"/v2/billing/pricing_plans/{WebUtility.UrlEncode(parentId)}/components/{WebUtility.UrlEncode(id)}", options, requestOptions); } /// /// Remove a Pricing Plan Component from the latest version of a Pricing Plan. /// - public virtual Task DeleteAsync(string parentId, string id, ComponentDeleteOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + public virtual Task DeleteAsync(string parentId, string id, ComponentDeleteOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) { - return this.RequestAsync(BaseAddress.Api, HttpMethod.Delete, $"/v2/billing/pricing_plans/{WebUtility.UrlEncode(parentId)}/components/{WebUtility.UrlEncode(id)}", options, requestOptions, cancellationToken); + return this.RequestAsync(BaseAddress.Api, HttpMethod.Delete, $"/v2/billing/pricing_plans/{WebUtility.UrlEncode(parentId)}/components/{WebUtility.UrlEncode(id)}", options, requestOptions, cancellationToken); } /// diff --git a/src/Stripe.net/Services/V2/Billing/Profiles/ProfileUpdateOptions.cs b/src/Stripe.net/Services/V2/Billing/Profiles/ProfileUpdateOptions.cs index b6352b87de..0fecdd11d0 100644 --- a/src/Stripe.net/Services/V2/Billing/Profiles/ProfileUpdateOptions.cs +++ b/src/Stripe.net/Services/V2/Billing/Profiles/ProfileUpdateOptions.cs @@ -3,14 +3,10 @@ namespace Stripe.V2.Billing { using System.Collections.Generic; using Newtonsoft.Json; - using Stripe.Infrastructure; #if NET6_0_OR_GREATER using STJS = System.Text.Json.Serialization; #endif -#if NET6_0_OR_GREATER - [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] -#endif public class ProfileUpdateOptions : BaseOptions, IHasMetadata { /// @@ -22,86 +18,26 @@ public class ProfileUpdateOptions : BaseOptions, IHasMetadata #endif public string DefaultPaymentMethod { get; set; } - [JsonProperty("display_name")] - [JsonConverter(typeof(EmptyableConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("display_name")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalDisplayName { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public bool EmptyDisplayName - { - get => this.InternalDisplayName?.Empty ?? false; - set - { - this.InternalDisplayName ??= new Emptyable(); - this.InternalDisplayName.Empty = value; - } - } - /// /// A customer-facing name for the billing profile. Maximum length of 250 characters. To /// remove the display_name from the object, set it to null in the request. /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public string DisplayName - { - get => this.InternalDisplayName?.Value; - set - { - this.InternalDisplayName ??= new Emptyable(); - this.InternalDisplayName.Value = value; - } - } - - [JsonProperty("lookup_key")] - [JsonConverter(typeof(EmptyableConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("lookup_key")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalLookupKey { get; set; } - - [JsonIgnore] + [JsonProperty("display_name")] #if NET6_0_OR_GREATER - [STJS.JsonIgnore] + [STJS.JsonPropertyName("display_name")] #endif - public bool EmptyLookupKey - { - get => this.InternalLookupKey?.Empty ?? false; - set - { - this.InternalLookupKey ??= new Emptyable(); - this.InternalLookupKey.Empty = value; - } - } + public string DisplayName { get; set; } /// /// An internal key you can use to search for a particular billing profile. It must be /// unique among billing profiles for a given customer. Maximum length of 200 characters. To /// remove the lookup_key from the object, set it to null in the request. /// - [JsonIgnore] + [JsonProperty("lookup_key")] #if NET6_0_OR_GREATER - [STJS.JsonIgnore] + [STJS.JsonPropertyName("lookup_key")] #endif - public string LookupKey - { - get => this.InternalLookupKey?.Value; - set - { - this.InternalLookupKey ??= new Emptyable(); - this.InternalLookupKey.Value = value; - } - } + public string LookupKey { get; set; } /// /// Set of key-value pairs that you can attach to an object. This can be useful for storing diff --git a/src/Stripe.net/Services/V2/Billing/RateCards/Rates/RateCreateTierOptions.cs b/src/Stripe.net/Services/V2/Billing/RateCards/Rates/RateCreateTierOptions.cs index 2f2f134618..1506b1f151 100644 --- a/src/Stripe.net/Services/V2/Billing/RateCards/Rates/RateCreateTierOptions.cs +++ b/src/Stripe.net/Services/V2/Billing/RateCards/Rates/RateCreateTierOptions.cs @@ -36,7 +36,7 @@ public class RateCreateTierOptions : INestedOptions #if NET6_0_OR_GREATER [STJS.JsonPropertyName("up_to_decimal")] #endif - public string UpToDecimal { get; set; } + public decimal? UpToDecimal { get; set; } /// /// No upper bound to this tier. Only one of up_to_decimal and up_to_inf may diff --git a/src/Stripe.net/Services/V2/Billing/RateCards/Rates/RateService.cs b/src/Stripe.net/Services/V2/Billing/RateCards/Rates/RateService.cs index 6892f1ef92..471a5d88cc 100644 --- a/src/Stripe.net/Services/V2/Billing/RateCards/Rates/RateService.cs +++ b/src/Stripe.net/Services/V2/Billing/RateCards/Rates/RateService.cs @@ -42,18 +42,18 @@ public virtual V2.Billing.RateCardRate Create(string id, RateCreateOptions optio /// Remove an existing Rate from a Rate Card. This will create a new Rate Card Version /// without that Rate. /// - public virtual V2.Billing.RateCardRate Delete(string parentId, string id, RateDeleteOptions options = null, RequestOptions requestOptions = null) + public virtual V2.DeletedObject Delete(string parentId, string id, RateDeleteOptions options = null, RequestOptions requestOptions = null) { - return this.Request(BaseAddress.Api, HttpMethod.Delete, $"/v2/billing/rate_cards/{WebUtility.UrlEncode(parentId)}/rates/{WebUtility.UrlEncode(id)}", options, requestOptions); + return this.Request(BaseAddress.Api, HttpMethod.Delete, $"/v2/billing/rate_cards/{WebUtility.UrlEncode(parentId)}/rates/{WebUtility.UrlEncode(id)}", options, requestOptions); } /// /// Remove an existing Rate from a Rate Card. This will create a new Rate Card Version /// without that Rate. /// - public virtual Task DeleteAsync(string parentId, string id, RateDeleteOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + public virtual Task DeleteAsync(string parentId, string id, RateDeleteOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) { - return this.RequestAsync(BaseAddress.Api, HttpMethod.Delete, $"/v2/billing/rate_cards/{WebUtility.UrlEncode(parentId)}/rates/{WebUtility.UrlEncode(id)}", options, requestOptions, cancellationToken); + return this.RequestAsync(BaseAddress.Api, HttpMethod.Delete, $"/v2/billing/rate_cards/{WebUtility.UrlEncode(parentId)}/rates/{WebUtility.UrlEncode(id)}", options, requestOptions, cancellationToken); } /// diff --git a/src/Stripe.net/Services/V2/Billing/ServiceActions/ServiceActionCreateCreditGrantAmountCustomPricingUnitOptions.cs b/src/Stripe.net/Services/V2/Billing/ServiceActions/ServiceActionCreateCreditGrantAmountCustomPricingUnitOptions.cs index 90b45eb735..8cec5301da 100644 --- a/src/Stripe.net/Services/V2/Billing/ServiceActions/ServiceActionCreateCreditGrantAmountCustomPricingUnitOptions.cs +++ b/src/Stripe.net/Services/V2/Billing/ServiceActions/ServiceActionCreateCreditGrantAmountCustomPricingUnitOptions.cs @@ -24,6 +24,6 @@ public class ServiceActionCreateCreditGrantAmountCustomPricingUnitOptions : INes #if NET6_0_OR_GREATER [STJS.JsonPropertyName("value")] #endif - public string Value { get; set; } + public decimal? Value { get; set; } } } diff --git a/src/Stripe.net/Services/V2/Billing/ServiceActions/ServiceActionCreateCreditGrantOptions.cs b/src/Stripe.net/Services/V2/Billing/ServiceActions/ServiceActionCreateCreditGrantOptions.cs index f9a49f3ca7..ad447c0264 100644 --- a/src/Stripe.net/Services/V2/Billing/ServiceActions/ServiceActionCreateCreditGrantOptions.cs +++ b/src/Stripe.net/Services/V2/Billing/ServiceActions/ServiceActionCreateCreditGrantOptions.cs @@ -26,16 +26,6 @@ public class ServiceActionCreateCreditGrantOptions : INestedOptions #endif public ServiceActionCreateCreditGrantApplicabilityConfigOptions ApplicabilityConfig { get; set; } - /// - /// The category of the credit grant. - /// One of: paid, or promotional. - /// - [JsonProperty("category")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("category")] -#endif - public string Category { get; set; } - /// /// The expiry configuration for the credit grant. /// @@ -53,15 +43,5 @@ public class ServiceActionCreateCreditGrantOptions : INestedOptions [STJS.JsonPropertyName("name")] #endif public string Name { get; set; } - - /// - /// The desired priority for applying this credit grant. If not specified, it will be set to - /// the default value of 50. The highest priority is 0 and the lowest is 100. - /// - [JsonProperty("priority")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("priority")] -#endif - public long? Priority { get; set; } } } diff --git a/src/Stripe.net/Services/V2/Billing/ServiceActions/ServiceActionCreateCreditGrantPerTenantAmountCustomPricingUnitOptions.cs b/src/Stripe.net/Services/V2/Billing/ServiceActions/ServiceActionCreateCreditGrantPerTenantAmountCustomPricingUnitOptions.cs index 0b969a77f2..4601ea2739 100644 --- a/src/Stripe.net/Services/V2/Billing/ServiceActions/ServiceActionCreateCreditGrantPerTenantAmountCustomPricingUnitOptions.cs +++ b/src/Stripe.net/Services/V2/Billing/ServiceActions/ServiceActionCreateCreditGrantPerTenantAmountCustomPricingUnitOptions.cs @@ -24,6 +24,6 @@ public class ServiceActionCreateCreditGrantPerTenantAmountCustomPricingUnitOptio #if NET6_0_OR_GREATER [STJS.JsonPropertyName("value")] #endif - public string Value { get; set; } + public decimal? Value { get; set; } } } diff --git a/src/Stripe.net/Services/V2/Billing/ServiceActions/ServiceActionCreateCreditGrantPerTenantOptions.cs b/src/Stripe.net/Services/V2/Billing/ServiceActions/ServiceActionCreateCreditGrantPerTenantOptions.cs index 9c13188319..112acd46da 100644 --- a/src/Stripe.net/Services/V2/Billing/ServiceActions/ServiceActionCreateCreditGrantPerTenantOptions.cs +++ b/src/Stripe.net/Services/V2/Billing/ServiceActions/ServiceActionCreateCreditGrantPerTenantOptions.cs @@ -26,16 +26,6 @@ public class ServiceActionCreateCreditGrantPerTenantOptions : INestedOptions #endif public ServiceActionCreateCreditGrantPerTenantApplicabilityConfigOptions ApplicabilityConfig { get; set; } - /// - /// The category of the credit grant. - /// One of: paid, or promotional. - /// - [JsonProperty("category")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("category")] -#endif - public string Category { get; set; } - /// /// The expiry configuration for the credit grant. /// @@ -62,15 +52,5 @@ public class ServiceActionCreateCreditGrantPerTenantOptions : INestedOptions [STJS.JsonPropertyName("name")] #endif public string Name { get; set; } - - /// - /// The desired priority for applying this credit grant. If not specified, it will be set to - /// the default value of 50. The highest priority is 0 and the lowest is 100. - /// - [JsonProperty("priority")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("priority")] -#endif - public long? Priority { get; set; } } } diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateDefaultsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateDefaultsOptions.cs index c9e4374a75..25f9f67ef8 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateDefaultsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateDefaultsOptions.cs @@ -13,32 +13,6 @@ public class AccountCreateDefaultsOptions : INestedOptions /// Three-letter ISO currency /// code, in lowercase. Must be a supported /// currency. - /// One of: aed, afn, all, amd, ang, aoa, - /// ars, aud, awg, azn, bam, bbd, bdt, - /// bgn, bhd, bif, bmd, bnd, bob, bov, - /// brl, bsd, btn, bwp, byn, byr, bzd, - /// cad, cdf, che, chf, chw, clf, clp, - /// cny, cop, cou, crc, cuc, cup, cve, - /// czk, djf, dkk, dop, dzd, eek, egp, - /// ern, etb, eur, fjd, fkp, gbp, gel, - /// ghc, ghs, gip, gmd, gnf, gtq, gyd, - /// hkd, hnl, hrk, htg, huf, idr, ils, - /// inr, iqd, irr, isk, jmd, jod, jpy, - /// kes, kgs, khr, kmf, kpw, krw, kwd, - /// kyd, kzt, lak, lbp, lkr, lrd, lsl, - /// ltl, lvl, lyd, mad, mdl, mga, mkd, - /// mmk, mnt, mop, mro, mru, mur, mvr, - /// mwk, mxn, mxv, myr, mzn, nad, ngn, - /// nio, nok, npr, nzd, omr, pab, pen, - /// pgk, php, pkr, pln, pyg, qar, ron, - /// rsd, rub, rwf, sar, sbd, scr, sdg, - /// sek, sgd, shp, sle, sll, sos, srd, - /// ssp, std, stn, svc, syp, szl, thb, - /// tjs, tmt, tnd, top, try, ttd, twd, - /// tzs, uah, ugx, usd, usdb, usdc, usn, - /// uyi, uyu, uzs, vef, ves, vnd, vuv, - /// wst, xaf, xcd, xcg, xof, xpf, yer, - /// zar, zmk, zmw, zwd, zwg, or zwl. /// [JsonProperty("currency")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateIdentityIndividualAdditionalAddressOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateIdentityIndividualAdditionalAddressOptions.cs index 481c5ddc1f..153eee909d 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateIdentityIndividualAdditionalAddressOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateIdentityIndividualAdditionalAddressOptions.cs @@ -20,38 +20,6 @@ public class AccountCreateIdentityIndividualAdditionalAddressOptions : INestedOp /// /// Two-letter country code (ISO /// 3166-1 alpha-2). - /// One of: ad, ae, af, ag, ai, al, am, - /// ao, aq, ar, as, at, au, aw, ax, - /// az, ba, bb, bd, be, bf, bg, bh, - /// bi, bj, bl, bm, bn, bo, bq, br, - /// bs, bt, bv, bw, by, bz, ca, cc, - /// cd, cf, cg, ch, ci, ck, cl, cm, - /// cn, co, cr, cu, cv, cw, cx, cy, - /// cz, de, dj, dk, dm, do, dz, ec, - /// ee, eg, eh, er, es, et, fi, fj, - /// fk, fm, fo, fr, ga, gb, gd, ge, - /// gf, gg, gh, gi, gl, gm, gn, gp, - /// gq, gr, gs, gt, gu, gw, gy, hk, - /// hm, hn, hr, ht, hu, id, ie, il, - /// im, in, io, iq, ir, is, it, je, - /// jm, jo, jp, ke, kg, kh, ki, km, - /// kn, kp, kr, kw, ky, kz, la, lb, - /// lc, li, lk, lr, ls, lt, lu, lv, - /// ly, ma, mc, md, me, mf, mg, mh, - /// mk, ml, mm, mn, mo, mp, mq, mr, - /// ms, mt, mu, mv, mw, mx, my, mz, - /// na, nc, ne, nf, ng, ni, nl, no, - /// np, nr, nu, nz, om, pa, pe, pf, - /// pg, ph, pk, pl, pm, pn, pr, ps, - /// pt, pw, py, qa, qz, re, ro, rs, - /// ru, rw, sa, sb, sc, sd, se, sg, - /// sh, si, sj, sk, sl, sm, sn, so, - /// sr, ss, st, sv, sx, sy, sz, tc, - /// td, tf, tg, th, tj, tk, tl, tm, - /// tn, to, tr, tt, tv, tw, tz, ua, - /// ug, um, us, uy, uz, va, vc, ve, - /// vg, vi, vn, vu, wf, ws, xx, ye, - /// yt, za, zm, or zw. /// [JsonProperty("country")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateIdentityIndividualOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateIdentityIndividualOptions.cs index 9b4dd96d30..903b996a23 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateIdentityIndividualOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateIdentityIndividualOptions.cs @@ -104,38 +104,6 @@ public class AccountCreateIdentityIndividualOptions : INestedOptions, IHasMetada /// /// The countries where the individual is a national. Two-letter country code (ISO 3166-1 alpha-2). - /// One of: ad, ae, af, ag, ai, al, am, - /// ao, aq, ar, as, at, au, aw, ax, - /// az, ba, bb, bd, be, bf, bg, bh, - /// bi, bj, bl, bm, bn, bo, bq, br, - /// bs, bt, bv, bw, by, bz, ca, cc, - /// cd, cf, cg, ch, ci, ck, cl, cm, - /// cn, co, cr, cu, cv, cw, cx, cy, - /// cz, de, dj, dk, dm, do, dz, ec, - /// ee, eg, eh, er, es, et, fi, fj, - /// fk, fm, fo, fr, ga, gb, gd, ge, - /// gf, gg, gh, gi, gl, gm, gn, gp, - /// gq, gr, gs, gt, gu, gw, gy, hk, - /// hm, hn, hr, ht, hu, id, ie, il, - /// im, in, io, iq, ir, is, it, je, - /// jm, jo, jp, ke, kg, kh, ki, km, - /// kn, kp, kr, kw, ky, kz, la, lb, - /// lc, li, lk, lr, ls, lt, lu, lv, - /// ly, ma, mc, md, me, mf, mg, mh, - /// mk, ml, mm, mn, mo, mp, mq, mr, - /// ms, mt, mu, mv, mw, mx, my, mz, - /// na, nc, ne, nf, ng, ni, nl, no, - /// np, nr, nu, nz, om, pa, pe, pf, - /// pg, ph, pk, pl, pm, pn, pr, ps, - /// pt, pw, py, qa, qz, re, ro, rs, - /// ru, rw, sa, sb, sc, sd, se, sg, - /// sh, si, sj, sk, sl, sm, sn, so, - /// sr, ss, st, sv, sx, sy, sz, tc, - /// td, tf, tg, th, tj, tk, tl, tm, - /// tn, to, tr, tt, tv, tw, tz, ua, - /// ug, um, us, uy, uz, va, vc, ve, - /// vg, vi, vn, vu, wf, ws, xx, ye, - /// yt, za, zm, or zw. /// [JsonProperty("nationalities")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateIdentityIndividualRelationshipOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateIdentityIndividualRelationshipOptions.cs index f8d1392e98..a653e9e3ef 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateIdentityIndividualRelationshipOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateIdentityIndividualRelationshipOptions.cs @@ -45,7 +45,7 @@ public class AccountCreateIdentityIndividualRelationshipOptions : INestedOptions #if NET6_0_OR_GREATER [STJS.JsonPropertyName("percent_ownership")] #endif - public string PercentOwnership { get; set; } + public decimal? PercentOwnership { get; set; } /// /// The person's title (e.g., CEO, Support Engineer). diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateIdentityOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateIdentityOptions.cs index d3f8dab379..8d1377621b 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateIdentityOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateIdentityOptions.cs @@ -31,38 +31,6 @@ public class AccountCreateIdentityOptions : INestedOptions /// established. This should be an ISO 3166-1 alpha-2 country /// code. - /// One of: ad, ae, af, ag, ai, al, am, - /// ao, aq, ar, as, at, au, aw, ax, - /// az, ba, bb, bd, be, bf, bg, bh, - /// bi, bj, bl, bm, bn, bo, bq, br, - /// bs, bt, bv, bw, by, bz, ca, cc, - /// cd, cf, cg, ch, ci, ck, cl, cm, - /// cn, co, cr, cu, cv, cw, cx, cy, - /// cz, de, dj, dk, dm, do, dz, ec, - /// ee, eg, eh, er, es, et, fi, fj, - /// fk, fm, fo, fr, ga, gb, gd, ge, - /// gf, gg, gh, gi, gl, gm, gn, gp, - /// gq, gr, gs, gt, gu, gw, gy, hk, - /// hm, hn, hr, ht, hu, id, ie, il, - /// im, in, io, iq, ir, is, it, je, - /// jm, jo, jp, ke, kg, kh, ki, km, - /// kn, kp, kr, kw, ky, kz, la, lb, - /// lc, li, lk, lr, ls, lt, lu, lv, - /// ly, ma, mc, md, me, mf, mg, mh, - /// mk, ml, mm, mn, mo, mp, mq, mr, - /// ms, mt, mu, mv, mw, mx, my, mz, - /// na, nc, ne, nf, ng, ni, nl, no, - /// np, nr, nu, nz, om, pa, pe, pf, - /// pg, ph, pk, pl, pm, pn, pr, ps, - /// pt, pw, py, qa, qz, re, ro, rs, - /// ru, rw, sa, sb, sc, sd, se, sg, - /// sh, si, sj, sk, sl, sm, sn, so, - /// sr, ss, st, sv, sx, sy, sz, tc, - /// td, tf, tg, th, tj, tk, tl, tm, - /// tn, to, tr, tt, tv, tw, tz, ua, - /// ug, um, us, uy, uz, va, vc, ve, - /// vg, vi, vn, vu, wf, ws, xx, ye, - /// yt, za, zm, or zw. /// [JsonProperty("country")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateDefaultsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateDefaultsOptions.cs index cc5fcd98d7..086468f06d 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateDefaultsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateDefaultsOptions.cs @@ -13,32 +13,6 @@ public class AccountUpdateDefaultsOptions : INestedOptions /// Three-letter ISO currency /// code, in lowercase. Must be a supported /// currency. - /// One of: aed, afn, all, amd, ang, aoa, - /// ars, aud, awg, azn, bam, bbd, bdt, - /// bgn, bhd, bif, bmd, bnd, bob, bov, - /// brl, bsd, btn, bwp, byn, byr, bzd, - /// cad, cdf, che, chf, chw, clf, clp, - /// cny, cop, cou, crc, cuc, cup, cve, - /// czk, djf, dkk, dop, dzd, eek, egp, - /// ern, etb, eur, fjd, fkp, gbp, gel, - /// ghc, ghs, gip, gmd, gnf, gtq, gyd, - /// hkd, hnl, hrk, htg, huf, idr, ils, - /// inr, iqd, irr, isk, jmd, jod, jpy, - /// kes, kgs, khr, kmf, kpw, krw, kwd, - /// kyd, kzt, lak, lbp, lkr, lrd, lsl, - /// ltl, lvl, lyd, mad, mdl, mga, mkd, - /// mmk, mnt, mop, mro, mru, mur, mvr, - /// mwk, mxn, mxv, myr, mzn, nad, ngn, - /// nio, nok, npr, nzd, omr, pab, pen, - /// pgk, php, pkr, pln, pyg, qar, ron, - /// rsd, rub, rwf, sar, sbd, scr, sdg, - /// sek, sgd, shp, sle, sll, sos, srd, - /// ssp, std, stn, svc, syp, szl, thb, - /// tjs, tmt, tnd, top, try, ttd, twd, - /// tzs, uah, ugx, usd, usdb, usdc, usn, - /// uyi, uyu, uzs, vef, ves, vnd, vuv, - /// wst, xaf, xcd, xcg, xof, xpf, yer, - /// zar, zmk, zmw, zwd, zwg, or zwl. /// [JsonProperty("currency")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityBusinessDetailsAnnualRevenueOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityBusinessDetailsAnnualRevenueOptions.cs index 108b54cc97..cc10bc5641 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityBusinessDetailsAnnualRevenueOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityBusinessDetailsAnnualRevenueOptions.cs @@ -2,14 +2,10 @@ namespace Stripe.V2.Core { using Newtonsoft.Json; - using Stripe.Infrastructure; #if NET6_0_OR_GREATER using STJS = System.Text.Json.Serialization; #endif -#if NET6_0_OR_GREATER - [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] -#endif public class AccountUpdateIdentityBusinessDetailsAnnualRevenueOptions : INestedOptions { /// @@ -21,44 +17,14 @@ public class AccountUpdateIdentityBusinessDetailsAnnualRevenueOptions : INestedO #endif public V2.Amount Amount { get; set; } - [JsonProperty("fiscal_year_end")] - [JsonConverter(typeof(EmptyableConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("fiscal_year_end")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalFiscalYearEnd { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public bool EmptyFiscalYearEnd - { - get => this.InternalFiscalYearEnd?.Empty ?? false; - set - { - this.InternalFiscalYearEnd ??= new Emptyable(); - this.InternalFiscalYearEnd.Empty = value; - } - } - /// /// The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for /// the 31st of December, 2023. /// - [JsonIgnore] + [JsonProperty("fiscal_year_end")] #if NET6_0_OR_GREATER - [STJS.JsonIgnore] + [STJS.JsonPropertyName("fiscal_year_end")] #endif - public string FiscalYearEnd - { - get => this.InternalFiscalYearEnd?.Value; - set - { - this.InternalFiscalYearEnd ??= new Emptyable(); - this.InternalFiscalYearEnd.Value = value; - } - } + public string FiscalYearEnd { get; set; } } } diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityBusinessDetailsDocumentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityBusinessDetailsDocumentsOptions.cs index 1b339ea939..d182e849a1 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityBusinessDetailsDocumentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityBusinessDetailsDocumentsOptions.cs @@ -2,292 +2,78 @@ namespace Stripe.V2.Core { using Newtonsoft.Json; - using Stripe.Infrastructure; #if NET6_0_OR_GREATER using STJS = System.Text.Json.Serialization; #endif -#if NET6_0_OR_GREATER - [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] -#endif public class AccountUpdateIdentityBusinessDetailsDocumentsOptions : INestedOptions { - [JsonProperty("bank_account_ownership_verification")] - [JsonConverter(typeof(EmptyableConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("bank_account_ownership_verification")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalBankAccountOwnershipVerification { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public bool EmptyBankAccountOwnershipVerification - { - get => this.InternalBankAccountOwnershipVerification?.Empty ?? false; - set - { - this.InternalBankAccountOwnershipVerification ??= new Emptyable(); - this.InternalBankAccountOwnershipVerification.Empty = value; - } - } - /// /// One or more documents that support the bank account ownership verification requirement. /// Must be a document associated with the account’s primary active bank account that /// displays the last 4 digits of the account number, either a statement or a check. /// - [JsonIgnore] + [JsonProperty("bank_account_ownership_verification")] #if NET6_0_OR_GREATER - [STJS.JsonIgnore] + [STJS.JsonPropertyName("bank_account_ownership_verification")] #endif - public AccountUpdateIdentityBusinessDetailsDocumentsBankAccountOwnershipVerificationOptions BankAccountOwnershipVerification - { - get => this.InternalBankAccountOwnershipVerification?.Value; - set - { - this.InternalBankAccountOwnershipVerification ??= new Emptyable(); - this.InternalBankAccountOwnershipVerification.Value = value; - } - } + public AccountUpdateIdentityBusinessDetailsDocumentsBankAccountOwnershipVerificationOptions BankAccountOwnershipVerification { get; set; } + /// + /// One or more documents that demonstrate proof of a company’s license to operate. + /// [JsonProperty("company_license")] - [JsonConverter(typeof(EmptyableConverter))] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("company_license")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] #endif - internal Emptyable InternalCompanyLicense { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public bool EmptyCompanyLicense - { - get => this.InternalCompanyLicense?.Empty ?? false; - set - { - this.InternalCompanyLicense ??= new Emptyable(); - this.InternalCompanyLicense.Empty = value; - } - } + public AccountUpdateIdentityBusinessDetailsDocumentsCompanyLicenseOptions CompanyLicense { get; set; } /// - /// One or more documents that demonstrate proof of a company’s license to operate. + /// One or more documents showing the company’s Memorandum of Association. /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public AccountUpdateIdentityBusinessDetailsDocumentsCompanyLicenseOptions CompanyLicense - { - get => this.InternalCompanyLicense?.Value; - set - { - this.InternalCompanyLicense ??= new Emptyable(); - this.InternalCompanyLicense.Value = value; - } - } - [JsonProperty("company_memorandum_of_association")] - [JsonConverter(typeof(EmptyableConverter))] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("company_memorandum_of_association")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalCompanyMemorandumOfAssociation { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] #endif - public bool EmptyCompanyMemorandumOfAssociation - { - get => this.InternalCompanyMemorandumOfAssociation?.Empty ?? false; - set - { - this.InternalCompanyMemorandumOfAssociation ??= new Emptyable(); - this.InternalCompanyMemorandumOfAssociation.Empty = value; - } - } + public AccountUpdateIdentityBusinessDetailsDocumentsCompanyMemorandumOfAssociationOptions CompanyMemorandumOfAssociation { get; set; } /// - /// One or more documents showing the company’s Memorandum of Association. + /// Certain countries only: One or more documents showing the ministerial decree legalizing + /// the company’s establishment. /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public AccountUpdateIdentityBusinessDetailsDocumentsCompanyMemorandumOfAssociationOptions CompanyMemorandumOfAssociation - { - get => this.InternalCompanyMemorandumOfAssociation?.Value; - set - { - this.InternalCompanyMemorandumOfAssociation ??= new Emptyable(); - this.InternalCompanyMemorandumOfAssociation.Value = value; - } - } - [JsonProperty("company_ministerial_decree")] - [JsonConverter(typeof(EmptyableConverter))] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("company_ministerial_decree")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalCompanyMinisterialDecree { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] #endif - public bool EmptyCompanyMinisterialDecree - { - get => this.InternalCompanyMinisterialDecree?.Empty ?? false; - set - { - this.InternalCompanyMinisterialDecree ??= new Emptyable(); - this.InternalCompanyMinisterialDecree.Empty = value; - } - } + public AccountUpdateIdentityBusinessDetailsDocumentsCompanyMinisterialDecreeOptions CompanyMinisterialDecree { get; set; } /// - /// Certain countries only: One or more documents showing the ministerial decree legalizing - /// the company’s establishment. + /// One or more documents that demonstrate proof of a company’s registration with the + /// appropriate local authorities. /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public AccountUpdateIdentityBusinessDetailsDocumentsCompanyMinisterialDecreeOptions CompanyMinisterialDecree - { - get => this.InternalCompanyMinisterialDecree?.Value; - set - { - this.InternalCompanyMinisterialDecree ??= new Emptyable(); - this.InternalCompanyMinisterialDecree.Value = value; - } - } - [JsonProperty("company_registration_verification")] - [JsonConverter(typeof(EmptyableConverter))] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("company_registration_verification")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalCompanyRegistrationVerification { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] #endif - public bool EmptyCompanyRegistrationVerification - { - get => this.InternalCompanyRegistrationVerification?.Empty ?? false; - set - { - this.InternalCompanyRegistrationVerification ??= new Emptyable(); - this.InternalCompanyRegistrationVerification.Empty = value; - } - } + public AccountUpdateIdentityBusinessDetailsDocumentsCompanyRegistrationVerificationOptions CompanyRegistrationVerification { get; set; } /// - /// One or more documents that demonstrate proof of a company’s registration with the - /// appropriate local authorities. + /// One or more documents that demonstrate proof of a company’s tax ID. /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public AccountUpdateIdentityBusinessDetailsDocumentsCompanyRegistrationVerificationOptions CompanyRegistrationVerification - { - get => this.InternalCompanyRegistrationVerification?.Value; - set - { - this.InternalCompanyRegistrationVerification ??= new Emptyable(); - this.InternalCompanyRegistrationVerification.Value = value; - } - } - [JsonProperty("company_tax_id_verification")] - [JsonConverter(typeof(EmptyableConverter))] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("company_tax_id_verification")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalCompanyTaxIdVerification { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] #endif - public bool EmptyCompanyTaxIdVerification - { - get => this.InternalCompanyTaxIdVerification?.Empty ?? false; - set - { - this.InternalCompanyTaxIdVerification ??= new Emptyable(); - this.InternalCompanyTaxIdVerification.Empty = value; - } - } + public AccountUpdateIdentityBusinessDetailsDocumentsCompanyTaxIdVerificationOptions CompanyTaxIdVerification { get; set; } /// - /// One or more documents that demonstrate proof of a company’s tax ID. + /// A document verifying the business. /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public AccountUpdateIdentityBusinessDetailsDocumentsCompanyTaxIdVerificationOptions CompanyTaxIdVerification - { - get => this.InternalCompanyTaxIdVerification?.Value; - set - { - this.InternalCompanyTaxIdVerification ??= new Emptyable(); - this.InternalCompanyTaxIdVerification.Value = value; - } - } - [JsonProperty("primary_verification")] - [JsonConverter(typeof(EmptyableConverter))] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("primary_verification")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] #endif - internal Emptyable InternalPrimaryVerification { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public bool EmptyPrimaryVerification - { - get => this.InternalPrimaryVerification?.Empty ?? false; - set - { - this.InternalPrimaryVerification ??= new Emptyable(); - this.InternalPrimaryVerification.Empty = value; - } - } - - /// - /// A document verifying the business. - /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public AccountUpdateIdentityBusinessDetailsDocumentsPrimaryVerificationOptions PrimaryVerification - { - get => this.InternalPrimaryVerification?.Value; - set - { - this.InternalPrimaryVerification ??= new Emptyable(); - this.InternalPrimaryVerification.Value = value; - } - } + public AccountUpdateIdentityBusinessDetailsDocumentsPrimaryVerificationOptions PrimaryVerification { get; set; } /// /// One or more documents that demonstrate proof of address. @@ -298,45 +84,15 @@ public AccountUpdateIdentityBusinessDetailsDocumentsPrimaryVerificationOptions P #endif public AccountUpdateIdentityBusinessDetailsDocumentsProofOfAddressOptions ProofOfAddress { get; set; } - [JsonProperty("proof_of_registration")] - [JsonConverter(typeof(EmptyableConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("proof_of_registration")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalProofOfRegistration { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public bool EmptyProofOfRegistration - { - get => this.InternalProofOfRegistration?.Empty ?? false; - set - { - this.InternalProofOfRegistration ??= new Emptyable(); - this.InternalProofOfRegistration.Empty = value; - } - } - /// /// One or more documents showing the company’s proof of registration with the national /// business registry. /// - [JsonIgnore] + [JsonProperty("proof_of_registration")] #if NET6_0_OR_GREATER - [STJS.JsonIgnore] + [STJS.JsonPropertyName("proof_of_registration")] #endif - public AccountUpdateIdentityBusinessDetailsDocumentsProofOfRegistrationOptions ProofOfRegistration - { - get => this.InternalProofOfRegistration?.Value; - set - { - this.InternalProofOfRegistration ??= new Emptyable(); - this.InternalProofOfRegistration.Value = value; - } - } + public AccountUpdateIdentityBusinessDetailsDocumentsProofOfRegistrationOptions ProofOfRegistration { get; set; } /// /// One or more documents that demonstrate proof of ultimate beneficial ownership. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityBusinessDetailsDocumentsPrimaryVerificationFrontBackOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityBusinessDetailsDocumentsPrimaryVerificationFrontBackOptions.cs index 80539929d9..ad33a67815 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityBusinessDetailsDocumentsPrimaryVerificationFrontBackOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityBusinessDetailsDocumentsPrimaryVerificationFrontBackOptions.cs @@ -2,57 +2,23 @@ namespace Stripe.V2.Core { using Newtonsoft.Json; - using Stripe.Infrastructure; #if NET6_0_OR_GREATER using STJS = System.Text.Json.Serialization; #endif -#if NET6_0_OR_GREATER - [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] -#endif public class AccountUpdateIdentityBusinessDetailsDocumentsPrimaryVerificationFrontBackOptions : INestedOptions { - [JsonProperty("back")] - [JsonConverter(typeof(EmptyableConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("back")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalBack { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public bool EmptyBack - { - get => this.InternalBack?.Empty ?? false; - set - { - this.InternalBack ??= new Emptyable(); - this.InternalBack.Empty = value; - } - } - /// /// A file upload token /// representing the back of the verification document. The purpose of the uploaded file /// should be 'identity_document'. The uploaded file needs to be a color image (smaller than /// 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. /// - [JsonIgnore] + [JsonProperty("back")] #if NET6_0_OR_GREATER - [STJS.JsonIgnore] + [STJS.JsonPropertyName("back")] #endif - public string Back - { - get => this.InternalBack?.Value; - set - { - this.InternalBack ??= new Emptyable(); - this.InternalBack.Value = value; - } - } + public string Back { get; set; } /// /// A file upload token diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityBusinessDetailsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityBusinessDetailsOptions.cs index e3bf3ab567..7c37a8a9dd 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityBusinessDetailsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityBusinessDetailsOptions.cs @@ -3,507 +3,121 @@ namespace Stripe.V2.Core { using System.Collections.Generic; using Newtonsoft.Json; - using Stripe.Infrastructure; #if NET6_0_OR_GREATER using STJS = System.Text.Json.Serialization; #endif -#if NET6_0_OR_GREATER - [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] -#endif public class AccountUpdateIdentityBusinessDetailsOptions : INestedOptions { + /// + /// The business registration address of the business entity. + /// [JsonProperty("address")] - [JsonConverter(typeof(EmptyableConverter))] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("address")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalAddress { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] #endif - public bool EmptyAddress - { - get => this.InternalAddress?.Empty ?? false; - set - { - this.InternalAddress ??= new Emptyable(); - this.InternalAddress.Empty = value; - } - } + public AddressJapanOptions Address { get; set; } /// - /// The business registration address of the business entity. + /// The business gross annual revenue for its preceding fiscal year. /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public AddressJapanOptions Address - { - get => this.InternalAddress?.Value; - set - { - this.InternalAddress ??= new Emptyable(); - this.InternalAddress.Value = value; - } - } - [JsonProperty("annual_revenue")] - [JsonConverter(typeof(EmptyableConverter))] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("annual_revenue")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalAnnualRevenue { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] #endif - public bool EmptyAnnualRevenue - { - get => this.InternalAnnualRevenue?.Empty ?? false; - set - { - this.InternalAnnualRevenue ??= new Emptyable(); - this.InternalAnnualRevenue.Empty = value; - } - } + public AccountUpdateIdentityBusinessDetailsAnnualRevenueOptions AnnualRevenue { get; set; } /// - /// The business gross annual revenue for its preceding fiscal year. + /// A document verifying the business. /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public AccountUpdateIdentityBusinessDetailsAnnualRevenueOptions AnnualRevenue - { - get => this.InternalAnnualRevenue?.Value; - set - { - this.InternalAnnualRevenue ??= new Emptyable(); - this.InternalAnnualRevenue.Value = value; - } - } - [JsonProperty("documents")] - [JsonConverter(typeof(EmptyableConverter))] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("documents")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalDocuments { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] #endif - public bool EmptyDocuments - { - get => this.InternalDocuments?.Empty ?? false; - set - { - this.InternalDocuments ??= new Emptyable(); - this.InternalDocuments.Empty = value; - } - } + public AccountUpdateIdentityBusinessDetailsDocumentsOptions Documents { get; set; } /// - /// A document verifying the business. + /// The name which is used by the business. /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public AccountUpdateIdentityBusinessDetailsDocumentsOptions Documents - { - get => this.InternalDocuments?.Value; - set - { - this.InternalDocuments ??= new Emptyable(); - this.InternalDocuments.Value = value; - } - } - [JsonProperty("doing_business_as")] - [JsonConverter(typeof(EmptyableConverter))] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("doing_business_as")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalDoingBusinessAs { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] #endif - public bool EmptyDoingBusinessAs - { - get => this.InternalDoingBusinessAs?.Empty ?? false; - set - { - this.InternalDoingBusinessAs ??= new Emptyable(); - this.InternalDoingBusinessAs.Empty = value; - } - } + public string DoingBusinessAs { get; set; } /// - /// The name which is used by the business. + /// An estimated upper bound of employees, contractors, vendors, etc. currently working for + /// the business. /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public string DoingBusinessAs - { - get => this.InternalDoingBusinessAs?.Value; - set - { - this.InternalDoingBusinessAs ??= new Emptyable(); - this.InternalDoingBusinessAs.Value = value; - } - } - [JsonProperty("estimated_worker_count")] - [JsonConverter(typeof(EmptyableConverter))] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("estimated_worker_count")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalEstimatedWorkerCount { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] #endif - public bool EmptyEstimatedWorkerCount - { - get => this.InternalEstimatedWorkerCount?.Empty ?? false; - set - { - this.InternalEstimatedWorkerCount ??= new Emptyable(); - this.InternalEstimatedWorkerCount.Empty = value; - } - } + public long? EstimatedWorkerCount { get; set; } /// - /// An estimated upper bound of employees, contractors, vendors, etc. currently working for - /// the business. + /// The ID numbers of a business entity. /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public long? EstimatedWorkerCount - { - get => this.InternalEstimatedWorkerCount?.Value; - set - { - this.InternalEstimatedWorkerCount ??= new Emptyable(); - this.InternalEstimatedWorkerCount.Value = value; - } - } - [JsonProperty("id_numbers")] - [JsonConverter(typeof(EmptyableConverter>))] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("id_numbers")] - [STJS.JsonConverter(typeof(STJEmptyableConverter>))] #endif - internal Emptyable> InternalIdNumbers { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public bool EmptyIdNumbers - { - get => this.InternalIdNumbers?.Empty ?? false; - set - { - this.InternalIdNumbers ??= new Emptyable>(); - this.InternalIdNumbers.Empty = value; - } - } + public List IdNumbers { get; set; } /// - /// The ID numbers of a business entity. + /// An estimate of the monthly revenue of the business. /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public List IdNumbers - { - get => this.InternalIdNumbers?.Value; - set - { - this.InternalIdNumbers ??= new Emptyable>(); - this.InternalIdNumbers.Value = value; - } - } - [JsonProperty("monthly_estimated_revenue")] - [JsonConverter(typeof(EmptyableConverter))] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("monthly_estimated_revenue")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] #endif - internal Emptyable InternalMonthlyEstimatedRevenue { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public bool EmptyMonthlyEstimatedRevenue - { - get => this.InternalMonthlyEstimatedRevenue?.Empty ?? false; - set - { - this.InternalMonthlyEstimatedRevenue ??= new Emptyable(); - this.InternalMonthlyEstimatedRevenue.Empty = value; - } - } + public AccountUpdateIdentityBusinessDetailsMonthlyEstimatedRevenueOptions MonthlyEstimatedRevenue { get; set; } /// - /// An estimate of the monthly revenue of the business. + /// The phone number of the Business Entity. /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public AccountUpdateIdentityBusinessDetailsMonthlyEstimatedRevenueOptions MonthlyEstimatedRevenue - { - get => this.InternalMonthlyEstimatedRevenue?.Value; - set - { - this.InternalMonthlyEstimatedRevenue ??= new Emptyable(); - this.InternalMonthlyEstimatedRevenue.Value = value; - } - } - [JsonProperty("phone")] - [JsonConverter(typeof(EmptyableConverter))] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("phone")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] #endif - internal Emptyable InternalPhone { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public bool EmptyPhone - { - get => this.InternalPhone?.Empty ?? false; - set - { - this.InternalPhone ??= new Emptyable(); - this.InternalPhone.Empty = value; - } - } + public string Phone { get; set; } /// - /// The phone number of the Business Entity. + /// Internal-only description of the product sold or service provided by the business. It’s + /// used by Stripe for risk and underwriting purposes. /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public string Phone - { - get => this.InternalPhone?.Value; - set - { - this.InternalPhone ??= new Emptyable(); - this.InternalPhone.Value = value; - } - } - [JsonProperty("product_description")] - [JsonConverter(typeof(EmptyableConverter))] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("product_description")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalProductDescription { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] #endif - public bool EmptyProductDescription - { - get => this.InternalProductDescription?.Empty ?? false; - set - { - this.InternalProductDescription ??= new Emptyable(); - this.InternalProductDescription.Empty = value; - } - } + public string ProductDescription { get; set; } /// - /// Internal-only description of the product sold or service provided by the business. It’s - /// used by Stripe for risk and underwriting purposes. + /// The business legal name. /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public string ProductDescription - { - get => this.InternalProductDescription?.Value; - set - { - this.InternalProductDescription ??= new Emptyable(); - this.InternalProductDescription.Value = value; - } - } - [JsonProperty("registered_name")] - [JsonConverter(typeof(EmptyableConverter))] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("registered_name")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalRegisteredName { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] #endif - public bool EmptyRegisteredName - { - get => this.InternalRegisteredName?.Empty ?? false; - set - { - this.InternalRegisteredName ??= new Emptyable(); - this.InternalRegisteredName.Empty = value; - } - } + public string RegisteredName { get; set; } /// - /// The business legal name. + /// The business registration address of the business entity in non latin script. /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public string RegisteredName - { - get => this.InternalRegisteredName?.Value; - set - { - this.InternalRegisteredName ??= new Emptyable(); - this.InternalRegisteredName.Value = value; - } - } - [JsonProperty("script_addresses")] - [JsonConverter(typeof(EmptyableConverter))] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("script_addresses")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalScriptAddresses { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] #endif - public bool EmptyScriptAddresses - { - get => this.InternalScriptAddresses?.Empty ?? false; - set - { - this.InternalScriptAddresses ??= new Emptyable(); - this.InternalScriptAddresses.Empty = value; - } - } + public AccountUpdateIdentityBusinessDetailsScriptAddressesOptions ScriptAddresses { get; set; } /// - /// The business registration address of the business entity in non latin script. + /// The business legal name in non latin script. /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public AccountUpdateIdentityBusinessDetailsScriptAddressesOptions ScriptAddresses - { - get => this.InternalScriptAddresses?.Value; - set - { - this.InternalScriptAddresses ??= new Emptyable(); - this.InternalScriptAddresses.Value = value; - } - } - [JsonProperty("script_names")] - [JsonConverter(typeof(EmptyableConverter))] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("script_names")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalScriptNames { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] #endif - public bool EmptyScriptNames - { - get => this.InternalScriptNames?.Empty ?? false; - set - { - this.InternalScriptNames ??= new Emptyable(); - this.InternalScriptNames.Empty = value; - } - } - - /// - /// The business legal name in non latin script. - /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public AccountUpdateIdentityBusinessDetailsScriptNamesOptions ScriptNames - { - get => this.InternalScriptNames?.Value; - set - { - this.InternalScriptNames ??= new Emptyable(); - this.InternalScriptNames.Value = value; - } - } - - [JsonProperty("structure")] - [JsonConverter(typeof(EmptyableConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("structure")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalStructure { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public bool EmptyStructure - { - get => this.InternalStructure?.Empty ?? false; - set - { - this.InternalStructure ??= new Emptyable(); - this.InternalStructure.Empty = value; - } - } + public AccountUpdateIdentityBusinessDetailsScriptNamesOptions ScriptNames { get; set; } /// /// The category identifying the legal structure of the business. @@ -519,57 +133,19 @@ public bool EmptyStructure /// unincorporated_association, unincorporated_non_profit, or /// unincorporated_partnership. /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public string Structure - { - get => this.InternalStructure?.Value; - set - { - this.InternalStructure ??= new Emptyable(); - this.InternalStructure.Value = value; - } - } - - [JsonProperty("url")] - [JsonConverter(typeof(EmptyableConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("url")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalUrl { get; set; } - - [JsonIgnore] + [JsonProperty("structure")] #if NET6_0_OR_GREATER - [STJS.JsonIgnore] + [STJS.JsonPropertyName("structure")] #endif - public bool EmptyUrl - { - get => this.InternalUrl?.Empty ?? false; - set - { - this.InternalUrl ??= new Emptyable(); - this.InternalUrl.Empty = value; - } - } + public string Structure { get; set; } /// /// The business's publicly available website. /// - [JsonIgnore] + [JsonProperty("url")] #if NET6_0_OR_GREATER - [STJS.JsonIgnore] + [STJS.JsonPropertyName("url")] #endif - public string Url - { - get => this.InternalUrl?.Value; - set - { - this.InternalUrl ??= new Emptyable(); - this.InternalUrl.Value = value; - } - } + public string Url { get; set; } } } diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityBusinessDetailsScriptAddressesOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityBusinessDetailsScriptAddressesOptions.cs index ccf3ce1aac..b8430641e8 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityBusinessDetailsScriptAddressesOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityBusinessDetailsScriptAddressesOptions.cs @@ -2,92 +2,28 @@ namespace Stripe.V2.Core { using Newtonsoft.Json; - using Stripe.Infrastructure; #if NET6_0_OR_GREATER using STJS = System.Text.Json.Serialization; #endif -#if NET6_0_OR_GREATER - [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] -#endif public class AccountUpdateIdentityBusinessDetailsScriptAddressesOptions : INestedOptions { - [JsonProperty("kana")] - [JsonConverter(typeof(EmptyableConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("kana")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalKana { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public bool EmptyKana - { - get => this.InternalKana?.Empty ?? false; - set - { - this.InternalKana ??= new Emptyable(); - this.InternalKana.Empty = value; - } - } - /// /// Kana Address. /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public AddressJapanOptions Kana - { - get => this.InternalKana?.Value; - set - { - this.InternalKana ??= new Emptyable(); - this.InternalKana.Value = value; - } - } - - [JsonProperty("kanji")] - [JsonConverter(typeof(EmptyableConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("kanji")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalKanji { get; set; } - - [JsonIgnore] + [JsonProperty("kana")] #if NET6_0_OR_GREATER - [STJS.JsonIgnore] + [STJS.JsonPropertyName("kana")] #endif - public bool EmptyKanji - { - get => this.InternalKanji?.Empty ?? false; - set - { - this.InternalKanji ??= new Emptyable(); - this.InternalKanji.Empty = value; - } - } + public AddressJapanOptions Kana { get; set; } /// /// Kanji Address. /// - [JsonIgnore] + [JsonProperty("kanji")] #if NET6_0_OR_GREATER - [STJS.JsonIgnore] + [STJS.JsonPropertyName("kanji")] #endif - public AddressJapanOptions Kanji - { - get => this.InternalKanji?.Value; - set - { - this.InternalKanji ??= new Emptyable(); - this.InternalKanji.Value = value; - } - } + public AddressJapanOptions Kanji { get; set; } } } diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityBusinessDetailsScriptNamesKanaOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityBusinessDetailsScriptNamesKanaOptions.cs index b017bb3023..e38ce59164 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityBusinessDetailsScriptNamesKanaOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityBusinessDetailsScriptNamesKanaOptions.cs @@ -2,53 +2,19 @@ namespace Stripe.V2.Core { using Newtonsoft.Json; - using Stripe.Infrastructure; #if NET6_0_OR_GREATER using STJS = System.Text.Json.Serialization; #endif -#if NET6_0_OR_GREATER - [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] -#endif public class AccountUpdateIdentityBusinessDetailsScriptNamesKanaOptions : INestedOptions { - [JsonProperty("registered_name")] - [JsonConverter(typeof(EmptyableConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("registered_name")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalRegisteredName { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public bool EmptyRegisteredName - { - get => this.InternalRegisteredName?.Empty ?? false; - set - { - this.InternalRegisteredName ??= new Emptyable(); - this.InternalRegisteredName.Empty = value; - } - } - /// /// Registered name of the business. /// - [JsonIgnore] + [JsonProperty("registered_name")] #if NET6_0_OR_GREATER - [STJS.JsonIgnore] + [STJS.JsonPropertyName("registered_name")] #endif - public string RegisteredName - { - get => this.InternalRegisteredName?.Value; - set - { - this.InternalRegisteredName ??= new Emptyable(); - this.InternalRegisteredName.Value = value; - } - } + public string RegisteredName { get; set; } } } diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityBusinessDetailsScriptNamesKanjiOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityBusinessDetailsScriptNamesKanjiOptions.cs index 23bb955aad..5d0ce00bcd 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityBusinessDetailsScriptNamesKanjiOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityBusinessDetailsScriptNamesKanjiOptions.cs @@ -2,53 +2,19 @@ namespace Stripe.V2.Core { using Newtonsoft.Json; - using Stripe.Infrastructure; #if NET6_0_OR_GREATER using STJS = System.Text.Json.Serialization; #endif -#if NET6_0_OR_GREATER - [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] -#endif public class AccountUpdateIdentityBusinessDetailsScriptNamesKanjiOptions : INestedOptions { - [JsonProperty("registered_name")] - [JsonConverter(typeof(EmptyableConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("registered_name")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalRegisteredName { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public bool EmptyRegisteredName - { - get => this.InternalRegisteredName?.Empty ?? false; - set - { - this.InternalRegisteredName ??= new Emptyable(); - this.InternalRegisteredName.Empty = value; - } - } - /// /// Registered name of the business. /// - [JsonIgnore] + [JsonProperty("registered_name")] #if NET6_0_OR_GREATER - [STJS.JsonIgnore] + [STJS.JsonPropertyName("registered_name")] #endif - public string RegisteredName - { - get => this.InternalRegisteredName?.Value; - set - { - this.InternalRegisteredName ??= new Emptyable(); - this.InternalRegisteredName.Value = value; - } - } + public string RegisteredName { get; set; } } } diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityBusinessDetailsScriptNamesOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityBusinessDetailsScriptNamesOptions.cs index 91737d044f..69ef6f1a30 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityBusinessDetailsScriptNamesOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityBusinessDetailsScriptNamesOptions.cs @@ -2,92 +2,28 @@ namespace Stripe.V2.Core { using Newtonsoft.Json; - using Stripe.Infrastructure; #if NET6_0_OR_GREATER using STJS = System.Text.Json.Serialization; #endif -#if NET6_0_OR_GREATER - [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] -#endif public class AccountUpdateIdentityBusinessDetailsScriptNamesOptions : INestedOptions { - [JsonProperty("kana")] - [JsonConverter(typeof(EmptyableConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("kana")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalKana { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public bool EmptyKana - { - get => this.InternalKana?.Empty ?? false; - set - { - this.InternalKana ??= new Emptyable(); - this.InternalKana.Empty = value; - } - } - /// /// Kana name. /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public AccountUpdateIdentityBusinessDetailsScriptNamesKanaOptions Kana - { - get => this.InternalKana?.Value; - set - { - this.InternalKana ??= new Emptyable(); - this.InternalKana.Value = value; - } - } - - [JsonProperty("kanji")] - [JsonConverter(typeof(EmptyableConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("kanji")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalKanji { get; set; } - - [JsonIgnore] + [JsonProperty("kana")] #if NET6_0_OR_GREATER - [STJS.JsonIgnore] + [STJS.JsonPropertyName("kana")] #endif - public bool EmptyKanji - { - get => this.InternalKanji?.Empty ?? false; - set - { - this.InternalKanji ??= new Emptyable(); - this.InternalKanji.Empty = value; - } - } + public AccountUpdateIdentityBusinessDetailsScriptNamesKanaOptions Kana { get; set; } /// /// Kanji name. /// - [JsonIgnore] + [JsonProperty("kanji")] #if NET6_0_OR_GREATER - [STJS.JsonIgnore] + [STJS.JsonPropertyName("kanji")] #endif - public AccountUpdateIdentityBusinessDetailsScriptNamesKanjiOptions Kanji - { - get => this.InternalKanji?.Value; - set - { - this.InternalKanji ??= new Emptyable(); - this.InternalKanji.Value = value; - } - } + public AccountUpdateIdentityBusinessDetailsScriptNamesKanjiOptions Kanji { get; set; } } } diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityIndividualAdditionalAddressOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityIndividualAdditionalAddressOptions.cs index c7f7e0f629..984433a0c0 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityIndividualAdditionalAddressOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityIndividualAdditionalAddressOptions.cs @@ -2,243 +2,57 @@ namespace Stripe.V2.Core { using Newtonsoft.Json; - using Stripe.Infrastructure; #if NET6_0_OR_GREATER using STJS = System.Text.Json.Serialization; #endif -#if NET6_0_OR_GREATER - [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] -#endif public class AccountUpdateIdentityIndividualAdditionalAddressOptions : INestedOptions { + /// + /// City, district, suburb, town, or village. + /// [JsonProperty("city")] - [JsonConverter(typeof(EmptyableConverter))] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("city")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] #endif - internal Emptyable InternalCity { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public bool EmptyCity - { - get => this.InternalCity?.Empty ?? false; - set - { - this.InternalCity ??= new Emptyable(); - this.InternalCity.Empty = value; - } - } + public string City { get; set; } /// - /// City, district, suburb, town, or village. + /// Two-letter country code (ISO + /// 3166-1 alpha-2). /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public string City - { - get => this.InternalCity?.Value; - set - { - this.InternalCity ??= new Emptyable(); - this.InternalCity.Value = value; - } - } - [JsonProperty("country")] - [JsonConverter(typeof(EmptyableConverter))] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("country")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalCountry { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] #endif - public bool EmptyCountry - { - get => this.InternalCountry?.Empty ?? false; - set - { - this.InternalCountry ??= new Emptyable(); - this.InternalCountry.Empty = value; - } - } + public string Country { get; set; } /// - /// Two-letter country code (ISO - /// 3166-1 alpha-2). - /// One of: ad, ae, af, ag, ai, al, am, - /// ao, aq, ar, as, at, au, aw, ax, - /// az, ba, bb, bd, be, bf, bg, bh, - /// bi, bj, bl, bm, bn, bo, bq, br, - /// bs, bt, bv, bw, by, bz, ca, cc, - /// cd, cf, cg, ch, ci, ck, cl, cm, - /// cn, co, cr, cu, cv, cw, cx, cy, - /// cz, de, dj, dk, dm, do, dz, ec, - /// ee, eg, eh, er, es, et, fi, fj, - /// fk, fm, fo, fr, ga, gb, gd, ge, - /// gf, gg, gh, gi, gl, gm, gn, gp, - /// gq, gr, gs, gt, gu, gw, gy, hk, - /// hm, hn, hr, ht, hu, id, ie, il, - /// im, in, io, iq, ir, is, it, je, - /// jm, jo, jp, ke, kg, kh, ki, km, - /// kn, kp, kr, kw, ky, kz, la, lb, - /// lc, li, lk, lr, ls, lt, lu, lv, - /// ly, ma, mc, md, me, mf, mg, mh, - /// mk, ml, mm, mn, mo, mp, mq, mr, - /// ms, mt, mu, mv, mw, mx, my, mz, - /// na, nc, ne, nf, ng, ni, nl, no, - /// np, nr, nu, nz, om, pa, pe, pf, - /// pg, ph, pk, pl, pm, pn, pr, ps, - /// pt, pw, py, qa, qz, re, ro, rs, - /// ru, rw, sa, sb, sc, sd, se, sg, - /// sh, si, sj, sk, sl, sm, sn, so, - /// sr, ss, st, sv, sx, sy, sz, tc, - /// td, tf, tg, th, tj, tk, tl, tm, - /// tn, to, tr, tt, tv, tw, tz, ua, - /// ug, um, us, uy, uz, va, vc, ve, - /// vg, vi, vn, vu, wf, ws, xx, ye, - /// yt, za, zm, or zw. + /// Address line 1 (e.g., street, PO Box, or company name). /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public string Country - { - get => this.InternalCountry?.Value; - set - { - this.InternalCountry ??= new Emptyable(); - this.InternalCountry.Value = value; - } - } - [JsonProperty("line1")] - [JsonConverter(typeof(EmptyableConverter))] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("line1")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalLine1 { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] #endif - public bool EmptyLine1 - { - get => this.InternalLine1?.Empty ?? false; - set - { - this.InternalLine1 ??= new Emptyable(); - this.InternalLine1.Empty = value; - } - } + public string Line1 { get; set; } /// - /// Address line 1 (e.g., street, PO Box, or company name). + /// Address line 2 (e.g., apartment, suite, unit, or building). /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public string Line1 - { - get => this.InternalLine1?.Value; - set - { - this.InternalLine1 ??= new Emptyable(); - this.InternalLine1.Value = value; - } - } - [JsonProperty("line2")] - [JsonConverter(typeof(EmptyableConverter))] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("line2")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalLine2 { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] #endif - public bool EmptyLine2 - { - get => this.InternalLine2?.Empty ?? false; - set - { - this.InternalLine2 ??= new Emptyable(); - this.InternalLine2.Empty = value; - } - } + public string Line2 { get; set; } /// - /// Address line 2 (e.g., apartment, suite, unit, or building). + /// ZIP or postal code. /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public string Line2 - { - get => this.InternalLine2?.Value; - set - { - this.InternalLine2 ??= new Emptyable(); - this.InternalLine2.Value = value; - } - } - [JsonProperty("postal_code")] - [JsonConverter(typeof(EmptyableConverter))] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("postal_code")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] #endif - internal Emptyable InternalPostalCode { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public bool EmptyPostalCode - { - get => this.InternalPostalCode?.Empty ?? false; - set - { - this.InternalPostalCode ??= new Emptyable(); - this.InternalPostalCode.Empty = value; - } - } - - /// - /// ZIP or postal code. - /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public string PostalCode - { - get => this.InternalPostalCode?.Value; - set - { - this.InternalPostalCode ??= new Emptyable(); - this.InternalPostalCode.Value = value; - } - } + public string PostalCode { get; set; } /// /// Purpose of additional address. @@ -249,82 +63,22 @@ public string PostalCode #endif public string Purpose { get; set; } - [JsonProperty("state")] - [JsonConverter(typeof(EmptyableConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("state")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalState { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public bool EmptyState - { - get => this.InternalState?.Empty ?? false; - set - { - this.InternalState ??= new Emptyable(); - this.InternalState.Empty = value; - } - } - /// /// State, county, province, or region. /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public string State - { - get => this.InternalState?.Value; - set - { - this.InternalState ??= new Emptyable(); - this.InternalState.Value = value; - } - } - - [JsonProperty("town")] - [JsonConverter(typeof(EmptyableConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("town")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalTown { get; set; } - - [JsonIgnore] + [JsonProperty("state")] #if NET6_0_OR_GREATER - [STJS.JsonIgnore] + [STJS.JsonPropertyName("state")] #endif - public bool EmptyTown - { - get => this.InternalTown?.Empty ?? false; - set - { - this.InternalTown ??= new Emptyable(); - this.InternalTown.Empty = value; - } - } + public string State { get; set; } /// /// Town or cho-me. /// - [JsonIgnore] + [JsonProperty("town")] #if NET6_0_OR_GREATER - [STJS.JsonIgnore] + [STJS.JsonPropertyName("town")] #endif - public string Town - { - get => this.InternalTown?.Value; - set - { - this.InternalTown ??= new Emptyable(); - this.InternalTown.Value = value; - } - } + public string Town { get; set; } } } diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityIndividualDocumentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityIndividualDocumentsOptions.cs index 2f28d5cdf9..1569ab2786 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityIndividualDocumentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityIndividualDocumentsOptions.cs @@ -2,14 +2,10 @@ namespace Stripe.V2.Core { using Newtonsoft.Json; - using Stripe.Infrastructure; #if NET6_0_OR_GREATER using STJS = System.Text.Json.Serialization; #endif -#if NET6_0_OR_GREATER - [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] -#endif public class AccountUpdateIdentityIndividualDocumentsOptions : INestedOptions { /// @@ -31,84 +27,24 @@ public class AccountUpdateIdentityIndividualDocumentsOptions : INestedOptions #endif public AccountUpdateIdentityIndividualDocumentsPassportOptions Passport { get; set; } - [JsonProperty("primary_verification")] - [JsonConverter(typeof(EmptyableConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("primary_verification")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalPrimaryVerification { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public bool EmptyPrimaryVerification - { - get => this.InternalPrimaryVerification?.Empty ?? false; - set - { - this.InternalPrimaryVerification ??= new Emptyable(); - this.InternalPrimaryVerification.Empty = value; - } - } - /// /// An identifying document showing the person's name, either a passport or local ID card. /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public AccountUpdateIdentityIndividualDocumentsPrimaryVerificationOptions PrimaryVerification - { - get => this.InternalPrimaryVerification?.Value; - set - { - this.InternalPrimaryVerification ??= new Emptyable(); - this.InternalPrimaryVerification.Value = value; - } - } - - [JsonProperty("secondary_verification")] - [JsonConverter(typeof(EmptyableConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("secondary_verification")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalSecondaryVerification { get; set; } - - [JsonIgnore] + [JsonProperty("primary_verification")] #if NET6_0_OR_GREATER - [STJS.JsonIgnore] + [STJS.JsonPropertyName("primary_verification")] #endif - public bool EmptySecondaryVerification - { - get => this.InternalSecondaryVerification?.Empty ?? false; - set - { - this.InternalSecondaryVerification ??= new Emptyable(); - this.InternalSecondaryVerification.Empty = value; - } - } + public AccountUpdateIdentityIndividualDocumentsPrimaryVerificationOptions PrimaryVerification { get; set; } /// /// A document showing address, either a passport, local ID card, or utility bill from a /// well-known utility company. /// - [JsonIgnore] + [JsonProperty("secondary_verification")] #if NET6_0_OR_GREATER - [STJS.JsonIgnore] + [STJS.JsonPropertyName("secondary_verification")] #endif - public AccountUpdateIdentityIndividualDocumentsSecondaryVerificationOptions SecondaryVerification - { - get => this.InternalSecondaryVerification?.Value; - set - { - this.InternalSecondaryVerification ??= new Emptyable(); - this.InternalSecondaryVerification.Value = value; - } - } + public AccountUpdateIdentityIndividualDocumentsSecondaryVerificationOptions SecondaryVerification { get; set; } /// /// One or more documents showing the person’s visa required for living in the country where diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityIndividualDocumentsPrimaryVerificationFrontBackOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityIndividualDocumentsPrimaryVerificationFrontBackOptions.cs index ed087630b3..5c50ddd274 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityIndividualDocumentsPrimaryVerificationFrontBackOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityIndividualDocumentsPrimaryVerificationFrontBackOptions.cs @@ -2,57 +2,23 @@ namespace Stripe.V2.Core { using Newtonsoft.Json; - using Stripe.Infrastructure; #if NET6_0_OR_GREATER using STJS = System.Text.Json.Serialization; #endif -#if NET6_0_OR_GREATER - [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] -#endif public class AccountUpdateIdentityIndividualDocumentsPrimaryVerificationFrontBackOptions : INestedOptions { - [JsonProperty("back")] - [JsonConverter(typeof(EmptyableConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("back")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalBack { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public bool EmptyBack - { - get => this.InternalBack?.Empty ?? false; - set - { - this.InternalBack ??= new Emptyable(); - this.InternalBack.Empty = value; - } - } - /// /// A file upload token /// representing the back of the verification document. The purpose of the uploaded file /// should be 'identity_document'. The uploaded file needs to be a color image (smaller than /// 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. /// - [JsonIgnore] + [JsonProperty("back")] #if NET6_0_OR_GREATER - [STJS.JsonIgnore] + [STJS.JsonPropertyName("back")] #endif - public string Back - { - get => this.InternalBack?.Value; - set - { - this.InternalBack ??= new Emptyable(); - this.InternalBack.Value = value; - } - } + public string Back { get; set; } /// /// A file upload token diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityIndividualDocumentsSecondaryVerificationFrontBackOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityIndividualDocumentsSecondaryVerificationFrontBackOptions.cs index 82966669dc..f2ed030b4c 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityIndividualDocumentsSecondaryVerificationFrontBackOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityIndividualDocumentsSecondaryVerificationFrontBackOptions.cs @@ -2,57 +2,23 @@ namespace Stripe.V2.Core { using Newtonsoft.Json; - using Stripe.Infrastructure; #if NET6_0_OR_GREATER using STJS = System.Text.Json.Serialization; #endif -#if NET6_0_OR_GREATER - [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] -#endif public class AccountUpdateIdentityIndividualDocumentsSecondaryVerificationFrontBackOptions : INestedOptions { - [JsonProperty("back")] - [JsonConverter(typeof(EmptyableConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("back")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalBack { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public bool EmptyBack - { - get => this.InternalBack?.Empty ?? false; - set - { - this.InternalBack ??= new Emptyable(); - this.InternalBack.Empty = value; - } - } - /// /// A file upload token /// representing the back of the verification document. The purpose of the uploaded file /// should be 'identity_document'. The uploaded file needs to be a color image (smaller than /// 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. /// - [JsonIgnore] + [JsonProperty("back")] #if NET6_0_OR_GREATER - [STJS.JsonIgnore] + [STJS.JsonPropertyName("back")] #endif - public string Back - { - get => this.InternalBack?.Value; - set - { - this.InternalBack ??= new Emptyable(); - this.InternalBack.Value = value; - } - } + public string Back { get; set; } /// /// A file upload token diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityIndividualOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityIndividualOptions.cs index 07d8c5b8ac..689d2709cf 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityIndividualOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityIndividualOptions.cs @@ -3,367 +3,93 @@ namespace Stripe.V2.Core { using System.Collections.Generic; using Newtonsoft.Json; - using Stripe.Infrastructure; #if NET6_0_OR_GREATER using STJS = System.Text.Json.Serialization; #endif -#if NET6_0_OR_GREATER - [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] -#endif public class AccountUpdateIdentityIndividualOptions : INestedOptions, IHasMetadata { + /// + /// Additional addresses associated with the individual. + /// [JsonProperty("additional_addresses")] - [JsonConverter(typeof(EmptyableConverter>))] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("additional_addresses")] - [STJS.JsonConverter(typeof(STJEmptyableConverter>))] #endif - internal Emptyable> InternalAdditionalAddresses { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public bool EmptyAdditionalAddresses - { - get => this.InternalAdditionalAddresses?.Empty ?? false; - set - { - this.InternalAdditionalAddresses ??= new Emptyable>(); - this.InternalAdditionalAddresses.Empty = value; - } - } + public List AdditionalAddresses { get; set; } /// - /// Additional addresses associated with the individual. + /// Additional names (e.g. aliases) associated with the individual. /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public List AdditionalAddresses - { - get => this.InternalAdditionalAddresses?.Value; - set - { - this.InternalAdditionalAddresses ??= new Emptyable>(); - this.InternalAdditionalAddresses.Value = value; - } - } - [JsonProperty("additional_names")] - [JsonConverter(typeof(EmptyableConverter>))] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("additional_names")] - [STJS.JsonConverter(typeof(STJEmptyableConverter>))] #endif - internal Emptyable> InternalAdditionalNames { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public bool EmptyAdditionalNames - { - get => this.InternalAdditionalNames?.Empty ?? false; - set - { - this.InternalAdditionalNames ??= new Emptyable>(); - this.InternalAdditionalNames.Empty = value; - } - } + public List AdditionalNames { get; set; } /// - /// Additional names (e.g. aliases) associated with the individual. + /// The individual's residential address. /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public List AdditionalNames - { - get => this.InternalAdditionalNames?.Value; - set - { - this.InternalAdditionalNames ??= new Emptyable>(); - this.InternalAdditionalNames.Value = value; - } - } - [JsonProperty("address")] - [JsonConverter(typeof(EmptyableConverter))] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("address")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] #endif - internal Emptyable InternalAddress { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public bool EmptyAddress - { - get => this.InternalAddress?.Empty ?? false; - set - { - this.InternalAddress ??= new Emptyable(); - this.InternalAddress.Empty = value; - } - } + public AddressJapanOptions Address { get; set; } /// - /// The individual's residential address. + /// The individual's date of birth. /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public AddressJapanOptions Address - { - get => this.InternalAddress?.Value; - set - { - this.InternalAddress ??= new Emptyable(); - this.InternalAddress.Value = value; - } - } - [JsonProperty("date_of_birth")] - [JsonConverter(typeof(EmptyableConverter))] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("date_of_birth")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalDateOfBirth { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] #endif - public bool EmptyDateOfBirth - { - get => this.InternalDateOfBirth?.Empty ?? false; - set - { - this.InternalDateOfBirth ??= new Emptyable(); - this.InternalDateOfBirth.Empty = value; - } - } + public AccountUpdateIdentityIndividualDateOfBirthOptions DateOfBirth { get; set; } /// - /// The individual's date of birth. + /// Documents that may be submitted to satisfy various informational requests. /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public AccountUpdateIdentityIndividualDateOfBirthOptions DateOfBirth - { - get => this.InternalDateOfBirth?.Value; - set - { - this.InternalDateOfBirth ??= new Emptyable(); - this.InternalDateOfBirth.Value = value; - } - } - [JsonProperty("documents")] - [JsonConverter(typeof(EmptyableConverter))] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("documents")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] #endif - internal Emptyable InternalDocuments { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public bool EmptyDocuments - { - get => this.InternalDocuments?.Empty ?? false; - set - { - this.InternalDocuments ??= new Emptyable(); - this.InternalDocuments.Empty = value; - } - } + public AccountUpdateIdentityIndividualDocumentsOptions Documents { get; set; } /// - /// Documents that may be submitted to satisfy various informational requests. + /// The individual's email address. /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public AccountUpdateIdentityIndividualDocumentsOptions Documents - { - get => this.InternalDocuments?.Value; - set - { - this.InternalDocuments ??= new Emptyable(); - this.InternalDocuments.Value = value; - } - } - [JsonProperty("email")] - [JsonConverter(typeof(EmptyableConverter))] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("email")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalEmail { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] #endif - public bool EmptyEmail - { - get => this.InternalEmail?.Empty ?? false; - set - { - this.InternalEmail ??= new Emptyable(); - this.InternalEmail.Empty = value; - } - } + public string Email { get; set; } /// - /// The individual's email address. + /// The individual's first name. /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public string Email - { - get => this.InternalEmail?.Value; - set - { - this.InternalEmail ??= new Emptyable(); - this.InternalEmail.Value = value; - } - } - [JsonProperty("given_name")] - [JsonConverter(typeof(EmptyableConverter))] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("given_name")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalGivenName { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] #endif - public bool EmptyGivenName - { - get => this.InternalGivenName?.Empty ?? false; - set - { - this.InternalGivenName ??= new Emptyable(); - this.InternalGivenName.Empty = value; - } - } + public string GivenName { get; set; } /// - /// The individual's first name. + /// The identification numbers (e.g., SSN) associated with the individual. /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public string GivenName - { - get => this.InternalGivenName?.Value; - set - { - this.InternalGivenName ??= new Emptyable(); - this.InternalGivenName.Value = value; - } - } - [JsonProperty("id_numbers")] - [JsonConverter(typeof(EmptyableConverter>))] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("id_numbers")] - [STJS.JsonConverter(typeof(STJEmptyableConverter>))] -#endif - internal Emptyable> InternalIdNumbers { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public bool EmptyIdNumbers - { - get => this.InternalIdNumbers?.Empty ?? false; - set - { - this.InternalIdNumbers ??= new Emptyable>(); - this.InternalIdNumbers.Empty = value; - } - } - - /// - /// The identification numbers (e.g., SSN) associated with the individual. - /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] #endif - public List IdNumbers - { - get => this.InternalIdNumbers?.Value; - set - { - this.InternalIdNumbers ??= new Emptyable>(); - this.InternalIdNumbers.Value = value; - } - } - - [JsonProperty("legal_gender")] - [JsonConverter(typeof(EmptyableConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("legal_gender")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalLegalGender { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public bool EmptyLegalGender - { - get => this.InternalLegalGender?.Empty ?? false; - set - { - this.InternalLegalGender ??= new Emptyable(); - this.InternalLegalGender.Empty = value; - } - } + public List IdNumbers { get; set; } /// /// The individual's gender (International regulations require either "male" or "female"). /// One of: female, or male. /// - [JsonIgnore] + [JsonProperty("legal_gender")] #if NET6_0_OR_GREATER - [STJS.JsonIgnore] + [STJS.JsonPropertyName("legal_gender")] #endif - public string LegalGender - { - get => this.InternalLegalGender?.Value; - set - { - this.InternalLegalGender ??= new Emptyable(); - this.InternalLegalGender.Value = value; - } - } + public string LegalGender { get; set; } /// /// Set of key-value pairs that you can attach to an object. This can be useful for storing @@ -378,38 +104,6 @@ public string LegalGender /// /// The countries where the individual is a national. Two-letter country code (ISO 3166-1 alpha-2). - /// One of: ad, ae, af, ag, ai, al, am, - /// ao, aq, ar, as, at, au, aw, ax, - /// az, ba, bb, bd, be, bf, bg, bh, - /// bi, bj, bl, bm, bn, bo, bq, br, - /// bs, bt, bv, bw, by, bz, ca, cc, - /// cd, cf, cg, ch, ci, ck, cl, cm, - /// cn, co, cr, cu, cv, cw, cx, cy, - /// cz, de, dj, dk, dm, do, dz, ec, - /// ee, eg, eh, er, es, et, fi, fj, - /// fk, fm, fo, fr, ga, gb, gd, ge, - /// gf, gg, gh, gi, gl, gm, gn, gp, - /// gq, gr, gs, gt, gu, gw, gy, hk, - /// hm, hn, hr, ht, hu, id, ie, il, - /// im, in, io, iq, ir, is, it, je, - /// jm, jo, jp, ke, kg, kh, ki, km, - /// kn, kp, kr, kw, ky, kz, la, lb, - /// lc, li, lk, lr, ls, lt, lu, lv, - /// ly, ma, mc, md, me, mf, mg, mh, - /// mk, ml, mm, mn, mo, mp, mq, mr, - /// ms, mt, mu, mv, mw, mx, my, mz, - /// na, nc, ne, nf, ng, ni, nl, no, - /// np, nr, nu, nz, om, pa, pe, pf, - /// pg, ph, pk, pl, pm, pn, pr, ps, - /// pt, pw, py, qa, qz, re, ro, rs, - /// ru, rw, sa, sb, sc, sd, se, sg, - /// sh, si, sj, sk, sl, sm, sn, so, - /// sr, ss, st, sv, sx, sy, sz, tc, - /// td, tf, tg, th, tj, tk, tl, tm, - /// tn, to, tr, tt, tv, tw, tz, ua, - /// ug, um, us, uy, uz, va, vc, ve, - /// vg, vi, vn, vu, wf, ws, xx, ye, - /// yt, za, zm, or zw. /// [JsonProperty("nationalities")] #if NET6_0_OR_GREATER @@ -417,239 +111,59 @@ public string LegalGender #endif public List Nationalities { get; set; } + /// + /// The individual's phone number. + /// [JsonProperty("phone")] - [JsonConverter(typeof(EmptyableConverter))] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("phone")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalPhone { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] #endif - public bool EmptyPhone - { - get => this.InternalPhone?.Empty ?? false; - set - { - this.InternalPhone ??= new Emptyable(); - this.InternalPhone.Empty = value; - } - } + public string Phone { get; set; } /// - /// The individual's phone number. + /// The individual's political exposure. + /// One of: existing, or none. /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public string Phone - { - get => this.InternalPhone?.Value; - set - { - this.InternalPhone ??= new Emptyable(); - this.InternalPhone.Value = value; - } - } - [JsonProperty("political_exposure")] - [JsonConverter(typeof(EmptyableConverter))] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("political_exposure")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] #endif - internal Emptyable InternalPoliticalExposure { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public bool EmptyPoliticalExposure - { - get => this.InternalPoliticalExposure?.Empty ?? false; - set - { - this.InternalPoliticalExposure ??= new Emptyable(); - this.InternalPoliticalExposure.Empty = value; - } - } + public string PoliticalExposure { get; set; } /// - /// The individual's political exposure. - /// One of: existing, or none. + /// The relationship that this individual has with the account's identity. /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public string PoliticalExposure - { - get => this.InternalPoliticalExposure?.Value; - set - { - this.InternalPoliticalExposure ??= new Emptyable(); - this.InternalPoliticalExposure.Value = value; - } - } - [JsonProperty("relationship")] - [JsonConverter(typeof(EmptyableConverter))] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("relationship")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] #endif - internal Emptyable InternalRelationship { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public bool EmptyRelationship - { - get => this.InternalRelationship?.Empty ?? false; - set - { - this.InternalRelationship ??= new Emptyable(); - this.InternalRelationship.Empty = value; - } - } + public AccountUpdateIdentityIndividualRelationshipOptions Relationship { get; set; } /// - /// The relationship that this individual has with the account's identity. + /// The script addresses (e.g., non-Latin characters) associated with the individual. /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public AccountUpdateIdentityIndividualRelationshipOptions Relationship - { - get => this.InternalRelationship?.Value; - set - { - this.InternalRelationship ??= new Emptyable(); - this.InternalRelationship.Value = value; - } - } - [JsonProperty("script_addresses")] - [JsonConverter(typeof(EmptyableConverter))] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("script_addresses")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] #endif - internal Emptyable InternalScriptAddresses { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public bool EmptyScriptAddresses - { - get => this.InternalScriptAddresses?.Empty ?? false; - set - { - this.InternalScriptAddresses ??= new Emptyable(); - this.InternalScriptAddresses.Empty = value; - } - } + public AccountUpdateIdentityIndividualScriptAddressesOptions ScriptAddresses { get; set; } /// - /// The script addresses (e.g., non-Latin characters) associated with the individual. + /// The individuals primary name in non latin script. /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public AccountUpdateIdentityIndividualScriptAddressesOptions ScriptAddresses - { - get => this.InternalScriptAddresses?.Value; - set - { - this.InternalScriptAddresses ??= new Emptyable(); - this.InternalScriptAddresses.Value = value; - } - } - [JsonProperty("script_names")] - [JsonConverter(typeof(EmptyableConverter))] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("script_names")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] #endif - internal Emptyable InternalScriptNames { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public bool EmptyScriptNames - { - get => this.InternalScriptNames?.Empty ?? false; - set - { - this.InternalScriptNames ??= new Emptyable(); - this.InternalScriptNames.Empty = value; - } - } + public AccountUpdateIdentityIndividualScriptNamesOptions ScriptNames { get; set; } /// - /// The individuals primary name in non latin script. + /// The individual's last name. /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public AccountUpdateIdentityIndividualScriptNamesOptions ScriptNames - { - get => this.InternalScriptNames?.Value; - set - { - this.InternalScriptNames ??= new Emptyable(); - this.InternalScriptNames.Value = value; - } - } - [JsonProperty("surname")] - [JsonConverter(typeof(EmptyableConverter))] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("surname")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalSurname { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public bool EmptySurname - { - get => this.InternalSurname?.Empty ?? false; - set - { - this.InternalSurname ??= new Emptyable(); - this.InternalSurname.Empty = value; - } - } - - /// - /// The individual's last name. - /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] #endif - public string Surname - { - get => this.InternalSurname?.Value; - set - { - this.InternalSurname ??= new Emptyable(); - this.InternalSurname.Value = value; - } - } + public string Surname { get; set; } } } diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityIndividualRelationshipOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityIndividualRelationshipOptions.cs index ee68889652..f519ae50d0 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityIndividualRelationshipOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityIndividualRelationshipOptions.cs @@ -2,212 +2,58 @@ namespace Stripe.V2.Core { using Newtonsoft.Json; - using Stripe.Infrastructure; #if NET6_0_OR_GREATER using STJS = System.Text.Json.Serialization; #endif -#if NET6_0_OR_GREATER - [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] -#endif public class AccountUpdateIdentityIndividualRelationshipOptions : INestedOptions { - [JsonProperty("director")] - [JsonConverter(typeof(EmptyableConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("director")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalDirector { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public bool EmptyDirector - { - get => this.InternalDirector?.Empty ?? false; - set - { - this.InternalDirector ??= new Emptyable(); - this.InternalDirector.Empty = value; - } - } - /// /// Whether the person is a director of the account's identity. Directors are typically /// members of the governing board of the company, or responsible for ensuring the company /// meets its regulatory obligations. /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public bool? Director - { - get => this.InternalDirector?.Value; - set - { - this.InternalDirector ??= new Emptyable(); - this.InternalDirector.Value = value; - } - } - - [JsonProperty("executive")] - [JsonConverter(typeof(EmptyableConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("executive")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalExecutive { get; set; } - - [JsonIgnore] + [JsonProperty("director")] #if NET6_0_OR_GREATER - [STJS.JsonIgnore] + [STJS.JsonPropertyName("director")] #endif - public bool EmptyExecutive - { - get => this.InternalExecutive?.Empty ?? false; - set - { - this.InternalExecutive ??= new Emptyable(); - this.InternalExecutive.Empty = value; - } - } + public bool? Director { get; set; } /// /// Whether the person has significant responsibility to control, manage, or direct the /// organization. /// - [JsonIgnore] + [JsonProperty("executive")] #if NET6_0_OR_GREATER - [STJS.JsonIgnore] + [STJS.JsonPropertyName("executive")] #endif - public bool? Executive - { - get => this.InternalExecutive?.Value; - set - { - this.InternalExecutive ??= new Emptyable(); - this.InternalExecutive.Value = value; - } - } + public bool? Executive { get; set; } + /// + /// Whether the person is an owner of the account’s identity. + /// [JsonProperty("owner")] - [JsonConverter(typeof(EmptyableConverter))] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("owner")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] #endif - internal Emptyable InternalOwner { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public bool EmptyOwner - { - get => this.InternalOwner?.Empty ?? false; - set - { - this.InternalOwner ??= new Emptyable(); - this.InternalOwner.Empty = value; - } - } + public bool? Owner { get; set; } /// - /// Whether the person is an owner of the account’s identity. + /// The percent owned by the person of the account's legal entity. /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public bool? Owner - { - get => this.InternalOwner?.Value; - set - { - this.InternalOwner ??= new Emptyable(); - this.InternalOwner.Value = value; - } - } - [JsonProperty("percent_ownership")] - [JsonConverter(typeof(EmptyableConverter))] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("percent_ownership")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalPercentOwnership { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] #endif - public bool EmptyPercentOwnership - { - get => this.InternalPercentOwnership?.Empty ?? false; - set - { - this.InternalPercentOwnership ??= new Emptyable(); - this.InternalPercentOwnership.Empty = value; - } - } + public decimal? PercentOwnership { get; set; } /// - /// The percent owned by the person of the account's legal entity. + /// The person's title (e.g., CEO, Support Engineer). /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public string PercentOwnership - { - get => this.InternalPercentOwnership?.Value; - set - { - this.InternalPercentOwnership ??= new Emptyable(); - this.InternalPercentOwnership.Value = value; - } - } - [JsonProperty("title")] - [JsonConverter(typeof(EmptyableConverter))] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("title")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalTitle { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public bool EmptyTitle - { - get => this.InternalTitle?.Empty ?? false; - set - { - this.InternalTitle ??= new Emptyable(); - this.InternalTitle.Empty = value; - } - } - - /// - /// The person's title (e.g., CEO, Support Engineer). - /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] #endif - public string Title - { - get => this.InternalTitle?.Value; - set - { - this.InternalTitle ??= new Emptyable(); - this.InternalTitle.Value = value; - } - } + public string Title { get; set; } } } diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityIndividualScriptAddressesOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityIndividualScriptAddressesOptions.cs index 66cd5f3527..2a5296546a 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityIndividualScriptAddressesOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityIndividualScriptAddressesOptions.cs @@ -2,92 +2,28 @@ namespace Stripe.V2.Core { using Newtonsoft.Json; - using Stripe.Infrastructure; #if NET6_0_OR_GREATER using STJS = System.Text.Json.Serialization; #endif -#if NET6_0_OR_GREATER - [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] -#endif public class AccountUpdateIdentityIndividualScriptAddressesOptions : INestedOptions { - [JsonProperty("kana")] - [JsonConverter(typeof(EmptyableConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("kana")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalKana { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public bool EmptyKana - { - get => this.InternalKana?.Empty ?? false; - set - { - this.InternalKana ??= new Emptyable(); - this.InternalKana.Empty = value; - } - } - /// /// Kana Address. /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public AddressJapanOptions Kana - { - get => this.InternalKana?.Value; - set - { - this.InternalKana ??= new Emptyable(); - this.InternalKana.Value = value; - } - } - - [JsonProperty("kanji")] - [JsonConverter(typeof(EmptyableConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("kanji")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalKanji { get; set; } - - [JsonIgnore] + [JsonProperty("kana")] #if NET6_0_OR_GREATER - [STJS.JsonIgnore] + [STJS.JsonPropertyName("kana")] #endif - public bool EmptyKanji - { - get => this.InternalKanji?.Empty ?? false; - set - { - this.InternalKanji ??= new Emptyable(); - this.InternalKanji.Empty = value; - } - } + public AddressJapanOptions Kana { get; set; } /// /// Kanji Address. /// - [JsonIgnore] + [JsonProperty("kanji")] #if NET6_0_OR_GREATER - [STJS.JsonIgnore] + [STJS.JsonPropertyName("kanji")] #endif - public AddressJapanOptions Kanji - { - get => this.InternalKanji?.Value; - set - { - this.InternalKanji ??= new Emptyable(); - this.InternalKanji.Value = value; - } - } + public AddressJapanOptions Kanji { get; set; } } } diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityIndividualScriptNamesKanaOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityIndividualScriptNamesKanaOptions.cs index 6d8c40293d..5619a51a67 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityIndividualScriptNamesKanaOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityIndividualScriptNamesKanaOptions.cs @@ -2,92 +2,28 @@ namespace Stripe.V2.Core { using Newtonsoft.Json; - using Stripe.Infrastructure; #if NET6_0_OR_GREATER using STJS = System.Text.Json.Serialization; #endif -#if NET6_0_OR_GREATER - [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] -#endif public class AccountUpdateIdentityIndividualScriptNamesKanaOptions : INestedOptions { - [JsonProperty("given_name")] - [JsonConverter(typeof(EmptyableConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("given_name")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalGivenName { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public bool EmptyGivenName - { - get => this.InternalGivenName?.Empty ?? false; - set - { - this.InternalGivenName ??= new Emptyable(); - this.InternalGivenName.Empty = value; - } - } - /// /// The person's first or given name. /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public string GivenName - { - get => this.InternalGivenName?.Value; - set - { - this.InternalGivenName ??= new Emptyable(); - this.InternalGivenName.Value = value; - } - } - - [JsonProperty("surname")] - [JsonConverter(typeof(EmptyableConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("surname")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalSurname { get; set; } - - [JsonIgnore] + [JsonProperty("given_name")] #if NET6_0_OR_GREATER - [STJS.JsonIgnore] + [STJS.JsonPropertyName("given_name")] #endif - public bool EmptySurname - { - get => this.InternalSurname?.Empty ?? false; - set - { - this.InternalSurname ??= new Emptyable(); - this.InternalSurname.Empty = value; - } - } + public string GivenName { get; set; } /// /// The person's last or family name. /// - [JsonIgnore] + [JsonProperty("surname")] #if NET6_0_OR_GREATER - [STJS.JsonIgnore] + [STJS.JsonPropertyName("surname")] #endif - public string Surname - { - get => this.InternalSurname?.Value; - set - { - this.InternalSurname ??= new Emptyable(); - this.InternalSurname.Value = value; - } - } + public string Surname { get; set; } } } diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityIndividualScriptNamesKanjiOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityIndividualScriptNamesKanjiOptions.cs index 32efaf2bf5..d6b4fe2090 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityIndividualScriptNamesKanjiOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityIndividualScriptNamesKanjiOptions.cs @@ -2,92 +2,28 @@ namespace Stripe.V2.Core { using Newtonsoft.Json; - using Stripe.Infrastructure; #if NET6_0_OR_GREATER using STJS = System.Text.Json.Serialization; #endif -#if NET6_0_OR_GREATER - [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] -#endif public class AccountUpdateIdentityIndividualScriptNamesKanjiOptions : INestedOptions { - [JsonProperty("given_name")] - [JsonConverter(typeof(EmptyableConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("given_name")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalGivenName { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public bool EmptyGivenName - { - get => this.InternalGivenName?.Empty ?? false; - set - { - this.InternalGivenName ??= new Emptyable(); - this.InternalGivenName.Empty = value; - } - } - /// /// The person's first or given name. /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public string GivenName - { - get => this.InternalGivenName?.Value; - set - { - this.InternalGivenName ??= new Emptyable(); - this.InternalGivenName.Value = value; - } - } - - [JsonProperty("surname")] - [JsonConverter(typeof(EmptyableConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("surname")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalSurname { get; set; } - - [JsonIgnore] + [JsonProperty("given_name")] #if NET6_0_OR_GREATER - [STJS.JsonIgnore] + [STJS.JsonPropertyName("given_name")] #endif - public bool EmptySurname - { - get => this.InternalSurname?.Empty ?? false; - set - { - this.InternalSurname ??= new Emptyable(); - this.InternalSurname.Empty = value; - } - } + public string GivenName { get; set; } /// /// The person's last or family name. /// - [JsonIgnore] + [JsonProperty("surname")] #if NET6_0_OR_GREATER - [STJS.JsonIgnore] + [STJS.JsonPropertyName("surname")] #endif - public string Surname - { - get => this.InternalSurname?.Value; - set - { - this.InternalSurname ??= new Emptyable(); - this.InternalSurname.Value = value; - } - } + public string Surname { get; set; } } } diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityIndividualScriptNamesOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityIndividualScriptNamesOptions.cs index 8846c63783..8e78dd89b9 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityIndividualScriptNamesOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityIndividualScriptNamesOptions.cs @@ -2,92 +2,28 @@ namespace Stripe.V2.Core { using Newtonsoft.Json; - using Stripe.Infrastructure; #if NET6_0_OR_GREATER using STJS = System.Text.Json.Serialization; #endif -#if NET6_0_OR_GREATER - [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] -#endif public class AccountUpdateIdentityIndividualScriptNamesOptions : INestedOptions { - [JsonProperty("kana")] - [JsonConverter(typeof(EmptyableConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("kana")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalKana { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public bool EmptyKana - { - get => this.InternalKana?.Empty ?? false; - set - { - this.InternalKana ??= new Emptyable(); - this.InternalKana.Empty = value; - } - } - /// /// Persons name in kana script. /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public AccountUpdateIdentityIndividualScriptNamesKanaOptions Kana - { - get => this.InternalKana?.Value; - set - { - this.InternalKana ??= new Emptyable(); - this.InternalKana.Value = value; - } - } - - [JsonProperty("kanji")] - [JsonConverter(typeof(EmptyableConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("kanji")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalKanji { get; set; } - - [JsonIgnore] + [JsonProperty("kana")] #if NET6_0_OR_GREATER - [STJS.JsonIgnore] + [STJS.JsonPropertyName("kana")] #endif - public bool EmptyKanji - { - get => this.InternalKanji?.Empty ?? false; - set - { - this.InternalKanji ??= new Emptyable(); - this.InternalKanji.Empty = value; - } - } + public AccountUpdateIdentityIndividualScriptNamesKanaOptions Kana { get; set; } /// /// Persons name in kanji script. /// - [JsonIgnore] + [JsonProperty("kanji")] #if NET6_0_OR_GREATER - [STJS.JsonIgnore] + [STJS.JsonPropertyName("kanji")] #endif - public AccountUpdateIdentityIndividualScriptNamesKanjiOptions Kanji - { - get => this.InternalKanji?.Value; - set - { - this.InternalKanji ??= new Emptyable(); - this.InternalKanji.Value = value; - } - } + public AccountUpdateIdentityIndividualScriptNamesKanjiOptions Kanji { get; set; } } } diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityOptions.cs index 4d2b48eb69..7fb192f5c9 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityOptions.cs @@ -31,38 +31,6 @@ public class AccountUpdateIdentityOptions : INestedOptions /// established. This should be an ISO 3166-1 alpha-2 country /// code. - /// One of: ad, ae, af, ag, ai, al, am, - /// ao, aq, ar, as, at, au, aw, ax, - /// az, ba, bb, bd, be, bf, bg, bh, - /// bi, bj, bl, bm, bn, bo, bq, br, - /// bs, bt, bv, bw, by, bz, ca, cc, - /// cd, cf, cg, ch, ci, ck, cl, cm, - /// cn, co, cr, cu, cv, cw, cx, cy, - /// cz, de, dj, dk, dm, do, dz, ec, - /// ee, eg, eh, er, es, et, fi, fj, - /// fk, fm, fo, fr, ga, gb, gd, ge, - /// gf, gg, gh, gi, gl, gm, gn, gp, - /// gq, gr, gs, gt, gu, gw, gy, hk, - /// hm, hn, hr, ht, hu, id, ie, il, - /// im, in, io, iq, ir, is, it, je, - /// jm, jo, jp, ke, kg, kh, ki, km, - /// kn, kp, kr, kw, ky, kz, la, lb, - /// lc, li, lk, lr, ls, lt, lu, lv, - /// ly, ma, mc, md, me, mf, mg, mh, - /// mk, ml, mm, mn, mo, mp, mq, mr, - /// ms, mt, mu, mv, mw, mx, my, mz, - /// na, nc, ne, nf, ng, ni, nl, no, - /// np, nr, nu, nz, om, pa, pe, pf, - /// pg, ph, pk, pl, pm, pn, pr, ps, - /// pt, pw, py, qa, qz, re, ro, rs, - /// ru, rw, sa, sb, sc, sd, se, sg, - /// sh, si, sj, sk, sl, sm, sn, so, - /// sr, ss, st, sv, sx, sy, sz, tc, - /// td, tf, tg, th, tj, tk, tl, tm, - /// tn, to, tr, tt, tv, tw, tz, ua, - /// ug, um, us, uy, uz, va, vc, ve, - /// vg, vi, vn, vu, wf, ws, xx, ye, - /// yt, za, zm, or zw. /// [JsonProperty("country")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/V2/Core/Accounts/Persons/PersonCreateAdditionalAddressOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/Persons/PersonCreateAdditionalAddressOptions.cs index ad0e02925e..f25634cbb9 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/Persons/PersonCreateAdditionalAddressOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/Persons/PersonCreateAdditionalAddressOptions.cs @@ -20,38 +20,6 @@ public class PersonCreateAdditionalAddressOptions : INestedOptions /// /// Two-letter country code (ISO /// 3166-1 alpha-2). - /// One of: ad, ae, af, ag, ai, al, am, - /// ao, aq, ar, as, at, au, aw, ax, - /// az, ba, bb, bd, be, bf, bg, bh, - /// bi, bj, bl, bm, bn, bo, bq, br, - /// bs, bt, bv, bw, by, bz, ca, cc, - /// cd, cf, cg, ch, ci, ck, cl, cm, - /// cn, co, cr, cu, cv, cw, cx, cy, - /// cz, de, dj, dk, dm, do, dz, ec, - /// ee, eg, eh, er, es, et, fi, fj, - /// fk, fm, fo, fr, ga, gb, gd, ge, - /// gf, gg, gh, gi, gl, gm, gn, gp, - /// gq, gr, gs, gt, gu, gw, gy, hk, - /// hm, hn, hr, ht, hu, id, ie, il, - /// im, in, io, iq, ir, is, it, je, - /// jm, jo, jp, ke, kg, kh, ki, km, - /// kn, kp, kr, kw, ky, kz, la, lb, - /// lc, li, lk, lr, ls, lt, lu, lv, - /// ly, ma, mc, md, me, mf, mg, mh, - /// mk, ml, mm, mn, mo, mp, mq, mr, - /// ms, mt, mu, mv, mw, mx, my, mz, - /// na, nc, ne, nf, ng, ni, nl, no, - /// np, nr, nu, nz, om, pa, pe, pf, - /// pg, ph, pk, pl, pm, pn, pr, ps, - /// pt, pw, py, qa, qz, re, ro, rs, - /// ru, rw, sa, sb, sc, sd, se, sg, - /// sh, si, sj, sk, sl, sm, sn, so, - /// sr, ss, st, sv, sx, sy, sz, tc, - /// td, tf, tg, th, tj, tk, tl, tm, - /// tn, to, tr, tt, tv, tw, tz, ua, - /// ug, um, us, uy, uz, va, vc, ve, - /// vg, vi, vn, vu, wf, ws, xx, ye, - /// yt, za, zm, or zw. /// [JsonProperty("country")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/V2/Core/Accounts/Persons/PersonCreateOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/Persons/PersonCreateOptions.cs index bc9f29d1fc..6885fb8a96 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/Persons/PersonCreateOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/Persons/PersonCreateOptions.cs @@ -112,38 +112,6 @@ public class PersonCreateOptions : BaseOptions, IHasMetadata /// /// The nationalities (countries) this person is associated with. - /// One of: ad, ae, af, ag, ai, al, am, - /// ao, aq, ar, as, at, au, aw, ax, - /// az, ba, bb, bd, be, bf, bg, bh, - /// bi, bj, bl, bm, bn, bo, bq, br, - /// bs, bt, bv, bw, by, bz, ca, cc, - /// cd, cf, cg, ch, ci, ck, cl, cm, - /// cn, co, cr, cu, cv, cw, cx, cy, - /// cz, de, dj, dk, dm, do, dz, ec, - /// ee, eg, eh, er, es, et, fi, fj, - /// fk, fm, fo, fr, ga, gb, gd, ge, - /// gf, gg, gh, gi, gl, gm, gn, gp, - /// gq, gr, gs, gt, gu, gw, gy, hk, - /// hm, hn, hr, ht, hu, id, ie, il, - /// im, in, io, iq, ir, is, it, je, - /// jm, jo, jp, ke, kg, kh, ki, km, - /// kn, kp, kr, kw, ky, kz, la, lb, - /// lc, li, lk, lr, ls, lt, lu, lv, - /// ly, ma, mc, md, me, mf, mg, mh, - /// mk, ml, mm, mn, mo, mp, mq, mr, - /// ms, mt, mu, mv, mw, mx, my, mz, - /// na, nc, ne, nf, ng, ni, nl, no, - /// np, nr, nu, nz, om, pa, pe, pf, - /// pg, ph, pk, pl, pm, pn, pr, ps, - /// pt, pw, py, qa, qz, re, ro, rs, - /// ru, rw, sa, sb, sc, sd, se, sg, - /// sh, si, sj, sk, sl, sm, sn, so, - /// sr, ss, st, sv, sx, sy, sz, tc, - /// td, tf, tg, th, tj, tk, tl, tm, - /// tn, to, tr, tt, tv, tw, tz, ua, - /// ug, um, us, uy, uz, va, vc, ve, - /// vg, vi, vn, vu, wf, ws, xx, ye, - /// yt, za, zm, or zw. /// [JsonProperty("nationalities")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/V2/Core/Accounts/Persons/PersonCreateRelationshipOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/Persons/PersonCreateRelationshipOptions.cs index fe7d1ea80a..fb16826e27 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/Persons/PersonCreateRelationshipOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/Persons/PersonCreateRelationshipOptions.cs @@ -60,7 +60,7 @@ public class PersonCreateRelationshipOptions : INestedOptions #if NET6_0_OR_GREATER [STJS.JsonPropertyName("percent_ownership")] #endif - public string PercentOwnership { get; set; } + public decimal? PercentOwnership { get; set; } /// /// Indicates whether the person is a representative of the associated legal entity. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/Persons/PersonService.cs b/src/Stripe.net/Services/V2/Core/Accounts/Persons/PersonService.cs index 998135e88a..90b963b6ec 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/Persons/PersonService.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/Persons/PersonService.cs @@ -23,97 +23,97 @@ internal PersonService(IStripeClient client) /// /// Create a Person associated with an Account. /// - public virtual V2.Core.Person Create(string id, PersonCreateOptions options, RequestOptions requestOptions = null) + public virtual V2.Core.AccountPerson Create(string id, PersonCreateOptions options, RequestOptions requestOptions = null) { - return this.Request(BaseAddress.Api, HttpMethod.Post, $"/v2/core/accounts/{WebUtility.UrlEncode(id)}/persons", options, requestOptions); + return this.Request(BaseAddress.Api, HttpMethod.Post, $"/v2/core/accounts/{WebUtility.UrlEncode(id)}/persons", options, requestOptions); } /// /// Create a Person associated with an Account. /// - public virtual Task CreateAsync(string id, PersonCreateOptions options, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + public virtual Task CreateAsync(string id, PersonCreateOptions options, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) { - return this.RequestAsync(BaseAddress.Api, HttpMethod.Post, $"/v2/core/accounts/{WebUtility.UrlEncode(id)}/persons", options, requestOptions, cancellationToken); + return this.RequestAsync(BaseAddress.Api, HttpMethod.Post, $"/v2/core/accounts/{WebUtility.UrlEncode(id)}/persons", options, requestOptions, cancellationToken); } /// /// Delete a Person associated with an Account. /// - public virtual V2.Core.Person Delete(string parentId, string id, PersonDeleteOptions options = null, RequestOptions requestOptions = null) + public virtual V2.DeletedObject Delete(string parentId, string id, PersonDeleteOptions options = null, RequestOptions requestOptions = null) { - return this.Request(BaseAddress.Api, HttpMethod.Delete, $"/v2/core/accounts/{WebUtility.UrlEncode(parentId)}/persons/{WebUtility.UrlEncode(id)}", options, requestOptions); + return this.Request(BaseAddress.Api, HttpMethod.Delete, $"/v2/core/accounts/{WebUtility.UrlEncode(parentId)}/persons/{WebUtility.UrlEncode(id)}", options, requestOptions); } /// /// Delete a Person associated with an Account. /// - public virtual Task DeleteAsync(string parentId, string id, PersonDeleteOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + public virtual Task DeleteAsync(string parentId, string id, PersonDeleteOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) { - return this.RequestAsync(BaseAddress.Api, HttpMethod.Delete, $"/v2/core/accounts/{WebUtility.UrlEncode(parentId)}/persons/{WebUtility.UrlEncode(id)}", options, requestOptions, cancellationToken); + return this.RequestAsync(BaseAddress.Api, HttpMethod.Delete, $"/v2/core/accounts/{WebUtility.UrlEncode(parentId)}/persons/{WebUtility.UrlEncode(id)}", options, requestOptions, cancellationToken); } /// /// Retrieves a Person associated with an Account. /// - public virtual V2.Core.Person Get(string parentId, string id, PersonGetOptions options = null, RequestOptions requestOptions = null) + public virtual V2.Core.AccountPerson Get(string parentId, string id, PersonGetOptions options = null, RequestOptions requestOptions = null) { - return this.Request(BaseAddress.Api, HttpMethod.Get, $"/v2/core/accounts/{WebUtility.UrlEncode(parentId)}/persons/{WebUtility.UrlEncode(id)}", options, requestOptions); + return this.Request(BaseAddress.Api, HttpMethod.Get, $"/v2/core/accounts/{WebUtility.UrlEncode(parentId)}/persons/{WebUtility.UrlEncode(id)}", options, requestOptions); } /// /// Retrieves a Person associated with an Account. /// - public virtual Task GetAsync(string parentId, string id, PersonGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + public virtual Task GetAsync(string parentId, string id, PersonGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) { - return this.RequestAsync(BaseAddress.Api, HttpMethod.Get, $"/v2/core/accounts/{WebUtility.UrlEncode(parentId)}/persons/{WebUtility.UrlEncode(id)}", options, requestOptions, cancellationToken); + return this.RequestAsync(BaseAddress.Api, HttpMethod.Get, $"/v2/core/accounts/{WebUtility.UrlEncode(parentId)}/persons/{WebUtility.UrlEncode(id)}", options, requestOptions, cancellationToken); } /// /// Returns a list of Persons associated with an Account. /// - public virtual V2.StripeList List(string id, PersonListOptions options = null, RequestOptions requestOptions = null) + public virtual V2.StripeList List(string id, PersonListOptions options = null, RequestOptions requestOptions = null) { - return this.Request>(BaseAddress.Api, HttpMethod.Get, $"/v2/core/accounts/{WebUtility.UrlEncode(id)}/persons", options, requestOptions); + return this.Request>(BaseAddress.Api, HttpMethod.Get, $"/v2/core/accounts/{WebUtility.UrlEncode(id)}/persons", options, requestOptions); } /// /// Returns a list of Persons associated with an Account. /// - public virtual Task> ListAsync(string id, PersonListOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + public virtual Task> ListAsync(string id, PersonListOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) { - return this.RequestAsync>(BaseAddress.Api, HttpMethod.Get, $"/v2/core/accounts/{WebUtility.UrlEncode(id)}/persons", options, requestOptions, cancellationToken); + return this.RequestAsync>(BaseAddress.Api, HttpMethod.Get, $"/v2/core/accounts/{WebUtility.UrlEncode(id)}/persons", options, requestOptions, cancellationToken); } /// /// Returns a list of Persons associated with an Account. /// - public virtual IEnumerable ListAutoPaging(string id, PersonListOptions options = null, RequestOptions requestOptions = null) + public virtual IEnumerable ListAutoPaging(string id, PersonListOptions options = null, RequestOptions requestOptions = null) { - return this.ListRequestAutoPaging($"/v2/core/accounts/{WebUtility.UrlEncode(id)}/persons", options, requestOptions); + return this.ListRequestAutoPaging($"/v2/core/accounts/{WebUtility.UrlEncode(id)}/persons", options, requestOptions); } /// /// Returns a list of Persons associated with an Account. /// - public virtual IAsyncEnumerable ListAutoPagingAsync(string id, PersonListOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + public virtual IAsyncEnumerable ListAutoPagingAsync(string id, PersonListOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) { - return this.ListRequestAutoPagingAsync($"/v2/core/accounts/{WebUtility.UrlEncode(id)}/persons", options, requestOptions, cancellationToken); + return this.ListRequestAutoPagingAsync($"/v2/core/accounts/{WebUtility.UrlEncode(id)}/persons", options, requestOptions, cancellationToken); } /// /// Updates a Person associated with an Account. /// - public virtual V2.Core.Person Update(string parentId, string id, PersonUpdateOptions options, RequestOptions requestOptions = null) + public virtual V2.Core.AccountPerson Update(string parentId, string id, PersonUpdateOptions options, RequestOptions requestOptions = null) { - return this.Request(BaseAddress.Api, HttpMethod.Post, $"/v2/core/accounts/{WebUtility.UrlEncode(parentId)}/persons/{WebUtility.UrlEncode(id)}", options, requestOptions); + return this.Request(BaseAddress.Api, HttpMethod.Post, $"/v2/core/accounts/{WebUtility.UrlEncode(parentId)}/persons/{WebUtility.UrlEncode(id)}", options, requestOptions); } /// /// Updates a Person associated with an Account. /// - public virtual Task UpdateAsync(string parentId, string id, PersonUpdateOptions options, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + public virtual Task UpdateAsync(string parentId, string id, PersonUpdateOptions options, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) { - return this.RequestAsync(BaseAddress.Api, HttpMethod.Post, $"/v2/core/accounts/{WebUtility.UrlEncode(parentId)}/persons/{WebUtility.UrlEncode(id)}", options, requestOptions, cancellationToken); + return this.RequestAsync(BaseAddress.Api, HttpMethod.Post, $"/v2/core/accounts/{WebUtility.UrlEncode(parentId)}/persons/{WebUtility.UrlEncode(id)}", options, requestOptions, cancellationToken); } } } diff --git a/src/Stripe.net/Services/V2/Core/Accounts/Persons/PersonUpdateAdditionalAddressOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/Persons/PersonUpdateAdditionalAddressOptions.cs index 24c3ab3cc0..941bc5c8aa 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/Persons/PersonUpdateAdditionalAddressOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/Persons/PersonUpdateAdditionalAddressOptions.cs @@ -2,243 +2,57 @@ namespace Stripe.V2.Core.Accounts { using Newtonsoft.Json; - using Stripe.Infrastructure; #if NET6_0_OR_GREATER using STJS = System.Text.Json.Serialization; #endif -#if NET6_0_OR_GREATER - [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] -#endif public class PersonUpdateAdditionalAddressOptions : INestedOptions { + /// + /// City, district, suburb, town, or village. + /// [JsonProperty("city")] - [JsonConverter(typeof(EmptyableConverter))] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("city")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] #endif - internal Emptyable InternalCity { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public bool EmptyCity - { - get => this.InternalCity?.Empty ?? false; - set - { - this.InternalCity ??= new Emptyable(); - this.InternalCity.Empty = value; - } - } + public string City { get; set; } /// - /// City, district, suburb, town, or village. + /// Two-letter country code (ISO + /// 3166-1 alpha-2). /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public string City - { - get => this.InternalCity?.Value; - set - { - this.InternalCity ??= new Emptyable(); - this.InternalCity.Value = value; - } - } - [JsonProperty("country")] - [JsonConverter(typeof(EmptyableConverter))] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("country")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalCountry { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] #endif - public bool EmptyCountry - { - get => this.InternalCountry?.Empty ?? false; - set - { - this.InternalCountry ??= new Emptyable(); - this.InternalCountry.Empty = value; - } - } + public string Country { get; set; } /// - /// Two-letter country code (ISO - /// 3166-1 alpha-2). - /// One of: ad, ae, af, ag, ai, al, am, - /// ao, aq, ar, as, at, au, aw, ax, - /// az, ba, bb, bd, be, bf, bg, bh, - /// bi, bj, bl, bm, bn, bo, bq, br, - /// bs, bt, bv, bw, by, bz, ca, cc, - /// cd, cf, cg, ch, ci, ck, cl, cm, - /// cn, co, cr, cu, cv, cw, cx, cy, - /// cz, de, dj, dk, dm, do, dz, ec, - /// ee, eg, eh, er, es, et, fi, fj, - /// fk, fm, fo, fr, ga, gb, gd, ge, - /// gf, gg, gh, gi, gl, gm, gn, gp, - /// gq, gr, gs, gt, gu, gw, gy, hk, - /// hm, hn, hr, ht, hu, id, ie, il, - /// im, in, io, iq, ir, is, it, je, - /// jm, jo, jp, ke, kg, kh, ki, km, - /// kn, kp, kr, kw, ky, kz, la, lb, - /// lc, li, lk, lr, ls, lt, lu, lv, - /// ly, ma, mc, md, me, mf, mg, mh, - /// mk, ml, mm, mn, mo, mp, mq, mr, - /// ms, mt, mu, mv, mw, mx, my, mz, - /// na, nc, ne, nf, ng, ni, nl, no, - /// np, nr, nu, nz, om, pa, pe, pf, - /// pg, ph, pk, pl, pm, pn, pr, ps, - /// pt, pw, py, qa, qz, re, ro, rs, - /// ru, rw, sa, sb, sc, sd, se, sg, - /// sh, si, sj, sk, sl, sm, sn, so, - /// sr, ss, st, sv, sx, sy, sz, tc, - /// td, tf, tg, th, tj, tk, tl, tm, - /// tn, to, tr, tt, tv, tw, tz, ua, - /// ug, um, us, uy, uz, va, vc, ve, - /// vg, vi, vn, vu, wf, ws, xx, ye, - /// yt, za, zm, or zw. + /// Address line 1 (e.g., street, PO Box, or company name). /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public string Country - { - get => this.InternalCountry?.Value; - set - { - this.InternalCountry ??= new Emptyable(); - this.InternalCountry.Value = value; - } - } - [JsonProperty("line1")] - [JsonConverter(typeof(EmptyableConverter))] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("line1")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalLine1 { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] #endif - public bool EmptyLine1 - { - get => this.InternalLine1?.Empty ?? false; - set - { - this.InternalLine1 ??= new Emptyable(); - this.InternalLine1.Empty = value; - } - } + public string Line1 { get; set; } /// - /// Address line 1 (e.g., street, PO Box, or company name). + /// Address line 2 (e.g., apartment, suite, unit, or building). /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public string Line1 - { - get => this.InternalLine1?.Value; - set - { - this.InternalLine1 ??= new Emptyable(); - this.InternalLine1.Value = value; - } - } - [JsonProperty("line2")] - [JsonConverter(typeof(EmptyableConverter))] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("line2")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalLine2 { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] #endif - public bool EmptyLine2 - { - get => this.InternalLine2?.Empty ?? false; - set - { - this.InternalLine2 ??= new Emptyable(); - this.InternalLine2.Empty = value; - } - } + public string Line2 { get; set; } /// - /// Address line 2 (e.g., apartment, suite, unit, or building). + /// ZIP or postal code. /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public string Line2 - { - get => this.InternalLine2?.Value; - set - { - this.InternalLine2 ??= new Emptyable(); - this.InternalLine2.Value = value; - } - } - [JsonProperty("postal_code")] - [JsonConverter(typeof(EmptyableConverter))] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("postal_code")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] #endif - internal Emptyable InternalPostalCode { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public bool EmptyPostalCode - { - get => this.InternalPostalCode?.Empty ?? false; - set - { - this.InternalPostalCode ??= new Emptyable(); - this.InternalPostalCode.Empty = value; - } - } - - /// - /// ZIP or postal code. - /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public string PostalCode - { - get => this.InternalPostalCode?.Value; - set - { - this.InternalPostalCode ??= new Emptyable(); - this.InternalPostalCode.Value = value; - } - } + public string PostalCode { get; set; } /// /// Purpose of additional address. @@ -249,82 +63,22 @@ public string PostalCode #endif public string Purpose { get; set; } - [JsonProperty("state")] - [JsonConverter(typeof(EmptyableConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("state")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalState { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public bool EmptyState - { - get => this.InternalState?.Empty ?? false; - set - { - this.InternalState ??= new Emptyable(); - this.InternalState.Empty = value; - } - } - /// /// State, county, province, or region. /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public string State - { - get => this.InternalState?.Value; - set - { - this.InternalState ??= new Emptyable(); - this.InternalState.Value = value; - } - } - - [JsonProperty("town")] - [JsonConverter(typeof(EmptyableConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("town")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalTown { get; set; } - - [JsonIgnore] + [JsonProperty("state")] #if NET6_0_OR_GREATER - [STJS.JsonIgnore] + [STJS.JsonPropertyName("state")] #endif - public bool EmptyTown - { - get => this.InternalTown?.Empty ?? false; - set - { - this.InternalTown ??= new Emptyable(); - this.InternalTown.Empty = value; - } - } + public string State { get; set; } /// /// Town or cho-me. /// - [JsonIgnore] + [JsonProperty("town")] #if NET6_0_OR_GREATER - [STJS.JsonIgnore] + [STJS.JsonPropertyName("town")] #endif - public string Town - { - get => this.InternalTown?.Value; - set - { - this.InternalTown ??= new Emptyable(); - this.InternalTown.Value = value; - } - } + public string Town { get; set; } } } diff --git a/src/Stripe.net/Services/V2/Core/Accounts/Persons/PersonUpdateDocumentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/Persons/PersonUpdateDocumentsOptions.cs index 1dc1120f67..5d5ea01333 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/Persons/PersonUpdateDocumentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/Persons/PersonUpdateDocumentsOptions.cs @@ -2,14 +2,10 @@ namespace Stripe.V2.Core.Accounts { using Newtonsoft.Json; - using Stripe.Infrastructure; #if NET6_0_OR_GREATER using STJS = System.Text.Json.Serialization; #endif -#if NET6_0_OR_GREATER - [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] -#endif public class PersonUpdateDocumentsOptions : INestedOptions { /// @@ -31,84 +27,24 @@ public class PersonUpdateDocumentsOptions : INestedOptions #endif public PersonUpdateDocumentsPassportOptions Passport { get; set; } - [JsonProperty("primary_verification")] - [JsonConverter(typeof(EmptyableConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("primary_verification")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalPrimaryVerification { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public bool EmptyPrimaryVerification - { - get => this.InternalPrimaryVerification?.Empty ?? false; - set - { - this.InternalPrimaryVerification ??= new Emptyable(); - this.InternalPrimaryVerification.Empty = value; - } - } - /// /// An identifying document showing the person's name, either a passport or local ID card. /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public PersonUpdateDocumentsPrimaryVerificationOptions PrimaryVerification - { - get => this.InternalPrimaryVerification?.Value; - set - { - this.InternalPrimaryVerification ??= new Emptyable(); - this.InternalPrimaryVerification.Value = value; - } - } - - [JsonProperty("secondary_verification")] - [JsonConverter(typeof(EmptyableConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("secondary_verification")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalSecondaryVerification { get; set; } - - [JsonIgnore] + [JsonProperty("primary_verification")] #if NET6_0_OR_GREATER - [STJS.JsonIgnore] + [STJS.JsonPropertyName("primary_verification")] #endif - public bool EmptySecondaryVerification - { - get => this.InternalSecondaryVerification?.Empty ?? false; - set - { - this.InternalSecondaryVerification ??= new Emptyable(); - this.InternalSecondaryVerification.Empty = value; - } - } + public PersonUpdateDocumentsPrimaryVerificationOptions PrimaryVerification { get; set; } /// /// A document showing address, either a passport, local ID card, or utility bill from a /// well-known utility company. /// - [JsonIgnore] + [JsonProperty("secondary_verification")] #if NET6_0_OR_GREATER - [STJS.JsonIgnore] + [STJS.JsonPropertyName("secondary_verification")] #endif - public PersonUpdateDocumentsSecondaryVerificationOptions SecondaryVerification - { - get => this.InternalSecondaryVerification?.Value; - set - { - this.InternalSecondaryVerification ??= new Emptyable(); - this.InternalSecondaryVerification.Value = value; - } - } + public PersonUpdateDocumentsSecondaryVerificationOptions SecondaryVerification { get; set; } /// /// One or more documents showing the person’s visa required for living in the country where diff --git a/src/Stripe.net/Services/V2/Core/Accounts/Persons/PersonUpdateDocumentsPrimaryVerificationFrontBackOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/Persons/PersonUpdateDocumentsPrimaryVerificationFrontBackOptions.cs index af59fc1eaf..ce5fb2c5e5 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/Persons/PersonUpdateDocumentsPrimaryVerificationFrontBackOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/Persons/PersonUpdateDocumentsPrimaryVerificationFrontBackOptions.cs @@ -2,57 +2,23 @@ namespace Stripe.V2.Core.Accounts { using Newtonsoft.Json; - using Stripe.Infrastructure; #if NET6_0_OR_GREATER using STJS = System.Text.Json.Serialization; #endif -#if NET6_0_OR_GREATER - [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] -#endif public class PersonUpdateDocumentsPrimaryVerificationFrontBackOptions : INestedOptions { - [JsonProperty("back")] - [JsonConverter(typeof(EmptyableConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("back")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalBack { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public bool EmptyBack - { - get => this.InternalBack?.Empty ?? false; - set - { - this.InternalBack ??= new Emptyable(); - this.InternalBack.Empty = value; - } - } - /// /// A file upload token /// representing the back of the verification document. The purpose of the uploaded file /// should be 'identity_document'. The uploaded file needs to be a color image (smaller than /// 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. /// - [JsonIgnore] + [JsonProperty("back")] #if NET6_0_OR_GREATER - [STJS.JsonIgnore] + [STJS.JsonPropertyName("back")] #endif - public string Back - { - get => this.InternalBack?.Value; - set - { - this.InternalBack ??= new Emptyable(); - this.InternalBack.Value = value; - } - } + public string Back { get; set; } /// /// A file upload token diff --git a/src/Stripe.net/Services/V2/Core/Accounts/Persons/PersonUpdateDocumentsSecondaryVerificationFrontBackOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/Persons/PersonUpdateDocumentsSecondaryVerificationFrontBackOptions.cs index b369e2ff22..d2f8071807 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/Persons/PersonUpdateDocumentsSecondaryVerificationFrontBackOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/Persons/PersonUpdateDocumentsSecondaryVerificationFrontBackOptions.cs @@ -2,57 +2,23 @@ namespace Stripe.V2.Core.Accounts { using Newtonsoft.Json; - using Stripe.Infrastructure; #if NET6_0_OR_GREATER using STJS = System.Text.Json.Serialization; #endif -#if NET6_0_OR_GREATER - [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] -#endif public class PersonUpdateDocumentsSecondaryVerificationFrontBackOptions : INestedOptions { - [JsonProperty("back")] - [JsonConverter(typeof(EmptyableConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("back")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalBack { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public bool EmptyBack - { - get => this.InternalBack?.Empty ?? false; - set - { - this.InternalBack ??= new Emptyable(); - this.InternalBack.Empty = value; - } - } - /// /// A file upload token /// representing the back of the verification document. The purpose of the uploaded file /// should be 'identity_document'. The uploaded file needs to be a color image (smaller than /// 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. /// - [JsonIgnore] + [JsonProperty("back")] #if NET6_0_OR_GREATER - [STJS.JsonIgnore] + [STJS.JsonPropertyName("back")] #endif - public string Back - { - get => this.InternalBack?.Value; - set - { - this.InternalBack ??= new Emptyable(); - this.InternalBack.Value = value; - } - } + public string Back { get; set; } /// /// A file upload token diff --git a/src/Stripe.net/Services/V2/Core/Accounts/Persons/PersonUpdateOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/Persons/PersonUpdateOptions.cs index 074c70e88f..b21de3be71 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/Persons/PersonUpdateOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/Persons/PersonUpdateOptions.cs @@ -3,14 +3,10 @@ namespace Stripe.V2.Core.Accounts { using System.Collections.Generic; using Newtonsoft.Json; - using Stripe.Infrastructure; #if NET6_0_OR_GREATER using STJS = System.Text.Json.Serialization; #endif -#if NET6_0_OR_GREATER - [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] -#endif public class PersonUpdateOptions : BaseOptions, IHasMetadata { /// @@ -116,38 +112,6 @@ public class PersonUpdateOptions : BaseOptions, IHasMetadata /// /// The nationalities (countries) this person is associated with. - /// One of: ad, ae, af, ag, ai, al, am, - /// ao, aq, ar, as, at, au, aw, ax, - /// az, ba, bb, bd, be, bf, bg, bh, - /// bi, bj, bl, bm, bn, bo, bq, br, - /// bs, bt, bv, bw, by, bz, ca, cc, - /// cd, cf, cg, ch, ci, ck, cl, cm, - /// cn, co, cr, cu, cv, cw, cx, cy, - /// cz, de, dj, dk, dm, do, dz, ec, - /// ee, eg, eh, er, es, et, fi, fj, - /// fk, fm, fo, fr, ga, gb, gd, ge, - /// gf, gg, gh, gi, gl, gm, gn, gp, - /// gq, gr, gs, gt, gu, gw, gy, hk, - /// hm, hn, hr, ht, hu, id, ie, il, - /// im, in, io, iq, ir, is, it, je, - /// jm, jo, jp, ke, kg, kh, ki, km, - /// kn, kp, kr, kw, ky, kz, la, lb, - /// lc, li, lk, lr, ls, lt, lu, lv, - /// ly, ma, mc, md, me, mf, mg, mh, - /// mk, ml, mm, mn, mo, mp, mq, mr, - /// ms, mt, mu, mv, mw, mx, my, mz, - /// na, nc, ne, nf, ng, ni, nl, no, - /// np, nr, nu, nz, om, pa, pe, pf, - /// pg, ph, pk, pl, pm, pn, pr, ps, - /// pt, pw, py, qa, qz, re, ro, rs, - /// ru, rw, sa, sb, sc, sd, se, sg, - /// sh, si, sj, sk, sl, sm, sn, so, - /// sr, ss, st, sv, sx, sy, sz, tc, - /// td, tf, tg, th, tj, tk, tl, tm, - /// tn, to, tr, tt, tv, tw, tz, ua, - /// ug, um, us, uy, uz, va, vc, ve, - /// vg, vi, vn, vu, wf, ws, xx, ye, - /// yt, za, zm, or zw. /// [JsonProperty("nationalities")] #if NET6_0_OR_GREATER @@ -183,83 +147,23 @@ public class PersonUpdateOptions : BaseOptions, IHasMetadata #endif public PersonUpdateRelationshipOptions Relationship { get; set; } - [JsonProperty("script_addresses")] - [JsonConverter(typeof(EmptyableConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("script_addresses")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalScriptAddresses { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public bool EmptyScriptAddresses - { - get => this.InternalScriptAddresses?.Empty ?? false; - set - { - this.InternalScriptAddresses ??= new Emptyable(); - this.InternalScriptAddresses.Empty = value; - } - } - /// /// The script addresses (e.g., non-Latin characters) associated with the person. /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public PersonUpdateScriptAddressesOptions ScriptAddresses - { - get => this.InternalScriptAddresses?.Value; - set - { - this.InternalScriptAddresses ??= new Emptyable(); - this.InternalScriptAddresses.Value = value; - } - } - - [JsonProperty("script_names")] - [JsonConverter(typeof(EmptyableConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("script_names")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalScriptNames { get; set; } - - [JsonIgnore] + [JsonProperty("script_addresses")] #if NET6_0_OR_GREATER - [STJS.JsonIgnore] + [STJS.JsonPropertyName("script_addresses")] #endif - public bool EmptyScriptNames - { - get => this.InternalScriptNames?.Empty ?? false; - set - { - this.InternalScriptNames ??= new Emptyable(); - this.InternalScriptNames.Empty = value; - } - } + public PersonUpdateScriptAddressesOptions ScriptAddresses { get; set; } /// /// The script names (e.g. non-Latin characters) associated with the person. /// - [JsonIgnore] + [JsonProperty("script_names")] #if NET6_0_OR_GREATER - [STJS.JsonIgnore] + [STJS.JsonPropertyName("script_names")] #endif - public PersonUpdateScriptNamesOptions ScriptNames - { - get => this.InternalScriptNames?.Value; - set - { - this.InternalScriptNames ??= new Emptyable(); - this.InternalScriptNames.Value = value; - } - } + public PersonUpdateScriptNamesOptions ScriptNames { get; set; } /// /// The person's last name. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/Persons/PersonUpdateRelationshipOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/Persons/PersonUpdateRelationshipOptions.cs index 414c958e66..5a4ab63989 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/Persons/PersonUpdateRelationshipOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/Persons/PersonUpdateRelationshipOptions.cs @@ -60,7 +60,7 @@ public class PersonUpdateRelationshipOptions : INestedOptions #if NET6_0_OR_GREATER [STJS.JsonPropertyName("percent_ownership")] #endif - public string PercentOwnership { get; set; } + public decimal? PercentOwnership { get; set; } /// /// Indicates whether the person is a representative of the associated legal entity. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/Persons/PersonUpdateScriptAddressesOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/Persons/PersonUpdateScriptAddressesOptions.cs index d4e8af5e6e..8d2140f9f4 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/Persons/PersonUpdateScriptAddressesOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/Persons/PersonUpdateScriptAddressesOptions.cs @@ -2,92 +2,28 @@ namespace Stripe.V2.Core.Accounts { using Newtonsoft.Json; - using Stripe.Infrastructure; #if NET6_0_OR_GREATER using STJS = System.Text.Json.Serialization; #endif -#if NET6_0_OR_GREATER - [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] -#endif public class PersonUpdateScriptAddressesOptions : INestedOptions { - [JsonProperty("kana")] - [JsonConverter(typeof(EmptyableConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("kana")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalKana { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public bool EmptyKana - { - get => this.InternalKana?.Empty ?? false; - set - { - this.InternalKana ??= new Emptyable(); - this.InternalKana.Empty = value; - } - } - /// /// Kana Address. /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public AddressJapanOptions Kana - { - get => this.InternalKana?.Value; - set - { - this.InternalKana ??= new Emptyable(); - this.InternalKana.Value = value; - } - } - - [JsonProperty("kanji")] - [JsonConverter(typeof(EmptyableConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("kanji")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalKanji { get; set; } - - [JsonIgnore] + [JsonProperty("kana")] #if NET6_0_OR_GREATER - [STJS.JsonIgnore] + [STJS.JsonPropertyName("kana")] #endif - public bool EmptyKanji - { - get => this.InternalKanji?.Empty ?? false; - set - { - this.InternalKanji ??= new Emptyable(); - this.InternalKanji.Empty = value; - } - } + public AddressJapanOptions Kana { get; set; } /// /// Kanji Address. /// - [JsonIgnore] + [JsonProperty("kanji")] #if NET6_0_OR_GREATER - [STJS.JsonIgnore] + [STJS.JsonPropertyName("kanji")] #endif - public AddressJapanOptions Kanji - { - get => this.InternalKanji?.Value; - set - { - this.InternalKanji ??= new Emptyable(); - this.InternalKanji.Value = value; - } - } + public AddressJapanOptions Kanji { get; set; } } } diff --git a/src/Stripe.net/Services/V2/Core/Accounts/Persons/PersonUpdateScriptNamesKanaOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/Persons/PersonUpdateScriptNamesKanaOptions.cs index 492ce383d5..328d014040 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/Persons/PersonUpdateScriptNamesKanaOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/Persons/PersonUpdateScriptNamesKanaOptions.cs @@ -2,92 +2,28 @@ namespace Stripe.V2.Core.Accounts { using Newtonsoft.Json; - using Stripe.Infrastructure; #if NET6_0_OR_GREATER using STJS = System.Text.Json.Serialization; #endif -#if NET6_0_OR_GREATER - [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] -#endif public class PersonUpdateScriptNamesKanaOptions : INestedOptions { - [JsonProperty("given_name")] - [JsonConverter(typeof(EmptyableConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("given_name")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalGivenName { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public bool EmptyGivenName - { - get => this.InternalGivenName?.Empty ?? false; - set - { - this.InternalGivenName ??= new Emptyable(); - this.InternalGivenName.Empty = value; - } - } - /// /// The person's first or given name. /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public string GivenName - { - get => this.InternalGivenName?.Value; - set - { - this.InternalGivenName ??= new Emptyable(); - this.InternalGivenName.Value = value; - } - } - - [JsonProperty("surname")] - [JsonConverter(typeof(EmptyableConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("surname")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalSurname { get; set; } - - [JsonIgnore] + [JsonProperty("given_name")] #if NET6_0_OR_GREATER - [STJS.JsonIgnore] + [STJS.JsonPropertyName("given_name")] #endif - public bool EmptySurname - { - get => this.InternalSurname?.Empty ?? false; - set - { - this.InternalSurname ??= new Emptyable(); - this.InternalSurname.Empty = value; - } - } + public string GivenName { get; set; } /// /// The person's last or family name. /// - [JsonIgnore] + [JsonProperty("surname")] #if NET6_0_OR_GREATER - [STJS.JsonIgnore] + [STJS.JsonPropertyName("surname")] #endif - public string Surname - { - get => this.InternalSurname?.Value; - set - { - this.InternalSurname ??= new Emptyable(); - this.InternalSurname.Value = value; - } - } + public string Surname { get; set; } } } diff --git a/src/Stripe.net/Services/V2/Core/Accounts/Persons/PersonUpdateScriptNamesKanjiOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/Persons/PersonUpdateScriptNamesKanjiOptions.cs index c0bfbc2e30..48746746ae 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/Persons/PersonUpdateScriptNamesKanjiOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/Persons/PersonUpdateScriptNamesKanjiOptions.cs @@ -2,92 +2,28 @@ namespace Stripe.V2.Core.Accounts { using Newtonsoft.Json; - using Stripe.Infrastructure; #if NET6_0_OR_GREATER using STJS = System.Text.Json.Serialization; #endif -#if NET6_0_OR_GREATER - [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] -#endif public class PersonUpdateScriptNamesKanjiOptions : INestedOptions { - [JsonProperty("given_name")] - [JsonConverter(typeof(EmptyableConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("given_name")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalGivenName { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public bool EmptyGivenName - { - get => this.InternalGivenName?.Empty ?? false; - set - { - this.InternalGivenName ??= new Emptyable(); - this.InternalGivenName.Empty = value; - } - } - /// /// The person's first or given name. /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public string GivenName - { - get => this.InternalGivenName?.Value; - set - { - this.InternalGivenName ??= new Emptyable(); - this.InternalGivenName.Value = value; - } - } - - [JsonProperty("surname")] - [JsonConverter(typeof(EmptyableConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("surname")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalSurname { get; set; } - - [JsonIgnore] + [JsonProperty("given_name")] #if NET6_0_OR_GREATER - [STJS.JsonIgnore] + [STJS.JsonPropertyName("given_name")] #endif - public bool EmptySurname - { - get => this.InternalSurname?.Empty ?? false; - set - { - this.InternalSurname ??= new Emptyable(); - this.InternalSurname.Empty = value; - } - } + public string GivenName { get; set; } /// /// The person's last or family name. /// - [JsonIgnore] + [JsonProperty("surname")] #if NET6_0_OR_GREATER - [STJS.JsonIgnore] + [STJS.JsonPropertyName("surname")] #endif - public string Surname - { - get => this.InternalSurname?.Value; - set - { - this.InternalSurname ??= new Emptyable(); - this.InternalSurname.Value = value; - } - } + public string Surname { get; set; } } } diff --git a/src/Stripe.net/Services/V2/Core/Accounts/Persons/PersonUpdateScriptNamesOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/Persons/PersonUpdateScriptNamesOptions.cs index b32d2b3ecc..ca434ef655 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/Persons/PersonUpdateScriptNamesOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/Persons/PersonUpdateScriptNamesOptions.cs @@ -2,92 +2,28 @@ namespace Stripe.V2.Core.Accounts { using Newtonsoft.Json; - using Stripe.Infrastructure; #if NET6_0_OR_GREATER using STJS = System.Text.Json.Serialization; #endif -#if NET6_0_OR_GREATER - [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] -#endif public class PersonUpdateScriptNamesOptions : INestedOptions { - [JsonProperty("kana")] - [JsonConverter(typeof(EmptyableConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("kana")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalKana { get; set; } - - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public bool EmptyKana - { - get => this.InternalKana?.Empty ?? false; - set - { - this.InternalKana ??= new Emptyable(); - this.InternalKana.Empty = value; - } - } - /// /// Persons name in kana script. /// - [JsonIgnore] -#if NET6_0_OR_GREATER - [STJS.JsonIgnore] -#endif - public PersonUpdateScriptNamesKanaOptions Kana - { - get => this.InternalKana?.Value; - set - { - this.InternalKana ??= new Emptyable(); - this.InternalKana.Value = value; - } - } - - [JsonProperty("kanji")] - [JsonConverter(typeof(EmptyableConverter))] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("kanji")] - [STJS.JsonConverter(typeof(STJEmptyableConverter))] -#endif - internal Emptyable InternalKanji { get; set; } - - [JsonIgnore] + [JsonProperty("kana")] #if NET6_0_OR_GREATER - [STJS.JsonIgnore] + [STJS.JsonPropertyName("kana")] #endif - public bool EmptyKanji - { - get => this.InternalKanji?.Empty ?? false; - set - { - this.InternalKanji ??= new Emptyable(); - this.InternalKanji.Empty = value; - } - } + public PersonUpdateScriptNamesKanaOptions Kana { get; set; } /// /// Persons name in kanji script. /// - [JsonIgnore] + [JsonProperty("kanji")] #if NET6_0_OR_GREATER - [STJS.JsonIgnore] + [STJS.JsonPropertyName("kanji")] #endif - public PersonUpdateScriptNamesKanjiOptions Kanji - { - get => this.InternalKanji?.Value; - set - { - this.InternalKanji ??= new Emptyable(); - this.InternalKanji.Value = value; - } - } + public PersonUpdateScriptNamesKanjiOptions Kanji { get; set; } } } diff --git a/src/Stripe.net/Services/V2/Core/ClaimableSandboxes/ClaimableSandboxCreatePrefillOptions.cs b/src/Stripe.net/Services/V2/Core/ClaimableSandboxes/ClaimableSandboxCreatePrefillOptions.cs index 0169df3f41..8a7cf4ccca 100644 --- a/src/Stripe.net/Services/V2/Core/ClaimableSandboxes/ClaimableSandboxCreatePrefillOptions.cs +++ b/src/Stripe.net/Services/V2/Core/ClaimableSandboxes/ClaimableSandboxCreatePrefillOptions.cs @@ -12,38 +12,6 @@ public class ClaimableSandboxCreatePrefillOptions : INestedOptions /// Country in which the account holder resides, or in which the business is legally /// established. Use two-letter country code (ISO 3166-1 alpha-2). - /// One of: ad, ae, af, ag, ai, al, am, - /// ao, aq, ar, as, at, au, aw, ax, - /// az, ba, bb, bd, be, bf, bg, bh, - /// bi, bj, bl, bm, bn, bo, bq, br, - /// bs, bt, bv, bw, by, bz, ca, cc, - /// cd, cf, cg, ch, ci, ck, cl, cm, - /// cn, co, cr, cu, cv, cw, cx, cy, - /// cz, de, dj, dk, dm, do, dz, ec, - /// ee, eg, eh, er, es, et, fi, fj, - /// fk, fm, fo, fr, ga, gb, gd, ge, - /// gf, gg, gh, gi, gl, gm, gn, gp, - /// gq, gr, gs, gt, gu, gw, gy, hk, - /// hm, hn, hr, ht, hu, id, ie, il, - /// im, in, io, iq, ir, is, it, je, - /// jm, jo, jp, ke, kg, kh, ki, km, - /// kn, kp, kr, kw, ky, kz, la, lb, - /// lc, li, lk, lr, ls, lt, lu, lv, - /// ly, ma, mc, md, me, mf, mg, mh, - /// mk, ml, mm, mn, mo, mp, mq, mr, - /// ms, mt, mu, mv, mw, mx, my, mz, - /// na, nc, ne, nf, ng, ni, nl, no, - /// np, nr, nu, nz, om, pa, pe, pf, - /// pg, ph, pk, pl, pm, pn, pr, ps, - /// pt, pw, py, qa, qz, re, ro, rs, - /// ru, rw, sa, sb, sc, sd, se, sg, - /// sh, si, sj, sk, sl, sm, sn, so, - /// sr, ss, st, sv, sx, sy, sz, tc, - /// td, tf, tg, th, tj, tk, tl, tm, - /// tn, to, tr, tt, tv, tw, tz, ua, - /// ug, um, us, uy, uz, va, vc, ve, - /// vg, vi, vn, vu, wf, ws, xx, ye, - /// yt, za, zm, or zw. /// [JsonProperty("country")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/V2/Core/ClaimableSandboxes/ClaimableSandboxGetOptions.cs b/src/Stripe.net/Services/V2/Core/ClaimableSandboxes/ClaimableSandboxGetOptions.cs deleted file mode 100644 index 66f5a132ba..0000000000 --- a/src/Stripe.net/Services/V2/Core/ClaimableSandboxes/ClaimableSandboxGetOptions.cs +++ /dev/null @@ -1,7 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.V2.Core -{ - public class ClaimableSandboxGetOptions : BaseOptions - { - } -} diff --git a/src/Stripe.net/Services/V2/Core/ClaimableSandboxes/ClaimableSandboxService.cs b/src/Stripe.net/Services/V2/Core/ClaimableSandboxes/ClaimableSandboxService.cs index 06912aba8c..7ca9965791 100644 --- a/src/Stripe.net/Services/V2/Core/ClaimableSandboxes/ClaimableSandboxService.cs +++ b/src/Stripe.net/Services/V2/Core/ClaimableSandboxes/ClaimableSandboxService.cs @@ -2,7 +2,6 @@ namespace Stripe.V2.Core { using System; - using System.Net; using System.Net.Http; using System.Threading; using System.Threading.Tasks; @@ -36,25 +35,5 @@ public virtual Task CreateAsync(ClaimableSandboxCreateOptions { return this.RequestAsync(BaseAddress.Api, HttpMethod.Post, $"/v2/core/claimable_sandboxes", options, requestOptions, cancellationToken); } - - /// - /// Retrieves the details of a claimable sandbox that was previously been created. Supply - /// the unique claimable sandbox ID that was returned from your creation request, and Stripe - /// will return the corresponding sandbox information. - /// - public virtual ClaimableSandbox Get(string id, ClaimableSandboxGetOptions options = null, RequestOptions requestOptions = null) - { - return this.Request(BaseAddress.Api, HttpMethod.Get, $"/v2/core/claimable_sandboxes/{WebUtility.UrlEncode(id)}", options, requestOptions); - } - - /// - /// Retrieves the details of a claimable sandbox that was previously been created. Supply - /// the unique claimable sandbox ID that was returned from your creation request, and Stripe - /// will return the corresponding sandbox information. - /// - public virtual Task GetAsync(string id, ClaimableSandboxGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) - { - return this.RequestAsync(BaseAddress.Api, HttpMethod.Get, $"/v2/core/claimable_sandboxes/{WebUtility.UrlEncode(id)}", options, requestOptions, cancellationToken); - } } } diff --git a/src/Stripe.net/Services/V2/Core/EventDestinations/EventDestinationService.cs b/src/Stripe.net/Services/V2/Core/EventDestinations/EventDestinationService.cs index 560d7f1793..299fe81932 100644 --- a/src/Stripe.net/Services/V2/Core/EventDestinations/EventDestinationService.cs +++ b/src/Stripe.net/Services/V2/Core/EventDestinations/EventDestinationService.cs @@ -39,17 +39,17 @@ public virtual V2.EventDestination Create(EventDestinationCreateOptions options, /// /// Delete an event destination. /// - public virtual V2.EventDestination Delete(string id, EventDestinationDeleteOptions options = null, RequestOptions requestOptions = null) + public virtual V2.DeletedObject Delete(string id, EventDestinationDeleteOptions options = null, RequestOptions requestOptions = null) { - return this.Request(BaseAddress.Api, HttpMethod.Delete, $"/v2/core/event_destinations/{WebUtility.UrlEncode(id)}", options, requestOptions); + return this.Request(BaseAddress.Api, HttpMethod.Delete, $"/v2/core/event_destinations/{WebUtility.UrlEncode(id)}", options, requestOptions); } /// /// Delete an event destination. /// - public virtual Task DeleteAsync(string id, EventDestinationDeleteOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + public virtual Task DeleteAsync(string id, EventDestinationDeleteOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) { - return this.RequestAsync(BaseAddress.Api, HttpMethod.Delete, $"/v2/core/event_destinations/{WebUtility.UrlEncode(id)}", options, requestOptions, cancellationToken); + return this.RequestAsync(BaseAddress.Api, HttpMethod.Delete, $"/v2/core/event_destinations/{WebUtility.UrlEncode(id)}", options, requestOptions, cancellationToken); } /// diff --git a/src/Stripe.net/Services/V2/MoneyManagement/FinancialAccounts/FinancialAccountCreateStorageOptions.cs b/src/Stripe.net/Services/V2/MoneyManagement/FinancialAccounts/FinancialAccountCreateStorageOptions.cs index a30490b230..8db1b93f44 100644 --- a/src/Stripe.net/Services/V2/MoneyManagement/FinancialAccounts/FinancialAccountCreateStorageOptions.cs +++ b/src/Stripe.net/Services/V2/MoneyManagement/FinancialAccounts/FinancialAccountCreateStorageOptions.cs @@ -11,32 +11,6 @@ public class FinancialAccountCreateStorageOptions : INestedOptions { /// /// The currencies that this FinancialAccount can hold. - /// One of: aed, afn, all, amd, ang, aoa, - /// ars, aud, awg, azn, bam, bbd, bdt, - /// bgn, bhd, bif, bmd, bnd, bob, bov, - /// brl, bsd, btn, bwp, byn, byr, bzd, - /// cad, cdf, che, chf, chw, clf, clp, - /// cny, cop, cou, crc, cuc, cup, cve, - /// czk, djf, dkk, dop, dzd, eek, egp, - /// ern, etb, eur, fjd, fkp, gbp, gel, - /// ghc, ghs, gip, gmd, gnf, gtq, gyd, - /// hkd, hnl, hrk, htg, huf, idr, ils, - /// inr, iqd, irr, isk, jmd, jod, jpy, - /// kes, kgs, khr, kmf, kpw, krw, kwd, - /// kyd, kzt, lak, lbp, lkr, lrd, lsl, - /// ltl, lvl, lyd, mad, mdl, mga, mkd, - /// mmk, mnt, mop, mro, mru, mur, mvr, - /// mwk, mxn, mxv, myr, mzn, nad, ngn, - /// nio, nok, npr, nzd, omr, pab, pen, - /// pgk, php, pkr, pln, pyg, qar, ron, - /// rsd, rub, rwf, sar, sbd, scr, sdg, - /// sek, sgd, shp, sle, sll, sos, srd, - /// ssp, std, stn, svc, syp, szl, thb, - /// tjs, tmt, tnd, top, try, ttd, twd, - /// tzs, uah, ugx, usd, usdb, usdc, usn, - /// uyi, uyu, uzs, vef, ves, vnd, vuv, - /// wst, xaf, xcd, xcg, xof, xpf, yer, - /// zar, zmk, zmw, zwd, zwg, or zwl. /// [JsonProperty("holds_currencies")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/V2/MoneyManagement/FinancialAddresses/FinancialAddressCreateOptions.cs b/src/Stripe.net/Services/V2/MoneyManagement/FinancialAddresses/FinancialAddressCreateOptions.cs index 9dedd85c8a..abe850bf6a 100644 --- a/src/Stripe.net/Services/V2/MoneyManagement/FinancialAddresses/FinancialAddressCreateOptions.cs +++ b/src/Stripe.net/Services/V2/MoneyManagement/FinancialAddresses/FinancialAddressCreateOptions.cs @@ -11,32 +11,6 @@ public class FinancialAddressCreateOptions : BaseOptions /// /// Open Enum. The currency the FinancialAddress should support. Currently, only the /// usd and gbp values are supported. - /// One of: aed, afn, all, amd, ang, aoa, - /// ars, aud, awg, azn, bam, bbd, bdt, - /// bgn, bhd, bif, bmd, bnd, bob, bov, - /// brl, bsd, btn, bwp, byn, byr, bzd, - /// cad, cdf, che, chf, chw, clf, clp, - /// cny, cop, cou, crc, cuc, cup, cve, - /// czk, djf, dkk, dop, dzd, eek, egp, - /// ern, etb, eur, fjd, fkp, gbp, gel, - /// ghc, ghs, gip, gmd, gnf, gtq, gyd, - /// hkd, hnl, hrk, htg, huf, idr, ils, - /// inr, iqd, irr, isk, jmd, jod, jpy, - /// kes, kgs, khr, kmf, kpw, krw, kwd, - /// kyd, kzt, lak, lbp, lkr, lrd, lsl, - /// ltl, lvl, lyd, mad, mdl, mga, mkd, - /// mmk, mnt, mop, mro, mru, mur, mvr, - /// mwk, mxn, mxv, myr, mzn, nad, ngn, - /// nio, nok, npr, nzd, omr, pab, pen, - /// pgk, php, pkr, pln, pyg, qar, ron, - /// rsd, rub, rwf, sar, sbd, scr, sdg, - /// sek, sgd, shp, sle, sll, sos, srd, - /// ssp, std, stn, svc, syp, szl, thb, - /// tjs, tmt, tnd, top, try, ttd, twd, - /// tzs, uah, ugx, usd, usdb, usdc, usn, - /// uyi, uyu, uzs, vef, ves, vnd, vuv, - /// wst, xaf, xcd, xcg, xof, xpf, yer, - /// zar, zmk, zmw, zwd, zwg, or zwl. /// [JsonProperty("currency")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/V2/Reporting/ReportRuns/ReportRunCreateOptions.cs b/src/Stripe.net/Services/V2/Reporting/ReportRuns/ReportRunCreateOptions.cs deleted file mode 100644 index 5ac1256761..0000000000 --- a/src/Stripe.net/Services/V2/Reporting/ReportRuns/ReportRunCreateOptions.cs +++ /dev/null @@ -1,40 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.V2.Reporting -{ - using System.Collections.Generic; - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - public class ReportRunCreateOptions : BaseOptions - { - /// - /// The unique identifier of the Report being requested. - /// - [JsonProperty("report")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("report")] -#endif - public string Report { get; set; } - - /// - /// A map of parameter names to values, specifying how the report should be customized. The - /// accepted parameters depend on the specific Report being run. - /// - [JsonProperty("report_parameters")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("report_parameters")] -#endif - public Dictionary ReportParameters { get; set; } - - /// - /// Optional settings to customize the results of the ReportRun. - /// - [JsonProperty("result_options")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("result_options")] -#endif - public ReportRunCreateResultOptionsOptions ResultOptions { get; set; } - } -} diff --git a/src/Stripe.net/Services/V2/Reporting/ReportRuns/ReportRunCreateReportParametersArrayValueOptions.cs b/src/Stripe.net/Services/V2/Reporting/ReportRuns/ReportRunCreateReportParametersArrayValueOptions.cs deleted file mode 100644 index 059e43ebcc..0000000000 --- a/src/Stripe.net/Services/V2/Reporting/ReportRuns/ReportRunCreateReportParametersArrayValueOptions.cs +++ /dev/null @@ -1,21 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.V2.Reporting -{ - using System.Collections.Generic; - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - public class ReportRunCreateReportParametersArrayValueOptions : INestedOptions - { - /// - /// The list of string values in the array. - /// - [JsonProperty("items")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("items")] -#endif - public List Items { get; set; } - } -} diff --git a/src/Stripe.net/Services/V2/Reporting/ReportRuns/ReportRunCreateReportParametersOptions.cs b/src/Stripe.net/Services/V2/Reporting/ReportRuns/ReportRunCreateReportParametersOptions.cs deleted file mode 100644 index 4fa4a6bad6..0000000000 --- a/src/Stripe.net/Services/V2/Reporting/ReportRuns/ReportRunCreateReportParametersOptions.cs +++ /dev/null @@ -1,39 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.V2.Reporting -{ - using System; - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - public class ReportRunCreateReportParametersOptions : INestedOptions - { - /// - /// Parameter with an array data type. - /// - [JsonProperty("array_value")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("array_value")] -#endif - public ReportRunCreateReportParametersArrayValueOptions ArrayValue { get; set; } - - /// - /// Parameter with a string data type. - /// - [JsonProperty("string_value")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("string_value")] -#endif - public string StringValue { get; set; } - - /// - /// Parameter with a timestamp data type. - /// - [JsonProperty("timestamp_value")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("timestamp_value")] -#endif - public DateTime? TimestampValue { get; set; } - } -} diff --git a/src/Stripe.net/Services/V2/Reporting/ReportRuns/ReportRunCreateResultOptionsOptions.cs b/src/Stripe.net/Services/V2/Reporting/ReportRuns/ReportRunCreateResultOptionsOptions.cs deleted file mode 100644 index 790b7e2fc7..0000000000 --- a/src/Stripe.net/Services/V2/Reporting/ReportRuns/ReportRunCreateResultOptionsOptions.cs +++ /dev/null @@ -1,21 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.V2.Reporting -{ - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - public class ReportRunCreateResultOptionsOptions : INestedOptions - { - /// - /// If set, the generated report file will be compressed into a ZIP folder. This is useful - /// for reducing file size and download time for large reports. - /// - [JsonProperty("compress_file")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("compress_file")] -#endif - public bool? CompressFile { get; set; } - } -} diff --git a/src/Stripe.net/Services/V2/Reporting/ReportRuns/ReportRunGetOptions.cs b/src/Stripe.net/Services/V2/Reporting/ReportRuns/ReportRunGetOptions.cs deleted file mode 100644 index 64adf67d2d..0000000000 --- a/src/Stripe.net/Services/V2/Reporting/ReportRuns/ReportRunGetOptions.cs +++ /dev/null @@ -1,7 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.V2.Reporting -{ - public class ReportRunGetOptions : BaseOptions - { - } -} diff --git a/src/Stripe.net/Services/V2/Reporting/ReportRuns/ReportRunService.cs b/src/Stripe.net/Services/V2/Reporting/ReportRuns/ReportRunService.cs deleted file mode 100644 index 242a790e42..0000000000 --- a/src/Stripe.net/Services/V2/Reporting/ReportRuns/ReportRunService.cs +++ /dev/null @@ -1,64 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.V2.Reporting -{ - using System; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; - - public class ReportRunService : Service - { - internal ReportRunService(ApiRequestor requestor) - : base(requestor) - { - } - - internal ReportRunService(IStripeClient client) - : base(client) - { - } - - /// - /// Initiates the generation of a ReportRun based on the specified report template - /// and user-provided parameters. It's the starting point for obtaining report data, and - /// returns a ReportRun object which can be used to track the progress and retrieve - /// the results of the report. - /// - public virtual ReportRun Create(ReportRunCreateOptions options, RequestOptions requestOptions = null) - { - return this.Request(BaseAddress.Api, HttpMethod.Post, $"/v2/reporting/report_runs", options, requestOptions); - } - - /// - /// Initiates the generation of a ReportRun based on the specified report template - /// and user-provided parameters. It's the starting point for obtaining report data, and - /// returns a ReportRun object which can be used to track the progress and retrieve - /// the results of the report. - /// - public virtual Task CreateAsync(ReportRunCreateOptions options, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) - { - return this.RequestAsync(BaseAddress.Api, HttpMethod.Post, $"/v2/reporting/report_runs", options, requestOptions, cancellationToken); - } - - /// - /// Fetches the current state and details of a previously created ReportRun. If the - /// ReportRun has succeeded, the endpoint will provide details for how to retrieve - /// the results. - /// - public virtual ReportRun Get(string id, ReportRunGetOptions options = null, RequestOptions requestOptions = null) - { - return this.Request(BaseAddress.Api, HttpMethod.Get, $"/v2/reporting/report_runs/{WebUtility.UrlEncode(id)}", options, requestOptions); - } - - /// - /// Fetches the current state and details of a previously created ReportRun. If the - /// ReportRun has succeeded, the endpoint will provide details for how to retrieve - /// the results. - /// - public virtual Task GetAsync(string id, ReportRunGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) - { - return this.RequestAsync(BaseAddress.Api, HttpMethod.Get, $"/v2/reporting/report_runs/{WebUtility.UrlEncode(id)}", options, requestOptions, cancellationToken); - } - } -} diff --git a/src/Stripe.net/Services/V2/Reporting/Reports/ReportGetOptions.cs b/src/Stripe.net/Services/V2/Reporting/Reports/ReportGetOptions.cs deleted file mode 100644 index 559b32eb47..0000000000 --- a/src/Stripe.net/Services/V2/Reporting/Reports/ReportGetOptions.cs +++ /dev/null @@ -1,7 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.V2.Reporting -{ - public class ReportGetOptions : BaseOptions - { - } -} diff --git a/src/Stripe.net/Services/V2/Reporting/Reports/ReportService.cs b/src/Stripe.net/Services/V2/Reporting/Reports/ReportService.cs deleted file mode 100644 index 04701c03e4..0000000000 --- a/src/Stripe.net/Services/V2/Reporting/Reports/ReportService.cs +++ /dev/null @@ -1,44 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.V2.Reporting -{ - using System; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; - - public class ReportService : Service - { - internal ReportService(ApiRequestor requestor) - : base(requestor) - { - } - - internal ReportService(IStripeClient client) - : base(client) - { - } - - /// - /// Retrieves metadata about a specific Report template, including its name, - /// description, and the parameters it accepts. It's useful for understanding the - /// capabilities and requirements of a particular Report before requesting a - /// ReportRun. - /// - public virtual Report Get(string id, ReportGetOptions options = null, RequestOptions requestOptions = null) - { - return this.Request(BaseAddress.Api, HttpMethod.Get, $"/v2/reporting/reports/{WebUtility.UrlEncode(id)}", options, requestOptions); - } - - /// - /// Retrieves metadata about a specific Report template, including its name, - /// description, and the parameters it accepts. It's useful for understanding the - /// capabilities and requirements of a particular Report before requesting a - /// ReportRun. - /// - public virtual Task GetAsync(string id, ReportGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) - { - return this.RequestAsync(BaseAddress.Api, HttpMethod.Get, $"/v2/reporting/reports/{WebUtility.UrlEncode(id)}", options, requestOptions, cancellationToken); - } - } -} diff --git a/src/Stripe.net/Services/V2/ReportingService.cs b/src/Stripe.net/Services/V2/ReportingService.cs deleted file mode 100644 index dc54dcdb60..0000000000 --- a/src/Stripe.net/Services/V2/ReportingService.cs +++ /dev/null @@ -1,29 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe.V2 -{ - using System; - using System.Threading; - using System.Threading.Tasks; - - public class ReportingService : Service - { - private V2.Reporting.ReportService reports; - private V2.Reporting.ReportRunService reportRuns; - - internal ReportingService(ApiRequestor requestor) - : base(requestor) - { - } - - internal ReportingService(IStripeClient client) - : base(client) - { - } - - public virtual V2.Reporting.ReportService Reports => this.reports ??= new V2.Reporting.ReportService( - this.Requestor); - - public virtual V2.Reporting.ReportRunService ReportRuns => this.reportRuns ??= new V2.Reporting.ReportRunService( - this.Requestor); - } -} diff --git a/src/Stripe.net/Services/V2Services.cs b/src/Stripe.net/Services/V2Services.cs index afeca470b0..30515fc140 100644 --- a/src/Stripe.net/Services/V2Services.cs +++ b/src/Stripe.net/Services/V2Services.cs @@ -11,7 +11,6 @@ public class V2Services : Service private V2.CoreService core; private V2.MoneyManagementService moneyManagement; private V2.PaymentService payments; - private V2.ReportingService reporting; private V2.TaxService tax; private V2.TestHelperService testHelpers; @@ -37,9 +36,6 @@ internal V2Services(IStripeClient client) public virtual V2.PaymentService Payments => this.payments ??= new V2.PaymentService( this.Requestor); - public virtual V2.ReportingService Reporting => this.reporting ??= new V2.ReportingService( - this.Requestor); - public virtual V2.TaxService Tax => this.tax ??= new V2.TaxService( this.Requestor); diff --git a/src/Stripe.net/Services/_common/MultipartFileContent.cs b/src/Stripe.net/Services/_common/MultipartFileContent.cs new file mode 100644 index 0000000000..17f46b4180 --- /dev/null +++ b/src/Stripe.net/Services/_common/MultipartFileContent.cs @@ -0,0 +1,31 @@ +namespace Stripe +{ + using System.IO; + + /// + /// Represents Data and optional Name and Type that will be encoded as multipart form + /// data. Used in e.g. FileService.Create. + /// + /// + public class MultipartFileContent + { + /// + /// The file data to send. If this is a FileStream, the SDK will infer + /// the name and type from the file name and extension. If this is not + /// a FileStream set Name and Type to configure the file upload. + /// + public Stream Data { get; set; } + + /// + /// The optional name to send with this file data. Uses the file name if omitted + /// and Data is a FileStream. + /// + public string Name { get; set; } + + /// + /// The optional mime type to use when sending file data. Uses the type that + /// matches the file extension from Name (or the file name from Data) if omitted. + /// + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Services/_common/RawRequestOptions.cs b/src/Stripe.net/Services/_common/RawRequestOptions.cs index 56d62af257..e10e88377b 100644 --- a/src/Stripe.net/Services/_common/RawRequestOptions.cs +++ b/src/Stripe.net/Services/_common/RawRequestOptions.cs @@ -4,6 +4,13 @@ namespace Stripe public class RawRequestOptions : RequestOptions { + /// Gets or sets the base URL for the raw request. + /// + /// Use this to send API calls to e.g. files.stripe.com or + /// a proxy address. + /// + public string BaseUrl { get => this.InternalBaseUrl; set => this.InternalBaseUrl = value; } + /// Gets or sets additional headers for the request. public Dictionary AdditionalHeaders { get; set; } = new Dictionary(); diff --git a/src/Stripe.net/Services/_common/RequestOptions.cs b/src/Stripe.net/Services/_common/RequestOptions.cs index dd8409cf54..6dbeb3f34e 100644 --- a/src/Stripe.net/Services/_common/RequestOptions.cs +++ b/src/Stripe.net/Services/_common/RequestOptions.cs @@ -27,13 +27,13 @@ public class RequestOptions /// Gets or sets the value or Stripe-Context request header. public string StripeContext { get; set; } - /// Gets or sets the base URL for the request. + /// Gets the base URL for the request. /// /// This is an internal property. It is set by services or individual request methods when /// they need to send a request to a non-standard destination, e.g. files.stripe.com /// for file creation requests or connect.stripe.com for OAuth requests. /// - internal string BaseUrl { get; set; } + internal string InternalBaseUrl { get; set; } /// Gets or sets the API version for the request. /// diff --git a/src/StripeTests/Entities/DeserializationTest.cs b/src/StripeTests/Entities/DeserializationTest.cs index 5a6f715a47..62d4dc381b 100644 --- a/src/StripeTests/Entities/DeserializationTest.cs +++ b/src/StripeTests/Entities/DeserializationTest.cs @@ -1,211 +1,211 @@ namespace StripeTests { - using System; - using System.Collections.Generic; - using System.Linq; - using Newtonsoft.Json; - using Stripe; - using Stripe.Infrastructure; - using Xunit; - - public class DeserializationTest : BaseStripeTest - { - [Fact] - public void TestStubWithIdDirect() + using System; + using System.Collections.Generic; + using System.Linq; + using Newtonsoft.Json; + using Stripe; + using Stripe.Infrastructure; + using Xunit; + + public class DeserializationTest : BaseStripeTest { - string json = "{\"some_ref\":{\"id\":\"xyz\"}}"; - var entity = StripeEntity.FromJson(json); - Assert.NotNull(entity); - Assert.IsType(entity); - var id = entity.SomeRef.Id; - Assert.Equal("xyz", id); - } - - [Fact] - public void TestStubWithIdExpanded() - { - string json = "{\"some_expandable\":{\"id\":\"xyz\"}}"; - var entity = StripeEntity.FromJson(json); - Assert.NotNull(entity); - Assert.IsType(entity); - var id = entity.SomeExpandable.Id; - Assert.Equal("xyz", id); - } - - [Fact] - public void TestStubWithIdArrayExpanded() - { - string json = "{\"some_expanded_array\":[{\"id\":\"xyz\"}]}"; - var entity = StripeEntity.FromJson(json); - Assert.NotNull(entity); - Assert.IsType(entity); - var id = entity.SomeExpandedArray[0].Id; - Assert.Equal("xyz", id); - } - - [Fact] - public void TestStubWithIdInArray() - { - string json = "{\"some_ref_array\":[{\"id\":\"xyz\"}]}"; - var entity = StripeEntity.FromJson(json); - Assert.NotNull(entity); - Assert.IsType(entity); - var id = entity.SomeRefArray[0].Id; - Assert.Equal("xyz", id); - } - - [Fact] - public void TestStubWithIdInListObject() - { - string json = "{\"some_list_object\":{\"data\":[{\"id\":\"xyz\"}]}}"; - var entity = StripeEntity.FromJson(json); - Assert.NotNull(entity); - Assert.IsType(entity); - var enumerator = entity.SomeListObject.GetEnumerator(); - enumerator.MoveNext(); - var id = enumerator.Current.Id; - Assert.Equal("xyz", id); - } - - [Fact] - public void TestEmptyObjectDirect() - { - string json = "{\"some_ref\":{}}"; - var entity = JsonConvert.DeserializeObject(json); - var id = entity.SomeRef.Id; - Assert.Null(id); - } - - [Fact] - public void TestEmptyObjectArray() - { - string json = "{\"some_ref_array\":[{}]}"; - var entity = JsonConvert.DeserializeObject(json); - var id = entity.SomeRefArray[0].Id; - Assert.Null(id); - } - - [Fact] - public void TestEmptyObjectExpanded() - { - string json = "{\"some_expandable\":{}}"; - var entity = JsonConvert.DeserializeObject(json); - var id = entity.SomeExpandable.Id; - Assert.Null(id); - } - - [Fact] - public void TestEmptyObjectArrayExpanded() - { - string json = "{\"some_expanded_array\":[{}]}"; - var entity = JsonConvert.DeserializeObject(json); - var id = entity.SomeExpandedArray[0].Id; - Assert.Null(id); - } - - public class MyEntity : StripeEntity, IHasId - { - [JsonProperty("id")] - public string Id { get; set; } - - [JsonProperty("some_integer")] - public long SomeInteger { get; set; } - - [JsonProperty("some_longinteger")] - public long SomeLonginteger { get; set; } - - [JsonProperty("some_boolean")] - public bool SomeBoolean { get; set; } - - [JsonProperty("some_number")] - public decimal SomeNumber { get; set; } - - [JsonProperty("some_decimal_string")] - public decimal SomeDecimalString { get; set; } - - [JsonProperty("some_string")] - public string SomeString { get; set; } - - [JsonProperty("some_datetime")] - [JsonConverter(typeof(UnixDateTimeConverter))] - public DateTime SomeDatetime { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; - - [JsonProperty("some_ref")] - public MyEntity SomeRef { get; set; } - - [JsonProperty("some_literal")] - public string SomeLiteral { get; set; } - - [JsonProperty("some_nullable")] - public string SomeNullable { get; set; } - - [JsonProperty("some_string_array")] - public List SomeStringArray { get; set; } - - [JsonProperty("some_ref_array")] - public List SomeRefArray { get; set; } + [Fact] + public void TestStubWithIdDirect() + { + string json = "{\"some_ref\":{\"id\":\"xyz\"}}"; + var entity = StripeEntity.FromJson(json); + Assert.NotNull(entity); + Assert.IsType(entity); + var id = entity.SomeRef.Id; + Assert.Equal("xyz", id); + } + + [Fact] + public void TestStubWithIdExpanded() + { + string json = "{\"some_expandable\":{\"id\":\"xyz\"}}"; + var entity = StripeEntity.FromJson(json); + Assert.NotNull(entity); + Assert.IsType(entity); + var id = entity.SomeExpandable.Id; + Assert.Equal("xyz", id); + } + + [Fact] + public void TestStubWithIdArrayExpanded() + { + string json = "{\"some_expanded_array\":[{\"id\":\"xyz\"}]}"; + var entity = StripeEntity.FromJson(json); + Assert.NotNull(entity); + Assert.IsType(entity); + var id = entity.SomeExpandedArray[0].Id; + Assert.Equal("xyz", id); + } + + [Fact] + public void TestStubWithIdInArray() + { + string json = "{\"some_ref_array\":[{\"id\":\"xyz\"}]}"; + var entity = StripeEntity.FromJson(json); + Assert.NotNull(entity); + Assert.IsType(entity); + var id = entity.SomeRefArray[0].Id; + Assert.Equal("xyz", id); + } + + [Fact] + public void TestStubWithIdInListObject() + { + string json = "{\"some_list_object\":{\"data\":[{\"id\":\"xyz\"}]}}"; + var entity = StripeEntity.FromJson(json); + Assert.NotNull(entity); + Assert.IsType(entity); + var enumerator = entity.SomeListObject.GetEnumerator(); + enumerator.MoveNext(); + var id = enumerator.Current.Id; + Assert.Equal("xyz", id); + } + + [Fact] + public void TestEmptyObjectDirect() + { + string json = "{\"some_ref\":{}}"; + var entity = JsonConvert.DeserializeObject(json); + var id = entity.SomeRef.Id; + Assert.Null(id); + } + + [Fact] + public void TestEmptyObjectArray() + { + string json = "{\"some_ref_array\":[{}]}"; + var entity = JsonConvert.DeserializeObject(json); + var id = entity.SomeRefArray[0].Id; + Assert.Null(id); + } + + [Fact] + public void TestEmptyObjectExpanded() + { + string json = "{\"some_expandable\":{}}"; + var entity = JsonConvert.DeserializeObject(json); + var id = entity.SomeExpandable.Id; + Assert.Null(id); + } + + [Fact] + public void TestEmptyObjectArrayExpanded() + { + string json = "{\"some_expanded_array\":[{}]}"; + var entity = JsonConvert.DeserializeObject(json); + var id = entity.SomeExpandedArray[0].Id; + Assert.Null(id); + } + + public class MyEntity : StripeEntity, IHasId + { + [JsonProperty("id")] + public string Id { get; set; } + + [JsonProperty("some_integer")] + public long SomeInteger { get; set; } + + [JsonProperty("some_longinteger")] + public long SomeLonginteger { get; set; } + + [JsonProperty("some_boolean")] + public bool SomeBoolean { get; set; } + + [JsonProperty("some_number")] + public decimal SomeNumber { get; set; } + + [JsonProperty("some_decimal_string")] + public decimal SomeDecimalString { get; set; } + + [JsonProperty("some_string")] + public string SomeString { get; set; } + + [JsonProperty("some_datetime")] + [JsonConverter(typeof(UnixDateTimeConverter))] + public DateTime SomeDatetime { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; + + [JsonProperty("some_ref")] + public MyEntity SomeRef { get; set; } + + [JsonProperty("some_literal")] + public string SomeLiteral { get; set; } + + [JsonProperty("some_nullable")] + public string SomeNullable { get; set; } + + [JsonProperty("some_string_array")] + public List SomeStringArray { get; set; } + + [JsonProperty("some_ref_array")] + public List SomeRefArray { get; set; } + + #region Expandable SomeExpandedArray + + [JsonIgnore] + public List SomeExpandedArrayIds + { + get => this.InternalSomeExpandedArray?.Select((x) => x.Id).ToList(); + set => this.InternalSomeExpandedArray = SetExpandableArrayIds(value); + } + + [JsonIgnore] + public List SomeExpandedArray + { + get => this.InternalSomeExpandedArray?.Select((x) => x.ExpandedObject).ToList(); + set => this.InternalSomeExpandedArray = SetExpandableArrayObjects(value); + } + + [JsonProperty("some_expanded_array", ItemConverterType = typeof(ExpandableFieldConverter))] + internal List> InternalSomeExpandedArray { get; set; } + #endregion + + [JsonProperty("some_enum")] + public string SomeEnum { get; set; } + + [JsonProperty("some_map")] + public Dictionary SomeMap { get; set; } + + [JsonProperty("some_object")] + public MyEntitySomeObject SomeObject { get; set; } + + [JsonProperty("some_list_object")] + public StripeList SomeListObject { get; set; } + + #region Expandable SomeExpandable + + [JsonIgnore] + public string SomeExpandableId + { + get => this.InternalSomeExpandable?.Id; + set => this.InternalSomeExpandable = SetExpandableFieldId(value, this.InternalSomeExpandable); + } + + [JsonIgnore] + public MyEntity SomeExpandable + { + get => this.InternalSomeExpandable?.ExpandedObject; + set => this.InternalSomeExpandable = SetExpandableFieldObject(value, this.InternalSomeExpandable); + } - #region Expandable SomeExpandedArray + [JsonProperty("some_expandable")] + [JsonConverter(typeof(ExpandableFieldConverter))] + internal ExpandableField InternalSomeExpandable { get; set; } + #endregion - [JsonIgnore] - public List SomeExpandedArrayIds - { - get => this.InternalSomeExpandedArray?.Select((x) => x.Id).ToList(); - set => this.InternalSomeExpandedArray = SetExpandableArrayIds(value); - } + [JsonProperty("some_polymorphic_group")] + public MyEntity SomePolymorphicGroup { get; set; } + } - [JsonIgnore] - public List SomeExpandedArray - { - get => this.InternalSomeExpandedArray?.Select((x) => x.ExpandedObject).ToList(); - set => this.InternalSomeExpandedArray = SetExpandableArrayObjects(value); - } - - [JsonProperty("some_expanded_array", ItemConverterType = typeof(ExpandableFieldConverter))] - internal List> InternalSomeExpandedArray { get; set; } - #endregion - - [JsonProperty("some_enum")] - public string SomeEnum { get; set; } - - [JsonProperty("some_map")] - public Dictionary SomeMap { get; set; } - - [JsonProperty("some_object")] - public MyEntitySomeObject SomeObject { get; set; } - - [JsonProperty("some_list_object")] - public StripeList SomeListObject { get; set; } - - #region Expandable SomeExpandable - - [JsonIgnore] - public string SomeExpandableId - { - get => this.InternalSomeExpandable?.Id; - set => this.InternalSomeExpandable = SetExpandableFieldId(value, this.InternalSomeExpandable); - } - - [JsonIgnore] - public MyEntity SomeExpandable - { - get => this.InternalSomeExpandable?.ExpandedObject; - set => this.InternalSomeExpandable = SetExpandableFieldObject(value, this.InternalSomeExpandable); - } - - [JsonProperty("some_expandable")] - [JsonConverter(typeof(ExpandableFieldConverter))] - internal ExpandableField InternalSomeExpandable { get; set; } - #endregion - - [JsonProperty("some_polymorphic_group")] - public MyEntity SomePolymorphicGroup { get; set; } - } - - public class MyEntitySomeObject : StripeEntity - { - [JsonProperty("some_string")] - public string SomeString { get; set; } + public class MyEntitySomeObject : StripeEntity + { + [JsonProperty("some_string")] + public string SomeString { get; set; } + } } - } } diff --git a/src/StripeTests/Infrastructure/FormEncoding/MultipartFormDataContentTest.cs b/src/StripeTests/Infrastructure/FormEncoding/MultipartFormDataContentTest.cs index 30f2bf6c40..fcaa77faad 100644 --- a/src/StripeTests/Infrastructure/FormEncoding/MultipartFormDataContentTest.cs +++ b/src/StripeTests/Infrastructure/FormEncoding/MultipartFormDataContentTest.cs @@ -5,6 +5,7 @@ namespace StripeTests using System.IO; using System.Text; using System.Threading.Tasks; + using Stripe; using Stripe.Infrastructure.FormEncoding; using Xunit; @@ -71,6 +72,132 @@ public async Task Ctor_OneStreamEntry_Success() result); } + [Fact] + public async Task Ctor_OneMultipartFileContentEntry_Success() + { + var source = new Dictionary + { + { "key", new MultipartFileContent { Data = new MemoryStream(Encoding.UTF8.GetBytes("Hello World!")) } }, + }; + var content = new MultipartFormDataContent(source, "test-boundary"); + + var stream = await content.ReadAsStreamAsync(); + Assert.Equal(174, stream.Length); + var result = new StreamReader(stream).ReadToEnd(); + Assert.Equal( + "--test-boundary\r\n" + + "Content-Disposition: form-data; name=\"key\"; filename=blob; filename*=utf-8''blob\r\n" + + "Content-Type: application/octet-stream\r\n\r\nHello World!\r\n" + + "--test-boundary--\r\n", + result); + } + + [Fact] + public async Task Ctor_OneMultipartFileContentWithNameEntry_Success() + { + var source = new Dictionary + { + { + "key", new MultipartFileContent + { + Data = new MemoryStream(Encoding.UTF8.GetBytes("Hello World!")), + Name = "file", + } + }, + }; + var content = new MultipartFormDataContent(source, "test-boundary"); + + var stream = await content.ReadAsStreamAsync(); + Assert.Equal(174, stream.Length); + var result = new StreamReader(stream).ReadToEnd(); + Assert.Equal( + "--test-boundary\r\n" + + "Content-Disposition: form-data; name=\"key\"; filename=file; filename*=utf-8''file\r\n" + + "Content-Type: application/octet-stream\r\n\r\nHello World!\r\n" + + "--test-boundary--\r\n", + result); + } + + [Fact] + public async Task Ctor_OneMultipartFileContentWithNameAndExtEntry_Success() + { + var source = new Dictionary + { + { + "key", new MultipartFileContent + { + Data = new MemoryStream(Encoding.UTF8.GetBytes("Hello World!")), + Name = "file.csv", + } + }, + }; + var content = new MultipartFormDataContent(source, "test-boundary"); + + var stream = await content.ReadAsStreamAsync(); + Assert.Equal(166, stream.Length); + var result = new StreamReader(stream).ReadToEnd(); + Assert.Equal( + "--test-boundary\r\n" + + "Content-Disposition: form-data; name=\"key\"; filename=file.csv; filename*=utf-8''file.csv\r\n" + + "Content-Type: text/csv\r\n\r\nHello World!\r\n" + + "--test-boundary--\r\n", + result); + } + + [Fact] + public async Task Ctor_OneMultipartFileContentWithNameAndTypeEntry_Success() + { + var source = new Dictionary + { + { + "key", new MultipartFileContent + { + Data = new MemoryStream(Encoding.UTF8.GetBytes("Hello World!")), + Name = "file", + Type = "application/json", + } + }, + }; + var content = new MultipartFormDataContent(source, "test-boundary"); + + var stream = await content.ReadAsStreamAsync(); + Assert.Equal(166, stream.Length); + var result = new StreamReader(stream).ReadToEnd(); + Assert.Equal( + "--test-boundary\r\n" + + "Content-Disposition: form-data; name=\"key\"; filename=file; filename*=utf-8''file\r\n" + + "Content-Type: application/json\r\n\r\nHello World!\r\n" + + "--test-boundary--\r\n", + result); + } + + [Fact] + public async Task Ctor_OneMultipartFileContentWithNameAndExtAndTypeEntry_Success() + { + var source = new Dictionary + { + { + "key", new MultipartFileContent + { + Data = new MemoryStream(Encoding.UTF8.GetBytes("Hello World!")), + Name = "file.json", + Type = "application/octet-stream", + } + }, + }; + var content = new MultipartFormDataContent(source, "test-boundary"); + + var stream = await content.ReadAsStreamAsync(); + Assert.Equal(184, stream.Length); + var result = new StreamReader(stream).ReadToEnd(); + Assert.Equal( + "--test-boundary\r\n" + + "Content-Disposition: form-data; name=\"key\"; filename=file.json; filename*=utf-8''file.json\r\n" + + "Content-Type: application/octet-stream\r\n\r\nHello World!\r\n" + + "--test-boundary--\r\n", + result); + } + [Fact] public async Task Ctor_TwoEntries_Success() { diff --git a/src/StripeTests/Infrastructure/Public/StripeClientTest.cs b/src/StripeTests/Infrastructure/Public/StripeClientTest.cs index 78df76c9ca..91a4d5e55d 100644 --- a/src/StripeTests/Infrastructure/Public/StripeClientTest.cs +++ b/src/StripeTests/Infrastructure/Public/StripeClientTest.cs @@ -164,6 +164,42 @@ public async Task RawRequestAsync_Json() Assert.Equal("mes_123", obj.Id); } + [Fact] + public async Task RawRequest_BaseUrl() + { + // Stub a request as stripe-mock does not support v2 + this.MockHttpClientFixture.StubRequest( + HttpMethod.Post, + "/v2/billing/meter_event_session", + System.Net.HttpStatusCode.OK, + "{\"id\": \"mes_123\",\"object\":\"v2.billing.meter_event_session\"}"); + + var expectedBaseUrl = "https://test.stripetest.com"; + var rawResponse = await this.stripeClient.RawRequestAsync( + HttpMethod.Post, + "/v2/billing/meter_event_session", + "{}", + new RawRequestOptions + { + BaseUrl = expectedBaseUrl, + AdditionalHeaders = + { + { "foo", "bar" }, + }, + }); + + this.MockHttpClientFixture.MockHandler.Protected() + .Verify( + "SendAsync", + Times.Once(), + ItExpr.Is(m => + new Uri(expectedBaseUrl).Host == (string)m.Properties["OriginalHost"]), + ItExpr.IsAny()); + + var obj = this.stripeClient.Deserialize(rawResponse.Content); + Assert.Equal("mes_123", obj.Id); + } + [Fact] public async Task RawRequestAsyncIncludesCorrectUsage() { diff --git a/src/StripeTests/Services/Files/FileServiceTest.cs b/src/StripeTests/Services/Files/FileServiceTest.cs index 9a0bd84032..bdf88084cd 100644 --- a/src/StripeTests/Services/Files/FileServiceTest.cs +++ b/src/StripeTests/Services/Files/FileServiceTest.cs @@ -28,9 +28,13 @@ public FileServiceTest( { this.service = new FileService(this.StripeClient); + var resourceStream = typeof(FileServiceTest).GetTypeInfo().Assembly.GetManifestResourceStream(FileName); this.createOptions = new FileCreateOptions { - File = typeof(FileServiceTest).GetTypeInfo().Assembly.GetManifestResourceStream(FileName), + File = new MultipartFileContent + { + Data = resourceStream, + }, FileLinkData = new FileFileLinkDataOptions { Create = true, @@ -44,7 +48,10 @@ public FileServiceTest( this.base64Options = new FileCreateOptions { - File = new MemoryStream(Convert.FromBase64String("c3RyaXBlLWRvdG5ldA==")), + File = new MultipartFileContent + { + Data = new MemoryStream(Convert.FromBase64String("c3RyaXBlLWRvdG5ldA==")), + }, Purpose = FilePurpose.BusinessLogo, }; diff --git a/src/StripeTests/Services/GeneratedExamplesTest.cs b/src/StripeTests/Services/GeneratedExamplesTest.cs index 814f56bf96..31f089a528 100644 --- a/src/StripeTests/Services/GeneratedExamplesTest.cs +++ b/src/StripeTests/Services/GeneratedExamplesTest.cs @@ -1330,8 +1330,11 @@ public void TestFilesPost() var options = new FileCreateOptions { Purpose = "account_requirement", - File = new System.IO.MemoryStream( - System.Text.Encoding.UTF8.GetBytes("File contents")), + File = new Stripe.MultipartFileContent + { + Data = new System.IO.MemoryStream( + System.Text.Encoding.UTF8.GetBytes("File contents")), + }, }; var service = new FileService(this.StripeClient); File file = service.Create(options); @@ -3911,7 +3914,6 @@ public void TestSubscriptionSchedulesPost() Quantity = 1, }, }, - Iterations = 12, }, }, }; @@ -6156,7 +6158,7 @@ public void TestV2BillingBillSettingGet() HttpMethod.Get, "/v2/billing/bill_settings", (HttpStatusCode)200, - "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.billing.bill_setting\",\"calculation\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":null,\"invoice\":null,\"invoice_rendering_template\":null,\"latest_version\":\"latest_version\",\"live_version\":\"live_version\",\"livemode\":true,\"lookup_key\":null}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.billing.bill_setting\",\"created\":\"1970-01-12T21:42:34.472Z\",\"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 = service @@ -6171,7 +6173,7 @@ public void TestV2BillingBillSettingPost() HttpMethod.Post, "/v2/billing/bill_settings", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.billing.bill_setting\",\"calculation\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":null,\"invoice\":null,\"invoice_rendering_template\":null,\"latest_version\":\"latest_version\",\"live_version\":\"live_version\",\"livemode\":true,\"lookup_key\":null}"); + "{\"id\":\"obj_123\",\"object\":\"v2.billing.bill_setting\",\"created\":\"1970-01-12T21:42:34.472Z\",\"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; @@ -6186,7 +6188,7 @@ public void TestV2BillingBillSettingGet2() HttpMethod.Get, "/v2/billing/bill_settings/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.billing.bill_setting\",\"calculation\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":null,\"invoice\":null,\"invoice_rendering_template\":null,\"latest_version\":\"latest_version\",\"live_version\":\"live_version\",\"livemode\":true,\"lookup_key\":null}"); + "{\"id\":\"obj_123\",\"object\":\"v2.billing.bill_setting\",\"created\":\"1970-01-12T21:42:34.472Z\",\"latest_version\":\"latest_version\",\"live_version\":\"live_version\",\"livemode\":true}"); var client = new StripeClient(this.Requestor); var service = client.V2.Billing.BillSettings; Stripe.V2.Billing.BillSetting billSetting = service.Get("id_123"); @@ -6202,7 +6204,7 @@ public void TestV2BillingBillSettingPost2() HttpMethod.Post, "/v2/billing/bill_settings/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.billing.bill_setting\",\"calculation\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":null,\"invoice\":null,\"invoice_rendering_template\":null,\"latest_version\":\"latest_version\",\"live_version\":\"live_version\",\"livemode\":true,\"lookup_key\":null}"); + "{\"id\":\"obj_123\",\"object\":\"v2.billing.bill_setting\",\"created\":\"1970-01-12T21:42:34.472Z\",\"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; @@ -6221,7 +6223,7 @@ public void TestV2BillingBillSettingsVersionGet() HttpMethod.Get, "/v2/billing/bill_settings/bill_setting_id_123/versions", (HttpStatusCode)200, - "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.billing.bill_setting_version\",\"calculation\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"invoice\":null,\"invoice_rendering_template\":null,\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.billing.bill_setting_version\",\"created\":\"1970-01-12T21:42:34.472Z\",\"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 = service @@ -6238,7 +6240,7 @@ public void TestV2BillingBillSettingsVersionGet2() HttpMethod.Get, "/v2/billing/bill_settings/bill_setting_id_123/versions/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.billing.bill_setting_version\",\"calculation\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"invoice\":null,\"invoice_rendering_template\":null,\"livemode\":true}"); + "{\"id\":\"obj_123\",\"object\":\"v2.billing.bill_setting_version\",\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true}"); var client = new StripeClient(this.Requestor); var service = client.V2.Billing.BillSettings.Versions; Stripe.V2.Billing.BillSettingVersion billSettingVersion = service @@ -6255,7 +6257,7 @@ public void TestV2BillingCadenceGet() HttpMethod.Get, "/v2/billing/cadences", (HttpStatusCode)200, - "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.billing.cadence\",\"billing_cycle\":{\"interval_count\":797691627,\"type\":\"week\",\"day\":null,\"month\":null,\"week\":null,\"year\":null},\"created\":\"1970-01-12T21:42:34.472Z\",\"invoice_discount_rules\":null,\"livemode\":true,\"metadata\":null,\"next_billing_date\":null,\"payer\":{\"billing_profile\":null,\"customer\":null,\"type\":\"customer\"},\"settings\":null,\"status\":\"active\",\"test_clock\":null}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.billing.cadence\",\"billing_cycle\":{\"interval_count\":797691627,\"type\":\"week\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true,\"payer\":{\"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 = service @@ -6270,7 +6272,7 @@ public void TestV2BillingCadencePost() HttpMethod.Post, "/v2/billing/cadences", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.billing.cadence\",\"billing_cycle\":{\"interval_count\":797691627,\"type\":\"week\",\"day\":null,\"month\":null,\"week\":null,\"year\":null},\"created\":\"1970-01-12T21:42:34.472Z\",\"invoice_discount_rules\":null,\"livemode\":true,\"metadata\":null,\"next_billing_date\":null,\"payer\":{\"billing_profile\":null,\"customer\":null,\"type\":\"customer\"},\"settings\":null,\"status\":\"active\",\"test_clock\":null}"); + "{\"id\":\"obj_123\",\"object\":\"v2.billing.cadence\",\"billing_cycle\":{\"interval_count\":797691627,\"type\":\"week\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true,\"payer\":{\"type\":\"customer\"},\"status\":\"active\"}"); var options = new Stripe.V2.Billing.CadenceCreateOptions { BillingCycle = new Stripe.V2.Billing.CadenceCreateBillingCycleOptions @@ -6289,7 +6291,6 @@ public void TestV2BillingCadencePost() Month = new Stripe.V2.Billing.CadenceCreateBillingCycleMonthOptions { DayOfMonth = 1361669285, - MonthOfYear = 82933018, Time = new Stripe.V2.Billing.CadenceCreateBillingCycleMonthTimeOptions { Hour = 3208676, @@ -6339,7 +6340,7 @@ public void TestV2BillingCadenceGet2() HttpMethod.Get, "/v2/billing/cadences/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.billing.cadence\",\"billing_cycle\":{\"interval_count\":797691627,\"type\":\"week\",\"day\":null,\"month\":null,\"week\":null,\"year\":null},\"created\":\"1970-01-12T21:42:34.472Z\",\"invoice_discount_rules\":null,\"livemode\":true,\"metadata\":null,\"next_billing_date\":null,\"payer\":{\"billing_profile\":null,\"customer\":null,\"type\":\"customer\"},\"settings\":null,\"status\":\"active\",\"test_clock\":null}"); + "{\"id\":\"obj_123\",\"object\":\"v2.billing.cadence\",\"billing_cycle\":{\"interval_count\":797691627,\"type\":\"week\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true,\"payer\":{\"type\":\"customer\"},\"status\":\"active\"}"); var client = new StripeClient(this.Requestor); var service = client.V2.Billing.Cadences; Stripe.V2.Billing.Cadence cadence = service.Get("id_123"); @@ -6353,7 +6354,7 @@ public void TestV2BillingCadencePost2() HttpMethod.Post, "/v2/billing/cadences/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.billing.cadence\",\"billing_cycle\":{\"interval_count\":797691627,\"type\":\"week\",\"day\":null,\"month\":null,\"week\":null,\"year\":null},\"created\":\"1970-01-12T21:42:34.472Z\",\"invoice_discount_rules\":null,\"livemode\":true,\"metadata\":null,\"next_billing_date\":null,\"payer\":{\"billing_profile\":null,\"customer\":null,\"type\":\"customer\"},\"settings\":null,\"status\":\"active\",\"test_clock\":null}"); + "{\"id\":\"obj_123\",\"object\":\"v2.billing.cadence\",\"billing_cycle\":{\"interval_count\":797691627,\"type\":\"week\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true,\"payer\":{\"type\":\"customer\"},\"status\":\"active\"}"); var options = new Stripe.V2.Billing.CadenceUpdateOptions(); var client = new StripeClient(this.Requestor); var service = client.V2.Billing.Cadences; @@ -6370,7 +6371,7 @@ public void TestV2BillingCadencePost3() HttpMethod.Post, "/v2/billing/cadences/id_123/cancel", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.billing.cadence\",\"billing_cycle\":{\"interval_count\":797691627,\"type\":\"week\",\"day\":null,\"month\":null,\"week\":null,\"year\":null},\"created\":\"1970-01-12T21:42:34.472Z\",\"invoice_discount_rules\":null,\"livemode\":true,\"metadata\":null,\"next_billing_date\":null,\"payer\":{\"billing_profile\":null,\"customer\":null,\"type\":\"customer\"},\"settings\":null,\"status\":\"active\",\"test_clock\":null}"); + "{\"id\":\"obj_123\",\"object\":\"v2.billing.cadence\",\"billing_cycle\":{\"interval_count\":797691627,\"type\":\"week\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true,\"payer\":{\"type\":\"customer\"},\"status\":\"active\"}"); var client = new StripeClient(this.Requestor); var service = client.V2.Billing.Cadences; Stripe.V2.Billing.Cadence cadence = service.Cancel("id_123"); @@ -6386,7 +6387,7 @@ public void TestV2BillingCollectionSettingGet() HttpMethod.Get, "/v2/billing/collection_settings", (HttpStatusCode)200, - "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.billing.collection_setting\",\"collection_method\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":null,\"email_delivery\":null,\"latest_version\":\"latest_version\",\"live_version\":\"live_version\",\"livemode\":true,\"lookup_key\":null,\"payment_method_configuration\":null,\"payment_method_options\":null}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.billing.collection_setting\",\"created\":\"1970-01-12T21:42:34.472Z\",\"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 @@ -6403,7 +6404,7 @@ public void TestV2BillingCollectionSettingPost() HttpMethod.Post, "/v2/billing/collection_settings", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.billing.collection_setting\",\"collection_method\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":null,\"email_delivery\":null,\"latest_version\":\"latest_version\",\"live_version\":\"live_version\",\"livemode\":true,\"lookup_key\":null,\"payment_method_configuration\":null,\"payment_method_options\":null}"); + "{\"id\":\"obj_123\",\"object\":\"v2.billing.collection_setting\",\"created\":\"1970-01-12T21:42:34.472Z\",\"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; @@ -6421,7 +6422,7 @@ public void TestV2BillingCollectionSettingGet2() HttpMethod.Get, "/v2/billing/collection_settings/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.billing.collection_setting\",\"collection_method\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":null,\"email_delivery\":null,\"latest_version\":\"latest_version\",\"live_version\":\"live_version\",\"livemode\":true,\"lookup_key\":null,\"payment_method_configuration\":null,\"payment_method_options\":null}"); + "{\"id\":\"obj_123\",\"object\":\"v2.billing.collection_setting\",\"created\":\"1970-01-12T21:42:34.472Z\",\"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 = service.Get( @@ -6438,7 +6439,7 @@ public void TestV2BillingCollectionSettingPost2() HttpMethod.Post, "/v2/billing/collection_settings/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.billing.collection_setting\",\"collection_method\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":null,\"email_delivery\":null,\"latest_version\":\"latest_version\",\"live_version\":\"live_version\",\"livemode\":true,\"lookup_key\":null,\"payment_method_configuration\":null,\"payment_method_options\":null}"); + "{\"id\":\"obj_123\",\"object\":\"v2.billing.collection_setting\",\"created\":\"1970-01-12T21:42:34.472Z\",\"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; @@ -6456,7 +6457,7 @@ public void TestV2BillingCollectionSettingsVersionGet() HttpMethod.Get, "/v2/billing/collection_settings/collection_setting_id_123/versions", (HttpStatusCode)200, - "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.billing.collection_setting_version\",\"collection_method\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"email_delivery\":null,\"livemode\":true,\"payment_method_configuration\":null,\"payment_method_options\":null}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.billing.collection_setting_version\",\"created\":\"1970-01-12T21:42:34.472Z\",\"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 = service @@ -6473,7 +6474,7 @@ public void TestV2BillingCollectionSettingsVersionGet2() HttpMethod.Get, "/v2/billing/collection_settings/collection_setting_id_123/versions/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.billing.collection_setting_version\",\"collection_method\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"email_delivery\":null,\"livemode\":true,\"payment_method_configuration\":null,\"payment_method_options\":null}"); + "{\"id\":\"obj_123\",\"object\":\"v2.billing.collection_setting_version\",\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true}"); var client = new StripeClient(this.Requestor); var service = client.V2.Billing.CollectionSettings.Versions; Stripe.V2.Billing.CollectionSettingVersion collectionSettingVersion = service @@ -6490,7 +6491,7 @@ public void TestV2BillingCustomPricingUnitGet() HttpMethod.Get, "/v2/billing/custom_pricing_units", (HttpStatusCode)200, - "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.billing.custom_pricing_unit\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"livemode\":true,\"lookup_key\":null,\"metadata\":null}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.billing.custom_pricing_unit\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"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 @@ -6507,7 +6508,7 @@ public void TestV2BillingCustomPricingUnitPost() HttpMethod.Post, "/v2/billing/custom_pricing_units", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.billing.custom_pricing_unit\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"livemode\":true,\"lookup_key\":null,\"metadata\":null}"); + "{\"id\":\"obj_123\",\"object\":\"v2.billing.custom_pricing_unit\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"livemode\":true}"); var options = new Stripe.V2.Billing.CustomPricingUnitCreateOptions { DisplayName = "display_name", @@ -6528,7 +6529,7 @@ public void TestV2BillingCustomPricingUnitGet2() HttpMethod.Get, "/v2/billing/custom_pricing_units/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.billing.custom_pricing_unit\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"livemode\":true,\"lookup_key\":null,\"metadata\":null}"); + "{\"id\":\"obj_123\",\"object\":\"v2.billing.custom_pricing_unit\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"livemode\":true}"); var client = new StripeClient(this.Requestor); var service = client.V2.Billing.CustomPricingUnits; Stripe.V2.Billing.CustomPricingUnit customPricingUnit = service.Get( @@ -6545,7 +6546,7 @@ public void TestV2BillingCustomPricingUnitPost2() HttpMethod.Post, "/v2/billing/custom_pricing_units/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.billing.custom_pricing_unit\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"livemode\":true,\"lookup_key\":null,\"metadata\":null}"); + "{\"id\":\"obj_123\",\"object\":\"v2.billing.custom_pricing_unit\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"livemode\":true}"); var options = new Stripe.V2.Billing.CustomPricingUnitUpdateOptions(); var client = new StripeClient(this.Requestor); var service = client.V2.Billing.CustomPricingUnits; @@ -6563,7 +6564,7 @@ public void TestV2BillingIntentGet() HttpMethod.Get, "/v2/billing/intents", (HttpStatusCode)200, - "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.billing.intent\",\"amount_details\":{\"currency\":\"usd\",\"discount\":\"discount\",\"shipping\":\"shipping\",\"subtotal\":\"subtotal\",\"tax\":\"tax\",\"total\":\"total\"},\"cadence\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"livemode\":true,\"status\":\"draft\",\"status_transitions\":{\"canceled_at\":null,\"committed_at\":null,\"drafted_at\":null,\"reserved_at\":null}}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"id\":\"obj_123\",\"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\",\"livemode\":true,\"status\":\"draft\",\"status_transitions\":{}}],\"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 @@ -6578,7 +6579,7 @@ public void TestV2BillingIntentPost() HttpMethod.Post, "/v2/billing/intents", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.billing.intent\",\"amount_details\":{\"currency\":\"usd\",\"discount\":\"discount\",\"shipping\":\"shipping\",\"subtotal\":\"subtotal\",\"tax\":\"tax\",\"total\":\"total\"},\"cadence\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"livemode\":true,\"status\":\"draft\",\"status_transitions\":{\"canceled_at\":null,\"committed_at\":null,\"drafted_at\":null,\"reserved_at\":null}}"); + "{\"id\":\"obj_123\",\"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\",\"livemode\":true,\"status\":\"draft\",\"status_transitions\":{}}"); var options = new Stripe.V2.Billing.IntentCreateOptions { Actions = new List @@ -6599,7 +6600,7 @@ public void TestV2BillingIntentPost() { Type = "indefinite", }, - PercentOff = "percent_off", + PercentOff = 991934883.3333334M, }, }, }, @@ -6614,7 +6615,7 @@ public void TestV2BillingIntentPost() Timestamp = DateTimeOffset.Parse( "1970-01-01T15:18:46.294Z") .UtcDateTime, - Type = "on_reserve", + Type = "current_billing_period_start", }, PricingPlanSubscriptionDetails = new Stripe.V2.Billing.IntentCreateActionDeactivatePricingPlanSubscriptionDetailsOptions { @@ -6727,7 +6728,7 @@ public void TestV2BillingIntentGet2() HttpMethod.Get, "/v2/billing/intents/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.billing.intent\",\"amount_details\":{\"currency\":\"usd\",\"discount\":\"discount\",\"shipping\":\"shipping\",\"subtotal\":\"subtotal\",\"tax\":\"tax\",\"total\":\"total\"},\"cadence\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"livemode\":true,\"status\":\"draft\",\"status_transitions\":{\"canceled_at\":null,\"committed_at\":null,\"drafted_at\":null,\"reserved_at\":null}}"); + "{\"id\":\"obj_123\",\"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\",\"livemode\":true,\"status\":\"draft\",\"status_transitions\":{}}"); var client = new StripeClient(this.Requestor); var service = client.V2.Billing.Intents; Stripe.V2.Billing.Intent intent = service.Get("id_123"); @@ -6741,7 +6742,7 @@ public void TestV2BillingIntentPost2() HttpMethod.Post, "/v2/billing/intents/id_123/cancel", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.billing.intent\",\"amount_details\":{\"currency\":\"usd\",\"discount\":\"discount\",\"shipping\":\"shipping\",\"subtotal\":\"subtotal\",\"tax\":\"tax\",\"total\":\"total\"},\"cadence\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"livemode\":true,\"status\":\"draft\",\"status_transitions\":{\"canceled_at\":null,\"committed_at\":null,\"drafted_at\":null,\"reserved_at\":null}}"); + "{\"id\":\"obj_123\",\"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\",\"livemode\":true,\"status\":\"draft\",\"status_transitions\":{}}"); var client = new StripeClient(this.Requestor); var service = client.V2.Billing.Intents; Stripe.V2.Billing.Intent intent = service.Cancel("id_123"); @@ -6757,7 +6758,7 @@ public void TestV2BillingIntentPost3() HttpMethod.Post, "/v2/billing/intents/id_123/commit", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.billing.intent\",\"amount_details\":{\"currency\":\"usd\",\"discount\":\"discount\",\"shipping\":\"shipping\",\"subtotal\":\"subtotal\",\"tax\":\"tax\",\"total\":\"total\"},\"cadence\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"livemode\":true,\"status\":\"draft\",\"status_transitions\":{\"canceled_at\":null,\"committed_at\":null,\"drafted_at\":null,\"reserved_at\":null}}"); + "{\"id\":\"obj_123\",\"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\",\"livemode\":true,\"status\":\"draft\",\"status_transitions\":{}}"); var client = new StripeClient(this.Requestor); var service = client.V2.Billing.Intents; Stripe.V2.Billing.Intent intent = service.Commit("id_123"); @@ -6773,7 +6774,7 @@ public void TestV2BillingIntentPost4() HttpMethod.Post, "/v2/billing/intents/id_123/release_reservation", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.billing.intent\",\"amount_details\":{\"currency\":\"usd\",\"discount\":\"discount\",\"shipping\":\"shipping\",\"subtotal\":\"subtotal\",\"tax\":\"tax\",\"total\":\"total\"},\"cadence\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"livemode\":true,\"status\":\"draft\",\"status_transitions\":{\"canceled_at\":null,\"committed_at\":null,\"drafted_at\":null,\"reserved_at\":null}}"); + "{\"id\":\"obj_123\",\"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\",\"livemode\":true,\"status\":\"draft\",\"status_transitions\":{}}"); var client = new StripeClient(this.Requestor); var service = client.V2.Billing.Intents; Stripe.V2.Billing.Intent intent = service.ReleaseReservation( @@ -6790,7 +6791,7 @@ public void TestV2BillingIntentPost5() HttpMethod.Post, "/v2/billing/intents/id_123/reserve", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.billing.intent\",\"amount_details\":{\"currency\":\"usd\",\"discount\":\"discount\",\"shipping\":\"shipping\",\"subtotal\":\"subtotal\",\"tax\":\"tax\",\"total\":\"total\"},\"cadence\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"livemode\":true,\"status\":\"draft\",\"status_transitions\":{\"canceled_at\":null,\"committed_at\":null,\"drafted_at\":null,\"reserved_at\":null}}"); + "{\"id\":\"obj_123\",\"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\",\"livemode\":true,\"status\":\"draft\",\"status_transitions\":{}}"); var client = new StripeClient(this.Requestor); var service = client.V2.Billing.Intents; Stripe.V2.Billing.Intent intent = service.Reserve("id_123"); @@ -6806,7 +6807,7 @@ public void TestV2BillingIntentsActionGet() HttpMethod.Get, "/v2/billing/intents/intent_id_123/actions", (HttpStatusCode)200, - "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.billing.intent_action\",\"apply\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"deactivate\":null,\"livemode\":true,\"modify\":null,\"remove\":null,\"subscribe\":null,\"type\":\"apply\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.billing.intent_action\",\"created\":\"1970-01-12T21:42:34.472Z\",\"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 @@ -6823,7 +6824,7 @@ public void TestV2BillingIntentsActionGet2() HttpMethod.Get, "/v2/billing/intents/intent_id_123/actions/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.billing.intent_action\",\"apply\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"deactivate\":null,\"livemode\":true,\"modify\":null,\"remove\":null,\"subscribe\":null,\"type\":\"apply\"}"); + "{\"id\":\"obj_123\",\"object\":\"v2.billing.intent_action\",\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true,\"type\":\"apply\"}"); var client = new StripeClient(this.Requestor); var service = client.V2.Billing.Intents.Actions; Stripe.V2.Billing.IntentAction intentAction = service.Get( @@ -6841,7 +6842,7 @@ public void TestV2BillingLicenseFeeGet() HttpMethod.Get, "/v2/billing/license_fees", (HttpStatusCode)200, - "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.billing.license_fee\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"display_name\":\"display_name\",\"latest_version\":\"latest_version\",\"licensed_item\":{\"id\":\"obj_123\",\"object\":\"v2.billing.licensed_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"livemode\":true,\"lookup_key\":null,\"metadata\":null,\"tax_details\":null,\"unit_label\":null},\"live_version\":\"live_version\",\"livemode\":true,\"lookup_key\":null,\"metadata\":null,\"service_interval\":\"month\",\"service_interval_count\":1375336415,\"tax_behavior\":\"exclusive\",\"tiering_mode\":null,\"tiers\":[{\"flat_amount\":null,\"unit_amount\":null,\"up_to_decimal\":null,\"up_to_inf\":null}],\"transform_quantity\":null,\"unit_amount\":null}],\"next_page_url\":null,\"previous_page_url\":null}", + "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.billing.license_fee\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"display_name\":\"display_name\",\"latest_version\":\"latest_version\",\"licensed_item\":{\"id\":\"obj_123\",\"object\":\"v2.billing.licensed_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"livemode\":true},\"live_version\":\"live_version\",\"livemode\":true,\"service_interval\":\"month\",\"service_interval_count\":1375336415,\"tax_behavior\":\"exclusive\",\"tiers\":[{}]}],\"next_page_url\":null,\"previous_page_url\":null}", "lookup_keys=lookup_keys"); var options = new Stripe.V2.Billing.LicenseFeeListOptions { @@ -6864,7 +6865,7 @@ public void TestV2BillingLicenseFeePost() HttpMethod.Post, "/v2/billing/license_fees", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.billing.license_fee\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"display_name\":\"display_name\",\"latest_version\":\"latest_version\",\"licensed_item\":{\"id\":\"obj_123\",\"object\":\"v2.billing.licensed_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"livemode\":true,\"lookup_key\":null,\"metadata\":null,\"tax_details\":null,\"unit_label\":null},\"live_version\":\"live_version\",\"livemode\":true,\"lookup_key\":null,\"metadata\":null,\"service_interval\":\"month\",\"service_interval_count\":1375336415,\"tax_behavior\":\"exclusive\",\"tiering_mode\":null,\"tiers\":[{\"flat_amount\":null,\"unit_amount\":null,\"up_to_decimal\":null,\"up_to_inf\":null}],\"transform_quantity\":null,\"unit_amount\":null}"); + "{\"id\":\"obj_123\",\"object\":\"v2.billing.license_fee\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"display_name\":\"display_name\",\"latest_version\":\"latest_version\",\"licensed_item\":{\"id\":\"obj_123\",\"object\":\"v2.billing.licensed_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"livemode\":true},\"live_version\":\"live_version\",\"livemode\":true,\"service_interval\":\"month\",\"service_interval_count\":1375336415,\"tax_behavior\":\"exclusive\",\"tiers\":[{}]}"); var options = new Stripe.V2.Billing.LicenseFeeCreateOptions { Currency = "usd", @@ -6887,7 +6888,7 @@ public void TestV2BillingLicenseFeeGet2() HttpMethod.Get, "/v2/billing/license_fees/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.billing.license_fee\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"display_name\":\"display_name\",\"latest_version\":\"latest_version\",\"licensed_item\":{\"id\":\"obj_123\",\"object\":\"v2.billing.licensed_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"livemode\":true,\"lookup_key\":null,\"metadata\":null,\"tax_details\":null,\"unit_label\":null},\"live_version\":\"live_version\",\"livemode\":true,\"lookup_key\":null,\"metadata\":null,\"service_interval\":\"month\",\"service_interval_count\":1375336415,\"tax_behavior\":\"exclusive\",\"tiering_mode\":null,\"tiers\":[{\"flat_amount\":null,\"unit_amount\":null,\"up_to_decimal\":null,\"up_to_inf\":null}],\"transform_quantity\":null,\"unit_amount\":null}"); + "{\"id\":\"obj_123\",\"object\":\"v2.billing.license_fee\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"display_name\":\"display_name\",\"latest_version\":\"latest_version\",\"licensed_item\":{\"id\":\"obj_123\",\"object\":\"v2.billing.licensed_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"livemode\":true},\"live_version\":\"live_version\",\"livemode\":true,\"service_interval\":\"month\",\"service_interval_count\":1375336415,\"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"); @@ -6903,8 +6904,11 @@ public void TestV2BillingLicenseFeePost2() HttpMethod.Post, "/v2/billing/license_fees/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.billing.license_fee\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"display_name\":\"display_name\",\"latest_version\":\"latest_version\",\"licensed_item\":{\"id\":\"obj_123\",\"object\":\"v2.billing.licensed_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"livemode\":true,\"lookup_key\":null,\"metadata\":null,\"tax_details\":null,\"unit_label\":null},\"live_version\":\"live_version\",\"livemode\":true,\"lookup_key\":null,\"metadata\":null,\"service_interval\":\"month\",\"service_interval_count\":1375336415,\"tax_behavior\":\"exclusive\",\"tiering_mode\":null,\"tiers\":[{\"flat_amount\":null,\"unit_amount\":null,\"up_to_decimal\":null,\"up_to_inf\":null}],\"transform_quantity\":null,\"unit_amount\":null}"); - var options = new Stripe.V2.Billing.LicenseFeeUpdateOptions(); + "{\"id\":\"obj_123\",\"object\":\"v2.billing.license_fee\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"display_name\":\"display_name\",\"latest_version\":\"latest_version\",\"licensed_item\":{\"id\":\"obj_123\",\"object\":\"v2.billing.licensed_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"livemode\":true},\"live_version\":\"live_version\",\"livemode\":true,\"service_interval\":\"month\",\"service_interval_count\":1375336415,\"tax_behavior\":\"exclusive\",\"tiers\":[{}]}"); + var options = new Stripe.V2.Billing.LicenseFeeUpdateOptions + { + DisplayName = "display_name", + }; var client = new StripeClient(this.Requestor); var service = client.V2.Billing.LicenseFees; Stripe.V2.Billing.LicenseFee licenseFee = service.Update( @@ -6922,7 +6926,7 @@ public void TestV2BillingLicenseFeesVersionGet() HttpMethod.Get, "/v2/billing/license_fees/license_fee_id_123/versions", (HttpStatusCode)200, - "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.billing.license_fee_version\",\"created\":\"1970-01-12T21:42:34.472Z\",\"license_fee_id\":\"license_fee_id\",\"livemode\":true,\"tiering_mode\":null,\"tiers\":[{\"flat_amount\":null,\"unit_amount\":null,\"up_to_decimal\":null,\"up_to_inf\":null}],\"transform_quantity\":null,\"unit_amount\":null}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.billing.license_fee_version\",\"created\":\"1970-01-12T21:42:34.472Z\",\"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 @@ -6939,7 +6943,7 @@ public void TestV2BillingLicenseFeesVersionGet2() HttpMethod.Get, "/v2/billing/license_fees/license_fee_id_123/versions/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.billing.license_fee_version\",\"created\":\"1970-01-12T21:42:34.472Z\",\"license_fee_id\":\"license_fee_id\",\"livemode\":true,\"tiering_mode\":null,\"tiers\":[{\"flat_amount\":null,\"unit_amount\":null,\"up_to_decimal\":null,\"up_to_inf\":null}],\"transform_quantity\":null,\"unit_amount\":null}"); + "{\"id\":\"obj_123\",\"object\":\"v2.billing.license_fee_version\",\"created\":\"1970-01-12T21:42:34.472Z\",\"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( @@ -6957,7 +6961,7 @@ public void TestV2BillingLicenseFeeSubscriptionGet() HttpMethod.Get, "/v2/billing/license_fee_subscriptions/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.billing.license_fee_subscription\",\"billing_cadence\":\"billing_cadence\",\"created\":\"1970-01-12T21:42:34.472Z\",\"license_fee\":\"license_fee\",\"license_fee_version\":\"license_fee_version\",\"livemode\":true,\"metadata\":null,\"quantity\":1285004149,\"test_clock\":null}"); + "{\"id\":\"obj_123\",\"object\":\"v2.billing.license_fee_subscription\",\"billing_cadence\":\"billing_cadence\",\"created\":\"1970-01-12T21:42:34.472Z\",\"license_fee\":\"license_fee\",\"license_fee_version\":\"license_fee_version\",\"livemode\":true,\"quantity\":1285004149}"); var client = new StripeClient(this.Requestor); var service = client.V2.Billing.LicenseFeeSubscriptions; Stripe.V2.Billing.LicenseFeeSubscription licenseFeeSubscription = service @@ -6974,7 +6978,7 @@ public void TestV2BillingLicensedItemGet() HttpMethod.Get, "/v2/billing/licensed_items", (HttpStatusCode)200, - "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.billing.licensed_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"livemode\":true,\"lookup_key\":null,\"metadata\":null,\"tax_details\":null,\"unit_label\":null}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.billing.licensed_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"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 @@ -6989,7 +6993,7 @@ public void TestV2BillingLicensedItemPost() HttpMethod.Post, "/v2/billing/licensed_items", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.billing.licensed_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"livemode\":true,\"lookup_key\":null,\"metadata\":null,\"tax_details\":null,\"unit_label\":null}"); + "{\"id\":\"obj_123\",\"object\":\"v2.billing.licensed_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"livemode\":true}"); var options = new Stripe.V2.Billing.LicensedItemCreateOptions { DisplayName = "display_name", @@ -7008,7 +7012,7 @@ public void TestV2BillingLicensedItemGet2() HttpMethod.Get, "/v2/billing/licensed_items/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.billing.licensed_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"livemode\":true,\"lookup_key\":null,\"metadata\":null,\"tax_details\":null,\"unit_label\":null}"); + "{\"id\":\"obj_123\",\"object\":\"v2.billing.licensed_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"livemode\":true}"); var client = new StripeClient(this.Requestor); var service = client.V2.Billing.LicensedItems; Stripe.V2.Billing.LicensedItem licensedItem = service.Get("id_123"); @@ -7024,7 +7028,7 @@ public void TestV2BillingLicensedItemPost2() HttpMethod.Post, "/v2/billing/licensed_items/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.billing.licensed_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"livemode\":true,\"lookup_key\":null,\"metadata\":null,\"tax_details\":null,\"unit_label\":null}"); + "{\"id\":\"obj_123\",\"object\":\"v2.billing.licensed_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"livemode\":true}"); var options = new Stripe.V2.Billing.LicensedItemUpdateOptions(); var client = new StripeClient(this.Requestor); var service = client.V2.Billing.LicensedItems; @@ -7143,7 +7147,7 @@ public void TestV2BillingMeteredItemGet() HttpMethod.Get, "/v2/billing/metered_items", (HttpStatusCode)200, - "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.billing.metered_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"invoice_presentation_dimensions\":[\"invoice_presentation_dimensions\"],\"livemode\":true,\"lookup_key\":null,\"metadata\":null,\"meter\":\"meter\",\"meter_segment_conditions\":[{\"dimension\":\"dimension\",\"value\":\"value\"}],\"tax_details\":null,\"unit_label\":null}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.billing.metered_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"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 @@ -7158,7 +7162,7 @@ public void TestV2BillingMeteredItemPost() HttpMethod.Post, "/v2/billing/metered_items", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.billing.metered_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"invoice_presentation_dimensions\":[\"invoice_presentation_dimensions\"],\"livemode\":true,\"lookup_key\":null,\"metadata\":null,\"meter\":\"meter\",\"meter_segment_conditions\":[{\"dimension\":\"dimension\",\"value\":\"value\"}],\"tax_details\":null,\"unit_label\":null}"); + "{\"id\":\"obj_123\",\"object\":\"v2.billing.metered_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"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", @@ -7177,7 +7181,7 @@ public void TestV2BillingMeteredItemGet2() HttpMethod.Get, "/v2/billing/metered_items/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.billing.metered_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"invoice_presentation_dimensions\":[\"invoice_presentation_dimensions\"],\"livemode\":true,\"lookup_key\":null,\"metadata\":null,\"meter\":\"meter\",\"meter_segment_conditions\":[{\"dimension\":\"dimension\",\"value\":\"value\"}],\"tax_details\":null,\"unit_label\":null}"); + "{\"id\":\"obj_123\",\"object\":\"v2.billing.metered_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"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"); @@ -7193,7 +7197,7 @@ public void TestV2BillingMeteredItemPost2() HttpMethod.Post, "/v2/billing/metered_items/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.billing.metered_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"invoice_presentation_dimensions\":[\"invoice_presentation_dimensions\"],\"livemode\":true,\"lookup_key\":null,\"metadata\":null,\"meter\":\"meter\",\"meter_segment_conditions\":[{\"dimension\":\"dimension\",\"value\":\"value\"}],\"tax_details\":null,\"unit_label\":null}"); + "{\"id\":\"obj_123\",\"object\":\"v2.billing.metered_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"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; @@ -7212,7 +7216,7 @@ public void TestV2BillingPricingPlanGet() HttpMethod.Get, "/v2/billing/pricing_plans", (HttpStatusCode)200, - "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.billing.pricing_plan\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"description\":null,\"display_name\":\"display_name\",\"latest_version\":\"latest_version\",\"live_version\":null,\"livemode\":true,\"lookup_key\":null,\"metadata\":null,\"tax_behavior\":\"exclusive\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.billing.pricing_plan\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"display_name\":\"display_name\",\"latest_version\":\"latest_version\",\"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 @@ -7227,7 +7231,7 @@ public void TestV2BillingPricingPlanPost() HttpMethod.Post, "/v2/billing/pricing_plans", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.billing.pricing_plan\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"description\":null,\"display_name\":\"display_name\",\"latest_version\":\"latest_version\",\"live_version\":null,\"livemode\":true,\"lookup_key\":null,\"metadata\":null,\"tax_behavior\":\"exclusive\"}"); + "{\"id\":\"obj_123\",\"object\":\"v2.billing.pricing_plan\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"display_name\":\"display_name\",\"latest_version\":\"latest_version\",\"livemode\":true,\"tax_behavior\":\"exclusive\"}"); var options = new Stripe.V2.Billing.PricingPlanCreateOptions { Currency = "usd", @@ -7247,7 +7251,7 @@ public void TestV2BillingPricingPlanGet2() HttpMethod.Get, "/v2/billing/pricing_plans/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.billing.pricing_plan\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"description\":null,\"display_name\":\"display_name\",\"latest_version\":\"latest_version\",\"live_version\":null,\"livemode\":true,\"lookup_key\":null,\"metadata\":null,\"tax_behavior\":\"exclusive\"}"); + "{\"id\":\"obj_123\",\"object\":\"v2.billing.pricing_plan\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"display_name\":\"display_name\",\"latest_version\":\"latest_version\",\"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"); @@ -7263,7 +7267,7 @@ public void TestV2BillingPricingPlanPost2() HttpMethod.Post, "/v2/billing/pricing_plans/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.billing.pricing_plan\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"description\":null,\"display_name\":\"display_name\",\"latest_version\":\"latest_version\",\"live_version\":null,\"livemode\":true,\"lookup_key\":null,\"metadata\":null,\"tax_behavior\":\"exclusive\"}"); + "{\"id\":\"obj_123\",\"object\":\"v2.billing.pricing_plan\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"display_name\":\"display_name\",\"latest_version\":\"latest_version\",\"livemode\":true,\"tax_behavior\":\"exclusive\"}"); var options = new Stripe.V2.Billing.PricingPlanUpdateOptions(); var client = new StripeClient(this.Requestor); var service = client.V2.Billing.PricingPlans; @@ -7282,7 +7286,7 @@ public void TestV2BillingPricingPlansComponentGet() HttpMethod.Get, "/v2/billing/pricing_plans/pricing_plan_id_123/components", (HttpStatusCode)200, - "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.billing.pricing_plan_component\",\"created\":\"1970-01-12T21:42:34.472Z\",\"license_fee\":null,\"livemode\":true,\"lookup_key\":null,\"metadata\":null,\"pricing_plan\":\"pricing_plan\",\"pricing_plan_version\":\"pricing_plan_version\",\"rate_card\":null,\"service_action\":null,\"type\":\"license_fee\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.billing.pricing_plan_component\",\"created\":\"1970-01-12T21:42:34.472Z\",\"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 @@ -7299,7 +7303,7 @@ public void TestV2BillingPricingPlansComponentPost() HttpMethod.Post, "/v2/billing/pricing_plans/pricing_plan_id_123/components", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.billing.pricing_plan_component\",\"created\":\"1970-01-12T21:42:34.472Z\",\"license_fee\":null,\"livemode\":true,\"lookup_key\":null,\"metadata\":null,\"pricing_plan\":\"pricing_plan\",\"pricing_plan_version\":\"pricing_plan_version\",\"rate_card\":null,\"service_action\":null,\"type\":\"license_fee\"}"); + "{\"id\":\"obj_123\",\"object\":\"v2.billing.pricing_plan_component\",\"created\":\"1970-01-12T21:42:34.472Z\",\"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", @@ -7320,10 +7324,10 @@ public void TestV2BillingPricingPlansComponentDelete() HttpMethod.Delete, "/v2/billing/pricing_plans/pricing_plan_id_123/components/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.billing.pricing_plan_component\",\"created\":\"1970-01-12T21:42:34.472Z\",\"license_fee\":null,\"livemode\":true,\"lookup_key\":null,\"metadata\":null,\"pricing_plan\":\"pricing_plan\",\"pricing_plan_version\":\"pricing_plan_version\",\"rate_card\":null,\"service_action\":null,\"type\":\"license_fee\"}"); + "{\"id\":\"abc_123\",\"object\":\"some.object.tag\"}"); var client = new StripeClient(this.Requestor); var service = client.V2.Billing.PricingPlans.Components; - Stripe.V2.Billing.PricingPlanComponent deleted = service.Delete( + Stripe.V2.DeletedObject deleted = service.Delete( "pricing_plan_id_123", "id_123"); this.AssertRequest( @@ -7338,7 +7342,7 @@ public void TestV2BillingPricingPlansComponentGet2() HttpMethod.Get, "/v2/billing/pricing_plans/pricing_plan_id_123/components/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.billing.pricing_plan_component\",\"created\":\"1970-01-12T21:42:34.472Z\",\"license_fee\":null,\"livemode\":true,\"lookup_key\":null,\"metadata\":null,\"pricing_plan\":\"pricing_plan\",\"pricing_plan_version\":\"pricing_plan_version\",\"rate_card\":null,\"service_action\":null,\"type\":\"license_fee\"}"); + "{\"id\":\"obj_123\",\"object\":\"v2.billing.pricing_plan_component\",\"created\":\"1970-01-12T21:42:34.472Z\",\"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 @@ -7355,7 +7359,7 @@ public void TestV2BillingPricingPlansComponentPost2() HttpMethod.Post, "/v2/billing/pricing_plans/pricing_plan_id_123/components/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.billing.pricing_plan_component\",\"created\":\"1970-01-12T21:42:34.472Z\",\"license_fee\":null,\"livemode\":true,\"lookup_key\":null,\"metadata\":null,\"pricing_plan\":\"pricing_plan\",\"pricing_plan_version\":\"pricing_plan_version\",\"rate_card\":null,\"service_action\":null,\"type\":\"license_fee\"}"); + "{\"id\":\"obj_123\",\"object\":\"v2.billing.pricing_plan_component\",\"created\":\"1970-01-12T21:42:34.472Z\",\"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; @@ -7373,7 +7377,7 @@ public void TestV2BillingPricingPlansVersionGet() HttpMethod.Get, "/v2/billing/pricing_plans/pricing_plan_id_123/versions", (HttpStatusCode)200, - "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.billing.pricing_plan_version\",\"created\":\"1970-01-12T21:42:34.472Z\",\"end_date\":null,\"livemode\":true,\"pricing_plan\":\"pricing_plan\",\"start_date\":\"1970-01-19T05:07:09.589Z\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.billing.pricing_plan_version\",\"created\":\"1970-01-12T21:42:34.472Z\",\"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 @@ -7390,7 +7394,7 @@ public void TestV2BillingPricingPlansVersionGet2() HttpMethod.Get, "/v2/billing/pricing_plans/pricing_plan_id_123/versions/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.billing.pricing_plan_version\",\"created\":\"1970-01-12T21:42:34.472Z\",\"end_date\":null,\"livemode\":true,\"pricing_plan\":\"pricing_plan\",\"start_date\":\"1970-01-19T05:07:09.589Z\"}"); + "{\"id\":\"obj_123\",\"object\":\"v2.billing.pricing_plan_version\",\"created\":\"1970-01-12T21:42:34.472Z\",\"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 @@ -7407,7 +7411,7 @@ public void TestV2BillingPricingPlanSubscriptionGet() HttpMethod.Get, "/v2/billing/pricing_plan_subscriptions", (HttpStatusCode)200, - "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.billing.pricing_plan_subscription\",\"billing_cadence\":\"billing_cadence\",\"collection_status\":\"past_due\",\"collection_status_transitions\":{\"awaiting_customer_action_at\":null,\"current_at\":null,\"past_due_at\":null,\"paused_at\":null,\"unpaid_at\":null},\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true,\"metadata\":null,\"pricing_plan\":\"pricing_plan\",\"pricing_plan_version\":\"pricing_plan_version\",\"servicing_status\":\"pending\",\"servicing_status_transitions\":{\"activated_at\":null,\"canceled_at\":null,\"paused_at\":null,\"will_activate_at\":null,\"will_cancel_at\":null},\"test_clock\":null}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.billing.pricing_plan_subscription\",\"billing_cadence\":\"billing_cadence\",\"collection_status\":\"past_due\",\"collection_status_transitions\":{},\"created\":\"1970-01-12T21:42:34.472Z\",\"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 @@ -7424,7 +7428,7 @@ public void TestV2BillingPricingPlanSubscriptionGet2() HttpMethod.Get, "/v2/billing/pricing_plan_subscriptions/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.billing.pricing_plan_subscription\",\"billing_cadence\":\"billing_cadence\",\"collection_status\":\"past_due\",\"collection_status_transitions\":{\"awaiting_customer_action_at\":null,\"current_at\":null,\"past_due_at\":null,\"paused_at\":null,\"unpaid_at\":null},\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true,\"metadata\":null,\"pricing_plan\":\"pricing_plan\",\"pricing_plan_version\":\"pricing_plan_version\",\"servicing_status\":\"pending\",\"servicing_status_transitions\":{\"activated_at\":null,\"canceled_at\":null,\"paused_at\":null,\"will_activate_at\":null,\"will_cancel_at\":null},\"test_clock\":null}"); + "{\"id\":\"obj_123\",\"object\":\"v2.billing.pricing_plan_subscription\",\"billing_cadence\":\"billing_cadence\",\"collection_status\":\"past_due\",\"collection_status_transitions\":{},\"created\":\"1970-01-12T21:42:34.472Z\",\"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 @@ -7441,7 +7445,7 @@ public void TestV2BillingProfileGet() HttpMethod.Get, "/v2/billing/profiles", (HttpStatusCode)200, - "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.billing.profile\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":null,\"default_payment_method\":null,\"display_name\":null,\"livemode\":true,\"lookup_key\":null,\"metadata\":null,\"status\":\"active\"}],\"next_page_url\":null,\"previous_page_url\":null}", + "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.billing.profile\",\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true,\"status\":\"active\"}],\"next_page_url\":null,\"previous_page_url\":null}", "lookup_keys=lookup_keys"); var options = new Stripe.V2.Billing.ProfileListOptions { @@ -7464,7 +7468,7 @@ public void TestV2BillingProfilePost() HttpMethod.Post, "/v2/billing/profiles", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.billing.profile\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":null,\"default_payment_method\":null,\"display_name\":null,\"livemode\":true,\"lookup_key\":null,\"metadata\":null,\"status\":\"active\"}"); + "{\"id\":\"obj_123\",\"object\":\"v2.billing.profile\",\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true,\"status\":\"active\"}"); var options = new Stripe.V2.Billing.ProfileCreateOptions { Customer = "customer", @@ -7482,7 +7486,7 @@ public void TestV2BillingProfileGet2() HttpMethod.Get, "/v2/billing/profiles/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.billing.profile\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":null,\"default_payment_method\":null,\"display_name\":null,\"livemode\":true,\"lookup_key\":null,\"metadata\":null,\"status\":\"active\"}"); + "{\"id\":\"obj_123\",\"object\":\"v2.billing.profile\",\"created\":\"1970-01-12T21:42:34.472Z\",\"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"); @@ -7496,7 +7500,7 @@ public void TestV2BillingProfilePost2() HttpMethod.Post, "/v2/billing/profiles/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.billing.profile\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":null,\"default_payment_method\":null,\"display_name\":null,\"livemode\":true,\"lookup_key\":null,\"metadata\":null,\"status\":\"active\"}"); + "{\"id\":\"obj_123\",\"object\":\"v2.billing.profile\",\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true,\"status\":\"active\"}"); var options = new Stripe.V2.Billing.ProfileUpdateOptions(); var client = new StripeClient(this.Requestor); var service = client.V2.Billing.Profiles; @@ -7513,7 +7517,7 @@ public void TestV2BillingRateCardGet() HttpMethod.Get, "/v2/billing/rate_cards", (HttpStatusCode)200, - "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.billing.rate_card\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"display_name\":\"display_name\",\"latest_version\":\"latest_version\",\"live_version\":\"live_version\",\"livemode\":true,\"lookup_key\":null,\"metadata\":null,\"service_interval\":\"month\",\"service_interval_count\":1375336415,\"tax_behavior\":\"exclusive\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.billing.rate_card\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"display_name\":\"display_name\",\"latest_version\":\"latest_version\",\"live_version\":\"live_version\",\"livemode\":true,\"service_interval\":\"month\",\"service_interval_count\":1375336415,\"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 @@ -7528,7 +7532,7 @@ public void TestV2BillingRateCardPost() HttpMethod.Post, "/v2/billing/rate_cards", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.billing.rate_card\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"display_name\":\"display_name\",\"latest_version\":\"latest_version\",\"live_version\":\"live_version\",\"livemode\":true,\"lookup_key\":null,\"metadata\":null,\"service_interval\":\"month\",\"service_interval_count\":1375336415,\"tax_behavior\":\"exclusive\"}"); + "{\"id\":\"obj_123\",\"object\":\"v2.billing.rate_card\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"display_name\":\"display_name\",\"latest_version\":\"latest_version\",\"live_version\":\"live_version\",\"livemode\":true,\"service_interval\":\"month\",\"service_interval_count\":1375336415,\"tax_behavior\":\"exclusive\"}"); var options = new Stripe.V2.Billing.RateCardCreateOptions { Currency = "usd", @@ -7550,7 +7554,7 @@ public void TestV2BillingRateCardGet2() HttpMethod.Get, "/v2/billing/rate_cards/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.billing.rate_card\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"display_name\":\"display_name\",\"latest_version\":\"latest_version\",\"live_version\":\"live_version\",\"livemode\":true,\"lookup_key\":null,\"metadata\":null,\"service_interval\":\"month\",\"service_interval_count\":1375336415,\"tax_behavior\":\"exclusive\"}"); + "{\"id\":\"obj_123\",\"object\":\"v2.billing.rate_card\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"display_name\":\"display_name\",\"latest_version\":\"latest_version\",\"live_version\":\"live_version\",\"livemode\":true,\"service_interval\":\"month\",\"service_interval_count\":1375336415,\"tax_behavior\":\"exclusive\"}"); var client = new StripeClient(this.Requestor); var service = client.V2.Billing.RateCards; Stripe.V2.Billing.RateCard rateCard = service.Get("id_123"); @@ -7564,7 +7568,7 @@ public void TestV2BillingRateCardPost2() HttpMethod.Post, "/v2/billing/rate_cards/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.billing.rate_card\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"display_name\":\"display_name\",\"latest_version\":\"latest_version\",\"live_version\":\"live_version\",\"livemode\":true,\"lookup_key\":null,\"metadata\":null,\"service_interval\":\"month\",\"service_interval_count\":1375336415,\"tax_behavior\":\"exclusive\"}"); + "{\"id\":\"obj_123\",\"object\":\"v2.billing.rate_card\",\"active\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"display_name\":\"display_name\",\"latest_version\":\"latest_version\",\"live_version\":\"live_version\",\"livemode\":true,\"service_interval\":\"month\",\"service_interval_count\":1375336415,\"tax_behavior\":\"exclusive\"}"); var options = new Stripe.V2.Billing.RateCardUpdateOptions(); var client = new StripeClient(this.Requestor); var service = client.V2.Billing.RateCards; @@ -7583,7 +7587,7 @@ public void TestV2BillingRateCardsRateGet() HttpMethod.Get, "/v2/billing/rate_cards/rate_card_id_123/rates", (HttpStatusCode)200, - "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.billing.rate_card_rate\",\"created\":\"1970-01-12T21:42:34.472Z\",\"custom_pricing_unit_amount\":null,\"livemode\":true,\"metadata\":null,\"metered_item\":{\"id\":\"obj_123\",\"object\":\"v2.billing.metered_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"invoice_presentation_dimensions\":[\"invoice_presentation_dimensions\"],\"livemode\":true,\"lookup_key\":null,\"metadata\":null,\"meter\":\"meter\",\"meter_segment_conditions\":[{\"dimension\":\"dimension\",\"value\":\"value\"}],\"tax_details\":null,\"unit_label\":null},\"rate_card\":\"rate_card\",\"rate_card_version\":\"rate_card_version\",\"tiering_mode\":null,\"tiers\":[{\"flat_amount\":null,\"unit_amount\":null,\"up_to_decimal\":null,\"up_to_inf\":null}],\"transform_quantity\":null,\"unit_amount\":null}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.billing.rate_card_rate\",\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true,\"metered_item\":{\"id\":\"obj_123\",\"object\":\"v2.billing.metered_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"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 @@ -7600,7 +7604,7 @@ public void TestV2BillingRateCardsRatePost() HttpMethod.Post, "/v2/billing/rate_cards/rate_card_id_123/rates", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.billing.rate_card_rate\",\"created\":\"1970-01-12T21:42:34.472Z\",\"custom_pricing_unit_amount\":null,\"livemode\":true,\"metadata\":null,\"metered_item\":{\"id\":\"obj_123\",\"object\":\"v2.billing.metered_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"invoice_presentation_dimensions\":[\"invoice_presentation_dimensions\"],\"livemode\":true,\"lookup_key\":null,\"metadata\":null,\"meter\":\"meter\",\"meter_segment_conditions\":[{\"dimension\":\"dimension\",\"value\":\"value\"}],\"tax_details\":null,\"unit_label\":null},\"rate_card\":\"rate_card\",\"rate_card_version\":\"rate_card_version\",\"tiering_mode\":null,\"tiers\":[{\"flat_amount\":null,\"unit_amount\":null,\"up_to_decimal\":null,\"up_to_inf\":null}],\"transform_quantity\":null,\"unit_amount\":null}"); + "{\"id\":\"obj_123\",\"object\":\"v2.billing.rate_card_rate\",\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true,\"metered_item\":{\"id\":\"obj_123\",\"object\":\"v2.billing.metered_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"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(); var client = new StripeClient(this.Requestor); var service = client.V2.Billing.RateCards.Rates; @@ -7619,10 +7623,10 @@ public void TestV2BillingRateCardsRateDelete() HttpMethod.Delete, "/v2/billing/rate_cards/rate_card_id_123/rates/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.billing.rate_card_rate\",\"created\":\"1970-01-12T21:42:34.472Z\",\"custom_pricing_unit_amount\":null,\"livemode\":true,\"metadata\":null,\"metered_item\":{\"id\":\"obj_123\",\"object\":\"v2.billing.metered_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"invoice_presentation_dimensions\":[\"invoice_presentation_dimensions\"],\"livemode\":true,\"lookup_key\":null,\"metadata\":null,\"meter\":\"meter\",\"meter_segment_conditions\":[{\"dimension\":\"dimension\",\"value\":\"value\"}],\"tax_details\":null,\"unit_label\":null},\"rate_card\":\"rate_card\",\"rate_card_version\":\"rate_card_version\",\"tiering_mode\":null,\"tiers\":[{\"flat_amount\":null,\"unit_amount\":null,\"up_to_decimal\":null,\"up_to_inf\":null}],\"transform_quantity\":null,\"unit_amount\":null}"); + "{\"id\":\"abc_123\",\"object\":\"some.object.tag\"}"); var client = new StripeClient(this.Requestor); var service = client.V2.Billing.RateCards.Rates; - Stripe.V2.Billing.RateCardRate deleted = service.Delete( + Stripe.V2.DeletedObject deleted = service.Delete( "rate_card_id_123", "id_123"); this.AssertRequest( @@ -7637,7 +7641,7 @@ public void TestV2BillingRateCardsRateGet2() HttpMethod.Get, "/v2/billing/rate_cards/rate_card_id_123/rates/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.billing.rate_card_rate\",\"created\":\"1970-01-12T21:42:34.472Z\",\"custom_pricing_unit_amount\":null,\"livemode\":true,\"metadata\":null,\"metered_item\":{\"id\":\"obj_123\",\"object\":\"v2.billing.metered_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"invoice_presentation_dimensions\":[\"invoice_presentation_dimensions\"],\"livemode\":true,\"lookup_key\":null,\"metadata\":null,\"meter\":\"meter\",\"meter_segment_conditions\":[{\"dimension\":\"dimension\",\"value\":\"value\"}],\"tax_details\":null,\"unit_label\":null},\"rate_card\":\"rate_card\",\"rate_card_version\":\"rate_card_version\",\"tiering_mode\":null,\"tiers\":[{\"flat_amount\":null,\"unit_amount\":null,\"up_to_decimal\":null,\"up_to_inf\":null}],\"transform_quantity\":null,\"unit_amount\":null}"); + "{\"id\":\"obj_123\",\"object\":\"v2.billing.rate_card_rate\",\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true,\"metered_item\":{\"id\":\"obj_123\",\"object\":\"v2.billing.metered_item\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":\"display_name\",\"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( @@ -7690,7 +7694,7 @@ public void TestV2BillingRateCardSubscriptionGet() HttpMethod.Get, "/v2/billing/rate_card_subscriptions", (HttpStatusCode)200, - "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.billing.rate_card_subscription\",\"billing_cadence\":\"billing_cadence\",\"collection_status\":null,\"collection_status_transitions\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true,\"metadata\":null,\"rate_card\":\"rate_card\",\"rate_card_version\":\"rate_card_version\",\"servicing_status\":null,\"servicing_status_transitions\":null,\"test_clock\":null}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.billing.rate_card_subscription\",\"billing_cadence\":\"billing_cadence\",\"created\":\"1970-01-12T21:42:34.472Z\",\"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 @@ -7707,7 +7711,7 @@ public void TestV2BillingRateCardSubscriptionPost() HttpMethod.Post, "/v2/billing/rate_card_subscriptions", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.billing.rate_card_subscription\",\"billing_cadence\":\"billing_cadence\",\"collection_status\":null,\"collection_status_transitions\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true,\"metadata\":null,\"rate_card\":\"rate_card\",\"rate_card_version\":\"rate_card_version\",\"servicing_status\":null,\"servicing_status_transitions\":null,\"test_clock\":null}"); + "{\"id\":\"obj_123\",\"object\":\"v2.billing.rate_card_subscription\",\"billing_cadence\":\"billing_cadence\",\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true,\"rate_card\":\"rate_card\",\"rate_card_version\":\"rate_card_version\"}"); var options = new Stripe.V2.Billing.RateCardSubscriptionCreateOptions { BillingCadence = "billing_cadence", @@ -7729,7 +7733,7 @@ public void TestV2BillingRateCardSubscriptionGet2() HttpMethod.Get, "/v2/billing/rate_card_subscriptions/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.billing.rate_card_subscription\",\"billing_cadence\":\"billing_cadence\",\"collection_status\":null,\"collection_status_transitions\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true,\"metadata\":null,\"rate_card\":\"rate_card\",\"rate_card_version\":\"rate_card_version\",\"servicing_status\":null,\"servicing_status_transitions\":null,\"test_clock\":null}"); + "{\"id\":\"obj_123\",\"object\":\"v2.billing.rate_card_subscription\",\"billing_cadence\":\"billing_cadence\",\"created\":\"1970-01-12T21:42:34.472Z\",\"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 @@ -7746,7 +7750,7 @@ public void TestV2BillingRateCardSubscriptionPost2() HttpMethod.Post, "/v2/billing/rate_card_subscriptions/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.billing.rate_card_subscription\",\"billing_cadence\":\"billing_cadence\",\"collection_status\":null,\"collection_status_transitions\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true,\"metadata\":null,\"rate_card\":\"rate_card\",\"rate_card_version\":\"rate_card_version\",\"servicing_status\":null,\"servicing_status_transitions\":null,\"test_clock\":null}"); + "{\"id\":\"obj_123\",\"object\":\"v2.billing.rate_card_subscription\",\"billing_cadence\":\"billing_cadence\",\"created\":\"1970-01-12T21:42:34.472Z\",\"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; @@ -7764,7 +7768,7 @@ public void TestV2BillingRateCardSubscriptionPost3() HttpMethod.Post, "/v2/billing/rate_card_subscriptions/id_123/cancel", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.billing.rate_card_subscription\",\"billing_cadence\":\"billing_cadence\",\"collection_status\":null,\"collection_status_transitions\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true,\"metadata\":null,\"rate_card\":\"rate_card\",\"rate_card_version\":\"rate_card_version\",\"servicing_status\":null,\"servicing_status_transitions\":null,\"test_clock\":null}"); + "{\"id\":\"obj_123\",\"object\":\"v2.billing.rate_card_subscription\",\"billing_cadence\":\"billing_cadence\",\"created\":\"1970-01-12T21:42:34.472Z\",\"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 @@ -7781,7 +7785,7 @@ public void TestV2BillingServiceActionPost() HttpMethod.Post, "/v2/billing/service_actions", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.billing.service_action\",\"created\":\"1970-01-12T21:42:34.472Z\",\"credit_grant\":null,\"credit_grant_per_tenant\":null,\"livemode\":true,\"lookup_key\":null,\"service_interval\":\"month\",\"service_interval_count\":1375336415,\"type\":\"credit_grant\"}"); + "{\"id\":\"obj_123\",\"object\":\"v2.billing.service_action\",\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true,\"service_interval\":\"month\",\"service_interval_count\":1375336415,\"type\":\"credit_grant\"}"); var options = new Stripe.V2.Billing.ServiceActionCreateOptions { ServiceInterval = "month", @@ -7802,7 +7806,7 @@ public void TestV2BillingServiceActionGet() HttpMethod.Get, "/v2/billing/service_actions/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.billing.service_action\",\"created\":\"1970-01-12T21:42:34.472Z\",\"credit_grant\":null,\"credit_grant_per_tenant\":null,\"livemode\":true,\"lookup_key\":null,\"service_interval\":\"month\",\"service_interval_count\":1375336415,\"type\":\"credit_grant\"}"); + "{\"id\":\"obj_123\",\"object\":\"v2.billing.service_action\",\"created\":\"1970-01-12T21:42:34.472Z\",\"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( @@ -7819,7 +7823,7 @@ public void TestV2CoreAccountGet() HttpMethod.Get, "/v2/core/accounts", (HttpStatusCode)200, - "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.core.account\",\"applied_configurations\":[\"storer\"],\"configuration\":null,\"contact_email\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"dashboard\":null,\"defaults\":null,\"display_name\":null,\"identity\":null,\"livemode\":true,\"metadata\":null,\"requirements\":null}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.core.account\",\"applied_configurations\":[\"storer\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"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 @@ -7834,7 +7838,7 @@ public void TestV2CoreAccountPost() HttpMethod.Post, "/v2/core/accounts", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.core.account\",\"applied_configurations\":[\"storer\"],\"configuration\":null,\"contact_email\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"dashboard\":null,\"defaults\":null,\"display_name\":null,\"identity\":null,\"livemode\":true,\"metadata\":null,\"requirements\":null}"); + "{\"id\":\"obj_123\",\"object\":\"v2.core.account\",\"applied_configurations\":[\"storer\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true}"); var options = new Stripe.V2.Core.AccountCreateOptions(); var client = new StripeClient(this.Requestor); var service = client.V2.Core.Accounts; @@ -7849,7 +7853,7 @@ public void TestV2CoreAccountGet2() HttpMethod.Get, "/v2/core/accounts/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.core.account\",\"applied_configurations\":[\"storer\"],\"configuration\":null,\"contact_email\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"dashboard\":null,\"defaults\":null,\"display_name\":null,\"identity\":null,\"livemode\":true,\"metadata\":null,\"requirements\":null}"); + "{\"id\":\"obj_123\",\"object\":\"v2.core.account\",\"applied_configurations\":[\"storer\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true}"); var client = new StripeClient(this.Requestor); var service = client.V2.Core.Accounts; Stripe.V2.Core.Account account = service.Get("id_123"); @@ -7863,7 +7867,7 @@ public void TestV2CoreAccountPost2() HttpMethod.Post, "/v2/core/accounts/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.core.account\",\"applied_configurations\":[\"storer\"],\"configuration\":null,\"contact_email\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"dashboard\":null,\"defaults\":null,\"display_name\":null,\"identity\":null,\"livemode\":true,\"metadata\":null,\"requirements\":null}"); + "{\"id\":\"obj_123\",\"object\":\"v2.core.account\",\"applied_configurations\":[\"storer\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true}"); var options = new Stripe.V2.Core.AccountUpdateOptions(); var client = new StripeClient(this.Requestor); var service = client.V2.Core.Accounts; @@ -7878,7 +7882,7 @@ public void TestV2CoreAccountPost3() HttpMethod.Post, "/v2/core/accounts/id_123/close", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.core.account\",\"applied_configurations\":[\"storer\"],\"configuration\":null,\"contact_email\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"dashboard\":null,\"defaults\":null,\"display_name\":null,\"identity\":null,\"livemode\":true,\"metadata\":null,\"requirements\":null}"); + "{\"id\":\"obj_123\",\"object\":\"v2.core.account\",\"applied_configurations\":[\"storer\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true}"); var client = new StripeClient(this.Requestor); var service = client.V2.Core.Accounts; Stripe.V2.Core.Account account = service.Close("id_123"); @@ -7894,11 +7898,11 @@ public void TestV2CoreAccountsPersonGet() HttpMethod.Get, "/v2/core/accounts/account_id_123/persons", (HttpStatusCode)200, - "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.core.account_person\",\"account\":\"account\",\"additional_addresses\":null,\"additional_names\":null,\"additional_terms_of_service\":null,\"address\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"date_of_birth\":null,\"documents\":null,\"email\":null,\"given_name\":null,\"id_numbers\":null,\"legal_gender\":null,\"livemode\":true,\"metadata\":null,\"nationalities\":null,\"phone\":null,\"political_exposure\":null,\"relationship\":null,\"script_addresses\":null,\"script_names\":null,\"surname\":null,\"updated\":\"1970-01-03T17:07:10.277Z\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.core.account_person\",\"account\":\"account\",\"created\":\"1970-01-12T21:42:34.472Z\",\"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 persons = service.List( - "account_id_123"); + Stripe.V2.StripeList accountPersons = service + .List("account_id_123"); this.AssertRequest( HttpMethod.Get, "/v2/core/accounts/account_id_123/persons"); @@ -7911,11 +7915,11 @@ public void TestV2CoreAccountsPersonPost() HttpMethod.Post, "/v2/core/accounts/account_id_123/persons", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.core.account_person\",\"account\":\"account\",\"additional_addresses\":null,\"additional_names\":null,\"additional_terms_of_service\":null,\"address\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"date_of_birth\":null,\"documents\":null,\"email\":null,\"given_name\":null,\"id_numbers\":null,\"legal_gender\":null,\"livemode\":true,\"metadata\":null,\"nationalities\":null,\"phone\":null,\"political_exposure\":null,\"relationship\":null,\"script_addresses\":null,\"script_names\":null,\"surname\":null,\"updated\":\"1970-01-03T17:07:10.277Z\"}"); + "{\"id\":\"obj_123\",\"object\":\"v2.core.account_person\",\"account\":\"account\",\"created\":\"1970-01-12T21:42:34.472Z\",\"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.Person person = service.Create( + Stripe.V2.Core.AccountPerson accountPerson = service.Create( "account_id_123", options); this.AssertRequest( @@ -7930,10 +7934,10 @@ public void TestV2CoreAccountsPersonDelete() HttpMethod.Delete, "/v2/core/accounts/account_id_123/persons/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.core.account_person\",\"account\":\"account\",\"additional_addresses\":null,\"additional_names\":null,\"additional_terms_of_service\":null,\"address\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"date_of_birth\":null,\"documents\":null,\"email\":null,\"given_name\":null,\"id_numbers\":null,\"legal_gender\":null,\"livemode\":true,\"metadata\":null,\"nationalities\":null,\"phone\":null,\"political_exposure\":null,\"relationship\":null,\"script_addresses\":null,\"script_names\":null,\"surname\":null,\"updated\":\"1970-01-03T17:07:10.277Z\"}"); + "{\"id\":\"abc_123\",\"object\":\"some.object.tag\"}"); var client = new StripeClient(this.Requestor); var service = client.V2.Core.Accounts.Persons; - Stripe.V2.Core.Person deleted = service.Delete( + Stripe.V2.DeletedObject deleted = service.Delete( "account_id_123", "id_123"); this.AssertRequest( @@ -7948,10 +7952,10 @@ public void TestV2CoreAccountsPersonGet2() HttpMethod.Get, "/v2/core/accounts/account_id_123/persons/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.core.account_person\",\"account\":\"account\",\"additional_addresses\":null,\"additional_names\":null,\"additional_terms_of_service\":null,\"address\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"date_of_birth\":null,\"documents\":null,\"email\":null,\"given_name\":null,\"id_numbers\":null,\"legal_gender\":null,\"livemode\":true,\"metadata\":null,\"nationalities\":null,\"phone\":null,\"political_exposure\":null,\"relationship\":null,\"script_addresses\":null,\"script_names\":null,\"surname\":null,\"updated\":\"1970-01-03T17:07:10.277Z\"}"); + "{\"id\":\"obj_123\",\"object\":\"v2.core.account_person\",\"account\":\"account\",\"created\":\"1970-01-12T21:42:34.472Z\",\"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.Person person = service.Get( + Stripe.V2.Core.AccountPerson accountPerson = service.Get( "account_id_123", "id_123"); this.AssertRequest( @@ -7966,11 +7970,11 @@ public void TestV2CoreAccountsPersonPost2() HttpMethod.Post, "/v2/core/accounts/account_id_123/persons/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.core.account_person\",\"account\":\"account\",\"additional_addresses\":null,\"additional_names\":null,\"additional_terms_of_service\":null,\"address\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"date_of_birth\":null,\"documents\":null,\"email\":null,\"given_name\":null,\"id_numbers\":null,\"legal_gender\":null,\"livemode\":true,\"metadata\":null,\"nationalities\":null,\"phone\":null,\"political_exposure\":null,\"relationship\":null,\"script_addresses\":null,\"script_names\":null,\"surname\":null,\"updated\":\"1970-01-03T17:07:10.277Z\"}"); + "{\"id\":\"obj_123\",\"object\":\"v2.core.account_person\",\"account\":\"account\",\"created\":\"1970-01-12T21:42:34.472Z\",\"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.Person person = service.Update( + Stripe.V2.Core.AccountPerson accountPerson = service.Update( "account_id_123", "id_123", options); @@ -7986,7 +7990,7 @@ public void TestV2CoreAccountLinkPost() 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\",\"account_onboarding\":null,\"account_update\":null}}"); + "{\"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", @@ -8030,13 +8034,13 @@ public void TestV2CoreClaimableSandboxPost() HttpMethod.Post, "/v2/core/claimable_sandboxes", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.core.claimable_sandbox\",\"claim_url\":null,\"claimed_at\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":null,\"livemode\":true,\"prefill\":{\"country\":\"af\",\"email\":\"email\",\"name\":\"name\"},\"sandbox_details\":{\"account\":\"account\",\"api_keys\":null,\"owner_account\":null},\"status\":\"claimed\"}"); + "{\"id\":\"obj_123\",\"object\":\"v2.core.claimable_sandbox\",\"api_keys\":{\"publishable\":\"publishable\",\"secret\":\"secret\"},\"claim_url\":\"claim_url\",\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true,\"prefill\":{\"country\":\"country\",\"email\":\"email\",\"name\":\"name\"}}"); var options = new Stripe.V2.Core.ClaimableSandboxCreateOptions { EnableMcpAccess = true, Prefill = new Stripe.V2.Core.ClaimableSandboxCreatePrefillOptions { - Country = "af", + Country = "country", Email = "email", Name = "name", }, @@ -8048,23 +8052,6 @@ public void TestV2CoreClaimableSandboxPost() this.AssertRequest(HttpMethod.Post, "/v2/core/claimable_sandboxes"); } - [Fact] - public void TestV2CoreClaimableSandboxGet() - { - this.StubRequest( - HttpMethod.Get, - "/v2/core/claimable_sandboxes/id_123", - (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.core.claimable_sandbox\",\"claim_url\":null,\"claimed_at\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":null,\"livemode\":true,\"prefill\":{\"country\":\"af\",\"email\":\"email\",\"name\":\"name\"},\"sandbox_details\":{\"account\":\"account\",\"api_keys\":null,\"owner_account\":null},\"status\":\"claimed\"}"); - 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 void TestV2CoreEventGet() { @@ -8072,7 +8059,7 @@ public void TestV2CoreEventGet() HttpMethod.Get, "/v2/core/events", (HttpStatusCode)200, - "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.core.event\",\"changes\":{\"key\":{}},\"context\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true,\"reason\":null,\"type\":\"type\"}],\"next_page_url\":null,\"previous_page_url\":null}", + "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.core.event\",\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true,\"type\":\"type\"}],\"next_page_url\":null,\"previous_page_url\":null}", "object_id=object_id"); var options = new Stripe.V2.Core.EventListOptions { @@ -8095,7 +8082,7 @@ public void TestV2CoreEventGet2() HttpMethod.Get, "/v2/core/events/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.core.event\",\"changes\":{\"key\":{}},\"context\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true,\"reason\":null,\"type\":\"type\"}"); + "{\"id\":\"obj_123\",\"object\":\"v2.core.event\",\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true,\"type\":\"type\"}"); var client = new StripeClient(this.Requestor); var service = client.V2.Core.Events; Stripe.V2.Event result = service.Get("id_123"); @@ -8109,7 +8096,7 @@ public void TestV2CoreEventDestinationGet() HttpMethod.Get, "/v2/core/event_destinations", (HttpStatusCode)200, - "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.core.event_destination\",\"amazon_eventbridge\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"events_from\":null,\"livemode\":true,\"metadata\":null,\"name\":\"name\",\"snapshot_api_version\":null,\"status\":\"disabled\",\"status_details\":null,\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\",\"webhook_endpoint\":null}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.core.event_destination\",\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"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 @@ -8124,7 +8111,7 @@ public void TestV2CoreEventDestinationPost() HttpMethod.Post, "/v2/core/event_destinations", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.core.event_destination\",\"amazon_eventbridge\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"events_from\":null,\"livemode\":true,\"metadata\":null,\"name\":\"name\",\"snapshot_api_version\":null,\"status\":\"disabled\",\"status_details\":null,\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\",\"webhook_endpoint\":null}"); + "{\"id\":\"obj_123\",\"object\":\"v2.core.event_destination\",\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"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" }, @@ -8146,10 +8133,10 @@ public void TestV2CoreEventDestinationDelete() HttpMethod.Delete, "/v2/core/event_destinations/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.core.event_destination\",\"amazon_eventbridge\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"events_from\":null,\"livemode\":true,\"metadata\":null,\"name\":\"name\",\"snapshot_api_version\":null,\"status\":\"disabled\",\"status_details\":null,\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\",\"webhook_endpoint\":null}"); + "{\"id\":\"abc_123\",\"object\":\"some.object.tag\"}"); var client = new StripeClient(this.Requestor); var service = client.V2.Core.EventDestinations; - Stripe.V2.EventDestination deleted = service.Delete("id_123"); + Stripe.V2.DeletedObject deleted = service.Delete("id_123"); this.AssertRequest( HttpMethod.Delete, "/v2/core/event_destinations/id_123"); @@ -8162,7 +8149,7 @@ public void TestV2CoreEventDestinationGet2() HttpMethod.Get, "/v2/core/event_destinations/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.core.event_destination\",\"amazon_eventbridge\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"events_from\":null,\"livemode\":true,\"metadata\":null,\"name\":\"name\",\"snapshot_api_version\":null,\"status\":\"disabled\",\"status_details\":null,\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\",\"webhook_endpoint\":null}"); + "{\"id\":\"obj_123\",\"object\":\"v2.core.event_destination\",\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"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.EventDestination eventDestination = service.Get("id_123"); @@ -8178,7 +8165,7 @@ public void TestV2CoreEventDestinationPost2() HttpMethod.Post, "/v2/core/event_destinations/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.core.event_destination\",\"amazon_eventbridge\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"events_from\":null,\"livemode\":true,\"metadata\":null,\"name\":\"name\",\"snapshot_api_version\":null,\"status\":\"disabled\",\"status_details\":null,\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\",\"webhook_endpoint\":null}"); + "{\"id\":\"obj_123\",\"object\":\"v2.core.event_destination\",\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"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; @@ -8197,7 +8184,7 @@ public void TestV2CoreEventDestinationPost3() HttpMethod.Post, "/v2/core/event_destinations/id_123/disable", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.core.event_destination\",\"amazon_eventbridge\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"events_from\":null,\"livemode\":true,\"metadata\":null,\"name\":\"name\",\"snapshot_api_version\":null,\"status\":\"disabled\",\"status_details\":null,\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\",\"webhook_endpoint\":null}"); + "{\"id\":\"obj_123\",\"object\":\"v2.core.event_destination\",\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"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.EventDestination eventDestination = service.Disable( @@ -8214,7 +8201,7 @@ public void TestV2CoreEventDestinationPost4() HttpMethod.Post, "/v2/core/event_destinations/id_123/enable", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.core.event_destination\",\"amazon_eventbridge\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"events_from\":null,\"livemode\":true,\"metadata\":null,\"name\":\"name\",\"snapshot_api_version\":null,\"status\":\"disabled\",\"status_details\":null,\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\",\"webhook_endpoint\":null}"); + "{\"id\":\"obj_123\",\"object\":\"v2.core.event_destination\",\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"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.EventDestination eventDestination = service.Enable( @@ -8231,7 +8218,7 @@ public void TestV2CoreEventDestinationPost5() HttpMethod.Post, "/v2/core/event_destinations/id_123/ping", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.core.event\",\"changes\":{\"key\":{}},\"context\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true,\"reason\":null,\"type\":\"type\"}"); + "{\"id\":\"obj_123\",\"object\":\"v2.core.event\",\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true,\"type\":\"type\"}"); var client = new StripeClient(this.Requestor); var service = client.V2.Core.EventDestinations; Stripe.V2.Event result = service.Ping("id_123"); @@ -8247,7 +8234,7 @@ public void TestV2CoreVaultGbBankAccountPost() HttpMethod.Post, "/v2/core/vault/gb_bank_accounts", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.core.vault.gb_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"confirmation_of_payee\":{\"result\":{\"created\":\"1970-01-12T21:42:34.472Z\",\"match_result\":\"unavailable\",\"matched\":{\"business_type\":null,\"name\":null},\"message\":\"message\",\"provided\":{\"business_type\":\"personal\",\"name\":\"name\"}},\"status\":\"awaiting_acknowledgement\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"last4\":\"last4\",\"livemode\":true,\"sort_code\":\"sort_code\"}"); + "{\"id\":\"obj_123\",\"object\":\"v2.core.vault.gb_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"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\",\"last4\":\"last4\",\"livemode\":true,\"sort_code\":\"sort_code\"}"); var options = new Stripe.V2.Core.Vault.GbBankAccountCreateOptions { AccountNumber = "account_number", @@ -8269,7 +8256,7 @@ public void TestV2CoreVaultGbBankAccountGet() HttpMethod.Get, "/v2/core/vault/gb_bank_accounts/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.core.vault.gb_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"confirmation_of_payee\":{\"result\":{\"created\":\"1970-01-12T21:42:34.472Z\",\"match_result\":\"unavailable\",\"matched\":{\"business_type\":null,\"name\":null},\"message\":\"message\",\"provided\":{\"business_type\":\"personal\",\"name\":\"name\"}},\"status\":\"awaiting_acknowledgement\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"last4\":\"last4\",\"livemode\":true,\"sort_code\":\"sort_code\"}"); + "{\"id\":\"obj_123\",\"object\":\"v2.core.vault.gb_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"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\",\"last4\":\"last4\",\"livemode\":true,\"sort_code\":\"sort_code\"}"); var client = new StripeClient(this.Requestor); var service = client.V2.Core.Vault.GbBankAccounts; Stripe.V2.Core.Vault.GbBankAccount gbBankAccount = service.Get( @@ -8286,7 +8273,7 @@ public void TestV2CoreVaultGbBankAccountPost2() HttpMethod.Post, "/v2/core/vault/gb_bank_accounts/id_123/acknowledge_confirmation_of_payee", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.core.vault.gb_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"confirmation_of_payee\":{\"result\":{\"created\":\"1970-01-12T21:42:34.472Z\",\"match_result\":\"unavailable\",\"matched\":{\"business_type\":null,\"name\":null},\"message\":\"message\",\"provided\":{\"business_type\":\"personal\",\"name\":\"name\"}},\"status\":\"awaiting_acknowledgement\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"last4\":\"last4\",\"livemode\":true,\"sort_code\":\"sort_code\"}"); + "{\"id\":\"obj_123\",\"object\":\"v2.core.vault.gb_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"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\",\"last4\":\"last4\",\"livemode\":true,\"sort_code\":\"sort_code\"}"); var client = new StripeClient(this.Requestor); var service = client.V2.Core.Vault.GbBankAccounts; Stripe.V2.Core.Vault.GbBankAccount gbBankAccount = service @@ -8303,7 +8290,7 @@ public void TestV2CoreVaultGbBankAccountPost3() HttpMethod.Post, "/v2/core/vault/gb_bank_accounts/id_123/archive", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.core.vault.gb_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"confirmation_of_payee\":{\"result\":{\"created\":\"1970-01-12T21:42:34.472Z\",\"match_result\":\"unavailable\",\"matched\":{\"business_type\":null,\"name\":null},\"message\":\"message\",\"provided\":{\"business_type\":\"personal\",\"name\":\"name\"}},\"status\":\"awaiting_acknowledgement\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"last4\":\"last4\",\"livemode\":true,\"sort_code\":\"sort_code\"}"); + "{\"id\":\"obj_123\",\"object\":\"v2.core.vault.gb_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"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\",\"last4\":\"last4\",\"livemode\":true,\"sort_code\":\"sort_code\"}"); var client = new StripeClient(this.Requestor); var service = client.V2.Core.Vault.GbBankAccounts; Stripe.V2.Core.Vault.GbBankAccount gbBankAccount = service.Archive( @@ -8320,7 +8307,7 @@ public void TestV2CoreVaultGbBankAccountPost4() HttpMethod.Post, "/v2/core/vault/gb_bank_accounts/id_123/initiate_confirmation_of_payee", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.core.vault.gb_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"confirmation_of_payee\":{\"result\":{\"created\":\"1970-01-12T21:42:34.472Z\",\"match_result\":\"unavailable\",\"matched\":{\"business_type\":null,\"name\":null},\"message\":\"message\",\"provided\":{\"business_type\":\"personal\",\"name\":\"name\"}},\"status\":\"awaiting_acknowledgement\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"last4\":\"last4\",\"livemode\":true,\"sort_code\":\"sort_code\"}"); + "{\"id\":\"obj_123\",\"object\":\"v2.core.vault.gb_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"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\",\"last4\":\"last4\",\"livemode\":true,\"sort_code\":\"sort_code\"}"); var client = new StripeClient(this.Requestor); var service = client.V2.Core.Vault.GbBankAccounts; Stripe.V2.Core.Vault.GbBankAccount gbBankAccount = service @@ -8337,7 +8324,7 @@ public void TestV2CoreVaultUsBankAccountPost() HttpMethod.Post, "/v2/core/vault/us_bank_accounts", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.core.vault.us_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"created\":\"1970-01-12T21:42:34.472Z\",\"fedwire_routing_number\":null,\"last4\":\"last4\",\"livemode\":true,\"routing_number\":null}"); + "{\"id\":\"obj_123\",\"object\":\"v2.core.vault.us_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"created\":\"1970-01-12T21:42:34.472Z\",\"last4\":\"last4\",\"livemode\":true}"); var options = new Stripe.V2.Core.Vault.UsBankAccountCreateOptions { AccountNumber = "account_number", @@ -8358,7 +8345,7 @@ public void TestV2CoreVaultUsBankAccountGet() HttpMethod.Get, "/v2/core/vault/us_bank_accounts/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.core.vault.us_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"created\":\"1970-01-12T21:42:34.472Z\",\"fedwire_routing_number\":null,\"last4\":\"last4\",\"livemode\":true,\"routing_number\":null}"); + "{\"id\":\"obj_123\",\"object\":\"v2.core.vault.us_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"created\":\"1970-01-12T21:42:34.472Z\",\"last4\":\"last4\",\"livemode\":true}"); var client = new StripeClient(this.Requestor); var service = client.V2.Core.Vault.UsBankAccounts; Stripe.V2.Core.Vault.UsBankAccount usBankAccount = service.Get( @@ -8375,7 +8362,7 @@ public void TestV2CoreVaultUsBankAccountPost2() HttpMethod.Post, "/v2/core/vault/us_bank_accounts/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.core.vault.us_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"created\":\"1970-01-12T21:42:34.472Z\",\"fedwire_routing_number\":null,\"last4\":\"last4\",\"livemode\":true,\"routing_number\":null}"); + "{\"id\":\"obj_123\",\"object\":\"v2.core.vault.us_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"created\":\"1970-01-12T21:42:34.472Z\",\"last4\":\"last4\",\"livemode\":true}"); var options = new Stripe.V2.Core.Vault.UsBankAccountUpdateOptions(); var client = new StripeClient(this.Requestor); var service = client.V2.Core.Vault.UsBankAccounts; @@ -8394,7 +8381,7 @@ public void TestV2CoreVaultUsBankAccountPost3() HttpMethod.Post, "/v2/core/vault/us_bank_accounts/id_123/archive", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.core.vault.us_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"created\":\"1970-01-12T21:42:34.472Z\",\"fedwire_routing_number\":null,\"last4\":\"last4\",\"livemode\":true,\"routing_number\":null}"); + "{\"id\":\"obj_123\",\"object\":\"v2.core.vault.us_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"created\":\"1970-01-12T21:42:34.472Z\",\"last4\":\"last4\",\"livemode\":true}"); var client = new StripeClient(this.Requestor); var service = client.V2.Core.Vault.UsBankAccounts; Stripe.V2.Core.Vault.UsBankAccount usBankAccount = service.Archive( @@ -8411,7 +8398,7 @@ public void TestV2MoneyManagementAdjustmentGet() HttpMethod.Get, "/v2/money_management/adjustments", (HttpStatusCode)200, - "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.money_management.adjustment\",\"adjusted_flow\":null,\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":null,\"financial_account\":\"financial_account\",\"livemode\":true,\"receipt_url\":null}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.money_management.adjustment\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); var service = client.V2.MoneyManagement.Adjustments; Stripe.V2.StripeList adjustments = service @@ -8428,7 +8415,7 @@ public void TestV2MoneyManagementAdjustmentGet2() HttpMethod.Get, "/v2/money_management/adjustments/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.money_management.adjustment\",\"adjusted_flow\":null,\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":null,\"financial_account\":\"financial_account\",\"livemode\":true,\"receipt_url\":null}"); + "{\"id\":\"obj_123\",\"object\":\"v2.money_management.adjustment\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"livemode\":true}"); var client = new StripeClient(this.Requestor); var service = client.V2.MoneyManagement.Adjustments; Stripe.V2.MoneyManagement.Adjustment adjustment = service.Get( @@ -8445,7 +8432,7 @@ public void TestV2MoneyManagementFinancialAccountGet() HttpMethod.Get, "/v2/money_management/financial_accounts", (HttpStatusCode)200, - "{\"data\":[{\"id\":\"obj_123\",\"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\":\"af\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":null,\"livemode\":true,\"metadata\":null,\"other\":null,\"status\":\"closed\",\"status_details\":null,\"storage\":null,\"type\":\"other\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"id\":\"obj_123\",\"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\",\"livemode\":true,\"status\":\"closed\",\"type\":\"other\"}],\"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 @@ -8462,7 +8449,7 @@ public void TestV2MoneyManagementFinancialAccountPost() HttpMethod.Post, "/v2/money_management/financial_accounts", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"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\":\"af\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":null,\"livemode\":true,\"metadata\":null,\"other\":null,\"status\":\"closed\",\"status_details\":null,\"storage\":null,\"type\":\"other\"}"); + "{\"id\":\"obj_123\",\"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\",\"livemode\":true,\"status\":\"closed\",\"type\":\"other\"}"); var options = new Stripe.V2.MoneyManagement.FinancialAccountCreateOptions { Type = "storage", @@ -8483,7 +8470,7 @@ public void TestV2MoneyManagementFinancialAccountGet2() HttpMethod.Get, "/v2/money_management/financial_accounts/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"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\":\"af\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":null,\"livemode\":true,\"metadata\":null,\"other\":null,\"status\":\"closed\",\"status_details\":null,\"storage\":null,\"type\":\"other\"}"); + "{\"id\":\"obj_123\",\"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\",\"livemode\":true,\"status\":\"closed\",\"type\":\"other\"}"); var client = new StripeClient(this.Requestor); var service = client.V2.MoneyManagement.FinancialAccounts; Stripe.V2.MoneyManagement.FinancialAccount financialAccount = service @@ -8500,7 +8487,7 @@ public void TestV2MoneyManagementFinancialAccountPost2() HttpMethod.Post, "/v2/money_management/financial_accounts/id_123/close", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"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\":\"af\",\"created\":\"1970-01-12T21:42:34.472Z\",\"display_name\":null,\"livemode\":true,\"metadata\":null,\"other\":null,\"status\":\"closed\",\"status_details\":null,\"storage\":null,\"type\":\"other\"}"); + "{\"id\":\"obj_123\",\"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\",\"livemode\":true,\"status\":\"closed\",\"type\":\"other\"}"); var client = new StripeClient(this.Requestor); var service = client.V2.MoneyManagement.FinancialAccounts; Stripe.V2.MoneyManagement.FinancialAccount financialAccount = service @@ -8517,7 +8504,7 @@ public void TestV2MoneyManagementFinancialAddressGet() HttpMethod.Get, "/v2/money_management/financial_addresses", (HttpStatusCode)200, - "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.money_management.financial_address\",\"created\":\"1970-01-12T21:42:34.472Z\",\"credentials\":null,\"currency\":\"stn\",\"financial_account\":\"financial_account\",\"livemode\":true,\"status\":\"failed\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.money_management.financial_address\",\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"financial_account\":\"financial_account\",\"livemode\":true,\"status\":\"failed\"}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); var service = client.V2.MoneyManagement.FinancialAddresses; Stripe.V2.StripeList financialAddresses = service @@ -8534,10 +8521,10 @@ public void TestV2MoneyManagementFinancialAddressPost() HttpMethod.Post, "/v2/money_management/financial_addresses", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.money_management.financial_address\",\"created\":\"1970-01-12T21:42:34.472Z\",\"credentials\":null,\"currency\":\"stn\",\"financial_account\":\"financial_account\",\"livemode\":true,\"status\":\"failed\"}"); + "{\"id\":\"obj_123\",\"object\":\"v2.money_management.financial_address\",\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"financial_account\":\"financial_account\",\"livemode\":true,\"status\":\"failed\"}"); var options = new Stripe.V2.MoneyManagement.FinancialAddressCreateOptions { - Currency = "stn", + Currency = "usd", FinancialAccount = "financial_account", }; var client = new StripeClient(this.Requestor); @@ -8556,7 +8543,7 @@ public void TestV2MoneyManagementFinancialAddressGet2() HttpMethod.Get, "/v2/money_management/financial_addresses/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.money_management.financial_address\",\"created\":\"1970-01-12T21:42:34.472Z\",\"credentials\":null,\"currency\":\"stn\",\"financial_account\":\"financial_account\",\"livemode\":true,\"status\":\"failed\"}"); + "{\"id\":\"obj_123\",\"object\":\"v2.money_management.financial_address\",\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"financial_account\":\"financial_account\",\"livemode\":true,\"status\":\"failed\"}"); var client = new StripeClient(this.Requestor); var service = client.V2.MoneyManagement.FinancialAddresses; Stripe.V2.MoneyManagement.FinancialAddress financialAddress = service @@ -8573,7 +8560,7 @@ public void TestV2MoneyManagementInboundTransferGet() HttpMethod.Get, "/v2/money_management/inbound_transfers", (HttpStatusCode)200, - "{\"data\":[{\"id\":\"obj_123\",\"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\",\"us_bank_account\":null}},\"livemode\":true,\"receipt_url\":null,\"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\",\"bank_debit_failed\":null,\"bank_debit_processing\":null,\"bank_debit_queued\":null,\"bank_debit_returned\":null,\"bank_debit_succeeded\":null}]}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"id\":\"obj_123\",\"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\"}},\"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.MoneyManagement.InboundTransfers; Stripe.V2.StripeList inboundTransfers = service @@ -8590,7 +8577,7 @@ public void TestV2MoneyManagementInboundTransferPost() HttpMethod.Post, "/v2/money_management/inbound_transfers", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"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\",\"us_bank_account\":null}},\"livemode\":true,\"receipt_url\":null,\"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\",\"bank_debit_failed\":null,\"bank_debit_processing\":null,\"bank_debit_queued\":null,\"bank_debit_returned\":null,\"bank_debit_succeeded\":null}]}"); + "{\"id\":\"obj_123\",\"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\"}},\"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 { Currency = "USD", Value = 96 }, @@ -8621,7 +8608,7 @@ public void TestV2MoneyManagementInboundTransferGet2() HttpMethod.Get, "/v2/money_management/inbound_transfers/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"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\",\"us_bank_account\":null}},\"livemode\":true,\"receipt_url\":null,\"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\",\"bank_debit_failed\":null,\"bank_debit_processing\":null,\"bank_debit_queued\":null,\"bank_debit_returned\":null,\"bank_debit_succeeded\":null}]}"); + "{\"id\":\"obj_123\",\"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\"}},\"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.MoneyManagement.InboundTransfers; Stripe.V2.MoneyManagement.InboundTransfer inboundTransfer = service @@ -8638,7 +8625,7 @@ public void TestV2MoneyManagementOutboundPaymentGet() HttpMethod.Get, "/v2/money_management/outbound_payments", (HttpStatusCode)200, - "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_payment\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"delivery_options\":null,\"description\":null,\"expected_arrival_date\":null,\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"livemode\":true,\"metadata\":null,\"outbound_payment_quote\":null,\"receipt_url\":null,\"recipient_notification\":{\"setting\":\"configured\"},\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"status_details\":null,\"status_transitions\":null,\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"trace_id\":{\"status\":\"pending\",\"value\":null}}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"id\":\"obj_123\",\"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\"},\"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.MoneyManagement.OutboundPayments; Stripe.V2.StripeList outboundPayments = service @@ -8655,7 +8642,7 @@ public void TestV2MoneyManagementOutboundPaymentPost() HttpMethod.Post, "/v2/money_management/outbound_payments", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_payment\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"delivery_options\":null,\"description\":null,\"expected_arrival_date\":null,\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"livemode\":true,\"metadata\":null,\"outbound_payment_quote\":null,\"receipt_url\":null,\"recipient_notification\":{\"setting\":\"configured\"},\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"status_details\":null,\"status_transitions\":null,\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"trace_id\":{\"status\":\"pending\",\"value\":null}}"); + "{\"id\":\"obj_123\",\"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\"},\"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 { Currency = "USD", Value = 96 }, @@ -8687,7 +8674,7 @@ public void TestV2MoneyManagementOutboundPaymentGet2() HttpMethod.Get, "/v2/money_management/outbound_payments/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_payment\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"delivery_options\":null,\"description\":null,\"expected_arrival_date\":null,\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"livemode\":true,\"metadata\":null,\"outbound_payment_quote\":null,\"receipt_url\":null,\"recipient_notification\":{\"setting\":\"configured\"},\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"status_details\":null,\"status_transitions\":null,\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"trace_id\":{\"status\":\"pending\",\"value\":null}}"); + "{\"id\":\"obj_123\",\"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\"},\"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.MoneyManagement.OutboundPayments; Stripe.V2.MoneyManagement.OutboundPayment outboundPayment = service @@ -8704,7 +8691,7 @@ public void TestV2MoneyManagementOutboundPaymentPost2() HttpMethod.Post, "/v2/money_management/outbound_payments/id_123/cancel", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_payment\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"delivery_options\":null,\"description\":null,\"expected_arrival_date\":null,\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"livemode\":true,\"metadata\":null,\"outbound_payment_quote\":null,\"receipt_url\":null,\"recipient_notification\":{\"setting\":\"configured\"},\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"status_details\":null,\"status_transitions\":null,\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"trace_id\":{\"status\":\"pending\",\"value\":null}}"); + "{\"id\":\"obj_123\",\"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\"},\"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.MoneyManagement.OutboundPayments; Stripe.V2.MoneyManagement.OutboundPayment outboundPayment = service @@ -8721,7 +8708,7 @@ public void TestV2MoneyManagementOutboundPaymentQuotePost() HttpMethod.Post, "/v2/money_management/outbound_payment_quotes", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_payment_quote\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"delivery_options\":null,\"estimated_fees\":[{\"amount\":{\"currency\":\"USD\",\"value\":96},\"type\":\"cross_border_payout_fee\"}],\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"fx_quote\":{\"lock_duration\":\"five_minutes\",\"lock_expires_at\":\"1970-01-18T15:15:29.586Z\",\"lock_status\":\"active\",\"rates\":{\"key\":{\"exchange_rate\":\"exchange_rate\"}},\"to_currency\":\"usd\"},\"livemode\":true,\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"}}"); + "{\"id\":\"obj_123\",\"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\":\"cross_border_payout_fee\"}],\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"fx_quote\":{\"lock_duration\":\"five_minutes\",\"lock_expires_at\":\"1970-01-18T15:15:29.586Z\",\"lock_status\":\"active\",\"rates\":{\"key\":{\"exchange_rate\":\"exchange_rate\"}},\"to_currency\":\"usd\"},\"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 { Currency = "USD", Value = 96 }, @@ -8753,7 +8740,7 @@ public void TestV2MoneyManagementOutboundPaymentQuoteGet() HttpMethod.Get, "/v2/money_management/outbound_payment_quotes/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_payment_quote\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"delivery_options\":null,\"estimated_fees\":[{\"amount\":{\"currency\":\"USD\",\"value\":96},\"type\":\"cross_border_payout_fee\"}],\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"fx_quote\":{\"lock_duration\":\"five_minutes\",\"lock_expires_at\":\"1970-01-18T15:15:29.586Z\",\"lock_status\":\"active\",\"rates\":{\"key\":{\"exchange_rate\":\"exchange_rate\"}},\"to_currency\":\"usd\"},\"livemode\":true,\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"}}"); + "{\"id\":\"obj_123\",\"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\":\"cross_border_payout_fee\"}],\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"fx_quote\":{\"lock_duration\":\"five_minutes\",\"lock_expires_at\":\"1970-01-18T15:15:29.586Z\",\"lock_status\":\"active\",\"rates\":{\"key\":{\"exchange_rate\":\"exchange_rate\"}},\"to_currency\":\"usd\"},\"livemode\":true,\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"}}"); var client = new StripeClient(this.Requestor); var service = client.V2.MoneyManagement.OutboundPaymentQuotes; Stripe.V2.MoneyManagement.OutboundPaymentQuote outboundPaymentQuote = service @@ -8770,7 +8757,7 @@ public void TestV2MoneyManagementOutboundSetupIntentGet() HttpMethod.Get, "/v2/money_management/outbound_setup_intents", (HttpStatusCode)200, - "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_setup_intent\",\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true,\"next_action\":null,\"payout_method\":{\"id\":\"obj_123\",\"object\":\"v2.money_management.payout_method\",\"available_payout_speeds\":[\"standard\"],\"bank_account\":null,\"card\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"latest_outbound_setup_intent\":null,\"livemode\":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}"); + "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_setup_intent\",\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true,\"payout_method\":{\"id\":\"obj_123\",\"object\":\"v2.money_management.payout_method\",\"available_payout_speeds\":[\"standard\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":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.MoneyManagement.OutboundSetupIntents; Stripe.V2.StripeList outboundSetupIntents = service @@ -8787,7 +8774,7 @@ public void TestV2MoneyManagementOutboundSetupIntentPost() HttpMethod.Post, "/v2/money_management/outbound_setup_intents", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_setup_intent\",\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true,\"next_action\":null,\"payout_method\":{\"id\":\"obj_123\",\"object\":\"v2.money_management.payout_method\",\"available_payout_speeds\":[\"standard\"],\"bank_account\":null,\"card\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"latest_outbound_setup_intent\":null,\"livemode\":true,\"type\":\"bank_account\",\"usage_status\":{\"payments\":\"requires_action\",\"transfers\":\"invalid\"}},\"status\":\"requires_payout_method\",\"usage_intent\":\"payment\"}"); + "{\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_setup_intent\",\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true,\"payout_method\":{\"id\":\"obj_123\",\"object\":\"v2.money_management.payout_method\",\"available_payout_speeds\":[\"standard\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":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.MoneyManagement.OutboundSetupIntents; @@ -8805,7 +8792,7 @@ public void TestV2MoneyManagementOutboundSetupIntentGet2() HttpMethod.Get, "/v2/money_management/outbound_setup_intents/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_setup_intent\",\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true,\"next_action\":null,\"payout_method\":{\"id\":\"obj_123\",\"object\":\"v2.money_management.payout_method\",\"available_payout_speeds\":[\"standard\"],\"bank_account\":null,\"card\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"latest_outbound_setup_intent\":null,\"livemode\":true,\"type\":\"bank_account\",\"usage_status\":{\"payments\":\"requires_action\",\"transfers\":\"invalid\"}},\"status\":\"requires_payout_method\",\"usage_intent\":\"payment\"}"); + "{\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_setup_intent\",\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true,\"payout_method\":{\"id\":\"obj_123\",\"object\":\"v2.money_management.payout_method\",\"available_payout_speeds\":[\"standard\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":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.MoneyManagement.OutboundSetupIntents; Stripe.V2.MoneyManagement.OutboundSetupIntent outboundSetupIntent = service @@ -8822,7 +8809,7 @@ public void TestV2MoneyManagementOutboundSetupIntentPost2() HttpMethod.Post, "/v2/money_management/outbound_setup_intents/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_setup_intent\",\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true,\"next_action\":null,\"payout_method\":{\"id\":\"obj_123\",\"object\":\"v2.money_management.payout_method\",\"available_payout_speeds\":[\"standard\"],\"bank_account\":null,\"card\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"latest_outbound_setup_intent\":null,\"livemode\":true,\"type\":\"bank_account\",\"usage_status\":{\"payments\":\"requires_action\",\"transfers\":\"invalid\"}},\"status\":\"requires_payout_method\",\"usage_intent\":\"payment\"}"); + "{\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_setup_intent\",\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true,\"payout_method\":{\"id\":\"obj_123\",\"object\":\"v2.money_management.payout_method\",\"available_payout_speeds\":[\"standard\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":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.MoneyManagement.OutboundSetupIntents; @@ -8840,7 +8827,7 @@ public void TestV2MoneyManagementOutboundSetupIntentPost3() HttpMethod.Post, "/v2/money_management/outbound_setup_intents/id_123/cancel", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_setup_intent\",\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true,\"next_action\":null,\"payout_method\":{\"id\":\"obj_123\",\"object\":\"v2.money_management.payout_method\",\"available_payout_speeds\":[\"standard\"],\"bank_account\":null,\"card\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"latest_outbound_setup_intent\":null,\"livemode\":true,\"type\":\"bank_account\",\"usage_status\":{\"payments\":\"requires_action\",\"transfers\":\"invalid\"}},\"status\":\"requires_payout_method\",\"usage_intent\":\"payment\"}"); + "{\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_setup_intent\",\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true,\"payout_method\":{\"id\":\"obj_123\",\"object\":\"v2.money_management.payout_method\",\"available_payout_speeds\":[\"standard\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":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.MoneyManagement.OutboundSetupIntents; Stripe.V2.MoneyManagement.OutboundSetupIntent outboundSetupIntent = service @@ -8857,7 +8844,7 @@ public void TestV2MoneyManagementOutboundTransferGet() HttpMethod.Get, "/v2/money_management/outbound_transfers", (HttpStatusCode)200, - "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_transfer\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"delivery_options\":null,\"description\":null,\"expected_arrival_date\":null,\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"livemode\":true,\"metadata\":null,\"receipt_url\":null,\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"status_details\":null,\"status_transitions\":null,\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\"},\"trace_id\":{\"status\":\"pending\",\"value\":null}}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"id\":\"obj_123\",\"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\"},\"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; Stripe.V2.StripeList outboundTransfers = service @@ -8874,7 +8861,7 @@ public void TestV2MoneyManagementOutboundTransferPost() HttpMethod.Post, "/v2/money_management/outbound_transfers", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_transfer\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"delivery_options\":null,\"description\":null,\"expected_arrival_date\":null,\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"livemode\":true,\"metadata\":null,\"receipt_url\":null,\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"status_details\":null,\"status_transitions\":null,\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\"},\"trace_id\":{\"status\":\"pending\",\"value\":null}}"); + "{\"id\":\"obj_123\",\"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\"},\"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 { Currency = "USD", Value = 96 }, @@ -8905,7 +8892,7 @@ public void TestV2MoneyManagementOutboundTransferGet2() HttpMethod.Get, "/v2/money_management/outbound_transfers/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_transfer\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"delivery_options\":null,\"description\":null,\"expected_arrival_date\":null,\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"livemode\":true,\"metadata\":null,\"receipt_url\":null,\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"status_details\":null,\"status_transitions\":null,\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\"},\"trace_id\":{\"status\":\"pending\",\"value\":null}}"); + "{\"id\":\"obj_123\",\"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\"},\"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.OutboundTransfers; Stripe.V2.MoneyManagement.OutboundTransfer outboundTransfer = service @@ -8922,7 +8909,7 @@ public void TestV2MoneyManagementOutboundTransferPost2() HttpMethod.Post, "/v2/money_management/outbound_transfers/id_123/cancel", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_transfer\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"delivery_options\":null,\"description\":null,\"expected_arrival_date\":null,\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"livemode\":true,\"metadata\":null,\"receipt_url\":null,\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"status_details\":null,\"status_transitions\":null,\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\"},\"trace_id\":{\"status\":\"pending\",\"value\":null}}"); + "{\"id\":\"obj_123\",\"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\"},\"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.OutboundTransfers; Stripe.V2.MoneyManagement.OutboundTransfer outboundTransfer = service @@ -8939,7 +8926,7 @@ public void TestV2MoneyManagementPayoutMethodGet() HttpMethod.Get, "/v2/money_management/payout_methods", (HttpStatusCode)200, - "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.money_management.payout_method\",\"available_payout_speeds\":[\"standard\"],\"bank_account\":null,\"card\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"latest_outbound_setup_intent\":null,\"livemode\":true,\"type\":\"bank_account\",\"usage_status\":{\"payments\":\"requires_action\",\"transfers\":\"invalid\"}}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.money_management.payout_method\",\"available_payout_speeds\":[\"standard\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":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.PayoutMethods; Stripe.V2.StripeList payoutMethods = service @@ -8956,7 +8943,7 @@ public void TestV2MoneyManagementPayoutMethodGet2() HttpMethod.Get, "/v2/money_management/payout_methods/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.money_management.payout_method\",\"available_payout_speeds\":[\"standard\"],\"bank_account\":null,\"card\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"latest_outbound_setup_intent\":null,\"livemode\":true,\"type\":\"bank_account\",\"usage_status\":{\"payments\":\"requires_action\",\"transfers\":\"invalid\"}}"); + "{\"id\":\"obj_123\",\"object\":\"v2.money_management.payout_method\",\"available_payout_speeds\":[\"standard\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true,\"type\":\"bank_account\",\"usage_status\":{\"payments\":\"requires_action\",\"transfers\":\"invalid\"}}"); var client = new StripeClient(this.Requestor); var service = client.V2.MoneyManagement.PayoutMethods; Stripe.V2.MoneyManagement.PayoutMethod payoutMethod = service.Get( @@ -8973,7 +8960,7 @@ public void TestV2MoneyManagementPayoutMethodPost() HttpMethod.Post, "/v2/money_management/payout_methods/id_123/archive", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.money_management.payout_method\",\"available_payout_speeds\":[\"standard\"],\"bank_account\":null,\"card\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"latest_outbound_setup_intent\":null,\"livemode\":true,\"type\":\"bank_account\",\"usage_status\":{\"payments\":\"requires_action\",\"transfers\":\"invalid\"}}"); + "{\"id\":\"obj_123\",\"object\":\"v2.money_management.payout_method\",\"available_payout_speeds\":[\"standard\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true,\"type\":\"bank_account\",\"usage_status\":{\"payments\":\"requires_action\",\"transfers\":\"invalid\"}}"); var client = new StripeClient(this.Requestor); var service = client.V2.MoneyManagement.PayoutMethods; Stripe.V2.MoneyManagement.PayoutMethod payoutMethod = service @@ -8990,7 +8977,7 @@ public void TestV2MoneyManagementPayoutMethodPost2() HttpMethod.Post, "/v2/money_management/payout_methods/id_123/unarchive", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.money_management.payout_method\",\"available_payout_speeds\":[\"standard\"],\"bank_account\":null,\"card\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"latest_outbound_setup_intent\":null,\"livemode\":true,\"type\":\"bank_account\",\"usage_status\":{\"payments\":\"requires_action\",\"transfers\":\"invalid\"}}"); + "{\"id\":\"obj_123\",\"object\":\"v2.money_management.payout_method\",\"available_payout_speeds\":[\"standard\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true,\"type\":\"bank_account\",\"usage_status\":{\"payments\":\"requires_action\",\"transfers\":\"invalid\"}}"); var client = new StripeClient(this.Requestor); var service = client.V2.MoneyManagement.PayoutMethods; Stripe.V2.MoneyManagement.PayoutMethod payoutMethod = service @@ -9027,7 +9014,7 @@ public void TestV2MoneyManagementReceivedCreditGet() HttpMethod.Get, "/v2/money_management/received_credits", (HttpStatusCode)200, - "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.money_management.received_credit\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"balance_transfer\":null,\"bank_transfer\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":null,\"financial_account\":\"financial_account\",\"livemode\":true,\"receipt_url\":null,\"status\":\"returned\",\"status_details\":null,\"status_transitions\":null,\"type\":\"balance_transfer\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.money_management.received_credit\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"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.ReceivedCredits; Stripe.V2.StripeList receivedCredits = service @@ -9044,7 +9031,7 @@ public void TestV2MoneyManagementReceivedCreditGet2() HttpMethod.Get, "/v2/money_management/received_credits/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.money_management.received_credit\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"balance_transfer\":null,\"bank_transfer\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":null,\"financial_account\":\"financial_account\",\"livemode\":true,\"receipt_url\":null,\"status\":\"returned\",\"status_details\":null,\"status_transitions\":null,\"type\":\"balance_transfer\"}"); + "{\"id\":\"obj_123\",\"object\":\"v2.money_management.received_credit\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"livemode\":true,\"status\":\"returned\",\"type\":\"balance_transfer\"}"); var client = new StripeClient(this.Requestor); var service = client.V2.MoneyManagement.ReceivedCredits; Stripe.V2.MoneyManagement.ReceivedCredit receivedCredit = service @@ -9061,7 +9048,7 @@ public void TestV2MoneyManagementReceivedDebitGet() HttpMethod.Get, "/v2/money_management/received_debits", (HttpStatusCode)200, - "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.money_management.received_debit\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"bank_transfer\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":null,\"financial_account\":\"financial_account\",\"livemode\":true,\"receipt_url\":null,\"status\":\"canceled\",\"status_details\":null,\"status_transitions\":null,\"type\":\"bank_transfer\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.money_management.received_debit\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"livemode\":true,\"status\":\"canceled\",\"type\":\"bank_transfer\"}],\"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 @@ -9078,7 +9065,7 @@ public void TestV2MoneyManagementReceivedDebitGet2() HttpMethod.Get, "/v2/money_management/received_debits/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.money_management.received_debit\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"bank_transfer\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":null,\"financial_account\":\"financial_account\",\"livemode\":true,\"receipt_url\":null,\"status\":\"canceled\",\"status_details\":null,\"status_transitions\":null,\"type\":\"bank_transfer\"}"); + "{\"id\":\"obj_123\",\"object\":\"v2.money_management.received_debit\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"livemode\":true,\"status\":\"canceled\",\"type\":\"bank_transfer\"}"); var client = new StripeClient(this.Requestor); var service = client.V2.MoneyManagement.ReceivedDebits; Stripe.V2.MoneyManagement.ReceivedDebit receivedDebit = service.Get( @@ -9095,7 +9082,7 @@ public void TestV2MoneyManagementTransactionGet() HttpMethod.Get, "/v2/money_management/transactions", (HttpStatusCode)200, - "{\"data\":[{\"id\":\"obj_123\",\"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\":\"received_debit\",\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"flow\":{\"type\":\"fee_transaction\",\"adjustment\":null,\"currency_conversion\":null,\"fee_transaction\":null,\"inbound_transfer\":null,\"outbound_payment\":null,\"outbound_transfer\":null,\"received_credit\":null,\"received_debit\":null},\"livemode\":true,\"status\":\"pending\",\"status_transitions\":{\"posted_at\":null,\"void_at\":null}}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"id\":\"obj_123\",\"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\":\"received_debit\",\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"flow\":{\"type\":\"fee_transaction\"},\"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.Transactions; Stripe.V2.StripeList transactions = service @@ -9112,7 +9099,7 @@ public void TestV2MoneyManagementTransactionGet2() HttpMethod.Get, "/v2/money_management/transactions/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"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\":\"received_debit\",\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"flow\":{\"type\":\"fee_transaction\",\"adjustment\":null,\"currency_conversion\":null,\"fee_transaction\":null,\"inbound_transfer\":null,\"outbound_payment\":null,\"outbound_transfer\":null,\"received_credit\":null,\"received_debit\":null},\"livemode\":true,\"status\":\"pending\",\"status_transitions\":{\"posted_at\":null,\"void_at\":null}}"); + "{\"id\":\"obj_123\",\"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\":\"received_debit\",\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"flow\":{\"type\":\"fee_transaction\"},\"livemode\":true,\"status\":\"pending\",\"status_transitions\":{}}"); var client = new StripeClient(this.Requestor); var service = client.V2.MoneyManagement.Transactions; Stripe.V2.MoneyManagement.Transaction transaction = service.Get( @@ -9129,7 +9116,7 @@ public void TestV2MoneyManagementTransactionEntryGet() HttpMethod.Get, "/v2/money_management/transaction_entries", (HttpStatusCode)200, - "{\"data\":[{\"id\":\"obj_123\",\"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\",\"livemode\":true,\"transaction\":\"transaction\",\"transaction_details\":{\"category\":\"received_debit\",\"financial_account\":\"financial_account\",\"flow\":{\"type\":\"fee_transaction\",\"adjustment\":null,\"currency_conversion\":null,\"fee_transaction\":null,\"inbound_transfer\":null,\"outbound_payment\":null,\"outbound_transfer\":null,\"received_credit\":null,\"received_debit\":null}}}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"id\":\"obj_123\",\"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\",\"livemode\":true,\"transaction\":\"transaction\",\"transaction_details\":{\"category\":\"received_debit\",\"financial_account\":\"financial_account\",\"flow\":{\"type\":\"fee_transaction\"}}}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); var service = client.V2.MoneyManagement.TransactionEntries; Stripe.V2.StripeList transactionEntries = service @@ -9146,7 +9133,7 @@ public void TestV2MoneyManagementTransactionEntryGet2() HttpMethod.Get, "/v2/money_management/transaction_entries/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"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\",\"livemode\":true,\"transaction\":\"transaction\",\"transaction_details\":{\"category\":\"received_debit\",\"financial_account\":\"financial_account\",\"flow\":{\"type\":\"fee_transaction\",\"adjustment\":null,\"currency_conversion\":null,\"fee_transaction\":null,\"inbound_transfer\":null,\"outbound_payment\":null,\"outbound_transfer\":null,\"received_credit\":null,\"received_debit\":null}}}"); + "{\"id\":\"obj_123\",\"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\",\"livemode\":true,\"transaction\":\"transaction\",\"transaction_details\":{\"category\":\"received_debit\",\"financial_account\":\"financial_account\",\"flow\":{\"type\":\"fee_transaction\"}}}"); var client = new StripeClient(this.Requestor); var service = client.V2.MoneyManagement.TransactionEntries; Stripe.V2.MoneyManagement.TransactionEntry transactionEntry = service @@ -9163,7 +9150,7 @@ public void TestV2PaymentsOffSessionPaymentGet() HttpMethod.Get, "/v2/payments/off_session_payments", (HttpStatusCode)200, - "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.payments.off_session_payment\",\"amount_requested\":{\"currency\":\"USD\",\"value\":47},\"cadence\":\"unscheduled\",\"compartment_id\":\"compartment_id\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"failure_reason\":null,\"last_authorization_attempt_error\":null,\"latest_payment_attempt_record\":null,\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"on_behalf_of\":null,\"payment_method\":\"payment_method\",\"payment_record\":null,\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"none\"},\"statement_descriptor\":null,\"statement_descriptor_suffix\":null,\"status\":\"pending\",\"test_clock\":null,\"transfer_data\":null}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.payments.off_session_payment\",\"amount_requested\":{\"currency\":\"USD\",\"value\":47},\"cadence\":\"unscheduled\",\"compartment_id\":\"compartment_id\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"payment_method\":\"payment_method\",\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"none\"},\"status\":\"pending\"}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); var service = client.V2.Payments.OffSessionPayments; Stripe.V2.StripeList offSessionPayments = service @@ -9180,7 +9167,7 @@ public void TestV2PaymentsOffSessionPaymentPost() HttpMethod.Post, "/v2/payments/off_session_payments", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.payments.off_session_payment\",\"amount_requested\":{\"currency\":\"USD\",\"value\":47},\"cadence\":\"unscheduled\",\"compartment_id\":\"compartment_id\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"failure_reason\":null,\"last_authorization_attempt_error\":null,\"latest_payment_attempt_record\":null,\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"on_behalf_of\":null,\"payment_method\":\"payment_method\",\"payment_record\":null,\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"none\"},\"statement_descriptor\":null,\"statement_descriptor_suffix\":null,\"status\":\"pending\",\"test_clock\":null,\"transfer_data\":null}"); + "{\"id\":\"obj_123\",\"object\":\"v2.payments.off_session_payment\",\"amount_requested\":{\"currency\":\"USD\",\"value\":47},\"cadence\":\"unscheduled\",\"compartment_id\":\"compartment_id\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"payment_method\":\"payment_method\",\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"none\"},\"status\":\"pending\"}"); var options = new Stripe.V2.Payments.OffSessionPaymentCreateOptions { Amount = new Stripe.V2.Amount { Currency = "USD", Value = 96 }, @@ -9208,7 +9195,7 @@ public void TestV2PaymentsOffSessionPaymentGet2() HttpMethod.Get, "/v2/payments/off_session_payments/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.payments.off_session_payment\",\"amount_requested\":{\"currency\":\"USD\",\"value\":47},\"cadence\":\"unscheduled\",\"compartment_id\":\"compartment_id\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"failure_reason\":null,\"last_authorization_attempt_error\":null,\"latest_payment_attempt_record\":null,\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"on_behalf_of\":null,\"payment_method\":\"payment_method\",\"payment_record\":null,\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"none\"},\"statement_descriptor\":null,\"statement_descriptor_suffix\":null,\"status\":\"pending\",\"test_clock\":null,\"transfer_data\":null}"); + "{\"id\":\"obj_123\",\"object\":\"v2.payments.off_session_payment\",\"amount_requested\":{\"currency\":\"USD\",\"value\":47},\"cadence\":\"unscheduled\",\"compartment_id\":\"compartment_id\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"payment_method\":\"payment_method\",\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"none\"},\"status\":\"pending\"}"); var client = new StripeClient(this.Requestor); var service = client.V2.Payments.OffSessionPayments; Stripe.V2.Payments.OffSessionPayment offSessionPayment = service @@ -9225,7 +9212,7 @@ public void TestV2PaymentsOffSessionPaymentPost2() HttpMethod.Post, "/v2/payments/off_session_payments/id_123/cancel", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.payments.off_session_payment\",\"amount_requested\":{\"currency\":\"USD\",\"value\":47},\"cadence\":\"unscheduled\",\"compartment_id\":\"compartment_id\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"failure_reason\":null,\"last_authorization_attempt_error\":null,\"latest_payment_attempt_record\":null,\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"on_behalf_of\":null,\"payment_method\":\"payment_method\",\"payment_record\":null,\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"none\"},\"statement_descriptor\":null,\"statement_descriptor_suffix\":null,\"status\":\"pending\",\"test_clock\":null,\"transfer_data\":null}"); + "{\"id\":\"obj_123\",\"object\":\"v2.payments.off_session_payment\",\"amount_requested\":{\"currency\":\"USD\",\"value\":47},\"cadence\":\"unscheduled\",\"compartment_id\":\"compartment_id\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"payment_method\":\"payment_method\",\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"none\"},\"status\":\"pending\"}"); var client = new StripeClient(this.Requestor); var service = client.V2.Payments.OffSessionPayments; Stripe.V2.Payments.OffSessionPayment offSessionPayment = service @@ -9235,71 +9222,6 @@ public void TestV2PaymentsOffSessionPaymentPost2() "/v2/payments/off_session_payments/id_123/cancel"); } - [Fact] - public void TestV2ReportingReportGet() - { - this.StubRequest( - HttpMethod.Get, - "/v2/reporting/reports/id_123", - (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.reporting.report\",\"livemode\":true,\"name\":\"name\",\"parameters\":{\"key\":{\"array_details\":null,\"description\":\"description\",\"enum_details\":null,\"required\":true,\"timestamp_details\":null,\"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 void TestV2ReportingReportRunPost() - { - this.StubRequest( - HttpMethod.Post, - "/v2/reporting/report_runs", - (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.reporting.report_run\",\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true,\"report\":\"report\",\"report_name\":\"report_name\",\"report_parameters\":{\"key\":{\"array_value\":null,\"string_value\":null,\"timestamp_value\":null}},\"result\":null,\"result_options\":null,\"status\":\"failed\",\"status_details\":{\"key\":{\"error_code\":null,\"error_message\":null}}}"); - var options = new Stripe.V2.Reporting.ReportRunCreateOptions - { - Report = "report", - ReportParameters = new Dictionary - { - { - "key", - new Stripe.V2.Reporting.ReportRunCreateReportParametersOptions - { - ArrayValue = new Stripe.V2.Reporting.ReportRunCreateReportParametersArrayValueOptions - { - Items = new List { "items" }, - }, - StringValue = "string_value", - TimestampValue = DateTimeOffset.Parse( - "1970-01-14T02:07:39.256Z") - .UtcDateTime, - } - }, - }, - }; - var client = new StripeClient(this.Requestor); - 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 TestV2ReportingReportRunGet() - { - this.StubRequest( - HttpMethod.Get, - "/v2/reporting/report_runs/id_123", - (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.reporting.report_run\",\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true,\"report\":\"report\",\"report_name\":\"report_name\",\"report_parameters\":{\"key\":{\"array_value\":null,\"string_value\":null,\"timestamp_value\":null}},\"result\":null,\"result_options\":null,\"status\":\"failed\",\"status_details\":{\"key\":{\"error_code\":null,\"error_message\":null}}}"); - var client = new StripeClient(this.Requestor); - var service = client.V2.Reporting.ReportRuns; - Stripe.V2.Reporting.ReportRun reportRun = service.Get("id_123"); - this.AssertRequest( - HttpMethod.Get, - "/v2/reporting/report_runs/id_123"); - } - [Fact] public void TestV2TaxAutomaticRulePost() { @@ -9446,10 +9368,10 @@ public void TestAlreadyCanceledError() var exception = Assert.Throws( () => { - var client = new StripeClient(this.Requestor); - var service = client.V2.MoneyManagement.OutboundPayments; - Stripe.V2.MoneyManagement.OutboundPayment outboundPayment = service - .Cancel("id_123"); + var client = new StripeClient(this.Requestor); + var service = client.V2.MoneyManagement.OutboundPayments; + Stripe.V2.MoneyManagement.OutboundPayment outboundPayment = service + .Cancel("id_123"); }); this.AssertRequest( HttpMethod.Post, @@ -9467,14 +9389,14 @@ public void TestAlreadyExistsError() var exception = Assert.Throws( () => { - 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 = service - .Create(options); + 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 = service + .Create(options); }); this.AssertRequest( HttpMethod.Post, @@ -9488,18 +9410,18 @@ public void TestBlockedByStripeError() HttpMethod.Post, "/v2/core/vault/us_bank_accounts", (HttpStatusCode)400, - "{\"error\":{\"type\":\"blocked_by_stripe\",\"code\":\"inbound_transfer_not_allowed\"}}"); + "{\"error\":{\"type\":\"blocked_by_stripe\",\"code\":\"blocked_payout_method_bank_account\"}}"); var exception = Assert.Throws( () => { - var options = new Stripe.V2.Core.Vault.UsBankAccountCreateOptions - { - AccountNumber = "account_number", - }; - var client = new StripeClient(this.Requestor); - var service = client.V2.Core.Vault.UsBankAccounts; - Stripe.V2.Core.Vault.UsBankAccount usBankAccount = service.Create( - options); + var options = new Stripe.V2.Core.Vault.UsBankAccountCreateOptions + { + AccountNumber = "account_number", + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Vault.UsBankAccounts; + Stripe.V2.Core.Vault.UsBankAccount usBankAccount = service.Create( + options); }); this.AssertRequest( HttpMethod.Post, @@ -9517,10 +9439,10 @@ public void TestControlledByDashboardError() var exception = Assert.Throws( () => { - var client = new StripeClient(this.Requestor); - var service = client.V2.Core.Vault.UsBankAccounts; - Stripe.V2.Core.Vault.UsBankAccount usBankAccount = service.Archive( - "id_123"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Vault.UsBankAccounts; + Stripe.V2.Core.Vault.UsBankAccount usBankAccount = service.Archive( + "id_123"); }); this.AssertRequest( HttpMethod.Post, @@ -9534,18 +9456,18 @@ public void TestFeatureNotEnabledError() HttpMethod.Post, "/v2/money_management/financial_accounts", (HttpStatusCode)400, - "{\"error\":{\"type\":\"feature_not_enabled\",\"code\":\"storer_capability_missing\"}}"); + "{\"error\":{\"type\":\"feature_not_enabled\",\"code\":\"recipient_feature_not_active\"}}"); var exception = Assert.Throws( () => { - 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 = service - .Create(options); + 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 = service + .Create(options); }); this.AssertRequest( HttpMethod.Post, @@ -9563,15 +9485,15 @@ public void TestFinancialAccountNotOpenError() var exception = Assert.Throws( () => { - var options = new Stripe.V2.MoneyManagement.FinancialAddressCreateOptions - { - Currency = "stn", - FinancialAccount = "financial_account", - }; - var client = new StripeClient(this.Requestor); - var service = client.V2.MoneyManagement.FinancialAddresses; - Stripe.V2.MoneyManagement.FinancialAddress financialAddress = service - .Create(options); + var options = new Stripe.V2.MoneyManagement.FinancialAddressCreateOptions + { + Currency = "usd", + FinancialAccount = "financial_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, @@ -9589,23 +9511,23 @@ public void TestInsufficientFundsError() var exception = Assert.Throws( () => { - var options = new Stripe.V2.MoneyManagement.OutboundPaymentCreateOptions - { - Amount = new Stripe.V2.Amount { Currency = "USD", Value = 96 }, - From = new Stripe.V2.MoneyManagement.OutboundPaymentCreateFromOptions + var options = new Stripe.V2.MoneyManagement.OutboundPaymentCreateOptions { - 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 = service - .Create(options); + Amount = new Stripe.V2.Amount { Currency = "USD", Value = 96 }, + 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 = service + .Create(options); }); this.AssertRequest( HttpMethod.Post, @@ -9623,14 +9545,14 @@ public void TestInvalidPaymentMethodError() var exception = Assert.Throws( () => { - var options = new Stripe.V2.Core.Vault.UsBankAccountCreateOptions - { - AccountNumber = "account_number", - }; - var client = new StripeClient(this.Requestor); - var service = client.V2.Core.Vault.UsBankAccounts; - Stripe.V2.Core.Vault.UsBankAccount usBankAccount = service.Create( - options); + var options = new Stripe.V2.Core.Vault.UsBankAccountCreateOptions + { + AccountNumber = "account_number", + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Vault.UsBankAccounts; + Stripe.V2.Core.Vault.UsBankAccount usBankAccount = service.Create( + options); }); this.AssertRequest( HttpMethod.Post, @@ -9648,11 +9570,11 @@ public void TestInvalidPayoutMethodError() var exception = Assert.Throws( () => { - var options = new Stripe.V2.MoneyManagement.OutboundSetupIntentCreateOptions(); - var client = new StripeClient(this.Requestor); - var service = client.V2.MoneyManagement.OutboundSetupIntents; - Stripe.V2.MoneyManagement.OutboundSetupIntent outboundSetupIntent = service - .Create(options); + var options = new Stripe.V2.MoneyManagement.OutboundSetupIntentCreateOptions(); + var client = new StripeClient(this.Requestor); + var service = client.V2.MoneyManagement.OutboundSetupIntents; + Stripe.V2.MoneyManagement.OutboundSetupIntent outboundSetupIntent = service + .Create(options); }); this.AssertRequest( HttpMethod.Post, @@ -9670,10 +9592,10 @@ public void TestNonZeroBalanceError() var exception = Assert.Throws( () => { - var client = new StripeClient(this.Requestor); - var service = client.V2.MoneyManagement.FinancialAccounts; - Stripe.V2.MoneyManagement.FinancialAccount financialAccount = service - .Close("id_123"); + var client = new StripeClient(this.Requestor); + var service = client.V2.MoneyManagement.FinancialAccounts; + Stripe.V2.MoneyManagement.FinancialAccount financialAccount = service + .Close("id_123"); }); this.AssertRequest( HttpMethod.Post, @@ -9691,10 +9613,10 @@ public void TestNotCancelableError() var exception = Assert.Throws( () => { - var client = new StripeClient(this.Requestor); - var service = client.V2.MoneyManagement.OutboundPayments; - Stripe.V2.MoneyManagement.OutboundPayment outboundPayment = service - .Cancel("id_123"); + var client = new StripeClient(this.Requestor); + var service = client.V2.MoneyManagement.OutboundPayments; + Stripe.V2.MoneyManagement.OutboundPayment outboundPayment = service + .Cancel("id_123"); }); this.AssertRequest( HttpMethod.Post, @@ -9708,53 +9630,24 @@ public void TestQuotaExceededError() HttpMethod.Post, "/v2/core/vault/us_bank_accounts", (HttpStatusCode)400, - "{\"error\":{\"type\":\"quota_exceeded\",\"code\":\"recipient_amount_limit_exceeded\"}}"); + "{\"error\":{\"type\":\"quota_exceeded\",\"code\":\"archived_payout_method_card\"}}"); var exception = Assert.Throws( () => { - var options = new Stripe.V2.Core.Vault.UsBankAccountCreateOptions - { - AccountNumber = "account_number", - }; - var client = new StripeClient(this.Requestor); - var service = client.V2.Core.Vault.UsBankAccounts; - Stripe.V2.Core.Vault.UsBankAccount usBankAccount = service.Create( - options); + var options = new Stripe.V2.Core.Vault.UsBankAccountCreateOptions + { + AccountNumber = "account_number", + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Vault.UsBankAccounts; + Stripe.V2.Core.Vault.UsBankAccount usBankAccount = service.Create( + options); }); this.AssertRequest( HttpMethod.Post, "/v2/core/vault/us_bank_accounts"); } - [Fact] - public void TestRateLimitError() - { - this.StubRequest( - HttpMethod.Post, - "/v2/reporting/report_runs", - (HttpStatusCode)400, - "{\"error\":{\"type\":\"rate_limit\",\"code\":\"report_run_rate_limit_exceeded\"}}"); - var exception = Assert.Throws( - () => - { - var options = new Stripe.V2.Reporting.ReportRunCreateOptions - { - Report = "report", - ReportParameters = new Dictionary - { - { - "key", - new Stripe.V2.Reporting.ReportRunCreateReportParametersOptions() - }, - }, - }; - var client = new StripeClient(this.Requestor); - 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 TestRecipientNotNotifiableError() { @@ -9766,23 +9659,23 @@ public void TestRecipientNotNotifiableError() var exception = Assert.Throws( () => { - var options = new Stripe.V2.MoneyManagement.OutboundPaymentCreateOptions - { - Amount = new Stripe.V2.Amount { Currency = "USD", Value = 96 }, - From = new Stripe.V2.MoneyManagement.OutboundPaymentCreateFromOptions + var options = new Stripe.V2.MoneyManagement.OutboundPaymentCreateOptions { - 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 = service - .Create(options); + Amount = new Stripe.V2.Amount { Currency = "USD", Value = 96 }, + 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 = service + .Create(options); }); this.AssertRequest( HttpMethod.Post, @@ -9800,9 +9693,9 @@ public void TestTemporarySessionExpiredError() var exception = Assert.Throws( () => { - var options = new Stripe.V2.Billing.MeterEventStreamCreateOptions - { - Events = new List + var options = new Stripe.V2.Billing.MeterEventStreamCreateOptions + { + Events = new List { new Stripe.V2.Billing.MeterEventStreamCreateEventOptions { @@ -9813,10 +9706,10 @@ public void TestTemporarySessionExpiredError() }, }, }, - }; - var client = new StripeClient(this.Requestor); - var service = client.V2.Billing.MeterEventStream; - service.Create(options); + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.MeterEventStream; + service.Create(options); }); this.AssertRequest( HttpMethod.Post,