diff --git a/API_VERSION b/API_VERSION index 0336d6a3a58..fb725068586 100644 --- a/API_VERSION +++ b/API_VERSION @@ -1 +1 @@ -2025-08-27.basil \ No newline at end of file +2025-09-30.clover \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 6598803dc33..c98313a5c81 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1932 \ No newline at end of file +v2021 \ No newline at end of file diff --git a/src/main/java/com/stripe/ApiVersion.java b/src/main/java/com/stripe/ApiVersion.java index b78ef170199..23d4cc98162 100644 --- a/src/main/java/com/stripe/ApiVersion.java +++ b/src/main/java/com/stripe/ApiVersion.java @@ -2,6 +2,6 @@ package com.stripe; final class ApiVersion { - public static final String CURRENT = "2025-08-27.basil"; - public static final String CURRENT_MAJOR = "basil"; + public static final String CURRENT = "2025-09-30.clover"; + public static final String CURRENT_MAJOR = "clover"; } diff --git a/src/main/java/com/stripe/StripeClient.java b/src/main/java/com/stripe/StripeClient.java index e181cb02976..5618cd8b500 100644 --- a/src/main/java/com/stripe/StripeClient.java +++ b/src/main/java/com/stripe/StripeClient.java @@ -126,705 +126,804 @@ public com.stripe.service.V2Services v2() { } /** - * Deprecation Warning: StripeClient.accountLinks() will be deprecated in the next major release. - * All functionality under it has been copied over to StripeClient.v1().accountLinks(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.accountLinks() is deprecated, use StripeClient.v1().accountLinks() + * instead. All functionality under it has been copied over to + * StripeClient.v1().accountLinks(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.AccountLinkService accountLinks() { return new com.stripe.service.AccountLinkService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.accountSessions() will be deprecated in the next major - * release. All functionality under it has been copied over to - * StripeClient.v1().accountSessions(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.accountSessions() is deprecated, use + * StripeClient.v1().accountSessions() instead. All functionality under it has been copied + * over to StripeClient.v1().accountSessions(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.AccountSessionService accountSessions() { return new com.stripe.service.AccountSessionService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.accounts() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().accounts(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.accounts() is deprecated, use StripeClient.v1().accounts() instead. + * All functionality under it has been copied over to StripeClient.v1().accounts(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.AccountService accounts() { return new com.stripe.service.AccountService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.applePayDomains() will be deprecated in the next major - * release. All functionality under it has been copied over to - * StripeClient.v1().applePayDomains(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.applePayDomains() is deprecated, use + * StripeClient.v1().applePayDomains() instead. All functionality under it has been copied + * over to StripeClient.v1().applePayDomains(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.ApplePayDomainService applePayDomains() { return new com.stripe.service.ApplePayDomainService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.applicationFees() will be deprecated in the next major - * release. All functionality under it has been copied over to - * StripeClient.v1().applicationFees(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.applicationFees() is deprecated, use + * StripeClient.v1().applicationFees() instead. All functionality under it has been copied + * over to StripeClient.v1().applicationFees(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.ApplicationFeeService applicationFees() { return new com.stripe.service.ApplicationFeeService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.apps() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().apps(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.apps() is deprecated, use StripeClient.v1().apps() instead. All + * functionality under it has been copied over to StripeClient.v1().apps(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.AppsService apps() { return new com.stripe.service.AppsService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.balance() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().balance(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.balance() is deprecated, use StripeClient.v1().balance() instead. All + * functionality under it has been copied over to StripeClient.v1().balance(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.BalanceService balance() { return new com.stripe.service.BalanceService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.balanceTransactions() will be deprecated in the next major - * release. All functionality under it has been copied over to - * StripeClient.v1().balanceTransactions(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.balanceSettings() is deprecated, use + * StripeClient.v1().balanceSettings() instead. All functionality under it has been copied + * over to StripeClient.v1().balanceSettings(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated + public com.stripe.service.BalanceSettingsService balanceSettings() { + return new com.stripe.service.BalanceSettingsService(this.getResponseGetter()); + } + + /** + * @deprecated StripeClient.balanceTransactions() is deprecated, use + * StripeClient.v1().balanceTransactions() instead. All functionality under it has been copied + * over to StripeClient.v1().balanceTransactions(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. + */ + @Deprecated public com.stripe.service.BalanceTransactionService balanceTransactions() { return new com.stripe.service.BalanceTransactionService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.billing() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().billing(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.billing() is deprecated, use StripeClient.v1().billing() instead. All + * functionality under it has been copied over to StripeClient.v1().billing(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.BillingService billing() { return new com.stripe.service.BillingService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.billingPortal() will be deprecated in the next major release. - * All functionality under it has been copied over to StripeClient.v1().billingPortal(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.billingPortal() is deprecated, use StripeClient.v1().billingPortal() + * instead. All functionality under it has been copied over to + * StripeClient.v1().billingPortal(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.BillingPortalService billingPortal() { return new com.stripe.service.BillingPortalService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.charges() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().charges(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.charges() is deprecated, use StripeClient.v1().charges() instead. All + * functionality under it has been copied over to StripeClient.v1().charges(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.ChargeService charges() { return new com.stripe.service.ChargeService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.checkout() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().checkout(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.checkout() is deprecated, use StripeClient.v1().checkout() instead. + * All functionality under it has been copied over to StripeClient.v1().checkout(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.CheckoutService checkout() { return new com.stripe.service.CheckoutService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.climate() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().climate(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.climate() is deprecated, use StripeClient.v1().climate() instead. All + * functionality under it has been copied over to StripeClient.v1().climate(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.ClimateService climate() { return new com.stripe.service.ClimateService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.confirmationTokens() will be deprecated in the next major - * release. All functionality under it has been copied over to - * StripeClient.v1().confirmationTokens(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.confirmationTokens() is deprecated, use + * StripeClient.v1().confirmationTokens() instead. All functionality under it has been copied + * over to StripeClient.v1().confirmationTokens(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.ConfirmationTokenService confirmationTokens() { return new com.stripe.service.ConfirmationTokenService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.countrySpecs() will be deprecated in the next major release. - * All functionality under it has been copied over to StripeClient.v1().countrySpecs(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.countrySpecs() is deprecated, use StripeClient.v1().countrySpecs() + * instead. All functionality under it has been copied over to + * StripeClient.v1().countrySpecs(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.CountrySpecService countrySpecs() { return new com.stripe.service.CountrySpecService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.coupons() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().coupons(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.coupons() is deprecated, use StripeClient.v1().coupons() instead. All + * functionality under it has been copied over to StripeClient.v1().coupons(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.CouponService coupons() { return new com.stripe.service.CouponService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.creditNotes() will be deprecated in the next major release. - * All functionality under it has been copied over to StripeClient.v1().creditNotes(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.creditNotes() is deprecated, use StripeClient.v1().creditNotes() + * instead. All functionality under it has been copied over to + * StripeClient.v1().creditNotes(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.CreditNoteService creditNotes() { return new com.stripe.service.CreditNoteService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.customerSessions() will be deprecated in the next major - * release. All functionality under it has been copied over to - * StripeClient.v1().customerSessions(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.customerSessions() is deprecated, use + * StripeClient.v1().customerSessions() instead. All functionality under it has been copied + * over to StripeClient.v1().customerSessions(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.CustomerSessionService customerSessions() { return new com.stripe.service.CustomerSessionService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.customers() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().customers(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.customers() is deprecated, use StripeClient.v1().customers() instead. + * All functionality under it has been copied over to StripeClient.v1().customers(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.CustomerService customers() { return new com.stripe.service.CustomerService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.disputes() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().disputes(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.disputes() is deprecated, use StripeClient.v1().disputes() instead. + * All functionality under it has been copied over to StripeClient.v1().disputes(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.DisputeService disputes() { return new com.stripe.service.DisputeService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.entitlements() will be deprecated in the next major release. - * All functionality under it has been copied over to StripeClient.v1().entitlements(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.entitlements() is deprecated, use StripeClient.v1().entitlements() + * instead. All functionality under it has been copied over to + * StripeClient.v1().entitlements(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.EntitlementsService entitlements() { return new com.stripe.service.EntitlementsService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.ephemeralKeys() will be deprecated in the next major release. - * All functionality under it has been copied over to StripeClient.v1().ephemeralKeys(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.ephemeralKeys() is deprecated, use StripeClient.v1().ephemeralKeys() + * instead. All functionality under it has been copied over to + * StripeClient.v1().ephemeralKeys(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.EphemeralKeyService ephemeralKeys() { return new com.stripe.service.EphemeralKeyService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.events() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().events(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.events() is deprecated, use StripeClient.v1().events() instead. All + * functionality under it has been copied over to StripeClient.v1().events(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.EventService events() { return new com.stripe.service.EventService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.exchangeRates() will be deprecated in the next major release. - * All functionality under it has been copied over to StripeClient.v1().exchangeRates(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.exchangeRates() is deprecated, use StripeClient.v1().exchangeRates() + * instead. All functionality under it has been copied over to + * StripeClient.v1().exchangeRates(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.ExchangeRateService exchangeRates() { return new com.stripe.service.ExchangeRateService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.fileLinks() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().fileLinks(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.fileLinks() is deprecated, use StripeClient.v1().fileLinks() instead. + * All functionality under it has been copied over to StripeClient.v1().fileLinks(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.FileLinkService fileLinks() { return new com.stripe.service.FileLinkService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.files() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().files(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.files() is deprecated, use StripeClient.v1().files() instead. All + * functionality under it has been copied over to StripeClient.v1().files(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.FileService files() { return new com.stripe.service.FileService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.financialConnections() will be deprecated in the next major - * release. All functionality under it has been copied over to - * StripeClient.v1().financialConnections(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.financialConnections() is deprecated, use + * StripeClient.v1().financialConnections() instead. All functionality under it has been + * copied over to StripeClient.v1().financialConnections(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.FinancialConnectionsService financialConnections() { return new com.stripe.service.FinancialConnectionsService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.forwarding() will be deprecated in the next major release. - * All functionality under it has been copied over to StripeClient.v1().forwarding(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.forwarding() is deprecated, use StripeClient.v1().forwarding() + * instead. All functionality under it has been copied over to StripeClient.v1().forwarding(). + * See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.ForwardingService forwarding() { return new com.stripe.service.ForwardingService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.identity() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().identity(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.identity() is deprecated, use StripeClient.v1().identity() instead. + * All functionality under it has been copied over to StripeClient.v1().identity(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.IdentityService identity() { return new com.stripe.service.IdentityService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.invoiceItems() will be deprecated in the next major release. - * All functionality under it has been copied over to StripeClient.v1().invoiceItems(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.invoiceItems() is deprecated, use StripeClient.v1().invoiceItems() + * instead. All functionality under it has been copied over to + * StripeClient.v1().invoiceItems(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.InvoiceItemService invoiceItems() { return new com.stripe.service.InvoiceItemService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.invoicePayments() will be deprecated in the next major - * release. All functionality under it has been copied over to - * StripeClient.v1().invoicePayments(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.invoicePayments() is deprecated, use + * StripeClient.v1().invoicePayments() instead. All functionality under it has been copied + * over to StripeClient.v1().invoicePayments(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.InvoicePaymentService invoicePayments() { return new com.stripe.service.InvoicePaymentService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.invoiceRenderingTemplates() will be deprecated in the next - * major release. All functionality under it has been copied over to - * StripeClient.v1().invoiceRenderingTemplates(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.invoiceRenderingTemplates() is deprecated, use + * StripeClient.v1().invoiceRenderingTemplates() instead. All functionality under it has been + * copied over to StripeClient.v1().invoiceRenderingTemplates(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.InvoiceRenderingTemplateService invoiceRenderingTemplates() { return new com.stripe.service.InvoiceRenderingTemplateService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.invoices() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().invoices(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.invoices() is deprecated, use StripeClient.v1().invoices() instead. + * All functionality under it has been copied over to StripeClient.v1().invoices(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.InvoiceService invoices() { return new com.stripe.service.InvoiceService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.issuing() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().issuing(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.issuing() is deprecated, use StripeClient.v1().issuing() instead. All + * functionality under it has been copied over to StripeClient.v1().issuing(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.IssuingService issuing() { return new com.stripe.service.IssuingService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.mandates() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().mandates(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.mandates() is deprecated, use StripeClient.v1().mandates() instead. + * All functionality under it has been copied over to StripeClient.v1().mandates(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.MandateService mandates() { return new com.stripe.service.MandateService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.paymentIntents() will be deprecated in the next major - * release. All functionality under it has been copied over to StripeClient.v1().paymentIntents(). - * See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.paymentIntents() is deprecated, use StripeClient.v1().paymentIntents() + * instead. All functionality under it has been copied over to + * StripeClient.v1().paymentIntents(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.PaymentIntentService paymentIntents() { return new com.stripe.service.PaymentIntentService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.paymentLinks() will be deprecated in the next major release. - * All functionality under it has been copied over to StripeClient.v1().paymentLinks(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.paymentLinks() is deprecated, use StripeClient.v1().paymentLinks() + * instead. All functionality under it has been copied over to + * StripeClient.v1().paymentLinks(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.PaymentLinkService paymentLinks() { return new com.stripe.service.PaymentLinkService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.paymentMethodConfigurations() will be deprecated in the next - * major release. All functionality under it has been copied over to - * StripeClient.v1().paymentMethodConfigurations(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.paymentMethodConfigurations() is deprecated, use + * StripeClient.v1().paymentMethodConfigurations() instead. All functionality under it has + * been copied over to StripeClient.v1().paymentMethodConfigurations(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.PaymentMethodConfigurationService paymentMethodConfigurations() { return new com.stripe.service.PaymentMethodConfigurationService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.paymentMethodDomains() will be deprecated in the next major - * release. All functionality under it has been copied over to - * StripeClient.v1().paymentMethodDomains(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.paymentMethodDomains() is deprecated, use + * StripeClient.v1().paymentMethodDomains() instead. All functionality under it has been + * copied over to StripeClient.v1().paymentMethodDomains(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.PaymentMethodDomainService paymentMethodDomains() { return new com.stripe.service.PaymentMethodDomainService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.paymentMethods() will be deprecated in the next major - * release. All functionality under it has been copied over to StripeClient.v1().paymentMethods(). - * See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.paymentMethods() is deprecated, use StripeClient.v1().paymentMethods() + * instead. All functionality under it has been copied over to + * StripeClient.v1().paymentMethods(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.PaymentMethodService paymentMethods() { return new com.stripe.service.PaymentMethodService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.payouts() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().payouts(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.payouts() is deprecated, use StripeClient.v1().payouts() instead. All + * functionality under it has been copied over to StripeClient.v1().payouts(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.PayoutService payouts() { return new com.stripe.service.PayoutService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.plans() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().plans(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.plans() is deprecated, use StripeClient.v1().plans() instead. All + * functionality under it has been copied over to StripeClient.v1().plans(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.PlanService plans() { return new com.stripe.service.PlanService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.prices() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().prices(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.prices() is deprecated, use StripeClient.v1().prices() instead. All + * functionality under it has been copied over to StripeClient.v1().prices(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.PriceService prices() { return new com.stripe.service.PriceService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.products() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().products(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.products() is deprecated, use StripeClient.v1().products() instead. + * All functionality under it has been copied over to StripeClient.v1().products(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.ProductService products() { return new com.stripe.service.ProductService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.promotionCodes() will be deprecated in the next major - * release. All functionality under it has been copied over to StripeClient.v1().promotionCodes(). - * See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.promotionCodes() is deprecated, use StripeClient.v1().promotionCodes() + * instead. All functionality under it has been copied over to + * StripeClient.v1().promotionCodes(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.PromotionCodeService promotionCodes() { return new com.stripe.service.PromotionCodeService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.quotes() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().quotes(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.quotes() is deprecated, use StripeClient.v1().quotes() instead. All + * functionality under it has been copied over to StripeClient.v1().quotes(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.QuoteService quotes() { return new com.stripe.service.QuoteService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.radar() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().radar(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.radar() is deprecated, use StripeClient.v1().radar() instead. All + * functionality under it has been copied over to StripeClient.v1().radar(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.RadarService radar() { return new com.stripe.service.RadarService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.refunds() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().refunds(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.refunds() is deprecated, use StripeClient.v1().refunds() instead. All + * functionality under it has been copied over to StripeClient.v1().refunds(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.RefundService refunds() { return new com.stripe.service.RefundService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.reporting() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().reporting(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.reporting() is deprecated, use StripeClient.v1().reporting() instead. + * All functionality under it has been copied over to StripeClient.v1().reporting(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.ReportingService reporting() { return new com.stripe.service.ReportingService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.reviews() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().reviews(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.reviews() is deprecated, use StripeClient.v1().reviews() instead. All + * functionality under it has been copied over to StripeClient.v1().reviews(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.ReviewService reviews() { return new com.stripe.service.ReviewService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.setupAttempts() will be deprecated in the next major release. - * All functionality under it has been copied over to StripeClient.v1().setupAttempts(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.setupAttempts() is deprecated, use StripeClient.v1().setupAttempts() + * instead. All functionality under it has been copied over to + * StripeClient.v1().setupAttempts(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.SetupAttemptService setupAttempts() { return new com.stripe.service.SetupAttemptService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.setupIntents() will be deprecated in the next major release. - * All functionality under it has been copied over to StripeClient.v1().setupIntents(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.setupIntents() is deprecated, use StripeClient.v1().setupIntents() + * instead. All functionality under it has been copied over to + * StripeClient.v1().setupIntents(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.SetupIntentService setupIntents() { return new com.stripe.service.SetupIntentService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.shippingRates() will be deprecated in the next major release. - * All functionality under it has been copied over to StripeClient.v1().shippingRates(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.shippingRates() is deprecated, use StripeClient.v1().shippingRates() + * instead. All functionality under it has been copied over to + * StripeClient.v1().shippingRates(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.ShippingRateService shippingRates() { return new com.stripe.service.ShippingRateService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.sigma() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().sigma(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.sigma() is deprecated, use StripeClient.v1().sigma() instead. All + * functionality under it has been copied over to StripeClient.v1().sigma(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.SigmaService sigma() { return new com.stripe.service.SigmaService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.sources() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().sources(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.sources() is deprecated, use StripeClient.v1().sources() instead. All + * functionality under it has been copied over to StripeClient.v1().sources(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.SourceService sources() { return new com.stripe.service.SourceService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.subscriptionItems() will be deprecated in the next major - * release. All functionality under it has been copied over to - * StripeClient.v1().subscriptionItems(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.subscriptionItems() is deprecated, use + * StripeClient.v1().subscriptionItems() instead. All functionality under it has been copied + * over to StripeClient.v1().subscriptionItems(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.SubscriptionItemService subscriptionItems() { return new com.stripe.service.SubscriptionItemService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.subscriptionSchedules() will be deprecated in the next major - * release. All functionality under it has been copied over to - * StripeClient.v1().subscriptionSchedules(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.subscriptionSchedules() is deprecated, use + * StripeClient.v1().subscriptionSchedules() instead. All functionality under it has been + * copied over to StripeClient.v1().subscriptionSchedules(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.SubscriptionScheduleService subscriptionSchedules() { return new com.stripe.service.SubscriptionScheduleService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.subscriptions() will be deprecated in the next major release. - * All functionality under it has been copied over to StripeClient.v1().subscriptions(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.subscriptions() is deprecated, use StripeClient.v1().subscriptions() + * instead. All functionality under it has been copied over to + * StripeClient.v1().subscriptions(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.SubscriptionService subscriptions() { return new com.stripe.service.SubscriptionService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.tax() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().tax(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.tax() is deprecated, use StripeClient.v1().tax() instead. All + * functionality under it has been copied over to StripeClient.v1().tax(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.TaxService tax() { return new com.stripe.service.TaxService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.taxCodes() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().taxCodes(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.taxCodes() is deprecated, use StripeClient.v1().taxCodes() instead. + * All functionality under it has been copied over to StripeClient.v1().taxCodes(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.TaxCodeService taxCodes() { return new com.stripe.service.TaxCodeService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.taxIds() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().taxIds(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.taxIds() is deprecated, use StripeClient.v1().taxIds() instead. All + * functionality under it has been copied over to StripeClient.v1().taxIds(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.TaxIdService taxIds() { return new com.stripe.service.TaxIdService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.taxRates() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().taxRates(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.taxRates() is deprecated, use StripeClient.v1().taxRates() instead. + * All functionality under it has been copied over to StripeClient.v1().taxRates(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.TaxRateService taxRates() { return new com.stripe.service.TaxRateService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.terminal() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().terminal(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.terminal() is deprecated, use StripeClient.v1().terminal() instead. + * All functionality under it has been copied over to StripeClient.v1().terminal(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.TerminalService terminal() { return new com.stripe.service.TerminalService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.testHelpers() will be deprecated in the next major release. - * All functionality under it has been copied over to StripeClient.v1().testHelpers(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.testHelpers() is deprecated, use StripeClient.v1().testHelpers() + * instead. All functionality under it has been copied over to + * StripeClient.v1().testHelpers(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.TestHelpersService testHelpers() { return new com.stripe.service.TestHelpersService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.tokens() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().tokens(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.tokens() is deprecated, use StripeClient.v1().tokens() instead. All + * functionality under it has been copied over to StripeClient.v1().tokens(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.TokenService tokens() { return new com.stripe.service.TokenService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.topups() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().topups(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.topups() is deprecated, use StripeClient.v1().topups() instead. All + * functionality under it has been copied over to StripeClient.v1().topups(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.TopupService topups() { return new com.stripe.service.TopupService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.transfers() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().transfers(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.transfers() is deprecated, use StripeClient.v1().transfers() instead. + * All functionality under it has been copied over to StripeClient.v1().transfers(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.TransferService transfers() { return new com.stripe.service.TransferService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.treasury() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().treasury(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.treasury() is deprecated, use StripeClient.v1().treasury() instead. + * All functionality under it has been copied over to StripeClient.v1().treasury(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.TreasuryService treasury() { return new com.stripe.service.TreasuryService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.webhookEndpoints() will be deprecated in the next major - * release. All functionality under it has been copied over to - * StripeClient.v1().webhookEndpoints(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.webhookEndpoints() is deprecated, use + * StripeClient.v1().webhookEndpoints() instead. All functionality under it has been copied + * over to StripeClient.v1().webhookEndpoints(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.WebhookEndpointService webhookEndpoints() { return new com.stripe.service.WebhookEndpointService(this.getResponseGetter()); } diff --git a/src/main/java/com/stripe/model/Account.java b/src/main/java/com/stripe/model/Account.java index b039480686c..f7d773eac50 100644 --- a/src/main/java/com/stripe/model/Account.java +++ b/src/main/java/com/stripe/model/Account.java @@ -1144,6 +1144,15 @@ public static class Capabilities extends StripeObject { @SerializedName("link_payments") String linkPayments; + /** + * The status of the MB WAY payments capability of the account, or whether the account can + * directly process MB WAY charges. + * + *

One of {@code active}, {@code inactive}, or {@code pending}. + */ + @SerializedName("mb_way_payments") + String mbWayPayments; + /** * The status of the MobilePay capability of the account, or whether the account can directly * process MobilePay charges. @@ -1234,6 +1243,15 @@ public static class Capabilities extends StripeObject { @SerializedName("paynow_payments") String paynowPayments; + /** + * The status of the Paypay capability of the account, or whether the account can directly + * process Paypay payments. + * + *

One of {@code active}, {@code inactive}, or {@code pending}. + */ + @SerializedName("paypay_payments") + String paypayPayments; + /** * The status of the pix payments capability of the account, or whether the account can directly * process pix charges. @@ -1997,14 +2015,14 @@ public static class Errors extends StripeObject { /** * The code for the type of error. * - *

One of {@code information_missing}, {@code invalid_address_city_state_postal_code}, - * {@code invalid_address_highway_contract_box}, {@code invalid_address_private_mailbox}, - * {@code invalid_business_profile_name}, {@code invalid_business_profile_name_denylisted}, - * {@code invalid_company_name_denylisted}, {@code invalid_dob_age_over_maximum}, {@code - * invalid_dob_age_under_18}, {@code invalid_dob_age_under_minimum}, {@code - * invalid_product_description_length}, {@code invalid_product_description_url_match}, {@code - * invalid_representative_country}, {@code invalid_signator}, {@code - * invalid_statement_descriptor_business_mismatch}, {@code + *

One of {@code external_request}, {@code information_missing}, {@code + * invalid_address_city_state_postal_code}, {@code invalid_address_highway_contract_box}, + * {@code invalid_address_private_mailbox}, {@code invalid_business_profile_name}, {@code + * invalid_business_profile_name_denylisted}, {@code invalid_company_name_denylisted}, {@code + * invalid_dob_age_over_maximum}, {@code invalid_dob_age_under_18}, {@code + * invalid_dob_age_under_minimum}, {@code invalid_product_description_length}, {@code + * invalid_product_description_url_match}, {@code invalid_representative_country}, {@code + * invalid_signator}, {@code invalid_statement_descriptor_business_mismatch}, {@code * invalid_statement_descriptor_denylisted}, {@code invalid_statement_descriptor_length}, * {@code invalid_statement_descriptor_prefix_denylisted}, {@code * invalid_statement_descriptor_prefix_mismatch}, {@code invalid_street_address}, {@code @@ -2023,29 +2041,30 @@ public static class Errors extends StripeObject { * invalid_url_website_incomplete_return_policy}, {@code * invalid_url_website_incomplete_terms_and_conditions}, {@code * invalid_url_website_incomplete_under_construction}, {@code invalid_url_website_other}, - * {@code invalid_value_other}, {@code verification_directors_mismatch}, {@code - * verification_document_address_mismatch}, {@code verification_document_address_missing}, - * {@code verification_document_corrupt}, {@code verification_document_country_not_supported}, - * {@code verification_document_directors_mismatch}, {@code - * verification_document_dob_mismatch}, {@code verification_document_duplicate_type}, {@code - * verification_document_expired}, {@code verification_document_failed_copy}, {@code - * verification_document_failed_greyscale}, {@code verification_document_failed_other}, {@code - * verification_document_failed_test_mode}, {@code verification_document_fraudulent}, {@code - * verification_document_id_number_mismatch}, {@code verification_document_id_number_missing}, - * {@code verification_document_incomplete}, {@code verification_document_invalid}, {@code - * verification_document_issue_or_expiry_date_missing}, {@code - * verification_document_manipulated}, {@code verification_document_missing_back}, {@code - * verification_document_missing_front}, {@code verification_document_name_mismatch}, {@code - * verification_document_name_missing}, {@code verification_document_nationality_mismatch}, - * {@code verification_document_not_readable}, {@code verification_document_not_signed}, - * {@code verification_document_not_uploaded}, {@code verification_document_photo_mismatch}, - * {@code verification_document_too_large}, {@code verification_document_type_not_supported}, - * {@code verification_extraneous_directors}, {@code verification_failed_address_match}, - * {@code verification_failed_authorizer_authority}, {@code - * verification_failed_business_iec_number}, {@code verification_failed_document_match}, - * {@code verification_failed_id_number_match}, {@code verification_failed_keyed_identity}, - * {@code verification_failed_keyed_match}, {@code verification_failed_name_match}, {@code - * verification_failed_other}, {@code verification_failed_representative_authority}, {@code + * {@code invalid_value_other}, {@code unsupported_business_type}, {@code + * verification_directors_mismatch}, {@code verification_document_address_mismatch}, {@code + * verification_document_address_missing}, {@code verification_document_corrupt}, {@code + * verification_document_country_not_supported}, {@code + * verification_document_directors_mismatch}, {@code verification_document_dob_mismatch}, + * {@code verification_document_duplicate_type}, {@code verification_document_expired}, {@code + * verification_document_failed_copy}, {@code verification_document_failed_greyscale}, {@code + * verification_document_failed_other}, {@code verification_document_failed_test_mode}, {@code + * verification_document_fraudulent}, {@code verification_document_id_number_mismatch}, {@code + * verification_document_id_number_missing}, {@code verification_document_incomplete}, {@code + * verification_document_invalid}, {@code verification_document_issue_or_expiry_date_missing}, + * {@code verification_document_manipulated}, {@code verification_document_missing_back}, + * {@code verification_document_missing_front}, {@code verification_document_name_mismatch}, + * {@code verification_document_name_missing}, {@code + * verification_document_nationality_mismatch}, {@code verification_document_not_readable}, + * {@code verification_document_not_signed}, {@code verification_document_not_uploaded}, + * {@code verification_document_photo_mismatch}, {@code verification_document_too_large}, + * {@code verification_document_type_not_supported}, {@code + * verification_extraneous_directors}, {@code verification_failed_address_match}, {@code + * verification_failed_authorizer_authority}, {@code verification_failed_business_iec_number}, + * {@code verification_failed_document_match}, {@code verification_failed_id_number_match}, + * {@code verification_failed_keyed_identity}, {@code verification_failed_keyed_match}, {@code + * verification_failed_name_match}, {@code verification_failed_other}, {@code + * verification_failed_representative_authority}, {@code * verification_failed_residential_address}, {@code verification_failed_tax_id_match}, {@code * verification_failed_tax_id_not_issued}, {@code * verification_legal_entity_structure_mismatch}, {@code verification_missing_directors}, @@ -2199,14 +2218,14 @@ public static class Errors extends StripeObject { /** * The code for the type of error. * - *

One of {@code information_missing}, {@code invalid_address_city_state_postal_code}, - * {@code invalid_address_highway_contract_box}, {@code invalid_address_private_mailbox}, - * {@code invalid_business_profile_name}, {@code invalid_business_profile_name_denylisted}, - * {@code invalid_company_name_denylisted}, {@code invalid_dob_age_over_maximum}, {@code - * invalid_dob_age_under_18}, {@code invalid_dob_age_under_minimum}, {@code - * invalid_product_description_length}, {@code invalid_product_description_url_match}, {@code - * invalid_representative_country}, {@code invalid_signator}, {@code - * invalid_statement_descriptor_business_mismatch}, {@code + *

One of {@code external_request}, {@code information_missing}, {@code + * invalid_address_city_state_postal_code}, {@code invalid_address_highway_contract_box}, + * {@code invalid_address_private_mailbox}, {@code invalid_business_profile_name}, {@code + * invalid_business_profile_name_denylisted}, {@code invalid_company_name_denylisted}, {@code + * invalid_dob_age_over_maximum}, {@code invalid_dob_age_under_18}, {@code + * invalid_dob_age_under_minimum}, {@code invalid_product_description_length}, {@code + * invalid_product_description_url_match}, {@code invalid_representative_country}, {@code + * invalid_signator}, {@code invalid_statement_descriptor_business_mismatch}, {@code * invalid_statement_descriptor_denylisted}, {@code invalid_statement_descriptor_length}, * {@code invalid_statement_descriptor_prefix_denylisted}, {@code * invalid_statement_descriptor_prefix_mismatch}, {@code invalid_street_address}, {@code @@ -2225,29 +2244,30 @@ public static class Errors extends StripeObject { * invalid_url_website_incomplete_return_policy}, {@code * invalid_url_website_incomplete_terms_and_conditions}, {@code * invalid_url_website_incomplete_under_construction}, {@code invalid_url_website_other}, - * {@code invalid_value_other}, {@code verification_directors_mismatch}, {@code - * verification_document_address_mismatch}, {@code verification_document_address_missing}, - * {@code verification_document_corrupt}, {@code verification_document_country_not_supported}, - * {@code verification_document_directors_mismatch}, {@code - * verification_document_dob_mismatch}, {@code verification_document_duplicate_type}, {@code - * verification_document_expired}, {@code verification_document_failed_copy}, {@code - * verification_document_failed_greyscale}, {@code verification_document_failed_other}, {@code - * verification_document_failed_test_mode}, {@code verification_document_fraudulent}, {@code - * verification_document_id_number_mismatch}, {@code verification_document_id_number_missing}, - * {@code verification_document_incomplete}, {@code verification_document_invalid}, {@code - * verification_document_issue_or_expiry_date_missing}, {@code - * verification_document_manipulated}, {@code verification_document_missing_back}, {@code - * verification_document_missing_front}, {@code verification_document_name_mismatch}, {@code - * verification_document_name_missing}, {@code verification_document_nationality_mismatch}, - * {@code verification_document_not_readable}, {@code verification_document_not_signed}, - * {@code verification_document_not_uploaded}, {@code verification_document_photo_mismatch}, - * {@code verification_document_too_large}, {@code verification_document_type_not_supported}, - * {@code verification_extraneous_directors}, {@code verification_failed_address_match}, - * {@code verification_failed_authorizer_authority}, {@code - * verification_failed_business_iec_number}, {@code verification_failed_document_match}, - * {@code verification_failed_id_number_match}, {@code verification_failed_keyed_identity}, - * {@code verification_failed_keyed_match}, {@code verification_failed_name_match}, {@code - * verification_failed_other}, {@code verification_failed_representative_authority}, {@code + * {@code invalid_value_other}, {@code unsupported_business_type}, {@code + * verification_directors_mismatch}, {@code verification_document_address_mismatch}, {@code + * verification_document_address_missing}, {@code verification_document_corrupt}, {@code + * verification_document_country_not_supported}, {@code + * verification_document_directors_mismatch}, {@code verification_document_dob_mismatch}, + * {@code verification_document_duplicate_type}, {@code verification_document_expired}, {@code + * verification_document_failed_copy}, {@code verification_document_failed_greyscale}, {@code + * verification_document_failed_other}, {@code verification_document_failed_test_mode}, {@code + * verification_document_fraudulent}, {@code verification_document_id_number_mismatch}, {@code + * verification_document_id_number_missing}, {@code verification_document_incomplete}, {@code + * verification_document_invalid}, {@code verification_document_issue_or_expiry_date_missing}, + * {@code verification_document_manipulated}, {@code verification_document_missing_back}, + * {@code verification_document_missing_front}, {@code verification_document_name_mismatch}, + * {@code verification_document_name_missing}, {@code + * verification_document_nationality_mismatch}, {@code verification_document_not_readable}, + * {@code verification_document_not_signed}, {@code verification_document_not_uploaded}, + * {@code verification_document_photo_mismatch}, {@code verification_document_too_large}, + * {@code verification_document_type_not_supported}, {@code + * verification_extraneous_directors}, {@code verification_failed_address_match}, {@code + * verification_failed_authorizer_authority}, {@code verification_failed_business_iec_number}, + * {@code verification_failed_document_match}, {@code verification_failed_id_number_match}, + * {@code verification_failed_keyed_identity}, {@code verification_failed_keyed_match}, {@code + * verification_failed_name_match}, {@code verification_failed_other}, {@code + * verification_failed_representative_authority}, {@code * verification_failed_residential_address}, {@code verification_failed_tax_id_match}, {@code * verification_failed_tax_id_not_issued}, {@code * verification_legal_entity_structure_mismatch}, {@code verification_missing_directors}, diff --git a/src/main/java/com/stripe/model/Address.java b/src/main/java/com/stripe/model/Address.java index 042bcd4c261..f65f0d5f101 100644 --- a/src/main/java/com/stripe/model/Address.java +++ b/src/main/java/com/stripe/model/Address.java @@ -21,11 +21,11 @@ public class Address extends StripeObject { @SerializedName("country") String country; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; diff --git a/src/main/java/com/stripe/model/BalanceSettings.java b/src/main/java/com/stripe/model/BalanceSettings.java new file mode 100644 index 00000000000..70c1f411113 --- /dev/null +++ b/src/main/java/com/stripe/model/BalanceSettings.java @@ -0,0 +1,255 @@ +// File generated from our OpenAPI spec +package com.stripe.model; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.net.ApiRequest; +import com.stripe.net.ApiRequestParams; +import com.stripe.net.ApiResource; +import com.stripe.net.BaseAddress; +import com.stripe.net.RequestOptions; +import com.stripe.net.StripeResponseGetter; +import com.stripe.param.BalanceSettingsRetrieveParams; +import com.stripe.param.BalanceSettingsUpdateParams; +import java.util.List; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.Setter; + +/** + * Options for customizing account balances and payout settings for a Stripe platform’s connected + * accounts. + */ +@Getter +@Setter +@EqualsAndHashCode(callSuper = false) +public class BalanceSettings extends ApiResource { + /** + * String representing the object's type. Objects of the same type share the same value. + * + *

Equal to {@code balance_settings}. + */ + @SerializedName("object") + String object; + + @SerializedName("payments") + Payments payments; + + /** + * Retrieves balance settings for a given connected account. Related guide: Making API calls for connected accounts + */ + public static BalanceSettings retrieve() throws StripeException { + return retrieve((Map) null, (RequestOptions) null); + } + + /** + * Retrieves balance settings for a given connected account. Related guide: Making API calls for connected accounts + */ + public static BalanceSettings retrieve(RequestOptions options) throws StripeException { + return retrieve((Map) null, options); + } + + /** + * Retrieves balance settings for a given connected account. Related guide: Making API calls for connected accounts + */ + public static BalanceSettings retrieve(Map params, RequestOptions options) + throws StripeException { + String path = "/v1/balance_settings"; + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, params, options); + return getGlobalResponseGetter().request(request, BalanceSettings.class); + } + + /** + * Retrieves balance settings for a given connected account. Related guide: Making API calls for connected accounts + */ + public static BalanceSettings retrieve( + BalanceSettingsRetrieveParams params, RequestOptions options) throws StripeException { + String path = "/v1/balance_settings"; + ApiResource.checkNullTypedParams(path, params); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + options); + return getGlobalResponseGetter().request(request, BalanceSettings.class); + } + + /** + * Updates balance settings for a given connected account. Related guide: Making API calls for connected accounts + */ + public static BalanceSettings update(Map params) throws StripeException { + return update(params, (RequestOptions) null); + } + + /** + * Updates balance settings for a given connected account. Related guide: Making API calls for connected accounts + */ + public static BalanceSettings update(Map params, RequestOptions options) + throws StripeException { + String path = "/v1/balance_settings"; + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options); + return getGlobalResponseGetter().request(request, BalanceSettings.class); + } + + /** + * Updates balance settings for a given connected account. Related guide: Making API calls for connected accounts + */ + public static BalanceSettings update(BalanceSettingsUpdateParams params) throws StripeException { + return update(params, (RequestOptions) null); + } + + /** + * Updates balance settings for a given connected account. Related guide: Making API calls for connected accounts + */ + public static BalanceSettings update(BalanceSettingsUpdateParams params, RequestOptions options) + throws StripeException { + String path = "/v1/balance_settings"; + ApiResource.checkNullTypedParams(path, params); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return getGlobalResponseGetter().request(request, BalanceSettings.class); + } + + /** + * For more details about Payments, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Payments extends StripeObject { + /** + * A Boolean indicating if Stripe should try to reclaim negative balances from an attached bank + * account. See Understanding Connect + * account balances for details. The default value is {@code false} when controller.requirement_collection + * is {@code application}, which includes Custom accounts, otherwise {@code true}. + */ + @SerializedName("debit_negative_balances") + Boolean debitNegativeBalances; + + /** Settings specific to the account's payouts. */ + @SerializedName("payouts") + Payouts payouts; + + @SerializedName("settlement_timing") + SettlementTiming settlementTiming; + + /** + * For more details about Payouts, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Payouts extends StripeObject { + /** + * The minimum balance amount to retain per currency after automatic payouts. Only funds that + * exceed these amounts are paid out. Learn more about the minimum balances + * for automatic payouts. + */ + @SerializedName("minimum_balance_by_currency") + Map minimumBalanceByCurrency; + + /** + * Details on when funds from charges are available, and when they are paid out to an external + * account. See our Setting Bank and + * Debit Card Payouts documentation for details. + */ + @SerializedName("schedule") + Schedule schedule; + + /** + * The text that appears on the bank account statement for payouts. If not set, this defaults + * to the platform's bank descriptor as set in the Dashboard. + */ + @SerializedName("statement_descriptor") + String statementDescriptor; + + /** + * Whether the funds in this account can be paid out. + * + *

One of {@code disabled}, or {@code enabled}. + */ + @SerializedName("status") + String status; + + /** + * For more details about Schedule, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Schedule extends StripeObject { + /** + * How frequently funds will be paid out. One of {@code manual} (payouts only created via + * API call), {@code daily}, {@code weekly}, or {@code monthly}. + */ + @SerializedName("interval") + String interval; + + /** + * The day of the month funds will be paid out. Only shown if {@code interval} is monthly. + * Payouts scheduled between the 29th and 31st of the month are sent on the last day of + * shorter months. + */ + @SerializedName("monthly_payout_days") + List monthlyPayoutDays; + + /** + * The days of the week when available funds are paid out, specified as an array, for + * example, [{@code monday}, {@code tuesday}]. Only shown if {@code interval} is weekly. + */ + @SerializedName("weekly_payout_days") + List weeklyPayoutDays; + } + } + + /** + * For more details about SettlementTiming, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class SettlementTiming extends StripeObject { + /** The number of days charge funds are held before becoming available. */ + @SerializedName("delay_days") + Long delayDays; + + /** + * The number of days charge funds are held before becoming available. If present, overrides + * the default, or minimum available, for the account. + */ + @SerializedName("delay_days_override") + Long delayDaysOverride; + } + } + + @Override + public void setResponseGetter(StripeResponseGetter responseGetter) { + super.setResponseGetter(responseGetter); + trySetResponseGetter(payments, responseGetter); + } +} diff --git a/src/main/java/com/stripe/model/BankAccount.java b/src/main/java/com/stripe/model/BankAccount.java index 11764f9dafc..5284ebe11fe 100644 --- a/src/main/java/com/stripe/model/BankAccount.java +++ b/src/main/java/com/stripe/model/BankAccount.java @@ -552,14 +552,14 @@ public static class Errors extends StripeObject { /** * The code for the type of error. * - *

One of {@code information_missing}, {@code invalid_address_city_state_postal_code}, - * {@code invalid_address_highway_contract_box}, {@code invalid_address_private_mailbox}, - * {@code invalid_business_profile_name}, {@code invalid_business_profile_name_denylisted}, - * {@code invalid_company_name_denylisted}, {@code invalid_dob_age_over_maximum}, {@code - * invalid_dob_age_under_18}, {@code invalid_dob_age_under_minimum}, {@code - * invalid_product_description_length}, {@code invalid_product_description_url_match}, {@code - * invalid_representative_country}, {@code invalid_signator}, {@code - * invalid_statement_descriptor_business_mismatch}, {@code + *

One of {@code external_request}, {@code information_missing}, {@code + * invalid_address_city_state_postal_code}, {@code invalid_address_highway_contract_box}, + * {@code invalid_address_private_mailbox}, {@code invalid_business_profile_name}, {@code + * invalid_business_profile_name_denylisted}, {@code invalid_company_name_denylisted}, {@code + * invalid_dob_age_over_maximum}, {@code invalid_dob_age_under_18}, {@code + * invalid_dob_age_under_minimum}, {@code invalid_product_description_length}, {@code + * invalid_product_description_url_match}, {@code invalid_representative_country}, {@code + * invalid_signator}, {@code invalid_statement_descriptor_business_mismatch}, {@code * invalid_statement_descriptor_denylisted}, {@code invalid_statement_descriptor_length}, * {@code invalid_statement_descriptor_prefix_denylisted}, {@code * invalid_statement_descriptor_prefix_mismatch}, {@code invalid_street_address}, {@code @@ -578,29 +578,30 @@ public static class Errors extends StripeObject { * invalid_url_website_incomplete_return_policy}, {@code * invalid_url_website_incomplete_terms_and_conditions}, {@code * invalid_url_website_incomplete_under_construction}, {@code invalid_url_website_other}, - * {@code invalid_value_other}, {@code verification_directors_mismatch}, {@code - * verification_document_address_mismatch}, {@code verification_document_address_missing}, - * {@code verification_document_corrupt}, {@code verification_document_country_not_supported}, - * {@code verification_document_directors_mismatch}, {@code - * verification_document_dob_mismatch}, {@code verification_document_duplicate_type}, {@code - * verification_document_expired}, {@code verification_document_failed_copy}, {@code - * verification_document_failed_greyscale}, {@code verification_document_failed_other}, {@code - * verification_document_failed_test_mode}, {@code verification_document_fraudulent}, {@code - * verification_document_id_number_mismatch}, {@code verification_document_id_number_missing}, - * {@code verification_document_incomplete}, {@code verification_document_invalid}, {@code - * verification_document_issue_or_expiry_date_missing}, {@code - * verification_document_manipulated}, {@code verification_document_missing_back}, {@code - * verification_document_missing_front}, {@code verification_document_name_mismatch}, {@code - * verification_document_name_missing}, {@code verification_document_nationality_mismatch}, - * {@code verification_document_not_readable}, {@code verification_document_not_signed}, - * {@code verification_document_not_uploaded}, {@code verification_document_photo_mismatch}, - * {@code verification_document_too_large}, {@code verification_document_type_not_supported}, - * {@code verification_extraneous_directors}, {@code verification_failed_address_match}, - * {@code verification_failed_authorizer_authority}, {@code - * verification_failed_business_iec_number}, {@code verification_failed_document_match}, - * {@code verification_failed_id_number_match}, {@code verification_failed_keyed_identity}, - * {@code verification_failed_keyed_match}, {@code verification_failed_name_match}, {@code - * verification_failed_other}, {@code verification_failed_representative_authority}, {@code + * {@code invalid_value_other}, {@code unsupported_business_type}, {@code + * verification_directors_mismatch}, {@code verification_document_address_mismatch}, {@code + * verification_document_address_missing}, {@code verification_document_corrupt}, {@code + * verification_document_country_not_supported}, {@code + * verification_document_directors_mismatch}, {@code verification_document_dob_mismatch}, + * {@code verification_document_duplicate_type}, {@code verification_document_expired}, {@code + * verification_document_failed_copy}, {@code verification_document_failed_greyscale}, {@code + * verification_document_failed_other}, {@code verification_document_failed_test_mode}, {@code + * verification_document_fraudulent}, {@code verification_document_id_number_mismatch}, {@code + * verification_document_id_number_missing}, {@code verification_document_incomplete}, {@code + * verification_document_invalid}, {@code verification_document_issue_or_expiry_date_missing}, + * {@code verification_document_manipulated}, {@code verification_document_missing_back}, + * {@code verification_document_missing_front}, {@code verification_document_name_mismatch}, + * {@code verification_document_name_missing}, {@code + * verification_document_nationality_mismatch}, {@code verification_document_not_readable}, + * {@code verification_document_not_signed}, {@code verification_document_not_uploaded}, + * {@code verification_document_photo_mismatch}, {@code verification_document_too_large}, + * {@code verification_document_type_not_supported}, {@code + * verification_extraneous_directors}, {@code verification_failed_address_match}, {@code + * verification_failed_authorizer_authority}, {@code verification_failed_business_iec_number}, + * {@code verification_failed_document_match}, {@code verification_failed_id_number_match}, + * {@code verification_failed_keyed_identity}, {@code verification_failed_keyed_match}, {@code + * verification_failed_name_match}, {@code verification_failed_other}, {@code + * verification_failed_representative_authority}, {@code * verification_failed_residential_address}, {@code verification_failed_tax_id_match}, {@code * verification_failed_tax_id_not_issued}, {@code * verification_legal_entity_structure_mismatch}, {@code verification_missing_directors}, @@ -680,14 +681,14 @@ public static class Errors extends StripeObject { /** * The code for the type of error. * - *

One of {@code information_missing}, {@code invalid_address_city_state_postal_code}, - * {@code invalid_address_highway_contract_box}, {@code invalid_address_private_mailbox}, - * {@code invalid_business_profile_name}, {@code invalid_business_profile_name_denylisted}, - * {@code invalid_company_name_denylisted}, {@code invalid_dob_age_over_maximum}, {@code - * invalid_dob_age_under_18}, {@code invalid_dob_age_under_minimum}, {@code - * invalid_product_description_length}, {@code invalid_product_description_url_match}, {@code - * invalid_representative_country}, {@code invalid_signator}, {@code - * invalid_statement_descriptor_business_mismatch}, {@code + *

One of {@code external_request}, {@code information_missing}, {@code + * invalid_address_city_state_postal_code}, {@code invalid_address_highway_contract_box}, + * {@code invalid_address_private_mailbox}, {@code invalid_business_profile_name}, {@code + * invalid_business_profile_name_denylisted}, {@code invalid_company_name_denylisted}, {@code + * invalid_dob_age_over_maximum}, {@code invalid_dob_age_under_18}, {@code + * invalid_dob_age_under_minimum}, {@code invalid_product_description_length}, {@code + * invalid_product_description_url_match}, {@code invalid_representative_country}, {@code + * invalid_signator}, {@code invalid_statement_descriptor_business_mismatch}, {@code * invalid_statement_descriptor_denylisted}, {@code invalid_statement_descriptor_length}, * {@code invalid_statement_descriptor_prefix_denylisted}, {@code * invalid_statement_descriptor_prefix_mismatch}, {@code invalid_street_address}, {@code @@ -706,29 +707,30 @@ public static class Errors extends StripeObject { * invalid_url_website_incomplete_return_policy}, {@code * invalid_url_website_incomplete_terms_and_conditions}, {@code * invalid_url_website_incomplete_under_construction}, {@code invalid_url_website_other}, - * {@code invalid_value_other}, {@code verification_directors_mismatch}, {@code - * verification_document_address_mismatch}, {@code verification_document_address_missing}, - * {@code verification_document_corrupt}, {@code verification_document_country_not_supported}, - * {@code verification_document_directors_mismatch}, {@code - * verification_document_dob_mismatch}, {@code verification_document_duplicate_type}, {@code - * verification_document_expired}, {@code verification_document_failed_copy}, {@code - * verification_document_failed_greyscale}, {@code verification_document_failed_other}, {@code - * verification_document_failed_test_mode}, {@code verification_document_fraudulent}, {@code - * verification_document_id_number_mismatch}, {@code verification_document_id_number_missing}, - * {@code verification_document_incomplete}, {@code verification_document_invalid}, {@code - * verification_document_issue_or_expiry_date_missing}, {@code - * verification_document_manipulated}, {@code verification_document_missing_back}, {@code - * verification_document_missing_front}, {@code verification_document_name_mismatch}, {@code - * verification_document_name_missing}, {@code verification_document_nationality_mismatch}, - * {@code verification_document_not_readable}, {@code verification_document_not_signed}, - * {@code verification_document_not_uploaded}, {@code verification_document_photo_mismatch}, - * {@code verification_document_too_large}, {@code verification_document_type_not_supported}, - * {@code verification_extraneous_directors}, {@code verification_failed_address_match}, - * {@code verification_failed_authorizer_authority}, {@code - * verification_failed_business_iec_number}, {@code verification_failed_document_match}, - * {@code verification_failed_id_number_match}, {@code verification_failed_keyed_identity}, - * {@code verification_failed_keyed_match}, {@code verification_failed_name_match}, {@code - * verification_failed_other}, {@code verification_failed_representative_authority}, {@code + * {@code invalid_value_other}, {@code unsupported_business_type}, {@code + * verification_directors_mismatch}, {@code verification_document_address_mismatch}, {@code + * verification_document_address_missing}, {@code verification_document_corrupt}, {@code + * verification_document_country_not_supported}, {@code + * verification_document_directors_mismatch}, {@code verification_document_dob_mismatch}, + * {@code verification_document_duplicate_type}, {@code verification_document_expired}, {@code + * verification_document_failed_copy}, {@code verification_document_failed_greyscale}, {@code + * verification_document_failed_other}, {@code verification_document_failed_test_mode}, {@code + * verification_document_fraudulent}, {@code verification_document_id_number_mismatch}, {@code + * verification_document_id_number_missing}, {@code verification_document_incomplete}, {@code + * verification_document_invalid}, {@code verification_document_issue_or_expiry_date_missing}, + * {@code verification_document_manipulated}, {@code verification_document_missing_back}, + * {@code verification_document_missing_front}, {@code verification_document_name_mismatch}, + * {@code verification_document_name_missing}, {@code + * verification_document_nationality_mismatch}, {@code verification_document_not_readable}, + * {@code verification_document_not_signed}, {@code verification_document_not_uploaded}, + * {@code verification_document_photo_mismatch}, {@code verification_document_too_large}, + * {@code verification_document_type_not_supported}, {@code + * verification_extraneous_directors}, {@code verification_failed_address_match}, {@code + * verification_failed_authorizer_authority}, {@code verification_failed_business_iec_number}, + * {@code verification_failed_document_match}, {@code verification_failed_id_number_match}, + * {@code verification_failed_keyed_identity}, {@code verification_failed_keyed_match}, {@code + * verification_failed_name_match}, {@code verification_failed_other}, {@code + * verification_failed_representative_authority}, {@code * verification_failed_residential_address}, {@code verification_failed_tax_id_match}, {@code * verification_failed_tax_id_not_issued}, {@code * verification_legal_entity_structure_mismatch}, {@code verification_missing_directors}, diff --git a/src/main/java/com/stripe/model/Capability.java b/src/main/java/com/stripe/model/Capability.java index f0c8d1b3e45..0b49c7c1f22 100644 --- a/src/main/java/com/stripe/model/Capability.java +++ b/src/main/java/com/stripe/model/Capability.java @@ -246,14 +246,14 @@ public static class Errors extends StripeObject { /** * The code for the type of error. * - *

One of {@code information_missing}, {@code invalid_address_city_state_postal_code}, - * {@code invalid_address_highway_contract_box}, {@code invalid_address_private_mailbox}, - * {@code invalid_business_profile_name}, {@code invalid_business_profile_name_denylisted}, - * {@code invalid_company_name_denylisted}, {@code invalid_dob_age_over_maximum}, {@code - * invalid_dob_age_under_18}, {@code invalid_dob_age_under_minimum}, {@code - * invalid_product_description_length}, {@code invalid_product_description_url_match}, {@code - * invalid_representative_country}, {@code invalid_signator}, {@code - * invalid_statement_descriptor_business_mismatch}, {@code + *

One of {@code external_request}, {@code information_missing}, {@code + * invalid_address_city_state_postal_code}, {@code invalid_address_highway_contract_box}, + * {@code invalid_address_private_mailbox}, {@code invalid_business_profile_name}, {@code + * invalid_business_profile_name_denylisted}, {@code invalid_company_name_denylisted}, {@code + * invalid_dob_age_over_maximum}, {@code invalid_dob_age_under_18}, {@code + * invalid_dob_age_under_minimum}, {@code invalid_product_description_length}, {@code + * invalid_product_description_url_match}, {@code invalid_representative_country}, {@code + * invalid_signator}, {@code invalid_statement_descriptor_business_mismatch}, {@code * invalid_statement_descriptor_denylisted}, {@code invalid_statement_descriptor_length}, * {@code invalid_statement_descriptor_prefix_denylisted}, {@code * invalid_statement_descriptor_prefix_mismatch}, {@code invalid_street_address}, {@code @@ -272,29 +272,30 @@ public static class Errors extends StripeObject { * invalid_url_website_incomplete_return_policy}, {@code * invalid_url_website_incomplete_terms_and_conditions}, {@code * invalid_url_website_incomplete_under_construction}, {@code invalid_url_website_other}, - * {@code invalid_value_other}, {@code verification_directors_mismatch}, {@code - * verification_document_address_mismatch}, {@code verification_document_address_missing}, - * {@code verification_document_corrupt}, {@code verification_document_country_not_supported}, - * {@code verification_document_directors_mismatch}, {@code - * verification_document_dob_mismatch}, {@code verification_document_duplicate_type}, {@code - * verification_document_expired}, {@code verification_document_failed_copy}, {@code - * verification_document_failed_greyscale}, {@code verification_document_failed_other}, {@code - * verification_document_failed_test_mode}, {@code verification_document_fraudulent}, {@code - * verification_document_id_number_mismatch}, {@code verification_document_id_number_missing}, - * {@code verification_document_incomplete}, {@code verification_document_invalid}, {@code - * verification_document_issue_or_expiry_date_missing}, {@code - * verification_document_manipulated}, {@code verification_document_missing_back}, {@code - * verification_document_missing_front}, {@code verification_document_name_mismatch}, {@code - * verification_document_name_missing}, {@code verification_document_nationality_mismatch}, - * {@code verification_document_not_readable}, {@code verification_document_not_signed}, - * {@code verification_document_not_uploaded}, {@code verification_document_photo_mismatch}, - * {@code verification_document_too_large}, {@code verification_document_type_not_supported}, - * {@code verification_extraneous_directors}, {@code verification_failed_address_match}, - * {@code verification_failed_authorizer_authority}, {@code - * verification_failed_business_iec_number}, {@code verification_failed_document_match}, - * {@code verification_failed_id_number_match}, {@code verification_failed_keyed_identity}, - * {@code verification_failed_keyed_match}, {@code verification_failed_name_match}, {@code - * verification_failed_other}, {@code verification_failed_representative_authority}, {@code + * {@code invalid_value_other}, {@code unsupported_business_type}, {@code + * verification_directors_mismatch}, {@code verification_document_address_mismatch}, {@code + * verification_document_address_missing}, {@code verification_document_corrupt}, {@code + * verification_document_country_not_supported}, {@code + * verification_document_directors_mismatch}, {@code verification_document_dob_mismatch}, + * {@code verification_document_duplicate_type}, {@code verification_document_expired}, {@code + * verification_document_failed_copy}, {@code verification_document_failed_greyscale}, {@code + * verification_document_failed_other}, {@code verification_document_failed_test_mode}, {@code + * verification_document_fraudulent}, {@code verification_document_id_number_mismatch}, {@code + * verification_document_id_number_missing}, {@code verification_document_incomplete}, {@code + * verification_document_invalid}, {@code verification_document_issue_or_expiry_date_missing}, + * {@code verification_document_manipulated}, {@code verification_document_missing_back}, + * {@code verification_document_missing_front}, {@code verification_document_name_mismatch}, + * {@code verification_document_name_missing}, {@code + * verification_document_nationality_mismatch}, {@code verification_document_not_readable}, + * {@code verification_document_not_signed}, {@code verification_document_not_uploaded}, + * {@code verification_document_photo_mismatch}, {@code verification_document_too_large}, + * {@code verification_document_type_not_supported}, {@code + * verification_extraneous_directors}, {@code verification_failed_address_match}, {@code + * verification_failed_authorizer_authority}, {@code verification_failed_business_iec_number}, + * {@code verification_failed_document_match}, {@code verification_failed_id_number_match}, + * {@code verification_failed_keyed_identity}, {@code verification_failed_keyed_match}, {@code + * verification_failed_name_match}, {@code verification_failed_other}, {@code + * verification_failed_representative_authority}, {@code * verification_failed_residential_address}, {@code verification_failed_tax_id_match}, {@code * verification_failed_tax_id_not_issued}, {@code * verification_legal_entity_structure_mismatch}, {@code verification_missing_directors}, @@ -431,14 +432,14 @@ public static class Errors extends StripeObject { /** * The code for the type of error. * - *

One of {@code information_missing}, {@code invalid_address_city_state_postal_code}, - * {@code invalid_address_highway_contract_box}, {@code invalid_address_private_mailbox}, - * {@code invalid_business_profile_name}, {@code invalid_business_profile_name_denylisted}, - * {@code invalid_company_name_denylisted}, {@code invalid_dob_age_over_maximum}, {@code - * invalid_dob_age_under_18}, {@code invalid_dob_age_under_minimum}, {@code - * invalid_product_description_length}, {@code invalid_product_description_url_match}, {@code - * invalid_representative_country}, {@code invalid_signator}, {@code - * invalid_statement_descriptor_business_mismatch}, {@code + *

One of {@code external_request}, {@code information_missing}, {@code + * invalid_address_city_state_postal_code}, {@code invalid_address_highway_contract_box}, + * {@code invalid_address_private_mailbox}, {@code invalid_business_profile_name}, {@code + * invalid_business_profile_name_denylisted}, {@code invalid_company_name_denylisted}, {@code + * invalid_dob_age_over_maximum}, {@code invalid_dob_age_under_18}, {@code + * invalid_dob_age_under_minimum}, {@code invalid_product_description_length}, {@code + * invalid_product_description_url_match}, {@code invalid_representative_country}, {@code + * invalid_signator}, {@code invalid_statement_descriptor_business_mismatch}, {@code * invalid_statement_descriptor_denylisted}, {@code invalid_statement_descriptor_length}, * {@code invalid_statement_descriptor_prefix_denylisted}, {@code * invalid_statement_descriptor_prefix_mismatch}, {@code invalid_street_address}, {@code @@ -457,29 +458,30 @@ public static class Errors extends StripeObject { * invalid_url_website_incomplete_return_policy}, {@code * invalid_url_website_incomplete_terms_and_conditions}, {@code * invalid_url_website_incomplete_under_construction}, {@code invalid_url_website_other}, - * {@code invalid_value_other}, {@code verification_directors_mismatch}, {@code - * verification_document_address_mismatch}, {@code verification_document_address_missing}, - * {@code verification_document_corrupt}, {@code verification_document_country_not_supported}, - * {@code verification_document_directors_mismatch}, {@code - * verification_document_dob_mismatch}, {@code verification_document_duplicate_type}, {@code - * verification_document_expired}, {@code verification_document_failed_copy}, {@code - * verification_document_failed_greyscale}, {@code verification_document_failed_other}, {@code - * verification_document_failed_test_mode}, {@code verification_document_fraudulent}, {@code - * verification_document_id_number_mismatch}, {@code verification_document_id_number_missing}, - * {@code verification_document_incomplete}, {@code verification_document_invalid}, {@code - * verification_document_issue_or_expiry_date_missing}, {@code - * verification_document_manipulated}, {@code verification_document_missing_back}, {@code - * verification_document_missing_front}, {@code verification_document_name_mismatch}, {@code - * verification_document_name_missing}, {@code verification_document_nationality_mismatch}, - * {@code verification_document_not_readable}, {@code verification_document_not_signed}, - * {@code verification_document_not_uploaded}, {@code verification_document_photo_mismatch}, - * {@code verification_document_too_large}, {@code verification_document_type_not_supported}, - * {@code verification_extraneous_directors}, {@code verification_failed_address_match}, - * {@code verification_failed_authorizer_authority}, {@code - * verification_failed_business_iec_number}, {@code verification_failed_document_match}, - * {@code verification_failed_id_number_match}, {@code verification_failed_keyed_identity}, - * {@code verification_failed_keyed_match}, {@code verification_failed_name_match}, {@code - * verification_failed_other}, {@code verification_failed_representative_authority}, {@code + * {@code invalid_value_other}, {@code unsupported_business_type}, {@code + * verification_directors_mismatch}, {@code verification_document_address_mismatch}, {@code + * verification_document_address_missing}, {@code verification_document_corrupt}, {@code + * verification_document_country_not_supported}, {@code + * verification_document_directors_mismatch}, {@code verification_document_dob_mismatch}, + * {@code verification_document_duplicate_type}, {@code verification_document_expired}, {@code + * verification_document_failed_copy}, {@code verification_document_failed_greyscale}, {@code + * verification_document_failed_other}, {@code verification_document_failed_test_mode}, {@code + * verification_document_fraudulent}, {@code verification_document_id_number_mismatch}, {@code + * verification_document_id_number_missing}, {@code verification_document_incomplete}, {@code + * verification_document_invalid}, {@code verification_document_issue_or_expiry_date_missing}, + * {@code verification_document_manipulated}, {@code verification_document_missing_back}, + * {@code verification_document_missing_front}, {@code verification_document_name_mismatch}, + * {@code verification_document_name_missing}, {@code + * verification_document_nationality_mismatch}, {@code verification_document_not_readable}, + * {@code verification_document_not_signed}, {@code verification_document_not_uploaded}, + * {@code verification_document_photo_mismatch}, {@code verification_document_too_large}, + * {@code verification_document_type_not_supported}, {@code + * verification_extraneous_directors}, {@code verification_failed_address_match}, {@code + * verification_failed_authorizer_authority}, {@code verification_failed_business_iec_number}, + * {@code verification_failed_document_match}, {@code verification_failed_id_number_match}, + * {@code verification_failed_keyed_identity}, {@code verification_failed_keyed_match}, {@code + * verification_failed_name_match}, {@code verification_failed_other}, {@code + * verification_failed_representative_authority}, {@code * verification_failed_residential_address}, {@code verification_failed_tax_id_match}, {@code * verification_failed_tax_id_not_issued}, {@code * verification_legal_entity_structure_mismatch}, {@code verification_missing_directors}, diff --git a/src/main/java/com/stripe/model/Card.java b/src/main/java/com/stripe/model/Card.java index 5b22ef8f7fd..bd10533c495 100644 --- a/src/main/java/com/stripe/model/Card.java +++ b/src/main/java/com/stripe/model/Card.java @@ -90,9 +90,9 @@ public class Card extends ApiResource List availablePayoutMethods; /** - * Card brand. Can be {@code American Express}, {@code Diners Club}, {@code Discover}, {@code - * Eftpos Australia}, {@code Girocard}, {@code JCB}, {@code MasterCard}, {@code UnionPay}, {@code - * Visa}, or {@code Unknown}. + * Card brand. Can be {@code American Express}, {@code Cartes Bancaires}, {@code Diners Club}, + * {@code Discover}, {@code Eftpos Australia}, {@code Girocard}, {@code JCB}, {@code MasterCard}, + * {@code UnionPay}, {@code Visa}, or {@code Unknown}. */ @SerializedName("brand") String brand; diff --git a/src/main/java/com/stripe/model/Charge.java b/src/main/java/com/stripe/model/Charge.java index 0952ca5cd80..276b5c8aabb 100644 --- a/src/main/java/com/stripe/model/Charge.java +++ b/src/main/java/com/stripe/model/Charge.java @@ -23,9 +23,9 @@ /** * The {@code Charge} object represents a single attempt to move money into your Stripe account. - * PaymentIntent confirmation is the most common way to create Charges, but transferring money to a - * different Stripe account through Connect also creates Charges. Some legacy payment flows create - * Charges directly, which is not recommended for new integrations. + * PaymentIntent confirmation is the most common way to create Charges, but Account Debits may also create Charges. + * Some legacy payment flows create Charges directly, which is not recommended for new integrations. */ @Getter @Setter @@ -1240,6 +1240,9 @@ public static class PaymentMethodDetails extends StripeObject { @SerializedName("link") Link link; + @SerializedName("mb_way") + MbWay mbWay; + @SerializedName("mobilepay") Mobilepay mobilepay; @@ -1270,6 +1273,9 @@ public static class PaymentMethodDetails extends StripeObject { @SerializedName("paypal") Paypal paypal; + @SerializedName("paypay") + Paypay paypay; + @SerializedName("pix") Pix pix; @@ -3278,6 +3284,15 @@ public static class Link extends StripeObject { String country; } + /** + * For more details about MbWay, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class MbWay extends StripeObject {} + /** * For more details about Mobilepay, please refer to the API Reference. @@ -3557,6 +3572,15 @@ public static class SellerProtection extends StripeObject { } } + /** + * For more details about Paypay, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Paypay extends StripeObject {} + /** * For more details about Pix, please refer to the API * Reference. diff --git a/src/main/java/com/stripe/model/ConfirmationToken.java b/src/main/java/com/stripe/model/ConfirmationToken.java index d7a19863930..1cdd8be1f9a 100644 --- a/src/main/java/com/stripe/model/ConfirmationToken.java +++ b/src/main/java/com/stripe/model/ConfirmationToken.java @@ -374,6 +374,9 @@ public static class PaymentMethodPreview extends StripeObject { @SerializedName("link") Link link; + @SerializedName("mb_way") + MbWay mbWay; + @SerializedName("mobilepay") Mobilepay mobilepay; @@ -404,6 +407,9 @@ public static class PaymentMethodPreview extends StripeObject { @SerializedName("paypal") Paypal paypal; + @SerializedName("paypay") + Paypay paypay; + @SerializedName("pix") Pix pix; @@ -441,12 +447,12 @@ public static class PaymentMethodPreview extends StripeObject { * bancontact}, {@code billie}, {@code blik}, {@code boleto}, {@code card}, {@code * card_present}, {@code cashapp}, {@code crypto}, {@code customer_balance}, {@code eps}, {@code * fpx}, {@code giropay}, {@code grabpay}, {@code ideal}, {@code interac_present}, {@code - * kakao_pay}, {@code klarna}, {@code konbini}, {@code kr_card}, {@code link}, {@code - * mobilepay}, {@code multibanco}, {@code naver_pay}, {@code nz_bank_account}, {@code oxxo}, - * {@code p24}, {@code pay_by_bank}, {@code payco}, {@code paynow}, {@code paypal}, {@code pix}, - * {@code promptpay}, {@code revolut_pay}, {@code samsung_pay}, {@code satispay}, {@code - * sepa_debit}, {@code sofort}, {@code swish}, {@code twint}, {@code us_bank_account}, {@code - * wechat_pay}, or {@code zip}. + * kakao_pay}, {@code klarna}, {@code konbini}, {@code kr_card}, {@code link}, {@code mb_way}, + * {@code mobilepay}, {@code multibanco}, {@code naver_pay}, {@code nz_bank_account}, {@code + * oxxo}, {@code p24}, {@code pay_by_bank}, {@code payco}, {@code paynow}, {@code paypal}, + * {@code paypay}, {@code pix}, {@code promptpay}, {@code revolut_pay}, {@code samsung_pay}, + * {@code satispay}, {@code sepa_debit}, {@code sofort}, {@code swish}, {@code twint}, {@code + * us_bank_account}, {@code wechat_pay}, or {@code zip}. */ @SerializedName("type") String type; @@ -1899,6 +1905,15 @@ public static class Link extends StripeObject { String persistentToken; } + /** + * For more details about MbWay, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class MbWay extends StripeObject {} + /** * For more details about Mobilepay, please refer to the API Reference. @@ -2064,6 +2079,15 @@ public static class Paypal extends StripeObject { String payerId; } + /** + * For more details about Paypay, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Paypay extends StripeObject {} + /** * For more details about Pix, please refer to the API * Reference. diff --git a/src/main/java/com/stripe/model/Customer.java b/src/main/java/com/stripe/model/Customer.java index a25a06ff9fd..2cb7a88927e 100644 --- a/src/main/java/com/stripe/model/Customer.java +++ b/src/main/java/com/stripe/model/Customer.java @@ -52,6 +52,10 @@ public class Customer extends ApiResource implements HasId, MetadataStoresubscriptions, invoices, checkout sessions, quotes, and more. Coupons do not work with - * conventional one-off charges or payment intents. - */ - @SerializedName("coupon") - Coupon coupon; - /** The ID of the customer associated with this discount. */ @SerializedName("customer") @Getter(lombok.AccessLevel.NONE) @@ -94,6 +81,9 @@ public class Discount extends StripeObject implements HasId { @Setter(lombok.AccessLevel.NONE) ExpandableField promotionCode; + @SerializedName("source") + Source source; + /** Date that the coupon was applied. */ @SerializedName("start") Long start; @@ -147,4 +137,45 @@ public void setPromotionCodeObject(PromotionCode expandableObject) { this.promotionCode = new ExpandableField(expandableObject.getId(), expandableObject); } + + /** + * For more details about Source, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Source extends StripeObject { + /** The coupon that was redeemed to create this discount. */ + @SerializedName("coupon") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField coupon; + + /** + * The source type of the discount. + * + *

Equal to {@code coupon}. + */ + @SerializedName("type") + String type; + + /** Get ID of expandable {@code coupon} object. */ + public String getCoupon() { + return (this.coupon != null) ? this.coupon.getId() : null; + } + + public void setCoupon(String id) { + this.coupon = ApiResource.setExpandableFieldId(id, this.coupon); + } + + /** Get expanded {@code coupon}. */ + public Coupon getCouponObject() { + return (this.coupon != null) ? this.coupon.getExpanded() : null; + } + + public void setCouponObject(Coupon expandableObject) { + this.coupon = new ExpandableField(expandableObject.getId(), expandableObject); + } + } } diff --git a/src/main/java/com/stripe/model/Dispute.java b/src/main/java/com/stripe/model/Dispute.java index 84007fef7b5..1ce9341ee21 100644 --- a/src/main/java/com/stripe/model/Dispute.java +++ b/src/main/java/com/stripe/model/Dispute.java @@ -878,11 +878,11 @@ public static class ShippingAddress extends StripeObject { @SerializedName("country") String country; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -966,11 +966,11 @@ public static class ShippingAddress extends StripeObject { @SerializedName("country") String country; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -1190,6 +1190,10 @@ public static class Card extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Klarna extends StripeObject { + /** Chargeback loss reason mapped by Stripe from Klarna's chargeback loss reason. */ + @SerializedName("chargeback_loss_reason_code") + String chargebackLossReasonCode; + /** The reason for the dispute as defined by Klarna. */ @SerializedName("reason_code") String reasonCode; diff --git a/src/main/java/com/stripe/model/EventDataClassLookup.java b/src/main/java/com/stripe/model/EventDataClassLookup.java index 4d73ba4db60..b22584af125 100644 --- a/src/main/java/com/stripe/model/EventDataClassLookup.java +++ b/src/main/java/com/stripe/model/EventDataClassLookup.java @@ -21,6 +21,7 @@ public final class EventDataClassLookup { classLookup.put("application", Application.class); classLookup.put("application_fee", ApplicationFee.class); classLookup.put("balance", Balance.class); + classLookup.put("balance_settings", BalanceSettings.class); classLookup.put("balance_transaction", BalanceTransaction.class); classLookup.put("bank_account", BankAccount.class); classLookup.put("capability", Capability.class); diff --git a/src/main/java/com/stripe/model/ExchangeRate.java b/src/main/java/com/stripe/model/ExchangeRate.java index 50f6240bc25..6c82ffc2ec4 100644 --- a/src/main/java/com/stripe/model/ExchangeRate.java +++ b/src/main/java/com/stripe/model/ExchangeRate.java @@ -17,10 +17,14 @@ import lombok.Setter; /** - * {@code ExchangeRate} objects allow you to determine the rates that Stripe is currently using to - * convert from one currency to another. Since this number is variable throughout the day, there are - * various reasons why you might want to know the current rate (for example, to dynamically price an - * item for a user with a default payment in a foreign currency). + * [Deprecated] The {@code ExchangeRate} APIs are deprecated. Please use the FX Quotes + * API instead. + * + *

{@code ExchangeRate} objects allow you to determine the rates that Stripe is currently using + * to convert from one currency to another. Since this number is variable throughout the day, there + * are various reasons why you might want to know the current rate (for example, to dynamically + * price an item for a user with a default payment in a foreign currency). * *

Please refer to our Exchange Rates API guide * for more details. @@ -74,17 +78,27 @@ public class ExchangeRate extends ApiResource implements HasId { Map rates; /** - * Returns a list of objects that contain the rates at which foreign currencies are converted to - * one another. Only shows the currencies for which Stripe supports. + * [Deprecated] The {@code ExchangeRate} APIs are deprecated. Please use the FX Quotes + * API instead. + * + *

Returns a list of objects that contain the rates at which foreign currencies are converted + * to one another. Only shows the currencies for which Stripe supports. */ + @Deprecated public static ExchangeRateCollection list(Map params) throws StripeException { return list(params, (RequestOptions) null); } /** - * Returns a list of objects that contain the rates at which foreign currencies are converted to - * one another. Only shows the currencies for which Stripe supports. + * [Deprecated] The {@code ExchangeRate} APIs are deprecated. Please use the FX Quotes + * API instead. + * + *

Returns a list of objects that contain the rates at which foreign currencies are converted + * to one another. Only shows the currencies for which Stripe supports. */ + @Deprecated public static ExchangeRateCollection list(Map params, RequestOptions options) throws StripeException { String path = "/v1/exchange_rates"; @@ -94,17 +108,27 @@ public static ExchangeRateCollection list(Map params, RequestOpt } /** - * Returns a list of objects that contain the rates at which foreign currencies are converted to - * one another. Only shows the currencies for which Stripe supports. + * [Deprecated] The {@code ExchangeRate} APIs are deprecated. Please use the FX Quotes + * API instead. + * + *

Returns a list of objects that contain the rates at which foreign currencies are converted + * to one another. Only shows the currencies for which Stripe supports. */ + @Deprecated public static ExchangeRateCollection list(ExchangeRateListParams params) throws StripeException { return list(params, (RequestOptions) null); } /** - * Returns a list of objects that contain the rates at which foreign currencies are converted to - * one another. Only shows the currencies for which Stripe supports. + * [Deprecated] The {@code ExchangeRate} APIs are deprecated. Please use the FX Quotes + * API instead. + * + *

Returns a list of objects that contain the rates at which foreign currencies are converted + * to one another. Only shows the currencies for which Stripe supports. */ + @Deprecated public static ExchangeRateCollection list(ExchangeRateListParams params, RequestOptions options) throws StripeException { String path = "/v1/exchange_rates"; @@ -119,18 +143,39 @@ public static ExchangeRateCollection list(ExchangeRateListParams params, Request return getGlobalResponseGetter().request(request, ExchangeRateCollection.class); } - /** Retrieves the exchange rates from the given currency to every supported currency. */ + /** + * [Deprecated] The {@code ExchangeRate} APIs are deprecated. Please use the FX Quotes + * API instead. + * + *

Retrieves the exchange rates from the given currency to every supported currency. + */ + @Deprecated public static ExchangeRate retrieve(String rateId) throws StripeException { return retrieve(rateId, (Map) null, (RequestOptions) null); } - /** Retrieves the exchange rates from the given currency to every supported currency. */ + /** + * [Deprecated] The {@code ExchangeRate} APIs are deprecated. Please use the FX Quotes + * API instead. + * + *

Retrieves the exchange rates from the given currency to every supported currency. + */ + @Deprecated public static ExchangeRate retrieve(String rateId, RequestOptions options) throws StripeException { return retrieve(rateId, (Map) null, options); } - /** Retrieves the exchange rates from the given currency to every supported currency. */ + /** + * [Deprecated] The {@code ExchangeRate} APIs are deprecated. Please use the FX Quotes + * API instead. + * + *

Retrieves the exchange rates from the given currency to every supported currency. + */ + @Deprecated public static ExchangeRate retrieve( String rateId, Map params, RequestOptions options) throws StripeException { String path = String.format("/v1/exchange_rates/%s", ApiResource.urlEncodeId(rateId)); @@ -139,7 +184,14 @@ public static ExchangeRate retrieve( return getGlobalResponseGetter().request(request, ExchangeRate.class); } - /** Retrieves the exchange rates from the given currency to every supported currency. */ + /** + * [Deprecated] The {@code ExchangeRate} APIs are deprecated. Please use the FX Quotes + * API instead. + * + *

Retrieves the exchange rates from the given currency to every supported currency. + */ + @Deprecated public static ExchangeRate retrieve( String rateId, ExchangeRateRetrieveParams params, RequestOptions options) throws StripeException { diff --git a/src/main/java/com/stripe/model/InvoiceItem.java b/src/main/java/com/stripe/model/InvoiceItem.java index 3e7ae0a0338..3d0f57f2715 100644 --- a/src/main/java/com/stripe/model/InvoiceItem.java +++ b/src/main/java/com/stripe/model/InvoiceItem.java @@ -115,6 +115,13 @@ public class InvoiceItem extends ApiResource implements HasId, MetadataStore metadata; + /** + * The amount after discounts, but before credits and taxes. This field is {@code null} for {@code + * discountable=true} items. + */ + @SerializedName("net_amount") + Long netAmount; + /** * String representing the object's type. Objects of the same type share the same value. * @@ -141,6 +148,9 @@ public class InvoiceItem extends ApiResource implements HasId, MetadataStoreAPI Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class ProrationDetails extends StripeObject { + /** Discount amounts applied when the proration was created. */ + @SerializedName("discount_amounts") + List discountAmounts; + + /** + * For more details about DiscountAmount, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class DiscountAmount extends StripeObject { + /** The amount, in cents (or local equivalent), of the discount. */ + @SerializedName("amount") + Long amount; + + /** The discount that was applied to get this discount amount. */ + @SerializedName("discount") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField discount; + + /** Get ID of expandable {@code discount} object. */ + public String getDiscount() { + return (this.discount != null) ? this.discount.getId() : null; + } + + public void setDiscount(String id) { + this.discount = ApiResource.setExpandableFieldId(id, this.discount); + } + + /** Get expanded {@code discount}. */ + public Discount getDiscountObject() { + return (this.discount != null) ? this.discount.getExpanded() : null; + } + + public void setDiscountObject(Discount expandableObject) { + this.discount = new ExpandableField(expandableObject.getId(), expandableObject); + } + } + } + @Override public void setResponseGetter(StripeResponseGetter responseGetter) { super.setResponseGetter(responseGetter); @@ -579,6 +639,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { trySetResponseGetter(parent, responseGetter); trySetResponseGetter(period, responseGetter); trySetResponseGetter(pricing, responseGetter); + trySetResponseGetter(prorationDetails, responseGetter); trySetResponseGetter(testClock, responseGetter); } } diff --git a/src/main/java/com/stripe/model/PaymentIntent.java b/src/main/java/com/stripe/model/PaymentIntent.java index 2be3c903202..20689bedd9a 100644 --- a/src/main/java/com/stripe/model/PaymentIntent.java +++ b/src/main/java/com/stripe/model/PaymentIntent.java @@ -2607,6 +2607,9 @@ public static class PaymentMethodOptions extends StripeObject { @SerializedName("link") Link link; + @SerializedName("mb_way") + MbWay mbWay; + @SerializedName("mobilepay") Mobilepay mobilepay; @@ -2637,6 +2640,9 @@ public static class PaymentMethodOptions extends StripeObject { @SerializedName("paypal") Paypal paypal; + @SerializedName("paypay") + Paypay paypay; + @SerializedName("pix") Pix pix; @@ -4097,6 +4103,39 @@ public static class Link extends StripeObject { String setupFutureUsage; } + /** + * For more details about MbWay, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class MbWay extends StripeObject { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

If you provide a Customer with the PaymentIntent, you can use this parameter to attach the payment method to the + * Customer after the PaymentIntent is confirmed and the customer completes any required + * actions. If you don't provide a Customer, you can still attach the payment method to a + * Customer after the transaction completes. + * + *

If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates + * and attaches a generated_card + * payment method representing the card to the Customer instead. + * + *

When processing card payments, Stripe uses {@code setup_future_usage} to help you comply + * with regional legislation and network rules, such as SCA. + * + *

Equal to {@code none}. + */ + @SerializedName("setup_future_usage") + String setupFutureUsage; + } + /** * For more details about Mobilepay, please refer to the API Reference. @@ -4439,6 +4478,15 @@ public static class Paypal extends StripeObject { String setupFutureUsage; } + /** + * For more details about Paypay, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Paypay extends StripeObject {} + /** * For more details about Pix, please refer to the API * Reference. diff --git a/src/main/java/com/stripe/model/PaymentMethod.java b/src/main/java/com/stripe/model/PaymentMethod.java index 7189206d53e..438529dfa7f 100644 --- a/src/main/java/com/stripe/model/PaymentMethod.java +++ b/src/main/java/com/stripe/model/PaymentMethod.java @@ -156,6 +156,9 @@ public class PaymentMethod extends ApiResource implements HasId, MetadataStore

key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a @@ -203,6 +206,9 @@ public class PaymentMethod extends ApiResource implements HasId, MetadataStore

API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class MbWay extends StripeObject {} + /** * For more details about Mobilepay, please refer to the API * Reference. @@ -2252,6 +2268,15 @@ public static class Paypal extends StripeObject { String payerId; } + /** + * For more details about Paypay, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Paypay extends StripeObject {} + /** * For more details about Pix, please refer to the API * Reference. @@ -2603,6 +2628,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { trySetResponseGetter(konbini, responseGetter); trySetResponseGetter(krCard, responseGetter); trySetResponseGetter(link, responseGetter); + trySetResponseGetter(mbWay, responseGetter); trySetResponseGetter(mobilepay, responseGetter); trySetResponseGetter(multibanco, responseGetter); trySetResponseGetter(naverPay, responseGetter); @@ -2613,6 +2639,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { trySetResponseGetter(payco, responseGetter); trySetResponseGetter(paynow, responseGetter); trySetResponseGetter(paypal, responseGetter); + trySetResponseGetter(paypay, responseGetter); trySetResponseGetter(pix, responseGetter); trySetResponseGetter(promptpay, responseGetter); trySetResponseGetter(radarOptions, responseGetter); diff --git a/src/main/java/com/stripe/model/PaymentMethodConfiguration.java b/src/main/java/com/stripe/model/PaymentMethodConfiguration.java index ad21e06edf3..36815874197 100644 --- a/src/main/java/com/stripe/model/PaymentMethodConfiguration.java +++ b/src/main/java/com/stripe/model/PaymentMethodConfiguration.java @@ -209,6 +209,9 @@ public class PaymentMethodConfiguration extends ApiResource implements HasId { @SerializedName("paypal") Paypal paypal; + @SerializedName("paypay") + Paypay paypay; + @SerializedName("pix") Pix pix; @@ -2388,6 +2391,57 @@ public static class DisplayPreference extends StripeObject { } } + /** + * For more details about Paypay, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Paypay extends StripeObject { + /** + * Whether this payment method may be offered at checkout. True if {@code display_preference} is + * {@code on} and the payment method's capability is active. + */ + @SerializedName("available") + Boolean available; + + @SerializedName("display_preference") + DisplayPreference displayPreference; + + /** + * For more details about DisplayPreference, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class DisplayPreference extends StripeObject { + /** + * For child configs, whether or not the account's preference will be observed. If {@code + * false}, the parent configuration's default is used. + */ + @SerializedName("overridable") + Boolean overridable; + + /** + * The account's display preference. + * + *

One of {@code none}, {@code off}, or {@code on}. + */ + @SerializedName("preference") + String preference; + + /** + * The effective display preference value. + * + *

One of {@code off}, or {@code on}. + */ + @SerializedName("value") + String value; + } + } + /** * For more details about Pix, please refer to the API * Reference. @@ -3042,6 +3096,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { trySetResponseGetter(payco, responseGetter); trySetResponseGetter(paynow, responseGetter); trySetResponseGetter(paypal, responseGetter); + trySetResponseGetter(paypay, responseGetter); trySetResponseGetter(pix, responseGetter); trySetResponseGetter(promptpay, responseGetter); trySetResponseGetter(revolutPay, responseGetter); diff --git a/src/main/java/com/stripe/model/Person.java b/src/main/java/com/stripe/model/Person.java index e5ec6fbc793..3ddbfc54c9e 100644 --- a/src/main/java/com/stripe/model/Person.java +++ b/src/main/java/com/stripe/model/Person.java @@ -541,14 +541,14 @@ public static class Errors extends StripeObject { /** * The code for the type of error. * - *

One of {@code information_missing}, {@code invalid_address_city_state_postal_code}, - * {@code invalid_address_highway_contract_box}, {@code invalid_address_private_mailbox}, - * {@code invalid_business_profile_name}, {@code invalid_business_profile_name_denylisted}, - * {@code invalid_company_name_denylisted}, {@code invalid_dob_age_over_maximum}, {@code - * invalid_dob_age_under_18}, {@code invalid_dob_age_under_minimum}, {@code - * invalid_product_description_length}, {@code invalid_product_description_url_match}, {@code - * invalid_representative_country}, {@code invalid_signator}, {@code - * invalid_statement_descriptor_business_mismatch}, {@code + *

One of {@code external_request}, {@code information_missing}, {@code + * invalid_address_city_state_postal_code}, {@code invalid_address_highway_contract_box}, + * {@code invalid_address_private_mailbox}, {@code invalid_business_profile_name}, {@code + * invalid_business_profile_name_denylisted}, {@code invalid_company_name_denylisted}, {@code + * invalid_dob_age_over_maximum}, {@code invalid_dob_age_under_18}, {@code + * invalid_dob_age_under_minimum}, {@code invalid_product_description_length}, {@code + * invalid_product_description_url_match}, {@code invalid_representative_country}, {@code + * invalid_signator}, {@code invalid_statement_descriptor_business_mismatch}, {@code * invalid_statement_descriptor_denylisted}, {@code invalid_statement_descriptor_length}, * {@code invalid_statement_descriptor_prefix_denylisted}, {@code * invalid_statement_descriptor_prefix_mismatch}, {@code invalid_street_address}, {@code @@ -567,29 +567,30 @@ public static class Errors extends StripeObject { * invalid_url_website_incomplete_return_policy}, {@code * invalid_url_website_incomplete_terms_and_conditions}, {@code * invalid_url_website_incomplete_under_construction}, {@code invalid_url_website_other}, - * {@code invalid_value_other}, {@code verification_directors_mismatch}, {@code - * verification_document_address_mismatch}, {@code verification_document_address_missing}, - * {@code verification_document_corrupt}, {@code verification_document_country_not_supported}, - * {@code verification_document_directors_mismatch}, {@code - * verification_document_dob_mismatch}, {@code verification_document_duplicate_type}, {@code - * verification_document_expired}, {@code verification_document_failed_copy}, {@code - * verification_document_failed_greyscale}, {@code verification_document_failed_other}, {@code - * verification_document_failed_test_mode}, {@code verification_document_fraudulent}, {@code - * verification_document_id_number_mismatch}, {@code verification_document_id_number_missing}, - * {@code verification_document_incomplete}, {@code verification_document_invalid}, {@code - * verification_document_issue_or_expiry_date_missing}, {@code - * verification_document_manipulated}, {@code verification_document_missing_back}, {@code - * verification_document_missing_front}, {@code verification_document_name_mismatch}, {@code - * verification_document_name_missing}, {@code verification_document_nationality_mismatch}, - * {@code verification_document_not_readable}, {@code verification_document_not_signed}, - * {@code verification_document_not_uploaded}, {@code verification_document_photo_mismatch}, - * {@code verification_document_too_large}, {@code verification_document_type_not_supported}, - * {@code verification_extraneous_directors}, {@code verification_failed_address_match}, - * {@code verification_failed_authorizer_authority}, {@code - * verification_failed_business_iec_number}, {@code verification_failed_document_match}, - * {@code verification_failed_id_number_match}, {@code verification_failed_keyed_identity}, - * {@code verification_failed_keyed_match}, {@code verification_failed_name_match}, {@code - * verification_failed_other}, {@code verification_failed_representative_authority}, {@code + * {@code invalid_value_other}, {@code unsupported_business_type}, {@code + * verification_directors_mismatch}, {@code verification_document_address_mismatch}, {@code + * verification_document_address_missing}, {@code verification_document_corrupt}, {@code + * verification_document_country_not_supported}, {@code + * verification_document_directors_mismatch}, {@code verification_document_dob_mismatch}, + * {@code verification_document_duplicate_type}, {@code verification_document_expired}, {@code + * verification_document_failed_copy}, {@code verification_document_failed_greyscale}, {@code + * verification_document_failed_other}, {@code verification_document_failed_test_mode}, {@code + * verification_document_fraudulent}, {@code verification_document_id_number_mismatch}, {@code + * verification_document_id_number_missing}, {@code verification_document_incomplete}, {@code + * verification_document_invalid}, {@code verification_document_issue_or_expiry_date_missing}, + * {@code verification_document_manipulated}, {@code verification_document_missing_back}, + * {@code verification_document_missing_front}, {@code verification_document_name_mismatch}, + * {@code verification_document_name_missing}, {@code + * verification_document_nationality_mismatch}, {@code verification_document_not_readable}, + * {@code verification_document_not_signed}, {@code verification_document_not_uploaded}, + * {@code verification_document_photo_mismatch}, {@code verification_document_too_large}, + * {@code verification_document_type_not_supported}, {@code + * verification_extraneous_directors}, {@code verification_failed_address_match}, {@code + * verification_failed_authorizer_authority}, {@code verification_failed_business_iec_number}, + * {@code verification_failed_document_match}, {@code verification_failed_id_number_match}, + * {@code verification_failed_keyed_identity}, {@code verification_failed_keyed_match}, {@code + * verification_failed_name_match}, {@code verification_failed_other}, {@code + * verification_failed_representative_authority}, {@code * verification_failed_residential_address}, {@code verification_failed_tax_id_match}, {@code * verification_failed_tax_id_not_issued}, {@code * verification_legal_entity_structure_mismatch}, {@code verification_missing_directors}, @@ -757,14 +758,14 @@ public static class Errors extends StripeObject { /** * The code for the type of error. * - *

One of {@code information_missing}, {@code invalid_address_city_state_postal_code}, - * {@code invalid_address_highway_contract_box}, {@code invalid_address_private_mailbox}, - * {@code invalid_business_profile_name}, {@code invalid_business_profile_name_denylisted}, - * {@code invalid_company_name_denylisted}, {@code invalid_dob_age_over_maximum}, {@code - * invalid_dob_age_under_18}, {@code invalid_dob_age_under_minimum}, {@code - * invalid_product_description_length}, {@code invalid_product_description_url_match}, {@code - * invalid_representative_country}, {@code invalid_signator}, {@code - * invalid_statement_descriptor_business_mismatch}, {@code + *

One of {@code external_request}, {@code information_missing}, {@code + * invalid_address_city_state_postal_code}, {@code invalid_address_highway_contract_box}, + * {@code invalid_address_private_mailbox}, {@code invalid_business_profile_name}, {@code + * invalid_business_profile_name_denylisted}, {@code invalid_company_name_denylisted}, {@code + * invalid_dob_age_over_maximum}, {@code invalid_dob_age_under_18}, {@code + * invalid_dob_age_under_minimum}, {@code invalid_product_description_length}, {@code + * invalid_product_description_url_match}, {@code invalid_representative_country}, {@code + * invalid_signator}, {@code invalid_statement_descriptor_business_mismatch}, {@code * invalid_statement_descriptor_denylisted}, {@code invalid_statement_descriptor_length}, * {@code invalid_statement_descriptor_prefix_denylisted}, {@code * invalid_statement_descriptor_prefix_mismatch}, {@code invalid_street_address}, {@code @@ -783,29 +784,30 @@ public static class Errors extends StripeObject { * invalid_url_website_incomplete_return_policy}, {@code * invalid_url_website_incomplete_terms_and_conditions}, {@code * invalid_url_website_incomplete_under_construction}, {@code invalid_url_website_other}, - * {@code invalid_value_other}, {@code verification_directors_mismatch}, {@code - * verification_document_address_mismatch}, {@code verification_document_address_missing}, - * {@code verification_document_corrupt}, {@code verification_document_country_not_supported}, - * {@code verification_document_directors_mismatch}, {@code - * verification_document_dob_mismatch}, {@code verification_document_duplicate_type}, {@code - * verification_document_expired}, {@code verification_document_failed_copy}, {@code - * verification_document_failed_greyscale}, {@code verification_document_failed_other}, {@code - * verification_document_failed_test_mode}, {@code verification_document_fraudulent}, {@code - * verification_document_id_number_mismatch}, {@code verification_document_id_number_missing}, - * {@code verification_document_incomplete}, {@code verification_document_invalid}, {@code - * verification_document_issue_or_expiry_date_missing}, {@code - * verification_document_manipulated}, {@code verification_document_missing_back}, {@code - * verification_document_missing_front}, {@code verification_document_name_mismatch}, {@code - * verification_document_name_missing}, {@code verification_document_nationality_mismatch}, - * {@code verification_document_not_readable}, {@code verification_document_not_signed}, - * {@code verification_document_not_uploaded}, {@code verification_document_photo_mismatch}, - * {@code verification_document_too_large}, {@code verification_document_type_not_supported}, - * {@code verification_extraneous_directors}, {@code verification_failed_address_match}, - * {@code verification_failed_authorizer_authority}, {@code - * verification_failed_business_iec_number}, {@code verification_failed_document_match}, - * {@code verification_failed_id_number_match}, {@code verification_failed_keyed_identity}, - * {@code verification_failed_keyed_match}, {@code verification_failed_name_match}, {@code - * verification_failed_other}, {@code verification_failed_representative_authority}, {@code + * {@code invalid_value_other}, {@code unsupported_business_type}, {@code + * verification_directors_mismatch}, {@code verification_document_address_mismatch}, {@code + * verification_document_address_missing}, {@code verification_document_corrupt}, {@code + * verification_document_country_not_supported}, {@code + * verification_document_directors_mismatch}, {@code verification_document_dob_mismatch}, + * {@code verification_document_duplicate_type}, {@code verification_document_expired}, {@code + * verification_document_failed_copy}, {@code verification_document_failed_greyscale}, {@code + * verification_document_failed_other}, {@code verification_document_failed_test_mode}, {@code + * verification_document_fraudulent}, {@code verification_document_id_number_mismatch}, {@code + * verification_document_id_number_missing}, {@code verification_document_incomplete}, {@code + * verification_document_invalid}, {@code verification_document_issue_or_expiry_date_missing}, + * {@code verification_document_manipulated}, {@code verification_document_missing_back}, + * {@code verification_document_missing_front}, {@code verification_document_name_mismatch}, + * {@code verification_document_name_missing}, {@code + * verification_document_nationality_mismatch}, {@code verification_document_not_readable}, + * {@code verification_document_not_signed}, {@code verification_document_not_uploaded}, + * {@code verification_document_photo_mismatch}, {@code verification_document_too_large}, + * {@code verification_document_type_not_supported}, {@code + * verification_extraneous_directors}, {@code verification_failed_address_match}, {@code + * verification_failed_authorizer_authority}, {@code verification_failed_business_iec_number}, + * {@code verification_failed_document_match}, {@code verification_failed_id_number_match}, + * {@code verification_failed_keyed_identity}, {@code verification_failed_keyed_match}, {@code + * verification_failed_name_match}, {@code verification_failed_other}, {@code + * verification_failed_representative_authority}, {@code * verification_failed_residential_address}, {@code verification_failed_tax_id_match}, {@code * verification_failed_tax_id_not_issued}, {@code * verification_legal_entity_structure_mismatch}, {@code verification_missing_directors}, diff --git a/src/main/java/com/stripe/model/PromotionCode.java b/src/main/java/com/stripe/model/PromotionCode.java index f7269e5afb7..3930ee8a431 100644 --- a/src/main/java/com/stripe/model/PromotionCode.java +++ b/src/main/java/com/stripe/model/PromotionCode.java @@ -19,9 +19,8 @@ import lombok.Setter; /** - * A Promotion Code represents a customer-redeemable code for a coupon. You can create multiple codes for a single - * coupon. + * A Promotion Code represents a customer-redeemable code for an underlying promotion. You can + * create multiple codes for a single promotion. * *

If you enable promotion codes in your customer portal @@ -48,19 +47,6 @@ public class PromotionCode extends ApiResource implements HasId, MetadataStore

subscriptions, invoices, checkout sessions, quotes, and more. Coupons do not work with - * conventional one-off charges or payment intents. - */ - @SerializedName("coupon") - Coupon coupon; - /** Time at which the object was created. Measured in seconds since the Unix epoch. */ @SerializedName("created") Long created; @@ -108,6 +94,9 @@ public class PromotionCode extends ApiResource implements HasId, MetadataStore

params) throws StripeException { return create(params, (RequestOptions) null); } /** - * A promotion code points to a coupon. You can optionally restrict the code to a specific - * customer, redemption limit, and expiration date. + * A promotion code points to an underlying promotion. You can optionally restrict the code to a + * specific customer, redemption limit, and expiration date. */ public static PromotionCode create(Map params, RequestOptions options) throws StripeException { @@ -154,16 +143,16 @@ public static PromotionCode create(Map params, RequestOptions op } /** - * A promotion code points to a coupon. You can optionally restrict the code to a specific - * customer, redemption limit, and expiration date. + * A promotion code points to an underlying promotion. You can optionally restrict the code to a + * specific customer, redemption limit, and expiration date. */ public static PromotionCode create(PromotionCodeCreateParams params) throws StripeException { return create(params, (RequestOptions) null); } /** - * A promotion code points to a coupon. You can optionally restrict the code to a specific - * customer, redemption limit, and expiration date. + * A promotion code points to an underlying promotion. You can optionally restrict the code to a + * specific customer, redemption limit, and expiration date. */ public static PromotionCode create(PromotionCodeCreateParams params, RequestOptions options) throws StripeException { @@ -315,6 +304,47 @@ public PromotionCode update(PromotionCodeUpdateParams params, RequestOptions opt return getResponseGetter().request(request, PromotionCode.class); } + /** + * For more details about Promotion, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Promotion extends StripeObject { + /** If promotion {@code type} is {@code coupon}, the coupon for this promotion. */ + @SerializedName("coupon") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField coupon; + + /** + * The type of promotion. + * + *

Equal to {@code coupon}. + */ + @SerializedName("type") + String type; + + /** Get ID of expandable {@code coupon} object. */ + public String getCoupon() { + return (this.coupon != null) ? this.coupon.getId() : null; + } + + public void setCoupon(String id) { + this.coupon = ApiResource.setExpandableFieldId(id, this.coupon); + } + + /** Get expanded {@code coupon}. */ + public Coupon getCouponObject() { + return (this.coupon != null) ? this.coupon.getExpanded() : null; + } + + public void setCouponObject(Coupon expandableObject) { + this.coupon = new ExpandableField(expandableObject.getId(), expandableObject); + } + } + /** * For more details about Restrictions, please refer to the API Reference. @@ -369,8 +399,8 @@ public static class CurrencyOption extends StripeObject { @Override public void setResponseGetter(StripeResponseGetter responseGetter) { super.setResponseGetter(responseGetter); - trySetResponseGetter(coupon, responseGetter); trySetResponseGetter(customer, responseGetter); + trySetResponseGetter(promotion, responseGetter); trySetResponseGetter(restrictions, responseGetter); } } diff --git a/src/main/java/com/stripe/model/Quote.java b/src/main/java/com/stripe/model/Quote.java index 98666a51950..0bfb66484e6 100644 --- a/src/main/java/com/stripe/model/Quote.java +++ b/src/main/java/com/stripe/model/Quote.java @@ -1466,6 +1466,9 @@ public static class SubscriptionData extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class BillingMode extends StripeObject { + @SerializedName("flexible") + Flexible flexible; + /** * Controls how prorations and invoices for subscriptions are calculated and orchestrated. * @@ -1473,6 +1476,23 @@ public static class BillingMode extends StripeObject { */ @SerializedName("type") String type; + + /** + * For more details about Flexible, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Flexible extends StripeObject { + /** + * Controls how invoices and invoice items display proration amounts and discount amounts. + * + *

One of {@code included}, or {@code itemized}. + */ + @SerializedName("proration_discounts") + String prorationDiscounts; + } } } diff --git a/src/main/java/com/stripe/model/Source.java b/src/main/java/com/stripe/model/Source.java index d02f94fcd5a..9c38e470312 100644 --- a/src/main/java/com/stripe/model/Source.java +++ b/src/main/java/com/stripe/model/Source.java @@ -1146,8 +1146,8 @@ public static class Redirect extends StripeObject { /** * The status of the redirect, either {@code pending} (ready to be used by your customer to - * authenticate the transaction), {@code succeeded} (succesful authentication, cannot be reused) - * or {@code not_required} (redirect should not be used) or {@code failed} (failed + * authenticate the transaction), {@code succeeded} (successful authentication, cannot be + * reused) or {@code not_required} (redirect should not be used) or {@code failed} (failed * authentication, cannot be reused). */ @SerializedName("status") diff --git a/src/main/java/com/stripe/model/StripeError.java b/src/main/java/com/stripe/model/StripeError.java index e287d7944bf..6ca0e963796 100644 --- a/src/main/java/com/stripe/model/StripeError.java +++ b/src/main/java/com/stripe/model/StripeError.java @@ -46,11 +46,13 @@ public class StripeError extends StripeObject { * customer_max_payment_methods}, {@code customer_max_subscriptions}, {@code * customer_session_expired}, {@code customer_tax_location_invalid}, {@code debit_not_authorized}, * {@code email_invalid}, {@code expired_card}, {@code financial_connections_account_inactive}, - * {@code financial_connections_no_successful_transaction_refresh}, {@code - * forwarding_api_inactive}, {@code forwarding_api_invalid_parameter}, {@code - * forwarding_api_retryable_upstream_error}, {@code forwarding_api_upstream_connection_error}, - * {@code forwarding_api_upstream_connection_timeout}, {@code forwarding_api_upstream_error}, - * {@code idempotency_key_in_use}, {@code incorrect_address}, {@code incorrect_cvc}, {@code + * {@code financial_connections_account_pending_account_numbers}, {@code + * financial_connections_account_unavailable_account_numbers}, {@code + * financial_connections_no_successful_transaction_refresh}, {@code forwarding_api_inactive}, + * {@code forwarding_api_invalid_parameter}, {@code forwarding_api_retryable_upstream_error}, + * {@code forwarding_api_upstream_connection_error}, {@code + * forwarding_api_upstream_connection_timeout}, {@code forwarding_api_upstream_error}, {@code + * idempotency_key_in_use}, {@code incorrect_address}, {@code incorrect_cvc}, {@code * incorrect_number}, {@code incorrect_zip}, {@code india_recurring_payment_mandate_canceled}, * {@code instant_payouts_config_disabled}, {@code instant_payouts_currency_disabled}, {@code * instant_payouts_limit_exceeded}, {@code instant_payouts_unsupported}, {@code diff --git a/src/main/java/com/stripe/model/Subscription.java b/src/main/java/com/stripe/model/Subscription.java index 4649031b54d..b3954dfac7b 100644 --- a/src/main/java/com/stripe/model/Subscription.java +++ b/src/main/java/com/stripe/model/Subscription.java @@ -1401,6 +1401,10 @@ public static class BillingCycleAnchorConfig extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class BillingMode extends StripeObject { + /** Configure behavior for flexible billing mode. */ + @SerializedName("flexible") + Flexible flexible; + /** * Controls how prorations and invoices for subscriptions are calculated and orchestrated. * @@ -1412,6 +1416,23 @@ public static class BillingMode extends StripeObject { /** Details on when the current billing_mode was adopted. */ @SerializedName("updated_at") Long updatedAt; + + /** + * For more details about Flexible, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Flexible extends StripeObject { + /** + * Controls how invoices and invoice items display proration amounts and discount amounts. + * + *

One of {@code included}, or {@code itemized}. + */ + @SerializedName("proration_discounts") + String prorationDiscounts; + } } /** diff --git a/src/main/java/com/stripe/model/SubscriptionSchedule.java b/src/main/java/com/stripe/model/SubscriptionSchedule.java index f014e1895f4..38dda20bb73 100644 --- a/src/main/java/com/stripe/model/SubscriptionSchedule.java +++ b/src/main/java/com/stripe/model/SubscriptionSchedule.java @@ -564,6 +564,10 @@ public SubscriptionSchedule update( @Setter @EqualsAndHashCode(callSuper = false) public static class BillingMode extends StripeObject { + /** Configure behavior for flexible billing mode. */ + @SerializedName("flexible") + Flexible flexible; + /** * Controls how prorations and invoices for subscriptions are calculated and orchestrated. * @@ -575,6 +579,23 @@ public static class BillingMode extends StripeObject { /** Details on when the current billing_mode was adopted. */ @SerializedName("updated_at") Long updatedAt; + + /** + * For more details about Flexible, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Flexible extends StripeObject { + /** + * Controls how invoices and invoice items display proration amounts and discount amounts. + * + *

One of {@code included}, or {@code itemized}. + */ + @SerializedName("proration_discounts") + String prorationDiscounts; + } } /** diff --git a/src/main/java/com/stripe/model/billingportal/Configuration.java b/src/main/java/com/stripe/model/billingportal/Configuration.java index 29ef889e4f0..3a3b455e6d8 100644 --- a/src/main/java/com/stripe/model/billingportal/Configuration.java +++ b/src/main/java/com/stripe/model/billingportal/Configuration.java @@ -449,6 +449,16 @@ public static class SubscriptionUpdate extends StripeObject { @SerializedName("schedule_at_period_end") ScheduleAtPeriodEnd scheduleAtPeriodEnd; + /** + * Determines how handle updates to trialing subscriptions. Valid values are {@code end_trial} + * and {@code continue_trial}. Defaults to a value of {@code end_trial} if you don't set it + * during creation. + * + *

One of {@code continue_trial}, or {@code end_trial}. + */ + @SerializedName("trial_update_behavior") + String trialUpdateBehavior; + /** * For more details about Product, please refer to the API Reference. diff --git a/src/main/java/com/stripe/model/checkout/Session.java b/src/main/java/com/stripe/model/checkout/Session.java index d767167fe2d..5aa92c00b43 100644 --- a/src/main/java/com/stripe/model/checkout/Session.java +++ b/src/main/java/com/stripe/model/checkout/Session.java @@ -94,6 +94,9 @@ public class Session extends ApiResource implements HasId, MetadataStore discounts; + /** + * A list of the types of payment methods (e.g., {@code card}) that should be excluded from this + * Checkout Session. This should only be used when payment methods for this Checkout Session are + * managed through the Stripe + * Dashboard. + */ + @SerializedName("excluded_payment_method_types") + List excludedPaymentMethodTypes; + /** The timestamp at which the Checkout Session will expire. */ @SerializedName("expires_at") Long expiresAt; @@ -262,6 +274,9 @@ public class Session extends ApiResource implements HasId, MetadataStoreAPI Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class BrandingSettings extends StripeObject { + /** + * A hex color value starting with {@code #} representing the background color for the Checkout + * Session. + */ + @SerializedName("background_color") + String backgroundColor; + + /** + * The border style for the Checkout Session. Must be one of {@code rounded}, {@code + * rectangular}, or {@code pill}. + */ + @SerializedName("border_style") + String borderStyle; + + /** + * A hex color value starting with {@code #} representing the button color for the Checkout + * Session. + */ + @SerializedName("button_color") + String buttonColor; + + /** The display name shown on the Checkout Session. */ + @SerializedName("display_name") + String displayName; + + /** + * The font family for the Checkout Session. Must be one of the supported + * font families. + */ + @SerializedName("font_family") + String fontFamily; + + /** The icon for the Checkout Session. You cannot set both {@code logo} and {@code icon}. */ + @SerializedName("icon") + Icon icon; + + /** The logo for the Checkout Session. You cannot set both {@code logo} and {@code icon}. */ + @SerializedName("logo") + Logo logo; + + /** + * For more details about Icon, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Icon extends StripeObject { + /** + * The ID of a File upload representing the + * icon. Purpose must be {@code business_icon}. Required if {@code type} is {@code file} and + * disallowed otherwise. + */ + @SerializedName("file") + String file; + + /** The type of image for the icon. Must be one of {@code file} or {@code url}. */ + @SerializedName("type") + String type; + + /** The URL of the image. Present when {@code type} is {@code url}. */ + @SerializedName("url") + String url; + } + + /** + * For more details about Logo, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Logo extends StripeObject { + /** + * The ID of a File upload representing the + * logo. Purpose must be {@code business_logo}. Required if {@code type} is {@code file} and + * disallowed otherwise. + */ + @SerializedName("file") + String file; + + /** The type of image for the logo. Must be one of {@code file} or {@code url}. */ + @SerializedName("type") + String type; + + /** The URL of the image. Present when {@code type} is {@code url}. */ + @SerializedName("url") + String url; + } + } + /** * For more details about CollectedInformation, please refer to the API Reference. @@ -1015,6 +1130,14 @@ public void setAccountObject(Account expandableObject) { @Setter @EqualsAndHashCode(callSuper = false) public static class CollectedInformation extends StripeObject { + /** Customer’s business name for this Checkout Session. */ + @SerializedName("business_name") + String businessName; + + /** Customer’s individual name for this Checkout Session. */ + @SerializedName("individual_name") + String individualName; + /** Shipping information for this Checkout Session. */ @SerializedName("shipping_details") ShippingDetails shippingDetails; @@ -1394,6 +1517,10 @@ public static class CustomerDetails extends StripeObject { @SerializedName("address") Address address; + /** The customer's business name after a completed Checkout Session. */ + @SerializedName("business_name") + String businessName; + /** * The email associated with the Customer, if one exists, on the Checkout Session after a * completed Checkout Session or at time of session expiry. Otherwise, if the customer has @@ -1403,6 +1530,10 @@ public static class CustomerDetails extends StripeObject { @SerializedName("email") String email; + /** The customer's individual name after a completed Checkout Session. */ + @SerializedName("individual_name") + String individualName; + /** * The customer's name after a completed Checkout Session. Note: This property is populated only * for sessions on or after March 30, 2022. @@ -1705,6 +1836,61 @@ public static class RenderingOptions extends StripeObject { } } + /** + * For more details about NameCollection, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class NameCollection extends StripeObject { + @SerializedName("business") + Business business; + + @SerializedName("individual") + Individual individual; + + /** + * For more details about Business, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Business extends StripeObject { + /** Indicates whether business name collection is enabled for the session. */ + @SerializedName("enabled") + Boolean enabled; + + /** + * Whether the customer is required to complete the field before completing the Checkout + * Session. Defaults to {@code false}. + */ + @SerializedName("optional") + Boolean optional; + } + + /** + * For more details about Individual, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Individual extends StripeObject { + /** Indicates whether individual name collection is enabled for the session. */ + @SerializedName("enabled") + Boolean enabled; + + /** + * Whether the customer is required to complete the field before completing the Checkout + * Session. Defaults to {@code false}. + */ + @SerializedName("optional") + Boolean optional; + } + } + /** * For more details about OptionalItem, please refer to the API Reference. @@ -1790,6 +1976,9 @@ public static class PaymentMethodOptions extends StripeObject { @SerializedName("alipay") Alipay alipay; + @SerializedName("alma") + Alma alma; + @SerializedName("amazon_pay") AmazonPay amazonPay; @@ -1802,6 +1991,9 @@ public static class PaymentMethodOptions extends StripeObject { @SerializedName("bancontact") Bancontact bancontact; + @SerializedName("billie") + Billie billie; + @SerializedName("boleto") Boleto boleto; @@ -1877,6 +2069,9 @@ public static class PaymentMethodOptions extends StripeObject { @SerializedName("samsung_pay") SamsungPay samsungPay; + @SerializedName("satispay") + Satispay satispay; + @SerializedName("sepa_debit") SepaDebit sepaDebit; @@ -2000,6 +2195,14 @@ public static class MandateOptions extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Affirm extends StripeObject { + /** + * Controls when the funds will be captured from the customer's account. + * + *

Equal to {@code manual}. + */ + @SerializedName("capture_method") + String captureMethod; + /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -2033,6 +2236,14 @@ public static class Affirm extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class AfterpayClearpay extends StripeObject { + /** + * Controls when the funds will be captured from the customer's account. + * + *

Equal to {@code manual}. + */ + @SerializedName("capture_method") + String captureMethod; + /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -2091,6 +2302,23 @@ public static class Alipay extends StripeObject { String setupFutureUsage; } + /** + * For more details about Alma, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Alma extends StripeObject { + /** + * Controls when the funds will be captured from the customer's account. + * + *

Equal to {@code manual}. + */ + @SerializedName("capture_method") + String captureMethod; + } + /** * For more details about AmazonPay, please refer to the API Reference. @@ -2099,6 +2327,14 @@ public static class Alipay extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class AmazonPay extends StripeObject { + /** + * Controls when the funds will be captured from the customer's account. + * + *

Equal to {@code manual}. + */ + @SerializedName("capture_method") + String captureMethod; + /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -2259,6 +2495,23 @@ public static class Bancontact extends StripeObject { String setupFutureUsage; } + /** + * For more details about Billie, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Billie extends StripeObject { + /** + * Controls when the funds will be captured from the customer's account. + * + *

Equal to {@code manual}. + */ + @SerializedName("capture_method") + String captureMethod; + } + /** * For more details about Boleto, please refer to the API * Reference. @@ -2308,6 +2561,14 @@ public static class Boleto extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Card extends StripeObject { + /** + * Controls when the funds will be captured from the customer's account. + * + *

Equal to {@code manual}. + */ + @SerializedName("capture_method") + String captureMethod; + @SerializedName("installments") Installments installments; @@ -2449,6 +2710,14 @@ public static class Restrictions extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Cashapp extends StripeObject { + /** + * Controls when the funds will be captured from the customer's account. + * + *

Equal to {@code manual}. + */ + @SerializedName("capture_method") + String captureMethod; + /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -2784,6 +3053,14 @@ public static class KakaoPay extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Klarna extends StripeObject { + /** + * Controls when the funds will be captured from the customer's account. + * + *

Equal to {@code manual}. + */ + @SerializedName("capture_method") + String captureMethod; + /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -2900,6 +3177,14 @@ public static class KrCard extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Link extends StripeObject { + /** + * Controls when the funds will be captured from the customer's account. + * + *

Equal to {@code manual}. + */ + @SerializedName("capture_method") + String captureMethod; + /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -2933,6 +3218,14 @@ public static class Link extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Mobilepay extends StripeObject { + /** + * Controls when the funds will be captured from the customer's account. + * + *

Equal to {@code manual}. + */ + @SerializedName("capture_method") + String captureMethod; + /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -3262,6 +3555,14 @@ public static class Pix extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class RevolutPay extends StripeObject { + /** + * Controls when the funds will be captured from the customer's account. + * + *

Equal to {@code manual}. + */ + @SerializedName("capture_method") + String captureMethod; + /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -3304,6 +3605,23 @@ public static class SamsungPay extends StripeObject { String captureMethod; } + /** + * For more details about Satispay, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Satispay extends StripeObject { + /** + * Controls when the funds will be captured from the customer's account. + * + *

Equal to {@code manual}. + */ + @SerializedName("capture_method") + String captureMethod; + } + /** * For more details about SepaDebit, please refer to the API Reference. @@ -3917,6 +4235,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { trySetResponseGetter(adaptivePricing, responseGetter); trySetResponseGetter(afterExpiration, responseGetter); trySetResponseGetter(automaticTax, responseGetter); + trySetResponseGetter(brandingSettings, responseGetter); trySetResponseGetter(collectedInformation, responseGetter); trySetResponseGetter(consent, responseGetter); trySetResponseGetter(consentCollection, responseGetter); @@ -3927,6 +4246,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { trySetResponseGetter(invoice, responseGetter); trySetResponseGetter(invoiceCreation, responseGetter); trySetResponseGetter(lineItems, responseGetter); + trySetResponseGetter(nameCollection, responseGetter); trySetResponseGetter(paymentIntent, responseGetter); trySetResponseGetter(paymentLink, responseGetter); trySetResponseGetter(paymentMethodConfigurationDetails, responseGetter); diff --git a/src/main/java/com/stripe/model/issuing/Card.java b/src/main/java/com/stripe/model/issuing/Card.java index 979aff4b95e..c2279b0a4a6 100644 --- a/src/main/java/com/stripe/model/issuing/Card.java +++ b/src/main/java/com/stripe/model/issuing/Card.java @@ -165,6 +165,10 @@ public class Card extends ApiResource implements HasId, MetadataStore { @SerializedName("replacement_reason") String replacementReason; + /** Text separate from cardholder name, printed on the card. */ + @SerializedName("second_line") + String secondLine; + /** Where and how the card will be shipped. */ @SerializedName("shipping") Shipping shipping; diff --git a/src/main/java/com/stripe/model/tax/Calculation.java b/src/main/java/com/stripe/model/tax/Calculation.java index 97a756ab956..239ee21ba6d 100644 --- a/src/main/java/com/stripe/model/tax/Calculation.java +++ b/src/main/java/com/stripe/model/tax/Calculation.java @@ -290,11 +290,11 @@ public static class Address extends StripeObject { @SerializedName("country") String country; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -304,7 +304,7 @@ public static class Address extends StripeObject { /** * State/province as an ISO 3166-2 - * subdivision code, without country prefix. Example: "NY" or "TX". + * subdivision code, without country prefix, such as "NY" or "TX". */ @SerializedName("state") String state; @@ -380,11 +380,11 @@ public static class Address extends StripeObject { @SerializedName("country") String country; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -394,7 +394,7 @@ public static class Address extends StripeObject { /** * State/province as an ISO 3166-2 - * subdivision code, without country prefix. Example: "NY" or "TX". + * subdivision code, without country prefix, such as "NY" or "TX". */ @SerializedName("state") String state; diff --git a/src/main/java/com/stripe/model/tax/Settings.java b/src/main/java/com/stripe/model/tax/Settings.java index b5090fc8d20..d26e2cb6c60 100644 --- a/src/main/java/com/stripe/model/tax/Settings.java +++ b/src/main/java/com/stripe/model/tax/Settings.java @@ -149,6 +149,15 @@ public static Settings update(SettingsUpdateParams params, RequestOptions option @Setter @EqualsAndHashCode(callSuper = false) public static class Defaults extends StripeObject { + /** + * The tax calculation provider this account uses. Defaults to {@code stripe} when not using a + * third-party provider. + * + *

One of {@code anrok}, {@code avalara}, {@code sphere}, or {@code stripe}. + */ + @SerializedName("provider") + String provider; + /** * Default tax diff --git a/src/main/java/com/stripe/model/tax/Transaction.java b/src/main/java/com/stripe/model/tax/Transaction.java index fd628992398..f67b062766f 100644 --- a/src/main/java/com/stripe/model/tax/Transaction.java +++ b/src/main/java/com/stripe/model/tax/Transaction.java @@ -335,11 +335,11 @@ public static class Address extends StripeObject { @SerializedName("country") String country; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -349,7 +349,7 @@ public static class Address extends StripeObject { /** * State/province as an ISO 3166-2 - * subdivision code, without country prefix. Example: "NY" or "TX". + * subdivision code, without country prefix, such as "NY" or "TX". */ @SerializedName("state") String state; @@ -438,11 +438,11 @@ public static class Address extends StripeObject { @SerializedName("country") String country; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -452,7 +452,7 @@ public static class Address extends StripeObject { /** * State/province as an ISO 3166-2 - * subdivision code, without country prefix. Example: "NY" or "TX". + * subdivision code, without country prefix, such as "NY" or "TX". */ @SerializedName("state") String state; diff --git a/src/main/java/com/stripe/model/terminal/Configuration.java b/src/main/java/com/stripe/model/terminal/Configuration.java index afa388f1568..75dbbd4a3b4 100644 --- a/src/main/java/com/stripe/model/terminal/Configuration.java +++ b/src/main/java/com/stripe/model/terminal/Configuration.java @@ -33,6 +33,9 @@ @Setter @EqualsAndHashCode(callSuper = false) public class Configuration extends ApiResource implements HasId { + @SerializedName("bbpos_wisepad3") + BbposWisepad3 bbposWisepad3; + @SerializedName("bbpos_wisepos_e") BbposWiseposE bbposWiseposE; @@ -255,6 +258,39 @@ public Configuration update(ConfigurationUpdateParams params, RequestOptions opt return getResponseGetter().request(request, Configuration.class); } + /** + * For more details about BbposWisepad3, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class BbposWisepad3 extends StripeObject { + /** A File ID representing an image to display on the reader. */ + @SerializedName("splashscreen") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField splashscreen; + + /** Get ID of expandable {@code splashscreen} object. */ + public String getSplashscreen() { + return (this.splashscreen != null) ? this.splashscreen.getId() : null; + } + + public void setSplashscreen(String id) { + this.splashscreen = ApiResource.setExpandableFieldId(id, this.splashscreen); + } + + /** Get expanded {@code splashscreen}. */ + public File getSplashscreenObject() { + return (this.splashscreen != null) ? this.splashscreen.getExpanded() : null; + } + + public void setSplashscreenObject(File expandableObject) { + this.splashscreen = new ExpandableField(expandableObject.getId(), expandableObject); + } + } + /** * For more details about BbposWiseposE, please refer to the API Reference. @@ -1067,6 +1103,7 @@ public static class PersonalPsk extends StripeObject { @Override public void setResponseGetter(StripeResponseGetter responseGetter) { super.setResponseGetter(responseGetter); + trySetResponseGetter(bbposWisepad3, responseGetter); trySetResponseGetter(bbposWiseposE, responseGetter); trySetResponseGetter(offline, responseGetter); trySetResponseGetter(rebootWindow, responseGetter); diff --git a/src/main/java/com/stripe/model/terminal/Location.java b/src/main/java/com/stripe/model/terminal/Location.java index 93969929030..95871681b0e 100644 --- a/src/main/java/com/stripe/model/terminal/Location.java +++ b/src/main/java/com/stripe/model/terminal/Location.java @@ -6,6 +6,7 @@ import com.stripe.model.Address; import com.stripe.model.HasId; import com.stripe.model.MetadataStore; +import com.stripe.model.StripeObject; import com.stripe.net.ApiRequest; import com.stripe.net.ApiRequestParams; import com.stripe.net.ApiResource; @@ -33,6 +34,12 @@ public class Location extends ApiResource implements HasId, MetadataStoreAPI Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AddressKana extends StripeObject { + /** City/Ward. */ + @SerializedName("city") + String city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + String country; + + /** Block/Building number. */ + @SerializedName("line1") + String line1; + + /** Building details. */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** Prefecture. */ + @SerializedName("state") + String state; + + /** Town/cho-me. */ + @SerializedName("town") + String town; + } + + /** + * For more details about AddressKanji, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AddressKanji extends StripeObject { + /** City/Ward. */ + @SerializedName("city") + String city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + String country; + + /** Block/Building number. */ + @SerializedName("line1") + String line1; + + /** Building details. */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** Prefecture. */ + @SerializedName("state") + String state; + + /** Town/cho-me. */ + @SerializedName("town") + String town; + } + @Override public void setResponseGetter(StripeResponseGetter responseGetter) { super.setResponseGetter(responseGetter); trySetResponseGetter(address, responseGetter); + trySetResponseGetter(addressKana, responseGetter); + trySetResponseGetter(addressKanji, responseGetter); } } diff --git a/src/main/java/com/stripe/param/AccountCreateParams.java b/src/main/java/com/stripe/param/AccountCreateParams.java index f9852718f76..02a708c5fb4 100644 --- a/src/main/java/com/stripe/param/AccountCreateParams.java +++ b/src/main/java/com/stripe/param/AccountCreateParams.java @@ -1114,11 +1114,11 @@ public static class SupportAddress { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -1221,13 +1221,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -1412,6 +1412,10 @@ public static class Capabilities { @SerializedName("link_payments") LinkPayments linkPayments; + /** The mb_way_payments capability. */ + @SerializedName("mb_way_payments") + MbWayPayments mbWayPayments; + /** The mobilepay_payments capability. */ @SerializedName("mobilepay_payments") MobilepayPayments mobilepayPayments; @@ -1452,6 +1456,10 @@ public static class Capabilities { @SerializedName("paynow_payments") PaynowPayments paynowPayments; + /** The paypay_payments capability. */ + @SerializedName("paypay_payments") + PaypayPayments paypayPayments; + /** The pix_payments capability. */ @SerializedName("pix_payments") PixPayments pixPayments; @@ -1554,6 +1562,7 @@ private Capabilities( KrCardPayments krCardPayments, LegacyPayments legacyPayments, LinkPayments linkPayments, + MbWayPayments mbWayPayments, MobilepayPayments mobilepayPayments, MultibancoPayments multibancoPayments, MxBankTransferPayments mxBankTransferPayments, @@ -1564,6 +1573,7 @@ private Capabilities( PayByBankPayments payByBankPayments, PaycoPayments paycoPayments, PaynowPayments paynowPayments, + PaypayPayments paypayPayments, PixPayments pixPayments, PromptpayPayments promptpayPayments, RevolutPayPayments revolutPayPayments, @@ -1614,6 +1624,7 @@ private Capabilities( this.krCardPayments = krCardPayments; this.legacyPayments = legacyPayments; this.linkPayments = linkPayments; + this.mbWayPayments = mbWayPayments; this.mobilepayPayments = mobilepayPayments; this.multibancoPayments = multibancoPayments; this.mxBankTransferPayments = mxBankTransferPayments; @@ -1624,6 +1635,7 @@ private Capabilities( this.payByBankPayments = payByBankPayments; this.paycoPayments = paycoPayments; this.paynowPayments = paynowPayments; + this.paypayPayments = paypayPayments; this.pixPayments = pixPayments; this.promptpayPayments = promptpayPayments; this.revolutPayPayments = revolutPayPayments; @@ -1714,6 +1726,8 @@ public static class Builder { private LinkPayments linkPayments; + private MbWayPayments mbWayPayments; + private MobilepayPayments mobilepayPayments; private MultibancoPayments multibancoPayments; @@ -1734,6 +1748,8 @@ public static class Builder { private PaynowPayments paynowPayments; + private PaypayPayments paypayPayments; + private PixPayments pixPayments; private PromptpayPayments promptpayPayments; @@ -1804,6 +1820,7 @@ public AccountCreateParams.Capabilities build() { this.krCardPayments, this.legacyPayments, this.linkPayments, + this.mbWayPayments, this.mobilepayPayments, this.multibancoPayments, this.mxBankTransferPayments, @@ -1814,6 +1831,7 @@ public AccountCreateParams.Capabilities build() { this.payByBankPayments, this.paycoPayments, this.paynowPayments, + this.paypayPayments, this.pixPayments, this.promptpayPayments, this.revolutPayPayments, @@ -2075,6 +2093,13 @@ public Builder setLinkPayments(AccountCreateParams.Capabilities.LinkPayments lin return this; } + /** The mb_way_payments capability. */ + public Builder setMbWayPayments( + AccountCreateParams.Capabilities.MbWayPayments mbWayPayments) { + this.mbWayPayments = mbWayPayments; + return this; + } + /** The mobilepay_payments capability. */ public Builder setMobilepayPayments( AccountCreateParams.Capabilities.MobilepayPayments mobilepayPayments) { @@ -2144,6 +2169,13 @@ public Builder setPaynowPayments( return this; } + /** The paypay_payments capability. */ + public Builder setPaypayPayments( + AccountCreateParams.Capabilities.PaypayPayments paypayPayments) { + this.paypayPayments = paypayPayments; + return this; + } + /** The pix_payments capability. */ public Builder setPixPayments(AccountCreateParams.Capabilities.PixPayments pixPayments) { this.pixPayments = pixPayments; @@ -4816,6 +4848,86 @@ public Builder setRequested(Boolean requested) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MbWayPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * 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 {@code requirements} arrays. + */ + @SerializedName("requested") + Boolean requested; + + private MbWayPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Capabilities.MbWayPayments build() { + return new AccountCreateParams.Capabilities.MbWayPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Capabilities.MbWayPayments#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Capabilities.MbWayPayments#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * 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 {@code requirements} arrays. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class MobilepayPayments { @@ -5617,6 +5729,86 @@ public Builder setRequested(Boolean requested) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PaypayPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * 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 {@code requirements} arrays. + */ + @SerializedName("requested") + Boolean requested; + + private PaypayPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Capabilities.PaypayPayments build() { + return new AccountCreateParams.Capabilities.PaypayPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Capabilities.PaypayPayments#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Capabilities.PaypayPayments#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * 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 {@code requirements} arrays. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class PixPayments { @@ -7507,11 +7699,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -7614,13 +7806,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -10743,11 +10935,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -10850,13 +11042,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -11339,11 +11531,11 @@ public static class RegisteredAddress { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -11446,13 +11638,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -13264,16 +13456,15 @@ public static class Schedule { /** * The day of the week when available funds are paid out, specified as {@code monday}, - * {@code tuesday}, etc. (required and applicable only if {@code interval} is {@code - * weekly}.) + * {@code tuesday}, etc. Required and applicable only if {@code interval} is {@code weekly}. */ @SerializedName("weekly_anchor") WeeklyAnchor weeklyAnchor; /** * The days of the week when available funds are paid out, specified as an array, e.g., - * [{@code monday}, {@code tuesday}]. (required and applicable only if {@code interval} is - * {@code weekly} and {@code weekly_anchor} is not set.) + * [{@code monday}, {@code tuesday}]. Required and applicable only if {@code interval} is + * {@code weekly}. */ @SerializedName("weekly_payout_days") List weeklyPayoutDays; @@ -13433,8 +13624,8 @@ public Builder addAllMonthlyPayoutDay(List elements) { /** * The day of the week when available funds are paid out, specified as {@code monday}, - * {@code tuesday}, etc. (required and applicable only if {@code interval} is {@code - * weekly}.) + * {@code tuesday}, etc. Required and applicable only if {@code interval} is {@code + * weekly}. */ public Builder setWeeklyAnchor( AccountCreateParams.Settings.Payouts.Schedule.WeeklyAnchor weeklyAnchor) { @@ -13543,12 +13734,6 @@ public enum WeeklyPayoutDay implements ApiRequestParams.EnumParam { @SerializedName("monday") MONDAY("monday"), - @SerializedName("saturday") - SATURDAY("saturday"), - - @SerializedName("sunday") - SUNDAY("sunday"), - @SerializedName("thursday") THURSDAY("thursday"), diff --git a/src/main/java/com/stripe/param/AccountPersonCreateParams.java b/src/main/java/com/stripe/param/AccountPersonCreateParams.java index 419ba8b52c3..a9982ede685 100644 --- a/src/main/java/com/stripe/param/AccountPersonCreateParams.java +++ b/src/main/java/com/stripe/param/AccountPersonCreateParams.java @@ -884,11 +884,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -989,13 +989,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -1872,11 +1872,11 @@ public static class RegisteredAddress { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -1978,13 +1978,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; diff --git a/src/main/java/com/stripe/param/AccountPersonUpdateParams.java b/src/main/java/com/stripe/param/AccountPersonUpdateParams.java index 45fad2e0a32..ab515d80358 100644 --- a/src/main/java/com/stripe/param/AccountPersonUpdateParams.java +++ b/src/main/java/com/stripe/param/AccountPersonUpdateParams.java @@ -1001,11 +1001,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -1121,25 +1121,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -2118,11 +2118,11 @@ public static class RegisteredAddress { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -2239,25 +2239,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; diff --git a/src/main/java/com/stripe/param/AccountUpdateParams.java b/src/main/java/com/stripe/param/AccountUpdateParams.java index 4470540bece..e23fb227dfc 100644 --- a/src/main/java/com/stripe/param/AccountUpdateParams.java +++ b/src/main/java/com/stripe/param/AccountUpdateParams.java @@ -1173,11 +1173,11 @@ public static class SupportAddress { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -1295,25 +1295,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -1510,6 +1510,10 @@ public static class Capabilities { @SerializedName("link_payments") LinkPayments linkPayments; + /** The mb_way_payments capability. */ + @SerializedName("mb_way_payments") + MbWayPayments mbWayPayments; + /** The mobilepay_payments capability. */ @SerializedName("mobilepay_payments") MobilepayPayments mobilepayPayments; @@ -1550,6 +1554,10 @@ public static class Capabilities { @SerializedName("paynow_payments") PaynowPayments paynowPayments; + /** The paypay_payments capability. */ + @SerializedName("paypay_payments") + PaypayPayments paypayPayments; + /** The pix_payments capability. */ @SerializedName("pix_payments") PixPayments pixPayments; @@ -1652,6 +1660,7 @@ private Capabilities( KrCardPayments krCardPayments, LegacyPayments legacyPayments, LinkPayments linkPayments, + MbWayPayments mbWayPayments, MobilepayPayments mobilepayPayments, MultibancoPayments multibancoPayments, MxBankTransferPayments mxBankTransferPayments, @@ -1662,6 +1671,7 @@ private Capabilities( PayByBankPayments payByBankPayments, PaycoPayments paycoPayments, PaynowPayments paynowPayments, + PaypayPayments paypayPayments, PixPayments pixPayments, PromptpayPayments promptpayPayments, RevolutPayPayments revolutPayPayments, @@ -1712,6 +1722,7 @@ private Capabilities( this.krCardPayments = krCardPayments; this.legacyPayments = legacyPayments; this.linkPayments = linkPayments; + this.mbWayPayments = mbWayPayments; this.mobilepayPayments = mobilepayPayments; this.multibancoPayments = multibancoPayments; this.mxBankTransferPayments = mxBankTransferPayments; @@ -1722,6 +1733,7 @@ private Capabilities( this.payByBankPayments = payByBankPayments; this.paycoPayments = paycoPayments; this.paynowPayments = paynowPayments; + this.paypayPayments = paypayPayments; this.pixPayments = pixPayments; this.promptpayPayments = promptpayPayments; this.revolutPayPayments = revolutPayPayments; @@ -1812,6 +1824,8 @@ public static class Builder { private LinkPayments linkPayments; + private MbWayPayments mbWayPayments; + private MobilepayPayments mobilepayPayments; private MultibancoPayments multibancoPayments; @@ -1832,6 +1846,8 @@ public static class Builder { private PaynowPayments paynowPayments; + private PaypayPayments paypayPayments; + private PixPayments pixPayments; private PromptpayPayments promptpayPayments; @@ -1902,6 +1918,7 @@ public AccountUpdateParams.Capabilities build() { this.krCardPayments, this.legacyPayments, this.linkPayments, + this.mbWayPayments, this.mobilepayPayments, this.multibancoPayments, this.mxBankTransferPayments, @@ -1912,6 +1929,7 @@ public AccountUpdateParams.Capabilities build() { this.payByBankPayments, this.paycoPayments, this.paynowPayments, + this.paypayPayments, this.pixPayments, this.promptpayPayments, this.revolutPayPayments, @@ -2173,6 +2191,13 @@ public Builder setLinkPayments(AccountUpdateParams.Capabilities.LinkPayments lin return this; } + /** The mb_way_payments capability. */ + public Builder setMbWayPayments( + AccountUpdateParams.Capabilities.MbWayPayments mbWayPayments) { + this.mbWayPayments = mbWayPayments; + return this; + } + /** The mobilepay_payments capability. */ public Builder setMobilepayPayments( AccountUpdateParams.Capabilities.MobilepayPayments mobilepayPayments) { @@ -2242,6 +2267,13 @@ public Builder setPaynowPayments( return this; } + /** The paypay_payments capability. */ + public Builder setPaypayPayments( + AccountUpdateParams.Capabilities.PaypayPayments paypayPayments) { + this.paypayPayments = paypayPayments; + return this; + } + /** The pix_payments capability. */ public Builder setPixPayments(AccountUpdateParams.Capabilities.PixPayments pixPayments) { this.pixPayments = pixPayments; @@ -4914,6 +4946,86 @@ public Builder setRequested(Boolean requested) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MbWayPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * 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 {@code requirements} arrays. + */ + @SerializedName("requested") + Boolean requested; + + private MbWayPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Capabilities.MbWayPayments build() { + return new AccountUpdateParams.Capabilities.MbWayPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Capabilities.MbWayPayments#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Capabilities.MbWayPayments#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * 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 {@code requirements} arrays. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class MobilepayPayments { @@ -5715,6 +5827,86 @@ public Builder setRequested(Boolean requested) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PaypayPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * 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 {@code requirements} arrays. + */ + @SerializedName("requested") + Boolean requested; + + private PaypayPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Capabilities.PaypayPayments build() { + return new AccountUpdateParams.Capabilities.PaypayPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Capabilities.PaypayPayments#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Capabilities.PaypayPayments#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * 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 {@code requirements} arrays. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class PixPayments { @@ -7676,11 +7868,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -7798,25 +7990,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -10750,11 +10942,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -10872,25 +11064,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -11475,11 +11667,11 @@ public static class RegisteredAddress { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -11597,25 +11789,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -13661,16 +13853,15 @@ public static class Schedule { /** * The day of the week when available funds are paid out, specified as {@code monday}, - * {@code tuesday}, etc. (required and applicable only if {@code interval} is {@code - * weekly}.) + * {@code tuesday}, etc. Required and applicable only if {@code interval} is {@code weekly}. */ @SerializedName("weekly_anchor") WeeklyAnchor weeklyAnchor; /** * The days of the week when available funds are paid out, specified as an array, e.g., - * [{@code monday}, {@code tuesday}]. (required and applicable only if {@code interval} is - * {@code weekly} and {@code weekly_anchor} is not set.) + * [{@code monday}, {@code tuesday}]. Required and applicable only if {@code interval} is + * {@code weekly}. */ @SerializedName("weekly_payout_days") List weeklyPayoutDays; @@ -13830,8 +14021,8 @@ public Builder addAllMonthlyPayoutDay(List elements) { /** * The day of the week when available funds are paid out, specified as {@code monday}, - * {@code tuesday}, etc. (required and applicable only if {@code interval} is {@code - * weekly}.) + * {@code tuesday}, etc. Required and applicable only if {@code interval} is {@code + * weekly}. */ public Builder setWeeklyAnchor( AccountUpdateParams.Settings.Payouts.Schedule.WeeklyAnchor weeklyAnchor) { @@ -13940,12 +14131,6 @@ public enum WeeklyPayoutDay implements ApiRequestParams.EnumParam { @SerializedName("monday") MONDAY("monday"), - @SerializedName("saturday") - SATURDAY("saturday"), - - @SerializedName("sunday") - SUNDAY("sunday"), - @SerializedName("thursday") THURSDAY("thursday"), diff --git a/src/main/java/com/stripe/param/BalanceSettingsRetrieveParams.java b/src/main/java/com/stripe/param/BalanceSettingsRetrieveParams.java new file mode 100644 index 00000000000..f6d085f2939 --- /dev/null +++ b/src/main/java/com/stripe/param/BalanceSettingsRetrieveParams.java @@ -0,0 +1,100 @@ +// File generated from our OpenAPI spec +package com.stripe.param; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class BalanceSettingsRetrieveParams extends ApiRequestParams { + /** Specifies which fields in the response should be expanded. */ + @SerializedName("expand") + List expand; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private BalanceSettingsRetrieveParams(List expand, Map extraParams) { + this.expand = expand; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private List expand; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public BalanceSettingsRetrieveParams build() { + return new BalanceSettingsRetrieveParams(this.expand, this.extraParams); + } + + /** + * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * BalanceSettingsRetrieveParams#expand} for the field documentation. + */ + public Builder addExpand(String element) { + if (this.expand == null) { + this.expand = new ArrayList<>(); + } + this.expand.add(element); + return this; + } + + /** + * Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * BalanceSettingsRetrieveParams#expand} for the field documentation. + */ + public Builder addAllExpand(List elements) { + if (this.expand == null) { + this.expand = new ArrayList<>(); + } + this.expand.addAll(elements); + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * BalanceSettingsRetrieveParams#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link BalanceSettingsRetrieveParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } +} diff --git a/src/main/java/com/stripe/param/BalanceSettingsUpdateParams.java b/src/main/java/com/stripe/param/BalanceSettingsUpdateParams.java new file mode 100644 index 00000000000..ac0ee91cad5 --- /dev/null +++ b/src/main/java/com/stripe/param/BalanceSettingsUpdateParams.java @@ -0,0 +1,750 @@ +// File generated from our OpenAPI spec +package com.stripe.param; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import com.stripe.param.common.EmptyParam; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class BalanceSettingsUpdateParams extends ApiRequestParams { + /** Specifies which fields in the response should be expanded. */ + @SerializedName("expand") + List expand; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Settings that apply to the Payments Balance. + */ + @SerializedName("payments") + Payments payments; + + private BalanceSettingsUpdateParams( + List expand, Map extraParams, Payments payments) { + this.expand = expand; + this.extraParams = extraParams; + this.payments = payments; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private List expand; + + private Map extraParams; + + private Payments payments; + + /** Finalize and obtain parameter instance from this builder. */ + public BalanceSettingsUpdateParams build() { + return new BalanceSettingsUpdateParams(this.expand, this.extraParams, this.payments); + } + + /** + * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * BalanceSettingsUpdateParams#expand} for the field documentation. + */ + public Builder addExpand(String element) { + if (this.expand == null) { + this.expand = new ArrayList<>(); + } + this.expand.add(element); + return this; + } + + /** + * Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * BalanceSettingsUpdateParams#expand} for the field documentation. + */ + public Builder addAllExpand(List elements) { + if (this.expand == null) { + this.expand = new ArrayList<>(); + } + this.expand.addAll(elements); + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * BalanceSettingsUpdateParams#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link BalanceSettingsUpdateParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Settings that apply to the Payments + * Balance. + */ + public Builder setPayments(BalanceSettingsUpdateParams.Payments payments) { + this.payments = payments; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Payments { + /** + * A Boolean indicating whether Stripe should try to reclaim negative balances from an attached + * bank account. For details, see Understanding Connect Account + * Balances. + */ + @SerializedName("debit_negative_balances") + Boolean debitNegativeBalances; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Settings specific to the account's payouts. */ + @SerializedName("payouts") + Payouts payouts; + + /** Settings related to the account's balance settlement timing. */ + @SerializedName("settlement_timing") + SettlementTiming settlementTiming; + + private Payments( + Boolean debitNegativeBalances, + Map extraParams, + Payouts payouts, + SettlementTiming settlementTiming) { + this.debitNegativeBalances = debitNegativeBalances; + this.extraParams = extraParams; + this.payouts = payouts; + this.settlementTiming = settlementTiming; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean debitNegativeBalances; + + private Map extraParams; + + private Payouts payouts; + + private SettlementTiming settlementTiming; + + /** Finalize and obtain parameter instance from this builder. */ + public BalanceSettingsUpdateParams.Payments build() { + return new BalanceSettingsUpdateParams.Payments( + this.debitNegativeBalances, this.extraParams, this.payouts, this.settlementTiming); + } + + /** + * A Boolean indicating whether Stripe should try to reclaim negative balances from an + * attached bank account. For details, see Understanding Connect Account + * Balances. + */ + public Builder setDebitNegativeBalances(Boolean debitNegativeBalances) { + this.debitNegativeBalances = debitNegativeBalances; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * BalanceSettingsUpdateParams.Payments#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link BalanceSettingsUpdateParams.Payments#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Settings specific to the account's payouts. */ + public Builder setPayouts(BalanceSettingsUpdateParams.Payments.Payouts payouts) { + this.payouts = payouts; + return this; + } + + /** Settings related to the account's balance settlement timing. */ + public Builder setSettlementTiming( + BalanceSettingsUpdateParams.Payments.SettlementTiming settlementTiming) { + this.settlementTiming = settlementTiming; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Payouts { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * The minimum balance amount to retain per currency after automatic payouts. Only funds that + * exceed these amounts are paid out. Learn more about the minimum balances + * for automatic payouts. + */ + @SerializedName("minimum_balance_by_currency") + Object minimumBalanceByCurrency; + + /** + * Details on when funds from charges are available, and when they are paid out to an external + * account. For details, see our Setting Bank and Debit + * Card Payouts documentation. + */ + @SerializedName("schedule") + Schedule schedule; + + /** + * The text that appears on the bank account statement for payouts. If not set, this defaults + * to the platform's bank descriptor as set in the Dashboard. + */ + @SerializedName("statement_descriptor") + Object statementDescriptor; + + private Payouts( + Map extraParams, + Object minimumBalanceByCurrency, + Schedule schedule, + Object statementDescriptor) { + this.extraParams = extraParams; + this.minimumBalanceByCurrency = minimumBalanceByCurrency; + this.schedule = schedule; + this.statementDescriptor = statementDescriptor; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object minimumBalanceByCurrency; + + private Schedule schedule; + + private Object statementDescriptor; + + /** Finalize and obtain parameter instance from this builder. */ + public BalanceSettingsUpdateParams.Payments.Payouts build() { + return new BalanceSettingsUpdateParams.Payments.Payouts( + this.extraParams, + this.minimumBalanceByCurrency, + this.schedule, + this.statementDescriptor); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link BalanceSettingsUpdateParams.Payments.Payouts#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link BalanceSettingsUpdateParams.Payments.Payouts#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add a key/value pair to `minimumBalanceByCurrency` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * BalanceSettingsUpdateParams.Payments.Payouts#minimumBalanceByCurrency} for the field + * documentation. + */ + @SuppressWarnings("unchecked") + public Builder putMinimumBalanceByCurrency(String key, Long value) { + if (this.minimumBalanceByCurrency == null + || this.minimumBalanceByCurrency instanceof EmptyParam) { + this.minimumBalanceByCurrency = new HashMap(); + } + ((Map) this.minimumBalanceByCurrency).put(key, value); + return this; + } + + /** + * Add a key/value pair to `minimumBalanceByCurrency` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * BalanceSettingsUpdateParams.Payments.Payouts#minimumBalanceByCurrency} for the field + * documentation. + */ + @SuppressWarnings("unchecked") + public Builder putMinimumBalanceByCurrency(String key, EmptyParam value) { + if (this.minimumBalanceByCurrency == null + || this.minimumBalanceByCurrency instanceof EmptyParam) { + this.minimumBalanceByCurrency = new HashMap(); + } + ((Map) this.minimumBalanceByCurrency).put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `minimumBalanceByCurrency` map. A map is initialized for + * the first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. Map values can only be one of the following types: `Long`, `EmptyParam`. + * See {@link BalanceSettingsUpdateParams.Payments.Payouts#minimumBalanceByCurrency} for the + * field documentation. + */ + @SuppressWarnings("unchecked") + public Builder putAllMinimumBalanceByCurrency(Map map) { + if (!map.values().stream().allMatch(v -> v instanceof Long || v instanceof EmptyParam)) { + throw new IllegalArgumentException( + "All map values must one of the following types: Long, EmptyParam"); + } + if (this.minimumBalanceByCurrency == null + || this.minimumBalanceByCurrency instanceof EmptyParam) { + this.minimumBalanceByCurrency = new HashMap(); + } + ((Map) this.minimumBalanceByCurrency).putAll(map); + return this; + } + + /** + * The minimum balance amount to retain per currency after automatic payouts. Only funds + * that exceed these amounts are paid out. Learn more about the minimum balances + * for automatic payouts. + */ + public Builder setMinimumBalanceByCurrency(EmptyParam minimumBalanceByCurrency) { + this.minimumBalanceByCurrency = minimumBalanceByCurrency; + return this; + } + + /** + * The minimum balance amount to retain per currency after automatic payouts. Only funds + * that exceed these amounts are paid out. Learn more about the minimum balances + * for automatic payouts. + */ + public Builder setMinimumBalanceByCurrency(Map minimumBalanceByCurrency) { + this.minimumBalanceByCurrency = minimumBalanceByCurrency; + return this; + } + + /** + * Details on when funds from charges are available, and when they are paid out to an + * external account. For details, see our Setting Bank and + * Debit Card Payouts documentation. + */ + public Builder setSchedule(BalanceSettingsUpdateParams.Payments.Payouts.Schedule schedule) { + this.schedule = schedule; + return this; + } + + /** + * The text that appears on the bank account statement for payouts. If not set, this + * defaults to the platform's bank descriptor as set in the Dashboard. + */ + public Builder setStatementDescriptor(String statementDescriptor) { + this.statementDescriptor = statementDescriptor; + return this; + } + + /** + * The text that appears on the bank account statement for payouts. If not set, this + * defaults to the platform's bank descriptor as set in the Dashboard. + */ + public Builder setStatementDescriptor(EmptyParam statementDescriptor) { + this.statementDescriptor = statementDescriptor; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Schedule { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * How frequently available funds are paid out. One of: {@code daily}, {@code manual}, + * {@code weekly}, or {@code monthly}. Default is {@code daily}. + */ + @SerializedName("interval") + Interval interval; + + /** + * The days of the month when available funds are paid out, specified as an array of numbers + * between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are + * instead sent on the last day of a shorter month. Required and applicable only if {@code + * interval} is {@code monthly}. + */ + @SerializedName("monthly_payout_days") + List monthlyPayoutDays; + + /** + * The days of the week when available funds are paid out, specified as an array, e.g., + * [{@code monday}, {@code tuesday}]. Required and applicable only if {@code interval} is + * {@code weekly}. + */ + @SerializedName("weekly_payout_days") + List + weeklyPayoutDays; + + private Schedule( + Map extraParams, + Interval interval, + List monthlyPayoutDays, + List + weeklyPayoutDays) { + this.extraParams = extraParams; + this.interval = interval; + this.monthlyPayoutDays = monthlyPayoutDays; + this.weeklyPayoutDays = weeklyPayoutDays; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Interval interval; + + private List monthlyPayoutDays; + + private List + weeklyPayoutDays; + + /** Finalize and obtain parameter instance from this builder. */ + public BalanceSettingsUpdateParams.Payments.Payouts.Schedule build() { + return new BalanceSettingsUpdateParams.Payments.Payouts.Schedule( + this.extraParams, this.interval, this.monthlyPayoutDays, this.weeklyPayoutDays); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link BalanceSettingsUpdateParams.Payments.Payouts.Schedule#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link BalanceSettingsUpdateParams.Payments.Payouts.Schedule#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * How frequently available funds are paid out. One of: {@code daily}, {@code manual}, + * {@code weekly}, or {@code monthly}. Default is {@code daily}. + */ + public Builder setInterval( + BalanceSettingsUpdateParams.Payments.Payouts.Schedule.Interval interval) { + this.interval = interval; + return this; + } + + /** + * Add an element to `monthlyPayoutDays` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link BalanceSettingsUpdateParams.Payments.Payouts.Schedule#monthlyPayoutDays} for + * the field documentation. + */ + public Builder addMonthlyPayoutDay(Long element) { + if (this.monthlyPayoutDays == null) { + this.monthlyPayoutDays = new ArrayList<>(); + } + this.monthlyPayoutDays.add(element); + return this; + } + + /** + * Add all elements to `monthlyPayoutDays` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link BalanceSettingsUpdateParams.Payments.Payouts.Schedule#monthlyPayoutDays} for + * the field documentation. + */ + public Builder addAllMonthlyPayoutDay(List elements) { + if (this.monthlyPayoutDays == null) { + this.monthlyPayoutDays = new ArrayList<>(); + } + this.monthlyPayoutDays.addAll(elements); + return this; + } + + /** + * Add an element to `weeklyPayoutDays` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link BalanceSettingsUpdateParams.Payments.Payouts.Schedule#weeklyPayoutDays} for + * the field documentation. + */ + public Builder addWeeklyPayoutDay( + BalanceSettingsUpdateParams.Payments.Payouts.Schedule.WeeklyPayoutDay element) { + if (this.weeklyPayoutDays == null) { + this.weeklyPayoutDays = new ArrayList<>(); + } + this.weeklyPayoutDays.add(element); + return this; + } + + /** + * Add all elements to `weeklyPayoutDays` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link BalanceSettingsUpdateParams.Payments.Payouts.Schedule#weeklyPayoutDays} for + * the field documentation. + */ + public Builder addAllWeeklyPayoutDay( + List + elements) { + if (this.weeklyPayoutDays == null) { + this.weeklyPayoutDays = new ArrayList<>(); + } + this.weeklyPayoutDays.addAll(elements); + return this; + } + } + + public enum Interval implements ApiRequestParams.EnumParam { + @SerializedName("daily") + DAILY("daily"), + + @SerializedName("manual") + MANUAL("manual"), + + @SerializedName("monthly") + MONTHLY("monthly"), + + @SerializedName("weekly") + WEEKLY("weekly"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Interval(String value) { + this.value = value; + } + } + + public enum WeeklyPayoutDay implements ApiRequestParams.EnumParam { + @SerializedName("friday") + FRIDAY("friday"), + + @SerializedName("monday") + MONDAY("monday"), + + @SerializedName("thursday") + THURSDAY("thursday"), + + @SerializedName("tuesday") + TUESDAY("tuesday"), + + @SerializedName("wednesday") + WEDNESDAY("wednesday"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + WeeklyPayoutDay(String value) { + this.value = value; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class SettlementTiming { + /** + * Change {@code delay_days} for this account, which determines the number of days charge + * funds are held before becoming available. The maximum value is 31. Passing an empty string + * to {@code delay_days_override} will return {@code delay_days} to the default, which is the + * lowest available value for the account. Learn more about controlling delay + * days. + */ + @SerializedName("delay_days_override") + Object delayDaysOverride; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private SettlementTiming(Object delayDaysOverride, Map extraParams) { + this.delayDaysOverride = delayDaysOverride; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object delayDaysOverride; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public BalanceSettingsUpdateParams.Payments.SettlementTiming build() { + return new BalanceSettingsUpdateParams.Payments.SettlementTiming( + this.delayDaysOverride, this.extraParams); + } + + /** + * Change {@code delay_days} for this account, which determines the number of days charge + * funds are held before becoming available. The maximum value is 31. Passing an empty + * string to {@code delay_days_override} will return {@code delay_days} to the default, + * which is the lowest available value for the account. Learn more about controlling + * delay days. + */ + public Builder setDelayDaysOverride(Long delayDaysOverride) { + this.delayDaysOverride = delayDaysOverride; + return this; + } + + /** + * Change {@code delay_days} for this account, which determines the number of days charge + * funds are held before becoming available. The maximum value is 31. Passing an empty + * string to {@code delay_days_override} will return {@code delay_days} to the default, + * which is the lowest available value for the account. Learn more about controlling + * delay days. + */ + public Builder setDelayDaysOverride(EmptyParam delayDaysOverride) { + this.delayDaysOverride = delayDaysOverride; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link BalanceSettingsUpdateParams.Payments.SettlementTiming#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link BalanceSettingsUpdateParams.Payments.SettlementTiming#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + } +} diff --git a/src/main/java/com/stripe/param/ChargeCreateParams.java b/src/main/java/com/stripe/param/ChargeCreateParams.java index c824304cd10..bc73185fe0e 100644 --- a/src/main/java/com/stripe/param/ChargeCreateParams.java +++ b/src/main/java/com/stripe/param/ChargeCreateParams.java @@ -907,11 +907,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -1014,13 +1014,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; diff --git a/src/main/java/com/stripe/param/ChargeUpdateParams.java b/src/main/java/com/stripe/param/ChargeUpdateParams.java index 4413cb6a464..63414340f50 100644 --- a/src/main/java/com/stripe/param/ChargeUpdateParams.java +++ b/src/main/java/com/stripe/param/ChargeUpdateParams.java @@ -619,11 +619,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -741,25 +741,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; diff --git a/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java b/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java index 40045995471..4b43a90f184 100644 --- a/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java +++ b/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java @@ -420,6 +420,13 @@ public static class PaymentMethodData { @SerializedName("link") Link link; + /** + * If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment + * method. + */ + @SerializedName("mb_way") + MbWay mbWay; + /** * 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 @@ -499,6 +506,13 @@ public static class PaymentMethodData { @SerializedName("paypal") Paypal paypal; + /** + * If this is a {@code paypay} PaymentMethod, this hash contains details about the PayPay + * payment method. + */ + @SerializedName("paypay") + Paypay paypay; + /** * If this is a {@code pix} PaymentMethod, this hash contains details about the Pix payment * method. @@ -627,6 +641,7 @@ private PaymentMethodData( Konbini konbini, KrCard krCard, Link link, + MbWay mbWay, Map metadata, Mobilepay mobilepay, Multibanco multibanco, @@ -638,6 +653,7 @@ private PaymentMethodData( Payco payco, Paynow paynow, Paypal paypal, + Paypay paypay, Pix pix, Promptpay promptpay, RadarOptions radarOptions, @@ -681,6 +697,7 @@ private PaymentMethodData( this.konbini = konbini; this.krCard = krCard; this.link = link; + this.mbWay = mbWay; this.metadata = metadata; this.mobilepay = mobilepay; this.multibanco = multibanco; @@ -692,6 +709,7 @@ private PaymentMethodData( this.payco = payco; this.paynow = paynow; this.paypal = paypal; + this.paypay = paypay; this.pix = pix; this.promptpay = promptpay; this.radarOptions = radarOptions; @@ -771,6 +789,8 @@ public static class Builder { private Link link; + private MbWay mbWay; + private Map metadata; private Mobilepay mobilepay; @@ -793,6 +813,8 @@ public static class Builder { private Paypal paypal; + private Paypay paypay; + private Pix pix; private Promptpay promptpay; @@ -853,6 +875,7 @@ public ConfirmationTokenCreateParams.PaymentMethodData build() { this.konbini, this.krCard, this.link, + this.mbWay, this.metadata, this.mobilepay, this.multibanco, @@ -864,6 +887,7 @@ public ConfirmationTokenCreateParams.PaymentMethodData build() { this.payco, this.paynow, this.paypal, + this.paypay, this.pix, this.promptpay, this.radarOptions, @@ -1171,6 +1195,15 @@ public Builder setLink(ConfirmationTokenCreateParams.PaymentMethodData.Link link return this; } + /** + * If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment + * method. + */ + public Builder setMbWay(ConfirmationTokenCreateParams.PaymentMethodData.MbWay mbWay) { + this.mbWay = mbWay; + return this; + } + /** * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` * call, and subsequent calls add additional key/value pairs to the original map. See {@link @@ -1293,6 +1326,15 @@ public Builder setPaypal(ConfirmationTokenCreateParams.PaymentMethodData.Paypal return this; } + /** + * If this is a {@code paypay} PaymentMethod, this hash contains details about the PayPay + * payment method. + */ + public Builder setPaypay(ConfirmationTokenCreateParams.PaymentMethodData.Paypay paypay) { + this.paypay = paypay; + return this; + } + /** * If this is a {@code pix} PaymentMethod, this hash contains details about the Pix payment * method. @@ -2296,11 +2338,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -2405,13 +2447,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -3805,6 +3847,64 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MbWay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private MbWay(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public ConfirmationTokenCreateParams.PaymentMethodData.MbWay build() { + return new ConfirmationTokenCreateParams.PaymentMethodData.MbWay(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link ConfirmationTokenCreateParams.PaymentMethodData.MbWay#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link ConfirmationTokenCreateParams.PaymentMethodData.MbWay#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Mobilepay { @@ -4620,6 +4720,64 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Paypay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Paypay(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public ConfirmationTokenCreateParams.PaymentMethodData.Paypay build() { + return new ConfirmationTokenCreateParams.PaymentMethodData.Paypay(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link ConfirmationTokenCreateParams.PaymentMethodData.Paypay#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link ConfirmationTokenCreateParams.PaymentMethodData.Paypay#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Pix { @@ -5664,6 +5822,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("link") LINK("link"), + @SerializedName("mb_way") + MB_WAY("mb_way"), + @SerializedName("mobilepay") MOBILEPAY("mobilepay"), @@ -5694,6 +5855,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("paypay") + PAYPAY("paypay"), + @SerializedName("pix") PIX("pix"), @@ -6245,11 +6409,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -6352,13 +6516,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; diff --git a/src/main/java/com/stripe/param/CustomerCreateParams.java b/src/main/java/com/stripe/param/CustomerCreateParams.java index c64735c67a4..18b6d44d0ad 100644 --- a/src/main/java/com/stripe/param/CustomerCreateParams.java +++ b/src/main/java/com/stripe/param/CustomerCreateParams.java @@ -27,6 +27,10 @@ public class CustomerCreateParams extends ApiRequestParams { @SerializedName("balance") Long balance; + /** The customer's business name. This may be up to 150 characters. */ + @SerializedName("business_name") + Object businessName; + /** Balance information and default balance settings for this customer. */ @SerializedName("cash_balance") CashBalance cashBalance; @@ -58,6 +62,10 @@ public class CustomerCreateParams extends ApiRequestParams { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** The customer's full name. This may be up to 150 characters. */ + @SerializedName("individual_name") + Object individualName; + /** * The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase * letters or numbers. @@ -126,11 +134,13 @@ public class CustomerCreateParams extends ApiRequestParams { private CustomerCreateParams( Object address, Long balance, + Object businessName, CashBalance cashBalance, String description, String email, List expand, Map extraParams, + Object individualName, String invoicePrefix, InvoiceSettings invoiceSettings, Object metadata, @@ -148,11 +158,13 @@ private CustomerCreateParams( Boolean validate) { this.address = address; this.balance = balance; + this.businessName = businessName; this.cashBalance = cashBalance; this.description = description; this.email = email; this.expand = expand; this.extraParams = extraParams; + this.individualName = individualName; this.invoicePrefix = invoicePrefix; this.invoiceSettings = invoiceSettings; this.metadata = metadata; @@ -179,6 +191,8 @@ public static class Builder { private Long balance; + private Object businessName; + private CashBalance cashBalance; private String description; @@ -189,6 +203,8 @@ public static class Builder { private Map extraParams; + private Object individualName; + private String invoicePrefix; private InvoiceSettings invoiceSettings; @@ -224,11 +240,13 @@ public CustomerCreateParams build() { return new CustomerCreateParams( this.address, this.balance, + this.businessName, this.cashBalance, this.description, this.email, this.expand, this.extraParams, + this.individualName, this.invoicePrefix, this.invoiceSettings, this.metadata, @@ -269,6 +287,18 @@ public Builder setBalance(Long balance) { return this; } + /** The customer's business name. This may be up to 150 characters. */ + public Builder setBusinessName(String businessName) { + this.businessName = businessName; + return this; + } + + /** The customer's business name. This may be up to 150 characters. */ + public Builder setBusinessName(EmptyParam businessName) { + this.businessName = businessName; + return this; + } + /** Balance information and default balance settings for this customer. */ public Builder setCashBalance(CustomerCreateParams.CashBalance cashBalance) { this.cashBalance = cashBalance; @@ -345,6 +375,18 @@ public Builder putAllExtraParam(Map map) { return this; } + /** The customer's full name. This may be up to 150 characters. */ + public Builder setIndividualName(String individualName) { + this.individualName = individualName; + return this; + } + + /** The customer's full name. This may be up to 150 characters. */ + public Builder setIndividualName(EmptyParam individualName) { + this.individualName = individualName; + return this; + } + /** * The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase * letters or numbers. @@ -556,11 +598,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -662,13 +704,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -1382,11 +1424,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -1490,13 +1532,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; diff --git a/src/main/java/com/stripe/param/CustomerListPaymentMethodsParams.java b/src/main/java/com/stripe/param/CustomerListPaymentMethodsParams.java index 588caebbb85..b4c972f3a90 100644 --- a/src/main/java/com/stripe/param/CustomerListPaymentMethodsParams.java +++ b/src/main/java/com/stripe/param/CustomerListPaymentMethodsParams.java @@ -318,6 +318,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("link") LINK("link"), + @SerializedName("mb_way") + MB_WAY("mb_way"), + @SerializedName("mobilepay") MOBILEPAY("mobilepay"), @@ -348,6 +351,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("paypay") + PAYPAY("paypay"), + @SerializedName("pix") PIX("pix"), diff --git a/src/main/java/com/stripe/param/CustomerPaymentMethodListParams.java b/src/main/java/com/stripe/param/CustomerPaymentMethodListParams.java index fb75adf70d3..b0a61b4f634 100644 --- a/src/main/java/com/stripe/param/CustomerPaymentMethodListParams.java +++ b/src/main/java/com/stripe/param/CustomerPaymentMethodListParams.java @@ -318,6 +318,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("link") LINK("link"), + @SerializedName("mb_way") + MB_WAY("mb_way"), + @SerializedName("mobilepay") MOBILEPAY("mobilepay"), @@ -348,6 +351,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("paypay") + PAYPAY("paypay"), + @SerializedName("pix") PIX("pix"), diff --git a/src/main/java/com/stripe/param/CustomerPaymentSourceUpdateParams.java b/src/main/java/com/stripe/param/CustomerPaymentSourceUpdateParams.java index 40a075540cf..cfb835b3cf1 100644 --- a/src/main/java/com/stripe/param/CustomerPaymentSourceUpdateParams.java +++ b/src/main/java/com/stripe/param/CustomerPaymentSourceUpdateParams.java @@ -563,11 +563,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -685,25 +685,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; diff --git a/src/main/java/com/stripe/param/CustomerUpdateParams.java b/src/main/java/com/stripe/param/CustomerUpdateParams.java index ad19ad87e2a..c7bc87791f2 100644 --- a/src/main/java/com/stripe/param/CustomerUpdateParams.java +++ b/src/main/java/com/stripe/param/CustomerUpdateParams.java @@ -27,6 +27,10 @@ public class CustomerUpdateParams extends ApiRequestParams { @SerializedName("balance") Long balance; + /** The customer's business name. This may be up to 150 characters. */ + @SerializedName("business_name") + Object businessName; + /** Balance information and default balance settings for this customer. */ @SerializedName("cash_balance") CashBalance cashBalance; @@ -72,6 +76,10 @@ public class CustomerUpdateParams extends ApiRequestParams { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** The customer's full name. This may be up to 150 characters. */ + @SerializedName("individual_name") + Object individualName; + /** * The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase * letters or numbers. @@ -129,12 +137,14 @@ public class CustomerUpdateParams extends ApiRequestParams { private CustomerUpdateParams( Object address, Long balance, + Object businessName, CashBalance cashBalance, Object defaultSource, Object description, Object email, List expand, Map extraParams, + Object individualName, Object invoicePrefix, InvoiceSettings invoiceSettings, Object metadata, @@ -149,12 +159,14 @@ private CustomerUpdateParams( Boolean validate) { this.address = address; this.balance = balance; + this.businessName = businessName; this.cashBalance = cashBalance; this.defaultSource = defaultSource; this.description = description; this.email = email; this.expand = expand; this.extraParams = extraParams; + this.individualName = individualName; this.invoicePrefix = invoicePrefix; this.invoiceSettings = invoiceSettings; this.metadata = metadata; @@ -178,6 +190,8 @@ public static class Builder { private Long balance; + private Object businessName; + private CashBalance cashBalance; private Object defaultSource; @@ -190,6 +204,8 @@ public static class Builder { private Map extraParams; + private Object individualName; + private Object invoicePrefix; private InvoiceSettings invoiceSettings; @@ -219,12 +235,14 @@ public CustomerUpdateParams build() { return new CustomerUpdateParams( this.address, this.balance, + this.businessName, this.cashBalance, this.defaultSource, this.description, this.email, this.expand, this.extraParams, + this.individualName, this.invoicePrefix, this.invoiceSettings, this.metadata, @@ -262,6 +280,18 @@ public Builder setBalance(Long balance) { return this; } + /** The customer's business name. This may be up to 150 characters. */ + public Builder setBusinessName(String businessName) { + this.businessName = businessName; + return this; + } + + /** The customer's business name. This may be up to 150 characters. */ + public Builder setBusinessName(EmptyParam businessName) { + this.businessName = businessName; + return this; + } + /** Balance information and default balance settings for this customer. */ public Builder setCashBalance(CustomerUpdateParams.CashBalance cashBalance) { this.cashBalance = cashBalance; @@ -390,6 +420,18 @@ public Builder putAllExtraParam(Map map) { return this; } + /** The customer's full name. This may be up to 150 characters. */ + public Builder setIndividualName(String individualName) { + this.individualName = individualName; + return this; + } + + /** The customer's full name. This may be up to 150 characters. */ + public Builder setIndividualName(EmptyParam individualName) { + this.individualName = individualName; + return this; + } + /** * The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase * letters or numbers. @@ -590,11 +632,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -712,25 +754,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -1506,11 +1548,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -1630,25 +1672,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; diff --git a/src/main/java/com/stripe/param/DisputeUpdateParams.java b/src/main/java/com/stripe/param/DisputeUpdateParams.java index 1cd05ee3485..2a650e20b18 100644 --- a/src/main/java/com/stripe/param/DisputeUpdateParams.java +++ b/src/main/java/com/stripe/param/DisputeUpdateParams.java @@ -1581,11 +1581,11 @@ public static class ShippingAddress { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -1708,25 +1708,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -2067,11 +2067,11 @@ public static class ShippingAddress { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -2194,25 +2194,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; diff --git a/src/main/java/com/stripe/param/InvoiceAddLinesParams.java b/src/main/java/com/stripe/param/InvoiceAddLinesParams.java index 56eb39240e7..ba1f9bdd2e8 100644 --- a/src/main/java/com/stripe/param/InvoiceAddLinesParams.java +++ b/src/main/java/com/stripe/param/InvoiceAddLinesParams.java @@ -1122,19 +1122,28 @@ public static class ProductData { @SerializedName("tax_code") String taxCode; + /** + * A label that represents units of this product. When set, this will be included in + * customers' receipts, invoices, Checkout, and the customer portal. + */ + @SerializedName("unit_label") + String unitLabel; + private ProductData( String description, Map extraParams, List images, Map metadata, String name, - String taxCode) { + String taxCode, + String unitLabel) { this.description = description; this.extraParams = extraParams; this.images = images; this.metadata = metadata; this.name = name; this.taxCode = taxCode; + this.unitLabel = unitLabel; } public static Builder builder() { @@ -1154,6 +1163,8 @@ public static class Builder { private String taxCode; + private String unitLabel; + /** Finalize and obtain parameter instance from this builder. */ public InvoiceAddLinesParams.Line.PriceData.ProductData build() { return new InvoiceAddLinesParams.Line.PriceData.ProductData( @@ -1162,7 +1173,8 @@ public InvoiceAddLinesParams.Line.PriceData.ProductData build() { this.images, this.metadata, this.name, - this.taxCode); + this.taxCode, + this.unitLabel); } /** @@ -1270,6 +1282,15 @@ public Builder setTaxCode(String taxCode) { this.taxCode = taxCode; return this; } + + /** + * A label that represents units of this product. When set, this will be included in + * customers' receipts, invoices, Checkout, and the customer portal. + */ + public Builder setUnitLabel(String unitLabel) { + this.unitLabel = unitLabel; + return this; + } } } diff --git a/src/main/java/com/stripe/param/InvoiceCreateParams.java b/src/main/java/com/stripe/param/InvoiceCreateParams.java index d9e51691e0d..aa776ea067d 100644 --- a/src/main/java/com/stripe/param/InvoiceCreateParams.java +++ b/src/main/java/com/stripe/param/InvoiceCreateParams.java @@ -1536,7 +1536,6 @@ public static class PaymentSettings { * invoice’s default payment method, the subscription’s default payment method, the customer’s * default payment method, and your invoice template settings. - * Should not be specified with payment_method_configuration */ @SerializedName("payment_method_types") Object paymentMethodTypes; @@ -1667,7 +1666,6 @@ public Builder addAllPaymentMethodType( * invoice’s default payment method, the subscription’s default payment method, the customer’s * default payment method, and your invoice template settings. - * Should not be specified with payment_method_configuration */ public Builder setPaymentMethodTypes(EmptyParam paymentMethodTypes) { this.paymentMethodTypes = paymentMethodTypes; @@ -1680,7 +1678,6 @@ public Builder setPaymentMethodTypes(EmptyParam paymentMethodTypes) { * invoice’s default payment method, the subscription’s default payment method, the customer’s * default payment method, and your invoice template settings. - * Should not be specified with payment_method_configuration */ public Builder setPaymentMethodTypes( List paymentMethodTypes) { @@ -5041,11 +5038,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -5148,13 +5145,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; diff --git a/src/main/java/com/stripe/param/InvoiceCreatePreviewParams.java b/src/main/java/com/stripe/param/InvoiceCreatePreviewParams.java index 48f858575e5..ee1d9490752 100644 --- a/src/main/java/com/stripe/param/InvoiceCreatePreviewParams.java +++ b/src/main/java/com/stripe/param/InvoiceCreatePreviewParams.java @@ -844,11 +844,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -951,13 +951,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -1101,11 +1101,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -1211,13 +1211,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -3101,15 +3101,20 @@ public static class BillingMode { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Configure behavior for flexible billing mode. */ + @SerializedName("flexible") + Flexible flexible; + /** * Required. Controls the calculation and orchestration of prorations and - * invoices for subscriptions. + * invoices for subscriptions. If no value is passed, the default is {@code flexible}. */ @SerializedName("type") Type type; - private BillingMode(Map extraParams, Type type) { + private BillingMode(Map extraParams, Flexible flexible, Type type) { this.extraParams = extraParams; + this.flexible = flexible; this.type = type; } @@ -3120,12 +3125,14 @@ public static Builder builder() { public static class Builder { private Map extraParams; + private Flexible flexible; + private Type type; /** Finalize and obtain parameter instance from this builder. */ public InvoiceCreatePreviewParams.ScheduleDetails.BillingMode build() { return new InvoiceCreatePreviewParams.ScheduleDetails.BillingMode( - this.extraParams, this.type); + this.extraParams, this.flexible, this.type); } /** @@ -3156,9 +3163,16 @@ public Builder putAllExtraParam(Map map) { return this; } + /** Configure behavior for flexible billing mode. */ + public Builder setFlexible( + InvoiceCreatePreviewParams.ScheduleDetails.BillingMode.Flexible flexible) { + this.flexible = flexible; + return this; + } + /** * Required. Controls the calculation and orchestration of prorations and - * invoices for subscriptions. + * invoices for subscriptions. If no value is passed, the default is {@code flexible}. */ public Builder setType(InvoiceCreatePreviewParams.ScheduleDetails.BillingMode.Type type) { this.type = type; @@ -3166,6 +3180,102 @@ public Builder setType(InvoiceCreatePreviewParams.ScheduleDetails.BillingMode.Ty } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Flexible { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Controls how invoices and invoice items display proration amounts and discount amounts. + */ + @SerializedName("proration_discounts") + ProrationDiscounts prorationDiscounts; + + private Flexible(Map extraParams, ProrationDiscounts prorationDiscounts) { + this.extraParams = extraParams; + this.prorationDiscounts = prorationDiscounts; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private ProrationDiscounts prorationDiscounts; + + /** Finalize and obtain parameter instance from this builder. */ + public InvoiceCreatePreviewParams.ScheduleDetails.BillingMode.Flexible build() { + return new InvoiceCreatePreviewParams.ScheduleDetails.BillingMode.Flexible( + this.extraParams, this.prorationDiscounts); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * InvoiceCreatePreviewParams.ScheduleDetails.BillingMode.Flexible#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * InvoiceCreatePreviewParams.ScheduleDetails.BillingMode.Flexible#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Controls how invoices and invoice items display proration amounts and discount amounts. + */ + public Builder setProrationDiscounts( + InvoiceCreatePreviewParams.ScheduleDetails.BillingMode.Flexible.ProrationDiscounts + prorationDiscounts) { + this.prorationDiscounts = prorationDiscounts; + return this; + } + } + + public enum ProrationDiscounts implements ApiRequestParams.EnumParam { + @SerializedName("included") + INCLUDED("included"), + + @SerializedName("itemized") + ITEMIZED("itemized"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ProrationDiscounts(String value) { + this.value = value; + } + } + } + public enum Type implements ApiRequestParams.EnumParam { @SerializedName("classic") CLASSIC("classic"), @@ -3309,16 +3419,6 @@ public static class Phase { @SerializedName("items") List items; - /** - * Integer representing the multiplier applied to the price interval. For example, {@code - * iterations=2} applied to a price with {@code interval=month} and {@code interval_count=3} - * results in a phase of duration {@code 2 * 3 months = 6 months}. If set, {@code end_date} - * must not be set. This parameter is deprecated and will be removed in a future version. Use - * {@code duration} instead. - */ - @SerializedName("iterations") - Long iterations; - /** * Set of key-value pairs that you can * attach to a phase. Metadata on a schedule's phase will update the underlying subscription's @@ -3395,7 +3495,6 @@ private Phase( Map extraParams, InvoiceSettings invoiceSettings, List items, - Long iterations, Map metadata, String onBehalfOf, ProrationBehavior prorationBehavior, @@ -3419,7 +3518,6 @@ private Phase( this.extraParams = extraParams; this.invoiceSettings = invoiceSettings; this.items = items; - this.iterations = iterations; this.metadata = metadata; this.onBehalfOf = onBehalfOf; this.prorationBehavior = prorationBehavior; @@ -3467,8 +3565,6 @@ public static class Builder { private List items; - private Long iterations; - private Map metadata; private String onBehalfOf; @@ -3502,7 +3598,6 @@ public InvoiceCreatePreviewParams.ScheduleDetails.Phase build() { this.extraParams, this.invoiceSettings, this.items, - this.iterations, this.metadata, this.onBehalfOf, this.prorationBehavior, @@ -3848,18 +3943,6 @@ public Builder addAllItem( return this; } - /** - * Integer representing the multiplier applied to the price interval. For example, {@code - * iterations=2} applied to a price with {@code interval=month} and {@code interval_count=3} - * results in a phase of duration {@code 2 * 3 months = 6 months}. If set, {@code end_date} - * must not be set. This parameter is deprecated and will be removed in a future version. - * Use {@code duration} instead. - */ - public Builder setIterations(Long iterations) { - this.iterations = iterations; - return this; - } - /** * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` * call, and subsequent calls add additional key/value pairs to the original map. See {@link @@ -3996,8 +4079,9 @@ public static class AddInvoiceItem { Map metadata; /** - * The period associated with this invoice item. Defaults to the period of the underlying - * subscription that surrounds the start of the phase. + * The period associated with this invoice item. If not set, {@code period.start.type} + * defaults to {@code max_item_period_start} and {@code period.end.type} defaults to {@code + * min_item_period_end}. */ @SerializedName("period") Period period; @@ -4170,8 +4254,9 @@ public Builder putAllMetadata(Map map) { } /** - * The period associated with this invoice item. Defaults to the period of the underlying - * subscription that surrounds the start of the phase. + * The period associated with this invoice item. If not set, {@code period.start.type} + * defaults to {@code max_item_period_start} and {@code period.end.type} defaults to + * {@code min_item_period_end}. */ public Builder setPeriod( InvoiceCreatePreviewParams.ScheduleDetails.Phase.AddInvoiceItem.Period period) { @@ -7222,15 +7307,20 @@ public static class BillingMode { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Configure behavior for flexible billing mode. */ + @SerializedName("flexible") + Flexible flexible; + /** * Required. Controls the calculation and orchestration of prorations and - * invoices for subscriptions. + * invoices for subscriptions. If no value is passed, the default is {@code flexible}. */ @SerializedName("type") Type type; - private BillingMode(Map extraParams, Type type) { + private BillingMode(Map extraParams, Flexible flexible, Type type) { this.extraParams = extraParams; + this.flexible = flexible; this.type = type; } @@ -7241,12 +7331,14 @@ public static Builder builder() { public static class Builder { private Map extraParams; + private Flexible flexible; + private Type type; /** Finalize and obtain parameter instance from this builder. */ public InvoiceCreatePreviewParams.SubscriptionDetails.BillingMode build() { return new InvoiceCreatePreviewParams.SubscriptionDetails.BillingMode( - this.extraParams, this.type); + this.extraParams, this.flexible, this.type); } /** @@ -7277,9 +7369,16 @@ public Builder putAllExtraParam(Map map) { return this; } + /** Configure behavior for flexible billing mode. */ + public Builder setFlexible( + InvoiceCreatePreviewParams.SubscriptionDetails.BillingMode.Flexible flexible) { + this.flexible = flexible; + return this; + } + /** * Required. Controls the calculation and orchestration of prorations and - * invoices for subscriptions. + * invoices for subscriptions. If no value is passed, the default is {@code flexible}. */ public Builder setType( InvoiceCreatePreviewParams.SubscriptionDetails.BillingMode.Type type) { @@ -7288,6 +7387,102 @@ public Builder setType( } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Flexible { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Controls how invoices and invoice items display proration amounts and discount amounts. + */ + @SerializedName("proration_discounts") + ProrationDiscounts prorationDiscounts; + + private Flexible(Map extraParams, ProrationDiscounts prorationDiscounts) { + this.extraParams = extraParams; + this.prorationDiscounts = prorationDiscounts; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private ProrationDiscounts prorationDiscounts; + + /** Finalize and obtain parameter instance from this builder. */ + public InvoiceCreatePreviewParams.SubscriptionDetails.BillingMode.Flexible build() { + return new InvoiceCreatePreviewParams.SubscriptionDetails.BillingMode.Flexible( + this.extraParams, this.prorationDiscounts); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * InvoiceCreatePreviewParams.SubscriptionDetails.BillingMode.Flexible#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * InvoiceCreatePreviewParams.SubscriptionDetails.BillingMode.Flexible#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Controls how invoices and invoice items display proration amounts and discount amounts. + */ + public Builder setProrationDiscounts( + InvoiceCreatePreviewParams.SubscriptionDetails.BillingMode.Flexible.ProrationDiscounts + prorationDiscounts) { + this.prorationDiscounts = prorationDiscounts; + return this; + } + } + + public enum ProrationDiscounts implements ApiRequestParams.EnumParam { + @SerializedName("included") + INCLUDED("included"), + + @SerializedName("itemized") + ITEMIZED("itemized"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ProrationDiscounts(String value) { + this.value = value; + } + } + } + public enum Type implements ApiRequestParams.EnumParam { @SerializedName("classic") CLASSIC("classic"), diff --git a/src/main/java/com/stripe/param/InvoiceLineItemUpdateParams.java b/src/main/java/com/stripe/param/InvoiceLineItemUpdateParams.java index 0a4443dd488..7b97a557b1c 100644 --- a/src/main/java/com/stripe/param/InvoiceLineItemUpdateParams.java +++ b/src/main/java/com/stripe/param/InvoiceLineItemUpdateParams.java @@ -1006,19 +1006,28 @@ public static class ProductData { @SerializedName("tax_code") Object taxCode; + /** + * A label that represents units of this product. When set, this will be included in + * customers' receipts, invoices, Checkout, and the customer portal. + */ + @SerializedName("unit_label") + Object unitLabel; + private ProductData( Object description, Map extraParams, List images, Map metadata, Object name, - Object taxCode) { + Object taxCode, + Object unitLabel) { this.description = description; this.extraParams = extraParams; this.images = images; this.metadata = metadata; this.name = name; this.taxCode = taxCode; + this.unitLabel = unitLabel; } public static Builder builder() { @@ -1038,6 +1047,8 @@ public static class Builder { private Object taxCode; + private Object unitLabel; + /** Finalize and obtain parameter instance from this builder. */ public InvoiceLineItemUpdateParams.PriceData.ProductData build() { return new InvoiceLineItemUpdateParams.PriceData.ProductData( @@ -1046,7 +1057,8 @@ public InvoiceLineItemUpdateParams.PriceData.ProductData build() { this.images, this.metadata, this.name, - this.taxCode); + this.taxCode, + this.unitLabel); } /** @@ -1177,6 +1189,24 @@ public Builder setTaxCode(EmptyParam taxCode) { this.taxCode = taxCode; return this; } + + /** + * A label that represents units of this product. When set, this will be included in + * customers' receipts, invoices, Checkout, and the customer portal. + */ + public Builder setUnitLabel(String unitLabel) { + this.unitLabel = unitLabel; + return this; + } + + /** + * A label that represents units of this product. When set, this will be included in + * customers' receipts, invoices, Checkout, and the customer portal. + */ + public Builder setUnitLabel(EmptyParam unitLabel) { + this.unitLabel = unitLabel; + return this; + } } } diff --git a/src/main/java/com/stripe/param/InvoiceUpdateLinesParams.java b/src/main/java/com/stripe/param/InvoiceUpdateLinesParams.java index 8126abb27a0..131b46356cc 100644 --- a/src/main/java/com/stripe/param/InvoiceUpdateLinesParams.java +++ b/src/main/java/com/stripe/param/InvoiceUpdateLinesParams.java @@ -1146,19 +1146,28 @@ public static class ProductData { @SerializedName("tax_code") String taxCode; + /** + * A label that represents units of this product. When set, this will be included in + * customers' receipts, invoices, Checkout, and the customer portal. + */ + @SerializedName("unit_label") + String unitLabel; + private ProductData( String description, Map extraParams, List images, Map metadata, String name, - String taxCode) { + String taxCode, + String unitLabel) { this.description = description; this.extraParams = extraParams; this.images = images; this.metadata = metadata; this.name = name; this.taxCode = taxCode; + this.unitLabel = unitLabel; } public static Builder builder() { @@ -1178,6 +1187,8 @@ public static class Builder { private String taxCode; + private String unitLabel; + /** Finalize and obtain parameter instance from this builder. */ public InvoiceUpdateLinesParams.Line.PriceData.ProductData build() { return new InvoiceUpdateLinesParams.Line.PriceData.ProductData( @@ -1186,7 +1197,8 @@ public InvoiceUpdateLinesParams.Line.PriceData.ProductData build() { this.images, this.metadata, this.name, - this.taxCode); + this.taxCode, + this.unitLabel); } /** @@ -1296,6 +1308,15 @@ public Builder setTaxCode(String taxCode) { this.taxCode = taxCode; return this; } + + /** + * A label that represents units of this product. When set, this will be included in + * customers' receipts, invoices, Checkout, and the customer portal. + */ + public Builder setUnitLabel(String unitLabel) { + this.unitLabel = unitLabel; + return this; + } } } diff --git a/src/main/java/com/stripe/param/InvoiceUpdateParams.java b/src/main/java/com/stripe/param/InvoiceUpdateParams.java index 77b8e756e09..c246f64335f 100644 --- a/src/main/java/com/stripe/param/InvoiceUpdateParams.java +++ b/src/main/java/com/stripe/param/InvoiceUpdateParams.java @@ -1516,7 +1516,6 @@ public static class PaymentSettings { * invoice’s default payment method, the subscription’s default payment method, the customer’s * default payment method, and your invoice template settings. - * Should not be specified with payment_method_configuration */ @SerializedName("payment_method_types") Object paymentMethodTypes; @@ -1647,7 +1646,6 @@ public Builder addAllPaymentMethodType( * invoice’s default payment method, the subscription’s default payment method, the customer’s * default payment method, and your invoice template settings. - * Should not be specified with payment_method_configuration */ public Builder setPaymentMethodTypes(EmptyParam paymentMethodTypes) { this.paymentMethodTypes = paymentMethodTypes; @@ -1660,7 +1658,6 @@ public Builder setPaymentMethodTypes(EmptyParam paymentMethodTypes) { * invoice’s default payment method, the subscription’s default payment method, the customer’s * default payment method, and your invoice template settings. - * Should not be specified with payment_method_configuration */ public Builder setPaymentMethodTypes( List paymentMethodTypes) { @@ -5097,11 +5094,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -5219,25 +5216,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; diff --git a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java index 2f014205a73..ad41528a52c 100644 --- a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java @@ -37,6 +37,10 @@ public class PaymentIntentConfirmParams extends ApiRequestParams { @SerializedName("error_on_requires_action") Boolean errorOnRequiresAction; + /** The list of payment method types to exclude from use with this payment. */ + @SerializedName("excluded_payment_method_types") + Object excludedPaymentMethodTypes; + /** Specifies which fields in the response should be expanded. */ @SerializedName("expand") List expand; @@ -164,6 +168,7 @@ private PaymentIntentConfirmParams( CaptureMethod captureMethod, String confirmationToken, Boolean errorOnRequiresAction, + Object excludedPaymentMethodTypes, List expand, Map extraParams, String mandate, @@ -182,6 +187,7 @@ private PaymentIntentConfirmParams( this.captureMethod = captureMethod; this.confirmationToken = confirmationToken; this.errorOnRequiresAction = errorOnRequiresAction; + this.excludedPaymentMethodTypes = excludedPaymentMethodTypes; this.expand = expand; this.extraParams = extraParams; this.mandate = mandate; @@ -210,6 +216,8 @@ public static class Builder { private Boolean errorOnRequiresAction; + private Object excludedPaymentMethodTypes; + private List expand; private Map extraParams; @@ -246,6 +254,7 @@ public PaymentIntentConfirmParams build() { this.captureMethod, this.confirmationToken, this.errorOnRequiresAction, + this.excludedPaymentMethodTypes, this.expand, this.extraParams, this.mandate, @@ -293,6 +302,55 @@ public Builder setErrorOnRequiresAction(Boolean errorOnRequiresAction) { return this; } + /** + * Add an element to `excludedPaymentMethodTypes` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link PaymentIntentConfirmParams#excludedPaymentMethodTypes} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addExcludedPaymentMethodType( + PaymentIntentConfirmParams.ExcludedPaymentMethodType element) { + if (this.excludedPaymentMethodTypes == null + || this.excludedPaymentMethodTypes instanceof EmptyParam) { + this.excludedPaymentMethodTypes = + new ArrayList(); + } + ((List) this.excludedPaymentMethodTypes) + .add(element); + return this; + } + + /** + * Add all elements to `excludedPaymentMethodTypes` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link PaymentIntentConfirmParams#excludedPaymentMethodTypes} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllExcludedPaymentMethodType( + List elements) { + if (this.excludedPaymentMethodTypes == null + || this.excludedPaymentMethodTypes instanceof EmptyParam) { + this.excludedPaymentMethodTypes = + new ArrayList(); + } + ((List) this.excludedPaymentMethodTypes) + .addAll(elements); + return this; + } + + /** The list of payment method types to exclude from use with this payment. */ + public Builder setExcludedPaymentMethodTypes(EmptyParam excludedPaymentMethodTypes) { + this.excludedPaymentMethodTypes = excludedPaymentMethodTypes; + return this; + } + + /** The list of payment method types to exclude from use with this payment. */ + public Builder setExcludedPaymentMethodTypes( + List excludedPaymentMethodTypes) { + this.excludedPaymentMethodTypes = excludedPaymentMethodTypes; + return this; + } + /** * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and * subsequent calls adds additional elements to the original list. See {@link @@ -1142,6 +1200,13 @@ public static class PaymentMethodData { @SerializedName("link") Link link; + /** + * If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment + * method. + */ + @SerializedName("mb_way") + MbWay mbWay; + /** * 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 @@ -1221,6 +1286,13 @@ public static class PaymentMethodData { @SerializedName("paypal") Paypal paypal; + /** + * If this is a {@code paypay} PaymentMethod, this hash contains details about the PayPay + * payment method. + */ + @SerializedName("paypay") + Paypay paypay; + /** * If this is a {@code pix} PaymentMethod, this hash contains details about the Pix payment * method. @@ -1349,6 +1421,7 @@ private PaymentMethodData( Konbini konbini, KrCard krCard, Link link, + MbWay mbWay, Map metadata, Mobilepay mobilepay, Multibanco multibanco, @@ -1360,6 +1433,7 @@ private PaymentMethodData( Payco payco, Paynow paynow, Paypal paypal, + Paypay paypay, Pix pix, Promptpay promptpay, RadarOptions radarOptions, @@ -1403,6 +1477,7 @@ private PaymentMethodData( this.konbini = konbini; this.krCard = krCard; this.link = link; + this.mbWay = mbWay; this.metadata = metadata; this.mobilepay = mobilepay; this.multibanco = multibanco; @@ -1414,6 +1489,7 @@ private PaymentMethodData( this.payco = payco; this.paynow = paynow; this.paypal = paypal; + this.paypay = paypay; this.pix = pix; this.promptpay = promptpay; this.radarOptions = radarOptions; @@ -1493,6 +1569,8 @@ public static class Builder { private Link link; + private MbWay mbWay; + private Map metadata; private Mobilepay mobilepay; @@ -1515,6 +1593,8 @@ public static class Builder { private Paypal paypal; + private Paypay paypay; + private Pix pix; private Promptpay promptpay; @@ -1575,6 +1655,7 @@ public PaymentIntentConfirmParams.PaymentMethodData build() { this.konbini, this.krCard, this.link, + this.mbWay, this.metadata, this.mobilepay, this.multibanco, @@ -1586,6 +1667,7 @@ public PaymentIntentConfirmParams.PaymentMethodData build() { this.payco, this.paynow, this.paypal, + this.paypay, this.pix, this.promptpay, this.radarOptions, @@ -1892,6 +1974,15 @@ public Builder setLink(PaymentIntentConfirmParams.PaymentMethodData.Link link) { return this; } + /** + * If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment + * method. + */ + public Builder setMbWay(PaymentIntentConfirmParams.PaymentMethodData.MbWay mbWay) { + this.mbWay = mbWay; + return this; + } + /** * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` * call, and subsequent calls add additional key/value pairs to the original map. See {@link @@ -2013,6 +2104,15 @@ public Builder setPaypal(PaymentIntentConfirmParams.PaymentMethodData.Paypal pay return this; } + /** + * If this is a {@code paypay} PaymentMethod, this hash contains details about the PayPay + * payment method. + */ + public Builder setPaypay(PaymentIntentConfirmParams.PaymentMethodData.Paypay paypay) { + this.paypay = paypay; + return this; + } + /** * If this is a {@code pix} PaymentMethod, this hash contains details about the Pix payment * method. @@ -3013,11 +3113,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -3122,13 +3222,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -4514,6 +4614,64 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MbWay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private MbWay(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodData.MbWay build() { + return new PaymentIntentConfirmParams.PaymentMethodData.MbWay(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.MbWay#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.MbWay#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Mobilepay { @@ -5326,6 +5484,64 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Paypay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Paypay(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodData.Paypay build() { + return new PaymentIntentConfirmParams.PaymentMethodData.Paypay(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Paypay#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Paypay#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Pix { @@ -6368,6 +6584,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("link") LINK("link"), + @SerializedName("mb_way") + MB_WAY("mb_way"), + @SerializedName("mobilepay") MOBILEPAY("mobilepay"), @@ -6398,6 +6617,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("paypay") + PAYPAY("paypay"), + @SerializedName("pix") PIX("pix"), @@ -6648,6 +6870,13 @@ public static class PaymentMethodOptions { @SerializedName("link") Object link; + /** + * If this is a {@code mb_way} PaymentMethod, this sub-hash contains details about the MB WAY + * payment method options. + */ + @SerializedName("mb_way") + Object mbWay; + /** * If this is a {@code MobilePay} PaymentMethod, this sub-hash contains details about the * MobilePay payment method options. @@ -6718,6 +6947,13 @@ public static class PaymentMethodOptions { @SerializedName("paypal") Object paypal; + /** + * If this is a {@code paypay} PaymentMethod, this sub-hash contains details about the PayPay + * payment method options. + */ + @SerializedName("paypay") + Object paypay; + /** * If this is a {@code pix} PaymentMethod, this sub-hash contains details about the Pix payment * method options. @@ -6832,6 +7068,7 @@ private PaymentMethodOptions( Object konbini, Object krCard, Object link, + Object mbWay, Object mobilepay, Object multibanco, Object naverPay, @@ -6842,6 +7079,7 @@ private PaymentMethodOptions( Object payco, Object paynow, Object paypal, + Object paypay, Object pix, Object promptpay, Object revolutPay, @@ -6883,6 +7121,7 @@ private PaymentMethodOptions( this.konbini = konbini; this.krCard = krCard; this.link = link; + this.mbWay = mbWay; this.mobilepay = mobilepay; this.multibanco = multibanco; this.naverPay = naverPay; @@ -6893,6 +7132,7 @@ private PaymentMethodOptions( this.payco = payco; this.paynow = paynow; this.paypal = paypal; + this.paypay = paypay; this.pix = pix; this.promptpay = promptpay; this.revolutPay = revolutPay; @@ -6970,6 +7210,8 @@ public static class Builder { private Object link; + private Object mbWay; + private Object mobilepay; private Object multibanco; @@ -6990,6 +7232,8 @@ public static class Builder { private Object paypal; + private Object paypay; + private Object pix; private Object promptpay; @@ -7046,6 +7290,7 @@ public PaymentIntentConfirmParams.PaymentMethodOptions build() { this.konbini, this.krCard, this.link, + this.mbWay, this.mobilepay, this.multibanco, this.naverPay, @@ -7056,6 +7301,7 @@ public PaymentIntentConfirmParams.PaymentMethodOptions build() { this.payco, this.paynow, this.paypal, + this.paypay, this.pix, this.promptpay, this.revolutPay, @@ -7605,6 +7851,24 @@ public Builder setLink(EmptyParam link) { return this; } + /** + * If this is a {@code mb_way} PaymentMethod, this sub-hash contains details about the MB WAY + * payment method options. + */ + public Builder setMbWay(PaymentIntentConfirmParams.PaymentMethodOptions.MbWay mbWay) { + this.mbWay = mbWay; + return this; + } + + /** + * If this is a {@code mb_way} PaymentMethod, this sub-hash contains details about the MB WAY + * payment method options. + */ + public Builder setMbWay(EmptyParam mbWay) { + this.mbWay = mbWay; + return this; + } + /** * If this is a {@code MobilePay} PaymentMethod, this sub-hash contains details about the * MobilePay payment method options. @@ -7790,6 +8054,24 @@ public Builder setPaypal(EmptyParam paypal) { return this; } + /** + * If this is a {@code paypay} PaymentMethod, this sub-hash contains details about the PayPay + * payment method options. + */ + public Builder setPaypay(PaymentIntentConfirmParams.PaymentMethodOptions.Paypay paypay) { + this.paypay = paypay; + return this; + } + + /** + * If this is a {@code paypay} PaymentMethod, this sub-hash contains details about the PayPay + * payment method options. + */ + public Builder setPaypay(EmptyParam paypay) { + this.paypay = paypay; + return this; + } + /** * If this is a {@code pix} PaymentMethod, this sub-hash contains details about the Pix * payment method options. @@ -16085,20 +16367,7 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) - public static class Mobilepay { - /** - * 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 {@code capture_method} is already set on the PaymentIntent, providing an empty value - * for this parameter unsets the stored value for this payment method type. - */ - @SerializedName("capture_method") - ApiRequestParams.EnumParam captureMethod; - + public static class MbWay { /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -16134,11 +16403,7 @@ public static class Mobilepay { @SerializedName("setup_future_usage") SetupFutureUsage setupFutureUsage; - private Mobilepay( - ApiRequestParams.EnumParam captureMethod, - Map extraParams, - SetupFutureUsage setupFutureUsage) { - this.captureMethod = captureMethod; + private MbWay(Map extraParams, SetupFutureUsage setupFutureUsage) { this.extraParams = extraParams; this.setupFutureUsage = setupFutureUsage; } @@ -16148,54 +16413,21 @@ public static Builder builder() { } public static class Builder { - private ApiRequestParams.EnumParam captureMethod; - private Map extraParams; private SetupFutureUsage setupFutureUsage; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodOptions.Mobilepay build() { - return new PaymentIntentConfirmParams.PaymentMethodOptions.Mobilepay( - this.captureMethod, this.extraParams, this.setupFutureUsage); - } - - /** - * 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 {@code capture_method} is already set on the PaymentIntent, providing an empty - * value for this parameter unsets the stored value for this payment method type. - */ - public Builder setCaptureMethod( - PaymentIntentConfirmParams.PaymentMethodOptions.Mobilepay.CaptureMethod captureMethod) { - this.captureMethod = captureMethod; - return this; - } - - /** - * 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 {@code capture_method} is already set on the PaymentIntent, providing an empty - * value for this parameter unsets the stored value for this payment method type. - */ - public Builder setCaptureMethod(EmptyParam captureMethod) { - this.captureMethod = captureMethod; - return this; + public PaymentIntentConfirmParams.PaymentMethodOptions.MbWay build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.MbWay( + this.extraParams, this.setupFutureUsage); } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Mobilepay#extraParams} - * for the field documentation. + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.MbWay#extraParams} for + * the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -16208,8 +16440,8 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Mobilepay#extraParams} - * for the field documentation. + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.MbWay#extraParams} for + * the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -16244,27 +16476,208 @@ public Builder putAllExtraParam(Map map) { * off_session}. */ public Builder setSetupFutureUsage( - PaymentIntentConfirmParams.PaymentMethodOptions.Mobilepay.SetupFutureUsage + PaymentIntentConfirmParams.PaymentMethodOptions.MbWay.SetupFutureUsage setupFutureUsage) { this.setupFutureUsage = setupFutureUsage; return this; } } - public enum CaptureMethod implements ApiRequestParams.EnumParam { - @SerializedName("manual") - MANUAL("manual"); + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"); @Getter(onMethod_ = {@Override}) private final String value; - CaptureMethod(String value) { + SetupFutureUsage(String value) { this.value = value; } } + } - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Mobilepay { + /** + * 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 {@code capture_method} is already set on the PaymentIntent, providing an empty value + * for this parameter unsets the stored value for this payment method type. + */ + @SerializedName("capture_method") + ApiRequestParams.EnumParam captureMethod; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

If you provide a Customer with the PaymentIntent, you can use this parameter to attach the payment method to the + * Customer after the PaymentIntent is confirmed and the customer completes any required + * actions. If you don't provide a Customer, you can still attach the payment method to a + * Customer after the transaction completes. + * + *

If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates + * and attaches a generated_card + * payment method representing the card to the Customer instead. + * + *

When processing card payments, Stripe uses {@code setup_future_usage} to help you comply + * with regional legislation and network rules, such as SCA. + * + *

If you've already set {@code setup_future_usage} and you're performing a request using a + * publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + @SerializedName("setup_future_usage") + SetupFutureUsage setupFutureUsage; + + private Mobilepay( + ApiRequestParams.EnumParam captureMethod, + Map extraParams, + SetupFutureUsage setupFutureUsage) { + this.captureMethod = captureMethod; + this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private ApiRequestParams.EnumParam captureMethod; + + private Map extraParams; + + private SetupFutureUsage setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Mobilepay build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Mobilepay( + this.captureMethod, this.extraParams, this.setupFutureUsage); + } + + /** + * 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 {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod( + PaymentIntentConfirmParams.PaymentMethodOptions.Mobilepay.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** + * 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 {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod(EmptyParam captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Mobilepay#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Mobilepay#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

If you provide a Customer with the PaymentIntent, you can use this parameter to attach the payment method to + * the Customer after the PaymentIntent is confirmed and the customer completes any required + * actions. If you don't provide a Customer, you can still attach the payment method to a + * Customer after the transaction completes. + * + *

If the payment method is {@code card_present} and isn't a digital wallet, Stripe + * creates and attaches a generated_card + * payment method representing the card to the Customer instead. + * + *

When processing card payments, Stripe uses {@code setup_future_usage} to help you + * comply with regional legislation and network rules, such as SCA. + * + *

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentConfirmParams.PaymentMethodOptions.Mobilepay.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") NONE("none"); @Getter(onMethod_ = {@Override}) @@ -17755,6 +18168,124 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Paypay { + /** + * 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 {@code capture_method} is already set on the PaymentIntent, providing an empty value + * for this parameter unsets the stored value for this payment method type. + */ + @SerializedName("capture_method") + ApiRequestParams.EnumParam captureMethod; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Paypay(ApiRequestParams.EnumParam captureMethod, Map extraParams) { + this.captureMethod = captureMethod; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private ApiRequestParams.EnumParam captureMethod; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Paypay build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Paypay( + this.captureMethod, this.extraParams); + } + + /** + * 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 {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod( + PaymentIntentConfirmParams.PaymentMethodOptions.Paypay.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** + * 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 {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod(EmptyParam captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Paypay#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Paypay#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Pix { @@ -20823,11 +21354,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -20930,13 +21461,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -20975,6 +21506,162 @@ public enum CaptureMethod implements ApiRequestParams.EnumParam { } } + public enum ExcludedPaymentMethodType implements ApiRequestParams.EnumParam { + @SerializedName("acss_debit") + ACSS_DEBIT("acss_debit"), + + @SerializedName("affirm") + AFFIRM("affirm"), + + @SerializedName("afterpay_clearpay") + AFTERPAY_CLEARPAY("afterpay_clearpay"), + + @SerializedName("alipay") + ALIPAY("alipay"), + + @SerializedName("alma") + ALMA("alma"), + + @SerializedName("amazon_pay") + AMAZON_PAY("amazon_pay"), + + @SerializedName("au_becs_debit") + AU_BECS_DEBIT("au_becs_debit"), + + @SerializedName("bacs_debit") + BACS_DEBIT("bacs_debit"), + + @SerializedName("bancontact") + BANCONTACT("bancontact"), + + @SerializedName("billie") + BILLIE("billie"), + + @SerializedName("blik") + BLIK("blik"), + + @SerializedName("boleto") + BOLETO("boleto"), + + @SerializedName("card") + CARD("card"), + + @SerializedName("cashapp") + CASHAPP("cashapp"), + + @SerializedName("crypto") + CRYPTO("crypto"), + + @SerializedName("customer_balance") + CUSTOMER_BALANCE("customer_balance"), + + @SerializedName("eps") + EPS("eps"), + + @SerializedName("fpx") + FPX("fpx"), + + @SerializedName("giropay") + GIROPAY("giropay"), + + @SerializedName("grabpay") + GRABPAY("grabpay"), + + @SerializedName("ideal") + IDEAL("ideal"), + + @SerializedName("kakao_pay") + KAKAO_PAY("kakao_pay"), + + @SerializedName("klarna") + KLARNA("klarna"), + + @SerializedName("konbini") + KONBINI("konbini"), + + @SerializedName("kr_card") + KR_CARD("kr_card"), + + @SerializedName("mb_way") + MB_WAY("mb_way"), + + @SerializedName("mobilepay") + MOBILEPAY("mobilepay"), + + @SerializedName("multibanco") + MULTIBANCO("multibanco"), + + @SerializedName("naver_pay") + NAVER_PAY("naver_pay"), + + @SerializedName("nz_bank_account") + NZ_BANK_ACCOUNT("nz_bank_account"), + + @SerializedName("oxxo") + OXXO("oxxo"), + + @SerializedName("p24") + P24("p24"), + + @SerializedName("pay_by_bank") + PAY_BY_BANK("pay_by_bank"), + + @SerializedName("payco") + PAYCO("payco"), + + @SerializedName("paynow") + PAYNOW("paynow"), + + @SerializedName("paypal") + PAYPAL("paypal"), + + @SerializedName("paypay") + PAYPAY("paypay"), + + @SerializedName("pix") + PIX("pix"), + + @SerializedName("promptpay") + PROMPTPAY("promptpay"), + + @SerializedName("revolut_pay") + REVOLUT_PAY("revolut_pay"), + + @SerializedName("samsung_pay") + SAMSUNG_PAY("samsung_pay"), + + @SerializedName("satispay") + SATISPAY("satispay"), + + @SerializedName("sepa_debit") + SEPA_DEBIT("sepa_debit"), + + @SerializedName("sofort") + SOFORT("sofort"), + + @SerializedName("swish") + SWISH("swish"), + + @SerializedName("twint") + TWINT("twint"), + + @SerializedName("us_bank_account") + US_BANK_ACCOUNT("us_bank_account"), + + @SerializedName("wechat_pay") + WECHAT_PAY("wechat_pay"), + + @SerializedName("zip") + ZIP("zip"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ExcludedPaymentMethodType(String value) { + this.value = value; + } + } + public enum OffSession implements ApiRequestParams.EnumParam { @SerializedName("one_off") ONE_OFF("one_off"), diff --git a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java index f8ef09a66c0..baf46c8ee93 100644 --- a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java @@ -1706,6 +1706,13 @@ public static class PaymentMethodData { @SerializedName("link") Link link; + /** + * If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment + * method. + */ + @SerializedName("mb_way") + MbWay mbWay; + /** * 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 @@ -1785,6 +1792,13 @@ public static class PaymentMethodData { @SerializedName("paypal") Paypal paypal; + /** + * If this is a {@code paypay} PaymentMethod, this hash contains details about the PayPay + * payment method. + */ + @SerializedName("paypay") + Paypay paypay; + /** * If this is a {@code pix} PaymentMethod, this hash contains details about the Pix payment * method. @@ -1913,6 +1927,7 @@ private PaymentMethodData( Konbini konbini, KrCard krCard, Link link, + MbWay mbWay, Map metadata, Mobilepay mobilepay, Multibanco multibanco, @@ -1924,6 +1939,7 @@ private PaymentMethodData( Payco payco, Paynow paynow, Paypal paypal, + Paypay paypay, Pix pix, Promptpay promptpay, RadarOptions radarOptions, @@ -1967,6 +1983,7 @@ private PaymentMethodData( this.konbini = konbini; this.krCard = krCard; this.link = link; + this.mbWay = mbWay; this.metadata = metadata; this.mobilepay = mobilepay; this.multibanco = multibanco; @@ -1978,6 +1995,7 @@ private PaymentMethodData( this.payco = payco; this.paynow = paynow; this.paypal = paypal; + this.paypay = paypay; this.pix = pix; this.promptpay = promptpay; this.radarOptions = radarOptions; @@ -2057,6 +2075,8 @@ public static class Builder { private Link link; + private MbWay mbWay; + private Map metadata; private Mobilepay mobilepay; @@ -2079,6 +2099,8 @@ public static class Builder { private Paypal paypal; + private Paypay paypay; + private Pix pix; private Promptpay promptpay; @@ -2139,6 +2161,7 @@ public PaymentIntentCreateParams.PaymentMethodData build() { this.konbini, this.krCard, this.link, + this.mbWay, this.metadata, this.mobilepay, this.multibanco, @@ -2150,6 +2173,7 @@ public PaymentIntentCreateParams.PaymentMethodData build() { this.payco, this.paynow, this.paypal, + this.paypay, this.pix, this.promptpay, this.radarOptions, @@ -2453,6 +2477,15 @@ public Builder setLink(PaymentIntentCreateParams.PaymentMethodData.Link link) { return this; } + /** + * If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment + * method. + */ + public Builder setMbWay(PaymentIntentCreateParams.PaymentMethodData.MbWay mbWay) { + this.mbWay = mbWay; + return this; + } + /** * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` * call, and subsequent calls add additional key/value pairs to the original map. See {@link @@ -2572,6 +2605,15 @@ public Builder setPaypal(PaymentIntentCreateParams.PaymentMethodData.Paypal payp return this; } + /** + * If this is a {@code paypay} PaymentMethod, this hash contains details about the PayPay + * payment method. + */ + public Builder setPaypay(PaymentIntentCreateParams.PaymentMethodData.Paypay paypay) { + this.paypay = paypay; + return this; + } + /** * If this is a {@code pix} PaymentMethod, this hash contains details about the Pix payment * method. @@ -3566,11 +3608,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -3675,13 +3717,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -5065,6 +5107,64 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MbWay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private MbWay(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodData.MbWay build() { + return new PaymentIntentCreateParams.PaymentMethodData.MbWay(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.MbWay#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.MbWay#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Mobilepay { @@ -5877,6 +5977,64 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Paypay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Paypay(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodData.Paypay build() { + return new PaymentIntentCreateParams.PaymentMethodData.Paypay(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Paypay#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Paypay#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Pix { @@ -6919,6 +7077,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("link") LINK("link"), + @SerializedName("mb_way") + MB_WAY("mb_way"), + @SerializedName("mobilepay") MOBILEPAY("mobilepay"), @@ -6949,6 +7110,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("paypay") + PAYPAY("paypay"), + @SerializedName("pix") PIX("pix"), @@ -7199,6 +7363,13 @@ public static class PaymentMethodOptions { @SerializedName("link") Object link; + /** + * If this is a {@code mb_way} PaymentMethod, this sub-hash contains details about the MB WAY + * payment method options. + */ + @SerializedName("mb_way") + Object mbWay; + /** * If this is a {@code MobilePay} PaymentMethod, this sub-hash contains details about the * MobilePay payment method options. @@ -7269,6 +7440,13 @@ public static class PaymentMethodOptions { @SerializedName("paypal") Object paypal; + /** + * If this is a {@code paypay} PaymentMethod, this sub-hash contains details about the PayPay + * payment method options. + */ + @SerializedName("paypay") + Object paypay; + /** * If this is a {@code pix} PaymentMethod, this sub-hash contains details about the Pix payment * method options. @@ -7383,6 +7561,7 @@ private PaymentMethodOptions( Object konbini, Object krCard, Object link, + Object mbWay, Object mobilepay, Object multibanco, Object naverPay, @@ -7393,6 +7572,7 @@ private PaymentMethodOptions( Object payco, Object paynow, Object paypal, + Object paypay, Object pix, Object promptpay, Object revolutPay, @@ -7434,6 +7614,7 @@ private PaymentMethodOptions( this.konbini = konbini; this.krCard = krCard; this.link = link; + this.mbWay = mbWay; this.mobilepay = mobilepay; this.multibanco = multibanco; this.naverPay = naverPay; @@ -7444,6 +7625,7 @@ private PaymentMethodOptions( this.payco = payco; this.paynow = paynow; this.paypal = paypal; + this.paypay = paypay; this.pix = pix; this.promptpay = promptpay; this.revolutPay = revolutPay; @@ -7521,6 +7703,8 @@ public static class Builder { private Object link; + private Object mbWay; + private Object mobilepay; private Object multibanco; @@ -7541,6 +7725,8 @@ public static class Builder { private Object paypal; + private Object paypay; + private Object pix; private Object promptpay; @@ -7597,6 +7783,7 @@ public PaymentIntentCreateParams.PaymentMethodOptions build() { this.konbini, this.krCard, this.link, + this.mbWay, this.mobilepay, this.multibanco, this.naverPay, @@ -7607,6 +7794,7 @@ public PaymentIntentCreateParams.PaymentMethodOptions build() { this.payco, this.paynow, this.paypal, + this.paypay, this.pix, this.promptpay, this.revolutPay, @@ -8155,6 +8343,24 @@ public Builder setLink(EmptyParam link) { return this; } + /** + * If this is a {@code mb_way} PaymentMethod, this sub-hash contains details about the MB WAY + * payment method options. + */ + public Builder setMbWay(PaymentIntentCreateParams.PaymentMethodOptions.MbWay mbWay) { + this.mbWay = mbWay; + return this; + } + + /** + * If this is a {@code mb_way} PaymentMethod, this sub-hash contains details about the MB WAY + * payment method options. + */ + public Builder setMbWay(EmptyParam mbWay) { + this.mbWay = mbWay; + return this; + } + /** * If this is a {@code MobilePay} PaymentMethod, this sub-hash contains details about the * MobilePay payment method options. @@ -8339,6 +8545,24 @@ public Builder setPaypal(EmptyParam paypal) { return this; } + /** + * If this is a {@code paypay} PaymentMethod, this sub-hash contains details about the PayPay + * payment method options. + */ + public Builder setPaypay(PaymentIntentCreateParams.PaymentMethodOptions.Paypay paypay) { + this.paypay = paypay; + return this; + } + + /** + * If this is a {@code paypay} PaymentMethod, this sub-hash contains details about the PayPay + * payment method options. + */ + public Builder setPaypay(EmptyParam paypay) { + this.paypay = paypay; + return this; + } + /** * If this is a {@code pix} PaymentMethod, this sub-hash contains details about the Pix * payment method options. @@ -16623,6 +16847,137 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MbWay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

If you provide a Customer with the PaymentIntent, you can use this parameter to attach the payment method to the + * Customer after the PaymentIntent is confirmed and the customer completes any required + * actions. If you don't provide a Customer, you can still attach the payment method to a + * Customer after the transaction completes. + * + *

If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates + * and attaches a generated_card + * payment method representing the card to the Customer instead. + * + *

When processing card payments, Stripe uses {@code setup_future_usage} to help you comply + * with regional legislation and network rules, such as SCA. + * + *

If you've already set {@code setup_future_usage} and you're performing a request using a + * publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + @SerializedName("setup_future_usage") + SetupFutureUsage setupFutureUsage; + + private MbWay(Map extraParams, SetupFutureUsage setupFutureUsage) { + this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private SetupFutureUsage setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.MbWay build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.MbWay( + this.extraParams, this.setupFutureUsage); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.MbWay#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.MbWay#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

If you provide a Customer with the PaymentIntent, you can use this parameter to attach the payment method to + * the Customer after the PaymentIntent is confirmed and the customer completes any required + * actions. If you don't provide a Customer, you can still attach the payment method to a + * Customer after the transaction completes. + * + *

If the payment method is {@code card_present} and isn't a digital wallet, Stripe + * creates and attaches a generated_card + * payment method representing the card to the Customer instead. + * + *

When processing card payments, Stripe uses {@code setup_future_usage} to help you + * comply with regional legislation and network rules, such as SCA. + * + *

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentCreateParams.PaymentMethodOptions.MbWay.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Mobilepay { @@ -18291,6 +18646,124 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Paypay { + /** + * 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 {@code capture_method} is already set on the PaymentIntent, providing an empty value + * for this parameter unsets the stored value for this payment method type. + */ + @SerializedName("capture_method") + ApiRequestParams.EnumParam captureMethod; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Paypay(ApiRequestParams.EnumParam captureMethod, Map extraParams) { + this.captureMethod = captureMethod; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private ApiRequestParams.EnumParam captureMethod; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Paypay build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Paypay( + this.captureMethod, this.extraParams); + } + + /** + * 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 {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod( + PaymentIntentCreateParams.PaymentMethodOptions.Paypay.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** + * 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 {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod(EmptyParam captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Paypay#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Paypay#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Pix { @@ -21354,11 +21827,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -21461,13 +21934,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -21706,6 +22179,9 @@ public enum ExcludedPaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("kr_card") KR_CARD("kr_card"), + @SerializedName("mb_way") + MB_WAY("mb_way"), + @SerializedName("mobilepay") MOBILEPAY("mobilepay"), @@ -21736,6 +22212,9 @@ public enum ExcludedPaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("paypay") + PAYPAY("paypay"), + @SerializedName("pix") PIX("pix"), diff --git a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java index fddc49d028e..7e3478dbda6 100644 --- a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java @@ -68,6 +68,10 @@ public class PaymentIntentUpdateParams extends ApiRequestParams { @SerializedName("description") Object description; + /** The list of payment method types to exclude from use with this payment. */ + @SerializedName("excluded_payment_method_types") + Object excludedPaymentMethodTypes; + /** Specifies which fields in the response should be expanded. */ @SerializedName("expand") List expand; @@ -212,6 +216,7 @@ private PaymentIntentUpdateParams( Object currency, Object customer, Object description, + Object excludedPaymentMethodTypes, List expand, Map extraParams, Object metadata, @@ -233,6 +238,7 @@ private PaymentIntentUpdateParams( this.currency = currency; this.customer = customer; this.description = description; + this.excludedPaymentMethodTypes = excludedPaymentMethodTypes; this.expand = expand; this.extraParams = extraParams; this.metadata = metadata; @@ -267,6 +273,8 @@ public static class Builder { private Object description; + private Object excludedPaymentMethodTypes; + private List expand; private Map extraParams; @@ -306,6 +314,7 @@ public PaymentIntentUpdateParams build() { this.currency, this.customer, this.description, + this.excludedPaymentMethodTypes, this.expand, this.extraParams, this.metadata, @@ -437,6 +446,55 @@ public Builder setDescription(EmptyParam description) { return this; } + /** + * Add an element to `excludedPaymentMethodTypes` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link PaymentIntentUpdateParams#excludedPaymentMethodTypes} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addExcludedPaymentMethodType( + PaymentIntentUpdateParams.ExcludedPaymentMethodType element) { + if (this.excludedPaymentMethodTypes == null + || this.excludedPaymentMethodTypes instanceof EmptyParam) { + this.excludedPaymentMethodTypes = + new ArrayList(); + } + ((List) this.excludedPaymentMethodTypes) + .add(element); + return this; + } + + /** + * Add all elements to `excludedPaymentMethodTypes` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link PaymentIntentUpdateParams#excludedPaymentMethodTypes} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllExcludedPaymentMethodType( + List elements) { + if (this.excludedPaymentMethodTypes == null + || this.excludedPaymentMethodTypes instanceof EmptyParam) { + this.excludedPaymentMethodTypes = + new ArrayList(); + } + ((List) this.excludedPaymentMethodTypes) + .addAll(elements); + return this; + } + + /** The list of payment method types to exclude from use with this payment. */ + public Builder setExcludedPaymentMethodTypes(EmptyParam excludedPaymentMethodTypes) { + this.excludedPaymentMethodTypes = excludedPaymentMethodTypes; + return this; + } + + /** The list of payment method types to exclude from use with this payment. */ + public Builder setExcludedPaymentMethodTypes( + List excludedPaymentMethodTypes) { + this.excludedPaymentMethodTypes = excludedPaymentMethodTypes; + return this; + } + /** * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and * subsequent calls adds additional elements to the original list. See {@link @@ -1009,6 +1067,13 @@ public static class PaymentMethodData { @SerializedName("link") Link link; + /** + * If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment + * method. + */ + @SerializedName("mb_way") + MbWay mbWay; + /** * 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 @@ -1088,6 +1153,13 @@ public static class PaymentMethodData { @SerializedName("paypal") Paypal paypal; + /** + * If this is a {@code paypay} PaymentMethod, this hash contains details about the PayPay + * payment method. + */ + @SerializedName("paypay") + Paypay paypay; + /** * If this is a {@code pix} PaymentMethod, this hash contains details about the Pix payment * method. @@ -1216,6 +1288,7 @@ private PaymentMethodData( Konbini konbini, KrCard krCard, Link link, + MbWay mbWay, Map metadata, Mobilepay mobilepay, Multibanco multibanco, @@ -1227,6 +1300,7 @@ private PaymentMethodData( Payco payco, Paynow paynow, Paypal paypal, + Paypay paypay, Pix pix, Promptpay promptpay, RadarOptions radarOptions, @@ -1270,6 +1344,7 @@ private PaymentMethodData( this.konbini = konbini; this.krCard = krCard; this.link = link; + this.mbWay = mbWay; this.metadata = metadata; this.mobilepay = mobilepay; this.multibanco = multibanco; @@ -1281,6 +1356,7 @@ private PaymentMethodData( this.payco = payco; this.paynow = paynow; this.paypal = paypal; + this.paypay = paypay; this.pix = pix; this.promptpay = promptpay; this.radarOptions = radarOptions; @@ -1360,6 +1436,8 @@ public static class Builder { private Link link; + private MbWay mbWay; + private Map metadata; private Mobilepay mobilepay; @@ -1382,6 +1460,8 @@ public static class Builder { private Paypal paypal; + private Paypay paypay; + private Pix pix; private Promptpay promptpay; @@ -1442,6 +1522,7 @@ public PaymentIntentUpdateParams.PaymentMethodData build() { this.konbini, this.krCard, this.link, + this.mbWay, this.metadata, this.mobilepay, this.multibanco, @@ -1453,6 +1534,7 @@ public PaymentIntentUpdateParams.PaymentMethodData build() { this.payco, this.paynow, this.paypal, + this.paypay, this.pix, this.promptpay, this.radarOptions, @@ -1756,6 +1838,15 @@ public Builder setLink(PaymentIntentUpdateParams.PaymentMethodData.Link link) { return this; } + /** + * If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment + * method. + */ + public Builder setMbWay(PaymentIntentUpdateParams.PaymentMethodData.MbWay mbWay) { + this.mbWay = mbWay; + return this; + } + /** * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` * call, and subsequent calls add additional key/value pairs to the original map. See {@link @@ -1875,6 +1966,15 @@ public Builder setPaypal(PaymentIntentUpdateParams.PaymentMethodData.Paypal payp return this; } + /** + * If this is a {@code paypay} PaymentMethod, this hash contains details about the PayPay + * payment method. + */ + public Builder setPaypay(PaymentIntentUpdateParams.PaymentMethodData.Paypay paypay) { + this.paypay = paypay; + return this; + } + /** * If this is a {@code pix} PaymentMethod, this hash contains details about the Pix payment * method. @@ -2920,11 +3020,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -3044,25 +3144,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -4467,6 +4567,64 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MbWay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private MbWay(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodData.MbWay build() { + return new PaymentIntentUpdateParams.PaymentMethodData.MbWay(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.MbWay#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.MbWay#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Mobilepay { @@ -5317,6 +5475,64 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Paypay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Paypay(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodData.Paypay build() { + return new PaymentIntentUpdateParams.PaymentMethodData.Paypay(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Paypay#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Paypay#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Pix { @@ -6393,6 +6609,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("link") LINK("link"), + @SerializedName("mb_way") + MB_WAY("mb_way"), + @SerializedName("mobilepay") MOBILEPAY("mobilepay"), @@ -6423,6 +6642,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("paypay") + PAYPAY("paypay"), + @SerializedName("pix") PIX("pix"), @@ -6673,6 +6895,13 @@ public static class PaymentMethodOptions { @SerializedName("link") Object link; + /** + * If this is a {@code mb_way} PaymentMethod, this sub-hash contains details about the MB WAY + * payment method options. + */ + @SerializedName("mb_way") + Object mbWay; + /** * If this is a {@code MobilePay} PaymentMethod, this sub-hash contains details about the * MobilePay payment method options. @@ -6743,6 +6972,13 @@ public static class PaymentMethodOptions { @SerializedName("paypal") Object paypal; + /** + * If this is a {@code paypay} PaymentMethod, this sub-hash contains details about the PayPay + * payment method options. + */ + @SerializedName("paypay") + Object paypay; + /** * If this is a {@code pix} PaymentMethod, this sub-hash contains details about the Pix payment * method options. @@ -6857,6 +7093,7 @@ private PaymentMethodOptions( Object konbini, Object krCard, Object link, + Object mbWay, Object mobilepay, Object multibanco, Object naverPay, @@ -6867,6 +7104,7 @@ private PaymentMethodOptions( Object payco, Object paynow, Object paypal, + Object paypay, Object pix, Object promptpay, Object revolutPay, @@ -6908,6 +7146,7 @@ private PaymentMethodOptions( this.konbini = konbini; this.krCard = krCard; this.link = link; + this.mbWay = mbWay; this.mobilepay = mobilepay; this.multibanco = multibanco; this.naverPay = naverPay; @@ -6918,6 +7157,7 @@ private PaymentMethodOptions( this.payco = payco; this.paynow = paynow; this.paypal = paypal; + this.paypay = paypay; this.pix = pix; this.promptpay = promptpay; this.revolutPay = revolutPay; @@ -6995,6 +7235,8 @@ public static class Builder { private Object link; + private Object mbWay; + private Object mobilepay; private Object multibanco; @@ -7015,6 +7257,8 @@ public static class Builder { private Object paypal; + private Object paypay; + private Object pix; private Object promptpay; @@ -7071,6 +7315,7 @@ public PaymentIntentUpdateParams.PaymentMethodOptions build() { this.konbini, this.krCard, this.link, + this.mbWay, this.mobilepay, this.multibanco, this.naverPay, @@ -7081,6 +7326,7 @@ public PaymentIntentUpdateParams.PaymentMethodOptions build() { this.payco, this.paynow, this.paypal, + this.paypay, this.pix, this.promptpay, this.revolutPay, @@ -7629,6 +7875,24 @@ public Builder setLink(EmptyParam link) { return this; } + /** + * If this is a {@code mb_way} PaymentMethod, this sub-hash contains details about the MB WAY + * payment method options. + */ + public Builder setMbWay(PaymentIntentUpdateParams.PaymentMethodOptions.MbWay mbWay) { + this.mbWay = mbWay; + return this; + } + + /** + * If this is a {@code mb_way} PaymentMethod, this sub-hash contains details about the MB WAY + * payment method options. + */ + public Builder setMbWay(EmptyParam mbWay) { + this.mbWay = mbWay; + return this; + } + /** * If this is a {@code MobilePay} PaymentMethod, this sub-hash contains details about the * MobilePay payment method options. @@ -7813,6 +8077,24 @@ public Builder setPaypal(EmptyParam paypal) { return this; } + /** + * If this is a {@code paypay} PaymentMethod, this sub-hash contains details about the PayPay + * payment method options. + */ + public Builder setPaypay(PaymentIntentUpdateParams.PaymentMethodOptions.Paypay paypay) { + this.paypay = paypay; + return this; + } + + /** + * If this is a {@code paypay} PaymentMethod, this sub-hash contains details about the PayPay + * payment method options. + */ + public Builder setPaypay(EmptyParam paypay) { + this.paypay = paypay; + return this; + } + /** * If this is a {@code pix} PaymentMethod, this sub-hash contains details about the Pix * payment method options. @@ -16270,20 +16552,7 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) - public static class Mobilepay { - /** - * 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 {@code capture_method} is already set on the PaymentIntent, providing an empty value - * for this parameter unsets the stored value for this payment method type. - */ - @SerializedName("capture_method") - ApiRequestParams.EnumParam captureMethod; - + public static class MbWay { /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -16319,11 +16588,7 @@ public static class Mobilepay { @SerializedName("setup_future_usage") SetupFutureUsage setupFutureUsage; - private Mobilepay( - ApiRequestParams.EnumParam captureMethod, - Map extraParams, - SetupFutureUsage setupFutureUsage) { - this.captureMethod = captureMethod; + private MbWay(Map extraParams, SetupFutureUsage setupFutureUsage) { this.extraParams = extraParams; this.setupFutureUsage = setupFutureUsage; } @@ -16333,54 +16598,21 @@ public static Builder builder() { } public static class Builder { - private ApiRequestParams.EnumParam captureMethod; - private Map extraParams; private SetupFutureUsage setupFutureUsage; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.Mobilepay build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.Mobilepay( - this.captureMethod, this.extraParams, this.setupFutureUsage); - } - - /** - * 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 {@code capture_method} is already set on the PaymentIntent, providing an empty - * value for this parameter unsets the stored value for this payment method type. - */ - public Builder setCaptureMethod( - PaymentIntentUpdateParams.PaymentMethodOptions.Mobilepay.CaptureMethod captureMethod) { - this.captureMethod = captureMethod; - return this; - } - - /** - * 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 {@code capture_method} is already set on the PaymentIntent, providing an empty - * value for this parameter unsets the stored value for this payment method type. - */ - public Builder setCaptureMethod(EmptyParam captureMethod) { - this.captureMethod = captureMethod; - return this; + public PaymentIntentUpdateParams.PaymentMethodOptions.MbWay build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.MbWay( + this.extraParams, this.setupFutureUsage); } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Mobilepay#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.MbWay#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -16393,8 +16625,8 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Mobilepay#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.MbWay#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -16429,21 +16661,202 @@ public Builder putAllExtraParam(Map map) { * off_session}. */ public Builder setSetupFutureUsage( - PaymentIntentUpdateParams.PaymentMethodOptions.Mobilepay.SetupFutureUsage + PaymentIntentUpdateParams.PaymentMethodOptions.MbWay.SetupFutureUsage setupFutureUsage) { this.setupFutureUsage = setupFutureUsage; return this; } } - public enum CaptureMethod implements ApiRequestParams.EnumParam { - @SerializedName("manual") - MANUAL("manual"); + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"); @Getter(onMethod_ = {@Override}) private final String value; - CaptureMethod(String value) { + SetupFutureUsage(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Mobilepay { + /** + * 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 {@code capture_method} is already set on the PaymentIntent, providing an empty value + * for this parameter unsets the stored value for this payment method type. + */ + @SerializedName("capture_method") + ApiRequestParams.EnumParam captureMethod; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

If you provide a Customer with the PaymentIntent, you can use this parameter to attach the payment method to the + * Customer after the PaymentIntent is confirmed and the customer completes any required + * actions. If you don't provide a Customer, you can still attach the payment method to a + * Customer after the transaction completes. + * + *

If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates + * and attaches a generated_card + * payment method representing the card to the Customer instead. + * + *

When processing card payments, Stripe uses {@code setup_future_usage} to help you comply + * with regional legislation and network rules, such as SCA. + * + *

If you've already set {@code setup_future_usage} and you're performing a request using a + * publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + @SerializedName("setup_future_usage") + SetupFutureUsage setupFutureUsage; + + private Mobilepay( + ApiRequestParams.EnumParam captureMethod, + Map extraParams, + SetupFutureUsage setupFutureUsage) { + this.captureMethod = captureMethod; + this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private ApiRequestParams.EnumParam captureMethod; + + private Map extraParams; + + private SetupFutureUsage setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.Mobilepay build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Mobilepay( + this.captureMethod, this.extraParams, this.setupFutureUsage); + } + + /** + * 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 {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod( + PaymentIntentUpdateParams.PaymentMethodOptions.Mobilepay.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** + * 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 {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod(EmptyParam captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Mobilepay#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Mobilepay#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

If you provide a Customer with the PaymentIntent, you can use this parameter to attach the payment method to + * the Customer after the PaymentIntent is confirmed and the customer completes any required + * actions. If you don't provide a Customer, you can still attach the payment method to a + * Customer after the transaction completes. + * + *

If the payment method is {@code card_present} and isn't a digital wallet, Stripe + * creates and attaches a generated_card + * payment method representing the card to the Customer instead. + * + *

When processing card payments, Stripe uses {@code setup_future_usage} to help you + * comply with regional legislation and network rules, such as SCA. + * + *

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentUpdateParams.PaymentMethodOptions.Mobilepay.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { this.value = value; } } @@ -17964,6 +18377,124 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Paypay { + /** + * 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 {@code capture_method} is already set on the PaymentIntent, providing an empty value + * for this parameter unsets the stored value for this payment method type. + */ + @SerializedName("capture_method") + ApiRequestParams.EnumParam captureMethod; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Paypay(ApiRequestParams.EnumParam captureMethod, Map extraParams) { + this.captureMethod = captureMethod; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private ApiRequestParams.EnumParam captureMethod; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.Paypay build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Paypay( + this.captureMethod, this.extraParams); + } + + /** + * 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 {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod( + PaymentIntentUpdateParams.PaymentMethodOptions.Paypay.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** + * 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 {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod(EmptyParam captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Paypay#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Paypay#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Pix { @@ -21012,11 +21543,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -21134,25 +21665,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -21272,6 +21803,162 @@ public enum CaptureMethod implements ApiRequestParams.EnumParam { } } + public enum ExcludedPaymentMethodType implements ApiRequestParams.EnumParam { + @SerializedName("acss_debit") + ACSS_DEBIT("acss_debit"), + + @SerializedName("affirm") + AFFIRM("affirm"), + + @SerializedName("afterpay_clearpay") + AFTERPAY_CLEARPAY("afterpay_clearpay"), + + @SerializedName("alipay") + ALIPAY("alipay"), + + @SerializedName("alma") + ALMA("alma"), + + @SerializedName("amazon_pay") + AMAZON_PAY("amazon_pay"), + + @SerializedName("au_becs_debit") + AU_BECS_DEBIT("au_becs_debit"), + + @SerializedName("bacs_debit") + BACS_DEBIT("bacs_debit"), + + @SerializedName("bancontact") + BANCONTACT("bancontact"), + + @SerializedName("billie") + BILLIE("billie"), + + @SerializedName("blik") + BLIK("blik"), + + @SerializedName("boleto") + BOLETO("boleto"), + + @SerializedName("card") + CARD("card"), + + @SerializedName("cashapp") + CASHAPP("cashapp"), + + @SerializedName("crypto") + CRYPTO("crypto"), + + @SerializedName("customer_balance") + CUSTOMER_BALANCE("customer_balance"), + + @SerializedName("eps") + EPS("eps"), + + @SerializedName("fpx") + FPX("fpx"), + + @SerializedName("giropay") + GIROPAY("giropay"), + + @SerializedName("grabpay") + GRABPAY("grabpay"), + + @SerializedName("ideal") + IDEAL("ideal"), + + @SerializedName("kakao_pay") + KAKAO_PAY("kakao_pay"), + + @SerializedName("klarna") + KLARNA("klarna"), + + @SerializedName("konbini") + KONBINI("konbini"), + + @SerializedName("kr_card") + KR_CARD("kr_card"), + + @SerializedName("mb_way") + MB_WAY("mb_way"), + + @SerializedName("mobilepay") + MOBILEPAY("mobilepay"), + + @SerializedName("multibanco") + MULTIBANCO("multibanco"), + + @SerializedName("naver_pay") + NAVER_PAY("naver_pay"), + + @SerializedName("nz_bank_account") + NZ_BANK_ACCOUNT("nz_bank_account"), + + @SerializedName("oxxo") + OXXO("oxxo"), + + @SerializedName("p24") + P24("p24"), + + @SerializedName("pay_by_bank") + PAY_BY_BANK("pay_by_bank"), + + @SerializedName("payco") + PAYCO("payco"), + + @SerializedName("paynow") + PAYNOW("paynow"), + + @SerializedName("paypal") + PAYPAL("paypal"), + + @SerializedName("paypay") + PAYPAY("paypay"), + + @SerializedName("pix") + PIX("pix"), + + @SerializedName("promptpay") + PROMPTPAY("promptpay"), + + @SerializedName("revolut_pay") + REVOLUT_PAY("revolut_pay"), + + @SerializedName("samsung_pay") + SAMSUNG_PAY("samsung_pay"), + + @SerializedName("satispay") + SATISPAY("satispay"), + + @SerializedName("sepa_debit") + SEPA_DEBIT("sepa_debit"), + + @SerializedName("sofort") + SOFORT("sofort"), + + @SerializedName("swish") + SWISH("swish"), + + @SerializedName("twint") + TWINT("twint"), + + @SerializedName("us_bank_account") + US_BANK_ACCOUNT("us_bank_account"), + + @SerializedName("wechat_pay") + WECHAT_PAY("wechat_pay"), + + @SerializedName("zip") + ZIP("zip"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ExcludedPaymentMethodType(String value) { + this.value = value; + } + } + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @SerializedName("off_session") OFF_SESSION("off_session"), diff --git a/src/main/java/com/stripe/param/PaymentLinkCreateParams.java b/src/main/java/com/stripe/param/PaymentLinkCreateParams.java index 6df7f9ff706..ddb02080037 100644 --- a/src/main/java/com/stripe/param/PaymentLinkCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentLinkCreateParams.java @@ -3922,19 +3922,28 @@ public static class ProductData { @SerializedName("tax_code") String taxCode; + /** + * A label that represents units of this product. When set, this will be included in + * customers' receipts, invoices, Checkout, and the customer portal. + */ + @SerializedName("unit_label") + String unitLabel; + private ProductData( String description, Map extraParams, List images, Map metadata, String name, - String taxCode) { + String taxCode, + String unitLabel) { this.description = description; this.extraParams = extraParams; this.images = images; this.metadata = metadata; this.name = name; this.taxCode = taxCode; + this.unitLabel = unitLabel; } public static Builder builder() { @@ -3954,6 +3963,8 @@ public static class Builder { private String taxCode; + private String unitLabel; + /** Finalize and obtain parameter instance from this builder. */ public PaymentLinkCreateParams.LineItem.PriceData.ProductData build() { return new PaymentLinkCreateParams.LineItem.PriceData.ProductData( @@ -3962,7 +3973,8 @@ public PaymentLinkCreateParams.LineItem.PriceData.ProductData build() { this.images, this.metadata, this.name, - this.taxCode); + this.taxCode, + this.unitLabel); } /** @@ -4072,6 +4084,15 @@ public Builder setTaxCode(String taxCode) { this.taxCode = taxCode; return this; } + + /** + * A label that represents units of this product. When set, this will be included in + * customers' receipts, invoices, Checkout, and the customer portal. + */ + public Builder setUnitLabel(String unitLabel) { + this.unitLabel = unitLabel; + return this; + } } } @@ -6742,6 +6763,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("paypay") + PAYPAY("paypay"), + @SerializedName("pix") PIX("pix"), diff --git a/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java b/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java index 62934fddc16..1c847e15d71 100644 --- a/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java @@ -5502,6 +5502,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("paypay") + PAYPAY("paypay"), + @SerializedName("pix") PIX("pix"), diff --git a/src/main/java/com/stripe/param/PaymentMethodConfigurationCreateParams.java b/src/main/java/com/stripe/param/PaymentMethodConfigurationCreateParams.java index 9e1bbde5a7f..2ff4ccf9657 100644 --- a/src/main/java/com/stripe/param/PaymentMethodConfigurationCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodConfigurationCreateParams.java @@ -200,6 +200,15 @@ public class PaymentMethodConfigurationCreateParams extends ApiRequestParams { @SerializedName("fpx") Fpx fpx; + /** + * Meal vouchers in France, or “titres-restaurant”, is a local benefits program commonly offered + * by employers for their employees to purchase prepared food and beverages on working days. Check + * this page for more + * details. + */ + @SerializedName("fr_meal_voucher_conecs") + FrMealVoucherConecs frMealVoucherConecs; + /** * giropay is a German payment method based on online banking, introduced in 2006. It allows * customers to complete transactions online using their online banking environment, with funds @@ -374,6 +383,10 @@ public class PaymentMethodConfigurationCreateParams extends ApiRequestParams { @SerializedName("paypal") Paypal paypal; + /** Customers can pay with PayPay online or using the PayPay app. */ + @SerializedName("paypay") + Paypay paypay; + /** * Pix is a payment method popular in Brazil. When paying with Pix, customers authenticate and * approve payments by scanning a QR code in their preferred banking app. Check this expand, Map extraParams, Fpx fpx, + FrMealVoucherConecs frMealVoucherConecs, Giropay giropay, GooglePay googlePay, Grabpay grabpay, @@ -525,6 +539,7 @@ private PaymentMethodConfigurationCreateParams( Payco payco, Paynow paynow, Paypal paypal, + Paypay paypay, Pix pix, Promptpay promptpay, RevolutPay revolutPay, @@ -559,6 +574,7 @@ private PaymentMethodConfigurationCreateParams( this.expand = expand; this.extraParams = extraParams; this.fpx = fpx; + this.frMealVoucherConecs = frMealVoucherConecs; this.giropay = giropay; this.googlePay = googlePay; this.grabpay = grabpay; @@ -581,6 +597,7 @@ private PaymentMethodConfigurationCreateParams( this.payco = payco; this.paynow = paynow; this.paypal = paypal; + this.paypay = paypay; this.pix = pix; this.promptpay = promptpay; this.revolutPay = revolutPay; @@ -644,6 +661,8 @@ public static class Builder { private Fpx fpx; + private FrMealVoucherConecs frMealVoucherConecs; + private Giropay giropay; private GooglePay googlePay; @@ -688,6 +707,8 @@ public static class Builder { private Paypal paypal; + private Paypay paypay; + private Pix pix; private Promptpay promptpay; @@ -737,6 +758,7 @@ public PaymentMethodConfigurationCreateParams build() { this.expand, this.extraParams, this.fpx, + this.frMealVoucherConecs, this.giropay, this.googlePay, this.grabpay, @@ -759,6 +781,7 @@ public PaymentMethodConfigurationCreateParams build() { this.payco, this.paynow, this.paypal, + this.paypay, this.pix, this.promptpay, this.revolutPay, @@ -1043,6 +1066,18 @@ public Builder setFpx(PaymentMethodConfigurationCreateParams.Fpx fpx) { return this; } + /** + * Meal vouchers in France, or “titres-restaurant”, is a local benefits program commonly offered + * by employers for their employees to purchase prepared food and beverages on working days. + * Check this page for + * more details. + */ + public Builder setFrMealVoucherConecs( + PaymentMethodConfigurationCreateParams.FrMealVoucherConecs frMealVoucherConecs) { + this.frMealVoucherConecs = frMealVoucherConecs; + return this; + } + /** * giropay is a German payment method based on online banking, introduced in 2006. It allows * customers to complete transactions online using their online banking environment, with funds @@ -1264,6 +1299,12 @@ public Builder setPaypal(PaymentMethodConfigurationCreateParams.Paypal paypal) { return this; } + /** Customers can pay with PayPay online or using the PayPay app. */ + public Builder setPaypay(PaymentMethodConfigurationCreateParams.Paypay paypay) { + this.paypay = paypay; + return this; + } + /** * Pix is a payment method popular in Brazil. When paying with Pix, customers authenticate and * approve payments by scanning a QR code in their preferred banking app. Check this extraParams; + + private FrMealVoucherConecs( + DisplayPreference displayPreference, Map extraParams) { + this.displayPreference = displayPreference; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private DisplayPreference displayPreference; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentMethodConfigurationCreateParams.FrMealVoucherConecs build() { + return new PaymentMethodConfigurationCreateParams.FrMealVoucherConecs( + this.displayPreference, this.extraParams); + } + + /** Whether or not the payment method should be displayed. */ + public Builder setDisplayPreference( + PaymentMethodConfigurationCreateParams.FrMealVoucherConecs.DisplayPreference + displayPreference) { + this.displayPreference = displayPreference; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentMethodConfigurationCreateParams.FrMealVoucherConecs#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentMethodConfigurationCreateParams.FrMealVoucherConecs#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class DisplayPreference { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The account's preference for whether or not to display this payment method. */ + @SerializedName("preference") + Preference preference; + + private DisplayPreference(Map extraParams, Preference preference) { + this.extraParams = extraParams; + this.preference = preference; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Preference preference; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentMethodConfigurationCreateParams.FrMealVoucherConecs.DisplayPreference + build() { + return new PaymentMethodConfigurationCreateParams.FrMealVoucherConecs.DisplayPreference( + this.extraParams, this.preference); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentMethodConfigurationCreateParams.FrMealVoucherConecs.DisplayPreference#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentMethodConfigurationCreateParams.FrMealVoucherConecs.DisplayPreference#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The account's preference for whether or not to display this payment method. */ + public Builder setPreference( + PaymentMethodConfigurationCreateParams.FrMealVoucherConecs.DisplayPreference.Preference + preference) { + this.preference = preference; + return this; + } + } + + public enum Preference implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), + + @SerializedName("off") + OFF("off"), + + @SerializedName("on") + ON("on"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Preference(String value) { + this.value = value; + } + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Giropay { @@ -8022,6 +8233,171 @@ public enum Preference implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Paypay { + /** Whether or not the payment method should be displayed. */ + @SerializedName("display_preference") + DisplayPreference displayPreference; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Paypay(DisplayPreference displayPreference, Map extraParams) { + this.displayPreference = displayPreference; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private DisplayPreference displayPreference; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentMethodConfigurationCreateParams.Paypay build() { + return new PaymentMethodConfigurationCreateParams.Paypay( + this.displayPreference, this.extraParams); + } + + /** Whether or not the payment method should be displayed. */ + public Builder setDisplayPreference( + PaymentMethodConfigurationCreateParams.Paypay.DisplayPreference displayPreference) { + this.displayPreference = displayPreference; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentMethodConfigurationCreateParams.Paypay#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentMethodConfigurationCreateParams.Paypay#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class DisplayPreference { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The account's preference for whether or not to display this payment method. */ + @SerializedName("preference") + Preference preference; + + private DisplayPreference(Map extraParams, Preference preference) { + this.extraParams = extraParams; + this.preference = preference; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Preference preference; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentMethodConfigurationCreateParams.Paypay.DisplayPreference build() { + return new PaymentMethodConfigurationCreateParams.Paypay.DisplayPreference( + this.extraParams, this.preference); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentMethodConfigurationCreateParams.Paypay.DisplayPreference#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentMethodConfigurationCreateParams.Paypay.DisplayPreference#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The account's preference for whether or not to display this payment method. */ + public Builder setPreference( + PaymentMethodConfigurationCreateParams.Paypay.DisplayPreference.Preference preference) { + this.preference = preference; + return this; + } + } + + public enum Preference implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), + + @SerializedName("off") + OFF("off"), + + @SerializedName("on") + ON("on"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Preference(String value) { + this.value = value; + } + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Pix { diff --git a/src/main/java/com/stripe/param/PaymentMethodConfigurationUpdateParams.java b/src/main/java/com/stripe/param/PaymentMethodConfigurationUpdateParams.java index e64f525d836..b72b5ec81c5 100644 --- a/src/main/java/com/stripe/param/PaymentMethodConfigurationUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodConfigurationUpdateParams.java @@ -205,6 +205,15 @@ public class PaymentMethodConfigurationUpdateParams extends ApiRequestParams { @SerializedName("fpx") Fpx fpx; + /** + * Meal vouchers in France, or “titres-restaurant”, is a local benefits program commonly offered + * by employers for their employees to purchase prepared food and beverages on working days. Check + * this page for more + * details. + */ + @SerializedName("fr_meal_voucher_conecs") + FrMealVoucherConecs frMealVoucherConecs; + /** * giropay is a German payment method based on online banking, introduced in 2006. It allows * customers to complete transactions online using their online banking environment, with funds @@ -375,6 +384,10 @@ public class PaymentMethodConfigurationUpdateParams extends ApiRequestParams { @SerializedName("paypal") Paypal paypal; + /** Customers can pay with PayPay online or using the PayPay app. */ + @SerializedName("paypay") + Paypay paypay; + /** * Pix is a payment method popular in Brazil. When paying with Pix, customers authenticate and * approve payments by scanning a QR code in their preferred banking app. Check this expand, Map extraParams, Fpx fpx, + FrMealVoucherConecs frMealVoucherConecs, Giropay giropay, GooglePay googlePay, Grabpay grabpay, @@ -526,6 +540,7 @@ private PaymentMethodConfigurationUpdateParams( Payco payco, Paynow paynow, Paypal paypal, + Paypay paypay, Pix pix, Promptpay promptpay, RevolutPay revolutPay, @@ -561,6 +576,7 @@ private PaymentMethodConfigurationUpdateParams( this.expand = expand; this.extraParams = extraParams; this.fpx = fpx; + this.frMealVoucherConecs = frMealVoucherConecs; this.giropay = giropay; this.googlePay = googlePay; this.grabpay = grabpay; @@ -582,6 +598,7 @@ private PaymentMethodConfigurationUpdateParams( this.payco = payco; this.paynow = paynow; this.paypal = paypal; + this.paypay = paypay; this.pix = pix; this.promptpay = promptpay; this.revolutPay = revolutPay; @@ -647,6 +664,8 @@ public static class Builder { private Fpx fpx; + private FrMealVoucherConecs frMealVoucherConecs; + private Giropay giropay; private GooglePay googlePay; @@ -689,6 +708,8 @@ public static class Builder { private Paypal paypal; + private Paypay paypay; + private Pix pix; private Promptpay promptpay; @@ -739,6 +760,7 @@ public PaymentMethodConfigurationUpdateParams build() { this.expand, this.extraParams, this.fpx, + this.frMealVoucherConecs, this.giropay, this.googlePay, this.grabpay, @@ -760,6 +782,7 @@ public PaymentMethodConfigurationUpdateParams build() { this.payco, this.paynow, this.paypal, + this.paypay, this.pix, this.promptpay, this.revolutPay, @@ -1050,6 +1073,18 @@ public Builder setFpx(PaymentMethodConfigurationUpdateParams.Fpx fpx) { return this; } + /** + * Meal vouchers in France, or “titres-restaurant”, is a local benefits program commonly offered + * by employers for their employees to purchase prepared food and beverages on working days. + * Check this page for + * more details. + */ + public Builder setFrMealVoucherConecs( + PaymentMethodConfigurationUpdateParams.FrMealVoucherConecs frMealVoucherConecs) { + this.frMealVoucherConecs = frMealVoucherConecs; + return this; + } + /** * giropay is a German payment method based on online banking, introduced in 2006. It allows * customers to complete transactions online using their online banking environment, with funds @@ -1271,6 +1306,12 @@ public Builder setPaypal(PaymentMethodConfigurationUpdateParams.Paypal paypal) { return this; } + /** Customers can pay with PayPay online or using the PayPay app. */ + public Builder setPaypay(PaymentMethodConfigurationUpdateParams.Paypay paypay) { + this.paypay = paypay; + return this; + } + /** * Pix is a payment method popular in Brazil. When paying with Pix, customers authenticate and * approve payments by scanning a QR code in their preferred banking app. Check this extraParams; + + private FrMealVoucherConecs( + DisplayPreference displayPreference, Map extraParams) { + this.displayPreference = displayPreference; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private DisplayPreference displayPreference; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentMethodConfigurationUpdateParams.FrMealVoucherConecs build() { + return new PaymentMethodConfigurationUpdateParams.FrMealVoucherConecs( + this.displayPreference, this.extraParams); + } + + /** Whether or not the payment method should be displayed. */ + public Builder setDisplayPreference( + PaymentMethodConfigurationUpdateParams.FrMealVoucherConecs.DisplayPreference + displayPreference) { + this.displayPreference = displayPreference; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentMethodConfigurationUpdateParams.FrMealVoucherConecs#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentMethodConfigurationUpdateParams.FrMealVoucherConecs#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class DisplayPreference { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The account's preference for whether or not to display this payment method. */ + @SerializedName("preference") + Preference preference; + + private DisplayPreference(Map extraParams, Preference preference) { + this.extraParams = extraParams; + this.preference = preference; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Preference preference; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentMethodConfigurationUpdateParams.FrMealVoucherConecs.DisplayPreference + build() { + return new PaymentMethodConfigurationUpdateParams.FrMealVoucherConecs.DisplayPreference( + this.extraParams, this.preference); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentMethodConfigurationUpdateParams.FrMealVoucherConecs.DisplayPreference#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentMethodConfigurationUpdateParams.FrMealVoucherConecs.DisplayPreference#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The account's preference for whether or not to display this payment method. */ + public Builder setPreference( + PaymentMethodConfigurationUpdateParams.FrMealVoucherConecs.DisplayPreference.Preference + preference) { + this.preference = preference; + return this; + } + } + + public enum Preference implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), + + @SerializedName("off") + OFF("off"), + + @SerializedName("on") + ON("on"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Preference(String value) { + this.value = value; + } + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Giropay { @@ -8029,6 +8240,171 @@ public enum Preference implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Paypay { + /** Whether or not the payment method should be displayed. */ + @SerializedName("display_preference") + DisplayPreference displayPreference; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Paypay(DisplayPreference displayPreference, Map extraParams) { + this.displayPreference = displayPreference; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private DisplayPreference displayPreference; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentMethodConfigurationUpdateParams.Paypay build() { + return new PaymentMethodConfigurationUpdateParams.Paypay( + this.displayPreference, this.extraParams); + } + + /** Whether or not the payment method should be displayed. */ + public Builder setDisplayPreference( + PaymentMethodConfigurationUpdateParams.Paypay.DisplayPreference displayPreference) { + this.displayPreference = displayPreference; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentMethodConfigurationUpdateParams.Paypay#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentMethodConfigurationUpdateParams.Paypay#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class DisplayPreference { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The account's preference for whether or not to display this payment method. */ + @SerializedName("preference") + Preference preference; + + private DisplayPreference(Map extraParams, Preference preference) { + this.extraParams = extraParams; + this.preference = preference; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Preference preference; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentMethodConfigurationUpdateParams.Paypay.DisplayPreference build() { + return new PaymentMethodConfigurationUpdateParams.Paypay.DisplayPreference( + this.extraParams, this.preference); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentMethodConfigurationUpdateParams.Paypay.DisplayPreference#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentMethodConfigurationUpdateParams.Paypay.DisplayPreference#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The account's preference for whether or not to display this payment method. */ + public Builder setPreference( + PaymentMethodConfigurationUpdateParams.Paypay.DisplayPreference.Preference preference) { + this.preference = preference; + return this; + } + } + + public enum Preference implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), + + @SerializedName("off") + OFF("off"), + + @SerializedName("on") + ON("on"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Preference(String value) { + this.value = value; + } + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Pix { diff --git a/src/main/java/com/stripe/param/PaymentMethodCreateParams.java b/src/main/java/com/stripe/param/PaymentMethodCreateParams.java index eb3fdf86ab2..1b631b810f6 100644 --- a/src/main/java/com/stripe/param/PaymentMethodCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodCreateParams.java @@ -236,6 +236,12 @@ public class PaymentMethodCreateParams extends ApiRequestParams { @SerializedName("link") Link link; + /** + * If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method. + */ + @SerializedName("mb_way") + MbWay mbWay; + /** * 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 @@ -319,6 +325,13 @@ public class PaymentMethodCreateParams extends ApiRequestParams { @SerializedName("paypal") Paypal paypal; + /** + * If this is a {@code paypay} PaymentMethod, this hash contains details about the PayPay payment + * method. + */ + @SerializedName("paypay") + Paypay paypay; + /** * If this is a {@code pix} PaymentMethod, this hash contains details about the Pix payment * method. @@ -449,6 +462,7 @@ private PaymentMethodCreateParams( Konbini konbini, KrCard krCard, Link link, + MbWay mbWay, Map metadata, Mobilepay mobilepay, Multibanco multibanco, @@ -461,6 +475,7 @@ private PaymentMethodCreateParams( String paymentMethod, Paynow paynow, Paypal paypal, + Paypay paypay, Pix pix, Promptpay promptpay, RadarOptions radarOptions, @@ -507,6 +522,7 @@ private PaymentMethodCreateParams( this.konbini = konbini; this.krCard = krCard; this.link = link; + this.mbWay = mbWay; this.metadata = metadata; this.mobilepay = mobilepay; this.multibanco = multibanco; @@ -519,6 +535,7 @@ private PaymentMethodCreateParams( this.paymentMethod = paymentMethod; this.paynow = paynow; this.paypal = paypal; + this.paypay = paypay; this.pix = pix; this.promptpay = promptpay; this.radarOptions = radarOptions; @@ -604,6 +621,8 @@ public static class Builder { private Link link; + private MbWay mbWay; + private Map metadata; private Mobilepay mobilepay; @@ -628,6 +647,8 @@ public static class Builder { private Paypal paypal; + private Paypay paypay; + private Pix pix; private Promptpay promptpay; @@ -691,6 +712,7 @@ public PaymentMethodCreateParams build() { this.konbini, this.krCard, this.link, + this.mbWay, this.metadata, this.mobilepay, this.multibanco, @@ -703,6 +725,7 @@ public PaymentMethodCreateParams build() { this.paymentMethod, this.paynow, this.paypal, + this.paypay, this.pix, this.promptpay, this.radarOptions, @@ -1057,6 +1080,15 @@ public Builder setLink(PaymentMethodCreateParams.Link link) { return this; } + /** + * If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment + * method. + */ + public Builder setMbWay(PaymentMethodCreateParams.MbWay mbWay) { + this.mbWay = mbWay; + return this; + } + /** * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` call, * and subsequent calls add additional key/value pairs to the original map. See {@link @@ -1179,6 +1211,15 @@ public Builder setPaypal(PaymentMethodCreateParams.Paypal paypal) { return this; } + /** + * If this is a {@code paypay} PaymentMethod, this hash contains details about the PayPay + * payment method. + */ + public Builder setPaypay(PaymentMethodCreateParams.Paypay paypay) { + this.paypay = paypay; + return this; + } + /** * If this is a {@code pix} PaymentMethod, this hash contains details about the Pix payment * method. @@ -2146,11 +2187,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -2253,13 +2294,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -3838,6 +3879,62 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MbWay { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private MbWay(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentMethodCreateParams.MbWay build() { + return new PaymentMethodCreateParams.MbWay(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentMethodCreateParams.MbWay#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentMethodCreateParams.MbWay#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Mobilepay { @@ -4629,6 +4726,62 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Paypay { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Paypay(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentMethodCreateParams.Paypay build() { + return new PaymentMethodCreateParams.Paypay(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentMethodCreateParams.Paypay#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentMethodCreateParams.Paypay#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Pix { @@ -5721,6 +5874,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("link") LINK("link"), + @SerializedName("mb_way") + MB_WAY("mb_way"), + @SerializedName("mobilepay") MOBILEPAY("mobilepay"), @@ -5751,6 +5907,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("paypay") + PAYPAY("paypay"), + @SerializedName("pix") PIX("pix"), diff --git a/src/main/java/com/stripe/param/PaymentMethodListParams.java b/src/main/java/com/stripe/param/PaymentMethodListParams.java index 41514ad42f3..4f8008d81e2 100644 --- a/src/main/java/com/stripe/param/PaymentMethodListParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodListParams.java @@ -291,6 +291,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("link") LINK("link"), + @SerializedName("mb_way") + MB_WAY("mb_way"), + @SerializedName("mobilepay") MOBILEPAY("mobilepay"), @@ -321,6 +324,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("paypay") + PAYPAY("paypay"), + @SerializedName("pix") PIX("pix"), diff --git a/src/main/java/com/stripe/param/PaymentMethodUpdateParams.java b/src/main/java/com/stripe/param/PaymentMethodUpdateParams.java index ed8b223545a..c6f102ca1f0 100644 --- a/src/main/java/com/stripe/param/PaymentMethodUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodUpdateParams.java @@ -47,13 +47,6 @@ public class PaymentMethodUpdateParams extends ApiRequestParams { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** - * If this is an {@code Link} PaymentMethod, this hash contains details about the Link payment - * method. - */ - @SerializedName("link") - Link link; - /** * 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 @@ -63,13 +56,6 @@ public class PaymentMethodUpdateParams extends ApiRequestParams { @SerializedName("metadata") Object metadata; - /** - * If this is a {@code pay_by_bank} PaymentMethod, this hash contains details about the PayByBank - * payment method. - */ - @SerializedName("pay_by_bank") - PayByBank payByBank; - /** * If this is an {@code us_bank_account} PaymentMethod, this hash contains details about the US * bank account payment method. @@ -83,18 +69,14 @@ private PaymentMethodUpdateParams( Card card, List expand, Map extraParams, - Link link, Object metadata, - PayByBank payByBank, UsBankAccount usBankAccount) { this.allowRedisplay = allowRedisplay; this.billingDetails = billingDetails; this.card = card; this.expand = expand; this.extraParams = extraParams; - this.link = link; this.metadata = metadata; - this.payByBank = payByBank; this.usBankAccount = usBankAccount; } @@ -113,12 +95,8 @@ public static class Builder { private Map extraParams; - private Link link; - private Object metadata; - private PayByBank payByBank; - private UsBankAccount usBankAccount; /** Finalize and obtain parameter instance from this builder. */ @@ -129,9 +107,7 @@ public PaymentMethodUpdateParams build() { this.card, this.expand, this.extraParams, - this.link, this.metadata, - this.payByBank, this.usBankAccount); } @@ -213,15 +189,6 @@ public Builder putAllExtraParam(Map map) { return this; } - /** - * If this is an {@code Link} PaymentMethod, this hash contains details about the Link payment - * method. - */ - public Builder setLink(PaymentMethodUpdateParams.Link link) { - this.link = link; - return this; - } - /** * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` call, * and subsequent calls add additional key/value pairs to the original map. See {@link @@ -272,15 +239,6 @@ public Builder setMetadata(Map metadata) { return this; } - /** - * If this is a {@code pay_by_bank} PaymentMethod, this hash contains details about the - * PayByBank payment method. - */ - public Builder setPayByBank(PaymentMethodUpdateParams.PayByBank payByBank) { - this.payByBank = payByBank; - return this; - } - /** * If this is an {@code us_bank_account} PaymentMethod, this hash contains details about the US * bank account payment method. @@ -481,11 +439,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -603,25 +561,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -857,118 +815,6 @@ public enum Preferred implements ApiRequestParams.EnumParam { } } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Link { - /** - * Map of extra parameters for custom features not available in this client library. The content - * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each - * key/value pair is serialized as if the key is a root-level field (serialized) name in this - * param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - private Link(Map extraParams) { - this.extraParams = extraParams; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private Map extraParams; - - /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodUpdateParams.Link build() { - return new PaymentMethodUpdateParams.Link(this.extraParams); - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` - * call, and subsequent calls add additional key/value pairs to the original map. See {@link - * PaymentMethodUpdateParams.Link#extraParams} for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link PaymentMethodUpdateParams.Link#extraParams} for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class PayByBank { - /** - * Map of extra parameters for custom features not available in this client library. The content - * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each - * key/value pair is serialized as if the key is a root-level field (serialized) name in this - * param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - private PayByBank(Map extraParams) { - this.extraParams = extraParams; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private Map extraParams; - - /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodUpdateParams.PayByBank build() { - return new PaymentMethodUpdateParams.PayByBank(this.extraParams); - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` - * call, and subsequent calls add additional key/value pairs to the original map. See {@link - * PaymentMethodUpdateParams.PayByBank#extraParams} for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link PaymentMethodUpdateParams.PayByBank#extraParams} for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - } - } - @Getter @EqualsAndHashCode(callSuper = false) public static class UsBankAccount { diff --git a/src/main/java/com/stripe/param/PersonCollectionCreateParams.java b/src/main/java/com/stripe/param/PersonCollectionCreateParams.java index c8177d6b621..0f874ddb3dd 100644 --- a/src/main/java/com/stripe/param/PersonCollectionCreateParams.java +++ b/src/main/java/com/stripe/param/PersonCollectionCreateParams.java @@ -886,11 +886,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -991,13 +991,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -1877,11 +1877,11 @@ public static class RegisteredAddress { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -1983,13 +1983,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; diff --git a/src/main/java/com/stripe/param/PersonUpdateParams.java b/src/main/java/com/stripe/param/PersonUpdateParams.java index 4b9b6011e56..72ac9d708e6 100644 --- a/src/main/java/com/stripe/param/PersonUpdateParams.java +++ b/src/main/java/com/stripe/param/PersonUpdateParams.java @@ -996,11 +996,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -1116,25 +1116,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -2111,11 +2111,11 @@ public static class RegisteredAddress { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -2231,25 +2231,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; diff --git a/src/main/java/com/stripe/param/PromotionCodeCreateParams.java b/src/main/java/com/stripe/param/PromotionCodeCreateParams.java index 8f674c7458b..d10279ef596 100644 --- a/src/main/java/com/stripe/param/PromotionCodeCreateParams.java +++ b/src/main/java/com/stripe/param/PromotionCodeCreateParams.java @@ -27,10 +27,6 @@ public class PromotionCodeCreateParams extends ApiRequestParams { @SerializedName("code") String code; - /** Required. The coupon for this promotion code. */ - @SerializedName("coupon") - String coupon; - /** * The customer that this promotion code can be used by. If not set, the promotion code can be * used by all customers. @@ -75,6 +71,10 @@ public class PromotionCodeCreateParams extends ApiRequestParams { @SerializedName("metadata") Map metadata; + /** Required. The promotion referenced by this promotion code. */ + @SerializedName("promotion") + Promotion promotion; + /** Settings that restrict the redemption of the promotion code. */ @SerializedName("restrictions") Restrictions restrictions; @@ -82,23 +82,23 @@ public class PromotionCodeCreateParams extends ApiRequestParams { private PromotionCodeCreateParams( Boolean active, String code, - String coupon, String customer, List expand, Long expiresAt, Map extraParams, Long maxRedemptions, Map metadata, + Promotion promotion, Restrictions restrictions) { this.active = active; this.code = code; - this.coupon = coupon; this.customer = customer; this.expand = expand; this.expiresAt = expiresAt; this.extraParams = extraParams; this.maxRedemptions = maxRedemptions; this.metadata = metadata; + this.promotion = promotion; this.restrictions = restrictions; } @@ -111,8 +111,6 @@ public static class Builder { private String code; - private String coupon; - private String customer; private List expand; @@ -125,6 +123,8 @@ public static class Builder { private Map metadata; + private Promotion promotion; + private Restrictions restrictions; /** Finalize and obtain parameter instance from this builder. */ @@ -132,13 +132,13 @@ public PromotionCodeCreateParams build() { return new PromotionCodeCreateParams( this.active, this.code, - this.coupon, this.customer, this.expand, this.expiresAt, this.extraParams, this.maxRedemptions, this.metadata, + this.promotion, this.restrictions); } @@ -160,12 +160,6 @@ public Builder setCode(String code) { return this; } - /** Required. The coupon for this promotion code. */ - public Builder setCoupon(String coupon) { - this.coupon = coupon; - return this; - } - /** * The customer that this promotion code can be used by. If not set, the promotion code can be * used by all customers. @@ -272,6 +266,12 @@ public Builder putAllMetadata(Map map) { return this; } + /** Required. The promotion referenced by this promotion code. */ + public Builder setPromotion(PromotionCodeCreateParams.Promotion promotion) { + this.promotion = promotion; + return this; + } + /** Settings that restrict the redemption of the promotion code. */ public Builder setRestrictions(PromotionCodeCreateParams.Restrictions restrictions) { this.restrictions = restrictions; @@ -279,6 +279,100 @@ public Builder setRestrictions(PromotionCodeCreateParams.Restrictions restrictio } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Promotion { + /** If promotion {@code type} is {@code coupon}, the coupon for this promotion code. */ + @SerializedName("coupon") + String coupon; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. Specifies the type of promotion. */ + @SerializedName("type") + Type type; + + private Promotion(String coupon, Map extraParams, Type type) { + this.coupon = coupon; + this.extraParams = extraParams; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String coupon; + + private Map extraParams; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public PromotionCodeCreateParams.Promotion build() { + return new PromotionCodeCreateParams.Promotion(this.coupon, this.extraParams, this.type); + } + + /** If promotion {@code type} is {@code coupon}, the coupon for this promotion code. */ + public Builder setCoupon(String coupon) { + this.coupon = coupon; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PromotionCodeCreateParams.Promotion#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PromotionCodeCreateParams.Promotion#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Required. Specifies the type of promotion. */ + public Builder setType(PromotionCodeCreateParams.Promotion.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("coupon") + COUPON("coupon"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Restrictions { diff --git a/src/main/java/com/stripe/param/QuoteCreateParams.java b/src/main/java/com/stripe/param/QuoteCreateParams.java index 43b84d3ede8..0143b2665e7 100644 --- a/src/main/java/com/stripe/param/QuoteCreateParams.java +++ b/src/main/java/com/stripe/param/QuoteCreateParams.java @@ -2110,15 +2110,20 @@ public static class BillingMode { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Configure behavior for flexible billing mode. */ + @SerializedName("flexible") + Flexible flexible; + /** * Required. Controls the calculation and orchestration of prorations and - * invoices for subscriptions. + * invoices for subscriptions. If no value is passed, the default is {@code flexible}. */ @SerializedName("type") Type type; - private BillingMode(Map extraParams, Type type) { + private BillingMode(Map extraParams, Flexible flexible, Type type) { this.extraParams = extraParams; + this.flexible = flexible; this.type = type; } @@ -2129,11 +2134,14 @@ public static Builder builder() { public static class Builder { private Map extraParams; + private Flexible flexible; + private Type type; /** Finalize and obtain parameter instance from this builder. */ public QuoteCreateParams.SubscriptionData.BillingMode build() { - return new QuoteCreateParams.SubscriptionData.BillingMode(this.extraParams, this.type); + return new QuoteCreateParams.SubscriptionData.BillingMode( + this.extraParams, this.flexible, this.type); } /** @@ -2164,9 +2172,16 @@ public Builder putAllExtraParam(Map map) { return this; } + /** Configure behavior for flexible billing mode. */ + public Builder setFlexible( + QuoteCreateParams.SubscriptionData.BillingMode.Flexible flexible) { + this.flexible = flexible; + return this; + } + /** * Required. Controls the calculation and orchestration of prorations and - * invoices for subscriptions. + * invoices for subscriptions. If no value is passed, the default is {@code flexible}. */ public Builder setType(QuoteCreateParams.SubscriptionData.BillingMode.Type type) { this.type = type; @@ -2174,6 +2189,100 @@ public Builder setType(QuoteCreateParams.SubscriptionData.BillingMode.Type type) } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Flexible { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Controls how invoices and invoice items display proration amounts and discount amounts. + */ + @SerializedName("proration_discounts") + ProrationDiscounts prorationDiscounts; + + private Flexible(Map extraParams, ProrationDiscounts prorationDiscounts) { + this.extraParams = extraParams; + this.prorationDiscounts = prorationDiscounts; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private ProrationDiscounts prorationDiscounts; + + /** Finalize and obtain parameter instance from this builder. */ + public QuoteCreateParams.SubscriptionData.BillingMode.Flexible build() { + return new QuoteCreateParams.SubscriptionData.BillingMode.Flexible( + this.extraParams, this.prorationDiscounts); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link QuoteCreateParams.SubscriptionData.BillingMode.Flexible#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link QuoteCreateParams.SubscriptionData.BillingMode.Flexible#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Controls how invoices and invoice items display proration amounts and discount amounts. + */ + public Builder setProrationDiscounts( + QuoteCreateParams.SubscriptionData.BillingMode.Flexible.ProrationDiscounts + prorationDiscounts) { + this.prorationDiscounts = prorationDiscounts; + return this; + } + } + + public enum ProrationDiscounts implements ApiRequestParams.EnumParam { + @SerializedName("included") + INCLUDED("included"), + + @SerializedName("itemized") + ITEMIZED("itemized"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ProrationDiscounts(String value) { + this.value = value; + } + } + } + public enum Type implements ApiRequestParams.EnumParam { @SerializedName("classic") CLASSIC("classic"), diff --git a/src/main/java/com/stripe/param/SetupIntentConfirmParams.java b/src/main/java/com/stripe/param/SetupIntentConfirmParams.java index df14d4463ce..c134bdb0aa6 100644 --- a/src/main/java/com/stripe/param/SetupIntentConfirmParams.java +++ b/src/main/java/com/stripe/param/SetupIntentConfirmParams.java @@ -834,6 +834,13 @@ public static class PaymentMethodData { @SerializedName("link") Link link; + /** + * If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment + * method. + */ + @SerializedName("mb_way") + MbWay mbWay; + /** * 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 @@ -913,6 +920,13 @@ public static class PaymentMethodData { @SerializedName("paypal") Paypal paypal; + /** + * If this is a {@code paypay} PaymentMethod, this hash contains details about the PayPay + * payment method. + */ + @SerializedName("paypay") + Paypay paypay; + /** * If this is a {@code pix} PaymentMethod, this hash contains details about the Pix payment * method. @@ -1041,6 +1055,7 @@ private PaymentMethodData( Konbini konbini, KrCard krCard, Link link, + MbWay mbWay, Map metadata, Mobilepay mobilepay, Multibanco multibanco, @@ -1052,6 +1067,7 @@ private PaymentMethodData( Payco payco, Paynow paynow, Paypal paypal, + Paypay paypay, Pix pix, Promptpay promptpay, RadarOptions radarOptions, @@ -1095,6 +1111,7 @@ private PaymentMethodData( this.konbini = konbini; this.krCard = krCard; this.link = link; + this.mbWay = mbWay; this.metadata = metadata; this.mobilepay = mobilepay; this.multibanco = multibanco; @@ -1106,6 +1123,7 @@ private PaymentMethodData( this.payco = payco; this.paynow = paynow; this.paypal = paypal; + this.paypay = paypay; this.pix = pix; this.promptpay = promptpay; this.radarOptions = radarOptions; @@ -1185,6 +1203,8 @@ public static class Builder { private Link link; + private MbWay mbWay; + private Map metadata; private Mobilepay mobilepay; @@ -1207,6 +1227,8 @@ public static class Builder { private Paypal paypal; + private Paypay paypay; + private Pix pix; private Promptpay promptpay; @@ -1267,6 +1289,7 @@ public SetupIntentConfirmParams.PaymentMethodData build() { this.konbini, this.krCard, this.link, + this.mbWay, this.metadata, this.mobilepay, this.multibanco, @@ -1278,6 +1301,7 @@ public SetupIntentConfirmParams.PaymentMethodData build() { this.payco, this.paynow, this.paypal, + this.paypay, this.pix, this.promptpay, this.radarOptions, @@ -1581,6 +1605,15 @@ public Builder setLink(SetupIntentConfirmParams.PaymentMethodData.Link link) { return this; } + /** + * If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment + * method. + */ + public Builder setMbWay(SetupIntentConfirmParams.PaymentMethodData.MbWay mbWay) { + this.mbWay = mbWay; + return this; + } + /** * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` * call, and subsequent calls add additional key/value pairs to the original map. See {@link @@ -1700,6 +1733,15 @@ public Builder setPaypal(SetupIntentConfirmParams.PaymentMethodData.Paypal paypa return this; } + /** + * If this is a {@code paypay} PaymentMethod, this hash contains details about the PayPay + * payment method. + */ + public Builder setPaypay(SetupIntentConfirmParams.PaymentMethodData.Paypay paypay) { + this.paypay = paypay; + return this; + } + /** * If this is a {@code pix} PaymentMethod, this hash contains details about the Pix payment * method. @@ -2694,11 +2736,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -2803,13 +2845,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -4193,6 +4235,64 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MbWay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private MbWay(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public SetupIntentConfirmParams.PaymentMethodData.MbWay build() { + return new SetupIntentConfirmParams.PaymentMethodData.MbWay(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SetupIntentConfirmParams.PaymentMethodData.MbWay#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SetupIntentConfirmParams.PaymentMethodData.MbWay#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Mobilepay { @@ -5005,6 +5105,64 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Paypay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Paypay(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public SetupIntentConfirmParams.PaymentMethodData.Paypay build() { + return new SetupIntentConfirmParams.PaymentMethodData.Paypay(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SetupIntentConfirmParams.PaymentMethodData.Paypay#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SetupIntentConfirmParams.PaymentMethodData.Paypay#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Pix { @@ -6047,6 +6205,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("link") LINK("link"), + @SerializedName("mb_way") + MB_WAY("mb_way"), + @SerializedName("mobilepay") MOBILEPAY("mobilepay"), @@ -6077,6 +6238,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("paypay") + PAYPAY("paypay"), + @SerializedName("pix") PIX("pix"), diff --git a/src/main/java/com/stripe/param/SetupIntentCreateParams.java b/src/main/java/com/stripe/param/SetupIntentCreateParams.java index 8bad3948c70..2394cf4b2e6 100644 --- a/src/main/java/com/stripe/param/SetupIntentCreateParams.java +++ b/src/main/java/com/stripe/param/SetupIntentCreateParams.java @@ -1310,6 +1310,13 @@ public static class PaymentMethodData { @SerializedName("link") Link link; + /** + * If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment + * method. + */ + @SerializedName("mb_way") + MbWay mbWay; + /** * 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 @@ -1389,6 +1396,13 @@ public static class PaymentMethodData { @SerializedName("paypal") Paypal paypal; + /** + * If this is a {@code paypay} PaymentMethod, this hash contains details about the PayPay + * payment method. + */ + @SerializedName("paypay") + Paypay paypay; + /** * If this is a {@code pix} PaymentMethod, this hash contains details about the Pix payment * method. @@ -1517,6 +1531,7 @@ private PaymentMethodData( Konbini konbini, KrCard krCard, Link link, + MbWay mbWay, Map metadata, Mobilepay mobilepay, Multibanco multibanco, @@ -1528,6 +1543,7 @@ private PaymentMethodData( Payco payco, Paynow paynow, Paypal paypal, + Paypay paypay, Pix pix, Promptpay promptpay, RadarOptions radarOptions, @@ -1571,6 +1587,7 @@ private PaymentMethodData( this.konbini = konbini; this.krCard = krCard; this.link = link; + this.mbWay = mbWay; this.metadata = metadata; this.mobilepay = mobilepay; this.multibanco = multibanco; @@ -1582,6 +1599,7 @@ private PaymentMethodData( this.payco = payco; this.paynow = paynow; this.paypal = paypal; + this.paypay = paypay; this.pix = pix; this.promptpay = promptpay; this.radarOptions = radarOptions; @@ -1661,6 +1679,8 @@ public static class Builder { private Link link; + private MbWay mbWay; + private Map metadata; private Mobilepay mobilepay; @@ -1683,6 +1703,8 @@ public static class Builder { private Paypal paypal; + private Paypay paypay; + private Pix pix; private Promptpay promptpay; @@ -1743,6 +1765,7 @@ public SetupIntentCreateParams.PaymentMethodData build() { this.konbini, this.krCard, this.link, + this.mbWay, this.metadata, this.mobilepay, this.multibanco, @@ -1754,6 +1777,7 @@ public SetupIntentCreateParams.PaymentMethodData build() { this.payco, this.paynow, this.paypal, + this.paypay, this.pix, this.promptpay, this.radarOptions, @@ -2057,6 +2081,15 @@ public Builder setLink(SetupIntentCreateParams.PaymentMethodData.Link link) { return this; } + /** + * If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment + * method. + */ + public Builder setMbWay(SetupIntentCreateParams.PaymentMethodData.MbWay mbWay) { + this.mbWay = mbWay; + return this; + } + /** * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` * call, and subsequent calls add additional key/value pairs to the original map. See {@link @@ -2175,6 +2208,15 @@ public Builder setPaypal(SetupIntentCreateParams.PaymentMethodData.Paypal paypal return this; } + /** + * If this is a {@code paypay} PaymentMethod, this hash contains details about the PayPay + * payment method. + */ + public Builder setPaypay(SetupIntentCreateParams.PaymentMethodData.Paypay paypay) { + this.paypay = paypay; + return this; + } + /** * If this is a {@code pix} PaymentMethod, this hash contains details about the Pix payment * method. @@ -3169,11 +3211,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -3278,13 +3320,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -4667,6 +4709,64 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MbWay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private MbWay(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public SetupIntentCreateParams.PaymentMethodData.MbWay build() { + return new SetupIntentCreateParams.PaymentMethodData.MbWay(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SetupIntentCreateParams.PaymentMethodData.MbWay#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SetupIntentCreateParams.PaymentMethodData.MbWay#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Mobilepay { @@ -5479,6 +5579,64 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Paypay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Paypay(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public SetupIntentCreateParams.PaymentMethodData.Paypay build() { + return new SetupIntentCreateParams.PaymentMethodData.Paypay(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SetupIntentCreateParams.PaymentMethodData.Paypay#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SetupIntentCreateParams.PaymentMethodData.Paypay#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Pix { @@ -6521,6 +6679,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("link") LINK("link"), + @SerializedName("mb_way") + MB_WAY("mb_way"), + @SerializedName("mobilepay") MOBILEPAY("mobilepay"), @@ -6551,6 +6712,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("paypay") + PAYPAY("paypay"), + @SerializedName("pix") PIX("pix"), diff --git a/src/main/java/com/stripe/param/SetupIntentUpdateParams.java b/src/main/java/com/stripe/param/SetupIntentUpdateParams.java index 73a40d01c06..b7b2546c6b4 100644 --- a/src/main/java/com/stripe/param/SetupIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/SetupIntentUpdateParams.java @@ -647,6 +647,13 @@ public static class PaymentMethodData { @SerializedName("link") Link link; + /** + * If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment + * method. + */ + @SerializedName("mb_way") + MbWay mbWay; + /** * 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 @@ -726,6 +733,13 @@ public static class PaymentMethodData { @SerializedName("paypal") Paypal paypal; + /** + * If this is a {@code paypay} PaymentMethod, this hash contains details about the PayPay + * payment method. + */ + @SerializedName("paypay") + Paypay paypay; + /** * If this is a {@code pix} PaymentMethod, this hash contains details about the Pix payment * method. @@ -854,6 +868,7 @@ private PaymentMethodData( Konbini konbini, KrCard krCard, Link link, + MbWay mbWay, Map metadata, Mobilepay mobilepay, Multibanco multibanco, @@ -865,6 +880,7 @@ private PaymentMethodData( Payco payco, Paynow paynow, Paypal paypal, + Paypay paypay, Pix pix, Promptpay promptpay, RadarOptions radarOptions, @@ -908,6 +924,7 @@ private PaymentMethodData( this.konbini = konbini; this.krCard = krCard; this.link = link; + this.mbWay = mbWay; this.metadata = metadata; this.mobilepay = mobilepay; this.multibanco = multibanco; @@ -919,6 +936,7 @@ private PaymentMethodData( this.payco = payco; this.paynow = paynow; this.paypal = paypal; + this.paypay = paypay; this.pix = pix; this.promptpay = promptpay; this.radarOptions = radarOptions; @@ -998,6 +1016,8 @@ public static class Builder { private Link link; + private MbWay mbWay; + private Map metadata; private Mobilepay mobilepay; @@ -1020,6 +1040,8 @@ public static class Builder { private Paypal paypal; + private Paypay paypay; + private Pix pix; private Promptpay promptpay; @@ -1080,6 +1102,7 @@ public SetupIntentUpdateParams.PaymentMethodData build() { this.konbini, this.krCard, this.link, + this.mbWay, this.metadata, this.mobilepay, this.multibanco, @@ -1091,6 +1114,7 @@ public SetupIntentUpdateParams.PaymentMethodData build() { this.payco, this.paynow, this.paypal, + this.paypay, this.pix, this.promptpay, this.radarOptions, @@ -1394,6 +1418,15 @@ public Builder setLink(SetupIntentUpdateParams.PaymentMethodData.Link link) { return this; } + /** + * If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment + * method. + */ + public Builder setMbWay(SetupIntentUpdateParams.PaymentMethodData.MbWay mbWay) { + this.mbWay = mbWay; + return this; + } + /** * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` * call, and subsequent calls add additional key/value pairs to the original map. See {@link @@ -1512,6 +1545,15 @@ public Builder setPaypal(SetupIntentUpdateParams.PaymentMethodData.Paypal paypal return this; } + /** + * If this is a {@code paypay} PaymentMethod, this hash contains details about the PayPay + * payment method. + */ + public Builder setPaypay(SetupIntentUpdateParams.PaymentMethodData.Paypay paypay) { + this.paypay = paypay; + return this; + } + /** * If this is a {@code pix} PaymentMethod, this hash contains details about the Pix payment * method. @@ -2557,11 +2599,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -2681,25 +2723,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -4103,6 +4145,64 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MbWay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private MbWay(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public SetupIntentUpdateParams.PaymentMethodData.MbWay build() { + return new SetupIntentUpdateParams.PaymentMethodData.MbWay(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SetupIntentUpdateParams.PaymentMethodData.MbWay#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SetupIntentUpdateParams.PaymentMethodData.MbWay#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Mobilepay { @@ -4953,6 +5053,64 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Paypay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Paypay(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public SetupIntentUpdateParams.PaymentMethodData.Paypay build() { + return new SetupIntentUpdateParams.PaymentMethodData.Paypay(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SetupIntentUpdateParams.PaymentMethodData.Paypay#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SetupIntentUpdateParams.PaymentMethodData.Paypay#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Pix { @@ -6029,6 +6187,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("link") LINK("link"), + @SerializedName("mb_way") + MB_WAY("mb_way"), + @SerializedName("mobilepay") MOBILEPAY("mobilepay"), @@ -6059,6 +6220,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("paypay") + PAYPAY("paypay"), + @SerializedName("pix") PIX("pix"), diff --git a/src/main/java/com/stripe/param/SourceCreateParams.java b/src/main/java/com/stripe/param/SourceCreateParams.java index fde41519cae..6e8f469e17e 100644 --- a/src/main/java/com/stripe/param/SourceCreateParams.java +++ b/src/main/java/com/stripe/param/SourceCreateParams.java @@ -1196,11 +1196,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -1303,13 +1303,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -1951,11 +1951,13 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + /** + * Required. Address line 1, such as the street, PO Box, or company name. + */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -2058,13 +2060,15 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + /** + * Required. Address line 1, such as the street, PO Box, or company name. + */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; diff --git a/src/main/java/com/stripe/param/SourceUpdateParams.java b/src/main/java/com/stripe/param/SourceUpdateParams.java index 0688c705693..f8544e86199 100644 --- a/src/main/java/com/stripe/param/SourceUpdateParams.java +++ b/src/main/java/com/stripe/param/SourceUpdateParams.java @@ -1073,11 +1073,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -1195,25 +1195,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -1734,11 +1734,13 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + /** + * Required. Address line 1, such as the street, PO Box, or company name. + */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -1856,25 +1858,29 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + /** + * Required. Address line 1, such as the street, PO Box, or company name. + */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + /** + * Required. Address line 1, such as the street, PO Box, or company name. + */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; diff --git a/src/main/java/com/stripe/param/SubscriptionCreateParams.java b/src/main/java/com/stripe/param/SubscriptionCreateParams.java index d185813b887..80375da408c 100644 --- a/src/main/java/com/stripe/param/SubscriptionCreateParams.java +++ b/src/main/java/com/stripe/param/SubscriptionCreateParams.java @@ -57,7 +57,7 @@ public class SubscriptionCreateParams extends ApiRequestParams { /** * Mutually exclusive with billing_cycle_anchor and only valid with monthly and yearly price - * intervals. When provided, the billing_cycle_anchor is set to the next occurence of the + * intervals. When provided, the billing_cycle_anchor is set to the next occurrence of the * day_of_month at the hour, minute, and second UTC. */ @SerializedName("billing_cycle_anchor_config") @@ -573,7 +573,7 @@ public Builder setBillingCycleAnchor(Long billingCycleAnchor) { /** * Mutually exclusive with billing_cycle_anchor and only valid with monthly and yearly price - * intervals. When provided, the billing_cycle_anchor is set to the next occurence of the + * intervals. When provided, the billing_cycle_anchor is set to the next occurrence of the * day_of_month at the hour, minute, and second UTC. */ public Builder setBillingCycleAnchorConfig( @@ -1120,8 +1120,9 @@ public static class AddInvoiceItem { Map metadata; /** - * The period associated with this invoice item. Defaults to the current period of the - * subscription. + * The period associated with this invoice item. If not set, {@code period.start.type} defaults + * to {@code max_item_period_start} and {@code period.end.type} defaults to {@code + * min_item_period_end}. */ @SerializedName("period") Period period; @@ -1282,8 +1283,9 @@ public Builder putAllMetadata(Map map) { } /** - * The period associated with this invoice item. Defaults to the current period of the - * subscription. + * The period associated with this invoice item. If not set, {@code period.start.type} + * defaults to {@code max_item_period_start} and {@code period.end.type} defaults to {@code + * min_item_period_end}. */ public Builder setPeriod(SubscriptionCreateParams.AddInvoiceItem.Period period) { this.period = period; @@ -2310,15 +2312,20 @@ public static class BillingMode { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Configure behavior for flexible billing mode. */ + @SerializedName("flexible") + Flexible flexible; + /** * Required. Controls the calculation and orchestration of prorations and - * invoices for subscriptions. + * invoices for subscriptions. If no value is passed, the default is {@code flexible}. */ @SerializedName("type") Type type; - private BillingMode(Map extraParams, Type type) { + private BillingMode(Map extraParams, Flexible flexible, Type type) { this.extraParams = extraParams; + this.flexible = flexible; this.type = type; } @@ -2329,11 +2336,13 @@ public static Builder builder() { public static class Builder { private Map extraParams; + private Flexible flexible; + private Type type; /** Finalize and obtain parameter instance from this builder. */ public SubscriptionCreateParams.BillingMode build() { - return new SubscriptionCreateParams.BillingMode(this.extraParams, this.type); + return new SubscriptionCreateParams.BillingMode(this.extraParams, this.flexible, this.type); } /** @@ -2362,9 +2371,15 @@ public Builder putAllExtraParam(Map map) { return this; } + /** Configure behavior for flexible billing mode. */ + public Builder setFlexible(SubscriptionCreateParams.BillingMode.Flexible flexible) { + this.flexible = flexible; + return this; + } + /** * Required. Controls the calculation and orchestration of prorations and - * invoices for subscriptions. + * invoices for subscriptions. If no value is passed, the default is {@code flexible}. */ public Builder setType(SubscriptionCreateParams.BillingMode.Type type) { this.type = type; @@ -2372,6 +2387,96 @@ public Builder setType(SubscriptionCreateParams.BillingMode.Type type) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Flexible { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Controls how invoices and invoice items display proration amounts and discount amounts. */ + @SerializedName("proration_discounts") + ProrationDiscounts prorationDiscounts; + + private Flexible(Map extraParams, ProrationDiscounts prorationDiscounts) { + this.extraParams = extraParams; + this.prorationDiscounts = prorationDiscounts; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private ProrationDiscounts prorationDiscounts; + + /** Finalize and obtain parameter instance from this builder. */ + public SubscriptionCreateParams.BillingMode.Flexible build() { + return new SubscriptionCreateParams.BillingMode.Flexible( + this.extraParams, this.prorationDiscounts); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SubscriptionCreateParams.BillingMode.Flexible#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SubscriptionCreateParams.BillingMode.Flexible#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Controls how invoices and invoice items display proration amounts and discount amounts. + */ + public Builder setProrationDiscounts( + SubscriptionCreateParams.BillingMode.Flexible.ProrationDiscounts prorationDiscounts) { + this.prorationDiscounts = prorationDiscounts; + return this; + } + } + + public enum ProrationDiscounts implements ApiRequestParams.EnumParam { + @SerializedName("included") + INCLUDED("included"), + + @SerializedName("itemized") + ITEMIZED("itemized"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ProrationDiscounts(String value) { + this.value = value; + } + } + } + public enum Type implements ApiRequestParams.EnumParam { @SerializedName("classic") CLASSIC("classic"), diff --git a/src/main/java/com/stripe/param/SubscriptionMigrateParams.java b/src/main/java/com/stripe/param/SubscriptionMigrateParams.java index 18da721a8c8..8d11769fe12 100644 --- a/src/main/java/com/stripe/param/SubscriptionMigrateParams.java +++ b/src/main/java/com/stripe/param/SubscriptionMigrateParams.java @@ -130,12 +130,20 @@ public static class BillingMode { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. */ + /** Configure behavior for flexible billing mode. */ + @SerializedName("flexible") + Flexible flexible; + + /** + * Required. Controls the calculation and orchestration of prorations and + * invoices for subscriptions. + */ @SerializedName("type") Type type; - private BillingMode(Map extraParams, Type type) { + private BillingMode(Map extraParams, Flexible flexible, Type type) { this.extraParams = extraParams; + this.flexible = flexible; this.type = type; } @@ -146,11 +154,14 @@ public static Builder builder() { public static class Builder { private Map extraParams; + private Flexible flexible; + private Type type; /** Finalize and obtain parameter instance from this builder. */ public SubscriptionMigrateParams.BillingMode build() { - return new SubscriptionMigrateParams.BillingMode(this.extraParams, this.type); + return new SubscriptionMigrateParams.BillingMode( + this.extraParams, this.flexible, this.type); } /** @@ -179,13 +190,112 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. */ + /** Configure behavior for flexible billing mode. */ + public Builder setFlexible(SubscriptionMigrateParams.BillingMode.Flexible flexible) { + this.flexible = flexible; + return this; + } + + /** + * Required. Controls the calculation and orchestration of prorations and + * invoices for subscriptions. + */ public Builder setType(SubscriptionMigrateParams.BillingMode.Type type) { this.type = type; return this; } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Flexible { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Controls how invoices and invoice items display proration amounts and discount amounts. */ + @SerializedName("proration_discounts") + ProrationDiscounts prorationDiscounts; + + private Flexible(Map extraParams, ProrationDiscounts prorationDiscounts) { + this.extraParams = extraParams; + this.prorationDiscounts = prorationDiscounts; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private ProrationDiscounts prorationDiscounts; + + /** Finalize and obtain parameter instance from this builder. */ + public SubscriptionMigrateParams.BillingMode.Flexible build() { + return new SubscriptionMigrateParams.BillingMode.Flexible( + this.extraParams, this.prorationDiscounts); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SubscriptionMigrateParams.BillingMode.Flexible#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SubscriptionMigrateParams.BillingMode.Flexible#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Controls how invoices and invoice items display proration amounts and discount amounts. + */ + public Builder setProrationDiscounts( + SubscriptionMigrateParams.BillingMode.Flexible.ProrationDiscounts prorationDiscounts) { + this.prorationDiscounts = prorationDiscounts; + return this; + } + } + + public enum ProrationDiscounts implements ApiRequestParams.EnumParam { + @SerializedName("included") + INCLUDED("included"), + + @SerializedName("itemized") + ITEMIZED("itemized"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ProrationDiscounts(String value) { + this.value = value; + } + } + } + public enum Type implements ApiRequestParams.EnumParam { @SerializedName("flexible") FLEXIBLE("flexible"); diff --git a/src/main/java/com/stripe/param/SubscriptionScheduleCreateParams.java b/src/main/java/com/stripe/param/SubscriptionScheduleCreateParams.java index 7c7ab3da5e7..ad564bd7269 100644 --- a/src/main/java/com/stripe/param/SubscriptionScheduleCreateParams.java +++ b/src/main/java/com/stripe/param/SubscriptionScheduleCreateParams.java @@ -350,15 +350,20 @@ public static class BillingMode { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Configure behavior for flexible billing mode. */ + @SerializedName("flexible") + Flexible flexible; + /** * Required. Controls the calculation and orchestration of prorations and - * invoices for subscriptions. + * invoices for subscriptions. If no value is passed, the default is {@code flexible}. */ @SerializedName("type") Type type; - private BillingMode(Map extraParams, Type type) { + private BillingMode(Map extraParams, Flexible flexible, Type type) { this.extraParams = extraParams; + this.flexible = flexible; this.type = type; } @@ -369,11 +374,14 @@ public static Builder builder() { public static class Builder { private Map extraParams; + private Flexible flexible; + private Type type; /** Finalize and obtain parameter instance from this builder. */ public SubscriptionScheduleCreateParams.BillingMode build() { - return new SubscriptionScheduleCreateParams.BillingMode(this.extraParams, this.type); + return new SubscriptionScheduleCreateParams.BillingMode( + this.extraParams, this.flexible, this.type); } /** @@ -403,9 +411,15 @@ public Builder putAllExtraParam(Map map) { return this; } + /** Configure behavior for flexible billing mode. */ + public Builder setFlexible(SubscriptionScheduleCreateParams.BillingMode.Flexible flexible) { + this.flexible = flexible; + return this; + } + /** * Required. Controls the calculation and orchestration of prorations and - * invoices for subscriptions. + * invoices for subscriptions. If no value is passed, the default is {@code flexible}. */ public Builder setType(SubscriptionScheduleCreateParams.BillingMode.Type type) { this.type = type; @@ -413,6 +427,97 @@ public Builder setType(SubscriptionScheduleCreateParams.BillingMode.Type type) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Flexible { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Controls how invoices and invoice items display proration amounts and discount amounts. */ + @SerializedName("proration_discounts") + ProrationDiscounts prorationDiscounts; + + private Flexible(Map extraParams, ProrationDiscounts prorationDiscounts) { + this.extraParams = extraParams; + this.prorationDiscounts = prorationDiscounts; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private ProrationDiscounts prorationDiscounts; + + /** Finalize and obtain parameter instance from this builder. */ + public SubscriptionScheduleCreateParams.BillingMode.Flexible build() { + return new SubscriptionScheduleCreateParams.BillingMode.Flexible( + this.extraParams, this.prorationDiscounts); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SubscriptionScheduleCreateParams.BillingMode.Flexible#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SubscriptionScheduleCreateParams.BillingMode.Flexible#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Controls how invoices and invoice items display proration amounts and discount amounts. + */ + public Builder setProrationDiscounts( + SubscriptionScheduleCreateParams.BillingMode.Flexible.ProrationDiscounts + prorationDiscounts) { + this.prorationDiscounts = prorationDiscounts; + return this; + } + } + + public enum ProrationDiscounts implements ApiRequestParams.EnumParam { + @SerializedName("included") + INCLUDED("included"), + + @SerializedName("itemized") + ITEMIZED("itemized"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ProrationDiscounts(String value) { + this.value = value; + } + } + } + public enum Type implements ApiRequestParams.EnumParam { @SerializedName("classic") CLASSIC("classic"), @@ -1569,16 +1674,6 @@ public static class Phase { @SerializedName("items") List items; - /** - * Integer representing the multiplier applied to the price interval. For example, {@code - * iterations=2} applied to a price with {@code interval=month} and {@code interval_count=3} - * results in a phase of duration {@code 2 * 3 months = 6 months}. If set, {@code end_date} must - * not be set. This parameter is deprecated and will be removed in a future version. Use {@code - * duration} instead. - */ - @SerializedName("iterations") - Long iterations; - /** * Set of key-value pairs that you can attach * to a phase. Metadata on a schedule's phase will update the underlying subscription's {@code @@ -1647,7 +1742,6 @@ private Phase( Map extraParams, InvoiceSettings invoiceSettings, List items, - Long iterations, Map metadata, String onBehalfOf, ProrationBehavior prorationBehavior, @@ -1670,7 +1764,6 @@ private Phase( this.extraParams = extraParams; this.invoiceSettings = invoiceSettings; this.items = items; - this.iterations = iterations; this.metadata = metadata; this.onBehalfOf = onBehalfOf; this.prorationBehavior = prorationBehavior; @@ -1716,8 +1809,6 @@ public static class Builder { private List items; - private Long iterations; - private Map metadata; private String onBehalfOf; @@ -1749,7 +1840,6 @@ public SubscriptionScheduleCreateParams.Phase build() { this.extraParams, this.invoiceSettings, this.items, - this.iterations, this.metadata, this.onBehalfOf, this.prorationBehavior, @@ -2069,18 +2159,6 @@ public Builder addAllItem(List elem return this; } - /** - * Integer representing the multiplier applied to the price interval. For example, {@code - * iterations=2} applied to a price with {@code interval=month} and {@code interval_count=3} - * results in a phase of duration {@code 2 * 3 months = 6 months}. If set, {@code end_date} - * must not be set. This parameter is deprecated and will be removed in a future version. Use - * {@code duration} instead. - */ - public Builder setIterations(Long iterations) { - this.iterations = iterations; - return this; - } - /** * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` * call, and subsequent calls add additional key/value pairs to the original map. See {@link @@ -2186,8 +2264,9 @@ public static class AddInvoiceItem { Map metadata; /** - * The period associated with this invoice item. Defaults to the period of the underlying - * subscription that surrounds the start of the phase. + * The period associated with this invoice item. If not set, {@code period.start.type} + * defaults to {@code max_item_period_start} and {@code period.end.type} defaults to {@code + * min_item_period_end}. */ @SerializedName("period") Period period; @@ -2354,8 +2433,9 @@ public Builder putAllMetadata(Map map) { } /** - * The period associated with this invoice item. Defaults to the period of the underlying - * subscription that surrounds the start of the phase. + * The period associated with this invoice item. If not set, {@code period.start.type} + * defaults to {@code max_item_period_start} and {@code period.end.type} defaults to {@code + * min_item_period_end}. */ public Builder setPeriod( SubscriptionScheduleCreateParams.Phase.AddInvoiceItem.Period period) { diff --git a/src/main/java/com/stripe/param/SubscriptionScheduleUpdateParams.java b/src/main/java/com/stripe/param/SubscriptionScheduleUpdateParams.java index 270c9eddf41..89c4df4397a 100644 --- a/src/main/java/com/stripe/param/SubscriptionScheduleUpdateParams.java +++ b/src/main/java/com/stripe/param/SubscriptionScheduleUpdateParams.java @@ -1441,16 +1441,6 @@ public static class Phase { @SerializedName("items") List items; - /** - * Integer representing the multiplier applied to the price interval. For example, {@code - * iterations=2} applied to a price with {@code interval=month} and {@code interval_count=3} - * results in a phase of duration {@code 2 * 3 months = 6 months}. If set, {@code end_date} must - * not be set. This parameter is deprecated and will be removed in a future version. Use {@code - * duration} instead. - */ - @SerializedName("iterations") - Long iterations; - /** * Set of key-value pairs that you can attach * to a phase. Metadata on a schedule's phase will update the underlying subscription's {@code @@ -1526,7 +1516,6 @@ private Phase( Map extraParams, InvoiceSettings invoiceSettings, List items, - Long iterations, Map metadata, Object onBehalfOf, ProrationBehavior prorationBehavior, @@ -1550,7 +1539,6 @@ private Phase( this.extraParams = extraParams; this.invoiceSettings = invoiceSettings; this.items = items; - this.iterations = iterations; this.metadata = metadata; this.onBehalfOf = onBehalfOf; this.prorationBehavior = prorationBehavior; @@ -1597,8 +1585,6 @@ public static class Builder { private List items; - private Long iterations; - private Map metadata; private Object onBehalfOf; @@ -1632,7 +1618,6 @@ public SubscriptionScheduleUpdateParams.Phase build() { this.extraParams, this.invoiceSettings, this.items, - this.iterations, this.metadata, this.onBehalfOf, this.prorationBehavior, @@ -1982,18 +1967,6 @@ public Builder addAllItem(List elem return this; } - /** - * Integer representing the multiplier applied to the price interval. For example, {@code - * iterations=2} applied to a price with {@code interval=month} and {@code interval_count=3} - * results in a phase of duration {@code 2 * 3 months = 6 months}. If set, {@code end_date} - * must not be set. This parameter is deprecated and will be removed in a future version. Use - * {@code duration} instead. - */ - public Builder setIterations(Long iterations) { - this.iterations = iterations; - return this; - } - /** * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` * call, and subsequent calls add additional key/value pairs to the original map. See {@link @@ -2135,8 +2108,9 @@ public static class AddInvoiceItem { Map metadata; /** - * The period associated with this invoice item. Defaults to the period of the underlying - * subscription that surrounds the start of the phase. + * The period associated with this invoice item. If not set, {@code period.start.type} + * defaults to {@code max_item_period_start} and {@code period.end.type} defaults to {@code + * min_item_period_end}. */ @SerializedName("period") Period period; @@ -2303,8 +2277,9 @@ public Builder putAllMetadata(Map map) { } /** - * The period associated with this invoice item. Defaults to the period of the underlying - * subscription that surrounds the start of the phase. + * The period associated with this invoice item. If not set, {@code period.start.type} + * defaults to {@code max_item_period_start} and {@code period.end.type} defaults to {@code + * min_item_period_end}. */ public Builder setPeriod( SubscriptionScheduleUpdateParams.Phase.AddInvoiceItem.Period period) { diff --git a/src/main/java/com/stripe/param/SubscriptionUpdateParams.java b/src/main/java/com/stripe/param/SubscriptionUpdateParams.java index 5d7f25626e0..1c4c83c5d2c 100644 --- a/src/main/java/com/stripe/param/SubscriptionUpdateParams.java +++ b/src/main/java/com/stripe/param/SubscriptionUpdateParams.java @@ -1131,8 +1131,9 @@ public static class AddInvoiceItem { Map metadata; /** - * The period associated with this invoice item. Defaults to the current period of the - * subscription. + * The period associated with this invoice item. If not set, {@code period.start.type} defaults + * to {@code max_item_period_start} and {@code period.end.type} defaults to {@code + * min_item_period_end}. */ @SerializedName("period") Period period; @@ -1293,8 +1294,9 @@ public Builder putAllMetadata(Map map) { } /** - * The period associated with this invoice item. Defaults to the current period of the - * subscription. + * The period associated with this invoice item. If not set, {@code period.start.type} + * defaults to {@code max_item_period_start} and {@code period.end.type} defaults to {@code + * min_item_period_end}. */ public Builder setPeriod(SubscriptionUpdateParams.AddInvoiceItem.Period period) { this.period = period; diff --git a/src/main/java/com/stripe/param/TokenCreateParams.java b/src/main/java/com/stripe/param/TokenCreateParams.java index 05cfd38dfd7..97f43408949 100644 --- a/src/main/java/com/stripe/param/TokenCreateParams.java +++ b/src/main/java/com/stripe/param/TokenCreateParams.java @@ -930,11 +930,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -1037,13 +1037,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -2552,11 +2552,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -2659,13 +2659,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -3152,11 +3152,11 @@ public static class RegisteredAddress { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -3259,13 +3259,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -5320,11 +5320,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -5427,13 +5427,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -6322,11 +6322,11 @@ public static class RegisteredAddress { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -6429,13 +6429,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; diff --git a/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java b/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java index 86aa5ae65b0..3ec04d0eb21 100644 --- a/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java +++ b/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java @@ -627,7 +627,10 @@ public enum ApiVersion implements ApiRequestParams.EnumParam { VERSION_2025_07_30_BASIL("2025-07-30.basil"), @SerializedName("2025-08-27.basil") - VERSION_2025_08_27_BASIL("2025-08-27.basil"); + VERSION_2025_08_27_BASIL("2025-08-27.basil"), + + @SerializedName("2025-09-30.clover") + VERSION_2025_09_30_CLOVER("2025-09-30.clover"); @Getter(onMethod_ = {@Override}) private final String value; diff --git a/src/main/java/com/stripe/param/billing/AlertCreateParams.java b/src/main/java/com/stripe/param/billing/AlertCreateParams.java index f6e4a483961..c8ad48b58c9 100644 --- a/src/main/java/com/stripe/param/billing/AlertCreateParams.java +++ b/src/main/java/com/stripe/param/billing/AlertCreateParams.java @@ -173,10 +173,7 @@ public static class UsageThreshold { @SerializedName("meter") String meter; - /** - * Required. Whether the alert should only fire only once, or once per billing - * cycle. - */ + /** Required. Defines how the alert will behave. */ @SerializedName("recurrence") Recurrence recurrence; @@ -281,10 +278,7 @@ public Builder setMeter(String meter) { return this; } - /** - * Required. Whether the alert should only fire only once, or once per - * billing cycle. - */ + /** Required. Defines how the alert will behave. */ public Builder setRecurrence(AlertCreateParams.UsageThreshold.Recurrence recurrence) { this.recurrence = recurrence; return this; diff --git a/src/main/java/com/stripe/param/billingportal/ConfigurationCreateParams.java b/src/main/java/com/stripe/param/billingportal/ConfigurationCreateParams.java index bb3be2904af..d6db907fe3a 100644 --- a/src/main/java/com/stripe/param/billingportal/ConfigurationCreateParams.java +++ b/src/main/java/com/stripe/param/billingportal/ConfigurationCreateParams.java @@ -1205,19 +1205,25 @@ public static class SubscriptionUpdate { @SerializedName("schedule_at_period_end") ScheduleAtPeriodEnd scheduleAtPeriodEnd; + /** The behavior when updating a subscription that is trialing. */ + @SerializedName("trial_update_behavior") + TrialUpdateBehavior trialUpdateBehavior; + private SubscriptionUpdate( Object defaultAllowedUpdates, Boolean enabled, Map extraParams, Object products, ProrationBehavior prorationBehavior, - ScheduleAtPeriodEnd scheduleAtPeriodEnd) { + ScheduleAtPeriodEnd scheduleAtPeriodEnd, + TrialUpdateBehavior trialUpdateBehavior) { this.defaultAllowedUpdates = defaultAllowedUpdates; this.enabled = enabled; this.extraParams = extraParams; this.products = products; this.prorationBehavior = prorationBehavior; this.scheduleAtPeriodEnd = scheduleAtPeriodEnd; + this.trialUpdateBehavior = trialUpdateBehavior; } public static Builder builder() { @@ -1237,6 +1243,8 @@ public static class Builder { private ScheduleAtPeriodEnd scheduleAtPeriodEnd; + private TrialUpdateBehavior trialUpdateBehavior; + /** Finalize and obtain parameter instance from this builder. */ public ConfigurationCreateParams.Features.SubscriptionUpdate build() { return new ConfigurationCreateParams.Features.SubscriptionUpdate( @@ -1245,7 +1253,8 @@ public ConfigurationCreateParams.Features.SubscriptionUpdate build() { this.extraParams, this.products, this.prorationBehavior, - this.scheduleAtPeriodEnd); + this.scheduleAtPeriodEnd, + this.trialUpdateBehavior); } /** @@ -1415,6 +1424,14 @@ public Builder setScheduleAtPeriodEnd( this.scheduleAtPeriodEnd = scheduleAtPeriodEnd; return this; } + + /** The behavior when updating a subscription that is trialing. */ + public Builder setTrialUpdateBehavior( + ConfigurationCreateParams.Features.SubscriptionUpdate.TrialUpdateBehavior + trialUpdateBehavior) { + this.trialUpdateBehavior = trialUpdateBehavior; + return this; + } } @Getter @@ -1903,6 +1920,21 @@ public enum ProrationBehavior implements ApiRequestParams.EnumParam { this.value = value; } } + + public enum TrialUpdateBehavior implements ApiRequestParams.EnumParam { + @SerializedName("continue_trial") + CONTINUE_TRIAL("continue_trial"), + + @SerializedName("end_trial") + END_TRIAL("end_trial"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + TrialUpdateBehavior(String value) { + this.value = value; + } + } } } diff --git a/src/main/java/com/stripe/param/billingportal/ConfigurationUpdateParams.java b/src/main/java/com/stripe/param/billingportal/ConfigurationUpdateParams.java index 87418baeec9..f8937cb78fe 100644 --- a/src/main/java/com/stripe/param/billingportal/ConfigurationUpdateParams.java +++ b/src/main/java/com/stripe/param/billingportal/ConfigurationUpdateParams.java @@ -1247,19 +1247,25 @@ public static class SubscriptionUpdate { @SerializedName("schedule_at_period_end") ScheduleAtPeriodEnd scheduleAtPeriodEnd; + /** The behavior when updating a subscription that is trialing. */ + @SerializedName("trial_update_behavior") + TrialUpdateBehavior trialUpdateBehavior; + private SubscriptionUpdate( Object defaultAllowedUpdates, Boolean enabled, Map extraParams, Object products, ProrationBehavior prorationBehavior, - ScheduleAtPeriodEnd scheduleAtPeriodEnd) { + ScheduleAtPeriodEnd scheduleAtPeriodEnd, + TrialUpdateBehavior trialUpdateBehavior) { this.defaultAllowedUpdates = defaultAllowedUpdates; this.enabled = enabled; this.extraParams = extraParams; this.products = products; this.prorationBehavior = prorationBehavior; this.scheduleAtPeriodEnd = scheduleAtPeriodEnd; + this.trialUpdateBehavior = trialUpdateBehavior; } public static Builder builder() { @@ -1279,6 +1285,8 @@ public static class Builder { private ScheduleAtPeriodEnd scheduleAtPeriodEnd; + private TrialUpdateBehavior trialUpdateBehavior; + /** Finalize and obtain parameter instance from this builder. */ public ConfigurationUpdateParams.Features.SubscriptionUpdate build() { return new ConfigurationUpdateParams.Features.SubscriptionUpdate( @@ -1287,7 +1295,8 @@ public ConfigurationUpdateParams.Features.SubscriptionUpdate build() { this.extraParams, this.products, this.prorationBehavior, - this.scheduleAtPeriodEnd); + this.scheduleAtPeriodEnd, + this.trialUpdateBehavior); } /** @@ -1457,6 +1466,14 @@ public Builder setScheduleAtPeriodEnd( this.scheduleAtPeriodEnd = scheduleAtPeriodEnd; return this; } + + /** The behavior when updating a subscription that is trialing. */ + public Builder setTrialUpdateBehavior( + ConfigurationUpdateParams.Features.SubscriptionUpdate.TrialUpdateBehavior + trialUpdateBehavior) { + this.trialUpdateBehavior = trialUpdateBehavior; + return this; + } } @Getter @@ -1980,6 +1997,21 @@ public enum ProrationBehavior implements ApiRequestParams.EnumParam { this.value = value; } } + + public enum TrialUpdateBehavior implements ApiRequestParams.EnumParam { + @SerializedName("continue_trial") + CONTINUE_TRIAL("continue_trial"), + + @SerializedName("end_trial") + END_TRIAL("end_trial"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + TrialUpdateBehavior(String value) { + this.value = value; + } + } } } diff --git a/src/main/java/com/stripe/param/checkout/SessionCreateParams.java b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java index bfb540a7e3d..5c95b411cd8 100644 --- a/src/main/java/com/stripe/param/checkout/SessionCreateParams.java +++ b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java @@ -44,6 +44,13 @@ public class SessionCreateParams extends ApiRequestParams { @SerializedName("billing_address_collection") BillingAddressCollection billingAddressCollection; + /** + * The branding settings for the Checkout Session. This parameter is not allowed if ui_mode is + * {@code custom}. + */ + @SerializedName("branding_settings") + BrandingSettings brandingSettings; + /** * 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 @@ -149,6 +156,15 @@ public class SessionCreateParams extends ApiRequestParams { @SerializedName("discounts") List discounts; + /** + * A list of the types of payment methods (e.g., {@code card}) that should be excluded from this + * Checkout Session. This should only be used when payment methods for this Checkout Session are + * managed through the Stripe + * Dashboard. + */ + @SerializedName("excluded_payment_method_types") + List excludedPaymentMethodTypes; + /** Specifies which fields in the response should be expanded. */ @SerializedName("expand") List expand; @@ -212,6 +228,18 @@ public class SessionCreateParams extends ApiRequestParams { @SerializedName("mode") Mode mode; + /** + * Controls name collection settings for the session. + * + *

You can configure Checkout to collect your customers' business names, individual names, or + * both. Each name field can be either required or optional. + * + *

If a Customer is created or provided, + * the names can be saved to the Customer object as well. + */ + @SerializedName("name_collection") + NameCollection nameCollection; + /** * A list of optional items the customer can add to their order at checkout. Use this parameter to * pass one-time or recurring Prices. @@ -396,6 +424,7 @@ private SessionCreateParams( Boolean allowPromotionCodes, AutomaticTax automaticTax, BillingAddressCollection billingAddressCollection, + BrandingSettings brandingSettings, String cancelUrl, String clientReferenceId, ConsentCollection consentCollection, @@ -407,6 +436,7 @@ private SessionCreateParams( String customerEmail, CustomerUpdate customerUpdate, List discounts, + List excludedPaymentMethodTypes, List expand, Long expiresAt, Map extraParams, @@ -415,6 +445,7 @@ private SessionCreateParams( Locale locale, Map metadata, Mode mode, + NameCollection nameCollection, List optionalItems, OriginContext originContext, PaymentIntentData paymentIntentData, @@ -442,6 +473,7 @@ private SessionCreateParams( this.allowPromotionCodes = allowPromotionCodes; this.automaticTax = automaticTax; this.billingAddressCollection = billingAddressCollection; + this.brandingSettings = brandingSettings; this.cancelUrl = cancelUrl; this.clientReferenceId = clientReferenceId; this.consentCollection = consentCollection; @@ -453,6 +485,7 @@ private SessionCreateParams( this.customerEmail = customerEmail; this.customerUpdate = customerUpdate; this.discounts = discounts; + this.excludedPaymentMethodTypes = excludedPaymentMethodTypes; this.expand = expand; this.expiresAt = expiresAt; this.extraParams = extraParams; @@ -461,6 +494,7 @@ private SessionCreateParams( this.locale = locale; this.metadata = metadata; this.mode = mode; + this.nameCollection = nameCollection; this.optionalItems = optionalItems; this.originContext = originContext; this.paymentIntentData = paymentIntentData; @@ -500,6 +534,8 @@ public static class Builder { private BillingAddressCollection billingAddressCollection; + private BrandingSettings brandingSettings; + private String cancelUrl; private String clientReferenceId; @@ -522,6 +558,8 @@ public static class Builder { private List discounts; + private List excludedPaymentMethodTypes; + private List expand; private Long expiresAt; @@ -538,6 +576,8 @@ public static class Builder { private Mode mode; + private NameCollection nameCollection; + private List optionalItems; private OriginContext originContext; @@ -590,6 +630,7 @@ public SessionCreateParams build() { this.allowPromotionCodes, this.automaticTax, this.billingAddressCollection, + this.brandingSettings, this.cancelUrl, this.clientReferenceId, this.consentCollection, @@ -601,6 +642,7 @@ public SessionCreateParams build() { this.customerEmail, this.customerUpdate, this.discounts, + this.excludedPaymentMethodTypes, this.expand, this.expiresAt, this.extraParams, @@ -609,6 +651,7 @@ public SessionCreateParams build() { this.locale, this.metadata, this.mode, + this.nameCollection, this.optionalItems, this.originContext, this.paymentIntentData, @@ -673,6 +716,15 @@ public Builder setBillingAddressCollection( return this; } + /** + * The branding settings for the Checkout Session. This parameter is not allowed if ui_mode is + * {@code custom}. + */ + public Builder setBrandingSettings(SessionCreateParams.BrandingSettings brandingSettings) { + this.brandingSettings = brandingSettings; + return this; + } + /** * 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 @@ -834,6 +886,34 @@ public Builder addAllDiscount(List elements) { return this; } + /** + * Add an element to `excludedPaymentMethodTypes` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link SessionCreateParams#excludedPaymentMethodTypes} for the field documentation. + */ + public Builder addExcludedPaymentMethodType( + SessionCreateParams.ExcludedPaymentMethodType element) { + if (this.excludedPaymentMethodTypes == null) { + this.excludedPaymentMethodTypes = new ArrayList<>(); + } + this.excludedPaymentMethodTypes.add(element); + return this; + } + + /** + * Add all elements to `excludedPaymentMethodTypes` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link SessionCreateParams#excludedPaymentMethodTypes} for the field documentation. + */ + public Builder addAllExcludedPaymentMethodType( + List elements) { + if (this.excludedPaymentMethodTypes == null) { + this.excludedPaymentMethodTypes = new ArrayList<>(); + } + this.excludedPaymentMethodTypes.addAll(elements); + return this; + } + /** * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and * subsequent calls adds additional elements to the original list. See {@link @@ -972,6 +1052,20 @@ public Builder setMode(SessionCreateParams.Mode mode) { return this; } + /** + * Controls name collection settings for the session. + * + *

You can configure Checkout to collect your customers' business names, individual names, or + * both. Each name field can be either required or optional. + * + *

If a Customer is created or provided, + * the names can be saved to the Customer object as well. + */ + public Builder setNameCollection(SessionCreateParams.NameCollection nameCollection) { + this.nameCollection = nameCollection; + return this; + } + /** * Add an element to `optionalItems` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link @@ -1629,16 +1723,470 @@ public SessionCreateParams.AutomaticTax.Liability build() { this.account, this.extraParams, this.type); } - /** The connected account being referenced when {@code type} is {@code account}. */ - public Builder setAccount(String account) { - this.account = account; - return this; + /** The connected account being referenced when {@code type} is {@code account}. */ + public Builder setAccount(String account) { + this.account = account; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionCreateParams.AutomaticTax.Liability#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionCreateParams.AutomaticTax.Liability#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Required. Type of the account referenced in the request. */ + public Builder setType(SessionCreateParams.AutomaticTax.Liability.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("account") + ACCOUNT("account"), + + @SerializedName("self") + SELF("self"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BrandingSettings { + /** + * A hex color value starting with {@code #} representing the background color for the Checkout + * Session. + */ + @SerializedName("background_color") + Object backgroundColor; + + /** The border style for the Checkout Session. */ + @SerializedName("border_style") + ApiRequestParams.EnumParam borderStyle; + + /** + * A hex color value starting with {@code #} representing the button color for the Checkout + * Session. + */ + @SerializedName("button_color") + Object buttonColor; + + /** A string to override the business name shown on the Checkout Session. */ + @SerializedName("display_name") + String displayName; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * The font family for the Checkout Session corresponding to one of the supported + * font families. + */ + @SerializedName("font_family") + ApiRequestParams.EnumParam fontFamily; + + /** The icon for the Checkout Session. You cannot set both {@code logo} and {@code icon}. */ + @SerializedName("icon") + Icon icon; + + /** The logo for the Checkout Session. You cannot set both {@code logo} and {@code icon}. */ + @SerializedName("logo") + Logo logo; + + private BrandingSettings( + Object backgroundColor, + ApiRequestParams.EnumParam borderStyle, + Object buttonColor, + String displayName, + Map extraParams, + ApiRequestParams.EnumParam fontFamily, + Icon icon, + Logo logo) { + this.backgroundColor = backgroundColor; + this.borderStyle = borderStyle; + this.buttonColor = buttonColor; + this.displayName = displayName; + this.extraParams = extraParams; + this.fontFamily = fontFamily; + this.icon = icon; + this.logo = logo; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object backgroundColor; + + private ApiRequestParams.EnumParam borderStyle; + + private Object buttonColor; + + private String displayName; + + private Map extraParams; + + private ApiRequestParams.EnumParam fontFamily; + + private Icon icon; + + private Logo logo; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionCreateParams.BrandingSettings build() { + return new SessionCreateParams.BrandingSettings( + this.backgroundColor, + this.borderStyle, + this.buttonColor, + this.displayName, + this.extraParams, + this.fontFamily, + this.icon, + this.logo); + } + + /** + * A hex color value starting with {@code #} representing the background color for the + * Checkout Session. + */ + public Builder setBackgroundColor(String backgroundColor) { + this.backgroundColor = backgroundColor; + return this; + } + + /** + * A hex color value starting with {@code #} representing the background color for the + * Checkout Session. + */ + public Builder setBackgroundColor(EmptyParam backgroundColor) { + this.backgroundColor = backgroundColor; + return this; + } + + /** The border style for the Checkout Session. */ + public Builder setBorderStyle(SessionCreateParams.BrandingSettings.BorderStyle borderStyle) { + this.borderStyle = borderStyle; + return this; + } + + /** The border style for the Checkout Session. */ + public Builder setBorderStyle(EmptyParam borderStyle) { + this.borderStyle = borderStyle; + return this; + } + + /** + * A hex color value starting with {@code #} representing the button color for the Checkout + * Session. + */ + public Builder setButtonColor(String buttonColor) { + this.buttonColor = buttonColor; + return this; + } + + /** + * A hex color value starting with {@code #} representing the button color for the Checkout + * Session. + */ + public Builder setButtonColor(EmptyParam buttonColor) { + this.buttonColor = buttonColor; + return this; + } + + /** A string to override the business name shown on the Checkout Session. */ + public Builder setDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * SessionCreateParams.BrandingSettings#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link SessionCreateParams.BrandingSettings#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * The font family for the Checkout Session corresponding to one of the supported + * font families. + */ + public Builder setFontFamily(SessionCreateParams.BrandingSettings.FontFamily fontFamily) { + this.fontFamily = fontFamily; + return this; + } + + /** + * The font family for the Checkout Session corresponding to one of the supported + * font families. + */ + public Builder setFontFamily(EmptyParam fontFamily) { + this.fontFamily = fontFamily; + return this; + } + + /** The icon for the Checkout Session. You cannot set both {@code logo} and {@code icon}. */ + public Builder setIcon(SessionCreateParams.BrandingSettings.Icon icon) { + this.icon = icon; + return this; + } + + /** The logo for the Checkout Session. You cannot set both {@code logo} and {@code icon}. */ + public Builder setLogo(SessionCreateParams.BrandingSettings.Logo logo) { + this.logo = logo; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Icon { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * The ID of a File upload representing the + * icon. Purpose must be {@code business_icon}. Required if {@code type} is {@code file} and + * disallowed otherwise. + */ + @SerializedName("file") + String file; + + /** + * Required. The type of image for the icon. Must be one of {@code file} or + * {@code url}. + */ + @SerializedName("type") + Type type; + + /** The URL of the image. Required if {@code type} is {@code url} and disallowed otherwise. */ + @SerializedName("url") + String url; + + private Icon(Map extraParams, String file, Type type, String url) { + this.extraParams = extraParams; + this.file = file; + this.type = type; + this.url = url; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String file; + + private Type type; + + private String url; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionCreateParams.BrandingSettings.Icon build() { + return new SessionCreateParams.BrandingSettings.Icon( + this.extraParams, this.file, this.type, this.url); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionCreateParams.BrandingSettings.Icon#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionCreateParams.BrandingSettings.Icon#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * The ID of a File upload representing the + * icon. Purpose must be {@code business_icon}. Required if {@code type} is {@code file} and + * disallowed otherwise. + */ + public Builder setFile(String file) { + this.file = file; + return this; + } + + /** + * Required. The type of image for the icon. Must be one of {@code file} or + * {@code url}. + */ + public Builder setType(SessionCreateParams.BrandingSettings.Icon.Type type) { + this.type = type; + return this; + } + + /** + * The URL of the image. Required if {@code type} is {@code url} and disallowed otherwise. + */ + public Builder setUrl(String url) { + this.url = url; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("file") + FILE("file"), + + @SerializedName("url") + URL("url"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Logo { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * The ID of a File upload representing the + * logo. Purpose must be {@code business_logo}. Required if {@code type} is {@code file} and + * disallowed otherwise. + */ + @SerializedName("file") + String file; + + /** + * Required. The type of image for the logo. Must be one of {@code file} or + * {@code url}. + */ + @SerializedName("type") + Type type; + + /** The URL of the image. Required if {@code type} is {@code url} and disallowed otherwise. */ + @SerializedName("url") + String url; + + private Logo(Map extraParams, String file, Type type, String url) { + this.extraParams = extraParams; + this.file = file; + this.type = type; + this.url = url; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String file; + + private Type type; + + private String url; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionCreateParams.BrandingSettings.Logo build() { + return new SessionCreateParams.BrandingSettings.Logo( + this.extraParams, this.file, this.type, this.url); } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link SessionCreateParams.AutomaticTax.Liability#extraParams} for the field + * map. See {@link SessionCreateParams.BrandingSettings.Logo#extraParams} for the field * documentation. */ public Builder putExtraParam(String key, Object value) { @@ -1652,7 +2200,7 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link SessionCreateParams.AutomaticTax.Liability#extraParams} for the field + * map. See {@link SessionCreateParams.BrandingSettings.Logo#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -1663,19 +2211,40 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. Type of the account referenced in the request. */ - public Builder setType(SessionCreateParams.AutomaticTax.Liability.Type type) { + /** + * The ID of a File upload representing the + * logo. Purpose must be {@code business_logo}. Required if {@code type} is {@code file} and + * disallowed otherwise. + */ + public Builder setFile(String file) { + this.file = file; + return this; + } + + /** + * Required. The type of image for the logo. Must be one of {@code file} or + * {@code url}. + */ + public Builder setType(SessionCreateParams.BrandingSettings.Logo.Type type) { this.type = type; return this; } + + /** + * The URL of the image. Required if {@code type} is {@code url} and disallowed otherwise. + */ + public Builder setUrl(String url) { + this.url = url; + return this; + } } public enum Type implements ApiRequestParams.EnumParam { - @SerializedName("account") - ACCOUNT("account"), + @SerializedName("file") + FILE("file"), - @SerializedName("self") - SELF("self"); + @SerializedName("url") + URL("url"); @Getter(onMethod_ = {@Override}) private final String value; @@ -1685,6 +2254,111 @@ public enum Type implements ApiRequestParams.EnumParam { } } } + + public enum BorderStyle implements ApiRequestParams.EnumParam { + @SerializedName("pill") + PILL("pill"), + + @SerializedName("rectangular") + RECTANGULAR("rectangular"), + + @SerializedName("rounded") + ROUNDED("rounded"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + BorderStyle(String value) { + this.value = value; + } + } + + public enum FontFamily implements ApiRequestParams.EnumParam { + @SerializedName("be_vietnam_pro") + BE_VIETNAM_PRO("be_vietnam_pro"), + + @SerializedName("bitter") + BITTER("bitter"), + + @SerializedName("chakra_petch") + CHAKRA_PETCH("chakra_petch"), + + @SerializedName("default") + DEFAULT("default"), + + @SerializedName("hahmlet") + HAHMLET("hahmlet"), + + @SerializedName("inconsolata") + INCONSOLATA("inconsolata"), + + @SerializedName("inter") + INTER("inter"), + + @SerializedName("lato") + LATO("lato"), + + @SerializedName("lora") + LORA("lora"), + + @SerializedName("m_plus_1_code") + M_PLUS_1_CODE("m_plus_1_code"), + + @SerializedName("montserrat") + MONTSERRAT("montserrat"), + + @SerializedName("noto_sans") + NOTO_SANS("noto_sans"), + + @SerializedName("noto_sans_jp") + NOTO_SANS_JP("noto_sans_jp"), + + @SerializedName("noto_serif") + NOTO_SERIF("noto_serif"), + + @SerializedName("nunito") + NUNITO("nunito"), + + @SerializedName("open_sans") + OPEN_SANS("open_sans"), + + @SerializedName("pridi") + PRIDI("pridi"), + + @SerializedName("pt_sans") + PT_SANS("pt_sans"), + + @SerializedName("pt_serif") + PT_SERIF("pt_serif"), + + @SerializedName("raleway") + RALEWAY("raleway"), + + @SerializedName("roboto") + ROBOTO("roboto"), + + @SerializedName("roboto_slab") + ROBOTO_SLAB("roboto_slab"), + + @SerializedName("source_sans_pro") + SOURCE_SANS_PRO("source_sans_pro"), + + @SerializedName("titillium_web") + TITILLIUM_WEB("titillium_web"), + + @SerializedName("ubuntu_mono") + UBUNTU_MONO("ubuntu_mono"), + + @SerializedName("zen_maru_gothic") + ZEN_MARU_GOTHIC("zen_maru_gothic"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + FontFamily(String value) { + this.value = value; + } + } } @Getter @@ -4652,19 +5326,28 @@ public static class ProductData { @SerializedName("tax_code") String taxCode; + /** + * A label that represents units of this product. When set, this will be included in + * customers' receipts, invoices, Checkout, and the customer portal. + */ + @SerializedName("unit_label") + String unitLabel; + private ProductData( String description, Map extraParams, List images, Map metadata, String name, - String taxCode) { + String taxCode, + String unitLabel) { this.description = description; this.extraParams = extraParams; this.images = images; this.metadata = metadata; this.name = name; this.taxCode = taxCode; + this.unitLabel = unitLabel; } public static Builder builder() { @@ -4684,6 +5367,8 @@ public static class Builder { private String taxCode; + private String unitLabel; + /** Finalize and obtain parameter instance from this builder. */ public SessionCreateParams.LineItem.PriceData.ProductData build() { return new SessionCreateParams.LineItem.PriceData.ProductData( @@ -4692,7 +5377,8 @@ public SessionCreateParams.LineItem.PriceData.ProductData build() { this.images, this.metadata, this.name, - this.taxCode); + this.taxCode, + this.unitLabel); } /** @@ -4800,6 +5486,15 @@ public Builder setTaxCode(String taxCode) { this.taxCode = taxCode; return this; } + + /** + * A label that represents units of this product. When set, this will be included in + * customers' receipts, invoices, Checkout, and the customer portal. + */ + public Builder setUnitLabel(String unitLabel) { + this.unitLabel = unitLabel; + return this; + } } } @@ -4903,43 +5598,321 @@ public Builder setIntervalCount(Long intervalCount) { } } - public enum Interval implements ApiRequestParams.EnumParam { - @SerializedName("day") - DAY("day"), - - @SerializedName("month") - MONTH("month"), + public enum Interval implements ApiRequestParams.EnumParam { + @SerializedName("day") + DAY("day"), + + @SerializedName("month") + MONTH("month"), + + @SerializedName("week") + WEEK("week"), + + @SerializedName("year") + YEAR("year"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Interval(String value) { + this.value = value; + } + } + } + + public enum TaxBehavior implements ApiRequestParams.EnumParam { + @SerializedName("exclusive") + EXCLUSIVE("exclusive"), + + @SerializedName("inclusive") + INCLUSIVE("inclusive"), + + @SerializedName("unspecified") + UNSPECIFIED("unspecified"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + TaxBehavior(String value) { + this.value = value; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class NameCollection { + /** Controls settings applied for collecting the customer's business name on the session. */ + @SerializedName("business") + Business business; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Controls settings applied for collecting the customer's individual name on the session. */ + @SerializedName("individual") + Individual individual; + + private NameCollection( + Business business, Map extraParams, Individual individual) { + this.business = business; + this.extraParams = extraParams; + this.individual = individual; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Business business; + + private Map extraParams; + + private Individual individual; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionCreateParams.NameCollection build() { + return new SessionCreateParams.NameCollection( + this.business, this.extraParams, this.individual); + } + + /** Controls settings applied for collecting the customer's business name on the session. */ + public Builder setBusiness(SessionCreateParams.NameCollection.Business business) { + this.business = business; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * SessionCreateParams.NameCollection#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link SessionCreateParams.NameCollection#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Controls settings applied for collecting the customer's individual name on the session. */ + public Builder setIndividual(SessionCreateParams.NameCollection.Individual individual) { + this.individual = individual; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Business { + /** + * Required. Enable business name collection on the Checkout Session. + * Defaults to {@code false}. + */ + @SerializedName("enabled") + Boolean enabled; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Whether the customer is required to provide a business name before completing the Checkout + * Session. Defaults to {@code false}. + */ + @SerializedName("optional") + Boolean optional; + + private Business(Boolean enabled, Map extraParams, Boolean optional) { + this.enabled = enabled; + this.extraParams = extraParams; + this.optional = optional; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean enabled; + + private Map extraParams; + + private Boolean optional; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionCreateParams.NameCollection.Business build() { + return new SessionCreateParams.NameCollection.Business( + this.enabled, this.extraParams, this.optional); + } + + /** + * Required. Enable business name collection on the Checkout Session. + * Defaults to {@code false}. + */ + public Builder setEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionCreateParams.NameCollection.Business#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionCreateParams.NameCollection.Business#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Whether the customer is required to provide a business name before completing the + * Checkout Session. Defaults to {@code false}. + */ + public Builder setOptional(Boolean optional) { + this.optional = optional; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Individual { + /** + * Required. Enable individual name collection on the Checkout Session. + * Defaults to {@code false}. + */ + @SerializedName("enabled") + Boolean enabled; - @SerializedName("week") - WEEK("week"), + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - @SerializedName("year") - YEAR("year"); + /** + * Whether the customer is required to provide their name before completing the Checkout + * Session. Defaults to {@code false}. + */ + @SerializedName("optional") + Boolean optional; - @Getter(onMethod_ = {@Override}) - private final String value; + private Individual(Boolean enabled, Map extraParams, Boolean optional) { + this.enabled = enabled; + this.extraParams = extraParams; + this.optional = optional; + } - Interval(String value) { - this.value = value; - } - } + public static Builder builder() { + return new Builder(); } - public enum TaxBehavior implements ApiRequestParams.EnumParam { - @SerializedName("exclusive") - EXCLUSIVE("exclusive"), + public static class Builder { + private Boolean enabled; - @SerializedName("inclusive") - INCLUSIVE("inclusive"), + private Map extraParams; - @SerializedName("unspecified") - UNSPECIFIED("unspecified"); + private Boolean optional; - @Getter(onMethod_ = {@Override}) - private final String value; + /** Finalize and obtain parameter instance from this builder. */ + public SessionCreateParams.NameCollection.Individual build() { + return new SessionCreateParams.NameCollection.Individual( + this.enabled, this.extraParams, this.optional); + } - TaxBehavior(String value) { - this.value = value; + /** + * Required. Enable individual name collection on the Checkout Session. + * Defaults to {@code false}. + */ + public Builder setEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionCreateParams.NameCollection.Individual#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionCreateParams.NameCollection.Individual#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Whether the customer is required to provide their name before completing the Checkout + * Session. Defaults to {@code false}. + */ + public Builder setOptional(Boolean optional) { + this.optional = optional; + return this; } } } @@ -5735,11 +6708,13 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + /** + * Required. Address line 1, such as the street, PO Box, or company name. + */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -5842,13 +6817,15 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + /** + * Required. Address line 1, such as the street, PO Box, or company name. + */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -6113,6 +7090,10 @@ public static class PaymentMethodOptions { @SerializedName("alipay") Alipay alipay; + /** contains details about the Alma payment method options. */ + @SerializedName("alma") + Alma alma; + /** contains details about the AmazonPay payment method options. */ @SerializedName("amazon_pay") AmazonPay amazonPay; @@ -6129,6 +7110,10 @@ public static class PaymentMethodOptions { @SerializedName("bancontact") Bancontact bancontact; + /** contains details about the Billie payment method options. */ + @SerializedName("billie") + Billie billie; + /** contains details about the Boleto payment method options. */ @SerializedName("boleto") Boleto boleto; @@ -6145,6 +7130,10 @@ public static class PaymentMethodOptions { @SerializedName("customer_balance") CustomerBalance customerBalance; + /** contains details about the DemoPay payment method options. */ + @SerializedName("demo_pay") + DemoPay demoPay; + /** contains details about the EPS payment method options. */ @SerializedName("eps") Eps eps; @@ -6242,6 +7231,10 @@ public static class PaymentMethodOptions { @SerializedName("samsung_pay") SamsungPay samsungPay; + /** contains details about the Satispay payment method options. */ + @SerializedName("satispay") + Satispay satispay; + /** contains details about the Sepa Debit payment method options. */ @SerializedName("sepa_debit") SepaDebit sepaDebit; @@ -6267,14 +7260,17 @@ private PaymentMethodOptions( Affirm affirm, AfterpayClearpay afterpayClearpay, Alipay alipay, + Alma alma, AmazonPay amazonPay, AuBecsDebit auBecsDebit, BacsDebit bacsDebit, Bancontact bancontact, + Billie billie, Boleto boleto, Card card, Cashapp cashapp, CustomerBalance customerBalance, + DemoPay demoPay, Eps eps, Map extraParams, Fpx fpx, @@ -6298,6 +7294,7 @@ private PaymentMethodOptions( Pix pix, RevolutPay revolutPay, SamsungPay samsungPay, + Satispay satispay, SepaDebit sepaDebit, Sofort sofort, Swish swish, @@ -6307,14 +7304,17 @@ private PaymentMethodOptions( this.affirm = affirm; this.afterpayClearpay = afterpayClearpay; this.alipay = alipay; + this.alma = alma; this.amazonPay = amazonPay; this.auBecsDebit = auBecsDebit; this.bacsDebit = bacsDebit; this.bancontact = bancontact; + this.billie = billie; this.boleto = boleto; this.card = card; this.cashapp = cashapp; this.customerBalance = customerBalance; + this.demoPay = demoPay; this.eps = eps; this.extraParams = extraParams; this.fpx = fpx; @@ -6338,6 +7338,7 @@ private PaymentMethodOptions( this.pix = pix; this.revolutPay = revolutPay; this.samsungPay = samsungPay; + this.satispay = satispay; this.sepaDebit = sepaDebit; this.sofort = sofort; this.swish = swish; @@ -6358,6 +7359,8 @@ public static class Builder { private Alipay alipay; + private Alma alma; + private AmazonPay amazonPay; private AuBecsDebit auBecsDebit; @@ -6366,6 +7369,8 @@ public static class Builder { private Bancontact bancontact; + private Billie billie; + private Boleto boleto; private Card card; @@ -6374,6 +7379,8 @@ public static class Builder { private CustomerBalance customerBalance; + private DemoPay demoPay; + private Eps eps; private Map extraParams; @@ -6420,6 +7427,8 @@ public static class Builder { private SamsungPay samsungPay; + private Satispay satispay; + private SepaDebit sepaDebit; private Sofort sofort; @@ -6437,14 +7446,17 @@ public SessionCreateParams.PaymentMethodOptions build() { this.affirm, this.afterpayClearpay, this.alipay, + this.alma, this.amazonPay, this.auBecsDebit, this.bacsDebit, this.bancontact, + this.billie, this.boleto, this.card, this.cashapp, this.customerBalance, + this.demoPay, this.eps, this.extraParams, this.fpx, @@ -6468,6 +7480,7 @@ public SessionCreateParams.PaymentMethodOptions build() { this.pix, this.revolutPay, this.samsungPay, + this.satispay, this.sepaDebit, this.sofort, this.swish, @@ -6500,6 +7513,12 @@ public Builder setAlipay(SessionCreateParams.PaymentMethodOptions.Alipay alipay) return this; } + /** contains details about the Alma payment method options. */ + public Builder setAlma(SessionCreateParams.PaymentMethodOptions.Alma alma) { + this.alma = alma; + return this; + } + /** contains details about the AmazonPay payment method options. */ public Builder setAmazonPay(SessionCreateParams.PaymentMethodOptions.AmazonPay amazonPay) { this.amazonPay = amazonPay; @@ -6525,6 +7544,12 @@ public Builder setBancontact(SessionCreateParams.PaymentMethodOptions.Bancontact return this; } + /** contains details about the Billie payment method options. */ + public Builder setBillie(SessionCreateParams.PaymentMethodOptions.Billie billie) { + this.billie = billie; + return this; + } + /** contains details about the Boleto payment method options. */ public Builder setBoleto(SessionCreateParams.PaymentMethodOptions.Boleto boleto) { this.boleto = boleto; @@ -6550,6 +7575,12 @@ public Builder setCustomerBalance( return this; } + /** contains details about the DemoPay payment method options. */ + public Builder setDemoPay(SessionCreateParams.PaymentMethodOptions.DemoPay demoPay) { + this.demoPay = demoPay; + return this; + } + /** contains details about the EPS payment method options. */ public Builder setEps(SessionCreateParams.PaymentMethodOptions.Eps eps) { this.eps = eps; @@ -6709,6 +7740,12 @@ public Builder setSamsungPay(SessionCreateParams.PaymentMethodOptions.SamsungPay return this; } + /** contains details about the Satispay payment method options. */ + public Builder setSatispay(SessionCreateParams.PaymentMethodOptions.Satispay satispay) { + this.satispay = satispay; + return this; + } + /** contains details about the Sepa Debit payment method options. */ public Builder setSepaDebit(SessionCreateParams.PaymentMethodOptions.SepaDebit sepaDebit) { this.sepaDebit = sepaDebit; @@ -7237,6 +8274,10 @@ public enum VerificationMethod implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) public static class Affirm { + /** Controls when the funds will be captured from the customer's account. */ + @SerializedName("capture_method") + CaptureMethod captureMethod; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -7268,7 +8309,11 @@ public static class Affirm { @SerializedName("setup_future_usage") SetupFutureUsage setupFutureUsage; - private Affirm(Map extraParams, SetupFutureUsage setupFutureUsage) { + private Affirm( + CaptureMethod captureMethod, + Map extraParams, + SetupFutureUsage setupFutureUsage) { + this.captureMethod = captureMethod; this.extraParams = extraParams; this.setupFutureUsage = setupFutureUsage; } @@ -7278,6 +8323,8 @@ public static Builder builder() { } public static class Builder { + private CaptureMethod captureMethod; + private Map extraParams; private SetupFutureUsage setupFutureUsage; @@ -7285,7 +8332,14 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public SessionCreateParams.PaymentMethodOptions.Affirm build() { return new SessionCreateParams.PaymentMethodOptions.Affirm( - this.extraParams, this.setupFutureUsage); + this.captureMethod, this.extraParams, this.setupFutureUsage); + } + + /** Controls when the funds will be captured from the customer's account. */ + public Builder setCaptureMethod( + SessionCreateParams.PaymentMethodOptions.Affirm.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + return this; } /** @@ -7343,6 +8397,18 @@ public Builder setSetupFutureUsage( } } + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @SerializedName("none") NONE("none"); @@ -7359,6 +8425,10 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) public static class AfterpayClearpay { + /** Controls when the funds will be captured from the customer's account. */ + @SerializedName("capture_method") + CaptureMethod captureMethod; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -7390,7 +8460,11 @@ public static class AfterpayClearpay { @SerializedName("setup_future_usage") SetupFutureUsage setupFutureUsage; - private AfterpayClearpay(Map extraParams, SetupFutureUsage setupFutureUsage) { + private AfterpayClearpay( + CaptureMethod captureMethod, + Map extraParams, + SetupFutureUsage setupFutureUsage) { + this.captureMethod = captureMethod; this.extraParams = extraParams; this.setupFutureUsage = setupFutureUsage; } @@ -7400,6 +8474,8 @@ public static Builder builder() { } public static class Builder { + private CaptureMethod captureMethod; + private Map extraParams; private SetupFutureUsage setupFutureUsage; @@ -7407,7 +8483,14 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public SessionCreateParams.PaymentMethodOptions.AfterpayClearpay build() { return new SessionCreateParams.PaymentMethodOptions.AfterpayClearpay( - this.extraParams, this.setupFutureUsage); + this.captureMethod, this.extraParams, this.setupFutureUsage); + } + + /** Controls when the funds will be captured from the customer's account. */ + public Builder setCaptureMethod( + SessionCreateParams.PaymentMethodOptions.AfterpayClearpay.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + return this; } /** @@ -7466,6 +8549,18 @@ public Builder setSetupFutureUsage( } } + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @SerializedName("none") NONE("none"); @@ -7588,14 +8683,99 @@ public Builder setSetupFutureUsage( } } - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"); + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Alma { + /** Controls when the funds will be captured from the customer's account. */ + @SerializedName("capture_method") + CaptureMethod captureMethod; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Alma(CaptureMethod captureMethod, Map extraParams) { + this.captureMethod = captureMethod; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private CaptureMethod captureMethod; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionCreateParams.PaymentMethodOptions.Alma build() { + return new SessionCreateParams.PaymentMethodOptions.Alma( + this.captureMethod, this.extraParams); + } + + /** Controls when the funds will be captured from the customer's account. */ + public Builder setCaptureMethod( + SessionCreateParams.PaymentMethodOptions.Alma.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionCreateParams.PaymentMethodOptions.Alma#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionCreateParams.PaymentMethodOptions.Alma#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); @Getter(onMethod_ = {@Override}) private final String value; - SetupFutureUsage(String value) { + CaptureMethod(String value) { this.value = value; } } @@ -7604,6 +8784,10 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) public static class AmazonPay { + /** Controls when the funds will be captured from the customer's account. */ + @SerializedName("capture_method") + CaptureMethod captureMethod; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -7635,7 +8819,11 @@ public static class AmazonPay { @SerializedName("setup_future_usage") SetupFutureUsage setupFutureUsage; - private AmazonPay(Map extraParams, SetupFutureUsage setupFutureUsage) { + private AmazonPay( + CaptureMethod captureMethod, + Map extraParams, + SetupFutureUsage setupFutureUsage) { + this.captureMethod = captureMethod; this.extraParams = extraParams; this.setupFutureUsage = setupFutureUsage; } @@ -7645,6 +8833,8 @@ public static Builder builder() { } public static class Builder { + private CaptureMethod captureMethod; + private Map extraParams; private SetupFutureUsage setupFutureUsage; @@ -7652,7 +8842,14 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public SessionCreateParams.PaymentMethodOptions.AmazonPay build() { return new SessionCreateParams.PaymentMethodOptions.AmazonPay( - this.extraParams, this.setupFutureUsage); + this.captureMethod, this.extraParams, this.setupFutureUsage); + } + + /** Controls when the funds will be captured from the customer's account. */ + public Builder setCaptureMethod( + SessionCreateParams.PaymentMethodOptions.AmazonPay.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + return this; } /** @@ -7710,6 +8907,18 @@ public Builder setSetupFutureUsage( } } + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @SerializedName("none") NONE("none"), @@ -8253,6 +9462,91 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Billie { + /** Controls when the funds will be captured from the customer's account. */ + @SerializedName("capture_method") + CaptureMethod captureMethod; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Billie(CaptureMethod captureMethod, Map extraParams) { + this.captureMethod = captureMethod; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private CaptureMethod captureMethod; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionCreateParams.PaymentMethodOptions.Billie build() { + return new SessionCreateParams.PaymentMethodOptions.Billie( + this.captureMethod, this.extraParams); + } + + /** Controls when the funds will be captured from the customer's account. */ + public Builder setCaptureMethod( + SessionCreateParams.PaymentMethodOptions.Billie.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionCreateParams.PaymentMethodOptions.Billie#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionCreateParams.PaymentMethodOptions.Billie#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Boleto { @@ -8408,6 +9702,10 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) public static class Card { + /** Controls when the funds will be captured from the customer's account. */ + @SerializedName("capture_method") + CaptureMethod captureMethod; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -8514,6 +9812,7 @@ public static class Card { String statementDescriptorSuffixKanji; private Card( + CaptureMethod captureMethod, Map extraParams, Installments installments, RequestExtendedAuthorization requestExtendedAuthorization, @@ -8525,6 +9824,7 @@ private Card( SetupFutureUsage setupFutureUsage, String statementDescriptorSuffixKana, String statementDescriptorSuffixKanji) { + this.captureMethod = captureMethod; this.extraParams = extraParams; this.installments = installments; this.requestExtendedAuthorization = requestExtendedAuthorization; @@ -8543,6 +9843,8 @@ public static Builder builder() { } public static class Builder { + private CaptureMethod captureMethod; + private Map extraParams; private Installments installments; @@ -8568,6 +9870,7 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public SessionCreateParams.PaymentMethodOptions.Card build() { return new SessionCreateParams.PaymentMethodOptions.Card( + this.captureMethod, this.extraParams, this.installments, this.requestExtendedAuthorization, @@ -8581,6 +9884,13 @@ public SessionCreateParams.PaymentMethodOptions.Card build() { this.statementDescriptorSuffixKanji); } + /** Controls when the funds will be captured from the customer's account. */ + public Builder setCaptureMethod( + SessionCreateParams.PaymentMethodOptions.Card.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + return this; + } + /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original @@ -8943,6 +10253,18 @@ public enum BrandsBlocked implements ApiRequestParams.EnumParam { } } + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } + public enum RequestExtendedAuthorization implements ApiRequestParams.EnumParam { @SerializedName("if_available") IF_AVAILABLE("if_available"), @@ -9040,6 +10362,10 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) public static class Cashapp { + /** Controls when the funds will be captured from the customer's account. */ + @SerializedName("capture_method") + CaptureMethod captureMethod; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -9071,7 +10397,11 @@ public static class Cashapp { @SerializedName("setup_future_usage") SetupFutureUsage setupFutureUsage; - private Cashapp(Map extraParams, SetupFutureUsage setupFutureUsage) { + private Cashapp( + CaptureMethod captureMethod, + Map extraParams, + SetupFutureUsage setupFutureUsage) { + this.captureMethod = captureMethod; this.extraParams = extraParams; this.setupFutureUsage = setupFutureUsage; } @@ -9081,6 +10411,8 @@ public static Builder builder() { } public static class Builder { + private CaptureMethod captureMethod; + private Map extraParams; private SetupFutureUsage setupFutureUsage; @@ -9088,7 +10420,14 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public SessionCreateParams.PaymentMethodOptions.Cashapp build() { return new SessionCreateParams.PaymentMethodOptions.Cashapp( - this.extraParams, this.setupFutureUsage); + this.captureMethod, this.extraParams, this.setupFutureUsage); + } + + /** Controls when the funds will be captured from the customer's account. */ + public Builder setCaptureMethod( + SessionCreateParams.PaymentMethodOptions.Cashapp.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + return this; } /** @@ -9146,6 +10485,18 @@ public Builder setSetupFutureUsage( } } + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @SerializedName("none") NONE("none"), @@ -9616,23 +10967,148 @@ public enum Type implements ApiRequestParams.EnumParam { this.value = value; } } - } - - public enum FundingType implements ApiRequestParams.EnumParam { - @SerializedName("bank_transfer") - BANK_TRANSFER("bank_transfer"); + } + + public enum FundingType implements ApiRequestParams.EnumParam { + @SerializedName("bank_transfer") + BANK_TRANSFER("bank_transfer"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + FundingType(String value) { + this.value = value; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class DemoPay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

If you provide a Customer with the PaymentIntent, you can use this parameter to attach the payment method to the + * Customer after the PaymentIntent is confirmed and the customer completes any required + * actions. If you don't provide a Customer, you can still attach the payment method to a + * Customer after the transaction completes. + * + *

If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates + * and attaches a generated_card + * payment method representing the card to the Customer instead. + * + *

When processing card payments, Stripe uses {@code setup_future_usage} to help you comply + * with regional legislation and network rules, such as SCA. + */ + @SerializedName("setup_future_usage") + SetupFutureUsage setupFutureUsage; + + private DemoPay(Map extraParams, SetupFutureUsage setupFutureUsage) { + this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private SetupFutureUsage setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionCreateParams.PaymentMethodOptions.DemoPay build() { + return new SessionCreateParams.PaymentMethodOptions.DemoPay( + this.extraParams, this.setupFutureUsage); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionCreateParams.PaymentMethodOptions.DemoPay#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionCreateParams.PaymentMethodOptions.DemoPay#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } - FundingType(String value) { - this.value = value; + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

If you provide a Customer with the PaymentIntent, you can use this parameter to attach the payment method to + * the Customer after the PaymentIntent is confirmed and the customer completes any required + * actions. If you don't provide a Customer, you can still attach the payment method to a + * Customer after the transaction completes. + * + *

If the payment method is {@code card_present} and isn't a digital wallet, Stripe + * creates and attaches a generated_card + * payment method representing the card to the Customer instead. + * + *

When processing card payments, Stripe uses {@code setup_future_usage} to help you + * comply with regional legislation and network rules, such as SCA. + */ + public Builder setSetupFutureUsage( + SessionCreateParams.PaymentMethodOptions.DemoPay.SetupFutureUsage setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; } } public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @SerializedName("none") - NONE("none"); + NONE("none"), + + @SerializedName("off_session") + OFF_SESSION("off_session"); @Getter(onMethod_ = {@Override}) private final String value; @@ -10410,6 +11886,10 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) public static class Klarna { + /** Controls when the funds will be captured from the customer's account. */ + @SerializedName("capture_method") + CaptureMethod captureMethod; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -10446,9 +11926,11 @@ public static class Klarna { Object subscriptions; private Klarna( + CaptureMethod captureMethod, Map extraParams, SetupFutureUsage setupFutureUsage, Object subscriptions) { + this.captureMethod = captureMethod; this.extraParams = extraParams; this.setupFutureUsage = setupFutureUsage; this.subscriptions = subscriptions; @@ -10459,6 +11941,8 @@ public static Builder builder() { } public static class Builder { + private CaptureMethod captureMethod; + private Map extraParams; private SetupFutureUsage setupFutureUsage; @@ -10468,7 +11952,14 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public SessionCreateParams.PaymentMethodOptions.Klarna build() { return new SessionCreateParams.PaymentMethodOptions.Klarna( - this.extraParams, this.setupFutureUsage, this.subscriptions); + this.captureMethod, this.extraParams, this.setupFutureUsage, this.subscriptions); + } + + /** Controls when the funds will be captured from the customer's account. */ + public Builder setCaptureMethod( + SessionCreateParams.PaymentMethodOptions.Klarna.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + return this; } /** @@ -10846,6 +12337,18 @@ public enum Interval implements ApiRequestParams.EnumParam { } } + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @SerializedName("none") NONE("none"); @@ -11164,6 +12667,10 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) public static class Link { + /** Controls when the funds will be captured from the customer's account. */ + @SerializedName("capture_method") + CaptureMethod captureMethod; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -11195,7 +12702,11 @@ public static class Link { @SerializedName("setup_future_usage") SetupFutureUsage setupFutureUsage; - private Link(Map extraParams, SetupFutureUsage setupFutureUsage) { + private Link( + CaptureMethod captureMethod, + Map extraParams, + SetupFutureUsage setupFutureUsage) { + this.captureMethod = captureMethod; this.extraParams = extraParams; this.setupFutureUsage = setupFutureUsage; } @@ -11205,6 +12716,8 @@ public static Builder builder() { } public static class Builder { + private CaptureMethod captureMethod; + private Map extraParams; private SetupFutureUsage setupFutureUsage; @@ -11212,7 +12725,14 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public SessionCreateParams.PaymentMethodOptions.Link build() { return new SessionCreateParams.PaymentMethodOptions.Link( - this.extraParams, this.setupFutureUsage); + this.captureMethod, this.extraParams, this.setupFutureUsage); + } + + /** Controls when the funds will be captured from the customer's account. */ + public Builder setCaptureMethod( + SessionCreateParams.PaymentMethodOptions.Link.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + return this; } /** @@ -11270,6 +12790,18 @@ public Builder setSetupFutureUsage( } } + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @SerializedName("none") NONE("none"), @@ -11289,6 +12821,10 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) public static class Mobilepay { + /** Controls when the funds will be captured from the customer's account. */ + @SerializedName("capture_method") + CaptureMethod captureMethod; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -11320,7 +12856,11 @@ public static class Mobilepay { @SerializedName("setup_future_usage") SetupFutureUsage setupFutureUsage; - private Mobilepay(Map extraParams, SetupFutureUsage setupFutureUsage) { + private Mobilepay( + CaptureMethod captureMethod, + Map extraParams, + SetupFutureUsage setupFutureUsage) { + this.captureMethod = captureMethod; this.extraParams = extraParams; this.setupFutureUsage = setupFutureUsage; } @@ -11330,6 +12870,8 @@ public static Builder builder() { } public static class Builder { + private CaptureMethod captureMethod; + private Map extraParams; private SetupFutureUsage setupFutureUsage; @@ -11337,7 +12879,14 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public SessionCreateParams.PaymentMethodOptions.Mobilepay build() { return new SessionCreateParams.PaymentMethodOptions.Mobilepay( - this.extraParams, this.setupFutureUsage); + this.captureMethod, this.extraParams, this.setupFutureUsage); + } + + /** Controls when the funds will be captured from the customer's account. */ + public Builder setCaptureMethod( + SessionCreateParams.PaymentMethodOptions.Mobilepay.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + return this; } /** @@ -11395,6 +12944,18 @@ public Builder setSetupFutureUsage( } } + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @SerializedName("none") NONE("none"); @@ -12746,6 +14307,10 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) public static class RevolutPay { + /** Controls when the funds will be captured from the customer's account. */ + @SerializedName("capture_method") + CaptureMethod captureMethod; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -12777,7 +14342,11 @@ public static class RevolutPay { @SerializedName("setup_future_usage") SetupFutureUsage setupFutureUsage; - private RevolutPay(Map extraParams, SetupFutureUsage setupFutureUsage) { + private RevolutPay( + CaptureMethod captureMethod, + Map extraParams, + SetupFutureUsage setupFutureUsage) { + this.captureMethod = captureMethod; this.extraParams = extraParams; this.setupFutureUsage = setupFutureUsage; } @@ -12787,6 +14356,8 @@ public static Builder builder() { } public static class Builder { + private CaptureMethod captureMethod; + private Map extraParams; private SetupFutureUsage setupFutureUsage; @@ -12794,7 +14365,14 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public SessionCreateParams.PaymentMethodOptions.RevolutPay build() { return new SessionCreateParams.PaymentMethodOptions.RevolutPay( - this.extraParams, this.setupFutureUsage); + this.captureMethod, this.extraParams, this.setupFutureUsage); + } + + /** Controls when the funds will be captured from the customer's account. */ + public Builder setCaptureMethod( + SessionCreateParams.PaymentMethodOptions.RevolutPay.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + return this; } /** @@ -12845,24 +14423,121 @@ public Builder putAllExtraParam(Map map) { * comply with regional legislation and network rules, such as SCA. */ - public Builder setSetupFutureUsage( - SessionCreateParams.PaymentMethodOptions.RevolutPay.SetupFutureUsage setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; + public Builder setSetupFutureUsage( + SessionCreateParams.PaymentMethodOptions.RevolutPay.SetupFutureUsage setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), + + @SerializedName("off_session") + OFF_SESSION("off_session"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class SamsungPay { + /** Controls when the funds will be captured from the customer's account. */ + @SerializedName("capture_method") + CaptureMethod captureMethod; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private SamsungPay(CaptureMethod captureMethod, Map extraParams) { + this.captureMethod = captureMethod; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private CaptureMethod captureMethod; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionCreateParams.PaymentMethodOptions.SamsungPay build() { + return new SessionCreateParams.PaymentMethodOptions.SamsungPay( + this.captureMethod, this.extraParams); + } + + /** Controls when the funds will be captured from the customer's account. */ + public Builder setCaptureMethod( + SessionCreateParams.PaymentMethodOptions.SamsungPay.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionCreateParams.PaymentMethodOptions.SamsungPay#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionCreateParams.PaymentMethodOptions.SamsungPay#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); return this; } } - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"), - - @SerializedName("off_session") - OFF_SESSION("off_session"); + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); @Getter(onMethod_ = {@Override}) private final String value; - SetupFutureUsage(String value) { + CaptureMethod(String value) { this.value = value; } } @@ -12870,7 +14545,7 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) - public static class SamsungPay { + public static class Satispay { /** Controls when the funds will be captured from the customer's account. */ @SerializedName("capture_method") CaptureMethod captureMethod; @@ -12884,7 +14559,7 @@ public static class SamsungPay { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private SamsungPay(CaptureMethod captureMethod, Map extraParams) { + private Satispay(CaptureMethod captureMethod, Map extraParams) { this.captureMethod = captureMethod; this.extraParams = extraParams; } @@ -12899,14 +14574,14 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public SessionCreateParams.PaymentMethodOptions.SamsungPay build() { - return new SessionCreateParams.PaymentMethodOptions.SamsungPay( + public SessionCreateParams.PaymentMethodOptions.Satispay build() { + return new SessionCreateParams.PaymentMethodOptions.Satispay( this.captureMethod, this.extraParams); } /** Controls when the funds will be captured from the customer's account. */ public Builder setCaptureMethod( - SessionCreateParams.PaymentMethodOptions.SamsungPay.CaptureMethod captureMethod) { + SessionCreateParams.PaymentMethodOptions.Satispay.CaptureMethod captureMethod) { this.captureMethod = captureMethod; return this; } @@ -12914,7 +14589,7 @@ public Builder setCaptureMethod( /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link SessionCreateParams.PaymentMethodOptions.SamsungPay#extraParams} for the + * map. See {@link SessionCreateParams.PaymentMethodOptions.Satispay#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -12928,7 +14603,7 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link SessionCreateParams.PaymentMethodOptions.SamsungPay#extraParams} for the + * map. See {@link SessionCreateParams.PaymentMethodOptions.Satispay#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -16640,15 +18315,20 @@ public static class BillingMode { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Configure behavior for flexible billing mode. */ + @SerializedName("flexible") + Flexible flexible; + /** * Required. Controls the calculation and orchestration of prorations and - * invoices for subscriptions. + * invoices for subscriptions. If no value is passed, the default is {@code flexible}. */ @SerializedName("type") Type type; - private BillingMode(Map extraParams, Type type) { + private BillingMode(Map extraParams, Flexible flexible, Type type) { this.extraParams = extraParams; + this.flexible = flexible; this.type = type; } @@ -16659,11 +18339,14 @@ public static Builder builder() { public static class Builder { private Map extraParams; + private Flexible flexible; + private Type type; /** Finalize and obtain parameter instance from this builder. */ public SessionCreateParams.SubscriptionData.BillingMode build() { - return new SessionCreateParams.SubscriptionData.BillingMode(this.extraParams, this.type); + return new SessionCreateParams.SubscriptionData.BillingMode( + this.extraParams, this.flexible, this.type); } /** @@ -16694,9 +18377,16 @@ public Builder putAllExtraParam(Map map) { return this; } + /** Configure behavior for flexible billing mode. */ + public Builder setFlexible( + SessionCreateParams.SubscriptionData.BillingMode.Flexible flexible) { + this.flexible = flexible; + return this; + } + /** * Required. Controls the calculation and orchestration of prorations and - * invoices for subscriptions. + * invoices for subscriptions. If no value is passed, the default is {@code flexible}. */ public Builder setType(SessionCreateParams.SubscriptionData.BillingMode.Type type) { this.type = type; @@ -16704,6 +18394,100 @@ public Builder setType(SessionCreateParams.SubscriptionData.BillingMode.Type typ } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Flexible { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Controls how invoices and invoice items display proration amounts and discount amounts. + */ + @SerializedName("proration_discounts") + ProrationDiscounts prorationDiscounts; + + private Flexible(Map extraParams, ProrationDiscounts prorationDiscounts) { + this.extraParams = extraParams; + this.prorationDiscounts = prorationDiscounts; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private ProrationDiscounts prorationDiscounts; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionCreateParams.SubscriptionData.BillingMode.Flexible build() { + return new SessionCreateParams.SubscriptionData.BillingMode.Flexible( + this.extraParams, this.prorationDiscounts); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionCreateParams.SubscriptionData.BillingMode.Flexible#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionCreateParams.SubscriptionData.BillingMode.Flexible#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Controls how invoices and invoice items display proration amounts and discount amounts. + */ + public Builder setProrationDiscounts( + SessionCreateParams.SubscriptionData.BillingMode.Flexible.ProrationDiscounts + prorationDiscounts) { + this.prorationDiscounts = prorationDiscounts; + return this; + } + } + + public enum ProrationDiscounts implements ApiRequestParams.EnumParam { + @SerializedName("included") + INCLUDED("included"), + + @SerializedName("itemized") + ITEMIZED("itemized"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ProrationDiscounts(String value) { + this.value = value; + } + } + } + public enum Type implements ApiRequestParams.EnumParam { @SerializedName("classic") CLASSIC("classic"), @@ -17491,6 +19275,159 @@ public enum CustomerCreation implements ApiRequestParams.EnumParam { } } + public enum ExcludedPaymentMethodType implements ApiRequestParams.EnumParam { + @SerializedName("acss_debit") + ACSS_DEBIT("acss_debit"), + + @SerializedName("affirm") + AFFIRM("affirm"), + + @SerializedName("afterpay_clearpay") + AFTERPAY_CLEARPAY("afterpay_clearpay"), + + @SerializedName("alipay") + ALIPAY("alipay"), + + @SerializedName("alma") + ALMA("alma"), + + @SerializedName("amazon_pay") + AMAZON_PAY("amazon_pay"), + + @SerializedName("au_becs_debit") + AU_BECS_DEBIT("au_becs_debit"), + + @SerializedName("bacs_debit") + BACS_DEBIT("bacs_debit"), + + @SerializedName("bancontact") + BANCONTACT("bancontact"), + + @SerializedName("billie") + BILLIE("billie"), + + @SerializedName("blik") + BLIK("blik"), + + @SerializedName("boleto") + BOLETO("boleto"), + + @SerializedName("card") + CARD("card"), + + @SerializedName("cashapp") + CASHAPP("cashapp"), + + @SerializedName("crypto") + CRYPTO("crypto"), + + @SerializedName("customer_balance") + CUSTOMER_BALANCE("customer_balance"), + + @SerializedName("eps") + EPS("eps"), + + @SerializedName("fpx") + FPX("fpx"), + + @SerializedName("giropay") + GIROPAY("giropay"), + + @SerializedName("grabpay") + GRABPAY("grabpay"), + + @SerializedName("ideal") + IDEAL("ideal"), + + @SerializedName("kakao_pay") + KAKAO_PAY("kakao_pay"), + + @SerializedName("klarna") + KLARNA("klarna"), + + @SerializedName("konbini") + KONBINI("konbini"), + + @SerializedName("kr_card") + KR_CARD("kr_card"), + + @SerializedName("mobilepay") + MOBILEPAY("mobilepay"), + + @SerializedName("multibanco") + MULTIBANCO("multibanco"), + + @SerializedName("naver_pay") + NAVER_PAY("naver_pay"), + + @SerializedName("nz_bank_account") + NZ_BANK_ACCOUNT("nz_bank_account"), + + @SerializedName("oxxo") + OXXO("oxxo"), + + @SerializedName("p24") + P24("p24"), + + @SerializedName("pay_by_bank") + PAY_BY_BANK("pay_by_bank"), + + @SerializedName("payco") + PAYCO("payco"), + + @SerializedName("paynow") + PAYNOW("paynow"), + + @SerializedName("paypal") + PAYPAL("paypal"), + + @SerializedName("paypay") + PAYPAY("paypay"), + + @SerializedName("pix") + PIX("pix"), + + @SerializedName("promptpay") + PROMPTPAY("promptpay"), + + @SerializedName("revolut_pay") + REVOLUT_PAY("revolut_pay"), + + @SerializedName("samsung_pay") + SAMSUNG_PAY("samsung_pay"), + + @SerializedName("satispay") + SATISPAY("satispay"), + + @SerializedName("sepa_debit") + SEPA_DEBIT("sepa_debit"), + + @SerializedName("sofort") + SOFORT("sofort"), + + @SerializedName("swish") + SWISH("swish"), + + @SerializedName("twint") + TWINT("twint"), + + @SerializedName("us_bank_account") + US_BANK_ACCOUNT("us_bank_account"), + + @SerializedName("wechat_pay") + WECHAT_PAY("wechat_pay"), + + @SerializedName("zip") + ZIP("zip"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ExcludedPaymentMethodType(String value) { + this.value = value; + } + } + public enum Locale implements ApiRequestParams.EnumParam { @SerializedName("auto") AUTO("auto"), @@ -17780,6 +19717,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("paypay") + PAYPAY("paypay"), + @SerializedName("pix") PIX("pix"), diff --git a/src/main/java/com/stripe/param/checkout/SessionUpdateParams.java b/src/main/java/com/stripe/param/checkout/SessionUpdateParams.java index a48b892252b..1cbccc6b6e0 100644 --- a/src/main/java/com/stripe/param/checkout/SessionUpdateParams.java +++ b/src/main/java/com/stripe/param/checkout/SessionUpdateParams.java @@ -423,11 +423,13 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + /** + * Required. Address line 1, such as the street, PO Box, or company name. + */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -547,25 +549,29 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + /** + * Required. Address line 1, such as the street, PO Box, or company name. + */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + /** + * Required. Address line 1, such as the street, PO Box, or company name. + */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; diff --git a/src/main/java/com/stripe/param/issuing/AuthorizationCreateParams.java b/src/main/java/com/stripe/param/issuing/AuthorizationCreateParams.java index f0f905606c0..88ea2baed99 100644 --- a/src/main/java/com/stripe/param/issuing/AuthorizationCreateParams.java +++ b/src/main/java/com/stripe/param/issuing/AuthorizationCreateParams.java @@ -62,6 +62,13 @@ public class AuthorizationCreateParams extends ApiRequestParams { @SerializedName("fleet") Fleet fleet; + /** + * Probability that this transaction can be disputed in the event of fraud. Assessed by comparing + * the characteristics of the authorization to card network rules. + */ + @SerializedName("fraud_disputability_likelihood") + FraudDisputabilityLikelihood fraudDisputabilityLikelihood; + /** Information about fuel that was purchased with this transaction. */ @SerializedName("fuel") Fuel fuel; @@ -100,6 +107,10 @@ public class AuthorizationCreateParams extends ApiRequestParams { @SerializedName("network_data") NetworkData networkData; + /** Stripe’s assessment of the fraud risk for this authorization. */ + @SerializedName("risk_assessment") + RiskAssessment riskAssessment; + /** * Verifications that Stripe performed on information that the cardholder provided to the * merchant. @@ -123,12 +134,14 @@ private AuthorizationCreateParams( List expand, Map extraParams, Fleet fleet, + FraudDisputabilityLikelihood fraudDisputabilityLikelihood, Fuel fuel, Boolean isAmountControllable, Long merchantAmount, String merchantCurrency, MerchantData merchantData, NetworkData networkData, + RiskAssessment riskAssessment, VerificationData verificationData, Wallet wallet) { this.amount = amount; @@ -139,12 +152,14 @@ private AuthorizationCreateParams( this.expand = expand; this.extraParams = extraParams; this.fleet = fleet; + this.fraudDisputabilityLikelihood = fraudDisputabilityLikelihood; this.fuel = fuel; this.isAmountControllable = isAmountControllable; this.merchantAmount = merchantAmount; this.merchantCurrency = merchantCurrency; this.merchantData = merchantData; this.networkData = networkData; + this.riskAssessment = riskAssessment; this.verificationData = verificationData; this.wallet = wallet; } @@ -170,6 +185,8 @@ public static class Builder { private Fleet fleet; + private FraudDisputabilityLikelihood fraudDisputabilityLikelihood; + private Fuel fuel; private Boolean isAmountControllable; @@ -182,6 +199,8 @@ public static class Builder { private NetworkData networkData; + private RiskAssessment riskAssessment; + private VerificationData verificationData; private Wallet wallet; @@ -197,12 +216,14 @@ public AuthorizationCreateParams build() { this.expand, this.extraParams, this.fleet, + this.fraudDisputabilityLikelihood, this.fuel, this.isAmountControllable, this.merchantAmount, this.merchantCurrency, this.merchantData, this.networkData, + this.riskAssessment, this.verificationData, this.wallet); } @@ -309,6 +330,16 @@ public Builder setFleet(AuthorizationCreateParams.Fleet fleet) { return this; } + /** + * Probability that this transaction can be disputed in the event of fraud. Assessed by + * comparing the characteristics of the authorization to card network rules. + */ + public Builder setFraudDisputabilityLikelihood( + AuthorizationCreateParams.FraudDisputabilityLikelihood fraudDisputabilityLikelihood) { + this.fraudDisputabilityLikelihood = fraudDisputabilityLikelihood; + return this; + } + /** Information about fuel that was purchased with this transaction. */ public Builder setFuel(AuthorizationCreateParams.Fuel fuel) { this.fuel = fuel; @@ -361,6 +392,12 @@ public Builder setNetworkData(AuthorizationCreateParams.NetworkData networkData) return this; } + /** Stripe’s assessment of the fraud risk for this authorization. */ + public Builder setRiskAssessment(AuthorizationCreateParams.RiskAssessment riskAssessment) { + this.riskAssessment = riskAssessment; + return this; + } + /** * Verifications that Stripe performed on information that the cardholder provided to the * merchant. @@ -2559,6 +2596,392 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class RiskAssessment { + /** Stripe's assessment of this authorization's likelihood of being card testing activity. */ + @SerializedName("card_testing_risk") + CardTestingRisk cardTestingRisk; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * The dispute risk of the merchant (the seller on a purchase) on an authorization based on all + * Stripe Issuing activity. + */ + @SerializedName("merchant_dispute_risk") + MerchantDisputeRisk merchantDisputeRisk; + + private RiskAssessment( + CardTestingRisk cardTestingRisk, + Map extraParams, + MerchantDisputeRisk merchantDisputeRisk) { + this.cardTestingRisk = cardTestingRisk; + this.extraParams = extraParams; + this.merchantDisputeRisk = merchantDisputeRisk; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private CardTestingRisk cardTestingRisk; + + private Map extraParams; + + private MerchantDisputeRisk merchantDisputeRisk; + + /** Finalize and obtain parameter instance from this builder. */ + public AuthorizationCreateParams.RiskAssessment build() { + return new AuthorizationCreateParams.RiskAssessment( + this.cardTestingRisk, this.extraParams, this.merchantDisputeRisk); + } + + /** Stripe's assessment of this authorization's likelihood of being card testing activity. */ + public Builder setCardTestingRisk( + AuthorizationCreateParams.RiskAssessment.CardTestingRisk cardTestingRisk) { + this.cardTestingRisk = cardTestingRisk; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * AuthorizationCreateParams.RiskAssessment#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link AuthorizationCreateParams.RiskAssessment#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * The dispute risk of the merchant (the seller on a purchase) on an authorization based on + * all Stripe Issuing activity. + */ + public Builder setMerchantDisputeRisk( + AuthorizationCreateParams.RiskAssessment.MerchantDisputeRisk merchantDisputeRisk) { + this.merchantDisputeRisk = merchantDisputeRisk; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CardTestingRisk { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * The % of declines due to a card number not existing in the past hour, taking place at the + * same merchant. Higher rates correspond to a greater probability of card testing activity, + * meaning bad actors may be attempting different card number combinations to guess a correct + * one. Takes on values between 0 and 100. + */ + @SerializedName("invalid_account_number_decline_rate_past_hour") + Long invalidAccountNumberDeclineRatePastHour; + + /** + * The % of declines due to incorrect verification data (like CVV or expiry) in the past hour, + * taking place at the same merchant. Higher rates correspond to a greater probability of bad + * actors attempting to utilize valid card credentials at merchants with verification + * requirements. Takes on values between 0 and 100. + */ + @SerializedName("invalid_credentials_decline_rate_past_hour") + Long invalidCredentialsDeclineRatePastHour; + + /** + * Required. The likelihood that this authorization is associated with card + * testing activity. This is assessed by evaluating decline activity over the last hour. + */ + @SerializedName("risk_level") + RiskLevel riskLevel; + + private CardTestingRisk( + Map extraParams, + Long invalidAccountNumberDeclineRatePastHour, + Long invalidCredentialsDeclineRatePastHour, + RiskLevel riskLevel) { + this.extraParams = extraParams; + this.invalidAccountNumberDeclineRatePastHour = invalidAccountNumberDeclineRatePastHour; + this.invalidCredentialsDeclineRatePastHour = invalidCredentialsDeclineRatePastHour; + this.riskLevel = riskLevel; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Long invalidAccountNumberDeclineRatePastHour; + + private Long invalidCredentialsDeclineRatePastHour; + + private RiskLevel riskLevel; + + /** Finalize and obtain parameter instance from this builder. */ + public AuthorizationCreateParams.RiskAssessment.CardTestingRisk build() { + return new AuthorizationCreateParams.RiskAssessment.CardTestingRisk( + this.extraParams, + this.invalidAccountNumberDeclineRatePastHour, + this.invalidCredentialsDeclineRatePastHour, + this.riskLevel); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AuthorizationCreateParams.RiskAssessment.CardTestingRisk#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AuthorizationCreateParams.RiskAssessment.CardTestingRisk#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * The % of declines due to a card number not existing in the past hour, taking place at the + * same merchant. Higher rates correspond to a greater probability of card testing activity, + * meaning bad actors may be attempting different card number combinations to guess a + * correct one. Takes on values between 0 and 100. + */ + public Builder setInvalidAccountNumberDeclineRatePastHour( + Long invalidAccountNumberDeclineRatePastHour) { + this.invalidAccountNumberDeclineRatePastHour = invalidAccountNumberDeclineRatePastHour; + return this; + } + + /** + * The % of declines due to incorrect verification data (like CVV or expiry) in the past + * hour, taking place at the same merchant. Higher rates correspond to a greater probability + * of bad actors attempting to utilize valid card credentials at merchants with verification + * requirements. Takes on values between 0 and 100. + */ + public Builder setInvalidCredentialsDeclineRatePastHour( + Long invalidCredentialsDeclineRatePastHour) { + this.invalidCredentialsDeclineRatePastHour = invalidCredentialsDeclineRatePastHour; + return this; + } + + /** + * Required. The likelihood that this authorization is associated with card + * testing activity. This is assessed by evaluating decline activity over the last hour. + */ + public Builder setRiskLevel( + AuthorizationCreateParams.RiskAssessment.CardTestingRisk.RiskLevel riskLevel) { + this.riskLevel = riskLevel; + return this; + } + } + + public enum RiskLevel implements ApiRequestParams.EnumParam { + @SerializedName("elevated") + ELEVATED("elevated"), + + @SerializedName("highest") + HIGHEST("highest"), + + @SerializedName("low") + LOW("low"), + + @SerializedName("normal") + NORMAL("normal"), + + @SerializedName("not_assessed") + NOT_ASSESSED("not_assessed"), + + @SerializedName("unknown") + UNKNOWN("unknown"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + RiskLevel(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MerchantDisputeRisk { + /** + * The dispute rate observed across all Stripe Issuing authorizations for this merchant. For + * example, a value of 50 means 50% of authorizations from this merchant on Stripe Issuing + * have resulted in a dispute. Higher values mean a higher likelihood the authorization is + * disputed. Takes on values between 0 and 100. + */ + @SerializedName("dispute_rate") + Long disputeRate; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. The likelihood that authorizations from this merchant will + * result in a dispute based on their history on Stripe Issuing. + */ + @SerializedName("risk_level") + RiskLevel riskLevel; + + private MerchantDisputeRisk( + Long disputeRate, Map extraParams, RiskLevel riskLevel) { + this.disputeRate = disputeRate; + this.extraParams = extraParams; + this.riskLevel = riskLevel; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long disputeRate; + + private Map extraParams; + + private RiskLevel riskLevel; + + /** Finalize and obtain parameter instance from this builder. */ + public AuthorizationCreateParams.RiskAssessment.MerchantDisputeRisk build() { + return new AuthorizationCreateParams.RiskAssessment.MerchantDisputeRisk( + this.disputeRate, this.extraParams, this.riskLevel); + } + + /** + * The dispute rate observed across all Stripe Issuing authorizations for this merchant. For + * example, a value of 50 means 50% of authorizations from this merchant on Stripe Issuing + * have resulted in a dispute. Higher values mean a higher likelihood the authorization is + * disputed. Takes on values between 0 and 100. + */ + public Builder setDisputeRate(Long disputeRate) { + this.disputeRate = disputeRate; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AuthorizationCreateParams.RiskAssessment.MerchantDisputeRisk#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AuthorizationCreateParams.RiskAssessment.MerchantDisputeRisk#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. The likelihood that authorizations from this merchant will + * result in a dispute based on their history on Stripe Issuing. + */ + public Builder setRiskLevel( + AuthorizationCreateParams.RiskAssessment.MerchantDisputeRisk.RiskLevel riskLevel) { + this.riskLevel = riskLevel; + return this; + } + } + + public enum RiskLevel implements ApiRequestParams.EnumParam { + @SerializedName("elevated") + ELEVATED("elevated"), + + @SerializedName("highest") + HIGHEST("highest"), + + @SerializedName("low") + LOW("low"), + + @SerializedName("normal") + NORMAL("normal"), + + @SerializedName("not_assessed") + NOT_ASSESSED("not_assessed"), + + @SerializedName("unknown") + UNKNOWN("unknown"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + RiskLevel(String value) { + this.value = value; + } + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class VerificationData { @@ -3047,6 +3470,27 @@ public enum AuthorizationMethod implements ApiRequestParams.EnumParam { } } + public enum FraudDisputabilityLikelihood implements ApiRequestParams.EnumParam { + @SerializedName("neutral") + NEUTRAL("neutral"), + + @SerializedName("unknown") + UNKNOWN("unknown"), + + @SerializedName("very_likely") + VERY_LIKELY("very_likely"), + + @SerializedName("very_unlikely") + VERY_UNLIKELY("very_unlikely"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + FraudDisputabilityLikelihood(String value) { + this.value = value; + } + } + public enum Wallet implements ApiRequestParams.EnumParam { @SerializedName("apple_pay") APPLE_PAY("apple_pay"), diff --git a/src/main/java/com/stripe/param/issuing/CardCreateParams.java b/src/main/java/com/stripe/param/issuing/CardCreateParams.java index 74b78490be4..f78c4070975 100644 --- a/src/main/java/com/stripe/param/issuing/CardCreateParams.java +++ b/src/main/java/com/stripe/param/issuing/CardCreateParams.java @@ -684,11 +684,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + /** Required. Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -791,13 +791,15 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + /** + * Required. Address line 1, such as the street, PO Box, or company name. + */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; diff --git a/src/main/java/com/stripe/param/issuing/CardUpdateParams.java b/src/main/java/com/stripe/param/issuing/CardUpdateParams.java index e78869945d4..93be37b2f14 100644 --- a/src/main/java/com/stripe/param/issuing/CardUpdateParams.java +++ b/src/main/java/com/stripe/param/issuing/CardUpdateParams.java @@ -570,11 +570,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + /** Required. Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -692,25 +692,29 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + /** + * Required. Address line 1, such as the street, PO Box, or company name. + */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + /** + * Required. Address line 1, such as the street, PO Box, or company name. + */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; diff --git a/src/main/java/com/stripe/param/issuing/CardholderCreateParams.java b/src/main/java/com/stripe/param/issuing/CardholderCreateParams.java index e13017ab67e..c3d7f2fd302 100644 --- a/src/main/java/com/stripe/param/issuing/CardholderCreateParams.java +++ b/src/main/java/com/stripe/param/issuing/CardholderCreateParams.java @@ -451,11 +451,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + /** Required. Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -558,13 +558,15 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + /** + * Required. Address line 1, such as the street, PO Box, or company name. + */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; diff --git a/src/main/java/com/stripe/param/issuing/CardholderUpdateParams.java b/src/main/java/com/stripe/param/issuing/CardholderUpdateParams.java index ae9b204859b..a4717d2427f 100644 --- a/src/main/java/com/stripe/param/issuing/CardholderUpdateParams.java +++ b/src/main/java/com/stripe/param/issuing/CardholderUpdateParams.java @@ -411,11 +411,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + /** Required. Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -533,25 +533,29 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + /** + * Required. Address line 1, such as the street, PO Box, or company name. + */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + /** + * Required. Address line 1, such as the street, PO Box, or company name. + */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; diff --git a/src/main/java/com/stripe/param/tax/CalculationCreateParams.java b/src/main/java/com/stripe/param/tax/CalculationCreateParams.java index a539435d89c..81ca112fc49 100644 --- a/src/main/java/com/stripe/param/tax/CalculationCreateParams.java +++ b/src/main/java/com/stripe/param/tax/CalculationCreateParams.java @@ -442,11 +442,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -559,25 +559,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -1455,11 +1455,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -1469,7 +1469,7 @@ public static class Address { /** * State/province as an ISO 3166-2 - * subdivision code, without country prefix. Example: "NY" or "TX". + * subdivision code, without country prefix, such as "NY" or "TX". */ @SerializedName("state") Object state; @@ -1571,25 +1571,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -1609,7 +1609,7 @@ public Builder setPostalCode(EmptyParam postalCode) { /** * State/province as an ISO 3166-2 - * subdivision code, without country prefix. Example: "NY" or "TX". + * subdivision code, without country prefix, such as "NY" or "TX". */ public Builder setState(String state) { this.state = state; @@ -1618,7 +1618,7 @@ public Builder setState(String state) { /** * State/province as an ISO 3166-2 - * subdivision code, without country prefix. Example: "NY" or "TX". + * subdivision code, without country prefix, such as "NY" or "TX". */ public Builder setState(EmptyParam state) { this.state = state; diff --git a/src/main/java/com/stripe/param/tax/SettingsUpdateParams.java b/src/main/java/com/stripe/param/tax/SettingsUpdateParams.java index 4b637a89ebb..b107e321fc2 100644 --- a/src/main/java/com/stripe/param/tax/SettingsUpdateParams.java +++ b/src/main/java/com/stripe/param/tax/SettingsUpdateParams.java @@ -338,11 +338,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -352,7 +352,7 @@ public static class Address { /** * State/province as an ISO 3166-2 - * subdivision code, without country prefix. Example: "NY" or "TX". + * subdivision code, without country prefix, such as "NY" or "TX". */ @SerializedName("state") Object state; @@ -463,25 +463,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -501,7 +501,7 @@ public Builder setPostalCode(EmptyParam postalCode) { /** * State/province as an ISO 3166-2 - * subdivision code, without country prefix. Example: "NY" or "TX". + * subdivision code, without country prefix, such as "NY" or "TX". */ public Builder setState(String state) { this.state = state; @@ -510,7 +510,7 @@ public Builder setState(String state) { /** * State/province as an ISO 3166-2 - * subdivision code, without country prefix. Example: "NY" or "TX". + * subdivision code, without country prefix, such as "NY" or "TX". */ public Builder setState(EmptyParam state) { this.state = state; diff --git a/src/main/java/com/stripe/param/terminal/ConfigurationCreateParams.java b/src/main/java/com/stripe/param/terminal/ConfigurationCreateParams.java index c19d0be2d03..6938612156a 100644 --- a/src/main/java/com/stripe/param/terminal/ConfigurationCreateParams.java +++ b/src/main/java/com/stripe/param/terminal/ConfigurationCreateParams.java @@ -14,6 +14,10 @@ @Getter @EqualsAndHashCode(callSuper = false) public class ConfigurationCreateParams extends ApiRequestParams { + /** An object containing device type specific settings for BBPOS WisePad 3 readers. */ + @SerializedName("bbpos_wisepad3") + BbposWisepad3 bbposWisepad3; + /** An object containing device type specific settings for BBPOS WisePOS E readers. */ @SerializedName("bbpos_wisepos_e") BbposWiseposE bbposWiseposE; @@ -60,6 +64,7 @@ public class ConfigurationCreateParams extends ApiRequestParams { Object wifi; private ConfigurationCreateParams( + BbposWisepad3 bbposWisepad3, BbposWiseposE bbposWiseposE, List expand, Map extraParams, @@ -70,6 +75,7 @@ private ConfigurationCreateParams( Object tipping, VerifoneP400 verifoneP400, Object wifi) { + this.bbposWisepad3 = bbposWisepad3; this.bbposWiseposE = bbposWiseposE; this.expand = expand; this.extraParams = extraParams; @@ -87,6 +93,8 @@ public static Builder builder() { } public static class Builder { + private BbposWisepad3 bbposWisepad3; + private BbposWiseposE bbposWiseposE; private List expand; @@ -110,6 +118,7 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public ConfigurationCreateParams build() { return new ConfigurationCreateParams( + this.bbposWisepad3, this.bbposWiseposE, this.expand, this.extraParams, @@ -122,6 +131,12 @@ public ConfigurationCreateParams build() { this.wifi); } + /** An object containing device type specific settings for BBPOS WisePad 3 readers. */ + public Builder setBbposWisepad3(ConfigurationCreateParams.BbposWisepad3 bbposWisepad3) { + this.bbposWisepad3 = bbposWisepad3; + return this; + } + /** An object containing device type specific settings for BBPOS WisePOS E readers. */ public Builder setBbposWiseposE(ConfigurationCreateParams.BbposWiseposE bbposWiseposE) { this.bbposWiseposE = bbposWiseposE; @@ -241,6 +256,82 @@ public Builder setWifi(EmptyParam wifi) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BbposWisepad3 { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** A File ID representing an image you would like displayed on the reader. */ + @SerializedName("splashscreen") + Object splashscreen; + + private BbposWisepad3(Map extraParams, Object splashscreen) { + this.extraParams = extraParams; + this.splashscreen = splashscreen; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object splashscreen; + + /** Finalize and obtain parameter instance from this builder. */ + public ConfigurationCreateParams.BbposWisepad3 build() { + return new ConfigurationCreateParams.BbposWisepad3(this.extraParams, this.splashscreen); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * ConfigurationCreateParams.BbposWisepad3#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link ConfigurationCreateParams.BbposWisepad3#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** A File ID representing an image you would like displayed on the reader. */ + public Builder setSplashscreen(String splashscreen) { + this.splashscreen = splashscreen; + return this; + } + + /** A File ID representing an image you would like displayed on the reader. */ + public Builder setSplashscreen(EmptyParam splashscreen) { + this.splashscreen = splashscreen; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class BbposWiseposE { diff --git a/src/main/java/com/stripe/param/terminal/ConfigurationUpdateParams.java b/src/main/java/com/stripe/param/terminal/ConfigurationUpdateParams.java index 5dce706c41c..316df33104a 100644 --- a/src/main/java/com/stripe/param/terminal/ConfigurationUpdateParams.java +++ b/src/main/java/com/stripe/param/terminal/ConfigurationUpdateParams.java @@ -14,6 +14,10 @@ @Getter @EqualsAndHashCode(callSuper = false) public class ConfigurationUpdateParams extends ApiRequestParams { + /** An object containing device type specific settings for BBPOS WisePad 3 readers. */ + @SerializedName("bbpos_wisepad3") + Object bbposWisepad3; + /** An object containing device type specific settings for BBPOS WisePOS E readers. */ @SerializedName("bbpos_wisepos_e") Object bbposWiseposE; @@ -60,6 +64,7 @@ public class ConfigurationUpdateParams extends ApiRequestParams { Object wifi; private ConfigurationUpdateParams( + Object bbposWisepad3, Object bbposWiseposE, List expand, Map extraParams, @@ -70,6 +75,7 @@ private ConfigurationUpdateParams( Object tipping, Object verifoneP400, Object wifi) { + this.bbposWisepad3 = bbposWisepad3; this.bbposWiseposE = bbposWiseposE; this.expand = expand; this.extraParams = extraParams; @@ -87,6 +93,8 @@ public static Builder builder() { } public static class Builder { + private Object bbposWisepad3; + private Object bbposWiseposE; private List expand; @@ -110,6 +118,7 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public ConfigurationUpdateParams build() { return new ConfigurationUpdateParams( + this.bbposWisepad3, this.bbposWiseposE, this.expand, this.extraParams, @@ -122,6 +131,18 @@ public ConfigurationUpdateParams build() { this.wifi); } + /** An object containing device type specific settings for BBPOS WisePad 3 readers. */ + public Builder setBbposWisepad3(ConfigurationUpdateParams.BbposWisepad3 bbposWisepad3) { + this.bbposWisepad3 = bbposWisepad3; + return this; + } + + /** An object containing device type specific settings for BBPOS WisePad 3 readers. */ + public Builder setBbposWisepad3(EmptyParam bbposWisepad3) { + this.bbposWisepad3 = bbposWisepad3; + return this; + } + /** An object containing device type specific settings for BBPOS WisePOS E readers. */ public Builder setBbposWiseposE(ConfigurationUpdateParams.BbposWiseposE bbposWiseposE) { this.bbposWiseposE = bbposWiseposE; @@ -271,6 +292,82 @@ public Builder setWifi(EmptyParam wifi) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BbposWisepad3 { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** A File ID representing an image you would like displayed on the reader. */ + @SerializedName("splashscreen") + Object splashscreen; + + private BbposWisepad3(Map extraParams, Object splashscreen) { + this.extraParams = extraParams; + this.splashscreen = splashscreen; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object splashscreen; + + /** Finalize and obtain parameter instance from this builder. */ + public ConfigurationUpdateParams.BbposWisepad3 build() { + return new ConfigurationUpdateParams.BbposWisepad3(this.extraParams, this.splashscreen); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * ConfigurationUpdateParams.BbposWisepad3#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link ConfigurationUpdateParams.BbposWisepad3#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** A File ID representing an image you would like displayed on the reader. */ + public Builder setSplashscreen(String splashscreen) { + this.splashscreen = splashscreen; + return this; + } + + /** A File ID representing an image you would like displayed on the reader. */ + public Builder setSplashscreen(EmptyParam splashscreen) { + this.splashscreen = splashscreen; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class BbposWiseposE { diff --git a/src/main/java/com/stripe/param/terminal/LocationCreateParams.java b/src/main/java/com/stripe/param/terminal/LocationCreateParams.java index 1a32c9139d0..307c21a8586 100644 --- a/src/main/java/com/stripe/param/terminal/LocationCreateParams.java +++ b/src/main/java/com/stripe/param/terminal/LocationCreateParams.java @@ -14,18 +14,40 @@ @Getter @EqualsAndHashCode(callSuper = false) public class LocationCreateParams extends ApiRequestParams { - /** Required. The full address of the location. */ + /** The full address of the location. */ @SerializedName("address") Address address; + /** The Kana variation of the full address of the location (Japan only). */ + @SerializedName("address_kana") + AddressKana addressKana; + + /** The Kanji variation of the full address of the location (Japan only). */ + @SerializedName("address_kanji") + AddressKanji addressKanji; + /** The ID of a configuration that will be used to customize all readers in this location. */ @SerializedName("configuration_overrides") String configurationOverrides; - /** Required. A name for the location. Maximum length is 1000 characters. */ + /** A name for the location. Maximum length is 1000 characters. */ @SerializedName("display_name") String displayName; + /** + * The Kana variation of the name for the location (Japan only). Maximum length is 1000 + * characters. + */ + @SerializedName("display_name_kana") + String displayNameKana; + + /** + * The Kanji variation of the name for the location (Japan only). Maximum length is 1000 + * characters. + */ + @SerializedName("display_name_kanji") + String displayNameKanji; + /** Specifies which fields in the response should be expanded. */ @SerializedName("expand") List expand; @@ -48,19 +70,33 @@ public class LocationCreateParams extends ApiRequestParams { @SerializedName("metadata") Object metadata; + /** The phone number for the location. */ + @SerializedName("phone") + String phone; + private LocationCreateParams( Address address, + AddressKana addressKana, + AddressKanji addressKanji, String configurationOverrides, String displayName, + String displayNameKana, + String displayNameKanji, List expand, Map extraParams, - Object metadata) { + Object metadata, + String phone) { this.address = address; + this.addressKana = addressKana; + this.addressKanji = addressKanji; this.configurationOverrides = configurationOverrides; this.displayName = displayName; + this.displayNameKana = displayNameKana; + this.displayNameKanji = displayNameKanji; this.expand = expand; this.extraParams = extraParams; this.metadata = metadata; + this.phone = phone; } public static Builder builder() { @@ -70,45 +106,90 @@ public static Builder builder() { public static class Builder { private Address address; + private AddressKana addressKana; + + private AddressKanji addressKanji; + private String configurationOverrides; private String displayName; + private String displayNameKana; + + private String displayNameKanji; + private List expand; private Map extraParams; private Object metadata; + private String phone; + /** Finalize and obtain parameter instance from this builder. */ public LocationCreateParams build() { return new LocationCreateParams( this.address, + this.addressKana, + this.addressKanji, this.configurationOverrides, this.displayName, + this.displayNameKana, + this.displayNameKanji, this.expand, this.extraParams, - this.metadata); + this.metadata, + this.phone); } - /** Required. The full address of the location. */ + /** The full address of the location. */ public Builder setAddress(LocationCreateParams.Address address) { this.address = address; return this; } + /** The Kana variation of the full address of the location (Japan only). */ + public Builder setAddressKana(LocationCreateParams.AddressKana addressKana) { + this.addressKana = addressKana; + return this; + } + + /** The Kanji variation of the full address of the location (Japan only). */ + public Builder setAddressKanji(LocationCreateParams.AddressKanji addressKanji) { + this.addressKanji = addressKanji; + return this; + } + /** The ID of a configuration that will be used to customize all readers in this location. */ public Builder setConfigurationOverrides(String configurationOverrides) { this.configurationOverrides = configurationOverrides; return this; } - /** Required. A name for the location. Maximum length is 1000 characters. */ + /** A name for the location. Maximum length is 1000 characters. */ public Builder setDisplayName(String displayName) { this.displayName = displayName; return this; } + /** + * The Kana variation of the name for the location (Japan only). Maximum length is 1000 + * characters. + */ + public Builder setDisplayNameKana(String displayNameKana) { + this.displayNameKana = displayNameKana; + return this; + } + + /** + * The Kanji variation of the name for the location (Japan only). Maximum length is 1000 + * characters. + */ + public Builder setDisplayNameKanji(String displayNameKanji) { + this.displayNameKanji = displayNameKanji; + return this; + } + /** * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and * subsequent calls adds additional elements to the original list. See {@link @@ -210,6 +291,12 @@ public Builder setMetadata(Map metadata) { this.metadata = metadata; return this; } + + /** The phone number for the location. */ + public Builder setPhone(String phone) { + this.phone = phone; + return this; + } } @Getter @@ -235,11 +322,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -340,13 +427,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -365,4 +452,342 @@ public Builder setState(String state) { } } } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AddressKana { + /** City or ward. */ + @SerializedName("city") + String city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + String country; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Block or building number. */ + @SerializedName("line1") + String line1; + + /** Building details. */ + @SerializedName("line2") + String line2; + + /** Postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** Prefecture. */ + @SerializedName("state") + String state; + + /** Town or cho-me. */ + @SerializedName("town") + String town; + + private AddressKana( + String city, + String country, + Map extraParams, + String line1, + String line2, + String postalCode, + String state, + String town) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + this.town = town; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String city; + + private String country; + + private Map extraParams; + + private String line1; + + private String line2; + + private String postalCode; + + private String state; + + private String town; + + /** Finalize and obtain parameter instance from this builder. */ + public LocationCreateParams.AddressKana build() { + return new LocationCreateParams.AddressKana( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state, + this.town); + } + + /** City or ward. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * LocationCreateParams.AddressKana#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link LocationCreateParams.AddressKana#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Block or building number. */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Building details. */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** Postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** Prefecture. */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** Town or cho-me. */ + public Builder setTown(String town) { + this.town = town; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AddressKanji { + /** City or ward. */ + @SerializedName("city") + String city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + String country; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Block or building number. */ + @SerializedName("line1") + String line1; + + /** Building details. */ + @SerializedName("line2") + String line2; + + /** Postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** Prefecture. */ + @SerializedName("state") + String state; + + /** Town or cho-me. */ + @SerializedName("town") + String town; + + private AddressKanji( + String city, + String country, + Map extraParams, + String line1, + String line2, + String postalCode, + String state, + String town) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + this.town = town; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String city; + + private String country; + + private Map extraParams; + + private String line1; + + private String line2; + + private String postalCode; + + private String state; + + private String town; + + /** Finalize and obtain parameter instance from this builder. */ + public LocationCreateParams.AddressKanji build() { + return new LocationCreateParams.AddressKanji( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state, + this.town); + } + + /** City or ward. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * LocationCreateParams.AddressKanji#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link LocationCreateParams.AddressKanji#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Block or building number. */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Building details. */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** Postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** Prefecture. */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** Town or cho-me. */ + public Builder setTown(String town) { + this.town = town; + return this; + } + } + } } diff --git a/src/main/java/com/stripe/param/terminal/LocationUpdateParams.java b/src/main/java/com/stripe/param/terminal/LocationUpdateParams.java index 987c6c05e7e..9ec35e22bca 100644 --- a/src/main/java/com/stripe/param/terminal/LocationUpdateParams.java +++ b/src/main/java/com/stripe/param/terminal/LocationUpdateParams.java @@ -22,6 +22,14 @@ public class LocationUpdateParams extends ApiRequestParams { @SerializedName("address") Address address; + /** The Kana variation of the full address of the location (Japan only). */ + @SerializedName("address_kana") + AddressKana addressKana; + + /** The Kanji variation of the full address of the location (Japan only). */ + @SerializedName("address_kanji") + AddressKanji addressKanji; + /** The ID of a configuration that will be used to customize all readers in this location. */ @SerializedName("configuration_overrides") Object configurationOverrides; @@ -30,6 +38,14 @@ public class LocationUpdateParams extends ApiRequestParams { @SerializedName("display_name") Object displayName; + /** The Kana variation of the name for the location (Japan only). */ + @SerializedName("display_name_kana") + Object displayNameKana; + + /** The Kanji variation of the name for the location (Japan only). */ + @SerializedName("display_name_kanji") + Object displayNameKanji; + /** Specifies which fields in the response should be expanded. */ @SerializedName("expand") List expand; @@ -52,19 +68,33 @@ public class LocationUpdateParams extends ApiRequestParams { @SerializedName("metadata") Object metadata; + /** The phone number for the location. */ + @SerializedName("phone") + Object phone; + private LocationUpdateParams( Address address, + AddressKana addressKana, + AddressKanji addressKanji, Object configurationOverrides, Object displayName, + Object displayNameKana, + Object displayNameKanji, List expand, Map extraParams, - Object metadata) { + Object metadata, + Object phone) { this.address = address; + this.addressKana = addressKana; + this.addressKanji = addressKanji; this.configurationOverrides = configurationOverrides; this.displayName = displayName; + this.displayNameKana = displayNameKana; + this.displayNameKanji = displayNameKanji; this.expand = expand; this.extraParams = extraParams; this.metadata = metadata; + this.phone = phone; } public static Builder builder() { @@ -74,25 +104,40 @@ public static Builder builder() { public static class Builder { private Address address; + private AddressKana addressKana; + + private AddressKanji addressKanji; + private Object configurationOverrides; private Object displayName; + private Object displayNameKana; + + private Object displayNameKanji; + private List expand; private Map extraParams; private Object metadata; + private Object phone; + /** Finalize and obtain parameter instance from this builder. */ public LocationUpdateParams build() { return new LocationUpdateParams( this.address, + this.addressKana, + this.addressKanji, this.configurationOverrides, this.displayName, + this.displayNameKana, + this.displayNameKanji, this.expand, this.extraParams, - this.metadata); + this.metadata, + this.phone); } /** @@ -105,6 +150,18 @@ public Builder setAddress(LocationUpdateParams.Address address) { return this; } + /** The Kana variation of the full address of the location (Japan only). */ + public Builder setAddressKana(LocationUpdateParams.AddressKana addressKana) { + this.addressKana = addressKana; + return this; + } + + /** The Kanji variation of the full address of the location (Japan only). */ + public Builder setAddressKanji(LocationUpdateParams.AddressKanji addressKanji) { + this.addressKanji = addressKanji; + return this; + } + /** The ID of a configuration that will be used to customize all readers in this location. */ public Builder setConfigurationOverrides(String configurationOverrides) { this.configurationOverrides = configurationOverrides; @@ -129,6 +186,30 @@ public Builder setDisplayName(EmptyParam displayName) { return this; } + /** The Kana variation of the name for the location (Japan only). */ + public Builder setDisplayNameKana(String displayNameKana) { + this.displayNameKana = displayNameKana; + return this; + } + + /** The Kana variation of the name for the location (Japan only). */ + public Builder setDisplayNameKana(EmptyParam displayNameKana) { + this.displayNameKana = displayNameKana; + return this; + } + + /** The Kanji variation of the name for the location (Japan only). */ + public Builder setDisplayNameKanji(String displayNameKanji) { + this.displayNameKanji = displayNameKanji; + return this; + } + + /** The Kanji variation of the name for the location (Japan only). */ + public Builder setDisplayNameKanji(EmptyParam displayNameKanji) { + this.displayNameKanji = displayNameKanji; + return this; + } + /** * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and * subsequent calls adds additional elements to the original list. See {@link @@ -230,6 +311,18 @@ public Builder setMetadata(Map metadata) { this.metadata = metadata; return this; } + + /** The phone number for the location. */ + public Builder setPhone(String phone) { + this.phone = phone; + return this; + } + + /** The phone number for the location. */ + public Builder setPhone(EmptyParam phone) { + this.phone = phone; + return this; + } } @Getter @@ -255,11 +348,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -375,25 +468,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -424,4 +517,432 @@ public Builder setState(EmptyParam state) { } } } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AddressKana { + /** City or ward. */ + @SerializedName("city") + Object city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + Object country; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Block or building number. */ + @SerializedName("line1") + Object line1; + + /** Building details. */ + @SerializedName("line2") + Object line2; + + /** Postal code. */ + @SerializedName("postal_code") + Object postalCode; + + /** Prefecture. */ + @SerializedName("state") + Object state; + + /** Town or cho-me. */ + @SerializedName("town") + Object town; + + private AddressKana( + Object city, + Object country, + Map extraParams, + Object line1, + Object line2, + Object postalCode, + Object state, + Object town) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + this.town = town; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object city; + + private Object country; + + private Map extraParams; + + private Object line1; + + private Object line2; + + private Object postalCode; + + private Object state; + + private Object town; + + /** Finalize and obtain parameter instance from this builder. */ + public LocationUpdateParams.AddressKana build() { + return new LocationUpdateParams.AddressKana( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state, + this.town); + } + + /** City or ward. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** City or ward. */ + public Builder setCity(EmptyParam city) { + this.city = city; + return this; + } + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + public Builder setCountry(EmptyParam country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * LocationUpdateParams.AddressKana#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link LocationUpdateParams.AddressKana#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Block or building number. */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Block or building number. */ + public Builder setLine1(EmptyParam line1) { + this.line1 = line1; + return this; + } + + /** Building details. */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** Building details. */ + public Builder setLine2(EmptyParam line2) { + this.line2 = line2; + return this; + } + + /** Postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** Postal code. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } + + /** Prefecture. */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** Prefecture. */ + public Builder setState(EmptyParam state) { + this.state = state; + return this; + } + + /** Town or cho-me. */ + public Builder setTown(String town) { + this.town = town; + return this; + } + + /** Town or cho-me. */ + public Builder setTown(EmptyParam town) { + this.town = town; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AddressKanji { + /** City or ward. */ + @SerializedName("city") + Object city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + Object country; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Block or building number. */ + @SerializedName("line1") + Object line1; + + /** Building details. */ + @SerializedName("line2") + Object line2; + + /** Postal code. */ + @SerializedName("postal_code") + Object postalCode; + + /** Prefecture. */ + @SerializedName("state") + Object state; + + /** Town or cho-me. */ + @SerializedName("town") + Object town; + + private AddressKanji( + Object city, + Object country, + Map extraParams, + Object line1, + Object line2, + Object postalCode, + Object state, + Object town) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + this.town = town; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object city; + + private Object country; + + private Map extraParams; + + private Object line1; + + private Object line2; + + private Object postalCode; + + private Object state; + + private Object town; + + /** Finalize and obtain parameter instance from this builder. */ + public LocationUpdateParams.AddressKanji build() { + return new LocationUpdateParams.AddressKanji( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state, + this.town); + } + + /** City or ward. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** City or ward. */ + public Builder setCity(EmptyParam city) { + this.city = city; + return this; + } + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + public Builder setCountry(EmptyParam country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * LocationUpdateParams.AddressKanji#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link LocationUpdateParams.AddressKanji#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Block or building number. */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Block or building number. */ + public Builder setLine1(EmptyParam line1) { + this.line1 = line1; + return this; + } + + /** Building details. */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** Building details. */ + public Builder setLine2(EmptyParam line2) { + this.line2 = line2; + return this; + } + + /** Postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** Postal code. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } + + /** Prefecture. */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** Prefecture. */ + public Builder setState(EmptyParam state) { + this.state = state; + return this; + } + + /** Town or cho-me. */ + public Builder setTown(String town) { + this.town = town; + return this; + } + + /** Town or cho-me. */ + public Builder setTown(EmptyParam town) { + this.town = town; + return this; + } + } + } } diff --git a/src/main/java/com/stripe/param/treasury/OutboundPaymentCreateParams.java b/src/main/java/com/stripe/param/treasury/OutboundPaymentCreateParams.java index 7e344b0e3fb..7c73e4431d7 100644 --- a/src/main/java/com/stripe/param/treasury/OutboundPaymentCreateParams.java +++ b/src/main/java/com/stripe/param/treasury/OutboundPaymentCreateParams.java @@ -682,11 +682,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -793,13 +793,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; diff --git a/src/main/java/com/stripe/service/BalanceSettingsService.java b/src/main/java/com/stripe/service/BalanceSettingsService.java new file mode 100644 index 00000000000..463e5cd1756 --- /dev/null +++ b/src/main/java/com/stripe/service/BalanceSettingsService.java @@ -0,0 +1,95 @@ +// File generated from our OpenAPI spec +package com.stripe.service; + +import com.stripe.exception.StripeException; +import com.stripe.model.BalanceSettings; +import com.stripe.net.ApiRequest; +import com.stripe.net.ApiRequestParams; +import com.stripe.net.ApiResource; +import com.stripe.net.ApiService; +import com.stripe.net.BaseAddress; +import com.stripe.net.RequestOptions; +import com.stripe.net.StripeResponseGetter; +import com.stripe.param.BalanceSettingsRetrieveParams; +import com.stripe.param.BalanceSettingsUpdateParams; + +public final class BalanceSettingsService extends ApiService { + public BalanceSettingsService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + /** + * Retrieves balance settings for a given connected account. Related guide: Making API calls for connected accounts + */ + public BalanceSettings retrieve(BalanceSettingsRetrieveParams params) throws StripeException { + return retrieve(params, (RequestOptions) null); + } + /** + * Retrieves balance settings for a given connected account. Related guide: Making API calls for connected accounts + */ + public BalanceSettings retrieve(RequestOptions options) throws StripeException { + return retrieve((BalanceSettingsRetrieveParams) null, options); + } + /** + * Retrieves balance settings for a given connected account. Related guide: Making API calls for connected accounts + */ + public BalanceSettings retrieve() throws StripeException { + return retrieve((BalanceSettingsRetrieveParams) null, (RequestOptions) null); + } + /** + * Retrieves balance settings for a given connected account. Related guide: Making API calls for connected accounts + */ + public BalanceSettings retrieve(BalanceSettingsRetrieveParams params, RequestOptions options) + throws StripeException { + String path = "/v1/balance_settings"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, BalanceSettings.class); + } + /** + * Updates balance settings for a given connected account. Related guide: Making API calls for connected accounts + */ + public BalanceSettings update(BalanceSettingsUpdateParams params) throws StripeException { + return update(params, (RequestOptions) null); + } + /** + * Updates balance settings for a given connected account. Related guide: Making API calls for connected accounts + */ + public BalanceSettings update(RequestOptions options) throws StripeException { + return update((BalanceSettingsUpdateParams) null, options); + } + /** + * Updates balance settings for a given connected account. Related guide: Making API calls for connected accounts + */ + public BalanceSettings update() throws StripeException { + return update((BalanceSettingsUpdateParams) null, (RequestOptions) null); + } + /** + * Updates balance settings for a given connected account. Related guide: Making API calls for connected accounts + */ + public BalanceSettings update(BalanceSettingsUpdateParams params, RequestOptions options) + throws StripeException { + String path = "/v1/balance_settings"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, BalanceSettings.class); + } +} diff --git a/src/main/java/com/stripe/service/ExchangeRateService.java b/src/main/java/com/stripe/service/ExchangeRateService.java index c8e50cb422f..83cacab1a98 100644 --- a/src/main/java/com/stripe/service/ExchangeRateService.java +++ b/src/main/java/com/stripe/service/ExchangeRateService.java @@ -21,29 +21,45 @@ public ExchangeRateService(StripeResponseGetter responseGetter) { } /** - * Returns a list of objects that contain the rates at which foreign currencies are converted to - * one another. Only shows the currencies for which Stripe supports. + * [Deprecated] The {@code ExchangeRate} APIs are deprecated. Please use the FX Quotes + * API instead. + * + *

Returns a list of objects that contain the rates at which foreign currencies are converted + * to one another. Only shows the currencies for which Stripe supports. */ public StripeCollection list(ExchangeRateListParams params) throws StripeException { return list(params, (RequestOptions) null); } /** - * Returns a list of objects that contain the rates at which foreign currencies are converted to - * one another. Only shows the currencies for which Stripe supports. + * [Deprecated] The {@code ExchangeRate} APIs are deprecated. Please use the FX Quotes + * API instead. + * + *

Returns a list of objects that contain the rates at which foreign currencies are converted + * to one another. Only shows the currencies for which Stripe supports. */ public StripeCollection list(RequestOptions options) throws StripeException { return list((ExchangeRateListParams) null, options); } /** - * Returns a list of objects that contain the rates at which foreign currencies are converted to - * one another. Only shows the currencies for which Stripe supports. + * [Deprecated] The {@code ExchangeRate} APIs are deprecated. Please use the FX Quotes + * API instead. + * + *

Returns a list of objects that contain the rates at which foreign currencies are converted + * to one another. Only shows the currencies for which Stripe supports. */ public StripeCollection list() throws StripeException { return list((ExchangeRateListParams) null, (RequestOptions) null); } /** - * Returns a list of objects that contain the rates at which foreign currencies are converted to - * one another. Only shows the currencies for which Stripe supports. + * [Deprecated] The {@code ExchangeRate} APIs are deprecated. Please use the FX Quotes + * API instead. + * + *

Returns a list of objects that contain the rates at which foreign currencies are converted + * to one another. Only shows the currencies for which Stripe supports. */ public StripeCollection list(ExchangeRateListParams params, RequestOptions options) throws StripeException { @@ -57,20 +73,44 @@ public StripeCollection list(ExchangeRateListParams params, Reques options); return this.request(request, new TypeToken>() {}.getType()); } - /** Retrieves the exchange rates from the given currency to every supported currency. */ + /** + * [Deprecated] The {@code ExchangeRate} APIs are deprecated. Please use the FX Quotes + * API instead. + * + *

Retrieves the exchange rates from the given currency to every supported currency. + */ public ExchangeRate retrieve(String rateId, ExchangeRateRetrieveParams params) throws StripeException { return retrieve(rateId, params, (RequestOptions) null); } - /** Retrieves the exchange rates from the given currency to every supported currency. */ + /** + * [Deprecated] The {@code ExchangeRate} APIs are deprecated. Please use the FX Quotes + * API instead. + * + *

Retrieves the exchange rates from the given currency to every supported currency. + */ public ExchangeRate retrieve(String rateId, RequestOptions options) throws StripeException { return retrieve(rateId, (ExchangeRateRetrieveParams) null, options); } - /** Retrieves the exchange rates from the given currency to every supported currency. */ + /** + * [Deprecated] The {@code ExchangeRate} APIs are deprecated. Please use the FX Quotes + * API instead. + * + *

Retrieves the exchange rates from the given currency to every supported currency. + */ public ExchangeRate retrieve(String rateId) throws StripeException { return retrieve(rateId, (ExchangeRateRetrieveParams) null, (RequestOptions) null); } - /** Retrieves the exchange rates from the given currency to every supported currency. */ + /** + * [Deprecated] The {@code ExchangeRate} APIs are deprecated. Please use the FX Quotes + * API instead. + * + *

Retrieves the exchange rates from the given currency to every supported currency. + */ public ExchangeRate retrieve( String rateId, ExchangeRateRetrieveParams params, RequestOptions options) throws StripeException { diff --git a/src/main/java/com/stripe/service/PromotionCodeService.java b/src/main/java/com/stripe/service/PromotionCodeService.java index 706d2adbc87..42cefa9cdbb 100644 --- a/src/main/java/com/stripe/service/PromotionCodeService.java +++ b/src/main/java/com/stripe/service/PromotionCodeService.java @@ -49,15 +49,15 @@ public StripeCollection list( return this.request(request, new TypeToken>() {}.getType()); } /** - * A promotion code points to a coupon. You can optionally restrict the code to a specific - * customer, redemption limit, and expiration date. + * A promotion code points to an underlying promotion. You can optionally restrict the code to a + * specific customer, redemption limit, and expiration date. */ public PromotionCode create(PromotionCodeCreateParams params) throws StripeException { return create(params, (RequestOptions) null); } /** - * A promotion code points to a coupon. You can optionally restrict the code to a specific - * customer, redemption limit, and expiration date. + * A promotion code points to an underlying promotion. You can optionally restrict the code to a + * specific customer, redemption limit, and expiration date. */ public PromotionCode create(PromotionCodeCreateParams params, RequestOptions options) throws StripeException { diff --git a/src/main/java/com/stripe/service/V1Services.java b/src/main/java/com/stripe/service/V1Services.java index 2d5b8e47c84..0498022220d 100644 --- a/src/main/java/com/stripe/service/V1Services.java +++ b/src/main/java/com/stripe/service/V1Services.java @@ -37,6 +37,10 @@ public com.stripe.service.BalanceService balance() { return new com.stripe.service.BalanceService(this.getResponseGetter()); } + public com.stripe.service.BalanceSettingsService balanceSettings() { + return new com.stripe.service.BalanceSettingsService(this.getResponseGetter()); + } + public com.stripe.service.BalanceTransactionService balanceTransactions() { return new com.stripe.service.BalanceTransactionService(this.getResponseGetter()); } diff --git a/src/main/java/com/stripe/service/terminal/LocationService.java b/src/main/java/com/stripe/service/terminal/LocationService.java index a12d3a5f8d7..33c074d6ef7 100644 --- a/src/main/java/com/stripe/service/terminal/LocationService.java +++ b/src/main/java/com/stripe/service/terminal/LocationService.java @@ -128,6 +128,22 @@ public StripeCollection list(LocationListParams params, RequestOptions public Location create(LocationCreateParams params) throws StripeException { return create(params, (RequestOptions) null); } + /** + * Creates a new {@code Location} object. For further details, including which address fields are + * required in each country, see the Manage locations guide. + */ + public Location create(RequestOptions options) throws StripeException { + return create((LocationCreateParams) null, options); + } + /** + * Creates a new {@code Location} object. For further details, including which address fields are + * required in each country, see the Manage locations guide. + */ + public Location create() throws StripeException { + return create((LocationCreateParams) null, (RequestOptions) null); + } /** * Creates a new {@code Location} object. For further details, including which address fields are * required in each country, see the