From 407ba7b82c917c9d98a81c69454fb71d5da3b4fb Mon Sep 17 00:00:00 2001 From: David Brownman Date: Wed, 27 May 2026 11:51:34 -0700 Subject: [PATCH 01/16] Emit warning when `stripe-notify` header is present in response (#3385) * Warn when stripe-notify header is present * print to stderr instead of Trace --- .../Infrastructure/Public/LiveApiRequestor.cs | 17 +++ .../Public/LiveApiRequestorTest.cs | 132 ++++++++++++++++++ 2 files changed, 149 insertions(+) diff --git a/src/Stripe.net/Infrastructure/Public/LiveApiRequestor.cs b/src/Stripe.net/Infrastructure/Public/LiveApiRequestor.cs index 00ef14a379..4de3063b98 100644 --- a/src/Stripe.net/Infrastructure/Public/LiveApiRequestor.cs +++ b/src/Stripe.net/Infrastructure/Public/LiveApiRequestor.cs @@ -6,6 +6,7 @@ namespace Stripe using System.Linq; using System.Net; using System.Net.Http; + using System.Net.Http.Headers; using System.Text.Json; using System.Threading; using System.Threading.Tasks; @@ -225,6 +226,18 @@ private static StripeException BuildV2StripeException(StripeResponse response) } } + private static void MaybeEmitStripeNotice(HttpResponseHeaders headers) + { + if (headers != null && headers.Contains("Stripe-Notice")) + { + var notice = headers.GetValues("Stripe-Notice").FirstOrDefault(); + if (!string.IsNullOrEmpty(notice)) + { + Console.Error.WriteLine(notice); + } + } + } + // Note: BaseOptions options really means query params here private StripeRequest MakeStripeRequest( BaseAddress baseAddress, @@ -274,6 +287,8 @@ private T ProcessResponse(StripeResponse response, ApiMode apiMode) throw BuildStripeException(response); } + MaybeEmitStripeNotice(response.Headers); + T obj; try { @@ -362,6 +377,8 @@ public override async Task RawRequestAsync( throw BuildStripeException(response); } + MaybeEmitStripeNotice(response.Headers); + return response; } } diff --git a/src/StripeTests/Infrastructure/Public/LiveApiRequestorTest.cs b/src/StripeTests/Infrastructure/Public/LiveApiRequestorTest.cs index 97e4d72963..4a1d881bb0 100644 --- a/src/StripeTests/Infrastructure/Public/LiveApiRequestorTest.cs +++ b/src/StripeTests/Infrastructure/Public/LiveApiRequestorTest.cs @@ -6,6 +6,7 @@ namespace StripeTests using System.Linq; using System.Net; using System.Net.Http; + using System.Net.Http.Headers; using System.Text; using System.Threading; using System.Threading.Tasks; @@ -711,6 +712,137 @@ public async Task StripeAccountHeaderSet() Assert.Equal("acct_2345", lastRequest.StripeHeaders["Stripe-Account"]); } + [Fact] + public async Task RequestAsync_WritesToStderr_WhenStripeNoticeHeaderPresent() + { + var headers = BuildHeaders("Stripe-Notice", "test notice message"); + var response = new StripeResponse(HttpStatusCode.OK, headers, "{\"id\": \"ch_123\"}"); + this.httpClient.Response = response; + + var stderr = new StringWriter(); + Console.SetError(stderr); + try + { + await this.apiRequestor.RequestAsync( + BaseAddress.Api, + HttpMethod.Post, + "/v1/charges", + this.options, + this.requestOptions); + + Assert.Contains("test notice message", stderr.ToString()); + } + finally + { + Console.SetError(new StreamWriter(Console.OpenStandardError()) { AutoFlush = true }); + } + } + + [Fact] + public async Task RequestAsync_NoStderrWrite_WhenStripeNoticeHeaderAbsent() + { + var response = new StripeResponse(HttpStatusCode.OK, null, "{\"id\": \"ch_123\"}"); + this.httpClient.Response = response; + + var stderr = new StringWriter(); + Console.SetError(stderr); + try + { + await this.apiRequestor.RequestAsync( + BaseAddress.Api, + HttpMethod.Post, + "/v1/charges", + this.options, + this.requestOptions); + + Assert.Empty(stderr.ToString()); + } + finally + { + Console.SetError(new StreamWriter(Console.OpenStandardError()) { AutoFlush = true }); + } + } + + [Fact] + public async Task RequestAsync_NoStderrWrite_WhenStripeNoticeHeaderEmpty() + { + var headers = BuildHeaders("Stripe-Notice", string.Empty); + var response = new StripeResponse(HttpStatusCode.OK, headers, "{\"id\": \"ch_123\"}"); + this.httpClient.Response = response; + + var stderr = new StringWriter(); + Console.SetError(stderr); + try + { + await this.apiRequestor.RequestAsync( + BaseAddress.Api, + HttpMethod.Post, + "/v1/charges", + this.options, + this.requestOptions); + + Assert.Empty(stderr.ToString()); + } + finally + { + Console.SetError(new StreamWriter(Console.OpenStandardError()) { AutoFlush = true }); + } + } + + [Fact] + public async Task RawRequestAsync_WritesToStderr_WhenStripeNoticeHeaderPresent() + { + var headers = BuildHeaders("Stripe-Notice", "raw notice message"); + var response = new StripeResponse(HttpStatusCode.OK, headers, "{\"id\": \"ch_123\"}"); + this.httpClient.Response = response; + + var stderr = new StringWriter(); + Console.SetError(stderr); + try + { + await this.apiRequestor.RawRequestAsync( + HttpMethod.Post, + "/v1/charges", + "foo=bar"); + + Assert.Contains("raw notice message", stderr.ToString()); + } + finally + { + Console.SetError(new StreamWriter(Console.OpenStandardError()) { AutoFlush = true }); + } + } + + [Fact] + public async Task RawRequestAsync_NoStderrWrite_WhenStripeNoticeHeaderAbsent() + { + var response = new StripeResponse(HttpStatusCode.OK, null, "{\"id\": \"ch_123\"}"); + this.httpClient.Response = response; + + var stderr = new StringWriter(); + Console.SetError(stderr); + try + { + await this.apiRequestor.RawRequestAsync( + HttpMethod.Post, + "/v1/charges", + "foo=bar"); + + Assert.Empty(stderr.ToString()); + } + finally + { + Console.SetError(new StreamWriter(Console.OpenStandardError()) { AutoFlush = true }); + } + } + + private static HttpResponseHeaders BuildHeaders(string name, string value) + { + var message = new HttpResponseMessage(); + message.Headers.Add(name, value); + return message.Headers; + } + private class Foo : StripeEntity { [JsonProperty("bar")] From 75c073114a3d17f963ed7cad799189b3b5ab5c66 Mon Sep 17 00:00:00 2001 From: "stripe-openapi[bot]" <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 27 May 2026 19:40:30 +0000 Subject: [PATCH 02/16] Update generated code (#3386) * Update generated code for v2276 and 9e9ef9ec9df30a59ccafb74c27b81311fa2896d5 * Update generated code for v2277 and d59a1f4bdea3032b8e282d40badc032cb021fc60 --------- Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Co-authored-by: Michael Broshi <94012587+mbroshi-stripe@users.noreply.github.com> --- 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 | 14 ++- ...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 +- .../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 | 6 +- .../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 | 22 +++-- .../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 | 14 ++- .../PaymentMethods/PaymentMethodBizum.cs | 12 +++ .../PaymentMethods/PaymentMethodScalapay.cs | 12 +++ .../PaymentRecordPaymentMethodDetails.cs | 8 ++ .../PaymentRecordPaymentMethodDetailsBizum.cs | 18 ++++ ...rdPaymentMethodDetailsRevolutPayFunding.cs | 2 +- ...ymentRecordPaymentMethodDetailsScalapay.cs | 18 ++++ .../PaymentRecordPaymentMethodDetailsTwint.cs | 6 ++ .../PaymentEvaluations/PaymentEvaluation.cs | 2 +- .../Refunds/RefundDestinationDetails.cs | 4 + .../RefundDestinationDetailsScalapay.cs | 12 +++ .../SetupAttemptPaymentMethodDetails.cs | 4 + .../SetupAttemptPaymentMethodDetailsTwint.cs | 12 +++ .../Entities/SetupIntents/SetupIntent.cs | 6 +- .../SetupIntents/SetupIntentNextAction.cs | 4 + .../SetupIntentNextActionBlikAuthorize.cs | 12 +++ .../SetupIntentPaymentMethodOptions.cs | 4 + .../SetupIntentPaymentMethodOptionsBizum.cs | 12 +++ .../SubscriptionItems/SubscriptionItem.cs | 9 ++ ...SubscriptionSchedulePhaseAddInvoiceItem.cs | 8 ++ .../Entities/Subscriptions/Subscription.cs | 7 ++ .../SubscriptionBillingSchedule.cs | 33 +++++++ .../SubscriptionBillingScheduleAppliesTo.cs | 53 +++++++++++ .../SubscriptionBillingScheduleBillUntil.cs | 46 ++++++++++ ...riptionBillingScheduleBillUntilDuration.cs | 26 ++++++ .../SubscriptionPaymentSettings.cs | 4 +- .../SubscriptionPendingUpdate.cs | 55 +++++++++++- .../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 +++++++++ .../MeterEventAdjustment.cs | 6 +- .../MeterEventAdjustmentCancel.cs | 4 +- .../MeterEventSessions/MeterEventSession.cs | 6 +- .../ProductCatalogImport.cs | 78 +++++++++++++++++ .../ProductCatalogImportStatusDetails.cs | 46 ++++++++++ ...atalogImportStatusDetailsAwaitingUpload.cs | 18 ++++ ...ortStatusDetailsAwaitingUploadUploadUrl.cs | 26 ++++++ ...ProductCatalogImportStatusDetailsFailed.cs | 34 ++++++++ ...uctCatalogImportStatusDetailsProcessing.cs | 29 +++++++ ...ductCatalogImportStatusDetailsSucceeded.cs | 20 +++++ ...gImportStatusDetailsSucceededWithErrors.cs | 44 ++++++++++ ...atusDetailsSucceededWithErrorsErrorFile.cs | 34 ++++++++ ...SucceededWithErrorsErrorFileDownloadUrl.cs | 26 ++++++ ...tStatusDetailsSucceededWithErrorsSample.cs | 41 +++++++++ .../V2/Core/AccountTokens/AccountToken.cs | 4 +- .../Entities/V2/Core/Accounts/Account.cs | 14 ++- .../V2/Core/Accounts/AccountConfiguration.cs | 3 +- .../AccountConfigurationCustomerBilling.cs | 4 +- .../V2/Core/Accounts/AccountIdentity.cs | 4 +- ...nessDetailsDocumentsProofOfRegistration.cs | 7 ++ ...tailsDocumentsProofOfRegistrationSigner.cs | 18 ++++ ...mentsProofOfUltimateBeneficialOwnership.cs | 7 ++ ...roofOfUltimateBeneficialOwnershipSigner.cs | 18 ++++ .../Accounts/AccountIdentityIndividual.cs | 4 +- .../EventDestinations/EventDestination.cs | 9 +- .../EventDestinationAzureEventGrid.cs | 47 ++++++++++ .../EventDestinationStatusDetailsDisabled.cs | 3 +- ...ReportTriggeredEventDataReasonErrorType.cs | 5 +- ...terNoMeterFoundEventDataReasonErrorType.cs | 5 +- ...ommerceProductCatalogImportsFailedEvent.cs | 39 +++++++++ ...ctCatalogImportsFailedEventNotification.cs | 50 +++++++++++ ...rceProductCatalogImportsProcessingEvent.cs | 38 ++++++++ ...talogImportsProcessingEventNotification.cs | 49 +++++++++++ ...erceProductCatalogImportsSucceededEvent.cs | 38 ++++++++ ...atalogImportsSucceededEventNotification.cs | 49 +++++++++++ ...tCatalogImportsSucceededWithErrorsEvent.cs | 39 +++++++++ ...rtsSucceededWithErrorsEventNotification.cs | 50 +++++++++++ .../Public/StripeTypeRegistry.cs | 36 ++++++++ ...AccountCapabilitiesBizumPaymentsOptions.cs | 20 +++++ .../Accounts/AccountCapabilitiesOptions.cs | 14 +++ ...ountCapabilitiesScalapayPaymentsOptions.cs | 20 +++++ ...AutomaticTransferRulesByCurrencyOptions.cs | 35 ++++++++ .../BalanceSettingsPaymentsPayoutsOptions.cs | 19 ++++ ...SettingsPaymentsSettlementTimingOptions.cs | 20 +++++ ...ymentsSettlementTimingStartOfDayOptions.cs | 38 ++++++++ .../Charges/ChargeTransferDataOptions.cs | 7 ++ .../SessionConsentCollectionOptions.cs | 2 +- .../Checkout/Sessions/SessionCreateOptions.cs | 37 ++++---- ...entMethodOptionsCardRestrictionsOptions.cs | 4 +- .../SessionPaymentMethodOptionsOptions.cs | 12 ++- ...sionPaymentMethodOptionsScalapayOptions.cs | 18 ++++ ...SessionPaymentMethodOptionsTwintOptions.cs | 1 + .../SessionSubscriptionDataOptions.cs | 2 +- .../Sessions/SessionWalletOptionsOptions.cs | 3 +- .../CustomerPaymentMethodListOptions.cs | 7 +- .../Invoices/InvoicePaymentSettingsOptions.cs | 4 +- ...heduleDetailsPhaseAddInvoiceItemOptions.cs | 8 ++ ...nDetailsBillingScheduleAppliesToOptions.cs | 25 ++++++ ...BillingScheduleBillUntilDurationOptions.cs | 26 ++++++ ...nDetailsBillingScheduleBillUntilOptions.cs | 37 ++++++++ ...bscriptionDetailsBillingScheduleOptions.cs | 34 ++++++++ .../InvoiceSubscriptionDetailsCancelAt.cs | 1 + .../InvoiceSubscriptionDetailsOptions.cs | 17 ++++ ...ymentIntentAmountDetailsShippingOptions.cs | 4 +- .../PaymentIntentConfirmOptions.cs | 11 ++- .../PaymentIntentCreateOptions.cs | 12 +-- ...mentIntentPaymentMethodDataBizumOptions.cs | 12 +++ .../PaymentIntentPaymentMethodDataOptions.cs | 36 +++++--- ...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 | 6 +- .../PaymentLinkConsentCollectionOptions.cs | 2 +- .../PaymentLinks/PaymentLinkCreateOptions.cs | 19 ++-- ...mentLinkPaymentMethodOptionsCardOptions.cs | 39 +++++++++ ...entMethodOptionsCardRestrictionsOptions.cs | 42 +++++++++ .../PaymentLinkPaymentMethodOptionsOptions.cs | 38 ++++++++ .../PaymentLinks/PaymentLinkUpdateOptions.cs | 32 +++++-- ...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 | 25 +++++- .../PaymentMethodListOptions.cs | 7 +- .../PaymentMethodScalapayOptions.cs | 12 +++ .../Services/Payouts/PayoutCreateOptions.cs | 4 +- .../SetupIntents/SetupIntentCreateOptions.cs | 6 +- ...etupIntentPaymentMethodDataBizumOptions.cs | 12 +++ .../SetupIntentPaymentMethodDataOptions.cs | 36 +++++--- ...pIntentPaymentMethodDataScalapayOptions.cs | 12 +++ ...pIntentPaymentMethodOptionsBizumOptions.cs | 12 +++ .../SetupIntentPaymentMethodOptionsOptions.cs | 10 ++- .../SetupIntents/SetupIntentUpdateOptions.cs | 6 +- .../SubscriptionItemCreateOptions.cs | 29 +------ .../SubscriptionItemDeleteOptions.cs | 29 +------ .../SubscriptionItemUpdateOptions.cs | 29 +------ ...ptionSchedulePhaseAddInvoiceItemOptions.cs | 8 ++ .../SubscriptionAddInvoiceItemOptions.cs | 8 ++ ...criptionBillingScheduleAppliesToOptions.cs | 25 ++++++ ...BillingScheduleBillUntilDurationOptions.cs | 26 ++++++ ...criptionBillingScheduleBillUntilOptions.cs | 37 ++++++++ .../SubscriptionBillingScheduleOptions.cs | 34 ++++++++ .../Subscriptions/SubscriptionCancelAt.cs | 1 + .../SubscriptionCreateOptions.cs | 43 +++------ .../SubscriptionPaymentSettingsOptions.cs | 4 +- .../Subscriptions/SubscriptionService.cs | 42 +++++---- .../SubscriptionUpdateOptions.cs | 52 +++++------ .../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 | 36 +++++--- ...onTokenPaymentMethodDataScalapayOptions.cs | 12 +++ .../TestClocks/TestClockCreateOptions.cs | 8 ++ ...MeterEventAdjustmentCreateCancelOptions.cs | 4 +- .../MeterEventAdjustmentCreateOptions.cs | 3 +- .../MeterEventSessionService.cs | 8 +- .../Imports/ImportCreateOptions.cs | 35 ++++++++ .../Imports/ImportGetOptions.cs | 12 +++ .../Imports/ImportListOptions.cs | 69 +++++++++++++++ .../ProductCatalog/Imports/ImportService.cs | 87 +++++++++++++++++++ .../V2/Commerce/ProductCatalogService.cs | 25 ++++++ src/Stripe.net/Services/V2/CommerceService.cs | 25 ++++++ ...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 +- .../PersonTokens/PersonTokenService.cs | 12 ++- ...tDestinationCreateAzureEventGridOptions.cs | 32 +++++++ .../EventDestinationCreateOptions.cs | 9 +- .../Services/V2/Core/Events/EventService.cs | 8 +- src/Stripe.net/Services/V2Services.cs | 4 + .../WebhookEndpointCreateOptions.cs | 2 +- .../Services/GeneratedExamplesTest.cs | 60 +++++++++++++ 260 files changed, 4447 insertions(+), 406 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/Subscriptions/SubscriptionBillingSchedule.cs create mode 100644 src/Stripe.net/Entities/Subscriptions/SubscriptionBillingScheduleAppliesTo.cs create mode 100644 src/Stripe.net/Entities/Subscriptions/SubscriptionBillingScheduleBillUntil.cs create mode 100644 src/Stripe.net/Entities/Subscriptions/SubscriptionBillingScheduleBillUntilDuration.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/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImport.cs create mode 100644 src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetails.cs create mode 100644 src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetailsAwaitingUpload.cs create mode 100644 src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetailsAwaitingUploadUploadUrl.cs create mode 100644 src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetailsFailed.cs create mode 100644 src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetailsProcessing.cs create mode 100644 src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetailsSucceeded.cs create mode 100644 src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetailsSucceededWithErrors.cs create mode 100644 src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetailsSucceededWithErrorsErrorFile.cs create mode 100644 src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetailsSucceededWithErrorsErrorFileDownloadUrl.cs create mode 100644 src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetailsSucceededWithErrorsSample.cs 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/Entities/V2/Core/EventDestinations/EventDestinationAzureEventGrid.cs create mode 100644 src/Stripe.net/Events/V2CommerceProductCatalogImportsFailedEvent.cs create mode 100644 src/Stripe.net/Events/V2CommerceProductCatalogImportsFailedEventNotification.cs create mode 100644 src/Stripe.net/Events/V2CommerceProductCatalogImportsProcessingEvent.cs create mode 100644 src/Stripe.net/Events/V2CommerceProductCatalogImportsProcessingEventNotification.cs create mode 100644 src/Stripe.net/Events/V2CommerceProductCatalogImportsSucceededEvent.cs create mode 100644 src/Stripe.net/Events/V2CommerceProductCatalogImportsSucceededEventNotification.cs create mode 100644 src/Stripe.net/Events/V2CommerceProductCatalogImportsSucceededWithErrorsEvent.cs create mode 100644 src/Stripe.net/Events/V2CommerceProductCatalogImportsSucceededWithErrorsEventNotification.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/Invoices/InvoiceSubscriptionDetailsBillingScheduleAppliesToOptions.cs create mode 100644 src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsBillingScheduleBillUntilDurationOptions.cs create mode 100644 src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsBillingScheduleBillUntilOptions.cs create mode 100644 src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsBillingScheduleOptions.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/SubscriptionBillingScheduleAppliesToOptions.cs create mode 100644 src/Stripe.net/Services/Subscriptions/SubscriptionBillingScheduleBillUntilDurationOptions.cs create mode 100644 src/Stripe.net/Services/Subscriptions/SubscriptionBillingScheduleBillUntilOptions.cs create mode 100644 src/Stripe.net/Services/Subscriptions/SubscriptionBillingScheduleOptions.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 create mode 100644 src/Stripe.net/Services/V2/Commerce/ProductCatalog/Imports/ImportCreateOptions.cs create mode 100644 src/Stripe.net/Services/V2/Commerce/ProductCatalog/Imports/ImportGetOptions.cs create mode 100644 src/Stripe.net/Services/V2/Commerce/ProductCatalog/Imports/ImportListOptions.cs create mode 100644 src/Stripe.net/Services/V2/Commerce/ProductCatalog/Imports/ImportService.cs create mode 100644 src/Stripe.net/Services/V2/Commerce/ProductCatalogService.cs create mode 100644 src/Stripe.net/Services/V2/CommerceService.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/Core/EventDestinations/EventDestinationCreateAzureEventGridOptions.cs diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index da5c58a231..6fae6735a5 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -9aa5ee4ed2b929f65b7fbf7c341f938682888500 \ No newline at end of file +d59a1f4bdea3032b8e282d40badc032cb021fc60 \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 048a4fc1a7..30723023b8 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2252 \ No newline at end of file +v2277 \ No newline at end of file diff --git a/src/Stripe.net/Constants/ApiVersion.cs b/src/Stripe.net/Constants/ApiVersion.cs index a17326a804..4114a37855 100644 --- a/src/Stripe.net/Constants/ApiVersion.cs +++ b/src/Stripe.net/Constants/ApiVersion.cs @@ -3,7 +3,7 @@ namespace Stripe { internal class ApiVersion { - public const string Current = "2026-04-22.dahlia"; + public const string Current = "2026-05-27.dahlia"; public const string CurrentMajor = "dahlia"; } } \ 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 a5d4b6cb20..884a88d872 100644 --- a/src/Stripe.net/Entities/Accounts/AccountCapabilities.cs +++ b/src/Stripe.net/Entities/Accounts/AccountCapabilities.cs @@ -107,6 +107,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. @@ -457,6 +466,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 5ef7279938..c3db00d231 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 6f52ec331a..ff86364656 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, grabpay, /// ideal, interac_present, kakao_pay, klarna, konbini, /// kr_card, link, mb_way, mobilepay, multibanco, /// naver_pay, nz_bank_account, oxxo, p24, pay_by_bank, /// payco, paynow, paypal, payto, pix, promptpay, - /// revolut_pay, samsung_pay, satispay, sepa_debit, - /// sofort, sunbit, swish, twint, upi, + /// revolut_pay, samsung_pay, satispay, scalapay, + /// sepa_debit, sofort, sunbit, swish, twint, upi, /// us_bank_account, wechat_pay, or zip. /// [JsonProperty("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 4d7a4d5eda..983dfe8eba 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 76c5184bbb..ecb9758259 100644 --- a/src/Stripe.net/Entities/Invoices/InvoicePaymentSettings.cs +++ b/src/Stripe.net/Entities/Invoices/InvoicePaymentSettings.cs @@ -40,8 +40,8 @@ public class InvoicePaymentSettings : StripeEntity /// konbini, kr_card, link, multibanco, naver_pay, /// nz_bank_account, p24, pay_by_bank, payco, paynow, /// paypal, payto, pix, promptpay, revolut_pay, - /// sepa_credit_transfer, sepa_debit, sofort, swish, upi, - /// us_bank_account, or wechat_pay. + /// sepa_credit_transfer, sepa_debit, sofort, 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/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 663c1f3995..2410b71088 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 a8252e2d04..4aeae5bd1b 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntent.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntent.cs @@ -286,14 +286,14 @@ 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, 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, payto, pix, promptpay, - /// revolut_pay, samsung_pay, satispay, sepa_debit, - /// sofort, sunbit, swish, twint, upi, + /// revolut_pay, samsung_pay, satispay, scalapay, + /// sepa_debit, sofort, sunbit, swish, twint, upi, /// us_bank_account, wechat_pay, or zip. /// [JsonProperty("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 81d76e9143..44c6c95661 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 35bcf9a33a..a113ac7a67 100644 --- a/src/Stripe.net/Entities/PaymentLinks/PaymentLink.cs +++ b/src/Stripe.net/Entities/PaymentLinks/PaymentLink.cs @@ -269,19 +269,27 @@ 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, - /// grabpay, ideal, klarna, konbini, link, mb_way, - /// mobilepay, multibanco, oxxo, p24, pay_by_bank, - /// paynow, paypal, payto, pix, promptpay, - /// satispay, sepa_debit, 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, grabpay, ideal, klarna, konbini, + /// link, mb_way, mobilepay, multibanco, oxxo, + /// p24, pay_by_bank, paynow, paypal, payto, pix, + /// promptpay, satispay, sepa_debit, 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 6560dd16d3..fab9b9f31e 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 d375c6ae25..bc16badd14 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; } @@ -309,6 +313,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; } @@ -335,15 +343,15 @@ 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, grabpay, /// ideal, interac_present, kakao_pay, klarna, konbini, /// kr_card, link, mb_way, mobilepay, multibanco, /// naver_pay, nz_bank_account, oxxo, p24, pay_by_bank, /// payco, paynow, paypal, payto, pix, promptpay, - /// revolut_pay, samsung_pay, satispay, sepa_debit, - /// sofort, sunbit, swish, twint, upi, + /// revolut_pay, samsung_pay, satispay, scalapay, + /// sepa_debit, sofort, sunbit, swish, twint, upi, /// us_bank_account, wechat_pay, or zip. /// [JsonProperty("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 2ca2d03927..864d8654e7 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/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 a8ff69595c..574178021e 100644 --- a/src/Stripe.net/Entities/Refunds/RefundDestinationDetails.cs +++ b/src/Stripe.net/Entities/Refunds/RefundDestinationDetails.cs @@ -120,6 +120,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 9594a0794a..6c41cc56fd 100644 --- a/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetails.cs +++ b/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetails.cs @@ -96,6 +96,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 4e31c262aa..2ad7a2963f 100644 --- a/src/Stripe.net/Entities/SetupIntents/SetupIntent.cs +++ b/src/Stripe.net/Entities/SetupIntents/SetupIntent.cs @@ -208,14 +208,14 @@ 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, 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, payto, pix, promptpay, - /// revolut_pay, samsung_pay, satispay, sepa_debit, - /// sofort, sunbit, swish, twint, upi, + /// revolut_pay, samsung_pay, satispay, scalapay, + /// sepa_debit, sofort, sunbit, swish, twint, upi, /// us_bank_account, wechat_pay, or zip. /// [JsonProperty("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/SubscriptionItems/SubscriptionItem.cs b/src/Stripe.net/Entities/SubscriptionItems/SubscriptionItem.cs index 7a1378b18a..84bd7c6ebe 100644 --- a/src/Stripe.net/Entities/SubscriptionItems/SubscriptionItem.cs +++ b/src/Stripe.net/Entities/SubscriptionItems/SubscriptionItem.cs @@ -29,6 +29,15 @@ public class SubscriptionItem : StripeEntity, IHasId, IHasMeta [STJS.JsonPropertyName("object")] public string Object { get; set; } + /// + /// The time period the subscription item has been billed for. + /// + [JsonProperty("billed_until")] + [JsonConverter(typeof(UnixDateTimeConverter))] + [STJS.JsonPropertyName("billed_until")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] + public DateTime BilledUntil { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; + /// /// Define thresholds at which an invoice will be sent, and the related subscription /// advanced to a new billing period. 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 e2416dac76..3df3f96fe9 100644 --- a/src/Stripe.net/Entities/Subscriptions/Subscription.cs +++ b/src/Stripe.net/Entities/Subscriptions/Subscription.cs @@ -106,6 +106,13 @@ public Application Application [STJS.JsonPropertyName("billing_mode")] public SubscriptionBillingMode BillingMode { get; set; } + /// + /// Billing schedules for this subscription. + /// + [JsonProperty("billing_schedules")] + [STJS.JsonPropertyName("billing_schedules")] + public List BillingSchedules { get; set; } + /// /// Define thresholds at which an invoice will be sent, and the subscription advanced to a /// new billing period. diff --git a/src/Stripe.net/Entities/Subscriptions/SubscriptionBillingSchedule.cs b/src/Stripe.net/Entities/Subscriptions/SubscriptionBillingSchedule.cs new file mode 100644 index 0000000000..77803343ec --- /dev/null +++ b/src/Stripe.net/Entities/Subscriptions/SubscriptionBillingSchedule.cs @@ -0,0 +1,33 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using System.Collections.Generic; + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class SubscriptionBillingSchedule : StripeEntity + { + /// + /// Specifies which subscription items the billing schedule applies to. + /// + [JsonProperty("applies_to")] + [STJS.JsonPropertyName("applies_to")] + public List AppliesTo { get; set; } + + /// + /// Specifies the end of billing period. + /// + [JsonProperty("bill_until")] + [STJS.JsonPropertyName("bill_until")] + public SubscriptionBillingScheduleBillUntil BillUntil { get; set; } + + /// + /// Unique identifier for the billing schedule. + /// + [JsonProperty("key")] + [STJS.JsonPropertyName("key")] + public string Key { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Subscriptions/SubscriptionBillingScheduleAppliesTo.cs b/src/Stripe.net/Entities/Subscriptions/SubscriptionBillingScheduleAppliesTo.cs new file mode 100644 index 0000000000..56c12e1a26 --- /dev/null +++ b/src/Stripe.net/Entities/Subscriptions/SubscriptionBillingScheduleAppliesTo.cs @@ -0,0 +1,53 @@ +// 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 SubscriptionBillingScheduleAppliesTo : StripeEntity + { + #region Expandable Price + + /// + /// (ID of the Price) + /// The billing schedule will apply to the subscription item with the given price ID. + /// + [JsonIgnore] + [STJS.JsonIgnore] + public string PriceId + { + get => this.InternalPrice?.Id; + set => this.InternalPrice = SetExpandableFieldId(value, this.InternalPrice); + } + + /// + /// (Expanded) + /// The billing schedule will apply to the subscription item with the given price ID. + /// + /// 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")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] + internal ExpandableField InternalPrice { get; set; } + #endregion + + /// + /// Controls which subscription items the billing schedule applies to. + /// + [JsonProperty("type")] + [STJS.JsonPropertyName("type")] + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Subscriptions/SubscriptionBillingScheduleBillUntil.cs b/src/Stripe.net/Entities/Subscriptions/SubscriptionBillingScheduleBillUntil.cs new file mode 100644 index 0000000000..78550145cb --- /dev/null +++ b/src/Stripe.net/Entities/Subscriptions/SubscriptionBillingScheduleBillUntil.cs @@ -0,0 +1,46 @@ +// 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 SubscriptionBillingScheduleBillUntil : StripeEntity + { + /// + /// The timestamp the billing schedule will apply until. + /// + [JsonProperty("computed_timestamp")] + [JsonConverter(typeof(UnixDateTimeConverter))] + [STJS.JsonPropertyName("computed_timestamp")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] + public DateTime ComputedTimestamp { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; + + /// + /// Specifies the billing period. + /// + [JsonProperty("duration")] + [STJS.JsonPropertyName("duration")] + public SubscriptionBillingScheduleBillUntilDuration Duration { get; set; } + + /// + /// If specified, the billing schedule will apply until the specified timestamp. + /// + [JsonProperty("timestamp")] + [JsonConverter(typeof(UnixDateTimeConverter))] + [STJS.JsonPropertyName("timestamp")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] + public DateTime? Timestamp { get; set; } + + /// + /// Describes how the billing schedule will determine the end date. Either duration + /// or timestamp. + /// One of: duration, or timestamp. + /// + [JsonProperty("type")] + [STJS.JsonPropertyName("type")] + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Subscriptions/SubscriptionBillingScheduleBillUntilDuration.cs b/src/Stripe.net/Entities/Subscriptions/SubscriptionBillingScheduleBillUntilDuration.cs new file mode 100644 index 0000000000..83eb1d6cb0 --- /dev/null +++ b/src/Stripe.net/Entities/Subscriptions/SubscriptionBillingScheduleBillUntilDuration.cs @@ -0,0 +1,26 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class SubscriptionBillingScheduleBillUntilDuration : StripeEntity + { + /// + /// Specifies billing duration. Either day, week, month or year. + /// One of: day, month, week, or year. + /// + [JsonProperty("interval")] + [STJS.JsonPropertyName("interval")] + public string Interval { get; set; } + + /// + /// The multiplier applied to the interval. + /// + [JsonProperty("interval_count")] + [STJS.JsonPropertyName("interval_count")] + public long? IntervalCount { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettings.cs b/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettings.cs index 4d32ff4f26..495b8521fe 100644 --- a/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettings.cs +++ b/src/Stripe.net/Entities/Subscriptions/SubscriptionPaymentSettings.cs @@ -32,8 +32,8 @@ public class SubscriptionPaymentSettings : StripeEntitykonbini, kr_card, link, multibanco, naver_pay, /// nz_bank_account, p24, pay_by_bank, payco, paynow, /// paypal, payto, pix, promptpay, revolut_pay, - /// sepa_credit_transfer, sepa_debit, sofort, swish, upi, - /// us_bank_account, or wechat_pay. + /// sepa_credit_transfer, sepa_debit, sofort, 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 98b18b7eae..40a44c551a 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; } + /// /// List of subscription items, each with an attached plan, that will be set if the update /// is applied. diff --git a/src/Stripe.net/Entities/Terminal/Configurations/Configuration.cs b/src/Stripe.net/Entities/Terminal/Configurations/Configuration.cs index d84e9327fe..f39de7613c 100644 --- a/src/Stripe.net/Entities/Terminal/Configurations/Configuration.cs +++ b/src/Stripe.net/Entities/Terminal/Configurations/Configuration.cs @@ -90,10 +90,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/Entities/V2/Billing/MeterEventAdjustments/MeterEventAdjustment.cs b/src/Stripe.net/Entities/V2/Billing/MeterEventAdjustments/MeterEventAdjustment.cs index ea15b65b84..5d6dfe316d 100644 --- a/src/Stripe.net/Entities/V2/Billing/MeterEventAdjustments/MeterEventAdjustment.cs +++ b/src/Stripe.net/Entities/V2/Billing/MeterEventAdjustments/MeterEventAdjustment.cs @@ -15,7 +15,7 @@ namespace Stripe.V2.Billing public class MeterEventAdjustment : StripeEntity, IHasId, IHasObject { /// - /// The unique id of this meter event adjustment. + /// The unique ID of this meter event adjustment. /// [JsonProperty("id")] [STJS.JsonPropertyName("id")] @@ -67,8 +67,8 @@ public class MeterEventAdjustment : StripeEntity, IHasId, public string Status { get; set; } /// - /// Open Enum. Specifies whether to cancel a single event or a range of events for a time - /// period. Time period cancellation is not supported yet. + /// Open Enum. Specifies the type of cancellation. Currently supports canceling a single + /// event. /// [JsonProperty("type")] [STJS.JsonPropertyName("type")] diff --git a/src/Stripe.net/Entities/V2/Billing/MeterEventAdjustments/MeterEventAdjustmentCancel.cs b/src/Stripe.net/Entities/V2/Billing/MeterEventAdjustments/MeterEventAdjustmentCancel.cs index c469b81557..f6ff85a5ea 100644 --- a/src/Stripe.net/Entities/V2/Billing/MeterEventAdjustments/MeterEventAdjustmentCancel.cs +++ b/src/Stripe.net/Entities/V2/Billing/MeterEventAdjustments/MeterEventAdjustmentCancel.cs @@ -9,8 +9,8 @@ namespace Stripe.V2.Billing public class MeterEventAdjustmentCancel : StripeEntity { /// - /// Unique identifier for the event. You can only cancel events within 24 hours of Stripe - /// receiving them. + /// The identifier that was originally assigned to the meter event. You can only cancel + /// events within 24 hours of Stripe receiving them. /// [JsonProperty("identifier")] [STJS.JsonPropertyName("identifier")] diff --git a/src/Stripe.net/Entities/V2/Billing/MeterEventSessions/MeterEventSession.cs b/src/Stripe.net/Entities/V2/Billing/MeterEventSessions/MeterEventSession.cs index 83e4ff7bb4..4bf459d703 100644 --- a/src/Stripe.net/Entities/V2/Billing/MeterEventSessions/MeterEventSession.cs +++ b/src/Stripe.net/Entities/V2/Billing/MeterEventSessions/MeterEventSession.cs @@ -15,7 +15,7 @@ namespace Stripe.V2.Billing public class MeterEventSession : StripeEntity, IHasId, IHasObject { /// - /// The unique id of this auth session. + /// The unique ID of this auth session. /// [JsonProperty("id")] [STJS.JsonPropertyName("id")] @@ -30,7 +30,7 @@ public class MeterEventSession : StripeEntity, IHasId, IHasOb public string Object { get; set; } /// - /// The authentication token for this session. Use this token when calling the + /// The authentication token for this session. Use this token when calling the /// high-throughput meter event API. /// [JsonProperty("authentication_token")] @@ -45,7 +45,7 @@ public class MeterEventSession : StripeEntity, IHasId, IHasOb public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// - /// The time at which this session will expire. + /// The time at which this session expires. /// [JsonProperty("expires_at")] [STJS.JsonPropertyName("expires_at")] diff --git a/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImport.cs b/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImport.cs new file mode 100644 index 0000000000..aece3c8896 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImport.cs @@ -0,0 +1,78 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Commerce +{ + using System; + using System.Collections.Generic; + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + /// + /// 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 + { + /// + /// The unique identifier for this ProductCatalogImport. + /// + [JsonProperty("id")] + [STJS.JsonPropertyName("id")] + public string Id { get; set; } + + /// + /// String representing the object's type. Objects of the same type share the same value of + /// the object field. + /// + [JsonProperty("object")] + [STJS.JsonPropertyName("object")] + public string Object { get; set; } + + /// + /// The time this ProductCatalogImport was created. + /// + [JsonProperty("created")] + [STJS.JsonPropertyName("created")] + public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; + + /// + /// The type of feed data being imported into the product catalog. + /// One of: inventory, pricing, or product. + /// + [JsonProperty("feed_type")] + [STJS.JsonPropertyName("feed_type")] + public string FeedType { get; set; } + + /// + /// Has the value true if the object exists in live mode or the value false if + /// the object exists in test mode. + /// + [JsonProperty("livemode")] + [STJS.JsonPropertyName("livemode")] + public bool Livemode { get; set; } + + /// + /// Additional information about the object in a structured format. + /// + [JsonProperty("metadata")] + [STJS.JsonPropertyName("metadata")] + public Dictionary Metadata { get; set; } + + /// + /// The current status of this ProductCatalogImport. + /// One of: awaiting_upload, failed, processing, succeeded, or + /// succeeded_with_errors. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + + /// + /// Details about the current import status. + /// + [JsonProperty("status_details")] + [STJS.JsonPropertyName("status_details")] + public ProductCatalogImportStatusDetails StatusDetails { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetails.cs b/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetails.cs new file mode 100644 index 0000000000..6320b549eb --- /dev/null +++ b/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetails.cs @@ -0,0 +1,46 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Commerce +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class ProductCatalogImportStatusDetails : StripeEntity + { + /// + /// Details when the import is awaiting file upload. + /// + [JsonProperty("awaiting_upload")] + [STJS.JsonPropertyName("awaiting_upload")] + public ProductCatalogImportStatusDetailsAwaitingUpload AwaitingUpload { get; set; } + + /// + /// Details when the import didn't complete. + /// + [JsonProperty("failed")] + [STJS.JsonPropertyName("failed")] + public ProductCatalogImportStatusDetailsFailed Failed { get; set; } + + /// + /// Details when the import is processing. + /// + [JsonProperty("processing")] + [STJS.JsonPropertyName("processing")] + public ProductCatalogImportStatusDetailsProcessing Processing { get; set; } + + /// + /// Details when the import has succeeded. + /// + [JsonProperty("succeeded")] + [STJS.JsonPropertyName("succeeded")] + public ProductCatalogImportStatusDetailsSucceeded Succeeded { get; set; } + + /// + /// Details when the import completed but some records failed to process. + /// + [JsonProperty("succeeded_with_errors")] + [STJS.JsonPropertyName("succeeded_with_errors")] + public ProductCatalogImportStatusDetailsSucceededWithErrors SucceededWithErrors { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetailsAwaitingUpload.cs b/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetailsAwaitingUpload.cs new file mode 100644 index 0000000000..1e836be27d --- /dev/null +++ b/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetailsAwaitingUpload.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Commerce +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class ProductCatalogImportStatusDetailsAwaitingUpload : StripeEntity + { + /// + /// The pre-signed URL information for uploading the catalog file. + /// + [JsonProperty("upload_url")] + [STJS.JsonPropertyName("upload_url")] + public ProductCatalogImportStatusDetailsAwaitingUploadUploadUrl UploadUrl { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetailsAwaitingUploadUploadUrl.cs b/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetailsAwaitingUploadUploadUrl.cs new file mode 100644 index 0000000000..20dc6de462 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetailsAwaitingUploadUploadUrl.cs @@ -0,0 +1,26 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Commerce +{ + using System; + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class ProductCatalogImportStatusDetailsAwaitingUploadUploadUrl : StripeEntity + { + /// + /// The timestamp when the upload URL expires. + /// + [JsonProperty("expires_at")] + [STJS.JsonPropertyName("expires_at")] + public DateTime ExpiresAt { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; + + /// + /// The pre-signed URL for uploading the catalog file. + /// + [JsonProperty("url")] + [STJS.JsonPropertyName("url")] + public string Url { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetailsFailed.cs b/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetailsFailed.cs new file mode 100644 index 0000000000..cb7a871055 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetailsFailed.cs @@ -0,0 +1,34 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Commerce +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class ProductCatalogImportStatusDetailsFailed : StripeEntity + { + /// + /// The error code for this product catalog processing failure. + /// One of: file_not_found, internal_error, or invalid_file. + /// + [JsonProperty("code")] + [STJS.JsonPropertyName("code")] + public string Code { get; set; } + + /// + /// A message explaining why the import failed. + /// + [JsonProperty("failure_message")] + [STJS.JsonPropertyName("failure_message")] + public string FailureMessage { get; set; } + + /// + /// The error type for this product catalog processing failure. + /// One of: cannot_proceed, or transient_failure. + /// + [JsonProperty("type")] + [STJS.JsonPropertyName("type")] + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetailsProcessing.cs b/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetailsProcessing.cs new file mode 100644 index 0000000000..2dbe8fa53d --- /dev/null +++ b/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetailsProcessing.cs @@ -0,0 +1,29 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Commerce +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class ProductCatalogImportStatusDetailsProcessing : StripeEntity + { + /// + /// The number of records that failed to process so far. + /// + [JsonProperty("error_count")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("error_count")] + public long ErrorCount { get; set; } + + /// + /// The number of records processed so far. + /// + [JsonProperty("success_count")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("success_count")] + public long SuccessCount { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetailsSucceeded.cs b/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetailsSucceeded.cs new file mode 100644 index 0000000000..20a102d34e --- /dev/null +++ b/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetailsSucceeded.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Commerce +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class ProductCatalogImportStatusDetailsSucceeded : StripeEntity + { + /// + /// The total number of records processed. + /// + [JsonProperty("success_count")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("success_count")] + public long SuccessCount { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetailsSucceededWithErrors.cs b/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetailsSucceededWithErrors.cs new file mode 100644 index 0000000000..f1d7b0bf7e --- /dev/null +++ b/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetailsSucceededWithErrors.cs @@ -0,0 +1,44 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Commerce +{ + using System.Collections.Generic; + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class ProductCatalogImportStatusDetailsSucceededWithErrors : StripeEntity + { + /// + /// The total number of records that failed to process. + /// + [JsonProperty("error_count")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("error_count")] + public long ErrorCount { get; set; } + + /// + /// A file containing details about all errors that occurred. + /// + [JsonProperty("error_file")] + [STJS.JsonPropertyName("error_file")] + public ProductCatalogImportStatusDetailsSucceededWithErrorsErrorFile ErrorFile { get; set; } + + /// + /// A sample of errors that occurred during processing. + /// + [JsonProperty("samples")] + [STJS.JsonPropertyName("samples")] + public List Samples { get; set; } + + /// + /// The total number of records processed. + /// + [JsonProperty("success_count")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("success_count")] + public long SuccessCount { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetailsSucceededWithErrorsErrorFile.cs b/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetailsSucceededWithErrorsErrorFile.cs new file mode 100644 index 0000000000..308832418c --- /dev/null +++ b/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetailsSucceededWithErrorsErrorFile.cs @@ -0,0 +1,34 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Commerce +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class ProductCatalogImportStatusDetailsSucceededWithErrorsErrorFile : StripeEntity + { + /// + /// The MIME type of the error file. + /// + [JsonProperty("content_type")] + [STJS.JsonPropertyName("content_type")] + public string ContentType { get; set; } + + /// + /// The pre-signed URL information for downloading the error file. + /// + [JsonProperty("download_url")] + [STJS.JsonPropertyName("download_url")] + public ProductCatalogImportStatusDetailsSucceededWithErrorsErrorFileDownloadUrl DownloadUrl { get; set; } + + /// + /// The size of the error file in bytes. + /// + [JsonProperty("size")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("size")] + public long Size { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetailsSucceededWithErrorsErrorFileDownloadUrl.cs b/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetailsSucceededWithErrorsErrorFileDownloadUrl.cs new file mode 100644 index 0000000000..14a62ee99c --- /dev/null +++ b/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetailsSucceededWithErrorsErrorFileDownloadUrl.cs @@ -0,0 +1,26 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Commerce +{ + using System; + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class ProductCatalogImportStatusDetailsSucceededWithErrorsErrorFileDownloadUrl : StripeEntity + { + /// + /// The timestamp when the download URL expires. + /// + [JsonProperty("expires_at")] + [STJS.JsonPropertyName("expires_at")] + public DateTime ExpiresAt { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; + + /// + /// The pre-signed URL for downloading the error file. + /// + [JsonProperty("url")] + [STJS.JsonPropertyName("url")] + public string Url { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetailsSucceededWithErrorsSample.cs b/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetailsSucceededWithErrorsSample.cs new file mode 100644 index 0000000000..eb73319e1b --- /dev/null +++ b/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetailsSucceededWithErrorsSample.cs @@ -0,0 +1,41 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Commerce +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class ProductCatalogImportStatusDetailsSucceededWithErrorsSample : StripeEntity, IHasId + { + /// + /// A description of what went wrong with this record. + /// + [JsonProperty("error_message")] + [STJS.JsonPropertyName("error_message")] + public string ErrorMessage { get; set; } + + /// + /// The name of the field that caused the error. + /// + [JsonProperty("field")] + [STJS.JsonPropertyName("field")] + public string Field { get; set; } + + /// + /// The identifier of the record that failed to process. + /// + [JsonProperty("id")] + [STJS.JsonPropertyName("id")] + public string Id { get; set; } + + /// + /// The row number in the import file where the error occurred. + /// + [JsonProperty("row")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("row")] + public long Row { get; set; } + } +} 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 a0c5a29762..2c1d8e5308 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 43435f028a..2fc7d212fa 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/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/Core/EventDestinations/EventDestination.cs b/src/Stripe.net/Entities/V2/Core/EventDestinations/EventDestination.cs index bfffae9dec..34f40ff383 100644 --- a/src/Stripe.net/Entities/V2/Core/EventDestinations/EventDestination.cs +++ b/src/Stripe.net/Entities/V2/Core/EventDestinations/EventDestination.cs @@ -40,6 +40,13 @@ public class EventDestination : StripeEntity, IHasId, IHasMeta [STJS.JsonPropertyName("amazon_eventbridge")] public EventDestinationAmazonEventbridge AmazonEventbridge { get; set; } + /// + /// Azure Event Grid configuration. + /// + [JsonProperty("azure_event_grid")] + [STJS.JsonPropertyName("azure_event_grid")] + public EventDestinationAzureEventGrid AzureEventGrid { get; set; } + /// /// Time at which the object was created. /// @@ -127,7 +134,7 @@ public class EventDestination : StripeEntity, IHasId, IHasMeta /// /// Event destination type. - /// One of: amazon_eventbridge, or webhook_endpoint. + /// One of: amazon_eventbridge, azure_event_grid, or webhook_endpoint. /// [JsonProperty("type")] [STJS.JsonPropertyName("type")] diff --git a/src/Stripe.net/Entities/V2/Core/EventDestinations/EventDestinationAzureEventGrid.cs b/src/Stripe.net/Entities/V2/Core/EventDestinations/EventDestinationAzureEventGrid.cs new file mode 100644 index 0000000000..5ec0b618d4 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/EventDestinations/EventDestinationAzureEventGrid.cs @@ -0,0 +1,47 @@ +// File 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 EventDestinationAzureEventGrid : StripeEntity + { + /// + /// The name of the Azure partner topic. + /// + [JsonProperty("azure_partner_topic_name")] + [STJS.JsonPropertyName("azure_partner_topic_name")] + public string AzurePartnerTopicName { get; set; } + + /// + /// The status of the Azure partner topic. + /// One of: activated, deleted, never_activated, or unknown. + /// + [JsonProperty("azure_partner_topic_status")] + [STJS.JsonPropertyName("azure_partner_topic_status")] + public string AzurePartnerTopicStatus { get; set; } + + /// + /// The Azure region. + /// + [JsonProperty("azure_region")] + [STJS.JsonPropertyName("azure_region")] + public string AzureRegion { get; set; } + + /// + /// The name of the Azure resource group. + /// + [JsonProperty("azure_resource_group_name")] + [STJS.JsonPropertyName("azure_resource_group_name")] + public string AzureResourceGroupName { get; set; } + + /// + /// The Azure subscription ID. + /// + [JsonProperty("azure_subscription_id")] + [STJS.JsonPropertyName("azure_subscription_id")] + public string AzureSubscriptionId { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/EventDestinations/EventDestinationStatusDetailsDisabled.cs b/src/Stripe.net/Entities/V2/Core/EventDestinations/EventDestinationStatusDetailsDisabled.cs index d7814c97af..74366797d8 100644 --- a/src/Stripe.net/Entities/V2/Core/EventDestinations/EventDestinationStatusDetailsDisabled.cs +++ b/src/Stripe.net/Entities/V2/Core/EventDestinations/EventDestinationStatusDetailsDisabled.cs @@ -10,7 +10,8 @@ public class EventDestinationStatusDetailsDisabled : StripeEntity /// Reason event destination has been disabled. - /// One of: no_aws_event_source_exists, or user. + /// One of: no_aws_event_source_exists, no_azure_partner_topic_exists, or + /// user. /// [JsonProperty("reason")] [STJS.JsonPropertyName("reason")] diff --git a/src/Stripe.net/Events/V1BillingMeterErrorReportTriggeredEventDataReasonErrorType.cs b/src/Stripe.net/Events/V1BillingMeterErrorReportTriggeredEventDataReasonErrorType.cs index 40fbb0ac2b..050bb3f62b 100644 --- a/src/Stripe.net/Events/V1BillingMeterErrorReportTriggeredEventDataReasonErrorType.cs +++ b/src/Stripe.net/Events/V1BillingMeterErrorReportTriggeredEventDataReasonErrorType.cs @@ -13,8 +13,9 @@ public class V1BillingMeterErrorReportTriggeredEventDataReasonErrorType : Stripe /// Open Enum. /// One of: archived_meter, meter_event_customer_not_found, /// meter_event_dimension_count_too_high, meter_event_invalid_value, - /// meter_event_no_customer_defined, missing_dimension_payload_keys, - /// no_meter, timestamp_in_future, or timestamp_too_far_in_past. + /// meter_event_no_customer_defined, meter_event_value_too_many_digits, + /// missing_dimension_payload_keys, no_meter, timestamp_in_future, or + /// timestamp_too_far_in_past. /// [JsonProperty("code")] [STJS.JsonPropertyName("code")] diff --git a/src/Stripe.net/Events/V1BillingMeterNoMeterFoundEventDataReasonErrorType.cs b/src/Stripe.net/Events/V1BillingMeterNoMeterFoundEventDataReasonErrorType.cs index f3d309fee4..bc52c26423 100644 --- a/src/Stripe.net/Events/V1BillingMeterNoMeterFoundEventDataReasonErrorType.cs +++ b/src/Stripe.net/Events/V1BillingMeterNoMeterFoundEventDataReasonErrorType.cs @@ -13,8 +13,9 @@ public class V1BillingMeterNoMeterFoundEventDataReasonErrorType : StripeEntityarchived_meter, meter_event_customer_not_found, /// meter_event_dimension_count_too_high, meter_event_invalid_value, - /// meter_event_no_customer_defined, missing_dimension_payload_keys, - /// no_meter, timestamp_in_future, or timestamp_too_far_in_past. + /// meter_event_no_customer_defined, meter_event_value_too_many_digits, + /// missing_dimension_payload_keys, no_meter, timestamp_in_future, or + /// timestamp_too_far_in_past. /// [JsonProperty("code")] [STJS.JsonPropertyName("code")] diff --git a/src/Stripe.net/Events/V2CommerceProductCatalogImportsFailedEvent.cs b/src/Stripe.net/Events/V2CommerceProductCatalogImportsFailedEvent.cs new file mode 100644 index 0000000000..d2e4a10343 --- /dev/null +++ b/src/Stripe.net/Events/V2CommerceProductCatalogImportsFailedEvent.cs @@ -0,0 +1,39 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using STJS = System.Text.Json.Serialization; + + /// + /// Occurs when a product catalog import cannot be processed or if processing fails + /// unexpectedly. + /// + public class V2CommerceProductCatalogImportsFailedEvent : V2.Core.Event + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] + [STJS.JsonPropertyName("related_object")] + + public V2.Core.EventRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Commerce.ProductCatalogImport FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + } +} diff --git a/src/Stripe.net/Events/V2CommerceProductCatalogImportsFailedEventNotification.cs b/src/Stripe.net/Events/V2CommerceProductCatalogImportsFailedEventNotification.cs new file mode 100644 index 0000000000..ed0c76114e --- /dev/null +++ b/src/Stripe.net/Events/V2CommerceProductCatalogImportsFailedEventNotification.cs @@ -0,0 +1,50 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; + using STJS = System.Text.Json.Serialization; + + /// + /// Occurs when a product catalog import cannot be processed or if processing fails + /// unexpectedly. + /// + public class V2CommerceProductCatalogImportsFailedEventNotification : V2.Core.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] + [STJS.JsonPropertyName("related_object")] + + public V2.Core.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Commerce.ProductCatalogImport FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2CommerceProductCatalogImportsFailedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2CommerceProductCatalogImportsProcessingEvent.cs b/src/Stripe.net/Events/V2CommerceProductCatalogImportsProcessingEvent.cs new file mode 100644 index 0000000000..2673786668 --- /dev/null +++ b/src/Stripe.net/Events/V2CommerceProductCatalogImportsProcessingEvent.cs @@ -0,0 +1,38 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using STJS = System.Text.Json.Serialization; + + /// + /// Occurs when a product catalog import file has been uploaded and has started processing. + /// + public class V2CommerceProductCatalogImportsProcessingEvent : V2.Core.Event + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] + [STJS.JsonPropertyName("related_object")] + + public V2.Core.EventRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Commerce.ProductCatalogImport FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + } +} diff --git a/src/Stripe.net/Events/V2CommerceProductCatalogImportsProcessingEventNotification.cs b/src/Stripe.net/Events/V2CommerceProductCatalogImportsProcessingEventNotification.cs new file mode 100644 index 0000000000..066ac496b1 --- /dev/null +++ b/src/Stripe.net/Events/V2CommerceProductCatalogImportsProcessingEventNotification.cs @@ -0,0 +1,49 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; + using STJS = System.Text.Json.Serialization; + + /// + /// Occurs when a product catalog import file has been uploaded and has started processing. + /// + public class V2CommerceProductCatalogImportsProcessingEventNotification : V2.Core.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] + [STJS.JsonPropertyName("related_object")] + + public V2.Core.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Commerce.ProductCatalogImport FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2CommerceProductCatalogImportsProcessingEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2CommerceProductCatalogImportsSucceededEvent.cs b/src/Stripe.net/Events/V2CommerceProductCatalogImportsSucceededEvent.cs new file mode 100644 index 0000000000..c303d67886 --- /dev/null +++ b/src/Stripe.net/Events/V2CommerceProductCatalogImportsSucceededEvent.cs @@ -0,0 +1,38 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using STJS = System.Text.Json.Serialization; + + /// + /// Occurs when a product catalog file has been uploaded successfully and passed validation. + /// + public class V2CommerceProductCatalogImportsSucceededEvent : V2.Core.Event + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] + [STJS.JsonPropertyName("related_object")] + + public V2.Core.EventRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Commerce.ProductCatalogImport FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + } +} diff --git a/src/Stripe.net/Events/V2CommerceProductCatalogImportsSucceededEventNotification.cs b/src/Stripe.net/Events/V2CommerceProductCatalogImportsSucceededEventNotification.cs new file mode 100644 index 0000000000..47a35be48d --- /dev/null +++ b/src/Stripe.net/Events/V2CommerceProductCatalogImportsSucceededEventNotification.cs @@ -0,0 +1,49 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; + using STJS = System.Text.Json.Serialization; + + /// + /// Occurs when a product catalog file has been uploaded successfully and passed validation. + /// + public class V2CommerceProductCatalogImportsSucceededEventNotification : V2.Core.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] + [STJS.JsonPropertyName("related_object")] + + public V2.Core.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Commerce.ProductCatalogImport FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2CommerceProductCatalogImportsSucceededEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2CommerceProductCatalogImportsSucceededWithErrorsEvent.cs b/src/Stripe.net/Events/V2CommerceProductCatalogImportsSucceededWithErrorsEvent.cs new file mode 100644 index 0000000000..b424f5f17c --- /dev/null +++ b/src/Stripe.net/Events/V2CommerceProductCatalogImportsSucceededWithErrorsEvent.cs @@ -0,0 +1,39 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using STJS = System.Text.Json.Serialization; + + /// + /// Occurs when a product catalog file has been successfully processed but some rows failed + /// validation. + /// + public class V2CommerceProductCatalogImportsSucceededWithErrorsEvent : V2.Core.Event + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] + [STJS.JsonPropertyName("related_object")] + + public V2.Core.EventRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Commerce.ProductCatalogImport FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + } +} diff --git a/src/Stripe.net/Events/V2CommerceProductCatalogImportsSucceededWithErrorsEventNotification.cs b/src/Stripe.net/Events/V2CommerceProductCatalogImportsSucceededWithErrorsEventNotification.cs new file mode 100644 index 0000000000..77c6a48251 --- /dev/null +++ b/src/Stripe.net/Events/V2CommerceProductCatalogImportsSucceededWithErrorsEventNotification.cs @@ -0,0 +1,50 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; + using STJS = System.Text.Json.Serialization; + + /// + /// Occurs when a product catalog file has been successfully processed but some rows failed + /// validation. + /// + public class V2CommerceProductCatalogImportsSucceededWithErrorsEventNotification : V2.Core.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] + [STJS.JsonPropertyName("related_object")] + + public V2.Core.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Commerce.ProductCatalogImport FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2CommerceProductCatalogImportsSucceededWithErrorsEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Infrastructure/Public/StripeTypeRegistry.cs b/src/Stripe.net/Infrastructure/Public/StripeTypeRegistry.cs index 0b002eefc3..8bd309da57 100644 --- a/src/Stripe.net/Infrastructure/Public/StripeTypeRegistry.cs +++ b/src/Stripe.net/Infrastructure/Public/StripeTypeRegistry.cs @@ -193,6 +193,10 @@ public static class StripeTypeRegistry { "v2.billing.meter_event", typeof(V2.Billing.MeterEvent) }, { "v2.billing.meter_event_adjustment", typeof(V2.Billing.MeterEventAdjustment) }, { "v2.billing.meter_event_session", typeof(V2.Billing.MeterEventSession) }, + { + "v2.commerce.product_catalog_import", typeof( + V2.Commerce.ProductCatalogImport) + }, { "v2.core.account", typeof(V2.Core.Account) }, { "v2.core.account_link", typeof(V2.Core.AccountLink) }, { "v2.core.account_person", typeof(V2.Core.AccountPerson) }, @@ -216,6 +220,22 @@ public static class StripeTypeRegistry "v1.billing.meter.no_meter_found", typeof( Events.V1BillingMeterNoMeterFoundEvent) }, + { + "v2.commerce.product_catalog.imports.failed", typeof( + Events.V2CommerceProductCatalogImportsFailedEvent) + }, + { + "v2.commerce.product_catalog.imports.processing", typeof( + Events.V2CommerceProductCatalogImportsProcessingEvent) + }, + { + "v2.commerce.product_catalog.imports.succeeded", typeof( + Events.V2CommerceProductCatalogImportsSucceededEvent) + }, + { + "v2.commerce.product_catalog.imports.succeeded_with_errors", typeof( + Events.V2CommerceProductCatalogImportsSucceededWithErrorsEvent) + }, { "v2.core.account.closed", typeof(Events.V2CoreAccountClosedEvent) }, { "v2.core.account.created", typeof(Events.V2CoreAccountCreatedEvent) }, { "v2.core.account.updated", typeof(Events.V2CoreAccountUpdatedEvent) }, @@ -295,6 +315,22 @@ public static class StripeTypeRegistry "v1.billing.meter.no_meter_found", typeof( Events.V1BillingMeterNoMeterFoundEventNotification) }, + { + "v2.commerce.product_catalog.imports.failed", typeof( + Events.V2CommerceProductCatalogImportsFailedEventNotification) + }, + { + "v2.commerce.product_catalog.imports.processing", typeof( + Events.V2CommerceProductCatalogImportsProcessingEventNotification) + }, + { + "v2.commerce.product_catalog.imports.succeeded", typeof( + Events.V2CommerceProductCatalogImportsSucceededEventNotification) + }, + { + "v2.commerce.product_catalog.imports.succeeded_with_errors", typeof( + Events.V2CommerceProductCatalogImportsSucceededWithErrorsEventNotification) + }, { "v2.core.account.closed", typeof( Events.V2CoreAccountClosedEventNotification) 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 6707c63a2a..3882c389d6 100644 --- a/src/Stripe.net/Services/Accounts/AccountCapabilitiesOptions.cs +++ b/src/Stripe.net/Services/Accounts/AccountCapabilitiesOptions.cs @@ -85,6 +85,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. /// @@ -358,6 +365,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/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 2b7e623fe1..86fadd6ec6 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,14 +196,14 @@ 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, 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, payto, pix, promptpay, - /// revolut_pay, samsung_pay, satispay, sepa_debit, - /// sofort, sunbit, swish, twint, upi, + /// revolut_pay, samsung_pay, satispay, scalapay, + /// sepa_debit, sofort, sunbit, swish, twint, upi, /// us_bank_account, wechat_pay, or zip. /// [JsonProperty("excluded_payment_method_types")] @@ -334,7 +334,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")] @@ -408,15 +408,15 @@ 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, 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, payto, /// pix, promptpay, revolut_pay, samsung_pay, satispay, - /// sepa_debit, sofort, sunbit, swish, twint, upi, - /// us_bank_account, wechat_pay, or zip. + /// scalapay, sepa_debit, sofort, sunbit, swish, + /// twint, upi, us_bank_account, wechat_pay, or zip. /// [JsonProperty("payment_method_types")] [STJS.JsonPropertyName("payment_method_types")] @@ -447,7 +447,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. @@ -459,8 +459,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")] @@ -502,7 +502,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")] @@ -519,9 +519,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")] @@ -536,7 +537,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 bbc65ec806..a521890352 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")] @@ -185,7 +185,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")] @@ -289,6 +290,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 6080cc8694..1f010aba71 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionSubscriptionDataOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionSubscriptionDataOptions.cs @@ -24,7 +24,7 @@ public class SessionSubscriptionDataOptions : INestedOptions, IHasMetadata /// /// 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/CustomerPaymentMethods/CustomerPaymentMethodListOptions.cs b/src/Stripe.net/Services/CustomerPaymentMethods/CustomerPaymentMethodListOptions.cs index e343abc6fb..0dac08f101 100644 --- a/src/Stripe.net/Services/CustomerPaymentMethods/CustomerPaymentMethodListOptions.cs +++ b/src/Stripe.net/Services/CustomerPaymentMethods/CustomerPaymentMethodListOptions.cs @@ -25,15 +25,16 @@ 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, 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, /// payto, pix, promptpay, revolut_pay, samsung_pay, - /// satispay, sepa_debit, sofort, sunbit, swish, - /// twint, upi, us_bank_account, wechat_pay, or zip. + /// satispay, scalapay, sepa_debit, sofort, sunbit, + /// swish, twint, upi, us_bank_account, wechat_pay, or + /// zip. /// [JsonProperty("type")] [STJS.JsonPropertyName("type")] diff --git a/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsOptions.cs b/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsOptions.cs index 6af665d611..d910b6c87f 100644 --- a/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoicePaymentSettingsOptions.cs @@ -56,8 +56,8 @@ public string DefaultMandate /// konbini, kr_card, link, multibanco, naver_pay, /// nz_bank_account, p24, pay_by_bank, payco, paynow, /// paypal, payto, pix, promptpay, revolut_pay, - /// sepa_credit_transfer, sepa_debit, sofort, swish, upi, - /// us_bank_account, or wechat_pay. + /// sepa_credit_transfer, sepa_debit, sofort, 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/InvoiceSubscriptionDetailsBillingScheduleAppliesToOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsBillingScheduleAppliesToOptions.cs new file mode 100644 index 0000000000..11315a4c4e --- /dev/null +++ b/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsBillingScheduleAppliesToOptions.cs @@ -0,0 +1,25 @@ +// 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 InvoiceSubscriptionDetailsBillingScheduleAppliesToOptions : INestedOptions + { + /// + /// The ID of the price object. + /// + [JsonProperty("price")] + [STJS.JsonPropertyName("price")] + public string Price { get; set; } + + /// + /// Controls which subscription items the billing schedule applies to. + /// + [JsonProperty("type")] + [STJS.JsonPropertyName("type")] + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsBillingScheduleBillUntilDurationOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsBillingScheduleBillUntilDurationOptions.cs new file mode 100644 index 0000000000..eb25e5a86d --- /dev/null +++ b/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsBillingScheduleBillUntilDurationOptions.cs @@ -0,0 +1,26 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class InvoiceSubscriptionDetailsBillingScheduleBillUntilDurationOptions : INestedOptions + { + /// + /// Specifies billing duration. Either day, week, month or year. + /// One of: day, month, week, or year. + /// + [JsonProperty("interval")] + [STJS.JsonPropertyName("interval")] + public string Interval { get; set; } + + /// + /// The multiplier applied to the interval. + /// + [JsonProperty("interval_count")] + [STJS.JsonPropertyName("interval_count")] + public long? IntervalCount { get; set; } + } +} diff --git a/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsBillingScheduleBillUntilOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsBillingScheduleBillUntilOptions.cs new file mode 100644 index 0000000000..a70403f018 --- /dev/null +++ b/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsBillingScheduleBillUntilOptions.cs @@ -0,0 +1,37 @@ +// 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(STJStripeOptionsConverter))] + public class InvoiceSubscriptionDetailsBillingScheduleBillUntilOptions : INestedOptions + { + /// + /// Specifies the billing period. + /// + [JsonProperty("duration")] + [STJS.JsonPropertyName("duration")] + public InvoiceSubscriptionDetailsBillingScheduleBillUntilDurationOptions Duration { get; set; } + + /// + /// The end date of the billing schedule. + /// + [JsonProperty("timestamp")] + [JsonConverter(typeof(UnixDateTimeConverter))] + [STJS.JsonPropertyName("timestamp")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] + public DateTime? Timestamp { get; set; } + + /// + /// Describes how the billing schedule will determine the end date. Either duration + /// or timestamp. + /// One of: duration, or timestamp. + /// + [JsonProperty("type")] + [STJS.JsonPropertyName("type")] + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsBillingScheduleOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsBillingScheduleOptions.cs new file mode 100644 index 0000000000..d82cc5ae94 --- /dev/null +++ b/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsBillingScheduleOptions.cs @@ -0,0 +1,34 @@ +// 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 InvoiceSubscriptionDetailsBillingScheduleOptions : INestedOptions + { + /// + /// Configure billing schedule differently for individual subscription items. + /// + [JsonProperty("applies_to")] + [STJS.JsonPropertyName("applies_to")] + public List AppliesTo { get; set; } + + /// + /// The end date for the billing schedule. + /// + [JsonProperty("bill_until")] + [STJS.JsonPropertyName("bill_until")] + public InvoiceSubscriptionDetailsBillingScheduleBillUntilOptions BillUntil { get; set; } + + /// + /// Specify a key for the billing schedule. Must be unique to this field, alphanumeric, and + /// up to 200 characters. If not provided, a unique key will be generated. + /// + [JsonProperty("key")] + [STJS.JsonPropertyName("key")] + public string Key { get; set; } + } +} 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/Invoices/InvoiceSubscriptionDetailsOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsOptions.cs index 5e23626ea7..e0ece207d7 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceSubscriptionDetailsOptions.cs @@ -10,6 +10,7 @@ namespace Stripe [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] public class InvoiceSubscriptionDetailsOptions : INestedOptions, IHasSetTracking { + private List billingSchedules; private AnyOf cancelAt; private List defaultTaxRates; @@ -37,6 +38,22 @@ public class InvoiceSubscriptionDetailsOptions : INestedOptions, IHasSetTracking [STJS.JsonPropertyName("billing_mode")] public InvoiceSubscriptionDetailsBillingModeOptions BillingMode { get; set; } + /// + /// Sets the billing schedules for the subscription. + /// + [JsonProperty("billing_schedules", NullValueHandling = NullValueHandling.Ignore)] + [STJS.JsonPropertyName("billing_schedules")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] + public List BillingSchedules + { + get => this.billingSchedules; + set + { + this.billingSchedules = value; + this.SetTracker.Track(); + } + } + /// /// A timestamp at which the subscription should cancel. If set to a date before the current /// period ends, this will cause a proration if prorations have been enabled using 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 a96f0c3777..5f2258bfbf 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentConfirmOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentConfirmOptions.cs @@ -78,14 +78,14 @@ public PaymentIntentAmountDetailsOptions AmountDetails /// 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, 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, payto, pix, promptpay, - /// revolut_pay, samsung_pay, satispay, sepa_debit, - /// sofort, sunbit, swish, twint, upi, + /// revolut_pay, samsung_pay, satispay, scalapay, + /// sepa_debit, sofort, sunbit, swish, twint, upi, /// us_bank_account, wechat_pay, or zip. /// [JsonProperty("excluded_payment_method_types", NullValueHandling = NullValueHandling.Ignore)] @@ -131,9 +131,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 409ca73bd3..e5e1507851 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentCreateOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentCreateOptions.cs @@ -162,14 +162,14 @@ 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, 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, payto, pix, promptpay, - /// revolut_pay, samsung_pay, satispay, sepa_debit, - /// sofort, sunbit, swish, twint, upi, + /// revolut_pay, samsung_pay, satispay, scalapay, + /// sepa_debit, sofort, sunbit, swish, twint, upi, /// us_bank_account, wechat_pay, or zip. /// [JsonProperty("excluded_payment_method_types")] @@ -222,9 +222,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 8778c208c5..d3d011c08b 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. @@ -230,7 +238,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")] @@ -391,6 +399,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. @@ -437,15 +453,15 @@ 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, - /// 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, payto, pix, promptpay, - /// revolut_pay, samsung_pay, satispay, sepa_debit, - /// sofort, sunbit, swish, twint, upi, - /// us_bank_account, wechat_pay, or zip. + /// bancontact, billie, bizum, blik, boleto, + /// cashapp, crypto, customer_balance, eps, fpx, + /// giropay, 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, payto, + /// pix, promptpay, revolut_pay, samsung_pay, satispay, + /// scalapay, sepa_debit, sofort, 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 683491119d..b867758f56 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 PaymentIntentPaymentMethodOptionsCardOptions card; @@ -53,6 +54,7 @@ public class PaymentIntentPaymentMethodOptionsOptions : INestedOptions, IHasSetT private PaymentIntentPaymentMethodOptionsRevolutPayOptions revolutPay; private PaymentIntentPaymentMethodOptionsSamsungPayOptions samsungPay; private PaymentIntentPaymentMethodOptionsSatispayOptions satispay; + private PaymentIntentPaymentMethodOptionsScalapayOptions scalapay; private PaymentIntentPaymentMethodOptionsSepaDebitOptions sepaDebit; private PaymentIntentPaymentMethodOptionsSofortOptions sofort; private PaymentIntentPaymentMethodOptionsSwishOptions swish; @@ -236,6 +238,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. @@ -526,7 +545,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")] @@ -830,6 +849,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 a0339fd948..41052d37cb 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentService.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentService.cs @@ -290,9 +290,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) { @@ -323,9 +325,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 2ab21d6a56..69a505310c 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentUpdateOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentUpdateOptions.cs @@ -134,14 +134,14 @@ 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, 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, payto, pix, promptpay, - /// revolut_pay, samsung_pay, satispay, sepa_debit, - /// sofort, sunbit, swish, twint, upi, + /// revolut_pay, samsung_pay, satispay, scalapay, + /// sepa_debit, sofort, sunbit, swish, twint, upi, /// us_bank_account, wechat_pay, or zip. /// [JsonProperty("excluded_payment_method_types", NullValueHandling = NullValueHandling.Ignore)] 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 5a358892bd..b5af27b2ff 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, - /// grabpay, ideal, klarna, konbini, link, mb_way, - /// mobilepay, multibanco, oxxo, p24, pay_by_bank, - /// paynow, paypal, payto, pix, promptpay, - /// satispay, sepa_debit, 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, grabpay, ideal, klarna, konbini, + /// link, mb_way, mobilepay, multibanco, oxxo, + /// p24, pay_by_bank, paynow, paypal, payto, pix, + /// promptpay, satispay, sepa_debit, 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 02364ec1b1..db7bbdc798 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,19 +197,36 @@ 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, - /// grabpay, ideal, klarna, konbini, link, mb_way, - /// mobilepay, multibanco, oxxo, p24, pay_by_bank, - /// paynow, paypal, payto, pix, promptpay, - /// satispay, sepa_debit, 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, grabpay, ideal, klarna, konbini, + /// link, mb_way, mobilepay, multibanco, oxxo, + /// p24, pay_by_bank, paynow, paypal, payto, pix, + /// promptpay, satispay, sepa_debit, 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 cc849f65a7..bdb6800bac 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 @@ -492,9 +500,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 c9a017f213..c99eb2fdf3 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 @@ -492,9 +500,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 4c1dd1e17b..cd21d343e1 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. @@ -258,7 +266,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")] @@ -426,6 +434,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. @@ -472,15 +488,16 @@ 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, 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, /// payto, pix, promptpay, revolut_pay, samsung_pay, - /// satispay, sepa_debit, sofort, sunbit, swish, - /// twint, upi, us_bank_account, wechat_pay, or zip. + /// satispay, scalapay, sepa_debit, sofort, 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 f6eba8c01e..66634b98e9 100644 --- a/src/Stripe.net/Services/PaymentMethods/PaymentMethodListOptions.cs +++ b/src/Stripe.net/Services/PaymentMethods/PaymentMethodListOptions.cs @@ -39,15 +39,16 @@ 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, 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, /// payto, pix, promptpay, revolut_pay, samsung_pay, - /// satispay, sepa_debit, sofort, sunbit, swish, - /// twint, upi, us_bank_account, wechat_pay, or zip. + /// satispay, scalapay, sepa_debit, sofort, 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/SetupIntents/SetupIntentCreateOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentCreateOptions.cs index cf62fe1273..c6c0dd3774 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentCreateOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentCreateOptions.cs @@ -85,14 +85,14 @@ 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, 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, payto, pix, promptpay, - /// revolut_pay, samsung_pay, satispay, sepa_debit, - /// sofort, sunbit, swish, twint, upi, + /// revolut_pay, samsung_pay, satispay, scalapay, + /// sepa_debit, sofort, sunbit, swish, twint, upi, /// us_bank_account, wechat_pay, or zip. /// [JsonProperty("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 6d8b864c4e..428b637ca6 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. @@ -230,7 +238,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")] @@ -391,6 +399,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. @@ -437,15 +453,15 @@ 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, - /// 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, payto, pix, promptpay, - /// revolut_pay, samsung_pay, satispay, sepa_debit, - /// sofort, sunbit, swish, twint, upi, - /// us_bank_account, wechat_pay, or zip. + /// bancontact, billie, bizum, blik, boleto, + /// cashapp, crypto, customer_balance, eps, fpx, + /// giropay, 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, payto, + /// pix, promptpay, revolut_pay, samsung_pay, satispay, + /// scalapay, sepa_debit, sofort, 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 78ccf49315..dc4fd1f604 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentUpdateOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentUpdateOptions.cs @@ -58,14 +58,14 @@ 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, 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, payto, pix, promptpay, - /// revolut_pay, samsung_pay, satispay, sepa_debit, - /// sofort, sunbit, swish, twint, upi, + /// revolut_pay, samsung_pay, satispay, scalapay, + /// sepa_debit, sofort, sunbit, swish, twint, upi, /// us_bank_account, wechat_pay, or zip. /// [JsonProperty("excluded_payment_method_types", NullValueHandling = NullValueHandling.Ignore)] diff --git a/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemCreateOptions.cs b/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemCreateOptions.cs index c901ab704d..b964de99cd 100644 --- a/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemCreateOptions.cs +++ b/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemCreateOptions.cs @@ -58,33 +58,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 4f1e64ec86..27dccacebb 100644 --- a/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemUpdateOptions.cs +++ b/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemUpdateOptions.cs @@ -76,33 +76,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/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/SubscriptionBillingScheduleAppliesToOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionBillingScheduleAppliesToOptions.cs new file mode 100644 index 0000000000..9545ca80dd --- /dev/null +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionBillingScheduleAppliesToOptions.cs @@ -0,0 +1,25 @@ +// 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 SubscriptionBillingScheduleAppliesToOptions : INestedOptions + { + /// + /// The ID of the price object. + /// + [JsonProperty("price")] + [STJS.JsonPropertyName("price")] + public string Price { get; set; } + + /// + /// Controls which subscription items the billing schedule applies to. + /// + [JsonProperty("type")] + [STJS.JsonPropertyName("type")] + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionBillingScheduleBillUntilDurationOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionBillingScheduleBillUntilDurationOptions.cs new file mode 100644 index 0000000000..6d69ad2a99 --- /dev/null +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionBillingScheduleBillUntilDurationOptions.cs @@ -0,0 +1,26 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class SubscriptionBillingScheduleBillUntilDurationOptions : INestedOptions + { + /// + /// Specifies billing duration. Either day, week, month or year. + /// One of: day, month, week, or year. + /// + [JsonProperty("interval")] + [STJS.JsonPropertyName("interval")] + public string Interval { get; set; } + + /// + /// The multiplier applied to the interval. + /// + [JsonProperty("interval_count")] + [STJS.JsonPropertyName("interval_count")] + public long? IntervalCount { get; set; } + } +} diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionBillingScheduleBillUntilOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionBillingScheduleBillUntilOptions.cs new file mode 100644 index 0000000000..069696c9d9 --- /dev/null +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionBillingScheduleBillUntilOptions.cs @@ -0,0 +1,37 @@ +// 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(STJStripeOptionsConverter))] + public class SubscriptionBillingScheduleBillUntilOptions : INestedOptions + { + /// + /// Specifies the billing period. + /// + [JsonProperty("duration")] + [STJS.JsonPropertyName("duration")] + public SubscriptionBillingScheduleBillUntilDurationOptions Duration { get; set; } + + /// + /// The end date of the billing schedule. + /// + [JsonProperty("timestamp")] + [JsonConverter(typeof(UnixDateTimeConverter))] + [STJS.JsonPropertyName("timestamp")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] + public DateTime? Timestamp { get; set; } + + /// + /// Describes how the billing schedule will determine the end date. Either duration + /// or timestamp. + /// One of: duration, or timestamp. + /// + [JsonProperty("type")] + [STJS.JsonPropertyName("type")] + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionBillingScheduleOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionBillingScheduleOptions.cs new file mode 100644 index 0000000000..0bc6ba3d3b --- /dev/null +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionBillingScheduleOptions.cs @@ -0,0 +1,34 @@ +// 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 SubscriptionBillingScheduleOptions : INestedOptions + { + /// + /// Configure billing schedule differently for individual subscription items. + /// + [JsonProperty("applies_to")] + [STJS.JsonPropertyName("applies_to")] + public List AppliesTo { get; set; } + + /// + /// The end date for the billing schedule. + /// + [JsonProperty("bill_until")] + [STJS.JsonPropertyName("bill_until")] + public SubscriptionBillingScheduleBillUntilOptions BillUntil { get; set; } + + /// + /// Specify a key for the billing schedule. Must be unique to this field, alphanumeric, and + /// up to 200 characters. If not provided, a unique key will be generated. + /// + [JsonProperty("key")] + [STJS.JsonPropertyName("key")] + public string Key { 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 31600b0438..f0194d3812 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionCreateOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionCreateOptions.cs @@ -94,6 +94,13 @@ public decimal? ApplicationFeePercent [STJS.JsonPropertyName("billing_mode")] public SubscriptionBillingModeOptions BillingMode { get; set; } + /// + /// Sets the billing schedules for the subscription. + /// + [JsonProperty("billing_schedules")] + [STJS.JsonPropertyName("billing_schedules")] + public List BillingSchedules { get; set; } + /// /// Define thresholds at which an invoice will be sent, and the subscription advanced to a /// new billing period. When updating, pass an empty string to remove previously-defined @@ -302,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/SubscriptionPaymentSettingsOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsOptions.cs index c71a401d4a..4247052d75 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionPaymentSettingsOptions.cs @@ -38,8 +38,8 @@ public class SubscriptionPaymentSettingsOptions : INestedOptions, IHasSetTrackin /// konbini, kr_card, link, multibanco, naver_pay, /// nz_bank_account, p24, pay_by_bank, payco, paynow, /// paypal, payto, pix, promptpay, revolut_pay, - /// sepa_credit_transfer, sepa_debit, sofort, swish, upi, - /// us_bank_account, or wechat_pay. + /// sepa_credit_transfer, sepa_debit, sofort, 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/SubscriptionService.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionService.cs index 478869a6d9..02eecfe034 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionService.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionService.cs @@ -31,8 +31,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 ///

///

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) { @@ -217,12 +223,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) { diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionUpdateOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionUpdateOptions.cs index 4a74c6d67f..c52612f50f 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionUpdateOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionUpdateOptions.cs @@ -11,6 +11,7 @@ namespace Stripe public class SubscriptionUpdateOptions : BaseOptions, IHasMetadata { private decimal? applicationFeePercent; + private List billingSchedules; private SubscriptionBillingThresholdsOptions billingThresholds; private AnyOf cancelAt; private string defaultSource; @@ -71,6 +72,22 @@ public decimal? ApplicationFeePercent [STJS.JsonPropertyName("billing_cycle_anchor")] public SubscriptionBillingCycleAnchor BillingCycleAnchor { get; set; } + /// + /// Sets the billing schedules for the subscription. + /// + [JsonProperty("billing_schedules", NullValueHandling = NullValueHandling.Ignore)] + [STJS.JsonPropertyName("billing_schedules")] + [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingNull)] + public List BillingSchedules + { + get => this.billingSchedules; + set + { + this.billingSchedules = value; + this.SetTracker.Track(); + } + } + /// /// Define thresholds at which an invoice will be sent, and the subscription advanced to a /// new billing period. When updating, pass an empty string to remove previously-defined @@ -217,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")] @@ -310,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 4e523f6361..baeee038b8 100644 --- a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationCreateOptions.cs +++ b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationCreateOptions.cs @@ -103,6 +103,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. /// @@ -110,6 +117,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 e972752a95..7f8d4d6c4b 100644 --- a/src/Stripe.net/Services/Terminal/Configurations/ConfigurationUpdateOptions.cs +++ b/src/Stripe.net/Services/Terminal/Configurations/ConfigurationUpdateOptions.cs @@ -16,7 +16,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; /// @@ -154,6 +158,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. /// @@ -170,6 +190,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 8ab9a7b029..6db5cab05e 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. @@ -230,7 +238,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")] @@ -391,6 +399,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. @@ -437,15 +453,15 @@ 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, - /// 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, payto, pix, promptpay, - /// revolut_pay, samsung_pay, satispay, sepa_debit, - /// sofort, sunbit, swish, twint, upi, - /// us_bank_account, wechat_pay, or zip. + /// bancontact, billie, bizum, blik, boleto, + /// cashapp, crypto, customer_balance, eps, fpx, + /// giropay, 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, payto, + /// pix, promptpay, revolut_pay, samsung_pay, satispay, + /// scalapay, sepa_debit, sofort, 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/Billing/MeterEventAdjustments/MeterEventAdjustmentCreateCancelOptions.cs b/src/Stripe.net/Services/V2/Billing/MeterEventAdjustments/MeterEventAdjustmentCreateCancelOptions.cs index 218a315c11..17c17308c1 100644 --- a/src/Stripe.net/Services/V2/Billing/MeterEventAdjustments/MeterEventAdjustmentCreateCancelOptions.cs +++ b/src/Stripe.net/Services/V2/Billing/MeterEventAdjustments/MeterEventAdjustmentCreateCancelOptions.cs @@ -9,8 +9,8 @@ namespace Stripe.V2.Billing public class MeterEventAdjustmentCreateCancelOptions : INestedOptions { /// - /// Unique identifier for the event. You can only cancel events within 24 hours of Stripe - /// receiving them. + /// The identifier that was originally assigned to the meter event. You can only cancel + /// events within 24 hours of Stripe receiving them. /// [JsonProperty("identifier")] [STJS.JsonPropertyName("identifier")] diff --git a/src/Stripe.net/Services/V2/Billing/MeterEventAdjustments/MeterEventAdjustmentCreateOptions.cs b/src/Stripe.net/Services/V2/Billing/MeterEventAdjustments/MeterEventAdjustmentCreateOptions.cs index 2e0c733b99..9c82f4fe27 100644 --- a/src/Stripe.net/Services/V2/Billing/MeterEventAdjustments/MeterEventAdjustmentCreateOptions.cs +++ b/src/Stripe.net/Services/V2/Billing/MeterEventAdjustments/MeterEventAdjustmentCreateOptions.cs @@ -23,8 +23,7 @@ public class MeterEventAdjustmentCreateOptions : BaseOptions public string EventName { get; set; } /// - /// Specifies whether to cancel a single event or a range of events for a time period. Time - /// period cancellation is not supported yet. + /// Specifies the type of cancellation. Currently supports canceling a single event. /// [JsonProperty("type")] [STJS.JsonPropertyName("type")] diff --git a/src/Stripe.net/Services/V2/Billing/MeterEventSessions/MeterEventSessionService.cs b/src/Stripe.net/Services/V2/Billing/MeterEventSessions/MeterEventSessionService.cs index f8119c7394..4587e70fc5 100644 --- a/src/Stripe.net/Services/V2/Billing/MeterEventSessions/MeterEventSessionService.cs +++ b/src/Stripe.net/Services/V2/Billing/MeterEventSessions/MeterEventSessionService.cs @@ -20,8 +20,8 @@ internal MeterEventSessionService(IStripeClient client) /// /// Creates a meter event session to send usage on the high-throughput meter event stream. - /// Authentication tokens are only valid for 15 minutes, so you will need to create a new - /// meter event session when your token expires. + /// Authentication tokens are only valid for 15 minutes, so you need to create a new meter + /// event session when your token expires. /// public virtual MeterEventSession Create(MeterEventSessionCreateOptions options, RequestOptions requestOptions = null) { @@ -30,8 +30,8 @@ public virtual MeterEventSession Create(MeterEventSessionCreateOptions options, /// /// Creates a meter event session to send usage on the high-throughput meter event stream. - /// Authentication tokens are only valid for 15 minutes, so you will need to create a new - /// meter event session when your token expires. + /// Authentication tokens are only valid for 15 minutes, so you need to create a new meter + /// event session when your token expires. /// public virtual Task CreateAsync(MeterEventSessionCreateOptions options, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) { diff --git a/src/Stripe.net/Services/V2/Commerce/ProductCatalog/Imports/ImportCreateOptions.cs b/src/Stripe.net/Services/V2/Commerce/ProductCatalog/Imports/ImportCreateOptions.cs new file mode 100644 index 0000000000..bfafdaba7b --- /dev/null +++ b/src/Stripe.net/Services/V2/Commerce/ProductCatalog/Imports/ImportCreateOptions.cs @@ -0,0 +1,35 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Commerce.ProductCatalog +{ + using System.Collections.Generic; + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class ImportCreateOptions : BaseOptions, IHasMetadata + { + /// + /// The type of catalog data to import. + /// One of: inventory, pricing, or product. + /// + [JsonProperty("feed_type")] + [STJS.JsonPropertyName("feed_type")] + public string FeedType { get; set; } + + /// + /// Additional information about the import in a structured format. + /// + [JsonProperty("metadata")] + [STJS.JsonPropertyName("metadata")] + public Dictionary Metadata { get; set; } + + /// + /// The strategy for handling existing catalog data during import. + /// One of: replace, or upsert. + /// + [JsonProperty("mode")] + [STJS.JsonPropertyName("mode")] + public string Mode { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Commerce/ProductCatalog/Imports/ImportGetOptions.cs b/src/Stripe.net/Services/V2/Commerce/ProductCatalog/Imports/ImportGetOptions.cs new file mode 100644 index 0000000000..ca1735f434 --- /dev/null +++ b/src/Stripe.net/Services/V2/Commerce/ProductCatalog/Imports/ImportGetOptions.cs @@ -0,0 +1,12 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Commerce.ProductCatalog +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class ImportGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/V2/Commerce/ProductCatalog/Imports/ImportListOptions.cs b/src/Stripe.net/Services/V2/Commerce/ProductCatalog/Imports/ImportListOptions.cs new file mode 100644 index 0000000000..26fe8b5688 --- /dev/null +++ b/src/Stripe.net/Services/V2/Commerce/ProductCatalog/Imports/ImportListOptions.cs @@ -0,0 +1,69 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Commerce.ProductCatalog +{ + using System; + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class ImportListOptions : V2.ListOptions + { + /// + /// Filter for objects created at the specified timestamp. Must be an RFC 3339 date & + /// time value, for example: 2022-09-18T13:22:00Z. + /// + [JsonProperty("created")] + [STJS.JsonPropertyName("created")] + public DateTime? Created { get; set; } + + /// + /// Filter for objects created after the specified timestamp. Must be an RFC 3339 date & + /// time value, for example: 2022-09-18T13:22:00Z. + /// + [JsonProperty("created_gt")] + [STJS.JsonPropertyName("created_gt")] + public DateTime? CreatedGt { get; set; } + + /// + /// Filter for objects created on or after the specified timestamp. Must be an RFC 3339 date + /// & time value, for example: 2022-09-18T13:22:00Z. + /// + [JsonProperty("created_gte")] + [STJS.JsonPropertyName("created_gte")] + public DateTime? CreatedGte { get; set; } + + /// + /// Filter for objects created before the specified timestamp. Must be an RFC 3339 date + /// & time value, for example: 2022-09-18T13:22:00Z. + /// + [JsonProperty("created_lt")] + [STJS.JsonPropertyName("created_lt")] + public DateTime? CreatedLt { get; set; } + + /// + /// Filter for objects created on or before the specified timestamp. Must be an RFC 3339 + /// date & time value, for example: 2022-09-18T13:22:00Z. + /// + [JsonProperty("created_lte")] + [STJS.JsonPropertyName("created_lte")] + public DateTime? CreatedLte { get; set; } + + /// + /// Filter by the type of feed data being imported. + /// One of: inventory, pricing, or product. + /// + [JsonProperty("feed_type")] + [STJS.JsonPropertyName("feed_type")] + public string FeedType { get; set; } + + /// + /// Filter by import status. + /// One of: awaiting_upload, failed, processing, succeeded, or + /// succeeded_with_errors. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Commerce/ProductCatalog/Imports/ImportService.cs b/src/Stripe.net/Services/V2/Commerce/ProductCatalog/Imports/ImportService.cs new file mode 100644 index 0000000000..1cf8dccc59 --- /dev/null +++ b/src/Stripe.net/Services/V2/Commerce/ProductCatalog/Imports/ImportService.cs @@ -0,0 +1,87 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Commerce.ProductCatalog +{ + using System; + using System.Collections.Generic; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + public class ImportService : Service + { + internal ImportService(ApiRequestor requestor) + : base(requestor) + { + } + + internal ImportService(IStripeClient client) + : base(client) + { + } + + /// + /// Creates a ProductCatalogImport. + /// + public virtual V2.Commerce.ProductCatalogImport Create(ImportCreateOptions options, RequestOptions requestOptions = null) + { + return this.Request(BaseAddress.Api, HttpMethod.Post, $"/v2/commerce/product_catalog/imports", options, requestOptions); + } + + /// + /// Creates a ProductCatalogImport. + /// + public virtual Task CreateAsync(ImportCreateOptions options, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.RequestAsync(BaseAddress.Api, HttpMethod.Post, $"/v2/commerce/product_catalog/imports", options, requestOptions, cancellationToken); + } + + /// + /// Retrieves a ProductCatalogImport by ID. + /// + public virtual V2.Commerce.ProductCatalogImport Get(string id, ImportGetOptions options = null, RequestOptions requestOptions = null) + { + return this.Request(BaseAddress.Api, HttpMethod.Get, $"/v2/commerce/product_catalog/imports/{WebUtility.UrlEncode(id)}", options, requestOptions); + } + + /// + /// Retrieves a ProductCatalogImport by ID. + /// + public virtual Task GetAsync(string id, ImportGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.RequestAsync(BaseAddress.Api, HttpMethod.Get, $"/v2/commerce/product_catalog/imports/{WebUtility.UrlEncode(id)}", options, requestOptions, cancellationToken); + } + + /// + /// Returns a list of ProductCatalogImport objects. + /// + public virtual V2.StripeList List(ImportListOptions options = null, RequestOptions requestOptions = null) + { + return this.Request>(BaseAddress.Api, HttpMethod.Get, $"/v2/commerce/product_catalog/imports", options, requestOptions); + } + + /// + /// Returns a list of ProductCatalogImport objects. + /// + public virtual Task> ListAsync(ImportListOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.RequestAsync>(BaseAddress.Api, HttpMethod.Get, $"/v2/commerce/product_catalog/imports", options, requestOptions, cancellationToken); + } + + /// + /// Returns a list of ProductCatalogImport objects. + /// + public virtual IEnumerable ListAutoPaging(ImportListOptions options = null, RequestOptions requestOptions = null) + { + return this.ListRequestAutoPaging($"/v2/commerce/product_catalog/imports", options, requestOptions); + } + + /// + /// Returns a list of ProductCatalogImport objects. + /// + public virtual IAsyncEnumerable ListAutoPagingAsync(ImportListOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.ListRequestAutoPagingAsync($"/v2/commerce/product_catalog/imports", options, requestOptions, cancellationToken); + } + } +} diff --git a/src/Stripe.net/Services/V2/Commerce/ProductCatalogService.cs b/src/Stripe.net/Services/V2/Commerce/ProductCatalogService.cs new file mode 100644 index 0000000000..8acb03286b --- /dev/null +++ b/src/Stripe.net/Services/V2/Commerce/ProductCatalogService.cs @@ -0,0 +1,25 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Commerce +{ + using System; + using System.Threading; + using System.Threading.Tasks; + + public class ProductCatalogService : Service + { + private V2.Commerce.ProductCatalog.ImportService imports; + + internal ProductCatalogService(ApiRequestor requestor) + : base(requestor) + { + } + + internal ProductCatalogService(IStripeClient client) + : base(client) + { + } + + public virtual V2.Commerce.ProductCatalog.ImportService Imports => this.imports ??= new V2.Commerce.ProductCatalog.ImportService( + this.Requestor); + } +} diff --git a/src/Stripe.net/Services/V2/CommerceService.cs b/src/Stripe.net/Services/V2/CommerceService.cs new file mode 100644 index 0000000000..31e733ec93 --- /dev/null +++ b/src/Stripe.net/Services/V2/CommerceService.cs @@ -0,0 +1,25 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2 +{ + using System; + using System.Threading; + using System.Threading.Tasks; + + public class CommerceService : Service + { + private V2.Commerce.ProductCatalogService productCatalog; + + internal CommerceService(ApiRequestor requestor) + : base(requestor) + { + } + + internal CommerceService(IStripeClient client) + : base(client) + { + } + + public virtual V2.Commerce.ProductCatalogService ProductCatalog => this.productCatalog ??= new V2.Commerce.ProductCatalogService( + this.Requestor); + } +} 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 9f9fabb28c..b909da22c3 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 81e5d73c96..a175bc07e7 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 80f7369656..bd8c1190e5 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/Accounts/PersonTokens/PersonTokenService.cs b/src/Stripe.net/Services/V2/Core/Accounts/PersonTokens/PersonTokenService.cs index 3f143c12b4..8b3cfb8f5f 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/PersonTokens/PersonTokenService.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/PersonTokens/PersonTokenService.cs @@ -20,7 +20,11 @@ internal PersonTokenService(IStripeClient client) } /// - /// Creates a Person Token associated with an Account. + /// Creates a single-use token that represents the details for a person. Use this when you + /// create or update persons associated with an Account v2. Learn more about account tokens. You can only + /// create person tokens with your application's publishable key and in live mode. You can + /// use your application's secret key to create person tokens only in test mode. /// public virtual V2.Core.AccountPersonToken Create(string id, PersonTokenCreateOptions options, RequestOptions requestOptions = null) { @@ -28,7 +32,11 @@ public virtual V2.Core.AccountPersonToken Create(string id, PersonTokenCreateOpt } /// - /// Creates a Person Token associated with an Account. + /// Creates a single-use token that represents the details for a person. Use this when you + /// create or update persons associated with an Account v2. Learn more about account tokens. You can only + /// create person tokens with your application's publishable key and in live mode. You can + /// use your application's secret key to create person tokens only in test mode. /// public virtual Task CreateAsync(string id, PersonTokenCreateOptions options, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) { diff --git a/src/Stripe.net/Services/V2/Core/EventDestinations/EventDestinationCreateAzureEventGridOptions.cs b/src/Stripe.net/Services/V2/Core/EventDestinations/EventDestinationCreateAzureEventGridOptions.cs new file mode 100644 index 0000000000..2cfde0d091 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/EventDestinations/EventDestinationCreateAzureEventGridOptions.cs @@ -0,0 +1,32 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class EventDestinationCreateAzureEventGridOptions : INestedOptions + { + /// + /// The Azure region. + /// + [JsonProperty("azure_region")] + [STJS.JsonPropertyName("azure_region")] + public string AzureRegion { get; set; } + + /// + /// The name of the Azure resource group. + /// + [JsonProperty("azure_resource_group_name")] + [STJS.JsonPropertyName("azure_resource_group_name")] + public string AzureResourceGroupName { get; set; } + + /// + /// The Azure subscription ID. + /// + [JsonProperty("azure_subscription_id")] + [STJS.JsonPropertyName("azure_subscription_id")] + public string AzureSubscriptionId { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/EventDestinations/EventDestinationCreateOptions.cs b/src/Stripe.net/Services/V2/Core/EventDestinations/EventDestinationCreateOptions.cs index dfaa80be6a..75972ce8d9 100644 --- a/src/Stripe.net/Services/V2/Core/EventDestinations/EventDestinationCreateOptions.cs +++ b/src/Stripe.net/Services/V2/Core/EventDestinations/EventDestinationCreateOptions.cs @@ -16,6 +16,13 @@ public class EventDestinationCreateOptions : BaseOptions, IHasMetadata [STJS.JsonPropertyName("amazon_eventbridge")] public EventDestinationCreateAmazonEventbridgeOptions AmazonEventbridge { get; set; } + /// + /// Azure Event Grid configuration. + /// + [JsonProperty("azure_event_grid")] + [STJS.JsonPropertyName("azure_event_grid")] + public EventDestinationCreateAzureEventGridOptions AzureEventGrid { get; set; } + /// /// An optional description of what the event destination is used for. /// @@ -81,7 +88,7 @@ public class EventDestinationCreateOptions : BaseOptions, IHasMetadata /// /// Event destination type. - /// One of: amazon_eventbridge, or webhook_endpoint. + /// One of: amazon_eventbridge, azure_event_grid, or webhook_endpoint. /// [JsonProperty("type")] [STJS.JsonPropertyName("type")] 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/V2Services.cs b/src/Stripe.net/Services/V2Services.cs index 0a6ba0365d..d3b80dbec0 100644 --- a/src/Stripe.net/Services/V2Services.cs +++ b/src/Stripe.net/Services/V2Services.cs @@ -8,6 +8,7 @@ namespace Stripe public class V2Services : Service { private V2.BillingService billing; + private V2.CommerceService commerce; private V2.CoreService core; internal V2Services(ApiRequestor requestor) @@ -23,6 +24,9 @@ internal V2Services(IStripeClient client) public virtual V2.BillingService Billing => this.billing ??= new V2.BillingService( this.Requestor); + public virtual V2.CommerceService Commerce => this.commerce ??= new V2.CommerceService( + this.Requestor); + public virtual V2.CoreService Core => this.core ??= new V2.CoreService( this.Requestor); } diff --git a/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointCreateOptions.cs b/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointCreateOptions.cs index 8975b0ad09..b39c8ee039 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 04ed738ec9..8c086cfc4f 100644 --- a/src/StripeTests/Services/GeneratedExamplesTest.cs +++ b/src/StripeTests/Services/GeneratedExamplesTest.cs @@ -6255,6 +6255,66 @@ public void TestV2BillingMeterEventStreamPost() "/v2/billing/meter_event_stream"); } + [Fact] + public void TestV2CommerceProductCatalogImportGet() + { + this.StubRequest( + HttpMethod.Get, + "/v2/commerce/product_catalog/imports", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.commerce.product_catalog_import\",\"created\":\"1970-01-12T21:42:34.472Z\",\"feed_type\":\"pricing\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"status\":\"awaiting_upload\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Commerce.ProductCatalog.Imports; + Stripe.V2.StripeList productCatalogImports = service + .List(); + this.AssertRequest( + HttpMethod.Get, + "/v2/commerce/product_catalog/imports"); + } + + [Fact] + public void TestV2CommerceProductCatalogImportPost() + { + this.StubRequest( + HttpMethod.Post, + "/v2/commerce/product_catalog/imports", + (HttpStatusCode)200, + "{\"object\":\"v2.commerce.product_catalog_import\",\"created\":\"1970-01-12T21:42:34.472Z\",\"feed_type\":\"pricing\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"status\":\"awaiting_upload\"}"); + var options = new Stripe.V2.Commerce.ProductCatalog.ImportCreateOptions + { + FeedType = "pricing", + Metadata = new Dictionary + { + { "key", "metadata" }, + }, + Mode = "upsert", + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Commerce.ProductCatalog.Imports; + Stripe.V2.Commerce.ProductCatalogImport productCatalogImport = service + .Create(options); + this.AssertRequest( + HttpMethod.Post, + "/v2/commerce/product_catalog/imports"); + } + + [Fact] + public void TestV2CommerceProductCatalogImportGet2() + { + this.StubRequest( + HttpMethod.Get, + "/v2/commerce/product_catalog/imports/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.commerce.product_catalog_import\",\"created\":\"1970-01-12T21:42:34.472Z\",\"feed_type\":\"pricing\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"status\":\"awaiting_upload\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Commerce.ProductCatalog.Imports; + Stripe.V2.Commerce.ProductCatalogImport productCatalogImport = service + .Get("id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/commerce/product_catalog/imports/id_123"); + } + [Fact] public void TestV2CoreAccountGet() { From c9c04ba45867d5d8d122ed72794b1f48ba878442 Mon Sep 17 00:00:00 2001 From: Michael Broshi Date: Wed, 27 May 2026 16:22:08 -0400 Subject: [PATCH 03/16] Bump version to 51.2.0 --- CHANGELOG.md | 35 +++++++++++++++++++++++++++++ VERSION | 2 +- src/Stripe.net/Constants/Version.cs | 2 +- src/Stripe.net/Stripe.net.csproj | 2 +- 4 files changed, 38 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 439256348b..ec3443df36 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,40 @@ # Changelog +## 51.2.0 - 2026-05-27 +This release changes the pinned API version to 2026-05-27.dahlia. + +* [#3386](https://github.com/stripe/stripe-dotnet/pull/3386) Update generated code + * Add support for new resource `V2.Commerce.ProductCatalogImport` + * Add support for `Create` and `Get` methods on resource `V2.Commerce.ProductCatalogImport` + * Add support for `BizumPayments` and `ScalapayPayments` on `Account.Capabilities` and `AccountCapabilitiesOptions` + * Add support for `AutomaticTransferRulesByCurrency` on `BalanceSettings.Payments.Payouts` and `BalanceSettingsPaymentsPayoutsOptions` + * Add support for `StartOfDay` on `BalanceSettings.Payments.SettlementTiming` and `BalanceSettingsPaymentsSettlementTimingOptions` + * Add support for `Description` on `ChargeTransferDataOptions`, `PaymentIntent.TransferData`, and `PaymentIntentTransferDataOptions` + * Add support for `Bizum` on `Charge.PaymentMethodDetails`, `ConfirmationToken.PaymentMethodPreview`, `ConfirmationTokenPaymentMethodDataOptions`, `PaymentAttemptRecord.PaymentMethodDetails`, `PaymentIntent.PaymentMethodOptions`, `PaymentIntentPaymentMethodDataOptions`, `PaymentIntentPaymentMethodOptionsOptions`, `PaymentMethodConfigurationCreateOptions`, `PaymentMethodConfigurationUpdateOptions`, `PaymentMethodConfiguration`, `PaymentMethodCreateOptions`, `PaymentMethod`, `PaymentRecord.PaymentMethodDetails`, `SetupIntent.PaymentMethodOptions`, `SetupIntentPaymentMethodDataOptions`, and `SetupIntentPaymentMethodOptionsOptions` + * Add support for `Scalapay` on `Charge.PaymentMethodDetails`, `Checkout.Session.PaymentMethodOptions`, `CheckoutSessionPaymentMethodOptionsOptions`, `ConfirmationToken.PaymentMethodPreview`, `ConfirmationTokenPaymentMethodDataOptions`, `PaymentAttemptRecord.PaymentMethodDetails`, `PaymentIntent.PaymentMethodOptions`, `PaymentIntentPaymentMethodDataOptions`, `PaymentIntentPaymentMethodOptionsOptions`, `PaymentMethodConfigurationCreateOptions`, `PaymentMethodConfigurationUpdateOptions`, `PaymentMethodConfiguration`, `PaymentMethodCreateOptions`, `PaymentMethod`, `PaymentRecord.PaymentMethodDetails`, `Refund.DestinationDetails`, and `SetupIntentPaymentMethodDataOptions` + * Add support for `Mandate` on `Charge.PaymentMethodDetails.Twint`, `PaymentAttemptRecord.PaymentMethodDetails.Twint`, and `PaymentRecord.PaymentMethodDetails.Twint` + * Change type of `CheckoutSessionPaymentMethodOptionsTwintOptions.SetupFutureUsage` and `PaymentIntentPaymentMethodOptionsTwintOptions.SetupFutureUsage` from `literal('none')` to `enum('none'|'off_session')` + * ⚠️ Change type of `Checkout.Session.PaymentMethodOptions.Twint.SetupFutureUsage` and `PaymentIntent.PaymentMethodOptions.Twint.SetupFutureUsage` from `literal('none')` to `enum('none'|'off_session')` + * Add support for `CreditedItems` on `InvoiceItem.ProrationDetails` + * Add support for `Discountable` on `InvoiceScheduleDetailsPhaseAddInvoiceItemOptions`, `SubscriptionAddInvoiceItemOptions`, `SubscriptionSchedule.Phase.AddInvoiceItem`, and `SubscriptionSchedulePhaseAddInvoiceItemOptions` + * Add support for `BillingSchedules` on `InvoiceSubscriptionDetailsOptions`, `SubscriptionCreateOptions`, `SubscriptionUpdateOptions`, and `Subscription` + * Add support for `AmountPaidOffStripe` on `Invoice` + * Add support for `Twint` on `Mandate.PaymentMethodDetails` and `SetupAttempt.PaymentMethodDetails` + * Add support for `Metadata` on `PaymentIntent.TransferData`, `PaymentIntentTransferDataOptions`, and `Subscription.PendingUpdate` + * Add support for `PaymentData` on `PaymentIntent.TransferData` and `PaymentIntentTransferDataOptions` + * Add support for `BlikAuthorize` on `PaymentIntent.NextAction` and `SetupIntent.NextAction` + * Add support for `PaymentMethodOptions` on `PaymentLinkCreateOptions`, `PaymentLinkUpdateOptions`, and `PaymentLink` + * Add support for `Active` on `PaymentMethodConfigurationListOptions` + * Add support for `BilledUntil` on `SubscriptionItem` + * Add support for `Discount` and `Discounts` on `Subscription.PendingUpdate` + * Add support for `VerifoneM425`, `VerifoneP630`, `VerifoneUx700`, and `VerifoneV660p` on `Terminal.ConfigurationCreateOptions`, `Terminal.ConfigurationUpdateOptions`, and `Terminal.Configuration` + * Add support for `ApiError` and `PrintContent` on `Terminal.Reader.Action` + * Add support for `Customer` on `TestHelpers.TestClockCreateOptions` + * Add support for `Signer` on `V2.Core.Account.Identity.BusinessDetails.Documents.ProofOfRegistration`, `V2.Core.Account.Identity.BusinessDetails.Documents.ProofOfUltimateBeneficialOwnership`, `V2CoreAccountIdentityBusinessDetailsDocumentsProofOfRegistrationOptions`, `V2CoreAccountIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnershipOptions`, `V2CoreAccountTokenIdentityBusinessDetailsDocumentsProofOfRegistrationOptions`, and `V2CoreAccountTokenIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnershipOptions` + * Add support for `AzureEventGrid` on `V2.Core.EventDestinationCreateOptions` and `V2.Core.EventDestination` + * Add support for event notifications `V2CommerceProductCatalogImportsFailedEvent`, `V2CommerceProductCatalogImportsProcessingEvent`, `V2CommerceProductCatalogImportsSucceededEvent`, and `V2CommerceProductCatalogImportsSucceededWithErrorsEvent` with related object `V2.Commerce.ProductCatalogImport` +* [#3385](https://github.com/stripe/stripe-dotnet/pull/3385) Emit warning when `stripe-notify` header is present in response + ## 51.1.0 - 2026-04-23 This release changes the pinned API version to 2026-04-22.dahlia. diff --git a/VERSION b/VERSION index 8fa76693db..5412f0015a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -51.1.0 +51.2.0 diff --git a/src/Stripe.net/Constants/Version.cs b/src/Stripe.net/Constants/Version.cs index fc196adda9..05004c5296 100644 --- a/src/Stripe.net/Constants/Version.cs +++ b/src/Stripe.net/Constants/Version.cs @@ -2,6 +2,6 @@ namespace Stripe { internal class Version { - public const string Current = "51.1.0"; + public const string Current = "51.2.0"; } } \ No newline at end of file diff --git a/src/Stripe.net/Stripe.net.csproj b/src/Stripe.net/Stripe.net.csproj index 4c8f33910d..bd19563aed 100644 --- a/src/Stripe.net/Stripe.net.csproj +++ b/src/Stripe.net/Stripe.net.csproj @@ -2,7 +2,7 @@ Stripe.net is a sync/async client and portable class library for the Stripe API, supporting .NET Standard 2.0+, .NET Core 5+, and .NET Framework 4.6.2+. (Official Library) - 51.1.0 + 51.2.0 8 Stripe, Jayme Davis