From 59e9bbd8989b336358631c0a3762f83fa4eb0fed Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 28 Apr 2026 23:10:35 +0000 Subject: [PATCH 1/4] Update generated code for v2254 and --- CODEGEN_VERSION | 2 +- OPENAPI_VERSION | 2 +- .../Services/V2/{DatumService.cs => DataService.cs} | 6 +++--- src/Stripe.net/Services/V2Services.cs | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) rename src/Stripe.net/Services/V2/{DatumService.cs => DataService.cs} (75%) diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index 4540bccf09..0a10ecafbf 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -826bf48af8bcd391512daeaf283b8486347b14c8 \ No newline at end of file +3ac0dc357d86c95bbba40ca9818f5eacf4d0a405 \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 97a2932083..1ae2e8d30e 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2253 \ No newline at end of file +v2254 \ No newline at end of file diff --git a/src/Stripe.net/Services/V2/DatumService.cs b/src/Stripe.net/Services/V2/DataService.cs similarity index 75% rename from src/Stripe.net/Services/V2/DatumService.cs rename to src/Stripe.net/Services/V2/DataService.cs index bedfe79a88..eac2ad55a0 100644 --- a/src/Stripe.net/Services/V2/DatumService.cs +++ b/src/Stripe.net/Services/V2/DataService.cs @@ -5,16 +5,16 @@ namespace Stripe.V2 using System.Threading; using System.Threading.Tasks; - public class DatumService : Service + public class DataService : Service { private V2.Data.ReportingService reporting; - internal DatumService(ApiRequestor requestor) + internal DataService(ApiRequestor requestor) : base(requestor) { } - internal DatumService(IStripeClient client) + internal DataService(IStripeClient client) : base(client) { } diff --git a/src/Stripe.net/Services/V2Services.cs b/src/Stripe.net/Services/V2Services.cs index 8cf0290a75..b5d9486b7b 100644 --- a/src/Stripe.net/Services/V2Services.cs +++ b/src/Stripe.net/Services/V2Services.cs @@ -10,7 +10,7 @@ public class V2Services : Service private V2.BillingService billing; private V2.CommerceService commerce; private V2.CoreService core; - private V2.DatumService data; + private V2.DataService data; private V2.ExtendService extend; private V2.IamService iam; private V2.MoneyManagementService moneyManagement; @@ -37,7 +37,7 @@ internal V2Services(IStripeClient client) public virtual V2.CoreService Core => this.core ??= new V2.CoreService( this.Requestor); - public virtual V2.DatumService Data => this.data ??= new V2.DatumService( + public virtual V2.DataService Data => this.data ??= new V2.DataService( this.Requestor); public virtual V2.ExtendService Extend => this.extend ??= new V2.ExtendService( From 39d7df797e605575cc22ce9f3eeef1a5ecc109b0 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 29 Apr 2026 18:55:58 +0000 Subject: [PATCH 2/4] Update generated code for v2254 and --- CODEGEN_VERSION | 2 +- src/Examples/V2/EventNotificationHandlerEndpoint.cs | 1 + src/Stripe.net/Entities/V2/Core/EventNotification.cs | 3 ++- src/Stripe.net/Entities/V2/Core/EventNotificationReason.cs | 3 ++- .../Entities/V2/Core/EventNotificationReasonRequest.cs | 3 ++- .../Entities/V2/Core/EventNotificationRelatedObject.cs | 3 ++- src/Stripe.net/Events/UnknownEventNotification.cs | 3 ++- .../JsonConverters/STJV2EventNotificationConverter.cs | 1 + .../JsonConverters/V2EventNotificationConverter.cs | 1 + .../Infrastructure/Public/StripeEventNotificationEventArgs.cs | 1 + .../Infrastructure/Public/StripeEventNotificationHandler.cs | 1 + .../StripeUnhandledEventNotificationEventArgs.cs | 1 + src/Stripe.net/Infrastructure/UnhandledNotificationDetails.cs | 1 + .../Public/StripeEventNotificationHandlerTest.cs | 1 + 14 files changed, 19 insertions(+), 6 deletions(-) diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index 0a10ecafbf..8c73944537 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -3ac0dc357d86c95bbba40ca9818f5eacf4d0a405 \ No newline at end of file +607324895d7883d4a5f04f3c29c26faa09cd31d3 \ No newline at end of file diff --git a/src/Examples/V2/EventNotificationHandlerEndpoint.cs b/src/Examples/V2/EventNotificationHandlerEndpoint.cs index 83b311746f..14be65630d 100644 --- a/src/Examples/V2/EventNotificationHandlerEndpoint.cs +++ b/src/Examples/V2/EventNotificationHandlerEndpoint.cs @@ -1,3 +1,4 @@ +// File copied from our code generator; changes here will be overwritten. namespace Examples.V2 { #pragma warning disable SA1101 // Prefix local calls with this diff --git a/src/Stripe.net/Entities/V2/Core/EventNotification.cs b/src/Stripe.net/Entities/V2/Core/EventNotification.cs index 954ce83ea1..0a3ec3b574 100644 --- a/src/Stripe.net/Entities/V2/Core/EventNotification.cs +++ b/src/Stripe.net/Entities/V2/Core/EventNotification.cs @@ -1,3 +1,4 @@ +// File copied from our code generator; changes here will be overwritten. namespace Stripe.V2.Core { using System; @@ -133,4 +134,4 @@ protected virtual async Task FetchRelatedObjectAsync(EventNotificationRela return this.Client.Deserialize(res.Content); } } -} \ No newline at end of file +} diff --git a/src/Stripe.net/Entities/V2/Core/EventNotificationReason.cs b/src/Stripe.net/Entities/V2/Core/EventNotificationReason.cs index b516dcc395..96452cfb51 100644 --- a/src/Stripe.net/Entities/V2/Core/EventNotificationReason.cs +++ b/src/Stripe.net/Entities/V2/Core/EventNotificationReason.cs @@ -1,3 +1,4 @@ +// File copied from our code generator; changes here will be overwritten. namespace Stripe.V2.Core { using Newtonsoft.Json; @@ -22,4 +23,4 @@ public class EventNotificationReason [STJS.JsonPropertyName("request")] public EventNotificationReasonRequest Request { get; set; } } -} \ No newline at end of file +} diff --git a/src/Stripe.net/Entities/V2/Core/EventNotificationReasonRequest.cs b/src/Stripe.net/Entities/V2/Core/EventNotificationReasonRequest.cs index 7dd041264a..b7924b57e0 100644 --- a/src/Stripe.net/Entities/V2/Core/EventNotificationReasonRequest.cs +++ b/src/Stripe.net/Entities/V2/Core/EventNotificationReasonRequest.cs @@ -1,3 +1,4 @@ +// File copied from our code generator; changes here will be overwritten. namespace Stripe.V2.Core { using Newtonsoft.Json; @@ -22,4 +23,4 @@ public class EventNotificationReasonRequest [STJS.JsonPropertyName("idempotency_key")] public string IdempotencyKey { get; set; } } -} \ No newline at end of file +} diff --git a/src/Stripe.net/Entities/V2/Core/EventNotificationRelatedObject.cs b/src/Stripe.net/Entities/V2/Core/EventNotificationRelatedObject.cs index 44ad787c7d..5ace899f02 100644 --- a/src/Stripe.net/Entities/V2/Core/EventNotificationRelatedObject.cs +++ b/src/Stripe.net/Entities/V2/Core/EventNotificationRelatedObject.cs @@ -1,3 +1,4 @@ +// File copied from our code generator; changes here will be overwritten. #nullable disable namespace Stripe.V2.Core @@ -22,4 +23,4 @@ public class EventNotificationRelatedObject [STJS.JsonInclude] public string Url { get; internal set; } } -} \ No newline at end of file +} diff --git a/src/Stripe.net/Events/UnknownEventNotification.cs b/src/Stripe.net/Events/UnknownEventNotification.cs index 8a62979b19..79feb2cb0a 100644 --- a/src/Stripe.net/Events/UnknownEventNotification.cs +++ b/src/Stripe.net/Events/UnknownEventNotification.cs @@ -1,3 +1,4 @@ +// File copied from our code generator; changes here will be overwritten. namespace Stripe.Events { using System; @@ -51,4 +52,4 @@ public Task FetchRelatedObjectAsync() return this.FetchRelatedObjectAsync(this.RelatedObject); } } -} \ No newline at end of file +} diff --git a/src/Stripe.net/Infrastructure/JsonConverters/STJV2EventNotificationConverter.cs b/src/Stripe.net/Infrastructure/JsonConverters/STJV2EventNotificationConverter.cs index 5c1bc08d68..c646626d79 100644 --- a/src/Stripe.net/Infrastructure/JsonConverters/STJV2EventNotificationConverter.cs +++ b/src/Stripe.net/Infrastructure/JsonConverters/STJV2EventNotificationConverter.cs @@ -1,3 +1,4 @@ +// File copied from our code generator; changes here will be overwritten. namespace Stripe.Infrastructure { using System; diff --git a/src/Stripe.net/Infrastructure/JsonConverters/V2EventNotificationConverter.cs b/src/Stripe.net/Infrastructure/JsonConverters/V2EventNotificationConverter.cs index d1dc2073f8..e6817b5092 100644 --- a/src/Stripe.net/Infrastructure/JsonConverters/V2EventNotificationConverter.cs +++ b/src/Stripe.net/Infrastructure/JsonConverters/V2EventNotificationConverter.cs @@ -1,3 +1,4 @@ +// File copied from our code generator; changes here will be overwritten. namespace Stripe.Infrastructure { using System; diff --git a/src/Stripe.net/Infrastructure/Public/StripeEventNotificationEventArgs.cs b/src/Stripe.net/Infrastructure/Public/StripeEventNotificationEventArgs.cs index d374a41579..694c91e0fa 100644 --- a/src/Stripe.net/Infrastructure/Public/StripeEventNotificationEventArgs.cs +++ b/src/Stripe.net/Infrastructure/Public/StripeEventNotificationEventArgs.cs @@ -1,3 +1,4 @@ +// File copied from our code generator; changes here will be overwritten. namespace Stripe { using System; diff --git a/src/Stripe.net/Infrastructure/Public/StripeEventNotificationHandler.cs b/src/Stripe.net/Infrastructure/Public/StripeEventNotificationHandler.cs index d593fc0fdb..c10c45e859 100644 --- a/src/Stripe.net/Infrastructure/Public/StripeEventNotificationHandler.cs +++ b/src/Stripe.net/Infrastructure/Public/StripeEventNotificationHandler.cs @@ -1,3 +1,4 @@ +// File copied from our code generator; changes here will be overwritten. namespace Stripe { using System; diff --git a/src/Stripe.net/Infrastructure/StripeUnhandledEventNotificationEventArgs.cs b/src/Stripe.net/Infrastructure/StripeUnhandledEventNotificationEventArgs.cs index a3ce7d9360..f1f19e7588 100644 --- a/src/Stripe.net/Infrastructure/StripeUnhandledEventNotificationEventArgs.cs +++ b/src/Stripe.net/Infrastructure/StripeUnhandledEventNotificationEventArgs.cs @@ -1,3 +1,4 @@ +// File copied from our code generator; changes here will be overwritten. namespace Stripe { using System; diff --git a/src/Stripe.net/Infrastructure/UnhandledNotificationDetails.cs b/src/Stripe.net/Infrastructure/UnhandledNotificationDetails.cs index d4d463f302..bb4e0a2fa6 100644 --- a/src/Stripe.net/Infrastructure/UnhandledNotificationDetails.cs +++ b/src/Stripe.net/Infrastructure/UnhandledNotificationDetails.cs @@ -1,3 +1,4 @@ +// File copied from our code generator; changes here will be overwritten. namespace Stripe { /// diff --git a/src/StripeTests/Infrastructure/Public/StripeEventNotificationHandlerTest.cs b/src/StripeTests/Infrastructure/Public/StripeEventNotificationHandlerTest.cs index 386f315145..e1c05d7aea 100644 --- a/src/StripeTests/Infrastructure/Public/StripeEventNotificationHandlerTest.cs +++ b/src/StripeTests/Infrastructure/Public/StripeEventNotificationHandlerTest.cs @@ -1,3 +1,4 @@ +// File copied from our code generator; changes here will be overwritten. namespace StripeTests { using System; From 01ca58c4f53f9eade71eee2c8884b5b7a5cf44d4 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Sun, 24 May 2026 14:26:19 +0000 Subject: [PATCH 3/4] Update generated code for v2276 and 9e9ef9ec9df30a59ccafb74c27b81311fa2896d5 --- CODEGEN_VERSION | 2 +- OPENAPI_VERSION | 2 +- src/Stripe.net/Constants/ApiVersion.cs | 2 +- .../Entities/Accounts/AccountCapabilities.cs | 18 +++ .../BalanceSettingsPaymentsPayouts.cs | 8 ++ ...PayoutsAutomaticTransferRulesByCurrency.cs | 35 ++++++ ...BalanceSettingsPaymentsSettlementTiming.cs | 10 ++ ...tingsPaymentsSettlementTimingStartOfDay.cs | 38 ++++++ .../Charges/ChargePaymentMethodDetails.cs | 8 ++ .../ChargePaymentMethodDetailsBizum.cs | 18 +++ .../ChargePaymentMethodDetailsScalapay.cs | 18 +++ .../ChargePaymentMethodDetailsTwint.cs | 6 + .../Entities/Checkout/Sessions/Session.cs | 22 ++-- .../Sessions/SessionConsentCollection.cs | 2 +- .../Sessions/SessionPaymentMethodOptions.cs | 4 + ...ionPaymentMethodOptionsCardRestrictions.cs | 4 +- .../SessionPaymentMethodOptionsScalapay.cs | 18 +++ .../SessionPaymentMethodOptionsTwint.cs | 1 + .../ConfirmationTokenPaymentMethodPreview.cs | 16 ++- ...firmationTokenPaymentMethodPreviewBizum.cs | 12 ++ ...mationTokenPaymentMethodPreviewScalapay.cs | 12 ++ src/Stripe.net/Entities/Discounts/Discount.cs | 4 +- .../InvoiceItemProrationDetails.cs | 8 ++ ...nvoiceItemProrationDetailsCreditedItems.cs | 32 ++++++ ...ailsCreditedItemsInvoiceLineItemDetails.cs | 27 +++++ src/Stripe.net/Entities/Invoices/Invoice.cs | 7 ++ .../Invoices/InvoicePaymentSettings.cs | 4 +- .../Entities/Issuing/Disputes/Dispute.cs | 3 +- .../PersonalizationDesign.cs | 8 +- .../Issuing/Settlements/Settlement.cs | 4 +- .../Mandates/MandatePaymentMethodDetails.cs | 4 + .../MandatePaymentMethodDetailsTwint.cs | 12 ++ ...aymentAttemptRecordPaymentMethodDetails.cs | 8 ++ ...tAttemptRecordPaymentMethodDetailsBizum.cs | 18 +++ ...rdPaymentMethodDetailsRevolutPayFunding.cs | 2 +- ...temptRecordPaymentMethodDetailsScalapay.cs | 18 +++ ...tAttemptRecordPaymentMethodDetailsTwint.cs | 6 + .../Entities/PaymentIntents/PaymentIntent.cs | 9 +- .../PaymentIntentAmountDetailsShipping.cs | 4 +- .../PaymentIntents/PaymentIntentNextAction.cs | 4 + .../PaymentIntentNextActionBlikAuthorize.cs | 12 ++ .../PaymentIntentPaymentMethodOptions.cs | 8 ++ .../PaymentIntentPaymentMethodOptionsBizum.cs | 12 ++ ...ymentIntentPaymentMethodOptionsScalapay.cs | 18 +++ .../PaymentIntentPaymentMethodOptionsTwint.cs | 1 + .../PaymentIntentTransferData.cs | 23 +++- .../PaymentIntentTransferDataPaymentData.cs | 29 +++++ .../Entities/PaymentLinks/PaymentLink.cs | 24 ++-- .../PaymentLinkPaymentMethodOptions.cs | 18 +++ .../PaymentLinkPaymentMethodOptionsCard.cs | 19 +++ ...inkPaymentMethodOptionsCardRestrictions.cs | 22 ++++ .../PaymentMethodConfiguration.cs | 8 ++ .../PaymentMethodConfigurationBizum.cs | 23 ++++ ...thodConfigurationBizumDisplayPreference.cs | 35 ++++++ .../PaymentMethodConfigurationScalapay.cs | 23 ++++ ...dConfigurationScalapayDisplayPreference.cs | 35 ++++++ .../Entities/PaymentMethods/PaymentMethod.cs | 16 ++- .../PaymentMethods/PaymentMethodBizum.cs | 12 ++ .../PaymentMethods/PaymentMethodScalapay.cs | 12 ++ .../PaymentRecordPaymentMethodDetails.cs | 8 ++ .../PaymentRecordPaymentMethodDetailsBizum.cs | 18 +++ ...rdPaymentMethodDetailsRevolutPayFunding.cs | 2 +- ...ymentRecordPaymentMethodDetailsScalapay.cs | 18 +++ .../PaymentRecordPaymentMethodDetailsTwint.cs | 6 + .../ProductCatalog/TrialOffers/TrialOffer.cs | 8 +- .../TrialOfferEndBehaviorTransition.cs | 30 ++++- .../QuotePreviewInvoice.cs | 7 ++ .../QuotePreviewInvoicePaymentSettings.cs | 4 +- ...SubscriptionSchedulePhaseAddInvoiceItem.cs | 8 ++ .../PaymentEvaluations/PaymentEvaluation.cs | 2 +- .../Refunds/RefundDestinationDetails.cs | 4 + .../RefundDestinationDetailsScalapay.cs | 12 ++ .../SetupAttemptPaymentMethodDetails.cs | 4 + .../SetupAttemptPaymentMethodDetailsTwint.cs | 12 ++ .../Entities/SetupIntents/SetupIntent.cs | 9 +- .../SetupIntents/SetupIntentNextAction.cs | 4 + .../SetupIntentNextActionBlikAuthorize.cs | 12 ++ .../SetupIntentPaymentMethodOptions.cs | 4 + .../SetupIntentPaymentMethodOptionsBizum.cs | 12 ++ .../GrantedTokenPaymentMethodDetails.cs | 16 ++- .../GrantedTokenPaymentMethodDetailsBizum.cs | 12 ++ ...rantedTokenPaymentMethodDetailsScalapay.cs | 12 ++ .../SubscriptionItems/SubscriptionItem.cs | 2 +- ...SubscriptionSchedulePhaseAddInvoiceItem.cs | 8 ++ .../Entities/Subscriptions/Subscription.cs | 7 ++ .../SubscriptionPaymentSettings.cs | 4 +- .../SubscriptionPendingUpdate.cs | 55 ++++++++- .../SubscriptionStatusDetails.cs | 18 +++ .../SubscriptionStatusDetailsPaused.cs | 35 ++++++ ...criptionStatusDetailsPausedSubscription.cs | 20 ++++ .../Terminal/Configurations/Configuration.cs | 16 +++ .../ConfigurationVerifoneM425.cs | 46 ++++++++ .../ConfigurationVerifoneP630.cs | 46 ++++++++ .../ConfigurationVerifoneUx700.cs | 46 ++++++++ .../ConfigurationVerifoneV660p.cs | 46 ++++++++ .../Entities/Terminal/Readers/Reader.cs | 7 +- .../Entities/Terminal/Readers/ReaderAction.cs | 22 +++- .../Readers/ReaderActionPrintContent.cs | 25 ++++ .../Readers/ReaderActionPrintContentImage.cs | 42 +++++++ ...AccountCapabilitiesBizumPaymentsOptions.cs | 20 ++++ .../Accounts/AccountCapabilitiesOptions.cs | 14 +++ ...ountCapabilitiesScalapayPaymentsOptions.cs | 20 ++++ .../Services/Accounts/AccountService.cs | 10 +- ...AutomaticTransferRulesByCurrencyOptions.cs | 35 ++++++ .../BalanceSettingsPaymentsPayoutsOptions.cs | 19 +++ ...SettingsPaymentsSettlementTimingOptions.cs | 20 ++++ ...ymentsSettlementTimingStartOfDayOptions.cs | 38 ++++++ .../Charges/ChargeTransferDataOptions.cs | 7 ++ .../SessionConsentCollectionOptions.cs | 2 +- .../Checkout/Sessions/SessionCreateOptions.cs | 41 +++---- ...entMethodOptionsCardRestrictionsOptions.cs | 4 +- .../SessionPaymentMethodOptionsOptions.cs | 12 +- ...sionPaymentMethodOptionsScalapayOptions.cs | 18 +++ ...SessionPaymentMethodOptionsTwintOptions.cs | 1 + .../SessionSubscriptionDataOptions.cs | 2 +- .../Sessions/SessionWalletOptionsOptions.cs | 3 +- .../Services/Coupons/CouponService.cs | 25 ++++ .../CustomerPaymentMethodListOptions.cs | 8 +- .../Services/Customers/CustomerService.cs | 10 +- .../Invoices/InvoicePaymentSettingsOptions.cs | 4 +- ...heduleDetailsPhaseAddInvoiceItemOptions.cs | 8 ++ .../Services/Invoices/InvoiceService.cs | 49 -------- .../InvoiceSubscriptionDetailsCancelAt.cs | 1 + ...ymentIntentAmountDetailsShippingOptions.cs | 4 +- .../PaymentIntentConfirmOptions.cs | 14 +-- .../PaymentIntentCreateOptions.cs | 15 +-- ...mentIntentPaymentMethodDataBizumOptions.cs | 12 ++ .../PaymentIntentPaymentMethodDataOptions.cs | 39 +++++-- ...tIntentPaymentMethodDataScalapayOptions.cs | 12 ++ ...tIntentPaymentMethodOptionsBizumOptions.cs | 12 ++ ...aymentIntentPaymentMethodOptionsOptions.cs | 38 +++++- ...tentPaymentMethodOptionsScalapayOptions.cs | 45 ++++++++ ...tIntentPaymentMethodOptionsTwintOptions.cs | 1 + .../PaymentIntents/PaymentIntentService.cs | 16 ++- .../PaymentIntentTransferDataOptions.cs | 46 +++++++- ...entIntentTransferDataPaymentDataOptions.cs | 49 ++++++++ .../PaymentIntentUpdateOptions.cs | 9 +- .../PaymentLinkConsentCollectionOptions.cs | 2 +- .../PaymentLinks/PaymentLinkCreateOptions.cs | 21 ++-- ...mentLinkPaymentMethodOptionsCardOptions.cs | 39 +++++++ ...entMethodOptionsCardRestrictionsOptions.cs | 42 +++++++ .../PaymentLinkPaymentMethodOptionsOptions.cs | 38 ++++++ .../PaymentLinks/PaymentLinkUpdateOptions.cs | 34 ++++-- ...figurationBizumDisplayPreferenceOptions.cs | 19 +++ .../PaymentMethodConfigurationBizumOptions.cs | 18 +++ ...PaymentMethodConfigurationCreateOptions.cs | 25 +++- .../PaymentMethodConfigurationListOptions.cs | 7 ++ ...urationScalapayDisplayPreferenceOptions.cs | 19 +++ ...ymentMethodConfigurationScalapayOptions.cs | 18 +++ ...PaymentMethodConfigurationUpdateOptions.cs | 25 +++- .../PaymentMethodBizumOptions.cs | 12 ++ .../PaymentMethodCreateOptions.cs | 26 ++++- .../PaymentMethodListOptions.cs | 8 +- .../PaymentMethodScalapayOptions.cs | 12 ++ .../Services/Payouts/PayoutCreateOptions.cs | 4 +- .../PromotionCodes/PromotionCodeService.cs | 20 ++-- .../SetupIntents/SetupIntentCreateOptions.cs | 9 +- ...etupIntentPaymentMethodDataBizumOptions.cs | 12 ++ .../SetupIntentPaymentMethodDataOptions.cs | 39 +++++-- ...pIntentPaymentMethodDataScalapayOptions.cs | 12 ++ ...pIntentPaymentMethodOptionsBizumOptions.cs | 12 ++ .../SetupIntentPaymentMethodOptionsOptions.cs | 10 +- .../SetupIntents/SetupIntentUpdateOptions.cs | 9 +- .../SubscriptionItemCreateOptions.cs | 29 +---- .../SubscriptionItemDeleteOptions.cs | 29 +---- .../SubscriptionItemUpdateOptions.cs | 29 +---- ...ptionSchedulePhaseAddInvoiceItemOptions.cs | 8 ++ .../SubscriptionScheduleService.cs | 73 ------------ .../SubscriptionAddInvoiceItemOptions.cs | 8 ++ .../SubscriptionBillForOptions.cs | 27 +++++ ...onBillForOutstandingUsageThroughOptions.cs | 19 +++ ...ubscriptionBillForUnusedTimeFromOptions.cs | 19 +++ .../Subscriptions/SubscriptionCancelAt.cs | 1 + .../SubscriptionCreateOptions.cs | 36 +----- .../Subscriptions/SubscriptionPauseOptions.cs | 34 ++++++ .../SubscriptionPaymentSettingsOptions.cs | 4 +- .../SubscriptionResumeOptions.cs | 10 ++ .../Subscriptions/SubscriptionService.cs | 108 +++++++++++++----- .../SubscriptionUpdateOptions.cs | 35 +----- .../ConfigurationCreateOptions.cs | 28 +++++ .../ConfigurationUpdateOptions.cs | 68 +++++++++++ .../ConfigurationVerifoneM425Options.cs | 38 ++++++ .../ConfigurationVerifoneP630Options.cs | 38 ++++++ .../ConfigurationVerifoneUx700Options.cs | 38 ++++++ .../ConfigurationVerifoneV660pOptions.cs | 38 ++++++ .../Terminal/Readers/ReaderListOptions.cs | 7 +- ...ationTokenPaymentMethodDataBizumOptions.cs | 12 ++ ...nfirmationTokenPaymentMethodDataOptions.cs | 39 +++++-- ...onTokenPaymentMethodDataScalapayOptions.cs | 12 ++ .../TestClocks/TestClockCreateOptions.cs | 8 ++ .../BatchJobCreateEndpointOptions.cs | 10 +- .../V2/Core/BatchJobs/BatchJobEndpointPath.cs | 8 +- .../WebhookEndpointCreateOptions.cs | 2 +- .../Services/GeneratedExamplesTest.cs | 2 +- 194 files changed, 2912 insertions(+), 537 deletions(-) create mode 100644 src/Stripe.net/Entities/BalanceSettings/BalanceSettingsPaymentsPayoutsAutomaticTransferRulesByCurrency.cs create mode 100644 src/Stripe.net/Entities/BalanceSettings/BalanceSettingsPaymentsSettlementTimingStartOfDay.cs create mode 100644 src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsBizum.cs create mode 100644 src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsScalapay.cs create mode 100644 src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsScalapay.cs create mode 100644 src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewBizum.cs create mode 100644 src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewScalapay.cs create mode 100644 src/Stripe.net/Entities/InvoiceItems/InvoiceItemProrationDetailsCreditedItems.cs create mode 100644 src/Stripe.net/Entities/InvoiceItems/InvoiceItemProrationDetailsCreditedItemsInvoiceLineItemDetails.cs create mode 100644 src/Stripe.net/Entities/Mandates/MandatePaymentMethodDetailsTwint.cs create mode 100644 src/Stripe.net/Entities/PaymentAttemptRecords/PaymentAttemptRecordPaymentMethodDetailsBizum.cs create mode 100644 src/Stripe.net/Entities/PaymentAttemptRecords/PaymentAttemptRecordPaymentMethodDetailsScalapay.cs create mode 100644 src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionBlikAuthorize.cs create mode 100644 src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsBizum.cs create mode 100644 src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsScalapay.cs create mode 100644 src/Stripe.net/Entities/PaymentIntents/PaymentIntentTransferDataPaymentData.cs create mode 100644 src/Stripe.net/Entities/PaymentLinks/PaymentLinkPaymentMethodOptions.cs create mode 100644 src/Stripe.net/Entities/PaymentLinks/PaymentLinkPaymentMethodOptionsCard.cs create mode 100644 src/Stripe.net/Entities/PaymentLinks/PaymentLinkPaymentMethodOptionsCardRestrictions.cs create mode 100644 src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationBizum.cs create mode 100644 src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationBizumDisplayPreference.cs create mode 100644 src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationScalapay.cs create mode 100644 src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationScalapayDisplayPreference.cs create mode 100644 src/Stripe.net/Entities/PaymentMethods/PaymentMethodBizum.cs create mode 100644 src/Stripe.net/Entities/PaymentMethods/PaymentMethodScalapay.cs create mode 100644 src/Stripe.net/Entities/PaymentRecords/PaymentRecordPaymentMethodDetailsBizum.cs create mode 100644 src/Stripe.net/Entities/PaymentRecords/PaymentRecordPaymentMethodDetailsScalapay.cs create mode 100644 src/Stripe.net/Entities/Refunds/RefundDestinationDetailsScalapay.cs create mode 100644 src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetailsTwint.cs create mode 100644 src/Stripe.net/Entities/SetupIntents/SetupIntentNextActionBlikAuthorize.cs create mode 100644 src/Stripe.net/Entities/SetupIntents/SetupIntentPaymentMethodOptionsBizum.cs create mode 100644 src/Stripe.net/Entities/SharedPayment/GrantedTokens/GrantedTokenPaymentMethodDetailsBizum.cs create mode 100644 src/Stripe.net/Entities/SharedPayment/GrantedTokens/GrantedTokenPaymentMethodDetailsScalapay.cs create mode 100644 src/Stripe.net/Entities/Subscriptions/SubscriptionStatusDetails.cs create mode 100644 src/Stripe.net/Entities/Subscriptions/SubscriptionStatusDetailsPaused.cs create mode 100644 src/Stripe.net/Entities/Subscriptions/SubscriptionStatusDetailsPausedSubscription.cs create mode 100644 src/Stripe.net/Entities/Terminal/Configurations/ConfigurationVerifoneM425.cs create mode 100644 src/Stripe.net/Entities/Terminal/Configurations/ConfigurationVerifoneP630.cs create mode 100644 src/Stripe.net/Entities/Terminal/Configurations/ConfigurationVerifoneUx700.cs create mode 100644 src/Stripe.net/Entities/Terminal/Configurations/ConfigurationVerifoneV660p.cs create mode 100644 src/Stripe.net/Entities/Terminal/Readers/ReaderActionPrintContent.cs create mode 100644 src/Stripe.net/Entities/Terminal/Readers/ReaderActionPrintContentImage.cs create mode 100644 src/Stripe.net/Services/Accounts/AccountCapabilitiesBizumPaymentsOptions.cs create mode 100644 src/Stripe.net/Services/Accounts/AccountCapabilitiesScalapayPaymentsOptions.cs create mode 100644 src/Stripe.net/Services/BalanceSettings/BalanceSettingsPaymentsPayoutsAutomaticTransferRulesByCurrencyOptions.cs create mode 100644 src/Stripe.net/Services/BalanceSettings/BalanceSettingsPaymentsSettlementTimingStartOfDayOptions.cs create mode 100644 src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsScalapayOptions.cs create mode 100644 src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataBizumOptions.cs create mode 100644 src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataScalapayOptions.cs create mode 100644 src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsBizumOptions.cs create mode 100644 src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsScalapayOptions.cs create mode 100644 src/Stripe.net/Services/PaymentIntents/PaymentIntentTransferDataPaymentDataOptions.cs create mode 100644 src/Stripe.net/Services/PaymentLinks/PaymentLinkPaymentMethodOptionsCardOptions.cs create mode 100644 src/Stripe.net/Services/PaymentLinks/PaymentLinkPaymentMethodOptionsCardRestrictionsOptions.cs create mode 100644 src/Stripe.net/Services/PaymentLinks/PaymentLinkPaymentMethodOptionsOptions.cs create mode 100644 src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationBizumDisplayPreferenceOptions.cs create mode 100644 src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationBizumOptions.cs create mode 100644 src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationScalapayDisplayPreferenceOptions.cs create mode 100644 src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationScalapayOptions.cs create mode 100644 src/Stripe.net/Services/PaymentMethods/PaymentMethodBizumOptions.cs create mode 100644 src/Stripe.net/Services/PaymentMethods/PaymentMethodScalapayOptions.cs create mode 100644 src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataBizumOptions.cs create mode 100644 src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataScalapayOptions.cs create mode 100644 src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsBizumOptions.cs create mode 100644 src/Stripe.net/Services/Subscriptions/SubscriptionBillForOptions.cs create mode 100644 src/Stripe.net/Services/Subscriptions/SubscriptionBillForOutstandingUsageThroughOptions.cs create mode 100644 src/Stripe.net/Services/Subscriptions/SubscriptionBillForUnusedTimeFromOptions.cs create mode 100644 src/Stripe.net/Services/Subscriptions/SubscriptionPauseOptions.cs create mode 100644 src/Stripe.net/Services/Terminal/Configurations/ConfigurationVerifoneM425Options.cs create mode 100644 src/Stripe.net/Services/Terminal/Configurations/ConfigurationVerifoneP630Options.cs create mode 100644 src/Stripe.net/Services/Terminal/Configurations/ConfigurationVerifoneUx700Options.cs create mode 100644 src/Stripe.net/Services/Terminal/Configurations/ConfigurationVerifoneV660pOptions.cs create mode 100644 src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataBizumOptions.cs create mode 100644 src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataScalapayOptions.cs diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index 8c73944537..87e13fd3cf 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -607324895d7883d4a5f04f3c29c26faa09cd31d3 \ No newline at end of file +9e9ef9ec9df30a59ccafb74c27b81311fa2896d5 \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 1ae2e8d30e..c200ff51d3 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2254 \ No newline at end of file +v2276 \ No newline at end of file diff --git a/src/Stripe.net/Constants/ApiVersion.cs b/src/Stripe.net/Constants/ApiVersion.cs index f8182e5b6c..4d8c8b7e15 100644 --- a/src/Stripe.net/Constants/ApiVersion.cs +++ b/src/Stripe.net/Constants/ApiVersion.cs @@ -3,6 +3,6 @@ namespace Stripe { internal class ApiVersion { - public const string Current = "2026-04-22.preview"; + public const string Current = "2026-05-27.preview"; } } \ No newline at end of file diff --git a/src/Stripe.net/Entities/Accounts/AccountCapabilities.cs b/src/Stripe.net/Entities/Accounts/AccountCapabilities.cs index 2f011bf0f5..0523375b83 100644 --- a/src/Stripe.net/Entities/Accounts/AccountCapabilities.cs +++ b/src/Stripe.net/Entities/Accounts/AccountCapabilities.cs @@ -115,6 +115,15 @@ public class AccountCapabilities : StripeEntity [STJS.JsonPropertyName("billie_payments")] public string BilliePayments { get; set; } + /// + /// The status of the Bizum capability of the account, or whether the account can directly + /// process Bizum payments. + /// One of: active, inactive, or pending. + /// + [JsonProperty("bizum_payments")] + [STJS.JsonPropertyName("bizum_payments")] + public string BizumPayments { get; set; } + /// /// The status of the blik payments capability of the account, or whether the account can /// directly process blik charges. @@ -527,6 +536,15 @@ public class AccountCapabilities : StripeEntity [STJS.JsonPropertyName("satispay_payments")] public string SatispayPayments { get; set; } + /// + /// The status of the Scalapay capability of the account, or whether the account can + /// directly process Scalapay payments. + /// One of: active, inactive, or pending. + /// + [JsonProperty("scalapay_payments")] + [STJS.JsonPropertyName("scalapay_payments")] + public string ScalapayPayments { get; set; } + /// /// The status of the SEPA customer_balance payments (EUR currency) capability of the /// account, or whether the account can directly process SEPA customer_balance charges. diff --git a/src/Stripe.net/Entities/BalanceSettings/BalanceSettingsPaymentsPayouts.cs b/src/Stripe.net/Entities/BalanceSettings/BalanceSettingsPaymentsPayouts.cs index a5e39f4c1d..70030d1426 100644 --- a/src/Stripe.net/Entities/BalanceSettings/BalanceSettingsPaymentsPayouts.cs +++ b/src/Stripe.net/Entities/BalanceSettings/BalanceSettingsPaymentsPayouts.cs @@ -9,6 +9,14 @@ namespace Stripe [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class BalanceSettingsPaymentsPayouts : StripeEntity { + /// + /// Configures per-currency rules for automatically transferring funds from the payments + /// balance to a FinancialAccount. + /// + [JsonProperty("automatic_transfer_rules_by_currency")] + [STJS.JsonPropertyName("automatic_transfer_rules_by_currency")] + public Dictionary> AutomaticTransferRulesByCurrency { get; set; } + /// /// The minimum balance amount to retain per currency after automatic payouts. Only funds /// that exceed these amounts are paid out. Learn more about the + { + /// + /// The ID of the FinancialAccount that funds will be transferred to during automatic + /// transfers. + /// + [JsonProperty("payout_method")] + [STJS.JsonPropertyName("payout_method")] + public string PayoutMethod { get; set; } + + /// + /// The maximum amount in minor units to transfer to the FinancialAccount. Only applicable + /// when type is transfer_up_to_amount. + /// + [JsonProperty("transfer_up_to_amount")] + [STJS.JsonPropertyName("transfer_up_to_amount")] + public long? TransferUpToAmount { get; set; } + + /// + /// The type of automatic transfer rule. + /// One of: transfer_all, or transfer_up_to_amount. + /// + [JsonProperty("type")] + [STJS.JsonPropertyName("type")] + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Entities/BalanceSettings/BalanceSettingsPaymentsSettlementTiming.cs b/src/Stripe.net/Entities/BalanceSettings/BalanceSettingsPaymentsSettlementTiming.cs index 4d55c46412..40668b89dc 100644 --- a/src/Stripe.net/Entities/BalanceSettings/BalanceSettingsPaymentsSettlementTiming.cs +++ b/src/Stripe.net/Entities/BalanceSettings/BalanceSettingsPaymentsSettlementTiming.cs @@ -22,5 +22,15 @@ public class BalanceSettingsPaymentsSettlementTiming : StripeEntity + /// Customized start of day configuration for automatic payouts to group and send payments + /// in local timezones with a customized day starting time. For details, see our Customized start of day + /// documentation. + /// + [JsonProperty("start_of_day")] + [STJS.JsonPropertyName("start_of_day")] + public BalanceSettingsPaymentsSettlementTimingStartOfDay StartOfDay { get; set; } } } diff --git a/src/Stripe.net/Entities/BalanceSettings/BalanceSettingsPaymentsSettlementTimingStartOfDay.cs b/src/Stripe.net/Entities/BalanceSettings/BalanceSettingsPaymentsSettlementTimingStartOfDay.cs new file mode 100644 index 0000000000..15da11099b --- /dev/null +++ b/src/Stripe.net/Entities/BalanceSettings/BalanceSettingsPaymentsSettlementTimingStartOfDay.cs @@ -0,0 +1,38 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class BalanceSettingsPaymentsSettlementTimingStartOfDay : StripeEntity + { + /// + /// Hour at which the customized start of day begins according to the given timezone. Must + /// be a supported + /// customized start of day hour. + /// + [JsonProperty("hour")] + [STJS.JsonPropertyName("hour")] + public long Hour { get; set; } + + /// + /// Minutes at which the customized start of day begins according to the given timezone. + /// Must be either 0 or 30. + /// + [JsonProperty("minutes")] + [STJS.JsonPropertyName("minutes")] + public long Minutes { get; set; } + + /// + /// Timezone for the customized start of day. Must be a supported + /// customized start of day timezone. + /// + [JsonProperty("timezone")] + [STJS.JsonPropertyName("timezone")] + public string Timezone { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetails.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetails.cs index d05d7b92cc..8b3f00650f 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetails.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetails.cs @@ -56,6 +56,10 @@ public class ChargePaymentMethodDetails : StripeEntity + { + /// + /// The Bizum transaction ID associated with this payment. + /// + [JsonProperty("transaction_id")] + [STJS.JsonPropertyName("transaction_id")] + public string TransactionId { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsScalapay.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsScalapay.cs new file mode 100644 index 0000000000..514bede653 --- /dev/null +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsScalapay.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class ChargePaymentMethodDetailsScalapay : StripeEntity + { + /// + /// The Scalapay transaction ID associated with this payment. + /// + [JsonProperty("transaction_id")] + [STJS.JsonPropertyName("transaction_id")] + public string TransactionId { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsTwint.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsTwint.cs index 47b4f10deb..00b0bae182 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsTwint.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsTwint.cs @@ -8,5 +8,11 @@ namespace Stripe [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class ChargePaymentMethodDetailsTwint : StripeEntity { + /// + /// ID of the multi use Mandate generated by the PaymentIntent. + /// + [JsonProperty("mandate")] + [STJS.JsonPropertyName("mandate")] + public string Mandate { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/Session.cs b/src/Stripe.net/Entities/Checkout/Sessions/Session.cs index b3a7119221..9d60421480 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/Session.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/Session.cs @@ -113,9 +113,9 @@ public class Session : StripeEntity, IHasId, IHasMetadata, IHasObject /// /// The client secret of your Checkout Session. Applies to Checkout Sessions with - /// ui_mode: embedded or ui_mode: custom. For ui_mode: embedded, the - /// client secret is to be used when initializing Stripe.js embedded checkout. For - /// ui_mode: custom, use the client secret with ui_mode: embedded_page or ui_mode: elements. For ui_mode: + /// embedded_page, the client secret is to be used when initializing Stripe.js embedded + /// checkout. For ui_mode: elements, use the client secret with initCheckout on your front /// end. /// @@ -559,7 +559,7 @@ public PaymentLink PaymentLink public string RecoveredFrom { get; set; } /// - /// This parameter applies to ui_mode: embedded. Learn more about the ui_mode: embedded_page. Learn more about the redirect /// behavior of embedded sessions. Defaults to always. /// One of: always, if_required, or never. @@ -569,9 +569,9 @@ public PaymentLink PaymentLink public string RedirectOnCompletion { get; set; } /// - /// Applies to Checkout Sessions with ui_mode: embedded or ui_mode: custom. - /// The URL to redirect your customer back to after they authenticate or cancel their - /// payment on the payment method's app or site. + /// Applies to Checkout Sessions with ui_mode: embedded_page or ui_mode: + /// elements. The URL to redirect your customer back to after they authenticate or + /// cancel their payment on the payment method's app or site. /// [JsonProperty("return_url")] [STJS.JsonPropertyName("return_url")] @@ -735,10 +735,10 @@ public Subscription Subscription /// /// The URL to the Checkout Session. Applies to Checkout Sessions with ui_mode: - /// hosted. Redirect customers to this URL to take them to Checkout. If you’re using Custom Domains, the - /// URL will use your subdomain. Otherwise, it’ll use checkout.stripe.com. This value - /// is only present when the session is active. + /// hosted_page. Redirect customers to this URL to take them to Checkout. If you’re + /// using Custom + /// Domains, the URL will use your subdomain. Otherwise, it’ll use + /// checkout.stripe.com. This value is only present when the session is active. /// [JsonProperty("url")] [STJS.JsonPropertyName("url")] diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionConsentCollection.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionConsentCollection.cs index 8c9ef175a2..e96c1f6a72 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionConsentCollection.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionConsentCollection.cs @@ -20,7 +20,7 @@ public class SessionConsentCollection : StripeEntity /// If set to auto, enables the collection of customer consent for promotional /// communications. The Checkout Session will determine whether to display an option to opt /// into promotional communication from the merchant depending on the customer's locale. - /// Only available to US merchants. + /// Only available to US merchants and US customers. /// One of: auto, or none. /// [JsonProperty("promotions")] diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptions.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptions.cs index 2415e54956..268dd44a19 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptions.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptions.cs @@ -156,6 +156,10 @@ public class SessionPaymentMethodOptions : StripeEntity { /// - /// Specify the card brands to block in the Checkout Session. If a customer enters or - /// selects a card belonging to a blocked brand, they can't complete the Session. + /// The card brands to block. If a customer enters or selects a card belonging to a blocked + /// brand, they can't complete the payment. /// One of: american_express, discover_global_network, mastercard, or /// visa. /// diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsScalapay.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsScalapay.cs new file mode 100644 index 0000000000..19f18c67fa --- /dev/null +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsScalapay.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.Checkout +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class SessionPaymentMethodOptionsScalapay : StripeEntity + { + /// + /// Controls when the funds will be captured from the customer's account. + /// + [JsonProperty("capture_method")] + [STJS.JsonPropertyName("capture_method")] + public string CaptureMethod { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsTwint.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsTwint.cs index 96a8d968a5..0b88d34a52 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsTwint.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsTwint.cs @@ -27,6 +27,7 @@ public class SessionPaymentMethodOptionsTwint : StripeEntitysetup_future_usage to help you comply /// with regional legislation and network rules, such as SCA. + /// One of: none, or off_session. /// [JsonProperty("setup_future_usage")] [STJS.JsonPropertyName("setup_future_usage")] diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreview.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreview.cs index c223ea5702..7e1cf2aebe 100644 --- a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreview.cs +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreview.cs @@ -63,6 +63,10 @@ public class ConfirmationTokenPaymentMethodPreview : StripeEntityacss_debit, affirm, afterpay_clearpay, alipay, /// alma, amazon_pay, au_becs_debit, bacs_debit, - /// bancontact, billie, blik, boleto, card, + /// bancontact, billie, bizum, blik, boleto, card, /// card_present, cashapp, crypto, custom, /// customer_balance, eps, fpx, giropay, gopay, /// grabpay, id_bank_transfer, ideal, interac_present, @@ -307,9 +315,9 @@ public Customer Customer /// nz_bank_account, oxxo, p24, pay_by_bank, payco, /// paynow, paypal, paypay, payto, pix, promptpay, /// qris, rechnung, revolut_pay, samsung_pay, satispay, - /// sepa_debit, shopeepay, sofort, stripe_balance, - /// sunbit, swish, twint, upi, us_bank_account, - /// wechat_pay, or zip. + /// scalapay, sepa_debit, shopeepay, sofort, + /// stripe_balance, sunbit, swish, twint, upi, + /// us_bank_account, wechat_pay, or zip. /// [JsonProperty("type")] [STJS.JsonPropertyName("type")] diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewBizum.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewBizum.cs new file mode 100644 index 0000000000..64cabee29d --- /dev/null +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewBizum.cs @@ -0,0 +1,12 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class ConfirmationTokenPaymentMethodPreviewBizum : StripeEntity + { + } +} diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewScalapay.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewScalapay.cs new file mode 100644 index 0000000000..778e0e2d83 --- /dev/null +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewScalapay.cs @@ -0,0 +1,12 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class ConfirmationTokenPaymentMethodPreviewScalapay : StripeEntity + { + } +} diff --git a/src/Stripe.net/Entities/Discounts/Discount.cs b/src/Stripe.net/Entities/Discounts/Discount.cs index 32074a843c..d368ca6644 100644 --- a/src/Stripe.net/Entities/Discounts/Discount.cs +++ b/src/Stripe.net/Entities/Discounts/Discount.cs @@ -20,7 +20,7 @@ namespace Stripe public class Discount : StripeEntity, IHasId, IHasObject { /// - /// The ID of the discount object. Discounts cannot be fetched by ID. Use + /// The ID of the discount object. Discounts can't be fetched by ID. Use /// expand[]=discounts in API calls to expand discount IDs in an array. /// [JsonProperty("id")] @@ -36,7 +36,7 @@ public class Discount : StripeEntity, IHasId, IHasObject /// /// The Checkout session that this coupon is applied to, if it is applied to a particular - /// session in payment mode. Will not be present for subscription mode. + /// session in payment mode. Not present for subscription mode. /// [JsonProperty("checkout_session")] [STJS.JsonPropertyName("checkout_session")] diff --git a/src/Stripe.net/Entities/InvoiceItems/InvoiceItemProrationDetails.cs b/src/Stripe.net/Entities/InvoiceItems/InvoiceItemProrationDetails.cs index c5bf83871a..6c32a26d0a 100644 --- a/src/Stripe.net/Entities/InvoiceItems/InvoiceItemProrationDetails.cs +++ b/src/Stripe.net/Entities/InvoiceItems/InvoiceItemProrationDetails.cs @@ -9,6 +9,14 @@ namespace Stripe [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class InvoiceItemProrationDetails : StripeEntity { + /// + /// For a credit proration, links to the debit invoice line items or invoice item that the + /// credit applies to. + /// + [JsonProperty("credited_items")] + [STJS.JsonPropertyName("credited_items")] + public InvoiceItemProrationDetailsCreditedItems CreditedItems { get; set; } + /// /// Discount amounts applied when the proration was created. /// diff --git a/src/Stripe.net/Entities/InvoiceItems/InvoiceItemProrationDetailsCreditedItems.cs b/src/Stripe.net/Entities/InvoiceItems/InvoiceItemProrationDetailsCreditedItems.cs new file mode 100644 index 0000000000..a7304bd044 --- /dev/null +++ b/src/Stripe.net/Entities/InvoiceItems/InvoiceItemProrationDetailsCreditedItems.cs @@ -0,0 +1,32 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class InvoiceItemProrationDetailsCreditedItems : StripeEntity + { + /// + /// When type is invoice_item, the invoice item id for the debited invoice + /// item corresponding to this credit proration. + /// + [JsonProperty("invoice_item")] + [STJS.JsonPropertyName("invoice_item")] + public string InvoiceItem { get; set; } + + [JsonProperty("invoice_line_item_details")] + [STJS.JsonPropertyName("invoice_line_item_details")] + public InvoiceItemProrationDetailsCreditedItemsInvoiceLineItemDetails InvoiceLineItemDetails { get; set; } + + /// + /// Whether the credit references a pending invoice item or one or more invoice line items + /// on an invoice. + /// One of: invoice_item, or invoice_line_items. + /// + [JsonProperty("type")] + [STJS.JsonPropertyName("type")] + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Entities/InvoiceItems/InvoiceItemProrationDetailsCreditedItemsInvoiceLineItemDetails.cs b/src/Stripe.net/Entities/InvoiceItems/InvoiceItemProrationDetailsCreditedItemsInvoiceLineItemDetails.cs new file mode 100644 index 0000000000..96f90a718f --- /dev/null +++ b/src/Stripe.net/Entities/InvoiceItems/InvoiceItemProrationDetailsCreditedItemsInvoiceLineItemDetails.cs @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using System.Collections.Generic; + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class InvoiceItemProrationDetailsCreditedItemsInvoiceLineItemDetails : StripeEntity + { + /// + /// The invoice id for the debited line item(s). + /// + [JsonProperty("invoice")] + [STJS.JsonPropertyName("invoice")] + public string Invoice { get; set; } + + /// + /// IDs of the debited invoice line item(s) on the invoice that correspond to the credit + /// proration. + /// + [JsonProperty("invoice_line_items")] + [STJS.JsonPropertyName("invoice_line_items")] + public List InvoiceLineItems { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Invoices/Invoice.cs b/src/Stripe.net/Entities/Invoices/Invoice.cs index 546377abec..55ec4133fb 100644 --- a/src/Stripe.net/Entities/Invoices/Invoice.cs +++ b/src/Stripe.net/Entities/Invoices/Invoice.cs @@ -140,6 +140,13 @@ public List AccountTaxIds [STJS.JsonPropertyName("amount_paid")] public long AmountPaid { get; set; } + /// + /// Amount, in cents (or local equivalent), that was paid on the invoice outside of Stripe. + /// + [JsonProperty("amount_paid_off_stripe")] + [STJS.JsonPropertyName("amount_paid_off_stripe")] + public long AmountPaidOffStripe { get; set; } + /// /// The difference between amount_due and amount_paid, in cents (or local equivalent). /// diff --git a/src/Stripe.net/Entities/Invoices/InvoicePaymentSettings.cs b/src/Stripe.net/Entities/Invoices/InvoicePaymentSettings.cs index a789e73e44..00d275c95b 100644 --- a/src/Stripe.net/Entities/Invoices/InvoicePaymentSettings.cs +++ b/src/Stripe.net/Entities/Invoices/InvoicePaymentSettings.cs @@ -41,8 +41,8 @@ public class InvoicePaymentSettings : StripeEntity /// naver_pay, nz_bank_account, p24, pay_by_bank, payco, /// paynow, paypal, payto, pix, promptpay, /// revolut_pay, sepa_credit_transfer, sepa_debit, sofort, - /// stripe_balance, swish, upi, us_bank_account, or - /// wechat_pay. + /// stripe_balance, swish, twint, upi, us_bank_account, + /// or wechat_pay. /// [JsonProperty("payment_method_types")] [STJS.JsonPropertyName("payment_method_types")] diff --git a/src/Stripe.net/Entities/Issuing/Disputes/Dispute.cs b/src/Stripe.net/Entities/Issuing/Disputes/Dispute.cs index ec9789db89..ec09cf8b3f 100644 --- a/src/Stripe.net/Entities/Issuing/Disputes/Dispute.cs +++ b/src/Stripe.net/Entities/Issuing/Disputes/Dispute.cs @@ -153,7 +153,8 @@ public Transaction Transaction /// /// Treasury details related to this - /// dispute if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts. + /// dispute if it was created on a FinancialAccount. /// [JsonProperty("treasury")] [STJS.JsonPropertyName("treasury")] diff --git a/src/Stripe.net/Entities/Issuing/PersonalizationDesigns/PersonalizationDesign.cs b/src/Stripe.net/Entities/Issuing/PersonalizationDesigns/PersonalizationDesign.cs index 70362424d1..a9430ebaa0 100644 --- a/src/Stripe.net/Entities/Issuing/PersonalizationDesigns/PersonalizationDesign.cs +++ b/src/Stripe.net/Entities/Issuing/PersonalizationDesigns/PersonalizationDesign.cs @@ -33,7 +33,9 @@ public class PersonalizationDesign : StripeEntity, IHasId /// /// (ID of the File) /// The file for the card logo to use with physical bundles that support card logos. Must - /// have a purpose value of issuing_logo. + /// have a purpose value of issuing_logo. Image must be in PNG format with + /// dimensions of 1000px by 200px. It must be a binary (black and white) image containing a + /// black logo on a white background. We don't accept grayscale. /// [JsonIgnore] [STJS.JsonIgnore] @@ -46,7 +48,9 @@ public string CardLogoId /// /// (Expanded) /// The file for the card logo to use with physical bundles that support card logos. Must - /// have a purpose value of issuing_logo. + /// have a purpose value of issuing_logo. Image must be in PNG format with + /// dimensions of 1000px by 200px. It must be a binary (black and white) image containing a + /// black logo on a white background. We don't accept grayscale. /// /// For more information, see the expand documentation. /// diff --git a/src/Stripe.net/Entities/Issuing/Settlements/Settlement.cs b/src/Stripe.net/Entities/Issuing/Settlements/Settlement.cs index 3ca4be7d3b..2b69fc61e0 100644 --- a/src/Stripe.net/Entities/Issuing/Settlements/Settlement.cs +++ b/src/Stripe.net/Entities/Issuing/Settlements/Settlement.cs @@ -95,8 +95,8 @@ public class Settlement : StripeEntity, IHasId, IHasMetadata, IHasOb public long NetTotalAmount { get; set; } /// - /// The card network for this settlement report. One of ["visa", "maestro"]. - /// One of: maestro, or visa. + /// The card network for this settlement report. One of ["visa", "maestro", "mastercard"]. + /// One of: maestro, mastercard, or visa. /// [JsonProperty("network")] [STJS.JsonPropertyName("network")] diff --git a/src/Stripe.net/Entities/Mandates/MandatePaymentMethodDetails.cs b/src/Stripe.net/Entities/Mandates/MandatePaymentMethodDetails.cs index 69b6b9f27a..8fbb2ef7e0 100644 --- a/src/Stripe.net/Entities/Mandates/MandatePaymentMethodDetails.cs +++ b/src/Stripe.net/Entities/Mandates/MandatePaymentMethodDetails.cs @@ -76,6 +76,10 @@ public class MandatePaymentMethodDetails : StripeEntity /// This mandate corresponds with a specific payment method type. The /// payment_method_details includes an additional hash with the same name and diff --git a/src/Stripe.net/Entities/Mandates/MandatePaymentMethodDetailsTwint.cs b/src/Stripe.net/Entities/Mandates/MandatePaymentMethodDetailsTwint.cs new file mode 100644 index 0000000000..bcf40d35b0 --- /dev/null +++ b/src/Stripe.net/Entities/Mandates/MandatePaymentMethodDetailsTwint.cs @@ -0,0 +1,12 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class MandatePaymentMethodDetailsTwint : StripeEntity + { + } +} diff --git a/src/Stripe.net/Entities/PaymentAttemptRecords/PaymentAttemptRecordPaymentMethodDetails.cs b/src/Stripe.net/Entities/PaymentAttemptRecords/PaymentAttemptRecordPaymentMethodDetails.cs index 97bf744eef..4e001ec5ce 100644 --- a/src/Stripe.net/Entities/PaymentAttemptRecords/PaymentAttemptRecordPaymentMethodDetails.cs +++ b/src/Stripe.net/Entities/PaymentAttemptRecords/PaymentAttemptRecordPaymentMethodDetails.cs @@ -63,6 +63,10 @@ public class PaymentAttemptRecordPaymentMethodDetails : StripeEntity + { + /// + /// The Bizum transaction ID associated with this payment. + /// + [JsonProperty("transaction_id")] + [STJS.JsonPropertyName("transaction_id")] + public string TransactionId { get; set; } + } +} diff --git a/src/Stripe.net/Entities/PaymentAttemptRecords/PaymentAttemptRecordPaymentMethodDetailsRevolutPayFunding.cs b/src/Stripe.net/Entities/PaymentAttemptRecords/PaymentAttemptRecordPaymentMethodDetailsRevolutPayFunding.cs index e1a4dbf5ee..d5b14295e9 100644 --- a/src/Stripe.net/Entities/PaymentAttemptRecords/PaymentAttemptRecordPaymentMethodDetailsRevolutPayFunding.cs +++ b/src/Stripe.net/Entities/PaymentAttemptRecords/PaymentAttemptRecordPaymentMethodDetailsRevolutPayFunding.cs @@ -13,7 +13,7 @@ public class PaymentAttemptRecordPaymentMethodDetailsRevolutPayFunding : StripeE public PaymentAttemptRecordPaymentMethodDetailsRevolutPayFundingCard Card { get; set; } /// - /// funding type of the underlying payment method. + /// Funding type of the underlying payment method. /// [JsonProperty("type")] [STJS.JsonPropertyName("type")] diff --git a/src/Stripe.net/Entities/PaymentAttemptRecords/PaymentAttemptRecordPaymentMethodDetailsScalapay.cs b/src/Stripe.net/Entities/PaymentAttemptRecords/PaymentAttemptRecordPaymentMethodDetailsScalapay.cs new file mode 100644 index 0000000000..d5550f9f6d --- /dev/null +++ b/src/Stripe.net/Entities/PaymentAttemptRecords/PaymentAttemptRecordPaymentMethodDetailsScalapay.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class PaymentAttemptRecordPaymentMethodDetailsScalapay : StripeEntity + { + /// + /// The Scalapay transaction ID associated with this payment. + /// + [JsonProperty("transaction_id")] + [STJS.JsonPropertyName("transaction_id")] + public string TransactionId { get; set; } + } +} diff --git a/src/Stripe.net/Entities/PaymentAttemptRecords/PaymentAttemptRecordPaymentMethodDetailsTwint.cs b/src/Stripe.net/Entities/PaymentAttemptRecords/PaymentAttemptRecordPaymentMethodDetailsTwint.cs index 0f0400acda..7e4f298b7d 100644 --- a/src/Stripe.net/Entities/PaymentAttemptRecords/PaymentAttemptRecordPaymentMethodDetailsTwint.cs +++ b/src/Stripe.net/Entities/PaymentAttemptRecords/PaymentAttemptRecordPaymentMethodDetailsTwint.cs @@ -8,5 +8,11 @@ namespace Stripe [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class PaymentAttemptRecordPaymentMethodDetailsTwint : StripeEntity { + /// + /// ID of the multi use Mandate generated by the PaymentIntent. + /// + [JsonProperty("mandate")] + [STJS.JsonPropertyName("mandate")] + public string Mandate { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntent.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntent.cs index 758223354f..ae2251d07a 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntent.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntent.cs @@ -290,16 +290,17 @@ public Customer Customer /// The list of payment method types to exclude from use with this payment. /// One of: acss_debit, affirm, afterpay_clearpay, alipay, /// alma, amazon_pay, au_becs_debit, bacs_debit, - /// bancontact, billie, blik, boleto, card, + /// bancontact, billie, bizum, blik, boleto, card, /// cashapp, crypto, customer_balance, eps, fpx, /// giropay, gopay, grabpay, id_bank_transfer, ideal, /// kakao_pay, klarna, konbini, kr_card, mb_way, /// mobilepay, multibanco, naver_pay, nz_bank_account, /// oxxo, p24, pay_by_bank, payco, paynow, paypal, /// paypay, payto, pix, promptpay, qris, rechnung, - /// revolut_pay, samsung_pay, satispay, sepa_debit, - /// shopeepay, sofort, stripe_balance, sunbit, swish, - /// twint, upi, us_bank_account, wechat_pay, or zip. + /// revolut_pay, samsung_pay, satispay, scalapay, + /// sepa_debit, shopeepay, sofort, stripe_balance, + /// sunbit, swish, twint, upi, us_bank_account, + /// wechat_pay, or zip. /// [JsonProperty("excluded_payment_method_types")] [STJS.JsonPropertyName("excluded_payment_method_types")] diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentAmountDetailsShipping.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentAmountDetailsShipping.cs index 3e5a3b778b..56ca8e0a80 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentAmountDetailsShipping.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentAmountDetailsShipping.cs @@ -19,7 +19,7 @@ public class PaymentIntentAmountDetailsShipping : StripeEntity /// If a physical good is being shipped, the postal code of where it is being shipped from. - /// At most 10 alphanumeric characters long, hyphens are allowed. + /// At most 10 alphanumeric characters long, hyphens and spaces are allowed. /// [JsonProperty("from_postal_code")] [STJS.JsonPropertyName("from_postal_code")] @@ -27,7 +27,7 @@ public class PaymentIntentAmountDetailsShipping : StripeEntity /// If a physical good is being shipped, the postal code of where it is being shipped to. At - /// most 10 alphanumeric characters long, hyphens are allowed. + /// most 10 alphanumeric characters long, hyphens and spaces are allowed. /// [JsonProperty("to_postal_code")] [STJS.JsonPropertyName("to_postal_code")] diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextAction.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextAction.cs index e1f7f2322c..766aa376eb 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextAction.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextAction.cs @@ -13,6 +13,10 @@ public class PaymentIntentNextAction : StripeEntity [STJS.JsonPropertyName("alipay_handle_redirect")] public PaymentIntentNextActionAlipayHandleRedirect AlipayHandleRedirect { get; set; } + [JsonProperty("blik_authorize")] + [STJS.JsonPropertyName("blik_authorize")] + public PaymentIntentNextActionBlikAuthorize BlikAuthorize { get; set; } + [JsonProperty("boleto_display_details")] [STJS.JsonPropertyName("boleto_display_details")] public PaymentIntentNextActionBoletoDisplayDetails BoletoDisplayDetails { get; set; } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionBlikAuthorize.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionBlikAuthorize.cs new file mode 100644 index 0000000000..200a967ac5 --- /dev/null +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentNextActionBlikAuthorize.cs @@ -0,0 +1,12 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class PaymentIntentNextActionBlikAuthorize : StripeEntity + { + } +} diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptions.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptions.cs index 610a82f38e..7cceeb252d 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptions.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptions.cs @@ -48,6 +48,10 @@ public class PaymentIntentPaymentMethodOptions : StripeEntity + { + } +} diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsScalapay.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsScalapay.cs new file mode 100644 index 0000000000..db8261066c --- /dev/null +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsScalapay.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class PaymentIntentPaymentMethodOptionsScalapay : StripeEntity + { + /// + /// Controls when the funds will be captured from the customer's account. + /// + [JsonProperty("capture_method")] + [STJS.JsonPropertyName("capture_method")] + public string CaptureMethod { get; set; } + } +} diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsTwint.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsTwint.cs index 1a0734d2ea..698b3be3e3 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsTwint.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsTwint.cs @@ -27,6 +27,7 @@ public class PaymentIntentPaymentMethodOptionsTwint : StripeEntitysetup_future_usage to help you comply /// with regional legislation and network rules, such as SCA. + /// One of: none, or off_session. /// [JsonProperty("setup_future_usage")] [STJS.JsonPropertyName("setup_future_usage")] diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentTransferData.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentTransferData.cs index 89cc195765..b600a1d08a 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentTransferData.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentTransferData.cs @@ -1,12 +1,13 @@ // File generated from our OpenAPI spec namespace Stripe { + using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; using STJS = System.Text.Json.Serialization; [STJS.JsonConverter(typeof(STJStripeEntityConverter))] - public class PaymentIntentTransferData : StripeEntity + public class PaymentIntentTransferData : StripeEntity, IHasMetadata { /// /// The amount transferred to the destination account. This transfer will occur @@ -21,6 +22,13 @@ public class PaymentIntentTransferData : StripeEntity [STJS.JsonPropertyName("amount")] public long Amount { get; set; } + /// + /// An arbitrary string attached to the transfer. Often useful for displaying to users. + /// + [JsonProperty("description")] + [STJS.JsonPropertyName("description")] + public string Description { get; set; } + #region Expandable Destination /// @@ -57,5 +65,18 @@ public Account Destination [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] internal ExpandableField InternalDestination { get; set; } #endregion + + /// + /// Set of key-value pairs that you can + /// attach to an object. This can be useful for storing additional information about the + /// object in a structured format. + /// + [JsonProperty("metadata")] + [STJS.JsonPropertyName("metadata")] + public Dictionary Metadata { get; set; } + + [JsonProperty("payment_data")] + [STJS.JsonPropertyName("payment_data")] + public PaymentIntentTransferDataPaymentData PaymentData { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentTransferDataPaymentData.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentTransferDataPaymentData.cs new file mode 100644 index 0000000000..d24f946f39 --- /dev/null +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentTransferDataPaymentData.cs @@ -0,0 +1,29 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using System.Collections.Generic; + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class PaymentIntentTransferDataPaymentData : StripeEntity, IHasMetadata + { + /// + /// An arbitrary string attached to the destination payment. Often useful for displaying to + /// users. + /// + [JsonProperty("description")] + [STJS.JsonPropertyName("description")] + public string Description { get; set; } + + /// + /// Set of key-value pairs that you can + /// attach to an object. This can be useful for storing additional information about the + /// object in a structured format. + /// + [JsonProperty("metadata")] + [STJS.JsonPropertyName("metadata")] + public Dictionary Metadata { get; set; } + } +} diff --git a/src/Stripe.net/Entities/PaymentLinks/PaymentLink.cs b/src/Stripe.net/Entities/PaymentLinks/PaymentLink.cs index ef158636bc..69b349d100 100644 --- a/src/Stripe.net/Entities/PaymentLinks/PaymentLink.cs +++ b/src/Stripe.net/Entities/PaymentLinks/PaymentLink.cs @@ -269,20 +269,28 @@ public Account OnBehalfOf [STJS.JsonPropertyName("payment_method_collection")] public string PaymentMethodCollection { get; set; } + /// + /// Payment-method-specific configuration. + /// + [JsonProperty("payment_method_options")] + [STJS.JsonPropertyName("payment_method_options")] + public PaymentLinkPaymentMethodOptions PaymentMethodOptions { get; set; } + /// /// The list of payment method types that customers can use. When null, Stripe will /// dynamically show relevant payment methods you've enabled in your payment method /// settings. /// One of: affirm, afterpay_clearpay, alipay, alma, - /// au_becs_debit, bacs_debit, bancontact, billie, blik, - /// boleto, card, cashapp, eps, fpx, giropay, - /// gopay, grabpay, ideal, klarna, konbini, link, - /// mb_way, mobilepay, multibanco, oxxo, p24, - /// pay_by_bank, paynow, paypal, paypay, payto, - /// pix, promptpay, qris, rechnung, satispay, - /// sepa_debit, shopeepay, sofort, sunbit, swish, - /// twint, upi, us_bank_account, wechat_pay, or zip. + /// au_becs_debit, bacs_debit, bancontact, billie, bizum, + /// blik, boleto, card, cashapp, eps, fpx, + /// giropay, gopay, grabpay, ideal, klarna, + /// konbini, link, mb_way, mobilepay, multibanco, + /// oxxo, p24, pay_by_bank, paynow, paypal, + /// paypay, payto, pix, promptpay, qris, rechnung, + /// satispay, sepa_debit, shopeepay, sofort, sunbit, + /// swish, twint, upi, us_bank_account, wechat_pay, or + /// zip. /// [JsonProperty("payment_method_types")] [STJS.JsonPropertyName("payment_method_types")] diff --git a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkPaymentMethodOptions.cs b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkPaymentMethodOptions.cs new file mode 100644 index 0000000000..424e3b19c5 --- /dev/null +++ b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkPaymentMethodOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class PaymentLinkPaymentMethodOptions : StripeEntity + { + /// + /// Configuration for card payment methods. + /// + [JsonProperty("card")] + [STJS.JsonPropertyName("card")] + public PaymentLinkPaymentMethodOptionsCard Card { get; set; } + } +} diff --git a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkPaymentMethodOptionsCard.cs b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkPaymentMethodOptionsCard.cs new file mode 100644 index 0000000000..99736c9c2a --- /dev/null +++ b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkPaymentMethodOptionsCard.cs @@ -0,0 +1,19 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class PaymentLinkPaymentMethodOptionsCard : StripeEntity + { + /// + /// Restrictions to apply to the card payment method. For example, you can block specific + /// card brands. + /// + [JsonProperty("restrictions")] + [STJS.JsonPropertyName("restrictions")] + public PaymentLinkPaymentMethodOptionsCardRestrictions Restrictions { get; set; } + } +} diff --git a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkPaymentMethodOptionsCardRestrictions.cs b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkPaymentMethodOptionsCardRestrictions.cs new file mode 100644 index 0000000000..1226138635 --- /dev/null +++ b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkPaymentMethodOptionsCardRestrictions.cs @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using System.Collections.Generic; + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class PaymentLinkPaymentMethodOptionsCardRestrictions : StripeEntity + { + /// + /// The card brands to block. If a customer enters or selects a card belonging to a blocked + /// brand, they can't complete the payment. + /// One of: american_express, discover_global_network, mastercard, or + /// visa. + /// + [JsonProperty("brands_blocked")] + [STJS.JsonPropertyName("brands_blocked")] + public List BrandsBlocked { get; set; } + } +} diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfiguration.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfiguration.cs index e43e0cc9e9..ff44d64a8e 100644 --- a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfiguration.cs +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfiguration.cs @@ -110,6 +110,10 @@ public class PaymentMethodConfiguration : StripeEntity + { + /// + /// Whether this payment method may be offered at checkout. True if + /// display_preference is on and the payment method's capability is active. + /// + [JsonProperty("available")] + [STJS.JsonPropertyName("available")] + public bool Available { get; set; } + + [JsonProperty("display_preference")] + [STJS.JsonPropertyName("display_preference")] + public PaymentMethodConfigurationBizumDisplayPreference DisplayPreference { get; set; } + } +} diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationBizumDisplayPreference.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationBizumDisplayPreference.cs new file mode 100644 index 0000000000..ad93dac1b6 --- /dev/null +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationBizumDisplayPreference.cs @@ -0,0 +1,35 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class PaymentMethodConfigurationBizumDisplayPreference : StripeEntity + { + /// + /// For child configs, whether or not the account's preference will be observed. If + /// false, the parent configuration's default is used. + /// + [JsonProperty("overridable")] + [STJS.JsonPropertyName("overridable")] + public bool? Overridable { get; set; } + + /// + /// The account's display preference. + /// One of: none, off, or on. + /// + [JsonProperty("preference")] + [STJS.JsonPropertyName("preference")] + public string Preference { get; set; } + + /// + /// The effective display preference value. + /// One of: off, or on. + /// + [JsonProperty("value")] + [STJS.JsonPropertyName("value")] + public string Value { get; set; } + } +} diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationScalapay.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationScalapay.cs new file mode 100644 index 0000000000..3ae261eaeb --- /dev/null +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationScalapay.cs @@ -0,0 +1,23 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class PaymentMethodConfigurationScalapay : StripeEntity + { + /// + /// Whether this payment method may be offered at checkout. True if + /// display_preference is on and the payment method's capability is active. + /// + [JsonProperty("available")] + [STJS.JsonPropertyName("available")] + public bool Available { get; set; } + + [JsonProperty("display_preference")] + [STJS.JsonPropertyName("display_preference")] + public PaymentMethodConfigurationScalapayDisplayPreference DisplayPreference { get; set; } + } +} diff --git a/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationScalapayDisplayPreference.cs b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationScalapayDisplayPreference.cs new file mode 100644 index 0000000000..8f616db5b7 --- /dev/null +++ b/src/Stripe.net/Entities/PaymentMethodConfigurations/PaymentMethodConfigurationScalapayDisplayPreference.cs @@ -0,0 +1,35 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class PaymentMethodConfigurationScalapayDisplayPreference : StripeEntity + { + /// + /// For child configs, whether or not the account's preference will be observed. If + /// false, the parent configuration's default is used. + /// + [JsonProperty("overridable")] + [STJS.JsonPropertyName("overridable")] + public bool? Overridable { get; set; } + + /// + /// The account's display preference. + /// One of: none, off, or on. + /// + [JsonProperty("preference")] + [STJS.JsonPropertyName("preference")] + public string Preference { get; set; } + + /// + /// The effective display preference value. + /// One of: off, or on. + /// + [JsonProperty("value")] + [STJS.JsonPropertyName("value")] + public string Value { get; set; } + } +} diff --git a/src/Stripe.net/Entities/PaymentMethods/PaymentMethod.cs b/src/Stripe.net/Entities/PaymentMethods/PaymentMethod.cs index 1ff4e28a34..80d7e04233 100644 --- a/src/Stripe.net/Entities/PaymentMethods/PaymentMethod.cs +++ b/src/Stripe.net/Entities/PaymentMethods/PaymentMethod.cs @@ -89,6 +89,10 @@ public class PaymentMethod : StripeEntity, IHasId, IHasMetadata, [STJS.JsonPropertyName("billing_details")] public PaymentMethodBillingDetails BillingDetails { get; set; } + [JsonProperty("bizum")] + [STJS.JsonPropertyName("bizum")] + public PaymentMethodBizum Bizum { get; set; } + [JsonProperty("blik")] [STJS.JsonPropertyName("blik")] public PaymentMethodBlik Blik { get; set; } @@ -337,6 +341,10 @@ public Customer Customer [STJS.JsonPropertyName("satispay")] public PaymentMethodSatispay Satispay { get; set; } + [JsonProperty("scalapay")] + [STJS.JsonPropertyName("scalapay")] + public PaymentMethodScalapay Scalapay { get; set; } + [JsonProperty("sepa_debit")] [STJS.JsonPropertyName("sepa_debit")] public PaymentMethodSepaDebit SepaDebit { get; set; } @@ -378,7 +386,7 @@ public Customer Customer /// PaymentMethod type. /// One of: acss_debit, affirm, afterpay_clearpay, alipay, /// alma, amazon_pay, au_becs_debit, bacs_debit, - /// bancontact, billie, blik, boleto, card, + /// bancontact, billie, bizum, blik, boleto, card, /// card_present, cashapp, crypto, custom, /// customer_balance, eps, fpx, giropay, gopay, /// grabpay, id_bank_transfer, ideal, interac_present, @@ -387,9 +395,9 @@ public Customer Customer /// nz_bank_account, oxxo, p24, pay_by_bank, payco, /// paynow, paypal, paypay, payto, pix, promptpay, /// qris, rechnung, revolut_pay, samsung_pay, satispay, - /// sepa_debit, shopeepay, sofort, stripe_balance, - /// sunbit, swish, twint, upi, us_bank_account, - /// wechat_pay, or zip. + /// scalapay, sepa_debit, shopeepay, sofort, + /// stripe_balance, sunbit, swish, twint, upi, + /// us_bank_account, wechat_pay, or zip. /// [JsonProperty("type")] [STJS.JsonPropertyName("type")] diff --git a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodBizum.cs b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodBizum.cs new file mode 100644 index 0000000000..285d8bedce --- /dev/null +++ b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodBizum.cs @@ -0,0 +1,12 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class PaymentMethodBizum : StripeEntity + { + } +} diff --git a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodScalapay.cs b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodScalapay.cs new file mode 100644 index 0000000000..9c2a9164dd --- /dev/null +++ b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodScalapay.cs @@ -0,0 +1,12 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class PaymentMethodScalapay : StripeEntity + { + } +} diff --git a/src/Stripe.net/Entities/PaymentRecords/PaymentRecordPaymentMethodDetails.cs b/src/Stripe.net/Entities/PaymentRecords/PaymentRecordPaymentMethodDetails.cs index e601fd5ac7..adf399845e 100644 --- a/src/Stripe.net/Entities/PaymentRecords/PaymentRecordPaymentMethodDetails.cs +++ b/src/Stripe.net/Entities/PaymentRecords/PaymentRecordPaymentMethodDetails.cs @@ -63,6 +63,10 @@ public class PaymentRecordPaymentMethodDetails : StripeEntity + { + /// + /// The Bizum transaction ID associated with this payment. + /// + [JsonProperty("transaction_id")] + [STJS.JsonPropertyName("transaction_id")] + public string TransactionId { get; set; } + } +} diff --git a/src/Stripe.net/Entities/PaymentRecords/PaymentRecordPaymentMethodDetailsRevolutPayFunding.cs b/src/Stripe.net/Entities/PaymentRecords/PaymentRecordPaymentMethodDetailsRevolutPayFunding.cs index 79783decfe..d97e32cfe9 100644 --- a/src/Stripe.net/Entities/PaymentRecords/PaymentRecordPaymentMethodDetailsRevolutPayFunding.cs +++ b/src/Stripe.net/Entities/PaymentRecords/PaymentRecordPaymentMethodDetailsRevolutPayFunding.cs @@ -13,7 +13,7 @@ public class PaymentRecordPaymentMethodDetailsRevolutPayFunding : StripeEntity

- /// funding type of the underlying payment method. + /// Funding type of the underlying payment method. ///

[JsonProperty("type")] [STJS.JsonPropertyName("type")] diff --git a/src/Stripe.net/Entities/PaymentRecords/PaymentRecordPaymentMethodDetailsScalapay.cs b/src/Stripe.net/Entities/PaymentRecords/PaymentRecordPaymentMethodDetailsScalapay.cs new file mode 100644 index 0000000000..324d7bee2c --- /dev/null +++ b/src/Stripe.net/Entities/PaymentRecords/PaymentRecordPaymentMethodDetailsScalapay.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class PaymentRecordPaymentMethodDetailsScalapay : StripeEntity + { + /// + /// The Scalapay transaction ID associated with this payment. + /// + [JsonProperty("transaction_id")] + [STJS.JsonPropertyName("transaction_id")] + public string TransactionId { get; set; } + } +} diff --git a/src/Stripe.net/Entities/PaymentRecords/PaymentRecordPaymentMethodDetailsTwint.cs b/src/Stripe.net/Entities/PaymentRecords/PaymentRecordPaymentMethodDetailsTwint.cs index 5b04998002..879acc1259 100644 --- a/src/Stripe.net/Entities/PaymentRecords/PaymentRecordPaymentMethodDetailsTwint.cs +++ b/src/Stripe.net/Entities/PaymentRecords/PaymentRecordPaymentMethodDetailsTwint.cs @@ -8,5 +8,11 @@ namespace Stripe [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class PaymentRecordPaymentMethodDetailsTwint : StripeEntity { + /// + /// ID of the multi use Mandate generated by the PaymentIntent. + /// + [JsonProperty("mandate")] + [STJS.JsonPropertyName("mandate")] + public string Mandate { get; set; } } } diff --git a/src/Stripe.net/Entities/ProductCatalog/TrialOffers/TrialOffer.cs b/src/Stripe.net/Entities/ProductCatalog/TrialOffers/TrialOffer.cs index 263b848615..992dbebd4b 100644 --- a/src/Stripe.net/Entities/ProductCatalog/TrialOffers/TrialOffer.cs +++ b/src/Stripe.net/Entities/ProductCatalog/TrialOffers/TrialOffer.cs @@ -6,9 +6,11 @@ namespace Stripe.ProductCatalog using STJS = System.Text.Json.Serialization; /// - /// Resource for the TrialOffer API, used to describe a subscription item's trial period - /// settings. Renders a TrialOffer object that describes the price, duration, end_behavior - /// of a trial offer. + /// Trial offers let you define free or paid introductory pricing for a subscription item. A + /// TrialOffer specifies the price to charge during the trial, how long the trial lasts (a + /// fixed end timestamp or a number of billing intervals), and what price the subscription + /// item transitions to when the trial ends. You attach a TrialOffer to a subscription item + /// using items[current_trial][trial_offer] when creating or updating a subscription. /// [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class TrialOffer : StripeEntity, IHasId, IHasObject diff --git a/src/Stripe.net/Entities/ProductCatalog/TrialOffers/TrialOfferEndBehaviorTransition.cs b/src/Stripe.net/Entities/ProductCatalog/TrialOffers/TrialOfferEndBehaviorTransition.cs index ffabf18a74..5964f090ff 100644 --- a/src/Stripe.net/Entities/ProductCatalog/TrialOffers/TrialOfferEndBehaviorTransition.cs +++ b/src/Stripe.net/Entities/ProductCatalog/TrialOffers/TrialOfferEndBehaviorTransition.cs @@ -8,11 +8,39 @@ namespace Stripe.ProductCatalog [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class TrialOfferEndBehaviorTransition : StripeEntity { + #region Expandable Price + + /// + /// (ID of the Price) + /// The new price to use at the end of the trial offer period. + /// + [JsonIgnore] + [STJS.JsonIgnore] + public string PriceId + { + get => this.InternalPrice?.Id; + set => this.InternalPrice = SetExpandableFieldId(value, this.InternalPrice); + } + /// + /// (Expanded) /// The new price to use at the end of the trial offer period. + /// + /// For more information, see the expand documentation. /// + [JsonIgnore] + [STJS.JsonIgnore] + public Price Price + { + get => this.InternalPrice?.ExpandedObject; + set => this.InternalPrice = SetExpandableFieldObject(value, this.InternalPrice); + } + [JsonProperty("price")] + [JsonConverter(typeof(ExpandableFieldConverter))] [STJS.JsonPropertyName("price")] - public string Price { get; set; } + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] + internal ExpandableField InternalPrice { get; set; } + #endregion } } diff --git a/src/Stripe.net/Entities/QuotePreviewInvoices/QuotePreviewInvoice.cs b/src/Stripe.net/Entities/QuotePreviewInvoices/QuotePreviewInvoice.cs index c3a2ced0c8..840893914c 100644 --- a/src/Stripe.net/Entities/QuotePreviewInvoices/QuotePreviewInvoice.cs +++ b/src/Stripe.net/Entities/QuotePreviewInvoices/QuotePreviewInvoice.cs @@ -140,6 +140,13 @@ public List AccountTaxIds [STJS.JsonPropertyName("amount_paid")] public long AmountPaid { get; set; } + /// + /// Amount, in cents (or local equivalent), that was paid on the invoice outside of Stripe. + /// + [JsonProperty("amount_paid_off_stripe")] + [STJS.JsonPropertyName("amount_paid_off_stripe")] + public long AmountPaidOffStripe { get; set; } + /// /// The difference between amount_due and amount_paid, in cents (or local equivalent). /// diff --git a/src/Stripe.net/Entities/QuotePreviewInvoices/QuotePreviewInvoicePaymentSettings.cs b/src/Stripe.net/Entities/QuotePreviewInvoices/QuotePreviewInvoicePaymentSettings.cs index fe0472788f..5bff6a165d 100644 --- a/src/Stripe.net/Entities/QuotePreviewInvoices/QuotePreviewInvoicePaymentSettings.cs +++ b/src/Stripe.net/Entities/QuotePreviewInvoices/QuotePreviewInvoicePaymentSettings.cs @@ -41,8 +41,8 @@ public class QuotePreviewInvoicePaymentSettings : StripeEntitynaver_pay, nz_bank_account, p24, pay_by_bank, payco, /// paynow, paypal, payto, pix, promptpay, /// revolut_pay, sepa_credit_transfer, sepa_debit, sofort, - /// stripe_balance, swish, upi, us_bank_account, or - /// wechat_pay. + /// stripe_balance, swish, twint, upi, us_bank_account, + /// or wechat_pay. /// [JsonProperty("payment_method_types")] [STJS.JsonPropertyName("payment_method_types")] diff --git a/src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionSchedulePhaseAddInvoiceItem.cs b/src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionSchedulePhaseAddInvoiceItem.cs index 3ca6bc996c..6e02c6ff80 100644 --- a/src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionSchedulePhaseAddInvoiceItem.cs +++ b/src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionSchedulePhaseAddInvoiceItem.cs @@ -9,6 +9,14 @@ namespace Stripe [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class QuotePreviewSubscriptionSchedulePhaseAddInvoiceItem : StripeEntity, IHasMetadata { + /// + /// Controls whether discounts apply to this invoice item. Defaults to true if no value is + /// provided. + /// + [JsonProperty("discountable")] + [STJS.JsonPropertyName("discountable")] + public bool? Discountable { get; set; } + /// /// The stackable discounts that will be applied to the item. /// diff --git a/src/Stripe.net/Entities/Radar/PaymentEvaluations/PaymentEvaluation.cs b/src/Stripe.net/Entities/Radar/PaymentEvaluations/PaymentEvaluation.cs index 9ce2e59da5..e953b415d5 100644 --- a/src/Stripe.net/Entities/Radar/PaymentEvaluations/PaymentEvaluation.cs +++ b/src/Stripe.net/Entities/Radar/PaymentEvaluations/PaymentEvaluation.cs @@ -95,7 +95,7 @@ public class PaymentEvaluation : StripeEntity, IHasId, IHasMe /// /// Recommended action based on the score of the fraudulent_payment signal. Possible - /// values are block and continue. + /// values are block, continue and request_three_d_secure. /// One of: block, or continue. /// [JsonProperty("recommended_action")] diff --git a/src/Stripe.net/Entities/Refunds/RefundDestinationDetails.cs b/src/Stripe.net/Entities/Refunds/RefundDestinationDetails.cs index c8e5ff5a03..745d3a731c 100644 --- a/src/Stripe.net/Entities/Refunds/RefundDestinationDetails.cs +++ b/src/Stripe.net/Entities/Refunds/RefundDestinationDetails.cs @@ -124,6 +124,10 @@ public class RefundDestinationDetails : StripeEntity [STJS.JsonPropertyName("revolut")] public RefundDestinationDetailsRevolut Revolut { get; set; } + [JsonProperty("scalapay")] + [STJS.JsonPropertyName("scalapay")] + public RefundDestinationDetailsScalapay Scalapay { get; set; } + [JsonProperty("sofort")] [STJS.JsonPropertyName("sofort")] public RefundDestinationDetailsSofort Sofort { get; set; } diff --git a/src/Stripe.net/Entities/Refunds/RefundDestinationDetailsScalapay.cs b/src/Stripe.net/Entities/Refunds/RefundDestinationDetailsScalapay.cs new file mode 100644 index 0000000000..bc6a90d020 --- /dev/null +++ b/src/Stripe.net/Entities/Refunds/RefundDestinationDetailsScalapay.cs @@ -0,0 +1,12 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class RefundDestinationDetailsScalapay : StripeEntity + { + } +} diff --git a/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetails.cs b/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetails.cs index a478e216fa..d2f88cbf28 100644 --- a/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetails.cs +++ b/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetails.cs @@ -104,6 +104,10 @@ public class SetupAttemptPaymentMethodDetails : StripeEntity /// The type of the payment method used in the SetupIntent (e.g., card). An /// additional hash is included on payment_method_details with a name matching this diff --git a/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetailsTwint.cs b/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetailsTwint.cs new file mode 100644 index 0000000000..36d5389805 --- /dev/null +++ b/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetailsTwint.cs @@ -0,0 +1,12 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class SetupAttemptPaymentMethodDetailsTwint : StripeEntity + { + } +} diff --git a/src/Stripe.net/Entities/SetupIntents/SetupIntent.cs b/src/Stripe.net/Entities/SetupIntents/SetupIntent.cs index 95c5134032..2a7b59067d 100644 --- a/src/Stripe.net/Entities/SetupIntents/SetupIntent.cs +++ b/src/Stripe.net/Entities/SetupIntents/SetupIntent.cs @@ -208,16 +208,17 @@ public Customer Customer /// Payment method types that are excluded from this SetupIntent. /// One of: acss_debit, affirm, afterpay_clearpay, alipay, /// alma, amazon_pay, au_becs_debit, bacs_debit, - /// bancontact, billie, blik, boleto, card, + /// bancontact, billie, bizum, blik, boleto, card, /// cashapp, crypto, customer_balance, eps, fpx, /// giropay, gopay, grabpay, id_bank_transfer, ideal, /// kakao_pay, klarna, konbini, kr_card, mb_way, /// mobilepay, multibanco, naver_pay, nz_bank_account, /// oxxo, p24, pay_by_bank, payco, paynow, paypal, /// paypay, payto, pix, promptpay, qris, rechnung, - /// revolut_pay, samsung_pay, satispay, sepa_debit, - /// shopeepay, sofort, stripe_balance, sunbit, swish, - /// twint, upi, us_bank_account, wechat_pay, or zip. + /// revolut_pay, samsung_pay, satispay, scalapay, + /// sepa_debit, shopeepay, sofort, stripe_balance, + /// sunbit, swish, twint, upi, us_bank_account, + /// wechat_pay, or zip. /// [JsonProperty("excluded_payment_method_types")] [STJS.JsonPropertyName("excluded_payment_method_types")] diff --git a/src/Stripe.net/Entities/SetupIntents/SetupIntentNextAction.cs b/src/Stripe.net/Entities/SetupIntents/SetupIntentNextAction.cs index f816c9c357..600f7bd269 100644 --- a/src/Stripe.net/Entities/SetupIntents/SetupIntentNextAction.cs +++ b/src/Stripe.net/Entities/SetupIntents/SetupIntentNextAction.cs @@ -9,6 +9,10 @@ namespace Stripe [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class SetupIntentNextAction : StripeEntity { + [JsonProperty("blik_authorize")] + [STJS.JsonPropertyName("blik_authorize")] + public SetupIntentNextActionBlikAuthorize BlikAuthorize { get; set; } + [JsonProperty("cashapp_handle_redirect_or_display_qr_code")] [STJS.JsonPropertyName("cashapp_handle_redirect_or_display_qr_code")] public SetupIntentNextActionCashappHandleRedirectOrDisplayQrCode CashappHandleRedirectOrDisplayQrCode { get; set; } diff --git a/src/Stripe.net/Entities/SetupIntents/SetupIntentNextActionBlikAuthorize.cs b/src/Stripe.net/Entities/SetupIntents/SetupIntentNextActionBlikAuthorize.cs new file mode 100644 index 0000000000..afb32c03aa --- /dev/null +++ b/src/Stripe.net/Entities/SetupIntents/SetupIntentNextActionBlikAuthorize.cs @@ -0,0 +1,12 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class SetupIntentNextActionBlikAuthorize : StripeEntity + { + } +} diff --git a/src/Stripe.net/Entities/SetupIntents/SetupIntentPaymentMethodOptions.cs b/src/Stripe.net/Entities/SetupIntents/SetupIntentPaymentMethodOptions.cs index 3185a7e0bc..5890537805 100644 --- a/src/Stripe.net/Entities/SetupIntents/SetupIntentPaymentMethodOptions.cs +++ b/src/Stripe.net/Entities/SetupIntents/SetupIntentPaymentMethodOptions.cs @@ -20,6 +20,10 @@ public class SetupIntentPaymentMethodOptions : StripeEntity + { + } +} diff --git a/src/Stripe.net/Entities/SharedPayment/GrantedTokens/GrantedTokenPaymentMethodDetails.cs b/src/Stripe.net/Entities/SharedPayment/GrantedTokens/GrantedTokenPaymentMethodDetails.cs index b0dbe6623b..fb0c32da7b 100644 --- a/src/Stripe.net/Entities/SharedPayment/GrantedTokens/GrantedTokenPaymentMethodDetails.cs +++ b/src/Stripe.net/Entities/SharedPayment/GrantedTokens/GrantedTokenPaymentMethodDetails.cs @@ -56,6 +56,10 @@ public class GrantedTokenPaymentMethodDetails : StripeEntityacss_debit, affirm, afterpay_clearpay, alipay, /// alma, amazon_pay, au_becs_debit, bacs_debit, - /// bancontact, billie, blik, boleto, card, + /// bancontact, billie, bizum, blik, boleto, card, /// card_present, cashapp, crypto, custom, /// customer_balance, eps, fpx, giropay, gopay, /// grabpay, id_bank_transfer, ideal, interac_present, @@ -259,9 +267,9 @@ public class GrantedTokenPaymentMethodDetails : StripeEntitynz_bank_account, oxxo, p24, pay_by_bank, payco, /// paynow, paypal, paypay, payto, pix, promptpay, /// qris, rechnung, revolut_pay, samsung_pay, satispay, - /// sepa_debit, shopeepay, sofort, stripe_balance, - /// sunbit, swish, twint, upi, us_bank_account, - /// wechat_pay, or zip. + /// scalapay, sepa_debit, shopeepay, sofort, + /// stripe_balance, sunbit, swish, twint, upi, + /// us_bank_account, wechat_pay, or zip. /// [JsonProperty("type")] [STJS.JsonPropertyName("type")] diff --git a/src/Stripe.net/Entities/SharedPayment/GrantedTokens/GrantedTokenPaymentMethodDetailsBizum.cs b/src/Stripe.net/Entities/SharedPayment/GrantedTokens/GrantedTokenPaymentMethodDetailsBizum.cs new file mode 100644 index 0000000000..3f48efe3cb --- /dev/null +++ b/src/Stripe.net/Entities/SharedPayment/GrantedTokens/GrantedTokenPaymentMethodDetailsBizum.cs @@ -0,0 +1,12 @@ +// File generated from our OpenAPI spec +namespace Stripe.SharedPayment +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class GrantedTokenPaymentMethodDetailsBizum : StripeEntity + { + } +} diff --git a/src/Stripe.net/Entities/SharedPayment/GrantedTokens/GrantedTokenPaymentMethodDetailsScalapay.cs b/src/Stripe.net/Entities/SharedPayment/GrantedTokens/GrantedTokenPaymentMethodDetailsScalapay.cs new file mode 100644 index 0000000000..0e0365ab34 --- /dev/null +++ b/src/Stripe.net/Entities/SharedPayment/GrantedTokens/GrantedTokenPaymentMethodDetailsScalapay.cs @@ -0,0 +1,12 @@ +// File generated from our OpenAPI spec +namespace Stripe.SharedPayment +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class GrantedTokenPaymentMethodDetailsScalapay : StripeEntity + { + } +} diff --git a/src/Stripe.net/Entities/SubscriptionItems/SubscriptionItem.cs b/src/Stripe.net/Entities/SubscriptionItems/SubscriptionItem.cs index 6887efa2eb..6b448ecf91 100644 --- a/src/Stripe.net/Entities/SubscriptionItems/SubscriptionItem.cs +++ b/src/Stripe.net/Entities/SubscriptionItems/SubscriptionItem.cs @@ -36,7 +36,7 @@ public class SubscriptionItem : StripeEntity, IHasId, IHasMeta [JsonConverter(typeof(UnixDateTimeConverter))] [STJS.JsonPropertyName("billed_until")] [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] - public DateTime? BilledUntil { get; set; } + public DateTime BilledUntil { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// /// Define thresholds at which an invoice will be sent, and the related subscription diff --git a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseAddInvoiceItem.cs b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseAddInvoiceItem.cs index 30089a56ff..7d9e16122c 100644 --- a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseAddInvoiceItem.cs +++ b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedulePhaseAddInvoiceItem.cs @@ -9,6 +9,14 @@ namespace Stripe [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class SubscriptionSchedulePhaseAddInvoiceItem : StripeEntity, IHasMetadata { + /// + /// Controls whether discounts apply to this invoice item. Defaults to true if no value is + /// provided. + /// + [JsonProperty("discountable")] + [STJS.JsonPropertyName("discountable")] + public bool? Discountable { get; set; } + /// /// The stackable discounts that will be applied to the item. /// diff --git a/src/Stripe.net/Entities/Subscriptions/Subscription.cs b/src/Stripe.net/Entities/Subscriptions/Subscription.cs index 8aa6db1971..e515eb49bb 100644 --- a/src/Stripe.net/Entities/Subscriptions/Subscription.cs +++ b/src/Stripe.net/Entities/Subscriptions/Subscription.cs @@ -702,6 +702,13 @@ public SubscriptionSchedule Schedule [STJS.JsonPropertyName("status")] public string Status { get; set; } + /// + /// Describes changes to the subscription's status. + /// + [JsonProperty("status_details")] + [STJS.JsonPropertyName("status_details")] + public SubscriptionStatusDetails StatusDetails { get; set; } + #region Expandable TestClock /// diff --git a/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettings.cs b/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettings.cs index 10eafd3422..8a4fb65ced 100644 --- a/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettings.cs +++ b/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettings.cs @@ -33,8 +33,8 @@ public class SubscriptionPaymentSettings : StripeEntitynaver_pay, nz_bank_account, p24, pay_by_bank, payco, /// paynow, paypal, payto, pix, promptpay, /// revolut_pay, sepa_credit_transfer, sepa_debit, sofort, - /// stripe_balance, swish, upi, us_bank_account, or - /// wechat_pay. + /// stripe_balance, swish, twint, upi, us_bank_account, + /// or wechat_pay. /// [JsonProperty("payment_method_types")] [STJS.JsonPropertyName("payment_method_types")] diff --git a/src/Stripe.net/Entities/Subscriptions/SubscriptionPendingUpdate.cs b/src/Stripe.net/Entities/Subscriptions/SubscriptionPendingUpdate.cs index af2a515a5f..e6d92856a2 100644 --- a/src/Stripe.net/Entities/Subscriptions/SubscriptionPendingUpdate.cs +++ b/src/Stripe.net/Entities/Subscriptions/SubscriptionPendingUpdate.cs @@ -3,12 +3,13 @@ namespace Stripe { using System; using System.Collections.Generic; + using System.Linq; using Newtonsoft.Json; using Stripe.Infrastructure; using STJS = System.Text.Json.Serialization; [STJS.JsonConverter(typeof(STJStripeEntityConverter))] - public class SubscriptionPendingUpdate : StripeEntity + public class SubscriptionPendingUpdate : StripeEntity, IHasMetadata { /// /// If the update is applied, determines the date of the first full invoice, and, for plans @@ -21,6 +22,49 @@ public class SubscriptionPendingUpdate : StripeEntity [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] public DateTime? BillingCycleAnchor { get; set; } + /// + /// The pending subscription-level discount that will be applied when the pending update is + /// applied. + /// + [JsonProperty("discount")] + [STJS.JsonPropertyName("discount")] + public Discount Discount { get; set; } + + #region Expandable Discounts + + /// + /// (IDs of the Discounts) + /// The discounts that will be applied to the subscription when the pending update is + /// applied. Use expand[]=discounts to expand each discount. + /// + [JsonIgnore] + [STJS.JsonIgnore] + public List DiscountIds + { + get => this.InternalDiscounts?.Select((x) => x.Id).ToList(); + set => this.InternalDiscounts = SetExpandableArrayIds(value); + } + + /// + /// (Expanded) + /// The discounts that will be applied to the subscription when the pending update is + /// applied. Use expand[]=discounts to expand each discount. + /// + /// For more information, see the expand documentation. + /// + [JsonIgnore] + [STJS.JsonIgnore] + public List Discounts + { + get => this.InternalDiscounts?.Select((x) => x.ExpandedObject).ToList(); + set => this.InternalDiscounts = SetExpandableArrayObjects(value); + } + + [JsonProperty("discounts", ItemConverterType = typeof(ExpandableFieldConverter))] + [STJS.JsonPropertyName("discounts")] + internal List> InternalDiscounts { get; set; } + #endregion + /// /// The point after which the changes reflected by this update will be discarded and no /// longer applied. @@ -31,6 +75,15 @@ public class SubscriptionPendingUpdate : StripeEntity [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] public DateTime ExpiresAt { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; + /// + /// Set of key-value pairs that you can + /// attach to an object. This can be useful for storing additional information about the + /// object in a structured format. + /// + [JsonProperty("metadata")] + [STJS.JsonPropertyName("metadata")] + public Dictionary Metadata { get; set; } + /// /// The number of iterations of prebilling to apply. /// diff --git a/src/Stripe.net/Entities/Subscriptions/SubscriptionStatusDetails.cs b/src/Stripe.net/Entities/Subscriptions/SubscriptionStatusDetails.cs new file mode 100644 index 0000000000..d0b25c6a58 --- /dev/null +++ b/src/Stripe.net/Entities/Subscriptions/SubscriptionStatusDetails.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class SubscriptionStatusDetails : StripeEntity + { + /// + /// Indicates when and why the subscription transitioned to the paused status. + /// + [JsonProperty("paused")] + [STJS.JsonPropertyName("paused")] + public SubscriptionStatusDetailsPaused Paused { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Subscriptions/SubscriptionStatusDetailsPaused.cs b/src/Stripe.net/Entities/Subscriptions/SubscriptionStatusDetailsPaused.cs new file mode 100644 index 0000000000..185af54977 --- /dev/null +++ b/src/Stripe.net/Entities/Subscriptions/SubscriptionStatusDetailsPaused.cs @@ -0,0 +1,35 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using System; + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class SubscriptionStatusDetailsPaused : StripeEntity + { + /// + /// Information on the type=subscription pause. + /// + [JsonProperty("subscription")] + [STJS.JsonPropertyName("subscription")] + public SubscriptionStatusDetailsPausedSubscription Subscription { get; set; } + + /// + /// Unix timestamp in seconds of when the subscription status transitioned to paused. + /// + [JsonProperty("transitioned_at")] + [JsonConverter(typeof(UnixDateTimeConverter))] + [STJS.JsonPropertyName("transitioned_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] + public DateTime TransitionedAt { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; + + /// + /// The type of pause. + /// + [JsonProperty("type")] + [STJS.JsonPropertyName("type")] + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Subscriptions/SubscriptionStatusDetailsPausedSubscription.cs b/src/Stripe.net/Entities/Subscriptions/SubscriptionStatusDetailsPausedSubscription.cs new file mode 100644 index 0000000000..65d39be41b --- /dev/null +++ b/src/Stripe.net/Entities/Subscriptions/SubscriptionStatusDetailsPausedSubscription.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class SubscriptionStatusDetailsPausedSubscription : StripeEntity + { + /// + /// The reason that the subscription was paused. + /// One of: pause_requested, system, or + /// trial_end_without_payment_method. + /// + [JsonProperty("type")] + [STJS.JsonPropertyName("type")] + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Terminal/Configurations/Configuration.cs b/src/Stripe.net/Entities/Terminal/Configurations/Configuration.cs index 5637e0e3fc..1a0ab6f957 100644 --- a/src/Stripe.net/Entities/Terminal/Configurations/Configuration.cs +++ b/src/Stripe.net/Entities/Terminal/Configurations/Configuration.cs @@ -94,10 +94,26 @@ public class Configuration : StripeEntity, IHasId, IHasObject [STJS.JsonPropertyName("tipping")] public ConfigurationTipping Tipping { get; set; } + [JsonProperty("verifone_m425")] + [STJS.JsonPropertyName("verifone_m425")] + public ConfigurationVerifoneM425 VerifoneM425 { get; set; } + [JsonProperty("verifone_p400")] [STJS.JsonPropertyName("verifone_p400")] public ConfigurationVerifoneP400 VerifoneP400 { get; set; } + [JsonProperty("verifone_p630")] + [STJS.JsonPropertyName("verifone_p630")] + public ConfigurationVerifoneP630 VerifoneP630 { get; set; } + + [JsonProperty("verifone_ux700")] + [STJS.JsonPropertyName("verifone_ux700")] + public ConfigurationVerifoneUx700 VerifoneUx700 { get; set; } + + [JsonProperty("verifone_v660p")] + [STJS.JsonPropertyName("verifone_v660p")] + public ConfigurationVerifoneV660p VerifoneV660p { get; set; } + [JsonProperty("wifi")] [STJS.JsonPropertyName("wifi")] public ConfigurationWifi Wifi { get; set; } diff --git a/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationVerifoneM425.cs b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationVerifoneM425.cs new file mode 100644 index 0000000000..87c4cd11fa --- /dev/null +++ b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationVerifoneM425.cs @@ -0,0 +1,46 @@ +// File generated from our OpenAPI spec +namespace Stripe.Terminal +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class ConfigurationVerifoneM425 : StripeEntity + { + #region Expandable Splashscreen + + /// + /// (ID of the File) + /// A File ID representing an image to display on the reader. + /// + [JsonIgnore] + [STJS.JsonIgnore] + public string SplashscreenId + { + get => this.InternalSplashscreen?.Id; + set => this.InternalSplashscreen = SetExpandableFieldId(value, this.InternalSplashscreen); + } + + /// + /// (Expanded) + /// A File ID representing an image to display on the reader. + /// + /// For more information, see the expand documentation. + /// + [JsonIgnore] + [STJS.JsonIgnore] + public File Splashscreen + { + get => this.InternalSplashscreen?.ExpandedObject; + set => this.InternalSplashscreen = SetExpandableFieldObject(value, this.InternalSplashscreen); + } + + [JsonProperty("splashscreen")] + [JsonConverter(typeof(ExpandableFieldConverter))] + [STJS.JsonPropertyName("splashscreen")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] + internal ExpandableField InternalSplashscreen { get; set; } + #endregion + } +} diff --git a/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationVerifoneP630.cs b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationVerifoneP630.cs new file mode 100644 index 0000000000..4a687a8041 --- /dev/null +++ b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationVerifoneP630.cs @@ -0,0 +1,46 @@ +// File generated from our OpenAPI spec +namespace Stripe.Terminal +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class ConfigurationVerifoneP630 : StripeEntity + { + #region Expandable Splashscreen + + /// + /// (ID of the File) + /// A File ID representing an image to display on the reader. + /// + [JsonIgnore] + [STJS.JsonIgnore] + public string SplashscreenId + { + get => this.InternalSplashscreen?.Id; + set => this.InternalSplashscreen = SetExpandableFieldId(value, this.InternalSplashscreen); + } + + /// + /// (Expanded) + /// A File ID representing an image to display on the reader. + /// + /// For more information, see the expand documentation. + /// + [JsonIgnore] + [STJS.JsonIgnore] + public File Splashscreen + { + get => this.InternalSplashscreen?.ExpandedObject; + set => this.InternalSplashscreen = SetExpandableFieldObject(value, this.InternalSplashscreen); + } + + [JsonProperty("splashscreen")] + [JsonConverter(typeof(ExpandableFieldConverter))] + [STJS.JsonPropertyName("splashscreen")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] + internal ExpandableField InternalSplashscreen { get; set; } + #endregion + } +} diff --git a/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationVerifoneUx700.cs b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationVerifoneUx700.cs new file mode 100644 index 0000000000..582503a7f9 --- /dev/null +++ b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationVerifoneUx700.cs @@ -0,0 +1,46 @@ +// File generated from our OpenAPI spec +namespace Stripe.Terminal +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class ConfigurationVerifoneUx700 : StripeEntity + { + #region Expandable Splashscreen + + /// + /// (ID of the File) + /// A File ID representing an image to display on the reader. + /// + [JsonIgnore] + [STJS.JsonIgnore] + public string SplashscreenId + { + get => this.InternalSplashscreen?.Id; + set => this.InternalSplashscreen = SetExpandableFieldId(value, this.InternalSplashscreen); + } + + /// + /// (Expanded) + /// A File ID representing an image to display on the reader. + /// + /// For more information, see the expand documentation. + /// + [JsonIgnore] + [STJS.JsonIgnore] + public File Splashscreen + { + get => this.InternalSplashscreen?.ExpandedObject; + set => this.InternalSplashscreen = SetExpandableFieldObject(value, this.InternalSplashscreen); + } + + [JsonProperty("splashscreen")] + [JsonConverter(typeof(ExpandableFieldConverter))] + [STJS.JsonPropertyName("splashscreen")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] + internal ExpandableField InternalSplashscreen { get; set; } + #endregion + } +} diff --git a/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationVerifoneV660p.cs b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationVerifoneV660p.cs new file mode 100644 index 0000000000..a32a75993e --- /dev/null +++ b/src/Stripe.net/Entities/Terminal/Configurations/ConfigurationVerifoneV660p.cs @@ -0,0 +1,46 @@ +// File generated from our OpenAPI spec +namespace Stripe.Terminal +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class ConfigurationVerifoneV660p : StripeEntity + { + #region Expandable Splashscreen + + /// + /// (ID of the File) + /// A File ID representing an image to display on the reader. + /// + [JsonIgnore] + [STJS.JsonIgnore] + public string SplashscreenId + { + get => this.InternalSplashscreen?.Id; + set => this.InternalSplashscreen = SetExpandableFieldId(value, this.InternalSplashscreen); + } + + /// + /// (Expanded) + /// A File ID representing an image to display on the reader. + /// + /// For more information, see the expand documentation. + /// + [JsonIgnore] + [STJS.JsonIgnore] + public File Splashscreen + { + get => this.InternalSplashscreen?.ExpandedObject; + set => this.InternalSplashscreen = SetExpandableFieldObject(value, this.InternalSplashscreen); + } + + [JsonProperty("splashscreen")] + [JsonConverter(typeof(ExpandableFieldConverter))] + [STJS.JsonPropertyName("splashscreen")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] + internal ExpandableField InternalSplashscreen { get; set; } + #endregion + } +} diff --git a/src/Stripe.net/Entities/Terminal/Readers/Reader.cs b/src/Stripe.net/Entities/Terminal/Readers/Reader.cs index cf28061c9a..fe0a823199 100644 --- a/src/Stripe.net/Entities/Terminal/Readers/Reader.cs +++ b/src/Stripe.net/Entities/Terminal/Readers/Reader.cs @@ -57,8 +57,11 @@ public class Reader : StripeEntity, IHasId, IHasMetadata, IHasObject /// Device type of the reader. /// One of: bbpos_chipper2x, bbpos_wisepad3, bbpos_wisepos_e, /// mobile_phone_reader, simulated_stripe_s700, simulated_stripe_s710, - /// simulated_wisepos_e, stripe_m2, stripe_s700, stripe_s710, or - /// verifone_P400. + /// simulated_verifone_m425, simulated_verifone_p630, + /// simulated_verifone_ux700, simulated_verifone_v660p, + /// simulated_wisepos_e, stripe_m2, stripe_s700, stripe_s710, + /// verifone_P400, verifone_m425, verifone_p630, verifone_ux700, + /// or verifone_v660p. /// [JsonProperty("device_type")] [STJS.JsonPropertyName("device_type")] diff --git a/src/Stripe.net/Entities/Terminal/Readers/ReaderAction.cs b/src/Stripe.net/Entities/Terminal/Readers/ReaderAction.cs index 5b99fd99b2..dd2a890df4 100644 --- a/src/Stripe.net/Entities/Terminal/Readers/ReaderAction.cs +++ b/src/Stripe.net/Entities/Terminal/Readers/ReaderAction.cs @@ -8,6 +8,19 @@ namespace Stripe.Terminal [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class ReaderAction : StripeEntity { + /// + /// The reader action failed due to an API + /// error. Only present when status is failed and the underlying failure + /// was an API error. Avoid parsing the message field for programmatic logic; use + /// type or code instead. The message field is for display to humans + /// only and may be updated at anytime. Requires reader + /// version 2.42 or later. Readers on older versions always return null. + /// + [JsonProperty("api_error")] + [STJS.JsonPropertyName("api_error")] + public StripeError ApiError { get; set; } + /// /// Represents a reader action to collect customer inputs. /// @@ -43,6 +56,13 @@ public class ReaderAction : StripeEntity [STJS.JsonPropertyName("failure_message")] public string FailureMessage { get; set; } + /// + /// Represents a reader action to print content. + /// + [JsonProperty("print_content")] + [STJS.JsonPropertyName("print_content")] + public ReaderActionPrintContent PrintContent { get; set; } + /// /// Represents a reader action to process a payment intent. /// @@ -82,7 +102,7 @@ public class ReaderAction : StripeEntity /// /// Type of action performed by the reader. /// One of: collect_inputs, collect_payment_method, - /// confirm_payment_intent, process_payment_intent, + /// confirm_payment_intent, print_content, process_payment_intent, /// process_setup_intent, refund_payment, or set_reader_display. /// [JsonProperty("type")] diff --git a/src/Stripe.net/Entities/Terminal/Readers/ReaderActionPrintContent.cs b/src/Stripe.net/Entities/Terminal/Readers/ReaderActionPrintContent.cs new file mode 100644 index 0000000000..e8fd94845d --- /dev/null +++ b/src/Stripe.net/Entities/Terminal/Readers/ReaderActionPrintContent.cs @@ -0,0 +1,25 @@ +// File generated from our OpenAPI spec +namespace Stripe.Terminal +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class ReaderActionPrintContent : StripeEntity + { + /// + /// Metadata of an uploaded file. + /// + [JsonProperty("image")] + [STJS.JsonPropertyName("image")] + public ReaderActionPrintContentImage Image { get; set; } + + /// + /// The type of content to print. Currently supports image. + /// + [JsonProperty("type")] + [STJS.JsonPropertyName("type")] + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Terminal/Readers/ReaderActionPrintContentImage.cs b/src/Stripe.net/Entities/Terminal/Readers/ReaderActionPrintContentImage.cs new file mode 100644 index 0000000000..35bc19745d --- /dev/null +++ b/src/Stripe.net/Entities/Terminal/Readers/ReaderActionPrintContentImage.cs @@ -0,0 +1,42 @@ +// File generated from our OpenAPI spec +namespace Stripe.Terminal +{ + using System; + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class ReaderActionPrintContentImage : StripeEntity + { + /// + /// Creation time of the object (in seconds since the Unix epoch). + /// + [JsonProperty("created_at")] + [JsonConverter(typeof(UnixDateTimeConverter))] + [STJS.JsonPropertyName("created_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] + public DateTime CreatedAt { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; + + /// + /// The original name of the uploaded file (e.g. receipt.png). + /// + [JsonProperty("filename")] + [STJS.JsonPropertyName("filename")] + public string Filename { get; set; } + + /// + /// The size (in bytes) of the uploaded file. + /// + [JsonProperty("size")] + [STJS.JsonPropertyName("size")] + public long Size { get; set; } + + /// + /// The format of the uploaded file. + /// + [JsonProperty("type")] + [STJS.JsonPropertyName("type")] + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Services/Accounts/AccountCapabilitiesBizumPaymentsOptions.cs b/src/Stripe.net/Services/Accounts/AccountCapabilitiesBizumPaymentsOptions.cs new file mode 100644 index 0000000000..7613d70a70 --- /dev/null +++ b/src/Stripe.net/Services/Accounts/AccountCapabilitiesBizumPaymentsOptions.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCapabilitiesBizumPaymentsOptions : INestedOptions + { + /// + /// Passing true requests the capability for the account, if it is not already requested. A + /// requested capability may not immediately become active. Any requirements to activate the + /// capability are returned in the requirements arrays. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/Accounts/AccountCapabilitiesOptions.cs b/src/Stripe.net/Services/Accounts/AccountCapabilitiesOptions.cs index 13b3299741..89497a13bc 100644 --- a/src/Stripe.net/Services/Accounts/AccountCapabilitiesOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCapabilitiesOptions.cs @@ -92,6 +92,13 @@ public class AccountCapabilitiesOptions : INestedOptions [STJS.JsonPropertyName("billie_payments")] public AccountCapabilitiesBilliePaymentsOptions BilliePayments { get; set; } + /// + /// The bizum_payments capability. + /// + [JsonProperty("bizum_payments")] + [STJS.JsonPropertyName("bizum_payments")] + public AccountCapabilitiesBizumPaymentsOptions BizumPayments { get; set; } + /// /// The blik_payments capability. /// @@ -414,6 +421,13 @@ public class AccountCapabilitiesOptions : INestedOptions [STJS.JsonPropertyName("satispay_payments")] public AccountCapabilitiesSatispayPaymentsOptions SatispayPayments { get; set; } + /// + /// The scalapay_payments capability. + /// + [JsonProperty("scalapay_payments")] + [STJS.JsonPropertyName("scalapay_payments")] + public AccountCapabilitiesScalapayPaymentsOptions ScalapayPayments { get; set; } + /// /// The sepa_bank_transfer_payments capability. /// diff --git a/src/Stripe.net/Services/Accounts/AccountCapabilitiesScalapayPaymentsOptions.cs b/src/Stripe.net/Services/Accounts/AccountCapabilitiesScalapayPaymentsOptions.cs new file mode 100644 index 0000000000..647172c304 --- /dev/null +++ b/src/Stripe.net/Services/Accounts/AccountCapabilitiesScalapayPaymentsOptions.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCapabilitiesScalapayPaymentsOptions : INestedOptions + { + /// + /// Passing true requests the capability for the account, if it is not already requested. A + /// requested capability may not immediately become active. Any requirements to activate the + /// capability are returned in the requirements arrays. + /// + [JsonProperty("requested")] + [STJS.JsonPropertyName("requested")] + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/Accounts/AccountService.cs b/src/Stripe.net/Services/Accounts/AccountService.cs index 79fea208f0..7178f2011f 100644 --- a/src/Stripe.net/Services/Accounts/AccountService.cs +++ b/src/Stripe.net/Services/Accounts/AccountService.cs @@ -210,23 +210,23 @@ public virtual Task RejectAsync(string id, AccountRejectOptions options /// public virtual string SerializeBatchUpdate(string account, AccountUpdateOptions options = null, RequestOptions requestOptions = null) { - var itemId = Guid.NewGuid().ToString(); + var requestId = Guid.NewGuid().ToString(); var stripeVersion = StripeConfiguration.ApiVersion; var stripeContext = requestOptions?.StripeContext; - var item = new Dictionary + var requestBody = new Dictionary { - { "id", itemId }, + { "id", requestId }, { "path_params", new Dictionary { { "account", account } } }, { "params", options }, { "stripe_version", stripeVersion }, }; if (stripeContext != null) { - item["context"] = stripeContext; + requestBody["context"] = stripeContext; } - return JsonSerializer.Serialize(item, new JsonSerializerOptions(StripeConfiguration.SerializerOptions) { DefaultIgnoreCondition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull }); + return JsonSerializer.Serialize(requestBody, new JsonSerializerOptions(StripeConfiguration.SerializerOptions) { DefaultIgnoreCondition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull }); } /// diff --git a/src/Stripe.net/Services/BalanceSettings/BalanceSettingsPaymentsPayoutsAutomaticTransferRulesByCurrencyOptions.cs b/src/Stripe.net/Services/BalanceSettings/BalanceSettingsPaymentsPayoutsAutomaticTransferRulesByCurrencyOptions.cs new file mode 100644 index 0000000000..ae814042c2 --- /dev/null +++ b/src/Stripe.net/Services/BalanceSettings/BalanceSettingsPaymentsPayoutsAutomaticTransferRulesByCurrencyOptions.cs @@ -0,0 +1,35 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class BalanceSettingsPaymentsPayoutsAutomaticTransferRulesByCurrencyOptions : INestedOptions + { + /// + /// The ID of the FinancialAccount that funds will be transferred to during automatic + /// transfers. + /// + [JsonProperty("payout_method")] + [STJS.JsonPropertyName("payout_method")] + public string PayoutMethod { get; set; } + + /// + /// The maximum amount in minor units to transfer to the FinancialAccount. Required and only + /// applicable when type is transfer_up_to_amount. + /// + [JsonProperty("transfer_up_to_amount")] + [STJS.JsonPropertyName("transfer_up_to_amount")] + public long? TransferUpToAmount { get; set; } + + /// + /// The type of automatic transfer rule. + /// One of: transfer_all, or transfer_up_to_amount. + /// + [JsonProperty("type")] + [STJS.JsonPropertyName("type")] + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Services/BalanceSettings/BalanceSettingsPaymentsPayoutsOptions.cs b/src/Stripe.net/Services/BalanceSettings/BalanceSettingsPaymentsPayoutsOptions.cs index b64374ca85..e72e055730 100644 --- a/src/Stripe.net/Services/BalanceSettings/BalanceSettingsPaymentsPayoutsOptions.cs +++ b/src/Stripe.net/Services/BalanceSettings/BalanceSettingsPaymentsPayoutsOptions.cs @@ -9,12 +9,31 @@ namespace Stripe [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class BalanceSettingsPaymentsPayoutsOptions : INestedOptions, IHasSetTracking { + private Dictionary> automaticTransferRulesByCurrency; private Dictionary minimumBalanceByCurrency; [JsonIgnore] [STJS.JsonIgnore] internal SetTracker SetTracker { get; } = new SetTracker(); + /// + /// Configures per-currency rules for automatically transferring funds from the payments + /// balance to a FinancialAccount. + /// + [JsonProperty("automatic_transfer_rules_by_currency", NullValueHandling = NullValueHandling.Ignore)] + [STJS.JsonPropertyName("automatic_transfer_rules_by_currency")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] + [STJS.JsonConverter(typeof(STJNullPreservingDictionaryConverter))] + public Dictionary> AutomaticTransferRulesByCurrency + { + get => this.automaticTransferRulesByCurrency; + set + { + this.automaticTransferRulesByCurrency = value; + this.SetTracker.Track(); + } + } + /// /// The minimum balance amount to retain per currency after automatic payouts. Only funds /// that exceed these amounts are paid out. Learn more about the + /// Customized start of day configuration for automatic payouts to group and send payments + /// in local timezones with a customized day starting time. For details, see our Customized start of day + /// documentation. + /// + [JsonProperty("start_of_day", NullValueHandling = NullValueHandling.Ignore)] + [STJS.JsonPropertyName("start_of_day")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] + public BalanceSettingsPaymentsSettlementTimingStartOfDayOptions StartOfDay + { + get => this.startOfDay; + set + { + this.startOfDay = value; + this.SetTracker.Track(); + } + } + bool IHasSetTracking.IsPropertySet(string propertyName) { return this.SetTracker.IsSet(propertyName); diff --git a/src/Stripe.net/Services/BalanceSettings/BalanceSettingsPaymentsSettlementTimingStartOfDayOptions.cs b/src/Stripe.net/Services/BalanceSettings/BalanceSettingsPaymentsSettlementTimingStartOfDayOptions.cs new file mode 100644 index 0000000000..fdf119f521 --- /dev/null +++ b/src/Stripe.net/Services/BalanceSettings/BalanceSettingsPaymentsSettlementTimingStartOfDayOptions.cs @@ -0,0 +1,38 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class BalanceSettingsPaymentsSettlementTimingStartOfDayOptions : INestedOptions + { + /// + /// Hour at which the customized start of day begins according to the given timezone. Must + /// be a supported + /// customized start of day hour. + /// + [JsonProperty("hour")] + [STJS.JsonPropertyName("hour")] + public long? Hour { get; set; } + + /// + /// Minutes at which the customized start of day begins according to the given timezone. + /// Must be either 0 or 30. + /// + [JsonProperty("minutes")] + [STJS.JsonPropertyName("minutes")] + public long? Minutes { get; set; } + + /// + /// Timezone for the customized start of day. Must be a supported + /// customized start of day timezone. + /// + [JsonProperty("timezone")] + [STJS.JsonPropertyName("timezone")] + public string Timezone { get; set; } + } +} diff --git a/src/Stripe.net/Services/Charges/ChargeTransferDataOptions.cs b/src/Stripe.net/Services/Charges/ChargeTransferDataOptions.cs index 7e7f96f9b6..092206e4ca 100644 --- a/src/Stripe.net/Services/Charges/ChargeTransferDataOptions.cs +++ b/src/Stripe.net/Services/Charges/ChargeTransferDataOptions.cs @@ -16,6 +16,13 @@ public class ChargeTransferDataOptions : INestedOptions [STJS.JsonPropertyName("amount")] public long? Amount { get; set; } + /// + /// An arbitrary string attached to the transfer. Often useful for displaying to users. + /// + [JsonProperty("description")] + [STJS.JsonPropertyName("description")] + public string Description { get; set; } + /// /// ID of an existing, connected Stripe account. /// diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionConsentCollectionOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionConsentCollectionOptions.cs index de5c09da34..87a5634d79 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionConsentCollectionOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionConsentCollectionOptions.cs @@ -20,7 +20,7 @@ public class SessionConsentCollectionOptions : INestedOptions /// If set to auto, enables the collection of customer consent for promotional /// communications. The Checkout Session will determine whether to display an option to opt /// into promotional communication from the merchant depending on the customer's locale. - /// Only available to US merchants. + /// Only available to US merchants and US customers. /// One of: auto, or none. /// [JsonProperty("promotions")] diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionCreateOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionCreateOptions.cs index 2d91d42800..70c48ba6bd 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionCreateOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionCreateOptions.cs @@ -20,7 +20,7 @@ public class SessionCreateOptions : BaseOptions, IHasMetadata /// /// Configure actions after a Checkout Session has expired. You can't set this parameter if - /// ui_mode is custom. + /// ui_mode is elements. /// [JsonProperty("after_expiration")] [STJS.JsonPropertyName("after_expiration")] @@ -52,7 +52,7 @@ public class SessionCreateOptions : BaseOptions, IHasMetadata /// /// The branding settings for the Checkout Session. This parameter is not allowed if ui_mode - /// is custom. + /// is elements. /// [JsonProperty("branding_settings")] [STJS.JsonPropertyName("branding_settings")] @@ -61,7 +61,7 @@ public class SessionCreateOptions : BaseOptions, IHasMetadata /// /// If set, Checkout displays a back button and customers will be directed to this URL if /// they decide to cancel payment and return to your website. This parameter is not allowed - /// if ui_mode is embedded or custom. + /// if ui_mode is embedded_page or elements. /// [JsonProperty("cancel_url")] [STJS.JsonPropertyName("cancel_url")] @@ -196,16 +196,16 @@ public class SessionCreateOptions : BaseOptions, IHasMetadata /// href="https://dashboard.stripe.com/settings/payment_methods">Stripe Dashboard. /// One of: acss_debit, affirm, afterpay_clearpay, alipay, /// alma, amazon_pay, au_becs_debit, bacs_debit, - /// bancontact, billie, blik, boleto, card, + /// bancontact, billie, bizum, blik, boleto, card, /// cashapp, crypto, customer_balance, eps, fpx, /// giropay, gopay, grabpay, ideal, kakao_pay, /// klarna, konbini, kr_card, mb_way, mobilepay, /// multibanco, naver_pay, nz_bank_account, oxxo, p24, /// pay_by_bank, payco, paynow, paypal, paypay, /// payto, pix, promptpay, qris, rechnung, - /// revolut_pay, samsung_pay, satispay, sepa_debit, - /// shopeepay, sofort, sunbit, swish, twint, upi, - /// us_bank_account, wechat_pay, or zip. + /// revolut_pay, samsung_pay, satispay, scalapay, + /// sepa_debit, shopeepay, sofort, sunbit, swish, + /// twint, upi, us_bank_account, wechat_pay, or zip. /// [JsonProperty("excluded_payment_method_types")] [STJS.JsonPropertyName("excluded_payment_method_types")] @@ -335,7 +335,7 @@ public class SessionCreateOptions : BaseOptions, IHasMetadata /// /// Where the user is coming from. This informs the optimizations that are applied to the - /// session. You can't set this parameter if ui_mode is custom. + /// session. You can't set this parameter if ui_mode is elements. /// One of: mobile_app, or web. /// [JsonProperty("origin_context")] @@ -409,16 +409,16 @@ public class SessionCreateOptions : BaseOptions, IHasMetadata /// characteristics. /// One of: acss_debit, affirm, afterpay_clearpay, alipay, /// alma, amazon_pay, au_becs_debit, bacs_debit, - /// bancontact, billie, blik, boleto, card, + /// bancontact, billie, bizum, blik, boleto, card, /// cashapp, crypto, customer_balance, eps, fpx, /// giropay, gopay, grabpay, ideal, kakao_pay, /// klarna, konbini, kr_card, link, mb_way, /// mobilepay, multibanco, naver_pay, nz_bank_account, /// oxxo, p24, pay_by_bank, payco, paynow, paypal, /// paypay, payto, pix, promptpay, qris, rechnung, - /// revolut_pay, samsung_pay, satispay, sepa_debit, - /// shopeepay, sofort, sunbit, swish, twint, upi, - /// us_bank_account, wechat_pay, or zip. + /// revolut_pay, samsung_pay, satispay, scalapay, + /// sepa_debit, shopeepay, sofort, sunbit, swish, + /// twint, upi, us_bank_account, wechat_pay, or zip. /// [JsonProperty("payment_method_types")] [STJS.JsonPropertyName("payment_method_types")] @@ -449,7 +449,7 @@ public class SessionCreateOptions : BaseOptions, IHasMetadata public SessionPhoneNumberCollectionOptions PhoneNumberCollection { get; set; } /// - /// This parameter applies to ui_mode: embedded. Learn more about the ui_mode: embedded_page. Learn more about the redirect /// behavior of embedded sessions. Defaults to always. /// One of: always, if_required, or never. @@ -461,8 +461,8 @@ public class SessionCreateOptions : BaseOptions, IHasMetadata /// /// The URL to redirect your customer back to after they authenticate or cancel their /// payment on the payment method's app or site. This parameter is required if - /// ui_mode is embedded or custom and redirect-based payment methods - /// are enabled on the session. + /// ui_mode is embedded_page or elements and redirect-based payment + /// methods are enabled on the session. /// [JsonProperty("return_url")] [STJS.JsonPropertyName("return_url")] @@ -504,7 +504,7 @@ public class SessionCreateOptions : BaseOptions, IHasMetadata /// relevant text on the page, such as the submit button. submit_type can only be /// specified on Checkout Sessions in payment or subscription mode. If blank /// or auto, pay is used. You can't set this parameter if ui_mode is - /// custom. + /// elements. /// One of: auto, book, donate, pay, or subscribe. /// [JsonProperty("submit_type")] @@ -521,9 +521,10 @@ public class SessionCreateOptions : BaseOptions, IHasMetadata /// /// The URL to which Stripe should send customers when payment or setup is complete. This - /// parameter is not allowed if ui_mode is embedded or custom. If you'd like - /// to use information from the successful Checkout Session on your page, read the guide on - /// customizing your + /// parameter is not allowed if ui_mode is embedded_page or elements. If you'd + /// like to use information from the successful Checkout Session on your page, read the + /// guide on customizing your /// success page. /// [JsonProperty("success_url")] @@ -538,7 +539,7 @@ public class SessionCreateOptions : BaseOptions, IHasMetadata public SessionTaxIdCollectionOptions TaxIdCollection { get; set; } /// - /// The UI mode of the Session. Defaults to hosted. + /// The UI mode of the Session. Defaults to hosted_page. /// One of: elements, embedded_page, form, or hosted_page. /// [JsonProperty("ui_mode")] diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsCardRestrictionsOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsCardRestrictionsOptions.cs index 5b1e04c914..402782ae2a 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsCardRestrictionsOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsCardRestrictionsOptions.cs @@ -10,8 +10,8 @@ namespace Stripe.Checkout public class SessionPaymentMethodOptionsCardRestrictionsOptions : INestedOptions { /// - /// Specify the card brands to block in the Checkout Session. If a customer enters or - /// selects a card belonging to a blocked brand, they can't complete the Session. + /// The card brands to block. If a customer enters or selects a card belonging to a blocked + /// brand, they can't complete the payment. /// One of: american_express, discover_global_network, mastercard, or /// visa. /// diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsOptions.cs index 1836d51514..7f345c8962 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsOptions.cs @@ -10,7 +10,7 @@ public class SessionPaymentMethodOptionsOptions : INestedOptions { /// /// contains details about the ACSS Debit payment method options. You can't set this - /// parameter if ui_mode is custom. + /// parameter if ui_mode is elements. /// [JsonProperty("acss_debit")] [STJS.JsonPropertyName("acss_debit")] @@ -192,7 +192,8 @@ public class SessionPaymentMethodOptionsOptions : INestedOptions public SessionPaymentMethodOptionsKrCardOptions KrCard { get; set; } /// - /// contains details about the Link payment method options. + /// contains details about the Link payment method options (Link is also known as Onelink in + /// the UK). /// [JsonProperty("link")] [STJS.JsonPropertyName("link")] @@ -296,6 +297,13 @@ public class SessionPaymentMethodOptionsOptions : INestedOptions [STJS.JsonPropertyName("satispay")] public SessionPaymentMethodOptionsSatispayOptions Satispay { get; set; } + /// + /// contains details about the Scalapay payment method options. + /// + [JsonProperty("scalapay")] + [STJS.JsonPropertyName("scalapay")] + public SessionPaymentMethodOptionsScalapayOptions Scalapay { get; set; } + /// /// contains details about the Sepa Debit payment method options. /// diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsScalapayOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsScalapayOptions.cs new file mode 100644 index 0000000000..b5a8dcbcd6 --- /dev/null +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsScalapayOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.Checkout +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class SessionPaymentMethodOptionsScalapayOptions : INestedOptions + { + /// + /// Controls when the funds will be captured from the customer's account. + /// + [JsonProperty("capture_method")] + [STJS.JsonPropertyName("capture_method")] + public string CaptureMethod { get; set; } + } +} diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsTwintOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsTwintOptions.cs index 2f583381ed..61478e8d25 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsTwintOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsTwintOptions.cs @@ -27,6 +27,7 @@ public class SessionPaymentMethodOptionsTwintOptions : INestedOptions /// When processing card payments, Stripe uses setup_future_usage to help you comply /// with regional legislation and network rules, such as SCA. + /// One of: none, or off_session. /// [JsonProperty("setup_future_usage")] [STJS.JsonPropertyName("setup_future_usage")] diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionSubscriptionDataOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionSubscriptionDataOptions.cs index b494c90999..219557ed58 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionSubscriptionDataOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionSubscriptionDataOptions.cs @@ -31,7 +31,7 @@ public class SessionSubscriptionDataOptions : INestedOptions, IHasMetadata, IHas /// /// A future timestamp to anchor the subscription's billing cycle for new subscriptions. You - /// can't set this parameter if ui_mode is custom. + /// can't set this parameter if ui_mode is elements. /// [JsonProperty("billing_cycle_anchor")] [JsonConverter(typeof(UnixDateTimeConverter))] diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionWalletOptionsOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionWalletOptionsOptions.cs index 2b7668967d..8a223c26ac 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionWalletOptionsOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionWalletOptionsOptions.cs @@ -9,7 +9,8 @@ namespace Stripe.Checkout public class SessionWalletOptionsOptions : INestedOptions { /// - /// contains details about the Link wallet options. + /// contains details about the Link wallet options (Link is also known as Onelink in the + /// UK). /// [JsonProperty("link")] [STJS.JsonPropertyName("link")] diff --git a/src/Stripe.net/Services/Coupons/CouponService.cs b/src/Stripe.net/Services/Coupons/CouponService.cs index c4e35f1889..c53c0225a1 100644 --- a/src/Stripe.net/Services/Coupons/CouponService.cs +++ b/src/Stripe.net/Services/Coupons/CouponService.cs @@ -5,6 +5,7 @@ namespace Stripe using System.Collections.Generic; using System.Net; using System.Net.Http; + using System.Text.Json; using System.Threading; using System.Threading.Tasks; @@ -137,6 +138,30 @@ public virtual IAsyncEnumerable ListAutoPagingAsync(CouponListOptions op return this.ListRequestAutoPagingAsync($"/v1/coupons", options, requestOptions, cancellationToken); } + /// + /// Serializes a Coupon create request into a batch job JSONL line. + /// + public virtual string SerializeBatchCreate(CouponCreateOptions options = null, RequestOptions requestOptions = null) + { + var requestId = Guid.NewGuid().ToString(); + var stripeVersion = StripeConfiguration.ApiVersion; + var stripeContext = requestOptions?.StripeContext; + + var requestBody = new Dictionary + { + { "id", requestId }, + { "path_params", null }, + { "params", options }, + { "stripe_version", stripeVersion }, + }; + if (stripeContext != null) + { + requestBody["context"] = stripeContext; + } + + return JsonSerializer.Serialize(requestBody, new JsonSerializerOptions(StripeConfiguration.SerializerOptions) { DefaultIgnoreCondition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull }); + } + /// ///

Updates the metadata of a coupon. Other coupon details (currency, duration, /// amount_off) are, by design, not editable.

. diff --git a/src/Stripe.net/Services/CustomerPaymentMethods/CustomerPaymentMethodListOptions.cs b/src/Stripe.net/Services/CustomerPaymentMethods/CustomerPaymentMethodListOptions.cs index fea2f54b1c..d1fd5a8071 100644 --- a/src/Stripe.net/Services/CustomerPaymentMethods/CustomerPaymentMethodListOptions.cs +++ b/src/Stripe.net/Services/CustomerPaymentMethods/CustomerPaymentMethodListOptions.cs @@ -25,7 +25,7 @@ public class CustomerPaymentMethodListOptions : ListOptions /// provide a type value in the request. /// One of: acss_debit, affirm, afterpay_clearpay, alipay, /// alma, amazon_pay, au_becs_debit, bacs_debit, - /// bancontact, billie, blik, boleto, card, + /// bancontact, billie, bizum, blik, boleto, card, /// cashapp, crypto, custom, customer_balance, eps, /// fpx, giropay, gopay, grabpay, id_bank_transfer, /// ideal, kakao_pay, klarna, konbini, kr_card, @@ -33,9 +33,9 @@ public class CustomerPaymentMethodListOptions : ListOptions /// nz_bank_account, oxxo, p24, pay_by_bank, payco, /// paynow, paypal, paypay, payto, pix, promptpay, /// qris, rechnung, revolut_pay, samsung_pay, satispay, - /// sepa_debit, shopeepay, sofort, stripe_balance, - /// sunbit, swish, twint, upi, us_bank_account, - /// wechat_pay, or zip. + /// scalapay, sepa_debit, shopeepay, sofort, + /// stripe_balance, sunbit, swish, twint, upi, + /// us_bank_account, wechat_pay, or zip. ///
[JsonProperty("type")] [STJS.JsonPropertyName("type")] diff --git a/src/Stripe.net/Services/Customers/CustomerService.cs b/src/Stripe.net/Services/Customers/CustomerService.cs index 3f5e2a4390..45b8250b29 100644 --- a/src/Stripe.net/Services/Customers/CustomerService.cs +++ b/src/Stripe.net/Services/Customers/CustomerService.cs @@ -219,23 +219,23 @@ public virtual IAsyncEnumerable SearchAutoPagingAsync(CustomerSearchOp /// public virtual string SerializeBatchUpdate(string customer, CustomerUpdateOptions options = null, RequestOptions requestOptions = null) { - var itemId = Guid.NewGuid().ToString(); + var requestId = Guid.NewGuid().ToString(); var stripeVersion = StripeConfiguration.ApiVersion; var stripeContext = requestOptions?.StripeContext; - var item = new Dictionary + var requestBody = new Dictionary { - { "id", itemId }, + { "id", requestId }, { "path_params", new Dictionary { { "customer", customer } } }, { "params", options }, { "stripe_version", stripeVersion }, }; if (stripeContext != null) { - item["context"] = stripeContext; + requestBody["context"] = stripeContext; } - return JsonSerializer.Serialize(item, new JsonSerializerOptions(StripeConfiguration.SerializerOptions) { DefaultIgnoreCondition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull }); + return JsonSerializer.Serialize(requestBody, new JsonSerializerOptions(StripeConfiguration.SerializerOptions) { DefaultIgnoreCondition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull }); } /// diff --git a/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsOptions.cs b/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsOptions.cs index 7b1d7fa8f4..a984b68070 100644 --- a/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsOptions.cs @@ -57,8 +57,8 @@ public string DefaultMandate /// naver_pay, nz_bank_account, p24, pay_by_bank, payco, /// paynow, paypal, payto, pix, promptpay, /// revolut_pay, sepa_credit_transfer, sepa_debit, sofort, - /// stripe_balance, swish, upi, us_bank_account, or - /// wechat_pay. + /// stripe_balance, swish, twint, upi, us_bank_account, + /// or wechat_pay. /// [JsonProperty("payment_method_types", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("payment_method_types")] diff --git a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseAddInvoiceItemOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseAddInvoiceItemOptions.cs index d71fdcd42e..a6c5e1151b 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseAddInvoiceItemOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsPhaseAddInvoiceItemOptions.cs @@ -15,6 +15,14 @@ public class InvoiceScheduleDetailsPhaseAddInvoiceItemOptions : INestedOptions, [STJS.JsonIgnore] internal SetTracker SetTracker { get; } = new SetTracker(); + /// + /// Controls whether discounts apply to this invoice item. Defaults to true if no value is + /// provided. + /// + [JsonProperty("discountable")] + [STJS.JsonPropertyName("discountable")] + public bool? Discountable { get; set; } + /// /// The coupons to redeem into discounts for the item. /// diff --git a/src/Stripe.net/Services/Invoices/InvoiceService.cs b/src/Stripe.net/Services/Invoices/InvoiceService.cs index c78ff4ed05..2fe96e37a5 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceService.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceService.cs @@ -5,7 +5,6 @@ namespace Stripe using System.Collections.Generic; using System.Net; using System.Net.Http; - using System.Text.Json; using System.Threading; using System.Threading.Tasks; @@ -432,54 +431,6 @@ public virtual Task SendInvoiceAsync(string id, InvoiceSendOptions opti return this.RequestAsync(BaseAddress.Api, HttpMethod.Post, $"/v1/invoices/{WebUtility.UrlEncode(id)}/send", options, requestOptions, cancellationToken); } - /// - /// Serializes an Invoice pay request into a batch job JSONL line. - /// - public virtual string SerializeBatchPay(string invoice, InvoicePayOptions options = null, RequestOptions requestOptions = null) - { - var itemId = Guid.NewGuid().ToString(); - var stripeVersion = StripeConfiguration.ApiVersion; - var stripeContext = requestOptions?.StripeContext; - - var item = new Dictionary - { - { "id", itemId }, - { "path_params", new Dictionary { { "invoice", invoice } } }, - { "params", options }, - { "stripe_version", stripeVersion }, - }; - if (stripeContext != null) - { - item["context"] = stripeContext; - } - - return JsonSerializer.Serialize(item, new JsonSerializerOptions(StripeConfiguration.SerializerOptions) { DefaultIgnoreCondition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull }); - } - - /// - /// Serializes an Invoice update request into a batch job JSONL line. - /// - public virtual string SerializeBatchUpdate(string invoice, InvoiceUpdateOptions options = null, RequestOptions requestOptions = null) - { - var itemId = Guid.NewGuid().ToString(); - var stripeVersion = StripeConfiguration.ApiVersion; - var stripeContext = requestOptions?.StripeContext; - - var item = new Dictionary - { - { "id", itemId }, - { "path_params", new Dictionary { { "invoice", invoice } } }, - { "params", options }, - { "stripe_version", stripeVersion }, - }; - if (stripeContext != null) - { - item["context"] = stripeContext; - } - - return JsonSerializer.Serialize(item, new JsonSerializerOptions(StripeConfiguration.SerializerOptions) { DefaultIgnoreCondition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull }); - } - /// ///

Draft invoices are fully editable. Once an invoice is finalized, diff --git a/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsCancelAt.cs b/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsCancelAt.cs index 073f89f5ec..a55265f9be 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsCancelAt.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsCancelAt.cs @@ -6,6 +6,7 @@ namespace Stripe [STJS.JsonConverter(typeof(Infrastructure.STJStringEnumConverterFactory))] public class InvoiceSubscriptionDetailsCancelAt : StringEnum { + public static readonly InvoiceSubscriptionDetailsCancelAt MaxBilledUntil = new InvoiceSubscriptionDetailsCancelAt("max_billed_until"); public static readonly InvoiceSubscriptionDetailsCancelAt MaxPeriodEnd = new InvoiceSubscriptionDetailsCancelAt("max_period_end"); public static readonly InvoiceSubscriptionDetailsCancelAt MinPeriodEnd = new InvoiceSubscriptionDetailsCancelAt("min_period_end"); diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentAmountDetailsShippingOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentAmountDetailsShippingOptions.cs index ba0caf7729..185483dd95 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentAmountDetailsShippingOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentAmountDetailsShippingOptions.cs @@ -36,7 +36,7 @@ public long? Amount ///

/// If a physical good is being shipped, the postal code of where it is being shipped from. - /// At most 10 alphanumeric characters long, hyphens are allowed. + /// At most 10 alphanumeric characters long, hyphens and spaces are allowed. /// [JsonProperty("from_postal_code", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("from_postal_code")] @@ -53,7 +53,7 @@ public string FromPostalCode /// /// If a physical good is being shipped, the postal code of where it is being shipped to. At - /// most 10 alphanumeric characters long, hyphens are allowed. + /// most 10 alphanumeric characters long, hyphens and spaces are allowed. /// [JsonProperty("to_postal_code", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("to_postal_code")] diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentConfirmOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentConfirmOptions.cs index ea1ec10a37..cbc20edb9a 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentConfirmOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentConfirmOptions.cs @@ -100,16 +100,17 @@ public long? ApplicationFeeAmount /// The list of payment method types to exclude from use with this payment. /// One of: acss_debit, affirm, afterpay_clearpay, alipay, /// alma, amazon_pay, au_becs_debit, bacs_debit, - /// bancontact, billie, blik, boleto, card, + /// bancontact, billie, bizum, blik, boleto, card, /// cashapp, crypto, customer_balance, eps, fpx, /// giropay, gopay, grabpay, id_bank_transfer, ideal, /// kakao_pay, klarna, konbini, kr_card, mb_way, /// mobilepay, multibanco, naver_pay, nz_bank_account, /// oxxo, p24, pay_by_bank, payco, paynow, paypal, /// paypay, payto, pix, promptpay, qris, rechnung, - /// revolut_pay, samsung_pay, satispay, sepa_debit, - /// shopeepay, sofort, stripe_balance, sunbit, swish, - /// twint, upi, us_bank_account, wechat_pay, or zip. + /// revolut_pay, samsung_pay, satispay, scalapay, + /// sepa_debit, shopeepay, sofort, stripe_balance, + /// sunbit, swish, twint, upi, us_bank_account, + /// wechat_pay, or zip. ///
[JsonProperty("excluded_payment_method_types", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("excluded_payment_method_types")] @@ -162,9 +163,8 @@ public PaymentIntentMandateDataOptions MandateData /// /// Set to true to indicate that the customer isn't in your checkout flow during this /// payment attempt and can't authenticate. Use this parameter in scenarios where you - /// collect card details and charge them - /// later. + /// collect payment method details and charge them later. /// [JsonProperty("off_session")] [STJS.JsonPropertyName("off_session")] diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentCreateOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentCreateOptions.cs index 747df64ea8..05f7cfcd38 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentCreateOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentCreateOptions.cs @@ -162,16 +162,17 @@ public class PaymentIntentCreateOptions : BaseOptions, IHasMetadata /// The list of payment method types to exclude from use with this payment. /// One of: acss_debit, affirm, afterpay_clearpay, alipay, /// alma, amazon_pay, au_becs_debit, bacs_debit, - /// bancontact, billie, blik, boleto, card, + /// bancontact, billie, bizum, blik, boleto, card, /// cashapp, crypto, customer_balance, eps, fpx, /// giropay, gopay, grabpay, id_bank_transfer, ideal, /// kakao_pay, klarna, konbini, kr_card, mb_way, /// mobilepay, multibanco, naver_pay, nz_bank_account, /// oxxo, p24, pay_by_bank, payco, paynow, paypal, /// paypay, payto, pix, promptpay, qris, rechnung, - /// revolut_pay, samsung_pay, satispay, sepa_debit, - /// shopeepay, sofort, stripe_balance, sunbit, swish, - /// twint, upi, us_bank_account, wechat_pay, or zip. + /// revolut_pay, samsung_pay, satispay, scalapay, + /// sepa_debit, shopeepay, sofort, stripe_balance, + /// sunbit, swish, twint, upi, us_bank_account, + /// wechat_pay, or zip. /// [JsonProperty("excluded_payment_method_types")] [STJS.JsonPropertyName("excluded_payment_method_types")] @@ -231,9 +232,9 @@ public PaymentIntentMandateDataOptions MandateData /// /// Set to true to indicate that the customer isn't in your checkout flow during this /// payment attempt and can't authenticate. Use this parameter in scenarios where you - /// collect card details and charge them - /// later. This parameter can only be used with charge them later. This + /// parameter can only be used with confirm=true. /// [JsonProperty("off_session")] diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataBizumOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataBizumOptions.cs new file mode 100644 index 0000000000..99df8f4edf --- /dev/null +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataBizumOptions.cs @@ -0,0 +1,12 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class PaymentIntentPaymentMethodDataBizumOptions : INestedOptions + { + } +} diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataOptions.cs index 9360cb6b68..d31627bfcb 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataOptions.cs @@ -108,6 +108,14 @@ public class PaymentIntentPaymentMethodDataOptions : INestedOptions, IHasMetadat [STJS.JsonPropertyName("billing_details")] public PaymentIntentPaymentMethodDataBillingDetailsOptions BillingDetails { get; set; } + /// + /// If this is a bizum PaymentMethod, this hash contains details about the Bizum + /// payment method. + /// + [JsonProperty("bizum")] + [STJS.JsonPropertyName("bizum")] + public PaymentIntentPaymentMethodDataBizumOptions Bizum { get; set; } + /// /// If this is a blik PaymentMethod, this hash contains details about the BLIK /// payment method. @@ -246,7 +254,7 @@ public class PaymentIntentPaymentMethodDataOptions : INestedOptions, IHasMetadat /// /// If this is an Link PaymentMethod, this hash contains details about the Link - /// payment method. + /// payment method (Link is also known as Onelink in the UK). /// [JsonProperty("link")] [STJS.JsonPropertyName("link")] @@ -431,6 +439,14 @@ public class PaymentIntentPaymentMethodDataOptions : INestedOptions, IHasMetadat [STJS.JsonPropertyName("satispay")] public PaymentIntentPaymentMethodDataSatispayOptions Satispay { get; set; } + /// + /// If this is a Scalapay PaymentMethod, this hash contains details about the Scalapay + /// payment method. + /// + [JsonProperty("scalapay")] + [STJS.JsonPropertyName("scalapay")] + public PaymentIntentPaymentMethodDataScalapayOptions Scalapay { get; set; } + /// /// If this is a sepa_debit PaymentMethod, this hash contains details about the SEPA /// debit bank account. @@ -499,16 +515,17 @@ public class PaymentIntentPaymentMethodDataOptions : INestedOptions, IHasMetadat /// PaymentMethod type. /// One of: acss_debit, affirm, afterpay_clearpay, alipay, /// alma, amazon_pay, au_becs_debit, bacs_debit, - /// bancontact, billie, blik, boleto, cashapp, - /// crypto, customer_balance, eps, fpx, giropay, - /// gopay, grabpay, id_bank_transfer, ideal, kakao_pay, - /// klarna, konbini, kr_card, link, mb_way, - /// mobilepay, multibanco, naver_pay, nz_bank_account, - /// oxxo, p24, pay_by_bank, payco, paynow, paypal, - /// paypay, payto, pix, promptpay, qris, rechnung, - /// revolut_pay, samsung_pay, satispay, sepa_debit, - /// shopeepay, sofort, stripe_balance, sunbit, swish, - /// twint, upi, us_bank_account, wechat_pay, or zip. + /// bancontact, billie, bizum, blik, boleto, + /// cashapp, crypto, customer_balance, eps, fpx, + /// giropay, gopay, grabpay, id_bank_transfer, ideal, + /// kakao_pay, klarna, konbini, kr_card, link, + /// mb_way, mobilepay, multibanco, naver_pay, + /// nz_bank_account, oxxo, p24, pay_by_bank, payco, + /// paynow, paypal, paypay, payto, pix, promptpay, + /// qris, rechnung, revolut_pay, samsung_pay, satispay, + /// scalapay, sepa_debit, shopeepay, sofort, + /// stripe_balance, sunbit, swish, twint, upi, + /// us_bank_account, wechat_pay, or zip. /// [JsonProperty("type")] [STJS.JsonPropertyName("type")] diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataScalapayOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataScalapayOptions.cs new file mode 100644 index 0000000000..322a8623c6 --- /dev/null +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataScalapayOptions.cs @@ -0,0 +1,12 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class PaymentIntentPaymentMethodDataScalapayOptions : INestedOptions + { + } +} diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsBizumOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsBizumOptions.cs new file mode 100644 index 0000000000..7744d4759f --- /dev/null +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsBizumOptions.cs @@ -0,0 +1,12 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class PaymentIntentPaymentMethodOptionsBizumOptions : INestedOptions + { + } +} diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsOptions.cs index 0a884e6d6d..cab41205fa 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsOptions.cs @@ -18,6 +18,7 @@ public class PaymentIntentPaymentMethodOptionsOptions : INestedOptions, IHasSetT private PaymentIntentPaymentMethodOptionsBacsDebitOptions bacsDebit; private PaymentIntentPaymentMethodOptionsBancontactOptions bancontact; private PaymentIntentPaymentMethodOptionsBillieOptions billie; + private PaymentIntentPaymentMethodOptionsBizumOptions bizum; private PaymentIntentPaymentMethodOptionsBlikOptions blik; private PaymentIntentPaymentMethodOptionsBoletoOptions boleto; private PaymentIntentPaymentMethodOptionsCardPresentOptions cardPresent; @@ -57,6 +58,7 @@ public class PaymentIntentPaymentMethodOptionsOptions : INestedOptions, IHasSetT private PaymentIntentPaymentMethodOptionsRevolutPayOptions revolutPay; private PaymentIntentPaymentMethodOptionsSamsungPayOptions samsungPay; private PaymentIntentPaymentMethodOptionsSatispayOptions satispay; + private PaymentIntentPaymentMethodOptionsScalapayOptions scalapay; private PaymentIntentPaymentMethodOptionsSepaDebitOptions sepaDebit; private PaymentIntentPaymentMethodOptionsShopeepayOptions shopeepay; private PaymentIntentPaymentMethodOptionsSofortOptions sofort; @@ -242,6 +244,23 @@ public PaymentIntentPaymentMethodOptionsBillieOptions Billie } } + /// + /// If this is a bizum PaymentMethod, this sub-hash contains details about the Bizum + /// payment method options. + /// + [JsonProperty("bizum", NullValueHandling = NullValueHandling.Ignore)] + [STJS.JsonPropertyName("bizum")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] + public PaymentIntentPaymentMethodOptionsBizumOptions Bizum + { + get => this.bizum; + set + { + this.bizum = value; + this.SetTracker.Track(); + } + } + /// /// If this is a blik PaymentMethod, this sub-hash contains details about the BLIK /// payment method options. @@ -557,7 +576,7 @@ public PaymentIntentPaymentMethodOptionsKrCardOptions KrCard /// /// If this is a link PaymentMethod, this sub-hash contains details about the Link - /// payment method options. + /// payment method options (Link is also known as Onelink in the UK). /// [JsonProperty("link", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("link")] @@ -912,6 +931,23 @@ public PaymentIntentPaymentMethodOptionsSatispayOptions Satispay } } + /// + /// If this is a scalapay PaymentMethod, this sub-hash contains details about the + /// ScalaPay payment method options. + /// + [JsonProperty("scalapay", NullValueHandling = NullValueHandling.Ignore)] + [STJS.JsonPropertyName("scalapay")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] + public PaymentIntentPaymentMethodOptionsScalapayOptions Scalapay + { + get => this.scalapay; + set + { + this.scalapay = value; + this.SetTracker.Track(); + } + } + /// /// If this is a sepa_debit PaymentIntent, this sub-hash contains details about the /// SEPA Debit payment method options. diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsScalapayOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsScalapayOptions.cs new file mode 100644 index 0000000000..cdd2d8a337 --- /dev/null +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsScalapayOptions.cs @@ -0,0 +1,45 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class PaymentIntentPaymentMethodOptionsScalapayOptions : INestedOptions, IHasSetTracking + { + private string captureMethod; + + [JsonIgnore] + [STJS.JsonIgnore] + internal SetTracker SetTracker { get; } = new SetTracker(); + + /// + /// Controls when the funds are captured from the customer's account. + /// + /// If provided, this parameter overrides the behavior of the top-level capture_method + /// for this payment method type when finalizing the payment with this payment method type. + /// + /// If capture_method is already set on the PaymentIntent, providing an empty value + /// for this parameter unsets the stored value for this payment method type. + /// + [JsonProperty("capture_method", NullValueHandling = NullValueHandling.Ignore)] + [STJS.JsonPropertyName("capture_method")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] + public string CaptureMethod + { + get => this.captureMethod; + set + { + this.captureMethod = value; + this.SetTracker.Track(); + } + } + + bool IHasSetTracking.IsPropertySet(string propertyName) + { + return this.SetTracker.IsSet(propertyName); + } + } +} diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsTwintOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsTwintOptions.cs index 65943d8b32..7442518419 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsTwintOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsTwintOptions.cs @@ -31,6 +31,7 @@ public class PaymentIntentPaymentMethodOptionsTwintOptions : INestedOptions /// If you've already set setup_future_usage and you're performing a request using a /// publishable key, you can only update the value from on_session to /// off_session. + /// One of: none, or off_session. /// [JsonProperty("setup_future_usage")] [STJS.JsonPropertyName("setup_future_usage")] diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentService.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentService.cs index 6a19fa1352..3c1eac133d 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentService.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentService.cs @@ -338,9 +338,11 @@ public virtual Task GetAsync(string id, PaymentIntentGetOptions o /// including declines. After it’s captured, a PaymentIntent can no longer be /// incremented.

. /// - ///

Learn more about incremental - /// authorizations.

. + ///

Learn more about incremental authorizations with in-person + /// payments and online + /// payments.

. ///
public virtual PaymentIntent IncrementAuthorization(string id, PaymentIntentIncrementAuthorizationOptions options = null, RequestOptions requestOptions = null) { @@ -371,9 +373,11 @@ public virtual PaymentIntent IncrementAuthorization(string id, PaymentIntentIncr /// including declines. After it’s captured, a PaymentIntent can no longer be /// incremented.

. /// - ///

Learn more about incremental - /// authorizations.

. + ///

Learn more about incremental authorizations with in-person + /// payments and online + /// payments.

. ///
public virtual Task IncrementAuthorizationAsync(string id, PaymentIntentIncrementAuthorizationOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) { diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentTransferDataOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentTransferDataOptions.cs index edda106fac..546ef3dbaf 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentTransferDataOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentTransferDataOptions.cs @@ -1,13 +1,20 @@ // File generated from our OpenAPI spec namespace Stripe { + using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; using STJS = System.Text.Json.Serialization; [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] - public class PaymentIntentTransferDataOptions : INestedOptions + public class PaymentIntentTransferDataOptions : INestedOptions, IHasMetadata, IHasSetTracking { + private Dictionary metadata; + + [JsonIgnore] + [STJS.JsonIgnore] + internal SetTracker SetTracker { get; } = new SetTracker(); + /// /// The amount that will be transferred automatically when a charge succeeds. The amount is /// capped at the total transaction amount and if no amount is set, the full amount is @@ -21,6 +28,13 @@ public class PaymentIntentTransferDataOptions : INestedOptions [STJS.JsonPropertyName("amount")] public long? Amount { get; set; } + /// + /// An arbitrary string attached to the transfer. Often useful for displaying to users. + /// + [JsonProperty("description")] + [STJS.JsonPropertyName("description")] + public string Description { get; set; } + /// /// If specified, successful charges will be attributed to the destination account for tax /// reporting, and the funds from charges will be transferred to the destination account. @@ -30,5 +44,35 @@ public class PaymentIntentTransferDataOptions : INestedOptions [JsonProperty("destination")] [STJS.JsonPropertyName("destination")] public string Destination { get; set; } + + /// + /// Set of key-value pairs that you can + /// attach to an object. This can be useful for storing additional information about the + /// object in a structured format. + /// + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] + [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] + public Dictionary Metadata + { + get => this.metadata; + set + { + this.metadata = value; + this.SetTracker.Track(); + } + } + + /// + /// The data with which to populate the destination payment. + /// + [JsonProperty("payment_data")] + [STJS.JsonPropertyName("payment_data")] + public PaymentIntentTransferDataPaymentDataOptions PaymentData { get; set; } + + bool IHasSetTracking.IsPropertySet(string propertyName) + { + return this.SetTracker.IsSet(propertyName); + } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentTransferDataPaymentDataOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentTransferDataPaymentDataOptions.cs new file mode 100644 index 0000000000..71b93d9b55 --- /dev/null +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentTransferDataPaymentDataOptions.cs @@ -0,0 +1,49 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using System.Collections.Generic; + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class PaymentIntentTransferDataPaymentDataOptions : INestedOptions, IHasMetadata, IHasSetTracking + { + private Dictionary metadata; + + [JsonIgnore] + [STJS.JsonIgnore] + internal SetTracker SetTracker { get; } = new SetTracker(); + + /// + /// An arbitrary string attached to the destination payment. Often useful for displaying to + /// users. + /// + [JsonProperty("description")] + [STJS.JsonPropertyName("description")] + public string Description { get; set; } + + /// + /// Set of key-value pairs that you can + /// attach to an object. This can be useful for storing additional information about the + /// object in a structured format. + /// + [JsonProperty("metadata", NullValueHandling = NullValueHandling.Ignore)] + [STJS.JsonPropertyName("metadata")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] + public Dictionary Metadata + { + get => this.metadata; + set + { + this.metadata = value; + this.SetTracker.Track(); + } + } + + bool IHasSetTracking.IsPropertySet(string propertyName) + { + return this.SetTracker.IsSet(propertyName); + } + } +} diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentUpdateOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentUpdateOptions.cs index f23df5f3eb..a6118f41ea 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentUpdateOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentUpdateOptions.cs @@ -134,16 +134,17 @@ public long? ApplicationFeeAmount /// The list of payment method types to exclude from use with this payment. /// One of: acss_debit, affirm, afterpay_clearpay, alipay, /// alma, amazon_pay, au_becs_debit, bacs_debit, - /// bancontact, billie, blik, boleto, card, + /// bancontact, billie, bizum, blik, boleto, card, /// cashapp, crypto, customer_balance, eps, fpx, /// giropay, gopay, grabpay, id_bank_transfer, ideal, /// kakao_pay, klarna, konbini, kr_card, mb_way, /// mobilepay, multibanco, naver_pay, nz_bank_account, /// oxxo, p24, pay_by_bank, payco, paynow, paypal, /// paypay, payto, pix, promptpay, qris, rechnung, - /// revolut_pay, samsung_pay, satispay, sepa_debit, - /// shopeepay, sofort, stripe_balance, sunbit, swish, - /// twint, upi, us_bank_account, wechat_pay, or zip. + /// revolut_pay, samsung_pay, satispay, scalapay, + /// sepa_debit, shopeepay, sofort, stripe_balance, + /// sunbit, swish, twint, upi, us_bank_account, + /// wechat_pay, or zip. /// [JsonProperty("excluded_payment_method_types", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("excluded_payment_method_types")] diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkConsentCollectionOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkConsentCollectionOptions.cs index bd3757744e..965295e9a7 100644 --- a/src/Stripe.net/Services/PaymentLinks/PaymentLinkConsentCollectionOptions.cs +++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkConsentCollectionOptions.cs @@ -20,7 +20,7 @@ public class PaymentLinkConsentCollectionOptions : INestedOptions /// If set to auto, enables the collection of customer consent for promotional /// communications. The Checkout Session will determine whether to display an option to opt /// into promotional communication from the merchant depending on the customer's locale. - /// Only available to US merchants. + /// Only available to US merchants and US customers. /// One of: auto, or none. /// [JsonProperty("promotions")] diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkCreateOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkCreateOptions.cs index f8ec7b4fc5..d3ea015a0e 100644 --- a/src/Stripe.net/Services/PaymentLinks/PaymentLinkCreateOptions.cs +++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkCreateOptions.cs @@ -197,6 +197,10 @@ public class PaymentLinkCreateOptions : BaseOptions, IHasMetadata [STJS.JsonPropertyName("payment_method_collection")] public string PaymentMethodCollection { get; set; } + [JsonProperty("payment_method_options")] + [STJS.JsonPropertyName("payment_method_options")] + public PaymentLinkPaymentMethodOptionsOptions PaymentMethodOptions { get; set; } + /// /// The list of payment method types that customers can use. If no value is passed, Stripe /// will dynamically show relevant payment methods from your supported). /// One of: affirm, afterpay_clearpay, alipay, alma, - /// au_becs_debit, bacs_debit, bancontact, billie, blik, - /// boleto, card, cashapp, eps, fpx, giropay, - /// gopay, grabpay, ideal, klarna, konbini, link, - /// mb_way, mobilepay, multibanco, oxxo, p24, - /// pay_by_bank, paynow, paypal, paypay, payto, - /// pix, promptpay, qris, rechnung, satispay, - /// sepa_debit, shopeepay, sofort, sunbit, swish, - /// twint, upi, us_bank_account, wechat_pay, or zip. + /// au_becs_debit, bacs_debit, bancontact, billie, bizum, + /// blik, boleto, card, cashapp, eps, fpx, + /// giropay, gopay, grabpay, ideal, klarna, + /// konbini, link, mb_way, mobilepay, multibanco, + /// oxxo, p24, pay_by_bank, paynow, paypal, + /// paypay, payto, pix, promptpay, qris, rechnung, + /// satispay, sepa_debit, shopeepay, sofort, sunbit, + /// swish, twint, upi, us_bank_account, wechat_pay, or + /// zip. /// [JsonProperty("payment_method_types")] [STJS.JsonPropertyName("payment_method_types")] diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkPaymentMethodOptionsCardOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkPaymentMethodOptionsCardOptions.cs new file mode 100644 index 0000000000..13d1b08e78 --- /dev/null +++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkPaymentMethodOptionsCardOptions.cs @@ -0,0 +1,39 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class PaymentLinkPaymentMethodOptionsCardOptions : INestedOptions, IHasSetTracking + { + private PaymentLinkPaymentMethodOptionsCardRestrictionsOptions restrictions; + + [JsonIgnore] + [STJS.JsonIgnore] + internal SetTracker SetTracker { get; } = new SetTracker(); + + /// + /// Restrictions to apply to the card payment method. For example, you can block specific + /// card brands. + /// + [JsonProperty("restrictions", NullValueHandling = NullValueHandling.Ignore)] + [STJS.JsonPropertyName("restrictions")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] + public PaymentLinkPaymentMethodOptionsCardRestrictionsOptions Restrictions + { + get => this.restrictions; + set + { + this.restrictions = value; + this.SetTracker.Track(); + } + } + + bool IHasSetTracking.IsPropertySet(string propertyName) + { + return this.SetTracker.IsSet(propertyName); + } + } +} diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkPaymentMethodOptionsCardRestrictionsOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkPaymentMethodOptionsCardRestrictionsOptions.cs new file mode 100644 index 0000000000..c780bc3084 --- /dev/null +++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkPaymentMethodOptionsCardRestrictionsOptions.cs @@ -0,0 +1,42 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using System.Collections.Generic; + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class PaymentLinkPaymentMethodOptionsCardRestrictionsOptions : INestedOptions, IHasSetTracking + { + private List brandsBlocked; + + [JsonIgnore] + [STJS.JsonIgnore] + internal SetTracker SetTracker { get; } = new SetTracker(); + + /// + /// The card brands to block. If a customer enters or selects a card belonging to a blocked + /// brand, they can't complete the payment. + /// One of: american_express, discover_global_network, mastercard, or + /// visa. + /// + [JsonProperty("brands_blocked", NullValueHandling = NullValueHandling.Ignore)] + [STJS.JsonPropertyName("brands_blocked")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] + public List BrandsBlocked + { + get => this.brandsBlocked; + set + { + this.brandsBlocked = value; + this.SetTracker.Track(); + } + } + + bool IHasSetTracking.IsPropertySet(string propertyName) + { + return this.SetTracker.IsSet(propertyName); + } + } +} diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkPaymentMethodOptionsOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkPaymentMethodOptionsOptions.cs new file mode 100644 index 0000000000..da184baa82 --- /dev/null +++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkPaymentMethodOptionsOptions.cs @@ -0,0 +1,38 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class PaymentLinkPaymentMethodOptionsOptions : INestedOptions, IHasSetTracking + { + private PaymentLinkPaymentMethodOptionsCardOptions card; + + [JsonIgnore] + [STJS.JsonIgnore] + internal SetTracker SetTracker { get; } = new SetTracker(); + + /// + /// Configuration for card payment methods. + /// + [JsonProperty("card", NullValueHandling = NullValueHandling.Ignore)] + [STJS.JsonPropertyName("card")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] + public PaymentLinkPaymentMethodOptionsCardOptions Card + { + get => this.card; + set + { + this.card = value; + this.SetTracker.Track(); + } + } + + bool IHasSetTracking.IsPropertySet(string propertyName) + { + return this.SetTracker.IsSet(propertyName); + } + } +} diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkUpdateOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkUpdateOptions.cs index 6ac631bb5e..cc9764a248 100644 --- a/src/Stripe.net/Services/PaymentLinks/PaymentLinkUpdateOptions.cs +++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkUpdateOptions.cs @@ -13,6 +13,7 @@ public class PaymentLinkUpdateOptions : BaseOptions, IHasMetadata private string inactiveMessage; private PaymentLinkNameCollectionOptions nameCollection; private List optionalItems; + private PaymentLinkPaymentMethodOptionsOptions paymentMethodOptions; private List paymentMethodTypes; private PaymentLinkRestrictionsOptions restrictions; private PaymentLinkShippingAddressCollectionOptions shippingAddressCollection; @@ -196,20 +197,37 @@ public List OptionalItems [STJS.JsonPropertyName("payment_method_collection")] public string PaymentMethodCollection { get; set; } + /// + /// Payment-method-specific configuration. + /// + [JsonProperty("payment_method_options", NullValueHandling = NullValueHandling.Ignore)] + [STJS.JsonPropertyName("payment_method_options")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] + public PaymentLinkPaymentMethodOptionsOptions PaymentMethodOptions + { + get => this.paymentMethodOptions; + set + { + this.paymentMethodOptions = value; + this.SetTracker.Track(); + } + } + /// /// The list of payment method types that customers can use. Pass an empty string to enable /// dynamic payment methods that use your payment method /// settings. /// One of: affirm, afterpay_clearpay, alipay, alma, - /// au_becs_debit, bacs_debit, bancontact, billie, blik, - /// boleto, card, cashapp, eps, fpx, giropay, - /// gopay, grabpay, ideal, klarna, konbini, link, - /// mb_way, mobilepay, multibanco, oxxo, p24, - /// pay_by_bank, paynow, paypal, paypay, payto, - /// pix, promptpay, qris, rechnung, satispay, - /// sepa_debit, shopeepay, sofort, sunbit, swish, - /// twint, upi, us_bank_account, wechat_pay, or zip. + /// au_becs_debit, bacs_debit, bancontact, billie, bizum, + /// blik, boleto, card, cashapp, eps, fpx, + /// giropay, gopay, grabpay, ideal, klarna, + /// konbini, link, mb_way, mobilepay, multibanco, + /// oxxo, p24, pay_by_bank, paynow, paypal, + /// paypay, payto, pix, promptpay, qris, rechnung, + /// satispay, sepa_debit, shopeepay, sofort, sunbit, + /// swish, twint, upi, us_bank_account, wechat_pay, or + /// zip. /// [JsonProperty("payment_method_types", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("payment_method_types")] diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationBizumDisplayPreferenceOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationBizumDisplayPreferenceOptions.cs new file mode 100644 index 0000000000..a778ac293a --- /dev/null +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationBizumDisplayPreferenceOptions.cs @@ -0,0 +1,19 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class PaymentMethodConfigurationBizumDisplayPreferenceOptions : INestedOptions + { + /// + /// The account's preference for whether or not to display this payment method. + /// One of: none, off, or on. + /// + [JsonProperty("preference")] + [STJS.JsonPropertyName("preference")] + public string Preference { get; set; } + } +} diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationBizumOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationBizumOptions.cs new file mode 100644 index 0000000000..59d716f2e7 --- /dev/null +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationBizumOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class PaymentMethodConfigurationBizumOptions : INestedOptions + { + /// + /// Whether or not the payment method should be displayed. + /// + [JsonProperty("display_preference")] + [STJS.JsonPropertyName("display_preference")] + public PaymentMethodConfigurationBizumDisplayPreferenceOptions DisplayPreference { get; set; } + } +} diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationCreateOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationCreateOptions.cs index 453c994a6b..90b669fd84 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationCreateOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationCreateOptions.cs @@ -127,6 +127,14 @@ public class PaymentMethodConfigurationCreateOptions : BaseOptions [STJS.JsonPropertyName("billie")] public PaymentMethodConfigurationBillieOptions Billie { get; set; } + /// + /// To enable Bizum, buyers need a Spanish IBAN from a bank connected to Bizum. Within their + /// banking app, they can enable Bizum and link their mobile number to their IBAN. + /// + [JsonProperty("bizum")] + [STJS.JsonPropertyName("bizum")] + public PaymentMethodConfigurationBizumOptions Bizum { get; set; } + /// /// BLIK is a single /// use payment method that requires customers to authenticate their payments. When @@ -527,9 +535,8 @@ public class PaymentMethodConfigurationCreateOptions : BaseOptions public PaymentMethodConfigurationSamsungPayOptions SamsungPay { get; set; } /// - /// Satispay is a single-use payment - /// method where customers are required to single-use + /// payment method where customers are required to authenticate /// their payment. Customers pay by being redirected from your website or app, authorizing /// the payment with Satispay, then returning to your website or app. You get + /// Scalapay is a single-use + /// payment method that lets customers pay in 3 or 4 installments. Customers are redirected + /// from your website or app, authorize the payment with Scalapay, then return to your + /// website or app. You get immediate + /// notification of whether the payment succeeded or failed. + /// + [JsonProperty("scalapay")] + [STJS.JsonPropertyName("scalapay")] + public PaymentMethodConfigurationScalapayOptions Scalapay { get; set; } + /// /// The Single Euro /// Payments Area (SEPA) is an initiative of the European Union to simplify payments diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationListOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationListOptions.cs index 1abba826f0..dfa001cd72 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationListOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationListOptions.cs @@ -10,6 +10,13 @@ public class PaymentMethodConfigurationListOptions : ListOptions { private string application; + /// + /// Whether the configuration is active. + /// + [JsonProperty("active")] + [STJS.JsonPropertyName("active")] + public bool? Active { get; set; } + /// /// The Connect application to filter by. /// diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationScalapayDisplayPreferenceOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationScalapayDisplayPreferenceOptions.cs new file mode 100644 index 0000000000..8826efea16 --- /dev/null +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationScalapayDisplayPreferenceOptions.cs @@ -0,0 +1,19 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class PaymentMethodConfigurationScalapayDisplayPreferenceOptions : INestedOptions + { + /// + /// The account's preference for whether or not to display this payment method. + /// One of: none, off, or on. + /// + [JsonProperty("preference")] + [STJS.JsonPropertyName("preference")] + public string Preference { get; set; } + } +} diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationScalapayOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationScalapayOptions.cs new file mode 100644 index 0000000000..8a06de8741 --- /dev/null +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationScalapayOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class PaymentMethodConfigurationScalapayOptions : INestedOptions + { + /// + /// Whether or not the payment method should be displayed. + /// + [JsonProperty("display_preference")] + [STJS.JsonPropertyName("display_preference")] + public PaymentMethodConfigurationScalapayDisplayPreferenceOptions DisplayPreference { get; set; } + } +} diff --git a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationUpdateOptions.cs b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationUpdateOptions.cs index 054a6e7cca..5606f29ec6 100644 --- a/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationUpdateOptions.cs +++ b/src/Stripe.net/Services/PaymentMethodConfigurations/PaymentMethodConfigurationUpdateOptions.cs @@ -134,6 +134,14 @@ public class PaymentMethodConfigurationUpdateOptions : BaseOptions [STJS.JsonPropertyName("billie")] public PaymentMethodConfigurationBillieOptions Billie { get; set; } + /// + /// To enable Bizum, buyers need a Spanish IBAN from a bank connected to Bizum. Within their + /// banking app, they can enable Bizum and link their mobile number to their IBAN. + /// + [JsonProperty("bizum")] + [STJS.JsonPropertyName("bizum")] + public PaymentMethodConfigurationBizumOptions Bizum { get; set; } + /// /// BLIK is a single /// use payment method that requires customers to authenticate their payments. When @@ -527,9 +535,8 @@ public class PaymentMethodConfigurationUpdateOptions : BaseOptions public PaymentMethodConfigurationSamsungPayOptions SamsungPay { get; set; } /// - /// Satispay is a single-use payment - /// method where customers are required to single-use + /// payment method where customers are required to authenticate /// their payment. Customers pay by being redirected from your website or app, authorizing /// the payment with Satispay, then returning to your website or app. You get + /// Scalapay is a single-use + /// payment method that lets customers pay in 3 or 4 installments. Customers are redirected + /// from your website or app, authorize the payment with Scalapay, then return to your + /// website or app. You get immediate + /// notification of whether the payment succeeded or failed. + /// + [JsonProperty("scalapay")] + [STJS.JsonPropertyName("scalapay")] + public PaymentMethodConfigurationScalapayOptions Scalapay { get; set; } + /// /// The Single Euro /// Payments Area (SEPA) is an initiative of the European Union to simplify payments diff --git a/src/Stripe.net/Services/PaymentMethods/PaymentMethodBizumOptions.cs b/src/Stripe.net/Services/PaymentMethods/PaymentMethodBizumOptions.cs new file mode 100644 index 0000000000..78bc3d36e7 --- /dev/null +++ b/src/Stripe.net/Services/PaymentMethods/PaymentMethodBizumOptions.cs @@ -0,0 +1,12 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class PaymentMethodBizumOptions : INestedOptions + { + } +} diff --git a/src/Stripe.net/Services/PaymentMethods/PaymentMethodCreateOptions.cs b/src/Stripe.net/Services/PaymentMethods/PaymentMethodCreateOptions.cs index 1e936e32e3..8055db87e8 100644 --- a/src/Stripe.net/Services/PaymentMethods/PaymentMethodCreateOptions.cs +++ b/src/Stripe.net/Services/PaymentMethods/PaymentMethodCreateOptions.cs @@ -108,6 +108,14 @@ public class PaymentMethodCreateOptions : BaseOptions, IHasMetadata [STJS.JsonPropertyName("billing_details")] public PaymentMethodBillingDetailsOptions BillingDetails { get; set; } + /// + /// If this is a bizum PaymentMethod, this hash contains details about the Bizum + /// payment method. + /// + [JsonProperty("bizum")] + [STJS.JsonPropertyName("bizum")] + public PaymentMethodBizumOptions Bizum { get; set; } + /// /// If this is a blik PaymentMethod, this hash contains details about the BLIK /// payment method. @@ -274,7 +282,7 @@ public class PaymentMethodCreateOptions : BaseOptions, IHasMetadata /// /// If this is an Link PaymentMethod, this hash contains details about the Link - /// payment method. + /// payment method (Link is also known as Onelink in the UK). /// [JsonProperty("link")] [STJS.JsonPropertyName("link")] @@ -466,6 +474,14 @@ public class PaymentMethodCreateOptions : BaseOptions, IHasMetadata [STJS.JsonPropertyName("satispay")] public PaymentMethodSatispayOptions Satispay { get; set; } + /// + /// If this is a Scalapay PaymentMethod, this hash contains details about the Scalapay + /// payment method. + /// + [JsonProperty("scalapay")] + [STJS.JsonPropertyName("scalapay")] + public PaymentMethodScalapayOptions Scalapay { get; set; } + /// /// If this is a sepa_debit PaymentMethod, this hash contains details about the SEPA /// debit bank account. @@ -527,7 +543,7 @@ public class PaymentMethodCreateOptions : BaseOptions, IHasMetadata /// PaymentMethod type. /// One of: acss_debit, affirm, afterpay_clearpay, alipay, /// alma, amazon_pay, au_becs_debit, bacs_debit, - /// bancontact, billie, blik, boleto, card, + /// bancontact, billie, bizum, blik, boleto, card, /// cashapp, crypto, custom, customer_balance, eps, /// fpx, giropay, gopay, grabpay, id_bank_transfer, /// ideal, kakao_pay, klarna, konbini, kr_card, @@ -535,9 +551,9 @@ public class PaymentMethodCreateOptions : BaseOptions, IHasMetadata /// nz_bank_account, oxxo, p24, pay_by_bank, payco, /// paynow, paypal, paypay, payto, pix, promptpay, /// qris, rechnung, revolut_pay, samsung_pay, satispay, - /// sepa_debit, shopeepay, sofort, stripe_balance, - /// sunbit, swish, twint, upi, us_bank_account, - /// wechat_pay, or zip. + /// scalapay, sepa_debit, shopeepay, sofort, + /// stripe_balance, sunbit, swish, twint, upi, + /// us_bank_account, wechat_pay, or zip. /// [JsonProperty("type")] [STJS.JsonPropertyName("type")] diff --git a/src/Stripe.net/Services/PaymentMethods/PaymentMethodListOptions.cs b/src/Stripe.net/Services/PaymentMethods/PaymentMethodListOptions.cs index b7ff2fa85f..9b8aa63a6b 100644 --- a/src/Stripe.net/Services/PaymentMethods/PaymentMethodListOptions.cs +++ b/src/Stripe.net/Services/PaymentMethods/PaymentMethodListOptions.cs @@ -39,7 +39,7 @@ public class PaymentMethodListOptions : ListOptions /// payload. /// One of: acss_debit, affirm, afterpay_clearpay, alipay, /// alma, amazon_pay, au_becs_debit, bacs_debit, - /// bancontact, billie, blik, boleto, card, + /// bancontact, billie, bizum, blik, boleto, card, /// cashapp, crypto, custom, customer_balance, eps, /// fpx, giropay, gopay, grabpay, id_bank_transfer, /// ideal, kakao_pay, klarna, konbini, kr_card, @@ -47,9 +47,9 @@ public class PaymentMethodListOptions : ListOptions /// nz_bank_account, oxxo, p24, pay_by_bank, payco, /// paynow, paypal, paypay, payto, pix, promptpay, /// qris, rechnung, revolut_pay, samsung_pay, satispay, - /// sepa_debit, shopeepay, sofort, stripe_balance, - /// sunbit, swish, twint, upi, us_bank_account, - /// wechat_pay, or zip. + /// scalapay, sepa_debit, shopeepay, sofort, + /// stripe_balance, sunbit, swish, twint, upi, + /// us_bank_account, wechat_pay, or zip. /// [JsonProperty("type")] [STJS.JsonPropertyName("type")] diff --git a/src/Stripe.net/Services/PaymentMethods/PaymentMethodScalapayOptions.cs b/src/Stripe.net/Services/PaymentMethods/PaymentMethodScalapayOptions.cs new file mode 100644 index 0000000000..43782b19bb --- /dev/null +++ b/src/Stripe.net/Services/PaymentMethods/PaymentMethodScalapayOptions.cs @@ -0,0 +1,12 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class PaymentMethodScalapayOptions : INestedOptions + { + } +} diff --git a/src/Stripe.net/Services/Payouts/PayoutCreateOptions.cs b/src/Stripe.net/Services/Payouts/PayoutCreateOptions.cs index b7ba537526..f9fd9b92dd 100644 --- a/src/Stripe.net/Services/Payouts/PayoutCreateOptions.cs +++ b/src/Stripe.net/Services/Payouts/PayoutCreateOptions.cs @@ -83,7 +83,9 @@ public class PayoutCreateOptions : BaseOptions, IHasMetadata /// A string that displays on the recipient's bank or card statement (up to 22 characters). /// A statement_descriptor that's longer than 22 characters return an error. Most /// banks truncate this information and display it inconsistently. Some banks might not - /// display it at all. + /// display it at all. For US ACH payouts, this maps to the ACH Company Entry Description + /// field, which the NACHA standard limits to 10 characters. Stripe truncates descriptors + /// longer than 10 characters for US ACH payouts. /// [JsonProperty("statement_descriptor")] [STJS.JsonPropertyName("statement_descriptor")] diff --git a/src/Stripe.net/Services/PromotionCodes/PromotionCodeService.cs b/src/Stripe.net/Services/PromotionCodes/PromotionCodeService.cs index aab4146806..e40cd16c4e 100644 --- a/src/Stripe.net/Services/PromotionCodes/PromotionCodeService.cs +++ b/src/Stripe.net/Services/PromotionCodes/PromotionCodeService.cs @@ -106,23 +106,23 @@ public virtual IAsyncEnumerable ListAutoPagingAsync(PromotionCode /// public virtual string SerializeBatchCreate(PromotionCodeCreateOptions options = null, RequestOptions requestOptions = null) { - var itemId = Guid.NewGuid().ToString(); + var requestId = Guid.NewGuid().ToString(); var stripeVersion = StripeConfiguration.ApiVersion; var stripeContext = requestOptions?.StripeContext; - var item = new Dictionary + var requestBody = new Dictionary { - { "id", itemId }, + { "id", requestId }, { "path_params", null }, { "params", options }, { "stripe_version", stripeVersion }, }; if (stripeContext != null) { - item["context"] = stripeContext; + requestBody["context"] = stripeContext; } - return JsonSerializer.Serialize(item, new JsonSerializerOptions(StripeConfiguration.SerializerOptions) { DefaultIgnoreCondition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull }); + return JsonSerializer.Serialize(requestBody, new JsonSerializerOptions(StripeConfiguration.SerializerOptions) { DefaultIgnoreCondition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull }); } /// @@ -130,23 +130,23 @@ public virtual string SerializeBatchCreate(PromotionCodeCreateOptions options = /// public virtual string SerializeBatchUpdate(string promotionCode, PromotionCodeUpdateOptions options = null, RequestOptions requestOptions = null) { - var itemId = Guid.NewGuid().ToString(); + var requestId = Guid.NewGuid().ToString(); var stripeVersion = StripeConfiguration.ApiVersion; var stripeContext = requestOptions?.StripeContext; - var item = new Dictionary + var requestBody = new Dictionary { - { "id", itemId }, + { "id", requestId }, { "path_params", new Dictionary { { "promotion_code", promotionCode } } }, { "params", options }, { "stripe_version", stripeVersion }, }; if (stripeContext != null) { - item["context"] = stripeContext; + requestBody["context"] = stripeContext; } - return JsonSerializer.Serialize(item, new JsonSerializerOptions(StripeConfiguration.SerializerOptions) { DefaultIgnoreCondition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull }); + return JsonSerializer.Serialize(requestBody, new JsonSerializerOptions(StripeConfiguration.SerializerOptions) { DefaultIgnoreCondition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull }); } /// diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentCreateOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentCreateOptions.cs index b789fb17e2..33700fa888 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentCreateOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentCreateOptions.cs @@ -85,16 +85,17 @@ public class SetupIntentCreateOptions : BaseOptions, IHasMetadata /// The list of payment method types to exclude from use with this SetupIntent. /// One of: acss_debit, affirm, afterpay_clearpay, alipay, /// alma, amazon_pay, au_becs_debit, bacs_debit, - /// bancontact, billie, blik, boleto, card, + /// bancontact, billie, bizum, blik, boleto, card, /// cashapp, crypto, customer_balance, eps, fpx, /// giropay, gopay, grabpay, id_bank_transfer, ideal, /// kakao_pay, klarna, konbini, kr_card, mb_way, /// mobilepay, multibanco, naver_pay, nz_bank_account, /// oxxo, p24, pay_by_bank, payco, paynow, paypal, /// paypay, payto, pix, promptpay, qris, rechnung, - /// revolut_pay, samsung_pay, satispay, sepa_debit, - /// shopeepay, sofort, stripe_balance, sunbit, swish, - /// twint, upi, us_bank_account, wechat_pay, or zip. + /// revolut_pay, samsung_pay, satispay, scalapay, + /// sepa_debit, shopeepay, sofort, stripe_balance, + /// sunbit, swish, twint, upi, us_bank_account, + /// wechat_pay, or zip. /// [JsonProperty("excluded_payment_method_types")] [STJS.JsonPropertyName("excluded_payment_method_types")] diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataBizumOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataBizumOptions.cs new file mode 100644 index 0000000000..6c756b3953 --- /dev/null +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataBizumOptions.cs @@ -0,0 +1,12 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class SetupIntentPaymentMethodDataBizumOptions : INestedOptions + { + } +} diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataOptions.cs index 5c48627017..1ed73644de 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataOptions.cs @@ -108,6 +108,14 @@ public class SetupIntentPaymentMethodDataOptions : INestedOptions, IHasMetadata [STJS.JsonPropertyName("billing_details")] public SetupIntentPaymentMethodDataBillingDetailsOptions BillingDetails { get; set; } + /// + /// If this is a bizum PaymentMethod, this hash contains details about the Bizum + /// payment method. + /// + [JsonProperty("bizum")] + [STJS.JsonPropertyName("bizum")] + public SetupIntentPaymentMethodDataBizumOptions Bizum { get; set; } + /// /// If this is a blik PaymentMethod, this hash contains details about the BLIK /// payment method. @@ -246,7 +254,7 @@ public class SetupIntentPaymentMethodDataOptions : INestedOptions, IHasMetadata /// /// If this is an Link PaymentMethod, this hash contains details about the Link - /// payment method. + /// payment method (Link is also known as Onelink in the UK). /// [JsonProperty("link")] [STJS.JsonPropertyName("link")] @@ -431,6 +439,14 @@ public class SetupIntentPaymentMethodDataOptions : INestedOptions, IHasMetadata [STJS.JsonPropertyName("satispay")] public SetupIntentPaymentMethodDataSatispayOptions Satispay { get; set; } + /// + /// If this is a Scalapay PaymentMethod, this hash contains details about the Scalapay + /// payment method. + /// + [JsonProperty("scalapay")] + [STJS.JsonPropertyName("scalapay")] + public SetupIntentPaymentMethodDataScalapayOptions Scalapay { get; set; } + /// /// If this is a sepa_debit PaymentMethod, this hash contains details about the SEPA /// debit bank account. @@ -499,16 +515,17 @@ public class SetupIntentPaymentMethodDataOptions : INestedOptions, IHasMetadata /// PaymentMethod type. /// One of: acss_debit, affirm, afterpay_clearpay, alipay, /// alma, amazon_pay, au_becs_debit, bacs_debit, - /// bancontact, billie, blik, boleto, cashapp, - /// crypto, customer_balance, eps, fpx, giropay, - /// gopay, grabpay, id_bank_transfer, ideal, kakao_pay, - /// klarna, konbini, kr_card, link, mb_way, - /// mobilepay, multibanco, naver_pay, nz_bank_account, - /// oxxo, p24, pay_by_bank, payco, paynow, paypal, - /// paypay, payto, pix, promptpay, qris, rechnung, - /// revolut_pay, samsung_pay, satispay, sepa_debit, - /// shopeepay, sofort, stripe_balance, sunbit, swish, - /// twint, upi, us_bank_account, wechat_pay, or zip. + /// bancontact, billie, bizum, blik, boleto, + /// cashapp, crypto, customer_balance, eps, fpx, + /// giropay, gopay, grabpay, id_bank_transfer, ideal, + /// kakao_pay, klarna, konbini, kr_card, link, + /// mb_way, mobilepay, multibanco, naver_pay, + /// nz_bank_account, oxxo, p24, pay_by_bank, payco, + /// paynow, paypal, paypay, payto, pix, promptpay, + /// qris, rechnung, revolut_pay, samsung_pay, satispay, + /// scalapay, sepa_debit, shopeepay, sofort, + /// stripe_balance, sunbit, swish, twint, upi, + /// us_bank_account, wechat_pay, or zip. /// [JsonProperty("type")] [STJS.JsonPropertyName("type")] diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataScalapayOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataScalapayOptions.cs new file mode 100644 index 0000000000..8f0044de2e --- /dev/null +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataScalapayOptions.cs @@ -0,0 +1,12 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class SetupIntentPaymentMethodDataScalapayOptions : INestedOptions + { + } +} diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsBizumOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsBizumOptions.cs new file mode 100644 index 0000000000..c51d442dec --- /dev/null +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsBizumOptions.cs @@ -0,0 +1,12 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class SetupIntentPaymentMethodOptionsBizumOptions : INestedOptions + { + } +} diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsOptions.cs index fe7aa2c080..dad0154a1a 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsOptions.cs @@ -32,6 +32,14 @@ public class SetupIntentPaymentMethodOptionsOptions : INestedOptions [STJS.JsonPropertyName("bacs_debit")] public SetupIntentPaymentMethodOptionsBacsDebitOptions BacsDebit { get; set; } + /// + /// If this is a bizum SetupIntent, this sub-hash contains details about the Bizum + /// payment method options. + /// + [JsonProperty("bizum")] + [STJS.JsonPropertyName("bizum")] + public SetupIntentPaymentMethodOptionsBizumOptions Bizum { get; set; } + /// /// Configuration for any card setup attempted on this SetupIntent. /// @@ -57,7 +65,7 @@ public class SetupIntentPaymentMethodOptionsOptions : INestedOptions /// /// If this is a link PaymentMethod, this sub-hash contains details about the Link - /// payment method options. + /// payment method options (Link is also known as Onelink in the UK). /// [JsonProperty("link")] [STJS.JsonPropertyName("link")] diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentUpdateOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentUpdateOptions.cs index 3aee46bedb..b8631d2bd2 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentUpdateOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentUpdateOptions.cs @@ -58,16 +58,17 @@ public class SetupIntentUpdateOptions : BaseOptions, IHasMetadata /// The list of payment method types to exclude from use with this SetupIntent. /// One of: acss_debit, affirm, afterpay_clearpay, alipay, /// alma, amazon_pay, au_becs_debit, bacs_debit, - /// bancontact, billie, blik, boleto, card, + /// bancontact, billie, bizum, blik, boleto, card, /// cashapp, crypto, customer_balance, eps, fpx, /// giropay, gopay, grabpay, id_bank_transfer, ideal, /// kakao_pay, klarna, konbini, kr_card, mb_way, /// mobilepay, multibanco, naver_pay, nz_bank_account, /// oxxo, p24, pay_by_bank, payco, paynow, paypal, /// paypay, payto, pix, promptpay, qris, rechnung, - /// revolut_pay, samsung_pay, satispay, sepa_debit, - /// shopeepay, sofort, stripe_balance, sunbit, swish, - /// twint, upi, us_bank_account, wechat_pay, or zip. + /// revolut_pay, samsung_pay, satispay, scalapay, + /// sepa_debit, shopeepay, sofort, stripe_balance, + /// sunbit, swish, twint, upi, us_bank_account, + /// wechat_pay, or zip. /// [JsonProperty("excluded_payment_method_types", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("excluded_payment_method_types")] diff --git a/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemCreateOptions.cs b/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemCreateOptions.cs index 0fd77ca18f..22c9a89f67 100644 --- a/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemCreateOptions.cs +++ b/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemCreateOptions.cs @@ -65,33 +65,8 @@ public List Discounts public Dictionary Metadata { get; set; } /// - /// Use allow_incomplete to transition the subscription to status=past_due if - /// a payment is required but cannot be paid. This allows you to manage scenarios where - /// additional user actions are needed to pay a subscription's invoice. For example, SCA - /// regulation may require 3DS authentication to complete payment. See the SCA - /// Migration Guide for Billing to learn more. This is the default behavior. - /// - /// Use default_incomplete to transition the subscription to status=past_due - /// when payment is required and await explicit confirmation of the invoice's payment - /// intent. This allows simpler management of scenarios where additional user actions are - /// needed to pay a subscription’s invoice. Such as failed payments, SCA - /// regulation, or collecting a mandate for a bank debit payment method. - /// - /// Use pending_if_incomplete to update the subscription using pending - /// updates. When you use pending_if_incomplete you can only pass the parameters - /// supported - /// by pending updates. - /// - /// Use error_if_incomplete if you want Stripe to return an HTTP 402 status code if a - /// subscription's invoice cannot be paid. For example, if a payment method requires 3DS - /// authentication due to SCA regulation and further user action is needed, this parameter - /// does not update the subscription and returns an error instead. This was the default - /// behavior for API versions prior to 2019-03-14. See the changelog to learn more. + /// Controls how Stripe handles payment when a subscription update requires payment and + /// collection_method=charge_automatically. /// One of: allow_incomplete, default_incomplete, error_if_incomplete, /// or pending_if_incomplete. /// diff --git a/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemDeleteOptions.cs b/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemDeleteOptions.cs index 1692e3d393..8de95d9b63 100644 --- a/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemDeleteOptions.cs +++ b/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemDeleteOptions.cs @@ -18,33 +18,8 @@ public class SubscriptionItemDeleteOptions : BaseOptions public bool? ClearUsage { get; set; } /// - /// Use allow_incomplete to transition the subscription to status=past_due if - /// a payment is required but cannot be paid. This allows you to manage scenarios where - /// additional user actions are needed to pay a subscription's invoice. For example, SCA - /// regulation may require 3DS authentication to complete payment. See the SCA - /// Migration Guide for Billing to learn more. This is the default behavior. - /// - /// Use default_incomplete to transition the subscription to status=past_due - /// when payment is required and await explicit confirmation of the invoice's payment - /// intent. This allows simpler management of scenarios where additional user actions are - /// needed to pay a subscription’s invoice. Such as failed payments, SCA - /// regulation, or collecting a mandate for a bank debit payment method. - /// - /// Use pending_if_incomplete to update the subscription using pending - /// updates. When you use pending_if_incomplete you can only pass the parameters - /// supported - /// by pending updates. - /// - /// Use error_if_incomplete if you want Stripe to return an HTTP 402 status code if a - /// subscription's invoice cannot be paid. For example, if a payment method requires 3DS - /// authentication due to SCA regulation and further user action is needed, this parameter - /// does not update the subscription and returns an error instead. This was the default - /// behavior for API versions prior to 2019-03-14. See the changelog to learn more. + /// Controls how Stripe handles payment when a subscription update requires payment and + /// collection_method=charge_automatically. /// One of: allow_incomplete, default_incomplete, error_if_incomplete, /// or pending_if_incomplete. /// diff --git a/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemUpdateOptions.cs b/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemUpdateOptions.cs index 79d73961ea..f70c976957 100644 --- a/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemUpdateOptions.cs +++ b/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemUpdateOptions.cs @@ -83,33 +83,8 @@ public Dictionary Metadata public bool? OffSession { get; set; } /// - /// Use allow_incomplete to transition the subscription to status=past_due if - /// a payment is required but cannot be paid. This allows you to manage scenarios where - /// additional user actions are needed to pay a subscription's invoice. For example, SCA - /// regulation may require 3DS authentication to complete payment. See the SCA - /// Migration Guide for Billing to learn more. This is the default behavior. - /// - /// Use default_incomplete to transition the subscription to status=past_due - /// when payment is required and await explicit confirmation of the invoice's payment - /// intent. This allows simpler management of scenarios where additional user actions are - /// needed to pay a subscription’s invoice. Such as failed payments, SCA - /// regulation, or collecting a mandate for a bank debit payment method. - /// - /// Use pending_if_incomplete to update the subscription using pending - /// updates. When you use pending_if_incomplete you can only pass the parameters - /// supported - /// by pending updates. - /// - /// Use error_if_incomplete if you want Stripe to return an HTTP 402 status code if a - /// subscription's invoice cannot be paid. For example, if a payment method requires 3DS - /// authentication due to SCA regulation and further user action is needed, this parameter - /// does not update the subscription and returns an error instead. This was the default - /// behavior for API versions prior to 2019-03-14. See the changelog to learn more. + /// Controls how Stripe handles payment when a subscription update requires payment and + /// collection_method=charge_automatically. /// One of: allow_incomplete, default_incomplete, error_if_incomplete, /// or pending_if_incomplete. /// diff --git a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseAddInvoiceItemOptions.cs b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseAddInvoiceItemOptions.cs index 5c09f1ef23..614eb96b3e 100644 --- a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseAddInvoiceItemOptions.cs +++ b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseAddInvoiceItemOptions.cs @@ -15,6 +15,14 @@ public class SubscriptionSchedulePhaseAddInvoiceItemOptions : INestedOptions, IH [STJS.JsonIgnore] internal SetTracker SetTracker { get; } = new SetTracker(); + /// + /// Controls whether discounts apply to this invoice item. Defaults to true if no value is + /// provided. + /// + [JsonProperty("discountable")] + [STJS.JsonPropertyName("discountable")] + public bool? Discountable { get; set; } + /// /// The coupons to redeem into discounts for the item. /// diff --git a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleService.cs b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleService.cs index cd9b3b5e66..3e97c8a5da 100644 --- a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleService.cs +++ b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleService.cs @@ -5,7 +5,6 @@ namespace Stripe using System.Collections.Generic; using System.Net; using System.Net.Http; - using System.Text.Json; using System.Threading; using System.Threading.Tasks; @@ -161,78 +160,6 @@ public virtual Task ReleaseAsync(string id, SubscriptionSc return this.RequestAsync(BaseAddress.Api, HttpMethod.Post, $"/v1/subscription_schedules/{WebUtility.UrlEncode(id)}/release", options, requestOptions, cancellationToken); } - /// - /// Serializes a SubscriptionSchedule cancel request into a batch job JSONL line. - /// - public virtual string SerializeBatchCancel(string schedule, SubscriptionScheduleCancelOptions options = null, RequestOptions requestOptions = null) - { - var itemId = Guid.NewGuid().ToString(); - var stripeVersion = StripeConfiguration.ApiVersion; - var stripeContext = requestOptions?.StripeContext; - - var item = new Dictionary - { - { "id", itemId }, - { "path_params", new Dictionary { { "schedule", schedule } } }, - { "params", options }, - { "stripe_version", stripeVersion }, - }; - if (stripeContext != null) - { - item["context"] = stripeContext; - } - - return JsonSerializer.Serialize(item, new JsonSerializerOptions(StripeConfiguration.SerializerOptions) { DefaultIgnoreCondition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull }); - } - - /// - /// Serializes a SubscriptionSchedule create request into a batch job JSONL line. - /// - public virtual string SerializeBatchCreate(SubscriptionScheduleCreateOptions options = null, RequestOptions requestOptions = null) - { - var itemId = Guid.NewGuid().ToString(); - var stripeVersion = StripeConfiguration.ApiVersion; - var stripeContext = requestOptions?.StripeContext; - - var item = new Dictionary - { - { "id", itemId }, - { "path_params", null }, - { "params", options }, - { "stripe_version", stripeVersion }, - }; - if (stripeContext != null) - { - item["context"] = stripeContext; - } - - return JsonSerializer.Serialize(item, new JsonSerializerOptions(StripeConfiguration.SerializerOptions) { DefaultIgnoreCondition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull }); - } - - /// - /// Serializes a SubscriptionSchedule update request into a batch job JSONL line. - /// - public virtual string SerializeBatchUpdate(string schedule, SubscriptionScheduleUpdateOptions options = null, RequestOptions requestOptions = null) - { - var itemId = Guid.NewGuid().ToString(); - var stripeVersion = StripeConfiguration.ApiVersion; - var stripeContext = requestOptions?.StripeContext; - - var item = new Dictionary - { - { "id", itemId }, - { "path_params", new Dictionary { { "schedule", schedule } } }, - { "params", options }, - { "stripe_version", stripeVersion }, - }; - if (stripeContext != null) - { - item["context"] = stripeContext; - } - - return JsonSerializer.Serialize(item, new JsonSerializerOptions(StripeConfiguration.SerializerOptions) { DefaultIgnoreCondition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull }); - } - /// ///

Updates an existing subscription schedule.

. ///
diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionAddInvoiceItemOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionAddInvoiceItemOptions.cs index 3d4301a260..0afe0c129f 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionAddInvoiceItemOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionAddInvoiceItemOptions.cs @@ -15,6 +15,14 @@ public class SubscriptionAddInvoiceItemOptions : INestedOptions, IHasMetadata, I [STJS.JsonIgnore] internal SetTracker SetTracker { get; } = new SetTracker(); + /// + /// Controls whether discounts apply to this invoice item. Defaults to true if no value is + /// provided. + /// + [JsonProperty("discountable")] + [STJS.JsonPropertyName("discountable")] + public bool? Discountable { get; set; } + /// /// The coupons to redeem into discounts for the item. /// diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionBillForOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionBillForOptions.cs new file mode 100644 index 0000000000..84f712b670 --- /dev/null +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionBillForOptions.cs @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class SubscriptionBillForOptions : INestedOptions + { + /// + /// Controls when to bill for metered usage in the current period. Defaults to { type: + /// "now" }. + /// + [JsonProperty("outstanding_usage_through")] + [STJS.JsonPropertyName("outstanding_usage_through")] + public SubscriptionBillForOutstandingUsageThroughOptions OutstandingUsageThrough { get; set; } + + /// + /// Controls when to credit for unused time on licensed items. Defaults to { type: "now" + /// }. + /// + [JsonProperty("unused_time_from")] + [STJS.JsonPropertyName("unused_time_from")] + public SubscriptionBillForUnusedTimeFromOptions UnusedTimeFrom { get; set; } + } +} diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionBillForOutstandingUsageThroughOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionBillForOutstandingUsageThroughOptions.cs new file mode 100644 index 0000000000..2bb0f9bc96 --- /dev/null +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionBillForOutstandingUsageThroughOptions.cs @@ -0,0 +1,19 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class SubscriptionBillForOutstandingUsageThroughOptions : INestedOptions + { + /// + /// When to bill metered usage in the current period. + /// One of: none, or now. + /// + [JsonProperty("type")] + [STJS.JsonPropertyName("type")] + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionBillForUnusedTimeFromOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionBillForUnusedTimeFromOptions.cs new file mode 100644 index 0000000000..6edc13053a --- /dev/null +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionBillForUnusedTimeFromOptions.cs @@ -0,0 +1,19 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class SubscriptionBillForUnusedTimeFromOptions : INestedOptions + { + /// + /// When to credit for unused time. + /// One of: item_current_period_start, none, or now. + /// + [JsonProperty("type")] + [STJS.JsonPropertyName("type")] + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionCancelAt.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionCancelAt.cs index 4f20b2c22b..20091e2cd9 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionCancelAt.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionCancelAt.cs @@ -6,6 +6,7 @@ namespace Stripe [STJS.JsonConverter(typeof(Infrastructure.STJStringEnumConverterFactory))] public class SubscriptionCancelAt : StringEnum { + public static readonly SubscriptionCancelAt MaxBilledUntil = new SubscriptionCancelAt("max_billed_until"); public static readonly SubscriptionCancelAt MaxPeriodEnd = new SubscriptionCancelAt("max_period_end"); public static readonly SubscriptionCancelAt MinPeriodEnd = new SubscriptionCancelAt("min_period_end"); diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionCreateOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionCreateOptions.cs index d53a8d4762..4927b6a701 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionCreateOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionCreateOptions.cs @@ -309,38 +309,10 @@ public string OnBehalfOf } /// - /// Only applies to subscriptions with collection_method=charge_automatically. - /// - /// Use allow_incomplete to create Subscriptions with status=incomplete if the - /// first invoice can't be paid. Creating Subscriptions with this status allows you to - /// manage scenarios where additional customer actions are needed to pay a subscription's - /// invoice. For example, SCA regulation may require 3DS authentication to complete payment. - /// See the SCA - /// Migration Guide for Billing to learn more. This is the default behavior. - /// - /// Use default_incomplete to create Subscriptions with status=incomplete when - /// the first invoice requires payment, otherwise start as active. Subscriptions transition - /// to status=active when successfully confirming the PaymentIntent on the first - /// invoice. This allows simpler management of scenarios where additional customer actions - /// are needed to pay a subscription’s invoice, such as failed payments, SCA - /// regulation, or collecting a mandate for a bank debit payment method. If the - /// PaymentIntent is not confirmed within 23 hours Subscriptions transition to - /// status=incomplete_expired, which is a terminal state. - /// - /// Use error_if_incomplete if you want Stripe to return an HTTP 402 status code if a - /// subscription's first invoice can't be paid. For example, if a payment method requires - /// 3DS authentication due to SCA regulation and further customer action is needed, this - /// parameter doesn't create a Subscription and returns an error instead. This was the - /// default behavior for API versions prior to 2019-03-14. See the changelog to learn more. - /// - /// pending_if_incomplete is only used with updates and cannot be passed when - /// creating a Subscription. - /// - /// Subscriptions with collection_method=send_invoice are automatically activated - /// regardless of the first Invoice status. + /// Controls how Stripe handles the first invoice when payment is required and + /// collection_method=charge_automatically. Subscriptions with + /// collection_method=send_invoice are automatically activated regardless of the + /// first Invoice status. /// One of: allow_incomplete, default_incomplete, error_if_incomplete, /// or pending_if_incomplete. /// diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionPauseOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionPauseOptions.cs new file mode 100644 index 0000000000..4116bdcfdd --- /dev/null +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionPauseOptions.cs @@ -0,0 +1,34 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class SubscriptionPauseOptions : BaseOptions + { + /// + /// Controls what to bill for when pausing the subscription. + /// + [JsonProperty("bill_for")] + [STJS.JsonPropertyName("bill_for")] + public SubscriptionBillForOptions BillFor { get; set; } + + /// + /// Determines how to handle debits and credits when pausing. The default is + /// pending_invoice_item. + /// One of: invoice, or pending_invoice_item. + /// + [JsonProperty("invoicing_behavior")] + [STJS.JsonPropertyName("invoicing_behavior")] + public string InvoicingBehavior { get; set; } + + /// + /// The type of pause to apply. Defaults to subscription. + /// + [JsonProperty("type")] + [STJS.JsonPropertyName("type")] + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsOptions.cs index 1b4eeac887..32a95ef919 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsOptions.cs @@ -39,8 +39,8 @@ public class SubscriptionPaymentSettingsOptions : INestedOptions, IHasSetTrackin /// naver_pay, nz_bank_account, p24, pay_by_bank, payco, /// paynow, paypal, payto, pix, promptpay, /// revolut_pay, sepa_credit_transfer, sepa_debit, sofort, - /// stripe_balance, swish, upi, us_bank_account, or - /// wechat_pay. + /// stripe_balance, swish, twint, upi, us_bank_account, + /// or wechat_pay. ///
[JsonProperty("payment_method_types", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("payment_method_types")] diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionResumeOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionResumeOptions.cs index 9ab9ebf5d9..1fb1ddac70 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionResumeOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionResumeOptions.cs @@ -20,6 +20,16 @@ public class SubscriptionResumeOptions : BaseOptions [STJS.JsonPropertyName("billing_cycle_anchor")] public SubscriptionBillingCycleAnchor BillingCycleAnchor { get; set; } + /// + /// Controls whether Stripe attempts payment on the resumption invoice in the resume + /// request, and how payment on that invoice affects the subscription's status. The default + /// is resume_on_payment_attempt. + /// One of: resume_on_payment_attempt, or resume_on_payment_success. + /// + [JsonProperty("payment_behavior")] + [STJS.JsonPropertyName("payment_behavior")] + public string PaymentBehavior { get; set; } + /// /// Determines how to handle prorations resulting diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionService.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionService.cs index e300733b15..33e4f6ddd0 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionService.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionService.cs @@ -32,8 +32,9 @@ public SubscriptionService(IStripeClient client) /// ///

Cancels a customer’s subscription immediately. The customer won’t be charged again - /// for the subscription. After it’s canceled, you can no longer update the subscription or - /// its metadata.

. + /// for the subscription. After it’s canceled, the subscription is largely immutable. You + /// can still update its metadata and + /// cancellation_details.

. /// ///

Any pending invoice items that you’ve created are still charged at the end of the /// period, unless manually ///

Cancels a customer’s subscription immediately. The customer won’t be charged again - /// for the subscription. After it’s canceled, you can no longer update the subscription or - /// its metadata.

. + /// for the subscription. After it’s canceled, the subscription is largely immutable. You + /// can still update its metadata and + /// cancellation_details.

. /// ///

Any pending invoice items that you’ve created are still charged at the end of the /// period, unless manually MigrateAsync(string id, SubscriptionMigrateOpt return this.RequestAsync(BaseAddress.Api, HttpMethod.Post, $"/v1/subscriptions/{WebUtility.UrlEncode(id)}/migrate", options, requestOptions, cancellationToken); } + ///

+ ///

Pauses a subscription by transitioning it to the paused status. A paused subscription + /// does not generate invoices and will not advance to new billing periods. The subscription + /// can be resumed later using the resume endpoint. Cannot pause subscriptions with attached + /// schedules.

. + ///
+ public virtual Subscription Pause(string id, SubscriptionPauseOptions options = null, RequestOptions requestOptions = null) + { + return this.Request(BaseAddress.Api, HttpMethod.Post, $"/v1/subscriptions/{WebUtility.UrlEncode(id)}/pause", options, requestOptions); + } + + /// + ///

Pauses a subscription by transitioning it to the paused status. A paused subscription + /// does not generate invoices and will not advance to new billing periods. The subscription + /// can be resumed later using the resume endpoint. Cannot pause subscriptions with attached + /// schedules.

. + ///
+ public virtual Task PauseAsync(string id, SubscriptionPauseOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.RequestAsync(BaseAddress.Api, HttpMethod.Post, $"/v1/subscriptions/{WebUtility.UrlEncode(id)}/pause", options, requestOptions, cancellationToken); + } + ///
///

Initiates resumption of a paused subscription, optionally resetting the billing cycle - /// anchor and creating prorations. If no resumption invoice is generated, the subscription - /// becomes active immediately. If a resumption invoice is generated, the - /// subscription remains paused until the invoice is paid or marked uncollectible. If - /// the invoice isn’t paid by the expiration date, it is voided and the subscription remains - /// paused. You can only resume subscriptions with collection_method set to - /// charge_automatically. send_invoice subscriptions are not supported.

. + /// anchor and creating prorations. Resume is only available for subscriptions that use + /// charge_automatically collection. If Stripe doesn’t generate a resumption invoice, + /// the subscription becomes active immediately. When a resumption invoice is + /// generated, Stripe finalizes it immediately. If the invoice is paid or marked + /// uncollectible, the subscription becomes active. If the invoice is manually + /// voided, the subscription stays paused. If there is no payment attempt within 23 + /// hours, Stripe voids the invoice and the subscription stays paused. Learn more + /// about
resuming + /// subscriptions.

. ///
public virtual Subscription Resume(string id, SubscriptionResumeOptions options = null, RequestOptions requestOptions = null) { @@ -218,12 +246,16 @@ public virtual Subscription Resume(string id, SubscriptionResumeOptions options /// ///

Initiates resumption of a paused subscription, optionally resetting the billing cycle - /// anchor and creating prorations. If no resumption invoice is generated, the subscription - /// becomes active immediately. If a resumption invoice is generated, the - /// subscription remains paused until the invoice is paid or marked uncollectible. If - /// the invoice isn’t paid by the expiration date, it is voided and the subscription remains - /// paused. You can only resume subscriptions with collection_method set to - /// charge_automatically. send_invoice subscriptions are not supported.

. + /// anchor and creating prorations. Resume is only available for subscriptions that use + /// charge_automatically collection. If Stripe doesn’t generate a resumption invoice, + /// the subscription becomes active immediately. When a resumption invoice is + /// generated, Stripe finalizes it immediately. If the invoice is paid or marked + /// uncollectible, the subscription becomes active. If the invoice is manually + /// voided, the subscription stays paused. If there is no payment attempt within 23 + /// hours, Stripe voids the invoice and the subscription stays paused. Learn more + /// about resuming + /// subscriptions.

. ///
public virtual Task ResumeAsync(string id, SubscriptionResumeOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) { @@ -282,28 +314,52 @@ public virtual IAsyncEnumerable SearchAutoPagingAsync(Subscription return this.SearchRequestAutoPagingAsync($"/v1/subscriptions/search", options, requestOptions, cancellationToken); } + /// + /// Serializes a Subscription cancel request into a batch job JSONL line. + /// + public virtual string SerializeBatchCancel(string subscriptionExposedId, SubscriptionCancelOptions options = null, RequestOptions requestOptions = null) + { + var requestId = Guid.NewGuid().ToString(); + var stripeVersion = StripeConfiguration.ApiVersion; + var stripeContext = requestOptions?.StripeContext; + + var requestBody = new Dictionary + { + { "id", requestId }, + { "path_params", new Dictionary { { "subscription_exposed_id", subscriptionExposedId } } }, + { "params", options }, + { "stripe_version", stripeVersion }, + }; + if (stripeContext != null) + { + requestBody["context"] = stripeContext; + } + + return JsonSerializer.Serialize(requestBody, new JsonSerializerOptions(StripeConfiguration.SerializerOptions) { DefaultIgnoreCondition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull }); + } + /// /// Serializes a Subscription migrate request into a batch job JSONL line. /// public virtual string SerializeBatchMigrate(string subscription, SubscriptionMigrateOptions options = null, RequestOptions requestOptions = null) { - var itemId = Guid.NewGuid().ToString(); + var requestId = Guid.NewGuid().ToString(); var stripeVersion = StripeConfiguration.ApiVersion; var stripeContext = requestOptions?.StripeContext; - var item = new Dictionary + var requestBody = new Dictionary { - { "id", itemId }, + { "id", requestId }, { "path_params", new Dictionary { { "subscription", subscription } } }, { "params", options }, { "stripe_version", stripeVersion }, }; if (stripeContext != null) { - item["context"] = stripeContext; + requestBody["context"] = stripeContext; } - return JsonSerializer.Serialize(item, new JsonSerializerOptions(StripeConfiguration.SerializerOptions) { DefaultIgnoreCondition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull }); + return JsonSerializer.Serialize(requestBody, new JsonSerializerOptions(StripeConfiguration.SerializerOptions) { DefaultIgnoreCondition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull }); } /// @@ -311,23 +367,23 @@ public virtual string SerializeBatchMigrate(string subscription, SubscriptionMig /// public virtual string SerializeBatchUpdate(string subscriptionExposedId, SubscriptionUpdateOptions options = null, RequestOptions requestOptions = null) { - var itemId = Guid.NewGuid().ToString(); + var requestId = Guid.NewGuid().ToString(); var stripeVersion = StripeConfiguration.ApiVersion; var stripeContext = requestOptions?.StripeContext; - var item = new Dictionary + var requestBody = new Dictionary { - { "id", itemId }, + { "id", requestId }, { "path_params", new Dictionary { { "subscription_exposed_id", subscriptionExposedId } } }, { "params", options }, { "stripe_version", stripeVersion }, }; if (stripeContext != null) { - item["context"] = stripeContext; + requestBody["context"] = stripeContext; } - return JsonSerializer.Serialize(item, new JsonSerializerOptions(StripeConfiguration.SerializerOptions) { DefaultIgnoreCondition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull }); + return JsonSerializer.Serialize(requestBody, new JsonSerializerOptions(StripeConfiguration.SerializerOptions) { DefaultIgnoreCondition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull }); } /// diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionUpdateOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionUpdateOptions.cs index 765a7eef00..39ccd1fc2c 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionUpdateOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionUpdateOptions.cs @@ -234,8 +234,10 @@ public string Description } /// - /// The coupons to redeem into discounts for the subscription. If not specified or empty, - /// inherits the discount from the subscription's customer. + /// The coupons to redeem into discounts for the subscription. A populated array overwrites + /// the existing discounts on the subscription. If not specified or empty array, it leaves + /// the subscription's discounts unchanged. If empty string, it clears the subscription's + /// discounts. /// [JsonProperty("discounts", NullValueHandling = NullValueHandling.Ignore)] [STJS.JsonPropertyName("discounts")] @@ -327,33 +329,8 @@ public SubscriptionPauseCollectionOptions PauseCollection } /// - /// Use allow_incomplete to transition the subscription to status=past_due if - /// a payment is required but cannot be paid. This allows you to manage scenarios where - /// additional user actions are needed to pay a subscription's invoice. For example, SCA - /// regulation may require 3DS authentication to complete payment. See the SCA - /// Migration Guide for Billing to learn more. This is the default behavior. - /// - /// Use default_incomplete to transition the subscription to status=past_due - /// when payment is required and await explicit confirmation of the invoice's payment - /// intent. This allows simpler management of scenarios where additional user actions are - /// needed to pay a subscription’s invoice. Such as failed payments, SCA - /// regulation, or collecting a mandate for a bank debit payment method. - /// - /// Use pending_if_incomplete to update the subscription using pending - /// updates. When you use pending_if_incomplete you can only pass the parameters - /// supported - /// by pending updates. - /// - /// Use error_if_incomplete if you want Stripe to return an HTTP 402 status code if a - /// subscription's invoice cannot be paid. For example, if a payment method requires 3DS - /// authentication due to SCA regulation and further user action is needed, this parameter - /// does not update the subscription and returns an error instead. This was the default - /// behavior for API versions prior to 2019-03-14. See the changelog to learn more. + /// Controls how Stripe handles payment when a subscription update requires payment and + /// collection_method=charge_automatically. /// One of: allow_incomplete, default_incomplete, error_if_incomplete, /// or pending_if_incomplete. /// diff --git a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationCreateOptions.cs b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationCreateOptions.cs index 70c30d5631..03964ac495 100644 --- a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationCreateOptions.cs +++ b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationCreateOptions.cs @@ -120,6 +120,13 @@ public ConfigurationTippingOptions Tipping } } + /// + /// An object containing device type specific settings for Verifone M425 readers. + /// + [JsonProperty("verifone_m425")] + [STJS.JsonPropertyName("verifone_m425")] + public ConfigurationVerifoneM425Options VerifoneM425 { get; set; } + /// /// An object containing device type specific settings for Verifone P400 readers. /// @@ -127,6 +134,27 @@ public ConfigurationTippingOptions Tipping [STJS.JsonPropertyName("verifone_p400")] public ConfigurationVerifoneP400Options VerifoneP400 { get; set; } + /// + /// An object containing device type specific settings for Verifone P630 readers. + /// + [JsonProperty("verifone_p630")] + [STJS.JsonPropertyName("verifone_p630")] + public ConfigurationVerifoneP630Options VerifoneP630 { get; set; } + + /// + /// An object containing device type specific settings for Verifone UX700 readers. + /// + [JsonProperty("verifone_ux700")] + [STJS.JsonPropertyName("verifone_ux700")] + public ConfigurationVerifoneUx700Options VerifoneUx700 { get; set; } + + /// + /// An object containing device type specific settings for Verifone V660p readers. + /// + [JsonProperty("verifone_v660p")] + [STJS.JsonPropertyName("verifone_v660p")] + public ConfigurationVerifoneV660pOptions VerifoneV660p { get; set; } + /// /// Configurations for connecting to a WiFi network. /// diff --git a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationUpdateOptions.cs b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationUpdateOptions.cs index d987da29a3..5aa1ac5ccb 100644 --- a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationUpdateOptions.cs +++ b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationUpdateOptions.cs @@ -17,7 +17,11 @@ public class ConfigurationUpdateOptions : BaseOptions private ConfigurationStripeS700Options stripeS700; private ConfigurationStripeS710Options stripeS710; private ConfigurationTippingOptions tipping; + private ConfigurationVerifoneM425Options verifoneM425; private ConfigurationVerifoneP400Options verifoneP400; + private ConfigurationVerifoneP630Options verifoneP630; + private ConfigurationVerifoneUx700Options verifoneUx700; + private ConfigurationVerifoneV660pOptions verifoneV660p; private ConfigurationWifiOptions wifi; /// @@ -171,6 +175,22 @@ public ConfigurationTippingOptions Tipping } } + /// + /// An object containing device type specific settings for Verifone M425 readers. + /// + [JsonProperty("verifone_m425", NullValueHandling = NullValueHandling.Ignore)] + [STJS.JsonPropertyName("verifone_m425")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] + public ConfigurationVerifoneM425Options VerifoneM425 + { + get => this.verifoneM425; + set + { + this.verifoneM425 = value; + this.SetTracker.Track(); + } + } + /// /// An object containing device type specific settings for Verifone P400 readers. /// @@ -187,6 +207,54 @@ public ConfigurationVerifoneP400Options VerifoneP400 } } + /// + /// An object containing device type specific settings for Verifone P630 readers. + /// + [JsonProperty("verifone_p630", NullValueHandling = NullValueHandling.Ignore)] + [STJS.JsonPropertyName("verifone_p630")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] + public ConfigurationVerifoneP630Options VerifoneP630 + { + get => this.verifoneP630; + set + { + this.verifoneP630 = value; + this.SetTracker.Track(); + } + } + + /// + /// An object containing device type specific settings for Verifone UX700 readers. + /// + [JsonProperty("verifone_ux700", NullValueHandling = NullValueHandling.Ignore)] + [STJS.JsonPropertyName("verifone_ux700")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] + public ConfigurationVerifoneUx700Options VerifoneUx700 + { + get => this.verifoneUx700; + set + { + this.verifoneUx700 = value; + this.SetTracker.Track(); + } + } + + /// + /// An object containing device type specific settings for Verifone V660p readers. + /// + [JsonProperty("verifone_v660p", NullValueHandling = NullValueHandling.Ignore)] + [STJS.JsonPropertyName("verifone_v660p")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] + public ConfigurationVerifoneV660pOptions VerifoneV660p + { + get => this.verifoneV660p; + set + { + this.verifoneV660p = value; + this.SetTracker.Track(); + } + } + /// /// Configurations for connecting to a WiFi network. /// diff --git a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationVerifoneM425Options.cs b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationVerifoneM425Options.cs new file mode 100644 index 0000000000..39acaf73e6 --- /dev/null +++ b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationVerifoneM425Options.cs @@ -0,0 +1,38 @@ +// File generated from our OpenAPI spec +namespace Stripe.Terminal +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class ConfigurationVerifoneM425Options : INestedOptions, IHasSetTracking + { + private string splashscreen; + + [JsonIgnore] + [STJS.JsonIgnore] + internal SetTracker SetTracker { get; } = new SetTracker(); + + /// + /// A File ID representing an image you want to display on the reader. + /// + [JsonProperty("splashscreen", NullValueHandling = NullValueHandling.Ignore)] + [STJS.JsonPropertyName("splashscreen")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] + public string Splashscreen + { + get => this.splashscreen; + set + { + this.splashscreen = value; + this.SetTracker.Track(); + } + } + + bool IHasSetTracking.IsPropertySet(string propertyName) + { + return this.SetTracker.IsSet(propertyName); + } + } +} diff --git a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationVerifoneP630Options.cs b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationVerifoneP630Options.cs new file mode 100644 index 0000000000..72635d830d --- /dev/null +++ b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationVerifoneP630Options.cs @@ -0,0 +1,38 @@ +// File generated from our OpenAPI spec +namespace Stripe.Terminal +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class ConfigurationVerifoneP630Options : INestedOptions, IHasSetTracking + { + private string splashscreen; + + [JsonIgnore] + [STJS.JsonIgnore] + internal SetTracker SetTracker { get; } = new SetTracker(); + + /// + /// A File ID representing an image you want to display on the reader. + /// + [JsonProperty("splashscreen", NullValueHandling = NullValueHandling.Ignore)] + [STJS.JsonPropertyName("splashscreen")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] + public string Splashscreen + { + get => this.splashscreen; + set + { + this.splashscreen = value; + this.SetTracker.Track(); + } + } + + bool IHasSetTracking.IsPropertySet(string propertyName) + { + return this.SetTracker.IsSet(propertyName); + } + } +} diff --git a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationVerifoneUx700Options.cs b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationVerifoneUx700Options.cs new file mode 100644 index 0000000000..e4b0cf7cce --- /dev/null +++ b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationVerifoneUx700Options.cs @@ -0,0 +1,38 @@ +// File generated from our OpenAPI spec +namespace Stripe.Terminal +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class ConfigurationVerifoneUx700Options : INestedOptions, IHasSetTracking + { + private string splashscreen; + + [JsonIgnore] + [STJS.JsonIgnore] + internal SetTracker SetTracker { get; } = new SetTracker(); + + /// + /// A File ID representing an image you want to display on the reader. + /// + [JsonProperty("splashscreen", NullValueHandling = NullValueHandling.Ignore)] + [STJS.JsonPropertyName("splashscreen")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] + public string Splashscreen + { + get => this.splashscreen; + set + { + this.splashscreen = value; + this.SetTracker.Track(); + } + } + + bool IHasSetTracking.IsPropertySet(string propertyName) + { + return this.SetTracker.IsSet(propertyName); + } + } +} diff --git a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationVerifoneV660pOptions.cs b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationVerifoneV660pOptions.cs new file mode 100644 index 0000000000..845526e8d0 --- /dev/null +++ b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationVerifoneV660pOptions.cs @@ -0,0 +1,38 @@ +// File generated from our OpenAPI spec +namespace Stripe.Terminal +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class ConfigurationVerifoneV660pOptions : INestedOptions, IHasSetTracking + { + private string splashscreen; + + [JsonIgnore] + [STJS.JsonIgnore] + internal SetTracker SetTracker { get; } = new SetTracker(); + + /// + /// A File ID representing an image you want to display on the reader. + /// + [JsonProperty("splashscreen", NullValueHandling = NullValueHandling.Ignore)] + [STJS.JsonPropertyName("splashscreen")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] + public string Splashscreen + { + get => this.splashscreen; + set + { + this.splashscreen = value; + this.SetTracker.Track(); + } + } + + bool IHasSetTracking.IsPropertySet(string propertyName) + { + return this.SetTracker.IsSet(propertyName); + } + } +} diff --git a/src/Stripe.net/Services/Terminal/Readers/ReaderListOptions.cs b/src/Stripe.net/Services/Terminal/Readers/ReaderListOptions.cs index ddf49c9f6f..3fd86ec235 100644 --- a/src/Stripe.net/Services/Terminal/Readers/ReaderListOptions.cs +++ b/src/Stripe.net/Services/Terminal/Readers/ReaderListOptions.cs @@ -12,8 +12,11 @@ public class ReaderListOptions : ListOptions /// Filters readers by device type. /// One of: bbpos_chipper2x, bbpos_wisepad3, bbpos_wisepos_e, /// mobile_phone_reader, simulated_stripe_s700, simulated_stripe_s710, - /// simulated_wisepos_e, stripe_m2, stripe_s700, stripe_s710, or - /// verifone_P400. + /// simulated_verifone_m425, simulated_verifone_p630, + /// simulated_verifone_ux700, simulated_verifone_v660p, + /// simulated_wisepos_e, stripe_m2, stripe_s700, stripe_s710, + /// verifone_P400, verifone_m425, verifone_p630, verifone_ux700, + /// or verifone_v660p. /// [JsonProperty("device_type")] [STJS.JsonPropertyName("device_type")] diff --git a/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataBizumOptions.cs b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataBizumOptions.cs new file mode 100644 index 0000000000..b1d9c85334 --- /dev/null +++ b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataBizumOptions.cs @@ -0,0 +1,12 @@ +// File generated from our OpenAPI spec +namespace Stripe.TestHelpers +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class ConfirmationTokenPaymentMethodDataBizumOptions : INestedOptions + { + } +} diff --git a/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataOptions.cs b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataOptions.cs index e4ecab47f9..87949971ab 100644 --- a/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataOptions.cs @@ -108,6 +108,14 @@ public class ConfirmationTokenPaymentMethodDataOptions : INestedOptions, IHasMet [STJS.JsonPropertyName("billing_details")] public ConfirmationTokenPaymentMethodDataBillingDetailsOptions BillingDetails { get; set; } + /// + /// If this is a bizum PaymentMethod, this hash contains details about the Bizum + /// payment method. + /// + [JsonProperty("bizum")] + [STJS.JsonPropertyName("bizum")] + public ConfirmationTokenPaymentMethodDataBizumOptions Bizum { get; set; } + /// /// If this is a blik PaymentMethod, this hash contains details about the BLIK /// payment method. @@ -246,7 +254,7 @@ public class ConfirmationTokenPaymentMethodDataOptions : INestedOptions, IHasMet /// /// If this is an Link PaymentMethod, this hash contains details about the Link - /// payment method. + /// payment method (Link is also known as Onelink in the UK). /// [JsonProperty("link")] [STJS.JsonPropertyName("link")] @@ -431,6 +439,14 @@ public class ConfirmationTokenPaymentMethodDataOptions : INestedOptions, IHasMet [STJS.JsonPropertyName("satispay")] public ConfirmationTokenPaymentMethodDataSatispayOptions Satispay { get; set; } + /// + /// If this is a Scalapay PaymentMethod, this hash contains details about the Scalapay + /// payment method. + /// + [JsonProperty("scalapay")] + [STJS.JsonPropertyName("scalapay")] + public ConfirmationTokenPaymentMethodDataScalapayOptions Scalapay { get; set; } + /// /// If this is a sepa_debit PaymentMethod, this hash contains details about the SEPA /// debit bank account. @@ -499,16 +515,17 @@ public class ConfirmationTokenPaymentMethodDataOptions : INestedOptions, IHasMet /// PaymentMethod type. /// One of: acss_debit, affirm, afterpay_clearpay, alipay, /// alma, amazon_pay, au_becs_debit, bacs_debit, - /// bancontact, billie, blik, boleto, cashapp, - /// crypto, customer_balance, eps, fpx, giropay, - /// gopay, grabpay, id_bank_transfer, ideal, kakao_pay, - /// klarna, konbini, kr_card, link, mb_way, - /// mobilepay, multibanco, naver_pay, nz_bank_account, - /// oxxo, p24, pay_by_bank, payco, paynow, paypal, - /// paypay, payto, pix, promptpay, qris, rechnung, - /// revolut_pay, samsung_pay, satispay, sepa_debit, - /// shopeepay, sofort, stripe_balance, sunbit, swish, - /// twint, upi, us_bank_account, wechat_pay, or zip. + /// bancontact, billie, bizum, blik, boleto, + /// cashapp, crypto, customer_balance, eps, fpx, + /// giropay, gopay, grabpay, id_bank_transfer, ideal, + /// kakao_pay, klarna, konbini, kr_card, link, + /// mb_way, mobilepay, multibanco, naver_pay, + /// nz_bank_account, oxxo, p24, pay_by_bank, payco, + /// paynow, paypal, paypay, payto, pix, promptpay, + /// qris, rechnung, revolut_pay, samsung_pay, satispay, + /// scalapay, sepa_debit, shopeepay, sofort, + /// stripe_balance, sunbit, swish, twint, upi, + /// us_bank_account, wechat_pay, or zip. /// [JsonProperty("type")] [STJS.JsonPropertyName("type")] diff --git a/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataScalapayOptions.cs b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataScalapayOptions.cs new file mode 100644 index 0000000000..9017e8863d --- /dev/null +++ b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataScalapayOptions.cs @@ -0,0 +1,12 @@ +// File generated from our OpenAPI spec +namespace Stripe.TestHelpers +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class ConfirmationTokenPaymentMethodDataScalapayOptions : INestedOptions + { + } +} diff --git a/src/Stripe.net/Services/TestHelpers/TestClocks/TestClockCreateOptions.cs b/src/Stripe.net/Services/TestHelpers/TestClocks/TestClockCreateOptions.cs index fb4c40d886..84ca3cf2c3 100644 --- a/src/Stripe.net/Services/TestHelpers/TestClocks/TestClockCreateOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/TestClocks/TestClockCreateOptions.cs @@ -9,6 +9,14 @@ namespace Stripe.TestHelpers [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class TestClockCreateOptions : BaseOptions { + /// + /// Existing customer this test clock will be attached to. Once attached, customers can't be + /// removed from a test clock. + /// + [JsonProperty("customer")] + [STJS.JsonPropertyName("customer")] + public string Customer { get; set; } + /// /// The initial frozen time for this test clock. /// diff --git a/src/Stripe.net/Services/V2/Core/BatchJobs/BatchJobCreateEndpointOptions.cs b/src/Stripe.net/Services/V2/Core/BatchJobs/BatchJobCreateEndpointOptions.cs index 7863f5abd3..e89e8f3af0 100644 --- a/src/Stripe.net/Services/V2/Core/BatchJobs/BatchJobCreateEndpointOptions.cs +++ b/src/Stripe.net/Services/V2/Core/BatchJobs/BatchJobCreateEndpointOptions.cs @@ -20,14 +20,12 @@ public class BatchJobCreateEndpointOptions : INestedOptions /// The path of the endpoint to run this batch job against. In the form used in the /// documentation. For instance, for subscription migration this would be /// /v1/subscriptions/:id/migrate. - /// One of: /v1/accounts/:account, /v1/credit_notes, - /// /v1/customers/:customer, /v1/invoices/:invoice, - /// /v1/invoices/:invoice/pay, /v1/promotion_codes, + /// One of: /v1/accounts/:account, /v1/coupons, + /// /v1/customers/:customer, /v1/promotion_codes, /// /v1/promotion_codes/:promotion_code, /// /v1/subscriptions/:subscription_exposed_id, - /// /v1/subscriptions/:subscription/migrate, /v1/subscription_schedules, - /// /v1/subscription_schedules/:schedule, or - /// /v1/subscription_schedules/:schedule/cancel. + /// /v1/subscriptions/:subscription_exposed_id, or + /// /v1/subscriptions/:subscription/migrate. /// [JsonProperty("path")] [STJS.JsonPropertyName("path")] diff --git a/src/Stripe.net/Services/V2/Core/BatchJobs/BatchJobEndpointPath.cs b/src/Stripe.net/Services/V2/Core/BatchJobs/BatchJobEndpointPath.cs index c7a4f51635..e519af7790 100644 --- a/src/Stripe.net/Services/V2/Core/BatchJobs/BatchJobEndpointPath.cs +++ b/src/Stripe.net/Services/V2/Core/BatchJobs/BatchJobEndpointPath.cs @@ -7,17 +7,13 @@ namespace Stripe public class BatchJobEndpointPath : StringEnum { public static readonly BatchJobEndpointPath V1AccountUpdate = new BatchJobEndpointPath("/v1/accounts/:account"); - public static readonly BatchJobEndpointPath V1CreditNoteCreate = new BatchJobEndpointPath("/v1/credit_notes"); + public static readonly BatchJobEndpointPath V1CouponCreate = new BatchJobEndpointPath("/v1/coupons"); public static readonly BatchJobEndpointPath V1CustomerUpdate = new BatchJobEndpointPath("/v1/customers/:customer"); - public static readonly BatchJobEndpointPath V1InvoiceUpdate = new BatchJobEndpointPath("/v1/invoices/:invoice"); - public static readonly BatchJobEndpointPath V1InvoicePay = new BatchJobEndpointPath("/v1/invoices/:invoice/pay"); public static readonly BatchJobEndpointPath V1PromotionCodeCreate = new BatchJobEndpointPath("/v1/promotion_codes"); public static readonly BatchJobEndpointPath V1PromotionCodeUpdate = new BatchJobEndpointPath("/v1/promotion_codes/:promotion_code"); public static readonly BatchJobEndpointPath V1SubscriptionUpdate = new BatchJobEndpointPath("/v1/subscriptions/:subscription_exposed_id"); + public static readonly BatchJobEndpointPath V1SubscriptionCancel = new BatchJobEndpointPath("/v1/subscriptions/:subscription_exposed_id"); public static readonly BatchJobEndpointPath V1SubscriptionMigrate = new BatchJobEndpointPath("/v1/subscriptions/:subscription/migrate"); - public static readonly BatchJobEndpointPath V1SubscriptionScheduleCreate = new BatchJobEndpointPath("/v1/subscription_schedules"); - public static readonly BatchJobEndpointPath V1SubscriptionScheduleUpdate = new BatchJobEndpointPath("/v1/subscription_schedules/:schedule"); - public static readonly BatchJobEndpointPath V1SubscriptionScheduleCancel = new BatchJobEndpointPath("/v1/subscription_schedules/:schedule/cancel"); private BatchJobEndpointPath(string value) : base(value) diff --git a/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointCreateOptions.cs b/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointCreateOptions.cs index 7e6fa3fa83..749f5e0b08 100644 --- a/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointCreateOptions.cs +++ b/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointCreateOptions.cs @@ -47,7 +47,7 @@ public class WebhookEndpointCreateOptions : BaseOptions, IHasMetadata /// 2025-06-30.basil, 2025-07-30.basil, 2025-08-27.basil, /// 2025-09-30.clover, 2025-10-29.clover, 2025-11-17.clover, /// 2025-12-15.clover, 2026-01-28.clover, 2026-02-25.clover, - /// 2026-03-25.dahlia, or 2026-04-22.dahlia. + /// 2026-03-25.dahlia, 2026-04-22.dahlia, or 2026-05-27.dahlia. /// [JsonProperty("api_version")] [STJS.JsonPropertyName("api_version")] diff --git a/src/StripeTests/Services/GeneratedExamplesTest.cs b/src/StripeTests/Services/GeneratedExamplesTest.cs index 7f2ff83f47..9fa4c49ea2 100644 --- a/src/StripeTests/Services/GeneratedExamplesTest.cs +++ b/src/StripeTests/Services/GeneratedExamplesTest.cs @@ -7031,7 +7031,7 @@ public void TestV2CoreBatchJobPost() Endpoint = new Stripe.V2.Core.BatchJobCreateEndpointOptions { HttpMethod = "delete", - Path = BatchJobEndpointPath.V1SubscriptionScheduleCreate, + Path = BatchJobEndpointPath.V1SubscriptionUpdate, }, Metadata = new Dictionary { From 1ad2cd2a153d3a4d4bb04e21db9bee4140e9576c Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 26 May 2026 17:10:27 +0000 Subject: [PATCH 4/4] Update generated code for v2277 and d59a1f4bdea3032b8e282d40badc032cb021fc60 --- CODEGEN_VERSION | 2 +- OPENAPI_VERSION | 2 +- .../ProductCatalogImport.cs | 4 +- .../V2/Core/AccountTokens/AccountToken.cs | 4 +- .../Entities/V2/Core/Accounts/Account.cs | 14 ++--- .../V2/Core/Accounts/AccountConfiguration.cs | 3 +- .../AccountConfigurationCustomerBilling.cs | 4 +- ...tionRecipientDefaultOutboundDestination.cs | 59 +++++++++++-------- .../V2/Core/Accounts/AccountIdentity.cs | 4 +- ...nessDetailsDocumentsProofOfRegistration.cs | 7 +++ ...tailsDocumentsProofOfRegistrationSigner.cs | 18 ++++++ ...mentsProofOfUltimateBeneficialOwnership.cs | 7 +++ ...roofOfUltimateBeneficialOwnershipSigner.cs | 18 ++++++ .../Accounts/AccountIdentityIndividual.cs | 4 +- ...ReceivedCreditBankTransferGbBankAccount.cs | 1 + .../BusinessProfiles/BusinessProfile.cs | 7 ++- ...IdentityBusinessDetailsDocumentsOptions.cs | 3 +- ...ailsDocumentsProofOfRegistrationOptions.cs | 7 +++ ...cumentsProofOfRegistrationSignerOptions.cs | 18 ++++++ ...oofOfUltimateBeneficialOwnershipOptions.cs | 7 +++ ...ltimateBeneficialOwnershipSignerOptions.cs | 18 ++++++ ...untTokenCreateIdentityIndividualOptions.cs | 4 +- .../AccountTokenCreateOptions.cs | 3 +- .../Core/AccountTokens/AccountTokenService.cs | 12 +++- .../AccountCreateConfigurationOptions.cs | 3 +- ...ailsDocumentsProofOfRegistrationOptions.cs | 7 +++ ...cumentsProofOfRegistrationSignerOptions.cs | 18 ++++++ ...oofOfUltimateBeneficialOwnershipOptions.cs | 7 +++ ...ltimateBeneficialOwnershipSignerOptions.cs | 18 ++++++ .../AccountCreateIdentityIndividualOptions.cs | 4 +- .../Accounts/AccountCreateIdentityOptions.cs | 4 +- .../V2/Core/Accounts/AccountCreateOptions.cs | 3 +- .../V2/Core/Accounts/AccountService.cs | 8 +-- ...dateConfigurationCustomerBillingOptions.cs | 4 +- ...IdentityBusinessDetailsDocumentsOptions.cs | 3 +- ...ailsDocumentsProofOfRegistrationOptions.cs | 7 +++ ...cumentsProofOfRegistrationSignerOptions.cs | 18 ++++++ ...oofOfUltimateBeneficialOwnershipOptions.cs | 7 +++ ...ltimateBeneficialOwnershipSignerOptions.cs | 18 ++++++ .../AccountUpdateIdentityIndividualOptions.cs | 4 +- .../Accounts/AccountUpdateIdentityOptions.cs | 4 +- .../V2/Core/Accounts/AccountUpdateOptions.cs | 3 +- .../Services/V2/Core/Events/EventService.cs | 8 ++- .../Iam/ActivityLogs/ActivityLogGetOptions.cs | 12 ++++ .../V2/Iam/ActivityLogs/ActivityLogService.cs | 17 ++++++ .../OutboundSetupIntentUpdateOptions.cs | 3 +- .../BusinessProfileService.cs | 10 ++-- .../FinancialAddressCreditOptions.cs | 2 +- .../Services/GeneratedExamplesTest.cs | 16 ++++- 49 files changed, 356 insertions(+), 82 deletions(-) create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityBusinessDetailsDocumentsProofOfRegistrationSigner.cs create mode 100644 src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnershipSigner.cs create mode 100644 src/Stripe.net/Services/V2/Core/AccountTokens/AccountTokenCreateIdentityBusinessDetailsDocumentsProofOfRegistrationSignerOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/AccountTokens/AccountTokenCreateIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnershipSignerOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateIdentityBusinessDetailsDocumentsProofOfRegistrationSignerOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountCreateIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnershipSignerOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityBusinessDetailsDocumentsProofOfRegistrationSignerOptions.cs create mode 100644 src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnershipSignerOptions.cs create mode 100644 src/Stripe.net/Services/V2/Iam/ActivityLogs/ActivityLogGetOptions.cs diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index 87e13fd3cf..6fae6735a5 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -9e9ef9ec9df30a59ccafb74c27b81311fa2896d5 \ No newline at end of file +d59a1f4bdea3032b8e282d40badc032cb021fc60 \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index c200ff51d3..30723023b8 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2276 \ No newline at end of file +v2277 \ No newline at end of file diff --git a/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImport.cs b/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImport.cs index 035682c53a..aece3c8896 100644 --- a/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImport.cs +++ b/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImport.cs @@ -8,8 +8,8 @@ namespace Stripe.V2.Commerce using STJS = System.Text.Json.Serialization; /// - /// The product catalog import object tracks the long-running background process that - /// handles uploading, processing and validation. + /// The ProductCatalogImport object tracks the long-running background process that handles + /// uploading, processing and validation. /// [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class ProductCatalogImport : StripeEntity, IHasId, IHasMetadata, IHasObject diff --git a/src/Stripe.net/Entities/V2/Core/AccountTokens/AccountToken.cs b/src/Stripe.net/Entities/V2/Core/AccountTokens/AccountToken.cs index 03ccb88801..29d175f234 100644 --- a/src/Stripe.net/Entities/V2/Core/AccountTokens/AccountToken.cs +++ b/src/Stripe.net/Entities/V2/Core/AccountTokens/AccountToken.cs @@ -7,8 +7,8 @@ namespace Stripe.V2.Core using STJS = System.Text.Json.Serialization; /// - /// Account tokens are single-use tokens which tokenize company/individual/business - /// information, and are used for creating or updating an Account. + /// Account tokens are single-use tokens which tokenize an account's contact_email, + /// display_name, contact_phone, and identity. /// [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class AccountToken : StripeEntity, IHasId, IHasObject diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/Account.cs b/src/Stripe.net/Entities/V2/Core/Accounts/Account.cs index 3852516f2f..f0ead51fad 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/Account.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/Account.cs @@ -8,15 +8,12 @@ namespace Stripe.V2.Core using STJS = System.Text.Json.Serialization; /// - /// An Account v2 object represents a company, individual, or other entity that interacts - /// with a platform on Stripe. It contains both identifying information and properties that + /// An Account v2 object represents a company, individual, or other entity that your Stripe + /// integration interacts with. It contains both identifying information and properties that /// control its behavior and functionality. An Account can have one or more configurations /// that enable sets of related features, such as allowing it to act as a merchant or - /// customer. The Accounts v2 API supports both the Global Payouts preview feature and the - /// Connect-Billing integration preview feature. However, a particular Account can only - /// access one of them. The Connect-Billing integration preview feature allows an Account v2 - /// to pay subscription fees to a platform. An Account v1 required a separate Customer - /// object to pay subscription fees. + /// customer. The Accounts v2 API is broadly available to Connect platforms, and to other + /// users in preview. The Accounts v2 API also supports the Global Payouts preview feature. /// [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class Account : StripeEntity, IHasId, IHasMetadata, IHasObject @@ -62,8 +59,7 @@ public class Account : StripeEntity, IHasId, IHasMetadata, IHasObject public AccountConfiguration Configuration { get; set; } /// - /// The default contact email address for the Account. Required when configuring the account - /// as a merchant or recipient. + /// The primary contact email address for the Account. /// [JsonProperty("contact_email")] [STJS.JsonPropertyName("contact_email")] diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfiguration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfiguration.cs index 6b86e3de03..a219f2b4f2 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfiguration.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfiguration.cs @@ -9,7 +9,8 @@ namespace Stripe.V2.Core public class AccountConfiguration : StripeEntity { /// - /// The Customer Configuration allows the Account to be used in inbound payment flows. + /// The Customer Configuration allows the Account to be used in inbound payment flows (i.e. + /// customer-facing payment and billing flows). /// [JsonProperty("customer")] [STJS.JsonPropertyName("customer")] diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCustomerBilling.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCustomerBilling.cs index 12f8d088fa..6ad27961f4 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCustomerBilling.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCustomerBilling.cs @@ -9,8 +9,8 @@ namespace Stripe.V2.Core public class AccountConfigurationCustomerBilling : StripeEntity { /// - /// ID of a PaymentMethod attached to the customer account to use as the default for - /// invoices and subscriptions. + /// The ID of a PaymentMethod attached to this Account's customer + /// configuration, used as the default payment method for invoices and subscriptions. /// [JsonProperty("default_payment_method")] [STJS.JsonPropertyName("default_payment_method")] diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientDefaultOutboundDestination.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientDefaultOutboundDestination.cs index dbdf2024cf..44773b5ee3 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientDefaultOutboundDestination.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientDefaultOutboundDestination.cs @@ -18,40 +18,47 @@ public class AccountConfigurationRecipientDefaultOutboundDestination : StripeEnt /// /// Closed Enum. The payout method type of the default outbound destination. /// One of: ae_bank_account, ag_bank_account, al_bank_account, - /// am_bank_account, ar_bank_account, at_bank_account, - /// au_bank_account, ba_bank_account, be_bank_account, + /// am_bank_account, ao_bank_account, ar_bank_account, + /// at_bank_account, au_bank_account, az_bank_account, + /// ba_bank_account, bd_bank_account, be_bank_account, /// bg_bank_account, bh_bank_account, bj_bank_account, - /// bn_bank_account, bs_bank_account, bt_bank_account, - /// bw_bank_account, card, ca_bank_account, ch_bank_account, - /// ci_bank_account, cn_bank_account, co_bank_account, + /// bn_bank_account, bo_bank_account, br_bank_account, + /// bs_bank_account, bt_bank_account, bw_bank_account, card, + /// ca_bank_account, ch_bank_account, ci_bank_account, + /// cl_bank_account, cn_bank_account, co_bank_account, /// crypto_wallet, cr_bank_account, cy_bank_account, /// cz_bank_account, de_bank_account, dk_bank_account, /// do_bank_account, dz_bank_account, ec_bank_account, /// ee_bank_account, eg_bank_account, es_bank_account, /// et_bank_account, fi_bank_account, fr_bank_account, - /// gb_bank_account, gm_bank_account, gr_bank_account, + /// ga_bank_account, gb_bank_account, gh_bank_account, + /// gi_bank_account, gm_bank_account, gr_bank_account, /// gt_bank_account, gy_bank_account, hk_bank_account, - /// hr_bank_account, hu_bank_account, id_bank_account, - /// ie_bank_account, il_bank_account, in_bank_account, - /// is_bank_account, it_bank_account, jm_bank_account, - /// jo_bank_account, jp_bank_account, ke_bank_account, - /// kh_bank_account, kw_bank_account, lc_bank_account, - /// li_bank_account, lk_bank_account, lt_bank_account, - /// lu_bank_account, lv_bank_account, ma_bank_account, - /// mc_bank_account, md_bank_account, mg_bank_account, - /// mk_bank_account, mn_bank_account, mo_bank_account, - /// mt_bank_account, mu_bank_account, mx_bank_account, - /// my_bank_account, mz_bank_account, na_bank_account, - /// nl_bank_account, no_bank_account, nz_bank_account, - /// om_bank_account, pa_bank_account, pe_bank_account, - /// ph_bank_account, pk_bank_account, pl_bank_account, - /// pt_bank_account, qa_bank_account, ro_bank_account, - /// rs_bank_account, rw_bank_account, se_bank_account, + /// hn_bank_account, hr_bank_account, hu_bank_account, + /// id_bank_account, ie_bank_account, il_bank_account, + /// in_bank_account, is_bank_account, it_bank_account, + /// jm_bank_account, jo_bank_account, jp_bank_account, + /// ke_bank_account, kh_bank_account, kr_bank_account, + /// kw_bank_account, kz_bank_account, la_bank_account, + /// lc_bank_account, li_bank_account, lk_bank_account, + /// lt_bank_account, lu_bank_account, lv_bank_account, + /// ma_bank_account, mc_bank_account, md_bank_account, + /// mg_bank_account, mk_bank_account, mn_bank_account, + /// mo_bank_account, mt_bank_account, mu_bank_account, + /// mx_bank_account, my_bank_account, mz_bank_account, + /// na_bank_account, ne_bank_account, ng_bank_account, + /// ni_bank_account, nl_bank_account, no_bank_account, + /// nz_bank_account, om_bank_account, pa_bank_account, + /// pe_bank_account, ph_bank_account, pk_bank_account, + /// pl_bank_account, pt_bank_account, py_bank_account, + /// qa_bank_account, ro_bank_account, rs_bank_account, + /// rw_bank_account, sa_bank_account, se_bank_account, /// sg_bank_account, si_bank_account, sk_bank_account, - /// sn_bank_account, sv_bank_account, th_bank_account, - /// tn_bank_account, tr_bank_account, tt_bank_account, - /// tw_bank_account, tz_bank_account, us_bank_account, - /// uz_bank_account, vn_bank_account, or za_bank_account. + /// sm_bank_account, sn_bank_account, sv_bank_account, + /// th_bank_account, tn_bank_account, tr_bank_account, + /// tt_bank_account, tw_bank_account, tz_bank_account, + /// us_bank_account, uy_bank_account, uz_bank_account, + /// vn_bank_account, or za_bank_account. /// [JsonProperty("type")] [STJS.JsonPropertyName("type")] diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentity.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentity.cs index 2898a07c67..00664d89d1 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentity.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentity.cs @@ -34,7 +34,9 @@ public class AccountIdentity : StripeEntity public string Country { get; set; } /// - /// The entity type. + /// The entity type represented by the Account. Ensure this field is accurate before adding + /// configurations that rely on identity information, as it determines which identity fields + /// apply and how the Account is validated. /// One of: company, government_entity, individual, or /// non_profit. /// diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityBusinessDetailsDocumentsProofOfRegistration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityBusinessDetailsDocumentsProofOfRegistration.cs index 79a202048a..0f2703db1f 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityBusinessDetailsDocumentsProofOfRegistration.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityBusinessDetailsDocumentsProofOfRegistration.cs @@ -18,6 +18,13 @@ public class AccountIdentityBusinessDetailsDocumentsProofOfRegistration : Stripe [STJS.JsonPropertyName("files")] public List Files { get; set; } + /// + /// Person that is signing the document. + /// + [JsonProperty("signer")] + [STJS.JsonPropertyName("signer")] + public AccountIdentityBusinessDetailsDocumentsProofOfRegistrationSigner Signer { get; set; } + /// /// The format of the document. Currently supports files only. /// diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityBusinessDetailsDocumentsProofOfRegistrationSigner.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityBusinessDetailsDocumentsProofOfRegistrationSigner.cs new file mode 100644 index 0000000000..493c6ce669 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityBusinessDetailsDocumentsProofOfRegistrationSigner.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountIdentityBusinessDetailsDocumentsProofOfRegistrationSigner : StripeEntity + { + /// + /// Person signing the document. + /// + [JsonProperty("person")] + [STJS.JsonPropertyName("person")] + public string Person { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnership.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnership.cs index 4360411f03..0a56d2f55c 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnership.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnership.cs @@ -18,6 +18,13 @@ public class AccountIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwn [STJS.JsonPropertyName("files")] public List Files { get; set; } + /// + /// Person that is signing the document. + /// + [JsonProperty("signer")] + [STJS.JsonPropertyName("signer")] + public AccountIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnershipSigner Signer { get; set; } + /// /// The format of the document. Currently supports files only. /// diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnershipSigner.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnershipSigner.cs new file mode 100644 index 0000000000..b45babb0dd --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnershipSigner.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AccountIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnershipSigner : StripeEntity + { + /// + /// Person signing the document. + /// + [JsonProperty("person")] + [STJS.JsonPropertyName("person")] + public string Person { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityIndividual.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityIndividual.cs index f478210ff8..744c6fa881 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityIndividual.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityIndividual.cs @@ -68,7 +68,9 @@ public class AccountIdentityIndividual : StripeEntity public AccountIdentityIndividualDocuments Documents { get; set; } /// - /// The individual's email address. + /// The individual's email address. You can only set this field when the Account is + /// configured as a merchant or recipient. Use contact_email as the + /// primary contact email for this Account. /// [JsonProperty("email")] [STJS.JsonPropertyName("email")] diff --git a/src/Stripe.net/Entities/V2/MoneyManagement/ReceivedCredits/ReceivedCreditBankTransferGbBankAccount.cs b/src/Stripe.net/Entities/V2/MoneyManagement/ReceivedCredits/ReceivedCreditBankTransferGbBankAccount.cs index 41a0969587..a3949867dc 100644 --- a/src/Stripe.net/Entities/V2/MoneyManagement/ReceivedCredits/ReceivedCreditBankTransferGbBankAccount.cs +++ b/src/Stripe.net/Entities/V2/MoneyManagement/ReceivedCredits/ReceivedCreditBankTransferGbBankAccount.cs @@ -31,6 +31,7 @@ public class ReceivedCreditBankTransferGbBankAccount : StripeEntity /// Open Enum. The money transmission network used to send funds for this ReceivedCredit. + /// One of: chaps, or fps. ///
[JsonProperty("network")] [STJS.JsonPropertyName("network")] diff --git a/src/Stripe.net/Entities/V2/Network/BusinessProfiles/BusinessProfile.cs b/src/Stripe.net/Entities/V2/Network/BusinessProfiles/BusinessProfile.cs index 17a1bf6d20..bf8cd08a34 100644 --- a/src/Stripe.net/Entities/V2/Network/BusinessProfiles/BusinessProfile.cs +++ b/src/Stripe.net/Entities/V2/Network/BusinessProfiles/BusinessProfile.cs @@ -6,7 +6,8 @@ namespace Stripe.V2.Network using STJS = System.Text.Json.Serialization; /// - /// The Stripe profile represents a business' public identity on the Stripe network. + /// The Stripe business profile represents a business' public identity on the Stripe + /// network. /// [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class BusinessProfile : StripeEntity, IHasId, IHasObject @@ -42,7 +43,7 @@ public class BusinessProfile : StripeEntity, IHasId, IHasObject public string Description { get; set; } /// - /// The display name of the Stripe profile. + /// The display name of the Stripe business profile. /// [JsonProperty("display_name")] [STJS.JsonPropertyName("display_name")] @@ -64,7 +65,7 @@ public class BusinessProfile : StripeEntity, IHasId, IHasObject public string Url { get; set; } /// - /// The username of the Stripe profile. + /// The username of the Stripe business profile. /// [JsonProperty("username")] [STJS.JsonPropertyName("username")] diff --git a/src/Stripe.net/Services/V2/Core/AccountTokens/AccountTokenCreateIdentityBusinessDetailsDocumentsOptions.cs b/src/Stripe.net/Services/V2/Core/AccountTokens/AccountTokenCreateIdentityBusinessDetailsDocumentsOptions.cs index efc31309f7..9b1bf9092d 100644 --- a/src/Stripe.net/Services/V2/Core/AccountTokens/AccountTokenCreateIdentityBusinessDetailsDocumentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/AccountTokens/AccountTokenCreateIdentityBusinessDetailsDocumentsOptions.cs @@ -69,8 +69,7 @@ public class AccountTokenCreateIdentityBusinessDetailsDocumentsOptions : INested public AccountTokenCreateIdentityBusinessDetailsDocumentsProofOfAddressOptions ProofOfAddress { get; set; } /// - /// One or more documents showing the company’s proof of registration with the national - /// business registry. + /// One or more documents that demonstrate proof of ultimate beneficial ownership. /// [JsonProperty("proof_of_registration")] [STJS.JsonPropertyName("proof_of_registration")] diff --git a/src/Stripe.net/Services/V2/Core/AccountTokens/AccountTokenCreateIdentityBusinessDetailsDocumentsProofOfRegistrationOptions.cs b/src/Stripe.net/Services/V2/Core/AccountTokens/AccountTokenCreateIdentityBusinessDetailsDocumentsProofOfRegistrationOptions.cs index c2d07acc98..17eeb7e316 100644 --- a/src/Stripe.net/Services/V2/Core/AccountTokens/AccountTokenCreateIdentityBusinessDetailsDocumentsProofOfRegistrationOptions.cs +++ b/src/Stripe.net/Services/V2/Core/AccountTokens/AccountTokenCreateIdentityBusinessDetailsDocumentsProofOfRegistrationOptions.cs @@ -18,6 +18,13 @@ public class AccountTokenCreateIdentityBusinessDetailsDocumentsProofOfRegistrati [STJS.JsonPropertyName("files")] public List Files { get; set; } + /// + /// Person that is signing the document. + /// + [JsonProperty("signer")] + [STJS.JsonPropertyName("signer")] + public AccountTokenCreateIdentityBusinessDetailsDocumentsProofOfRegistrationSignerOptions Signer { get; set; } + /// /// The format of the document. Currently supports files only. /// diff --git a/src/Stripe.net/Services/V2/Core/AccountTokens/AccountTokenCreateIdentityBusinessDetailsDocumentsProofOfRegistrationSignerOptions.cs b/src/Stripe.net/Services/V2/Core/AccountTokens/AccountTokenCreateIdentityBusinessDetailsDocumentsProofOfRegistrationSignerOptions.cs new file mode 100644 index 0000000000..931e4c961b --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/AccountTokens/AccountTokenCreateIdentityBusinessDetailsDocumentsProofOfRegistrationSignerOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountTokenCreateIdentityBusinessDetailsDocumentsProofOfRegistrationSignerOptions : INestedOptions + { + /// + /// Person signing the document. + /// + [JsonProperty("person")] + [STJS.JsonPropertyName("person")] + public string Person { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/AccountTokens/AccountTokenCreateIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnershipOptions.cs b/src/Stripe.net/Services/V2/Core/AccountTokens/AccountTokenCreateIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnershipOptions.cs index 97a18be910..767dd7b83f 100644 --- a/src/Stripe.net/Services/V2/Core/AccountTokens/AccountTokenCreateIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnershipOptions.cs +++ b/src/Stripe.net/Services/V2/Core/AccountTokens/AccountTokenCreateIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnershipOptions.cs @@ -18,6 +18,13 @@ public class AccountTokenCreateIdentityBusinessDetailsDocumentsProofOfUltimateBe [STJS.JsonPropertyName("files")] public List Files { get; set; } + /// + /// Person that is signing the document. + /// + [JsonProperty("signer")] + [STJS.JsonPropertyName("signer")] + public AccountTokenCreateIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnershipSignerOptions Signer { get; set; } + /// /// The format of the document. Currently supports files only. /// diff --git a/src/Stripe.net/Services/V2/Core/AccountTokens/AccountTokenCreateIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnershipSignerOptions.cs b/src/Stripe.net/Services/V2/Core/AccountTokens/AccountTokenCreateIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnershipSignerOptions.cs new file mode 100644 index 0000000000..86d641199a --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/AccountTokens/AccountTokenCreateIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnershipSignerOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountTokenCreateIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnershipSignerOptions : INestedOptions + { + /// + /// Person signing the document. + /// + [JsonProperty("person")] + [STJS.JsonPropertyName("person")] + public string Person { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/AccountTokens/AccountTokenCreateIdentityIndividualOptions.cs b/src/Stripe.net/Services/V2/Core/AccountTokens/AccountTokenCreateIdentityIndividualOptions.cs index 187bebccbb..feeaff6ba7 100644 --- a/src/Stripe.net/Services/V2/Core/AccountTokens/AccountTokenCreateIdentityIndividualOptions.cs +++ b/src/Stripe.net/Services/V2/Core/AccountTokens/AccountTokenCreateIdentityIndividualOptions.cs @@ -51,7 +51,9 @@ public class AccountTokenCreateIdentityIndividualOptions : INestedOptions, IHasM public AccountTokenCreateIdentityIndividualDocumentsOptions Documents { get; set; } /// - /// The individual's email address. + /// The individual's email address. You can only set this field when the Account is + /// configured as a merchant or recipient. Use contact_email as the + /// primary contact email for this Account. /// [JsonProperty("email")] [STJS.JsonPropertyName("email")] diff --git a/src/Stripe.net/Services/V2/Core/AccountTokens/AccountTokenCreateOptions.cs b/src/Stripe.net/Services/V2/Core/AccountTokens/AccountTokenCreateOptions.cs index bec4bd446c..20afc3d944 100644 --- a/src/Stripe.net/Services/V2/Core/AccountTokens/AccountTokenCreateOptions.cs +++ b/src/Stripe.net/Services/V2/Core/AccountTokens/AccountTokenCreateOptions.cs @@ -9,8 +9,7 @@ namespace Stripe.V2.Core public class AccountTokenCreateOptions : BaseOptions { /// - /// The default contact email address for the Account. Required when configuring the account - /// as a merchant or recipient. + /// The primary contact email address for the Account. /// [JsonProperty("contact_email")] [STJS.JsonPropertyName("contact_email")] diff --git a/src/Stripe.net/Services/V2/Core/AccountTokens/AccountTokenService.cs b/src/Stripe.net/Services/V2/Core/AccountTokens/AccountTokenService.cs index 2dc70f8735..5170a41a8b 100644 --- a/src/Stripe.net/Services/V2/Core/AccountTokens/AccountTokenService.cs +++ b/src/Stripe.net/Services/V2/Core/AccountTokens/AccountTokenService.cs @@ -20,7 +20,11 @@ internal AccountTokenService(IStripeClient client) } /// - /// Creates an Account Token. + /// Create an account token with a publishable key and pass it to the Accounts v2 API to + /// create or update an account without its data touching your server. Learn more about account tokens. In live mode, + /// you can only create account tokens with your application's publishable key. In test + /// mode, you can create account tokens with your secret key or publishable key. /// public virtual AccountToken Create(AccountTokenCreateOptions options, RequestOptions requestOptions = null) { @@ -28,7 +32,11 @@ public virtual AccountToken Create(AccountTokenCreateOptions options, RequestOpt } /// - /// Creates an Account Token. + /// Create an account token with a publishable key and pass it to the Accounts v2 API to + /// create or update an account without its data touching your server. Learn more about account tokens. In live mode, + /// you can only create account tokens with your application's publishable key. In test + /// mode, you can create account tokens with your secret key or publishable key. /// public virtual Task CreateAsync(AccountTokenCreateOptions options, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) { diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationOptions.cs index be9cfec06b..feb15a2872 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationOptions.cs @@ -9,7 +9,8 @@ namespace Stripe.V2.Core public class AccountCreateConfigurationOptions : INestedOptions { /// - /// The Customer Configuration allows the Account to be used in inbound payment flows. + /// The Customer Configuration allows the Account to be used in inbound payment flows (i.e. + /// customer-facing payment and billing flows). /// [JsonProperty("customer")] [STJS.JsonPropertyName("customer")] diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateIdentityBusinessDetailsDocumentsProofOfRegistrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateIdentityBusinessDetailsDocumentsProofOfRegistrationOptions.cs index b1600d6719..22a3563a1c 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateIdentityBusinessDetailsDocumentsProofOfRegistrationOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateIdentityBusinessDetailsDocumentsProofOfRegistrationOptions.cs @@ -18,6 +18,13 @@ public class AccountCreateIdentityBusinessDetailsDocumentsProofOfRegistrationOpt [STJS.JsonPropertyName("files")] public List Files { get; set; } + /// + /// Person that is signing the document. + /// + [JsonProperty("signer")] + [STJS.JsonPropertyName("signer")] + public AccountCreateIdentityBusinessDetailsDocumentsProofOfRegistrationSignerOptions Signer { get; set; } + /// /// The format of the document. Currently supports files only. /// diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateIdentityBusinessDetailsDocumentsProofOfRegistrationSignerOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateIdentityBusinessDetailsDocumentsProofOfRegistrationSignerOptions.cs new file mode 100644 index 0000000000..2e336d4b0f --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateIdentityBusinessDetailsDocumentsProofOfRegistrationSignerOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateIdentityBusinessDetailsDocumentsProofOfRegistrationSignerOptions : INestedOptions + { + /// + /// Person signing the document. + /// + [JsonProperty("person")] + [STJS.JsonPropertyName("person")] + public string Person { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnershipOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnershipOptions.cs index a765b504e9..1ed6dfa3e1 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnershipOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnershipOptions.cs @@ -18,6 +18,13 @@ public class AccountCreateIdentityBusinessDetailsDocumentsProofOfUltimateBenefic [STJS.JsonPropertyName("files")] public List Files { get; set; } + /// + /// Person that is signing the document. + /// + [JsonProperty("signer")] + [STJS.JsonPropertyName("signer")] + public AccountCreateIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnershipSignerOptions Signer { get; set; } + /// /// The format of the document. Currently supports files only. /// diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnershipSignerOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnershipSignerOptions.cs new file mode 100644 index 0000000000..0dc4e0821e --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnershipSignerOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountCreateIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnershipSignerOptions : INestedOptions + { + /// + /// Person signing the document. + /// + [JsonProperty("person")] + [STJS.JsonPropertyName("person")] + public string Person { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateIdentityIndividualOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateIdentityIndividualOptions.cs index 871557b19a..7bd78f90b5 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateIdentityIndividualOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateIdentityIndividualOptions.cs @@ -45,7 +45,9 @@ public class AccountCreateIdentityIndividualOptions : INestedOptions, IHasMetada public AccountCreateIdentityIndividualDocumentsOptions Documents { get; set; } /// - /// The individual's email address. + /// The individual's email address. You can only set this field when the Account is + /// configured as a merchant or recipient. Use contact_email as the + /// primary contact email for this Account. /// [JsonProperty("email")] [STJS.JsonPropertyName("email")] diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateIdentityOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateIdentityOptions.cs index d05dd931ba..38a3a614bd 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateIdentityOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateIdentityOptions.cs @@ -34,7 +34,9 @@ public class AccountCreateIdentityOptions : INestedOptions public string Country { get; set; } /// - /// The entity type. + /// The entity type represented by the Account. Ensure this field is accurate before adding + /// configurations that rely on identity information, as it determines which identity fields + /// apply and how the Account is validated. /// One of: company, government_entity, individual, or /// non_profit. /// diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateOptions.cs index 910ba2c63c..dd986ce59d 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateOptions.cs @@ -25,8 +25,7 @@ public class AccountCreateOptions : BaseOptions, IHasMetadata public AccountCreateConfigurationOptions Configuration { get; set; } /// - /// The default contact email address for the Account. Required when configuring the account - /// as a merchant or recipient. + /// The primary contact email address for the Account. /// [JsonProperty("contact_email")] [STJS.JsonPropertyName("contact_email")] diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountService.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountService.cs index 3cf237a868..615a9467e2 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountService.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountService.cs @@ -50,8 +50,8 @@ public virtual Task CloseAsync(string id, AccountCloseOptions options = } /// - /// An Account is a representation of a company, individual or other entity that a user - /// interacts with. Accounts contain identifying information about the entity, and + /// Create an Account that represents a company, individual, or other entity that your + /// business interacts with. Accounts contain identifying information about the entity, and /// configurations that store the features an account has access to. An account can be /// configured as any or all of the following configurations: Customer, Merchant and/or /// Recipient. @@ -62,8 +62,8 @@ public virtual Account Create(AccountCreateOptions options, RequestOptions reque } /// - /// An Account is a representation of a company, individual or other entity that a user - /// interacts with. Accounts contain identifying information about the entity, and + /// Create an Account that represents a company, individual, or other entity that your + /// business interacts with. Accounts contain identifying information about the entity, and /// configurations that store the features an account has access to. An account can be /// configured as any or all of the following configurations: Customer, Merchant and/or /// Recipient. diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCustomerBillingOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCustomerBillingOptions.cs index c3383cdacb..45a0292ed8 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCustomerBillingOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCustomerBillingOptions.cs @@ -9,8 +9,8 @@ namespace Stripe.V2.Core public class AccountUpdateConfigurationCustomerBillingOptions : INestedOptions { /// - /// ID of a PaymentMethod attached to the customer account to use as the default for - /// invoices and subscriptions. + /// The ID of a PaymentMethod attached to this Account's customer + /// configuration, used as the default payment method for invoices and subscriptions. /// [JsonProperty("default_payment_method")] [STJS.JsonPropertyName("default_payment_method")] diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityBusinessDetailsDocumentsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityBusinessDetailsDocumentsOptions.cs index f435ae8dbb..e285419030 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityBusinessDetailsDocumentsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityBusinessDetailsDocumentsOptions.cs @@ -69,8 +69,7 @@ public class AccountUpdateIdentityBusinessDetailsDocumentsOptions : INestedOptio public AccountUpdateIdentityBusinessDetailsDocumentsProofOfAddressOptions ProofOfAddress { get; set; } /// - /// One or more documents showing the company’s proof of registration with the national - /// business registry. + /// One or more documents that demonstrate proof of ultimate beneficial ownership. /// [JsonProperty("proof_of_registration")] [STJS.JsonPropertyName("proof_of_registration")] diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityBusinessDetailsDocumentsProofOfRegistrationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityBusinessDetailsDocumentsProofOfRegistrationOptions.cs index f461cd2efe..2244c83c7c 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityBusinessDetailsDocumentsProofOfRegistrationOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityBusinessDetailsDocumentsProofOfRegistrationOptions.cs @@ -18,6 +18,13 @@ public class AccountUpdateIdentityBusinessDetailsDocumentsProofOfRegistrationOpt [STJS.JsonPropertyName("files")] public List Files { get; set; } + /// + /// Person that is signing the document. + /// + [JsonProperty("signer")] + [STJS.JsonPropertyName("signer")] + public AccountUpdateIdentityBusinessDetailsDocumentsProofOfRegistrationSignerOptions Signer { get; set; } + /// /// The format of the document. Currently supports files only. /// diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityBusinessDetailsDocumentsProofOfRegistrationSignerOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityBusinessDetailsDocumentsProofOfRegistrationSignerOptions.cs new file mode 100644 index 0000000000..4e4464ec3f --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityBusinessDetailsDocumentsProofOfRegistrationSignerOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateIdentityBusinessDetailsDocumentsProofOfRegistrationSignerOptions : INestedOptions + { + /// + /// Person signing the document. + /// + [JsonProperty("person")] + [STJS.JsonPropertyName("person")] + public string Person { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnershipOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnershipOptions.cs index 8789fbe654..347a8a723e 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnershipOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnershipOptions.cs @@ -18,6 +18,13 @@ public class AccountUpdateIdentityBusinessDetailsDocumentsProofOfUltimateBenefic [STJS.JsonPropertyName("files")] public List Files { get; set; } + /// + /// Person that is signing the document. + /// + [JsonProperty("signer")] + [STJS.JsonPropertyName("signer")] + public AccountUpdateIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnershipSignerOptions Signer { get; set; } + /// /// The format of the document. Currently supports files only. /// diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnershipSignerOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnershipSignerOptions.cs new file mode 100644 index 0000000000..27193ba8ce --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnershipSignerOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AccountUpdateIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnershipSignerOptions : INestedOptions + { + /// + /// Person signing the document. + /// + [JsonProperty("person")] + [STJS.JsonPropertyName("person")] + public string Person { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityIndividualOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityIndividualOptions.cs index 4e12c248f5..8804794f33 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityIndividualOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityIndividualOptions.cs @@ -51,7 +51,9 @@ public class AccountUpdateIdentityIndividualOptions : INestedOptions, IHasMetada public AccountUpdateIdentityIndividualDocumentsOptions Documents { get; set; } /// - /// The individual's email address. + /// The individual's email address. You can only set this field when the Account is + /// configured as a merchant or recipient. Use contact_email as the + /// primary contact email for this Account. /// [JsonProperty("email")] [STJS.JsonPropertyName("email")] diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityOptions.cs index a83c7c5580..2092a83e2b 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityOptions.cs @@ -34,7 +34,9 @@ public class AccountUpdateIdentityOptions : INestedOptions public string Country { get; set; } /// - /// The entity type. + /// The entity type represented by the Account. Ensure this field is accurate before adding + /// configurations that rely on identity information, as it determines which identity fields + /// apply and how the Account is validated. /// One of: company, government_entity, individual, or /// non_profit. /// diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateOptions.cs index 2a68eb5963..746b4fb455 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateOptions.cs @@ -27,8 +27,7 @@ public class AccountUpdateOptions : BaseOptions, IHasMetadata public AccountUpdateConfigurationOptions Configuration { get; set; } /// - /// The default contact email address for the Account. Required when configuring the account - /// as a merchant or recipient. + /// The primary contact email address for the Account. /// [JsonProperty("contact_email")] [STJS.JsonPropertyName("contact_email")] diff --git a/src/Stripe.net/Services/V2/Core/Events/EventService.cs b/src/Stripe.net/Services/V2/Core/Events/EventService.cs index 2278aec9b4..f75333046e 100644 --- a/src/Stripe.net/Services/V2/Core/Events/EventService.cs +++ b/src/Stripe.net/Services/V2/Core/Events/EventService.cs @@ -21,7 +21,9 @@ internal EventService(IStripeClient client) } /// - /// Retrieves the details of an event. + /// Retrieves the details of an event if it was created in the last 30 days. Supply the + /// unique identifier of the event, which might have been delivered to your event + /// destination. /// public virtual Event Get(string id, EventGetOptions options = null, RequestOptions requestOptions = null) { @@ -29,7 +31,9 @@ public virtual Event Get(string id, EventGetOptions options = null, RequestOptio } /// - /// Retrieves the details of an event. + /// Retrieves the details of an event if it was created in the last 30 days. Supply the + /// unique identifier of the event, which might have been delivered to your event + /// destination. /// public virtual Task GetAsync(string id, EventGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) { diff --git a/src/Stripe.net/Services/V2/Iam/ActivityLogs/ActivityLogGetOptions.cs b/src/Stripe.net/Services/V2/Iam/ActivityLogs/ActivityLogGetOptions.cs new file mode 100644 index 0000000000..5a5c93de02 --- /dev/null +++ b/src/Stripe.net/Services/V2/Iam/ActivityLogs/ActivityLogGetOptions.cs @@ -0,0 +1,12 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Iam +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class ActivityLogGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/V2/Iam/ActivityLogs/ActivityLogService.cs b/src/Stripe.net/Services/V2/Iam/ActivityLogs/ActivityLogService.cs index 98f4fc3779..79b63d3634 100644 --- a/src/Stripe.net/Services/V2/Iam/ActivityLogs/ActivityLogService.cs +++ b/src/Stripe.net/Services/V2/Iam/ActivityLogs/ActivityLogService.cs @@ -3,6 +3,7 @@ namespace Stripe.V2.Iam { using System; using System.Collections.Generic; + using System.Net; using System.Net.Http; using System.Threading; using System.Threading.Tasks; @@ -19,6 +20,22 @@ internal ActivityLogService(IStripeClient client) { } + /// + /// Retrieve an activity log. + /// + public virtual ActivityLog Get(string id, ActivityLogGetOptions options = null, RequestOptions requestOptions = null) + { + return this.Request(BaseAddress.Api, HttpMethod.Get, $"/v2/iam/activity_logs/{WebUtility.UrlEncode(id)}", options, requestOptions); + } + + /// + /// Retrieve an activity log. + /// + public virtual Task GetAsync(string id, ActivityLogGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.RequestAsync(BaseAddress.Api, HttpMethod.Get, $"/v2/iam/activity_logs/{WebUtility.UrlEncode(id)}", options, requestOptions, cancellationToken); + } + /// /// List activity logs of an account. /// diff --git a/src/Stripe.net/Services/V2/MoneyManagement/OutboundSetupIntents/OutboundSetupIntentUpdateOptions.cs b/src/Stripe.net/Services/V2/MoneyManagement/OutboundSetupIntents/OutboundSetupIntentUpdateOptions.cs index 183297c02c..d127dd6758 100644 --- a/src/Stripe.net/Services/V2/MoneyManagement/OutboundSetupIntents/OutboundSetupIntentUpdateOptions.cs +++ b/src/Stripe.net/Services/V2/MoneyManagement/OutboundSetupIntents/OutboundSetupIntentUpdateOptions.cs @@ -18,7 +18,8 @@ public class OutboundSetupIntentUpdateOptions : BaseOptions /// /// If no payout_method provided, used to create the underlying credential that is set up /// for outbound money movement. If a payout_method provided, used to update data on the - /// credential linked to this setup intent. + /// credential linked to this setup intent. Only card expiry (exp_month, exp_year) can be + /// updated in the case where payout_method is provided. /// [JsonProperty("payout_method_data")] [STJS.JsonPropertyName("payout_method_data")] diff --git a/src/Stripe.net/Services/V2/Network/BusinessProfiles/BusinessProfileService.cs b/src/Stripe.net/Services/V2/Network/BusinessProfiles/BusinessProfileService.cs index 6b768b2371..f15c595525 100644 --- a/src/Stripe.net/Services/V2/Network/BusinessProfiles/BusinessProfileService.cs +++ b/src/Stripe.net/Services/V2/Network/BusinessProfiles/BusinessProfileService.cs @@ -20,7 +20,7 @@ internal BusinessProfileService(IStripeClient client) } /// - /// Retrieve a Stripe profile by its Network ID. + /// Retrieve a Stripe business profile by its Network ID. /// public virtual BusinessProfile Get(string id, BusinessProfileGetOptions options = null, RequestOptions requestOptions = null) { @@ -28,7 +28,7 @@ public virtual BusinessProfile Get(string id, BusinessProfileGetOptions options } /// - /// Retrieve a Stripe profile by its Network ID. + /// Retrieve a Stripe business profile by its Network ID. /// public virtual Task GetAsync(string id, BusinessProfileGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) { @@ -36,7 +36,8 @@ public virtual Task GetAsync(string id, BusinessProfileGetOptio } /// - /// Retrieve the Stripe profile associated with the requesting merchant and livemode. + /// Retrieve the Stripe business profile associated with the requesting merchant and + /// livemode. /// public virtual BusinessProfile Me(BusinessProfileMeOptions options = null, RequestOptions requestOptions = null) { @@ -44,7 +45,8 @@ public virtual BusinessProfile Me(BusinessProfileMeOptions options = null, Reque } /// - /// Retrieve the Stripe profile associated with the requesting merchant and livemode. + /// Retrieve the Stripe business profile associated with the requesting merchant and + /// livemode. /// public virtual Task MeAsync(BusinessProfileMeOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) { diff --git a/src/Stripe.net/Services/V2/TestHelpers/FinancialAddresses/FinancialAddressCreditOptions.cs b/src/Stripe.net/Services/V2/TestHelpers/FinancialAddresses/FinancialAddressCreditOptions.cs index 3df59e8a10..a99b783cca 100644 --- a/src/Stripe.net/Services/V2/TestHelpers/FinancialAddresses/FinancialAddressCreditOptions.cs +++ b/src/Stripe.net/Services/V2/TestHelpers/FinancialAddresses/FinancialAddressCreditOptions.cs @@ -18,7 +18,7 @@ public class FinancialAddressCreditOptions : BaseOptions /// /// Open Enum. The network to use in simulating the funds flow. This will be the reflected /// in the resulting ReceivedCredit. - /// One of: ach, fps, rtp, or wire. + /// One of: ach, chaps, fps, rtp, or wire. /// [JsonProperty("network")] [STJS.JsonPropertyName("network")] diff --git a/src/StripeTests/Services/GeneratedExamplesTest.cs b/src/StripeTests/Services/GeneratedExamplesTest.cs index 9fa4c49ea2..5ea3cdf06d 100644 --- a/src/StripeTests/Services/GeneratedExamplesTest.cs +++ b/src/StripeTests/Services/GeneratedExamplesTest.cs @@ -7622,6 +7622,20 @@ public void TestV2IamActivityLogGet() this.AssertRequest(HttpMethod.Get, "/v2/iam/activity_logs"); } + [Fact] + public void TestV2IamActivityLogGet2() + { + this.StubRequest( + HttpMethod.Get, + "/v2/iam/activity_logs/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.iam.activity_log\",\"actor\":{\"type\":\"api_key\"},\"context\":\"context\",\"created\":\"1970-01-12T21:42:34.472Z\",\"details\":{\"type\":\"api_key\"},\"id\":\"obj_123\",\"livemode\":true,\"type\":\"api_key_created\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Iam.ActivityLogs; + Stripe.V2.Iam.ActivityLog activityLog = service.Get("id_123"); + this.AssertRequest(HttpMethod.Get, "/v2/iam/activity_logs/id_123"); + } + [Fact] public void TestV2MoneyManagementAdjustmentGet() { @@ -8525,7 +8539,7 @@ public void TestV2TestHelpersFinancialAddressPost() var options = new Stripe.V2.TestHelpers.FinancialAddressCreditOptions { Amount = new Stripe.V2.Amount { Value = 96, Currency = "USD" }, - Network = "rtp", + Network = "ach", }; var client = new StripeClient(this.Requestor); var service = client.V2.TestHelpers.FinancialAddresses;