From 20b739613a4f8c39538ccdf0bb516cc5bf06f32d Mon Sep 17 00:00:00 2001 From: "stripe-openapi[bot]" <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 29 Jul 2026 15:52:33 -0700 Subject: [PATCH 1/2] Update generated code for v2349 and 44014016ec56efb57a8cf6d0ee0771c2e6b4eebe (#2257) Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> --- CODEGEN_VERSION | 2 +- OPENAPI_VERSION | 2 +- src/main/java/com/stripe/ApiVersion.java | 2 +- src/main/java/com/stripe/model/Account.java | 157 ++++- .../java/com/stripe/model/AccountSession.java | 28 + .../com/stripe/model/BalanceTransaction.java | 2 +- .../java/com/stripe/model/BankAccount.java | 8 +- .../java/com/stripe/model/Capability.java | 8 +- src/main/java/com/stripe/model/Charge.java | 24 +- .../com/stripe/model/ConfirmationToken.java | 8 +- src/main/java/com/stripe/model/Dispute.java | 21 +- src/main/java/com/stripe/model/Event.java | 5 + .../stripe/model/EventDataClassLookup.java | 3 + src/main/java/com/stripe/model/Invoice.java | 2 +- .../stripe/model/PaymentAttemptRecord.java | 18 +- .../java/com/stripe/model/PaymentIntent.java | 57 ++ .../java/com/stripe/model/PaymentMethod.java | 32 +- .../java/com/stripe/model/PaymentRecord.java | 54 +- .../stripe/model/PaymentRecordCollection.java | 4 + src/main/java/com/stripe/model/Person.java | 16 +- src/main/java/com/stripe/model/Quote.java | 29 + src/main/java/com/stripe/model/Refund.java | 55 ++ .../java/com/stripe/model/SetupAttempt.java | 4 +- .../java/com/stripe/model/SetupIntent.java | 7 + .../stripe/model/SubscriptionSchedule.java | 65 ++ src/main/java/com/stripe/model/TaxId.java | 25 +- src/main/java/com/stripe/model/TaxRate.java | 5 +- src/main/java/com/stripe/model/Topup.java | 75 +++ .../model/billingportal/Configuration.java | 2 +- .../com/stripe/model/checkout/Session.java | 51 +- .../financialconnections/Authorization.java | 106 ++++ .../model/financialconnections/Session.java | 72 +++ .../stripe/model/issuing/Authorization.java | 6 +- .../java/com/stripe/model/issuing/Card.java | 9 +- .../com/stripe/model/issuing/Transaction.java | 2 +- .../com/stripe/model/tax/Calculation.java | 14 +- .../stripe/model/tax/CalculationLineItem.java | 5 +- .../com/stripe/model/tax/Registration.java | 43 +- .../com/stripe/model/tax/Transaction.java | 9 +- .../stripe/model/v2/billing/MeterEvent.java | 4 +- .../v2/billing/MeterEventAdjustment.java | 2 +- .../com/stripe/model/v2/core/Account.java | 52 ++ .../com/stripe/param/AccountCreateParams.java | 564 +++++++++++------- .../param/AccountPersonCreateParams.java | 32 +- .../param/AccountPersonUpdateParams.java | 48 +- .../com/stripe/param/AccountRejectParams.java | 43 +- .../param/AccountSessionCreateParams.java | 100 +++- .../stripe/param/AccountUnrejectParams.java | 100 ++++ .../com/stripe/param/AccountUpdateParams.java | 542 +++++++++++++++++ .../param/ConfirmationTokenCreateParams.java | 9 + .../stripe/param/CustomerCreateParams.java | 52 +- .../param/CustomerTaxIdCreateParams.java | 51 +- .../stripe/param/InvoiceAddLinesParams.java | 6 + .../com/stripe/param/InvoiceCreateParams.java | 6 + .../param/InvoiceCreatePreviewParams.java | 146 +++-- .../param/InvoiceLineItemUpdateParams.java | 6 + .../param/InvoiceUpdateLinesParams.java | 6 + .../com/stripe/param/InvoiceUpdateParams.java | 6 + .../param/PaymentIntentConfirmParams.java | 530 +++++++++++++++- .../param/PaymentIntentCreateParams.java | 522 +++++++++++++++- .../param/PaymentIntentUpdateParams.java | 489 ++++++++++++++- .../stripe/param/PaymentLinkUpdateParams.java | 515 ++++++++++++++++ .../param/PaymentMethodCreateParams.java | 9 + .../stripe/param/PaymentRecordListParams.java | 205 +++++++ .../param/PersonCollectionCreateParams.java | 32 +- .../com/stripe/param/PersonUpdateParams.java | 48 +- .../param/PromotionCodeCreateParams.java | 3 +- .../param/PromotionCodeUpdateParams.java | 3 +- .../com/stripe/param/QuoteCreateParams.java | 196 +++++- .../com/stripe/param/QuoteUpdateParams.java | 213 ++++++- .../param/SetupIntentConfirmParams.java | 348 +++++++++++ .../stripe/param/SetupIntentCreateParams.java | 348 +++++++++++ .../stripe/param/SetupIntentUpdateParams.java | 379 ++++++++++++ .../param/SubscriptionCreateParams.java | 6 + .../SubscriptionScheduleCreateParams.java | 440 +++++++++++++- .../param/SubscriptionScheduleListParams.java | 10 +- .../SubscriptionScheduleUpdateParams.java | 482 ++++++++++++++- .../param/SubscriptionUpdateParams.java | 10 +- .../param/TaxIdCollectionCreateParams.java | 51 +- .../com/stripe/param/TaxIdCreateParams.java | 51 +- .../com/stripe/param/TaxRateCreateParams.java | 6 + .../com/stripe/param/TaxRateUpdateParams.java | 6 + .../com/stripe/param/TokenCreateParams.java | 394 +++++++++++- .../param/WebhookEndpointCreateParams.java | 25 +- .../param/WebhookEndpointUpdateParams.java | 20 + .../param/billing/AlertCreateParams.java | 10 +- .../ConfigurationCreateParams.java | 6 +- .../ConfigurationUpdateParams.java | 6 +- .../param/checkout/SessionCreateParams.java | 190 ++++-- .../SessionCreateParams.java | 245 +++++++- .../issuing/AuthorizationCaptureParams.java | 4 +- .../issuing/AuthorizationCreateParams.java | 6 +- .../AuthorizationFinalizeAmountParams.java | 6 +- .../param/issuing/CardCreateParams.java | 25 + .../param/issuing/CardUpdateParams.java | 36 ++ .../TransactionCreateForceCaptureParams.java | 4 +- ...TransactionCreateUnlinkedRefundParams.java | 4 +- .../param/tax/CalculationCreateParams.java | 70 ++- .../param/tax/RegistrationCreateParams.java | 203 +++++++ .../v2/billing/MeterEventCreateParams.java | 6 +- .../billing/MeterEventStreamCreateParams.java | 6 +- .../param/v2/core/AccountCreateParams.java | 245 ++++++++ .../v2/core/AccountTokenCreateParams.java | 246 ++++++++ .../param/v2/core/AccountUpdateParams.java | 290 +++++++++ .../stripe/service/AccountPersonService.java | 4 +- .../com/stripe/service/AccountService.java | 96 ++- .../com/stripe/service/DisputeService.java | 8 +- .../stripe/service/PaymentMethodService.java | 16 +- .../stripe/service/PaymentRecordService.java | 29 + 109 files changed, 9217 insertions(+), 697 deletions(-) create mode 100644 src/main/java/com/stripe/model/PaymentRecordCollection.java create mode 100644 src/main/java/com/stripe/model/financialconnections/Authorization.java create mode 100644 src/main/java/com/stripe/param/AccountUnrejectParams.java create mode 100644 src/main/java/com/stripe/param/PaymentRecordListParams.java diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index 983636f7b6af..ea710b3c8493 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -6012b623b1c09ad54d466947da04511a042ee45a \ No newline at end of file +44014016ec56efb57a8cf6d0ee0771c2e6b4eebe \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 83c68c9d1dcf..5ea23263dda0 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2324 \ No newline at end of file +v2349 \ 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 ae06ad5de362..37dc88219329 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 = "2026-06-24.dahlia"; + public static final String CURRENT = "2026-07-29.dahlia"; public static final String CURRENT_MAJOR = "dahlia"; } diff --git a/src/main/java/com/stripe/model/Account.java b/src/main/java/com/stripe/model/Account.java index 69caacdcfd4b..56b2d800a38c 100644 --- a/src/main/java/com/stripe/model/Account.java +++ b/src/main/java/com/stripe/model/Account.java @@ -15,6 +15,7 @@ import com.stripe.param.AccountPersonsParams; import com.stripe.param.AccountRejectParams; import com.stripe.param.AccountRetrieveParams; +import com.stripe.param.AccountUnrejectParams; import com.stripe.param.AccountUpdateParams; import java.util.List; import java.util.Map; @@ -247,9 +248,10 @@ public CapabilityCollection capabilities(AccountCapabilitiesParams params, Reque * href="https://dashboard.stripe.com/account/applications/settings">register your platform. * *

If you’ve already collected information for your connected accounts, you can prefill that - * information when creating the account. Connect Onboarding won’t ask for the prefilled - * information during account onboarding. You can prefill any information on the account. + * href="https://stripe.com/connect/marketplace/tasks/create#prefill-account-information">can + * prefill that information when creating the account. Connect Onboarding won’t ask for the + * prefilled information during account onboarding. You can prefill any information on the + * account. */ public static Account create(Map params) throws StripeException { return create(params, (RequestOptions) null); @@ -261,9 +263,10 @@ public static Account create(Map params) throws StripeException * href="https://dashboard.stripe.com/account/applications/settings">register your platform. * *

If you’ve already collected information for your connected accounts, you can prefill that - * information when creating the account. Connect Onboarding won’t ask for the prefilled - * information during account onboarding. You can prefill any information on the account. + * href="https://stripe.com/connect/marketplace/tasks/create#prefill-account-information">can + * prefill that information when creating the account. Connect Onboarding won’t ask for the + * prefilled information during account onboarding. You can prefill any information on the + * account. */ public static Account create(Map params, RequestOptions options) throws StripeException { @@ -279,9 +282,10 @@ public static Account create(Map params, RequestOptions options) * href="https://dashboard.stripe.com/account/applications/settings">register your platform. * *

If you’ve already collected information for your connected accounts, you can prefill that - * information when creating the account. Connect Onboarding won’t ask for the prefilled - * information during account onboarding. You can prefill any information on the account. + * href="https://stripe.com/connect/marketplace/tasks/create#prefill-account-information">can + * prefill that information when creating the account. Connect Onboarding won’t ask for the + * prefilled information during account onboarding. You can prefill any information on the + * account. */ public static Account create(AccountCreateParams params) throws StripeException { return create(params, (RequestOptions) null); @@ -293,9 +297,10 @@ public static Account create(AccountCreateParams params) throws StripeException * href="https://dashboard.stripe.com/account/applications/settings">register your platform. * *

If you’ve already collected information for your connected accounts, you can prefill that - * information when creating the account. Connect Onboarding won’t ask for the prefilled - * information during account onboarding. You can prefill any information on the account. + * href="https://stripe.com/connect/marketplace/tasks/create#prefill-account-information">can + * prefill that information when creating the account. Connect Onboarding won’t ask for the + * prefilled information during account onboarding. You can prefill any information on the + * account. */ public static Account create(AccountCreateParams params, RequestOptions options) throws StripeException { @@ -495,8 +500,7 @@ public PersonCollection persons(AccountPersonsParams params, RequestOptions opti * flagged as suspicious. * *

Only accounts where your platform is liable for negative account balances, which includes - * Custom and Express accounts, can be rejected. Test-mode accounts can be rejected at any time. - * Live-mode accounts can only be rejected after all balances are zero. + * Custom and Express accounts, can be rejected. */ public Account reject(Map params) throws StripeException { return reject(params, (RequestOptions) null); @@ -507,8 +511,7 @@ public Account reject(Map params) throws StripeException { * flagged as suspicious. * *

Only accounts where your platform is liable for negative account balances, which includes - * Custom and Express accounts, can be rejected. Test-mode accounts can be rejected at any time. - * Live-mode accounts can only be rejected after all balances are zero. + * Custom and Express accounts, can be rejected. */ public Account reject(Map params, RequestOptions options) throws StripeException { String path = String.format("/v1/accounts/%s/reject", ApiResource.urlEncodeId(this.getId())); @@ -522,8 +525,7 @@ public Account reject(Map params, RequestOptions options) throws * flagged as suspicious. * *

Only accounts where your platform is liable for negative account balances, which includes - * Custom and Express accounts, can be rejected. Test-mode accounts can be rejected at any time. - * Live-mode accounts can only be rejected after all balances are zero. + * Custom and Express accounts, can be rejected. */ public Account reject(AccountRejectParams params) throws StripeException { return reject(params, (RequestOptions) null); @@ -534,8 +536,7 @@ public Account reject(AccountRejectParams params) throws StripeException { * flagged as suspicious. * *

Only accounts where your platform is liable for negative account balances, which includes - * Custom and Express accounts, can be rejected. Test-mode accounts can be rejected at any time. - * Live-mode accounts can only be rejected after all balances are zero. + * Custom and Express accounts, can be rejected. */ public Account reject(AccountRejectParams params, RequestOptions options) throws StripeException { String path = String.format("/v1/accounts/%s/reject", ApiResource.urlEncodeId(this.getId())); @@ -618,6 +619,104 @@ public static Account retrieve(AccountRetrieveParams params, RequestOptions opti return getGlobalResponseGetter().request(request, Account.class); } + /** + * With Connect, you can unreject accounts that you have previously rejected. + * + *

Only accounts that were rejected by your platform can be unrejected. This API cannot be used + * to unreject accounts that were rejected by Stripe. + * + *

Unreject will only enable charges and/or payouts if there are no other restrictions other + * than those placed by a previous rejection. If you have separately paused charges and/or payouts + * outside of rejection, those pauses will remain in place after unrejection. + */ + public Account unreject() throws StripeException { + return unreject((Map) null, (RequestOptions) null); + } + + /** + * With Connect, you can unreject accounts that you have previously rejected. + * + *

Only accounts that were rejected by your platform can be unrejected. This API cannot be used + * to unreject accounts that were rejected by Stripe. + * + *

Unreject will only enable charges and/or payouts if there are no other restrictions other + * than those placed by a previous rejection. If you have separately paused charges and/or payouts + * outside of rejection, those pauses will remain in place after unrejection. + */ + public Account unreject(RequestOptions options) throws StripeException { + return unreject((Map) null, options); + } + + /** + * With Connect, you can unreject accounts that you have previously rejected. + * + *

Only accounts that were rejected by your platform can be unrejected. This API cannot be used + * to unreject accounts that were rejected by Stripe. + * + *

Unreject will only enable charges and/or payouts if there are no other restrictions other + * than those placed by a previous rejection. If you have separately paused charges and/or payouts + * outside of rejection, those pauses will remain in place after unrejection. + */ + public Account unreject(Map params) throws StripeException { + return unreject(params, (RequestOptions) null); + } + + /** + * With Connect, you can unreject accounts that you have previously rejected. + * + *

Only accounts that were rejected by your platform can be unrejected. This API cannot be used + * to unreject accounts that were rejected by Stripe. + * + *

Unreject will only enable charges and/or payouts if there are no other restrictions other + * than those placed by a previous rejection. If you have separately paused charges and/or payouts + * outside of rejection, those pauses will remain in place after unrejection. + */ + public Account unreject(Map params, RequestOptions options) + throws StripeException { + String path = String.format("/v1/accounts/%s/unreject", ApiResource.urlEncodeId(this.getId())); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options); + return getResponseGetter().request(request, Account.class); + } + + /** + * With Connect, you can unreject accounts that you have previously rejected. + * + *

Only accounts that were rejected by your platform can be unrejected. This API cannot be used + * to unreject accounts that were rejected by Stripe. + * + *

Unreject will only enable charges and/or payouts if there are no other restrictions other + * than those placed by a previous rejection. If you have separately paused charges and/or payouts + * outside of rejection, those pauses will remain in place after unrejection. + */ + public Account unreject(AccountUnrejectParams params) throws StripeException { + return unreject(params, (RequestOptions) null); + } + + /** + * With Connect, you can unreject accounts that you have previously rejected. + * + *

Only accounts that were rejected by your platform can be unrejected. This API cannot be used + * to unreject accounts that were rejected by Stripe. + * + *

Unreject will only enable charges and/or payouts if there are no other restrictions other + * than those placed by a previous rejection. If you have separately paused charges and/or payouts + * outside of rejection, those pauses will remain in place after unrejection. + */ + public Account unreject(AccountUnrejectParams params, RequestOptions options) + throws StripeException { + String path = String.format("/v1/accounts/%s/unreject", ApiResource.urlEncodeId(this.getId())); + ApiResource.checkNullTypedParams(path, params); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return getResponseGetter().request(request, Account.class); + } + /** * Updates a connected account by setting the * values of the parameters passed. Any parameters not provided are left unchanged. @@ -1471,6 +1570,9 @@ public static class Company extends StripeObject { @SerializedName("address_kanji") AddressKanji addressKanji; + @SerializedName("administrative_address") + Address administrativeAddress; + /** * Whether the company's directors have been provided. This Boolean will be {@code true} if * you've manually indicated that all directors are provided via errors; @@ -2220,8 +2325,8 @@ public static class Requirements extends StripeObject { /** * Fields that need to be resolved to keep the account enabled. If not resolved by {@code - * current_deadline}, these fields will appear in {@code past_due} as well, and the account is - * disabled. + * current_deadline}, these fields will appear in {@code past_due} as well, and the account will + * be disabled. */ @SerializedName("currently_due") List currentlyDue; @@ -2242,8 +2347,8 @@ public static class Requirements extends StripeObject { String disabledReason; /** - * Details about validation and verification failures for {@code due} requirements that must be - * resolved. + * Fields that are {@code currently_due} and need to be collected again because validation or + * verification failed. */ @SerializedName("errors") List errors; diff --git a/src/main/java/com/stripe/model/AccountSession.java b/src/main/java/com/stripe/model/AccountSession.java index 859eb4010c59..676604761c4f 100644 --- a/src/main/java/com/stripe/model/AccountSession.java +++ b/src/main/java/com/stripe/model/AccountSession.java @@ -417,6 +417,13 @@ public static class Features extends StripeObject { /** Whether sending refunds is enabled. This is {@code true} by default. */ @SerializedName("refund_management") Boolean refundManagement; + + /** + * Whether to allow connected accounts to submit disputes using Smart Disputes. Defaults to + * the value of {@code dispute_management}. + */ + @SerializedName("smart_disputes_management") + Boolean smartDisputesManagement; } } @@ -761,6 +768,13 @@ public static class Features extends StripeObject { /** Whether sending refunds is enabled. This is {@code true} by default. */ @SerializedName("refund_management") Boolean refundManagement; + + /** + * Whether to allow connected accounts to submit disputes using Smart Disputes. Defaults to + * the value of {@code dispute_management}. + */ + @SerializedName("smart_disputes_management") + Boolean smartDisputesManagement; } } @@ -804,6 +818,13 @@ public static class Features extends StripeObject { /** Whether sending refunds is enabled. This is {@code true} by default. */ @SerializedName("refund_management") Boolean refundManagement; + + /** + * Whether to allow connected accounts to submit disputes using Smart Disputes. Defaults to + * the value of {@code dispute_management}. + */ + @SerializedName("smart_disputes_management") + Boolean smartDisputesManagement; } } @@ -854,6 +875,13 @@ public static class Features extends StripeObject { /** Whether sending refunds is enabled. This is {@code true} by default. */ @SerializedName("refund_management") Boolean refundManagement; + + /** + * Whether to allow connected accounts to submit disputes using Smart Disputes. Defaults to + * the value of {@code dispute_management}. + */ + @SerializedName("smart_disputes_management") + Boolean smartDisputesManagement; } } diff --git a/src/main/java/com/stripe/model/BalanceTransaction.java b/src/main/java/com/stripe/model/BalanceTransaction.java index 54375a7356f5..04f127242fbc 100644 --- a/src/main/java/com/stripe/model/BalanceTransaction.java +++ b/src/main/java/com/stripe/model/BalanceTransaction.java @@ -66,7 +66,7 @@ public class BalanceTransaction extends ApiResource implements HasId { /** * If applicable, this transaction uses an exchange rate. If money converts from currency A to - * currency B, then the {@code amount} in currency A, multipled by the {@code exchange_rate}, + * currency B, then the {@code amount} in currency A, multiplied by the {@code exchange_rate}, * equals the {@code amount} in currency B. For example, if you charge a customer 10.00 EUR, the * PaymentIntent's {@code amount} is {@code 1000} and {@code currency} is {@code eur}. If this * converts to 12.34 USD in your Stripe account, the BalanceTransaction's {@code amount} is {@code diff --git a/src/main/java/com/stripe/model/BankAccount.java b/src/main/java/com/stripe/model/BankAccount.java index ba3422a4ab99..189e24852429 100644 --- a/src/main/java/com/stripe/model/BankAccount.java +++ b/src/main/java/com/stripe/model/BankAccount.java @@ -522,8 +522,8 @@ public static class FutureRequirements extends StripeObject { List currentlyDue; /** - * Details about validation and verification failures for {@code due} requirements that must be - * resolved. + * Fields that are {@code currently_due} and need to be collected again because validation or + * verification failed. */ @SerializedName("errors") List errors; @@ -651,8 +651,8 @@ public static class Requirements extends StripeObject { List currentlyDue; /** - * Details about validation and verification failures for {@code due} requirements that must be - * resolved. + * Fields that are {@code currently_due} and need to be collected again because validation or + * verification failed. */ @SerializedName("errors") List errors; diff --git a/src/main/java/com/stripe/model/Capability.java b/src/main/java/com/stripe/model/Capability.java index 670b27030767..b05a41a09770 100644 --- a/src/main/java/com/stripe/model/Capability.java +++ b/src/main/java/com/stripe/model/Capability.java @@ -186,8 +186,8 @@ public static class FutureRequirements extends StripeObject { String disabledReason; /** - * Details about validation and verification failures for {@code due} requirements that must be - * resolved. + * Fields that are {@code currently_due} and need to be collected again because validation or + * verification failed. */ @SerializedName("errors") List errors; @@ -376,8 +376,8 @@ public static class Requirements extends StripeObject { String disabledReason; /** - * Details about validation and verification failures for {@code due} requirements that must be - * resolved. + * Fields that are {@code currently_due} and need to be collected again because validation or + * verification failed. */ @SerializedName("errors") List errors; diff --git a/src/main/java/com/stripe/model/Charge.java b/src/main/java/com/stripe/model/Charge.java index b9d5b62d6955..4c9b1c966eb4 100644 --- a/src/main/java/com/stripe/model/Charge.java +++ b/src/main/java/com/stripe/model/Charge.java @@ -1588,9 +1588,9 @@ public static class Funding extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class Card extends StripeObject { /** - * Card brand. Can be {@code amex}, {@code cartes_bancaires}, {@code diners}, {@code - * discover}, {@code eftpos_au}, {@code jcb}, {@code link}, {@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; @@ -2223,8 +2223,8 @@ public static class ThreeDSecure extends StripeObject { /** * Indicates the outcome of 3D Secure authentication. * - *

One of {@code attempt_acknowledged}, {@code authenticated}, {@code exempted}, {@code - * failed}, {@code not_supported}, or {@code processing_error}. + *

One of {@code attempt_acknowledged}, {@code authenticated}, {@code data_share_only}, + * {@code exempted}, {@code failed}, {@code not_supported}, or {@code processing_error}. */ @SerializedName("result") String result; @@ -2835,10 +2835,10 @@ public static class Fpx extends StripeObject { /** * The customer's bank. Can be one of {@code affin_bank}, {@code agrobank}, {@code * alliance_bank}, {@code ambank}, {@code bank_islam}, {@code bank_muamalat}, {@code - * bank_rakyat}, {@code bsn}, {@code cimb}, {@code hong_leong_bank}, {@code hsbc}, {@code - * kfh}, {@code maybank2u}, {@code ocbc}, {@code public_bank}, {@code rhb}, {@code - * standard_chartered}, {@code uob}, {@code deutsche_bank}, {@code maybank2e}, {@code - * pb_enterprise}, or {@code bank_of_china}. + * bnp_paribas}, {@code bank_rakyat}, {@code bsn}, {@code cimb}, {@code citibank}, {@code + * hong_leong_bank}, {@code hsbc}, {@code kfh}, {@code maybank2u}, {@code ocbc}, {@code + * public_bank}, {@code rhb}, {@code standard_chartered}, {@code uob}, {@code deutsche_bank}, + * {@code maybank2e}, {@code mbsb_bank}, {@code pb_enterprise}, or {@code bank_of_china}. */ @SerializedName("bank") String bank; @@ -3783,9 +3783,9 @@ public static class Funding extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class Card extends StripeObject { /** - * Card brand. Can be {@code amex}, {@code cartes_bancaires}, {@code diners}, {@code - * discover}, {@code eftpos_au}, {@code jcb}, {@code link}, {@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/ConfirmationToken.java b/src/main/java/com/stripe/model/ConfirmationToken.java index 8eca7c217b07..1cc78723c782 100644 --- a/src/main/java/com/stripe/model/ConfirmationToken.java +++ b/src/main/java/com/stripe/model/ConfirmationToken.java @@ -1678,10 +1678,10 @@ public static class Fpx extends StripeObject { /** * The customer's bank, if provided. Can be one of {@code affin_bank}, {@code agrobank}, * {@code alliance_bank}, {@code ambank}, {@code bank_islam}, {@code bank_muamalat}, {@code - * bank_rakyat}, {@code bsn}, {@code cimb}, {@code hong_leong_bank}, {@code hsbc}, {@code - * kfh}, {@code maybank2u}, {@code ocbc}, {@code public_bank}, {@code rhb}, {@code - * standard_chartered}, {@code uob}, {@code deutsche_bank}, {@code maybank2e}, {@code - * pb_enterprise}, or {@code bank_of_china}. + * bnp_paribas}, {@code bank_rakyat}, {@code bsn}, {@code cimb}, {@code citibank}, {@code + * hong_leong_bank}, {@code hsbc}, {@code kfh}, {@code maybank2u}, {@code ocbc}, {@code + * public_bank}, {@code rhb}, {@code standard_chartered}, {@code uob}, {@code deutsche_bank}, + * {@code maybank2e}, {@code mbsb_bank}, {@code pb_enterprise}, or {@code bank_of_china}. */ @SerializedName("bank") String bank; diff --git a/src/main/java/com/stripe/model/Dispute.java b/src/main/java/com/stripe/model/Dispute.java index d5c1a8bb6265..be7e0529aaf3 100644 --- a/src/main/java/com/stripe/model/Dispute.java +++ b/src/main/java/com/stripe/model/Dispute.java @@ -183,7 +183,7 @@ public void setPaymentIntentObject(PaymentIntent expandableObject) { /** * Closing the dispute for a charge indicates that you do not have any evidence to submit and are - * essentially dismissing the dispute, acknowledging it as lost. + * essentially dismissing the dispute (accepting it), acknowledging it as lost. * *

The status of the dispute will change from {@code needs_response} to {@code lost}. * Closing a dispute is irreversible. @@ -194,7 +194,7 @@ public Dispute close() throws StripeException { /** * Closing the dispute for a charge indicates that you do not have any evidence to submit and are - * essentially dismissing the dispute, acknowledging it as lost. + * essentially dismissing the dispute (accepting it), acknowledging it as lost. * *

The status of the dispute will change from {@code needs_response} to {@code lost}. * Closing a dispute is irreversible. @@ -205,7 +205,7 @@ public Dispute close(RequestOptions options) throws StripeException { /** * Closing the dispute for a charge indicates that you do not have any evidence to submit and are - * essentially dismissing the dispute, acknowledging it as lost. + * essentially dismissing the dispute (accepting it), acknowledging it as lost. * *

The status of the dispute will change from {@code needs_response} to {@code lost}. * Closing a dispute is irreversible. @@ -216,7 +216,7 @@ public Dispute close(Map params) throws StripeException { /** * Closing the dispute for a charge indicates that you do not have any evidence to submit and are - * essentially dismissing the dispute, acknowledging it as lost. + * essentially dismissing the dispute (accepting it), acknowledging it as lost. * *

The status of the dispute will change from {@code needs_response} to {@code lost}. * Closing a dispute is irreversible. @@ -230,7 +230,7 @@ public Dispute close(Map params, RequestOptions options) throws /** * Closing the dispute for a charge indicates that you do not have any evidence to submit and are - * essentially dismissing the dispute, acknowledging it as lost. + * essentially dismissing the dispute (accepting it), acknowledging it as lost. * *

The status of the dispute will change from {@code needs_response} to {@code lost}. * Closing a dispute is irreversible. @@ -241,7 +241,7 @@ public Dispute close(DisputeCloseParams params) throws StripeException { /** * Closing the dispute for a charge indicates that you do not have any evidence to submit and are - * essentially dismissing the dispute, acknowledging it as lost. + * essentially dismissing the dispute (accepting it), acknowledging it as lost. * *

The status of the dispute will change from {@code needs_response} to {@code lost}. * Closing a dispute is irreversible. @@ -1217,6 +1217,15 @@ public static class Card extends StripeObject { @SerializedName("case_type") String caseType; + /** + * Identifies which network this charge was processed on. Can be {@code amex}, {@code + * cartes_bancaires}, {@code diners}, {@code discover}, {@code eftpos_au}, {@code interac}, + * {@code jcb}, {@code link}, {@code mastercard}, {@code unionpay}, {@code visa}, or {@code + * unknown}. + */ + @SerializedName("network") + String network; + /** * The card network's specific dispute reason code, which maps to one of Stripe's primary * dispute categories to simplify response guidance. The One of {@code attempt_acknowledged}, {@code authenticated}, {@code exempted}, {@code - * failed}, {@code not_supported}, or {@code processing_error}. + *

One of {@code attempt_acknowledged}, {@code authenticated}, {@code data_share_only}, + * {@code exempted}, {@code failed}, {@code not_supported}, or {@code processing_error}. */ @SerializedName("result") String result; @@ -1932,10 +1932,10 @@ public static class Fpx extends StripeObject { /** * The customer's bank. Can be one of {@code affin_bank}, {@code agrobank}, {@code * alliance_bank}, {@code ambank}, {@code bank_islam}, {@code bank_muamalat}, {@code - * bank_rakyat}, {@code bsn}, {@code cimb}, {@code hong_leong_bank}, {@code hsbc}, {@code - * kfh}, {@code maybank2u}, {@code ocbc}, {@code public_bank}, {@code rhb}, {@code - * standard_chartered}, {@code uob}, {@code deutsche_bank}, {@code maybank2e}, {@code - * pb_enterprise}, or {@code bank_of_china}. + * bnp_paribas}, {@code bank_rakyat}, {@code bsn}, {@code cimb}, {@code citibank}, {@code + * hong_leong_bank}, {@code hsbc}, {@code kfh}, {@code maybank2u}, {@code ocbc}, {@code + * public_bank}, {@code rhb}, {@code standard_chartered}, {@code uob}, {@code deutsche_bank}, + * {@code maybank2e}, {@code mbsb_bank}, {@code pb_enterprise}, or {@code bank_of_china}. */ @SerializedName("bank") String bank; diff --git a/src/main/java/com/stripe/model/PaymentIntent.java b/src/main/java/com/stripe/model/PaymentIntent.java index 3084dcd78ec2..d08dd2854d15 100644 --- a/src/main/java/com/stripe/model/PaymentIntent.java +++ b/src/main/java/com/stripe/model/PaymentIntent.java @@ -44,6 +44,15 @@ @Setter @EqualsAndHashCode(callSuper = false) public class PaymentIntent extends ApiResource implements HasId, MetadataStore { + /** + * The list of payment method types allowed for use with this payment. Stripe automatically + * returns compatible payment methods from this list in the {@code payment_method_types} field of + * the response, based on the other PaymentIntent parameters, such as {@code currency}, {@code + * amount}, and {@code customer}. + */ + @SerializedName("allowed_payment_method_types") + List allowedPaymentMethodTypes; + /** * Amount intended to be collected by this PaymentIntent. A positive integer representing how much * to charge in the smallest currency @@ -4720,6 +4729,30 @@ public static class Payco extends StripeObject { */ @SerializedName("capture_method") String captureMethod; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

If the payment method is {@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; } /** @@ -5105,6 +5138,30 @@ public static class SamsungPay extends StripeObject { */ @SerializedName("capture_method") String captureMethod; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

If the payment method is {@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; } /** diff --git a/src/main/java/com/stripe/model/PaymentMethod.java b/src/main/java/com/stripe/model/PaymentMethod.java index bc8d027bb5d6..083292e64b41 100644 --- a/src/main/java/com/stripe/model/PaymentMethod.java +++ b/src/main/java/com/stripe/model/PaymentMethod.java @@ -525,32 +525,32 @@ public static PaymentMethod create(PaymentMethodCreateParams params, RequestOpti } /** - * Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no - * longer be used for a payment or re-attached to a Customer. + * Detaches a PaymentMethod object from a Customer. Detachment is permanent and irreversible — + * once detached, a PaymentMethod can no longer be used for payments or re-attached to a Customer. */ public PaymentMethod detach() throws StripeException { return detach((Map) null, (RequestOptions) null); } /** - * Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no - * longer be used for a payment or re-attached to a Customer. + * Detaches a PaymentMethod object from a Customer. Detachment is permanent and irreversible — + * once detached, a PaymentMethod can no longer be used for payments or re-attached to a Customer. */ public PaymentMethod detach(RequestOptions options) throws StripeException { return detach((Map) null, options); } /** - * Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no - * longer be used for a payment or re-attached to a Customer. + * Detaches a PaymentMethod object from a Customer. Detachment is permanent and irreversible — + * once detached, a PaymentMethod can no longer be used for payments or re-attached to a Customer. */ public PaymentMethod detach(Map params) throws StripeException { return detach(params, (RequestOptions) null); } /** - * Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no - * longer be used for a payment or re-attached to a Customer. + * Detaches a PaymentMethod object from a Customer. Detachment is permanent and irreversible — + * once detached, a PaymentMethod can no longer be used for payments or re-attached to a Customer. */ public PaymentMethod detach(Map params, RequestOptions options) throws StripeException { @@ -562,16 +562,16 @@ public PaymentMethod detach(Map params, RequestOptions options) } /** - * Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no - * longer be used for a payment or re-attached to a Customer. + * Detaches a PaymentMethod object from a Customer. Detachment is permanent and irreversible — + * once detached, a PaymentMethod can no longer be used for payments or re-attached to a Customer. */ public PaymentMethod detach(PaymentMethodDetachParams params) throws StripeException { return detach(params, (RequestOptions) null); } /** - * Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no - * longer be used for a payment or re-attached to a Customer. + * Detaches a PaymentMethod object from a Customer. Detachment is permanent and irreversible — + * once detached, a PaymentMethod can no longer be used for payments or re-attached to a Customer. */ public PaymentMethod detach(PaymentMethodDetachParams params, RequestOptions options) throws StripeException { @@ -1932,10 +1932,10 @@ public static class Fpx extends StripeObject { /** * The customer's bank, if provided. Can be one of {@code affin_bank}, {@code agrobank}, {@code * alliance_bank}, {@code ambank}, {@code bank_islam}, {@code bank_muamalat}, {@code - * bank_rakyat}, {@code bsn}, {@code cimb}, {@code hong_leong_bank}, {@code hsbc}, {@code kfh}, - * {@code maybank2u}, {@code ocbc}, {@code public_bank}, {@code rhb}, {@code - * standard_chartered}, {@code uob}, {@code deutsche_bank}, {@code maybank2e}, {@code - * pb_enterprise}, or {@code bank_of_china}. + * bnp_paribas}, {@code bank_rakyat}, {@code bsn}, {@code cimb}, {@code citibank}, {@code + * hong_leong_bank}, {@code hsbc}, {@code kfh}, {@code maybank2u}, {@code ocbc}, {@code + * public_bank}, {@code rhb}, {@code standard_chartered}, {@code uob}, {@code deutsche_bank}, + * {@code maybank2e}, {@code mbsb_bank}, {@code pb_enterprise}, or {@code bank_of_china}. */ @SerializedName("bank") String bank; diff --git a/src/main/java/com/stripe/model/PaymentRecord.java b/src/main/java/com/stripe/model/PaymentRecord.java index 320defc90601..bd6e50578424 100644 --- a/src/main/java/com/stripe/model/PaymentRecord.java +++ b/src/main/java/com/stripe/model/PaymentRecord.java @@ -9,6 +9,7 @@ import com.stripe.net.BaseAddress; import com.stripe.net.RequestOptions; import com.stripe.net.StripeResponseGetter; +import com.stripe.param.PaymentRecordListParams; import com.stripe.param.PaymentRecordReportPaymentAttemptCanceledParams; import com.stripe.param.PaymentRecordReportPaymentAttemptFailedParams; import com.stripe.param.PaymentRecordReportPaymentAttemptGuaranteedParams; @@ -138,6 +139,41 @@ public class PaymentRecord extends ApiResource implements HasId { @SerializedName("shipping_details") ShippingDetails shippingDetails; + /** List all the Payment Records for a given merchant. */ + public static PaymentRecordCollection list(Map params) throws StripeException { + return list(params, (RequestOptions) null); + } + + /** List all the Payment Records for a given merchant. */ + public static PaymentRecordCollection list(Map params, RequestOptions options) + throws StripeException { + String path = "/v1/payment_records"; + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, params, options); + return getGlobalResponseGetter().request(request, PaymentRecordCollection.class); + } + + /** List all the Payment Records for a given merchant. */ + public static PaymentRecordCollection list(PaymentRecordListParams params) + throws StripeException { + return list(params, (RequestOptions) null); + } + + /** List all the Payment Records for a given merchant. */ + public static PaymentRecordCollection list(PaymentRecordListParams params, RequestOptions options) + throws StripeException { + String path = "/v1/payment_records"; + ApiResource.checkNullTypedParams(path, params); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + options); + return getGlobalResponseGetter().request(request, PaymentRecordCollection.class); + } + /** * Report a new Payment Record. You may report a Payment Record as it is initialized and later * report updates through the other report_* methods, or report Payment Records in a terminal @@ -1141,9 +1177,9 @@ public static class Funding extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class Card extends StripeObject { /** - * Card brand. Can be {@code amex}, {@code cartes_bancaires}, {@code diners}, {@code - * discover}, {@code eftpos_au}, {@code jcb}, {@code link}, {@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; @@ -1724,8 +1760,8 @@ public static class ThreeDSecure extends StripeObject { /** * Indicates the outcome of 3D Secure authentication. * - *

One of {@code attempt_acknowledged}, {@code authenticated}, {@code exempted}, {@code - * failed}, {@code not_supported}, or {@code processing_error}. + *

One of {@code attempt_acknowledged}, {@code authenticated}, {@code data_share_only}, + * {@code exempted}, {@code failed}, {@code not_supported}, or {@code processing_error}. */ @SerializedName("result") String result; @@ -2234,10 +2270,10 @@ public static class Fpx extends StripeObject { /** * The customer's bank. Can be one of {@code affin_bank}, {@code agrobank}, {@code * alliance_bank}, {@code ambank}, {@code bank_islam}, {@code bank_muamalat}, {@code - * bank_rakyat}, {@code bsn}, {@code cimb}, {@code hong_leong_bank}, {@code hsbc}, {@code - * kfh}, {@code maybank2u}, {@code ocbc}, {@code public_bank}, {@code rhb}, {@code - * standard_chartered}, {@code uob}, {@code deutsche_bank}, {@code maybank2e}, {@code - * pb_enterprise}, or {@code bank_of_china}. + * bnp_paribas}, {@code bank_rakyat}, {@code bsn}, {@code cimb}, {@code citibank}, {@code + * hong_leong_bank}, {@code hsbc}, {@code kfh}, {@code maybank2u}, {@code ocbc}, {@code + * public_bank}, {@code rhb}, {@code standard_chartered}, {@code uob}, {@code deutsche_bank}, + * {@code maybank2e}, {@code mbsb_bank}, {@code pb_enterprise}, or {@code bank_of_china}. */ @SerializedName("bank") String bank; diff --git a/src/main/java/com/stripe/model/PaymentRecordCollection.java b/src/main/java/com/stripe/model/PaymentRecordCollection.java new file mode 100644 index 000000000000..ebcbb0e6970d --- /dev/null +++ b/src/main/java/com/stripe/model/PaymentRecordCollection.java @@ -0,0 +1,4 @@ +// File generated from our OpenAPI spec +package com.stripe.model; + +public class PaymentRecordCollection extends StripeCollection {} diff --git a/src/main/java/com/stripe/model/Person.java b/src/main/java/com/stripe/model/Person.java index b1863ca2e8ae..18c5824130f5 100644 --- a/src/main/java/com/stripe/model/Person.java +++ b/src/main/java/com/stripe/model/Person.java @@ -231,7 +231,7 @@ public class Person extends ApiResource implements HasId, MetadataStore /** * Deletes an existing person’s relationship to the account’s legal entity. Any person with a * relationship for an account can be deleted through the API, except if the person is the {@code - * account_opener}. If your integration is using the {@code executive} parameter, you cannot + * representative}. If your integration is using the {@code executive} parameter, you cannot * delete the only verified {@code executive} on file. */ public Person delete() throws StripeException { @@ -241,7 +241,7 @@ public Person delete() throws StripeException { /** * Deletes an existing person’s relationship to the account’s legal entity. Any person with a * relationship for an account can be deleted through the API, except if the person is the {@code - * account_opener}. If your integration is using the {@code executive} parameter, you cannot + * representative}. If your integration is using the {@code executive} parameter, you cannot * delete the only verified {@code executive} on file. */ public Person delete(RequestOptions options) throws StripeException { @@ -251,7 +251,7 @@ public Person delete(RequestOptions options) throws StripeException { /** * Deletes an existing person’s relationship to the account’s legal entity. Any person with a * relationship for an account can be deleted through the API, except if the person is the {@code - * account_opener}. If your integration is using the {@code executive} parameter, you cannot + * representative}. If your integration is using the {@code executive} parameter, you cannot * delete the only verified {@code executive} on file. */ public Person delete(Map params) throws StripeException { @@ -261,7 +261,7 @@ public Person delete(Map params) throws StripeException { /** * Deletes an existing person’s relationship to the account’s legal entity. Any person with a * relationship for an account can be deleted through the API, except if the person is the {@code - * account_opener}. If your integration is using the {@code executive} parameter, you cannot + * representative}. If your integration is using the {@code executive} parameter, you cannot * delete the only verified {@code executive} on file. */ public Person delete(Map params, RequestOptions options) throws StripeException { @@ -480,8 +480,8 @@ public static class FutureRequirements extends StripeObject { List currentlyDue; /** - * Details about validation and verification failures for {@code due} requirements that must be - * resolved. + * Fields that are {@code currently_due} and need to be collected again because validation or + * verification failed. */ @SerializedName("errors") List errors; @@ -702,8 +702,8 @@ public static class Requirements extends StripeObject { List currentlyDue; /** - * Details about validation and verification failures for {@code due} requirements that must be - * resolved. + * Fields that are {@code currently_due} and need to be collected again because validation or + * verification failed. */ @SerializedName("errors") List errors; diff --git a/src/main/java/com/stripe/model/Quote.java b/src/main/java/com/stripe/model/Quote.java index ea2bdf9dca18..2dcf189b58e9 100644 --- a/src/main/java/com/stripe/model/Quote.java +++ b/src/main/java/com/stripe/model/Quote.java @@ -1348,6 +1348,10 @@ public void setQuoteObject(Quote expandableObject) { @Setter @EqualsAndHashCode(callSuper = false) public static class InvoiceSettings extends StripeObject { + /** A list of up to 4 custom fields to be displayed on the invoice. */ + @SerializedName("custom_fields") + List customFields; + /** * Number of days within which a customer must pay invoices generated by this quote. This value * will be {@code null} for quotes where {@code collection_method=charge_automatically}. @@ -1355,9 +1359,34 @@ public static class InvoiceSettings extends StripeObject { @SerializedName("days_until_due") Long daysUntilDue; + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + @SerializedName("description") + String description; + + /** Footer to be displayed on the invoice. */ + @SerializedName("footer") + String footer; + @SerializedName("issuer") Issuer issuer; + /** + * For more details about CustomField, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class CustomField extends StripeObject { + /** The name of the custom field. */ + @SerializedName("name") + String name; + + /** The value of the custom field. */ + @SerializedName("value") + String value; + } + /** * For more details about Issuer, please refer to the API * Reference. diff --git a/src/main/java/com/stripe/model/Refund.java b/src/main/java/com/stripe/model/Refund.java index 415eb16e26e1..49b73acddfa1 100644 --- a/src/main/java/com/stripe/model/Refund.java +++ b/src/main/java/com/stripe/model/Refund.java @@ -57,6 +57,16 @@ public class Refund extends ApiResource implements MetadataStore, Balanc @SerializedName("currency") String currency; + /** ID of the customer of this refund. */ + @SerializedName("customer") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField customer; + + /** ID of the account of this refund. */ + @SerializedName("customer_account") + String customerAccount; + /** * An arbitrary string attached to the object. You can use this for displaying to users (available * on non-card refunds only). @@ -122,6 +132,12 @@ public class Refund extends ApiResource implements MetadataStore, Balanc @Setter(lombok.AccessLevel.NONE) ExpandableField paymentIntent; + /** ID of the payment method associated with this refund. */ + @SerializedName("payment_method") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField paymentMethod; + /** * Provides the reason for why the refund is pending. Possible values are: {@code processing}, * {@code insufficient_funds}, or {@code charge_pending}. @@ -212,6 +228,24 @@ public void setChargeObject(Charge expandableObject) { this.charge = new ExpandableField(expandableObject.getId(), expandableObject); } + /** Get ID of expandable {@code customer} object. */ + public String getCustomer() { + return (this.customer != null) ? this.customer.getId() : null; + } + + public void setCustomer(String id) { + this.customer = ApiResource.setExpandableFieldId(id, this.customer); + } + + /** Get expanded {@code customer}. */ + public Customer getCustomerObject() { + return (this.customer != null) ? this.customer.getExpanded() : null; + } + + public void setCustomerObject(Customer expandableObject) { + this.customer = new ExpandableField(expandableObject.getId(), expandableObject); + } + /** Get ID of expandable {@code failureBalanceTransaction} object. */ public String getFailureBalanceTransaction() { return (this.failureBalanceTransaction != null) ? this.failureBalanceTransaction.getId() : null; @@ -253,6 +287,25 @@ public void setPaymentIntentObject(PaymentIntent expandableObject) { new ExpandableField(expandableObject.getId(), expandableObject); } + /** Get ID of expandable {@code paymentMethod} object. */ + public String getPaymentMethod() { + return (this.paymentMethod != null) ? this.paymentMethod.getId() : null; + } + + public void setPaymentMethod(String id) { + this.paymentMethod = ApiResource.setExpandableFieldId(id, this.paymentMethod); + } + + /** Get expanded {@code paymentMethod}. */ + public PaymentMethod getPaymentMethodObject() { + return (this.paymentMethod != null) ? this.paymentMethod.getExpanded() : null; + } + + public void setPaymentMethodObject(PaymentMethod expandableObject) { + this.paymentMethod = + new ExpandableField(expandableObject.getId(), expandableObject); + } + /** Get ID of expandable {@code sourceTransferReversal} object. */ public String getSourceTransferReversal() { return (this.sourceTransferReversal != null) ? this.sourceTransferReversal.getId() : null; @@ -1348,10 +1401,12 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { super.setResponseGetter(responseGetter); trySetResponseGetter(balanceTransaction, responseGetter); trySetResponseGetter(charge, responseGetter); + trySetResponseGetter(customer, responseGetter); trySetResponseGetter(destinationDetails, responseGetter); trySetResponseGetter(failureBalanceTransaction, responseGetter); trySetResponseGetter(nextAction, responseGetter); trySetResponseGetter(paymentIntent, responseGetter); + trySetResponseGetter(paymentMethod, responseGetter); trySetResponseGetter(presentmentDetails, responseGetter); trySetResponseGetter(sourceTransferReversal, responseGetter); trySetResponseGetter(transferReversal, responseGetter); diff --git a/src/main/java/com/stripe/model/SetupAttempt.java b/src/main/java/com/stripe/model/SetupAttempt.java index 642ceb50ac8f..0cab517dea7b 100644 --- a/src/main/java/com/stripe/model/SetupAttempt.java +++ b/src/main/java/com/stripe/model/SetupAttempt.java @@ -662,8 +662,8 @@ public static class ThreeDSecure extends StripeObject { /** * Indicates the outcome of 3D Secure authentication. * - *

One of {@code attempt_acknowledged}, {@code authenticated}, {@code exempted}, {@code - * failed}, {@code not_supported}, or {@code processing_error}. + *

One of {@code attempt_acknowledged}, {@code authenticated}, {@code data_share_only}, + * {@code exempted}, {@code failed}, {@code not_supported}, or {@code processing_error}. */ @SerializedName("result") String result; diff --git a/src/main/java/com/stripe/model/SetupIntent.java b/src/main/java/com/stripe/model/SetupIntent.java index 583de372fec2..2de7da57ac61 100644 --- a/src/main/java/com/stripe/model/SetupIntent.java +++ b/src/main/java/com/stripe/model/SetupIntent.java @@ -55,6 +55,13 @@ @Setter @EqualsAndHashCode(callSuper = false) public class SetupIntent extends ApiResource implements HasId, MetadataStore { + /** + * The list of payment method types to allow for this SetupIntent. Stripe will only use methods in + * this list when determining the payment methods to offer. + */ + @SerializedName("allowed_payment_method_types") + List allowedPaymentMethodTypes; + /** ID of the Connect application that created the SetupIntent. */ @SerializedName("application") @Getter(lombok.AccessLevel.NONE) diff --git a/src/main/java/com/stripe/model/SubscriptionSchedule.java b/src/main/java/com/stripe/model/SubscriptionSchedule.java index c2bed31fca89..098600b6f5a5 100644 --- a/src/main/java/com/stripe/model/SubscriptionSchedule.java +++ b/src/main/java/com/stripe/model/SubscriptionSchedule.java @@ -850,6 +850,10 @@ public static class InvoiceSettings extends StripeObject { @SerializedName("account_tax_ids") List> accountTaxIds; + /** A list of up to 4 custom fields to be displayed on the invoice. */ + @SerializedName("custom_fields") + List customFields; + /** * Number of days within which a customer must pay invoices generated by this subscription * schedule. This value will be {@code null} for subscription schedules where {@code @@ -858,6 +862,14 @@ public static class InvoiceSettings extends StripeObject { @SerializedName("days_until_due") Long daysUntilDue; + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + @SerializedName("description") + String description; + + /** Footer to be displayed on the invoice. */ + @SerializedName("footer") + String footer; + @SerializedName("issuer") Issuer issuer; @@ -905,6 +917,23 @@ public void setAccountTaxIdObjects(List objs) { : null; } + /** + * For more details about CustomField, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class CustomField extends StripeObject { + /** The name of the custom field. */ + @SerializedName("name") + String name; + + /** The value of the custom field. */ + @SerializedName("value") + String value; + } + /** * For more details about Issuer, please refer to the API Reference. @@ -1139,6 +1168,13 @@ public static class Phase extends StripeObject { @SerializedName("transfer_data") TransferData transferData; + /** + * If set to true the entire phase is counted as a trial and the customer will not be charged + * for any fees. + */ + @SerializedName("trial") + Boolean trial; + /** When the trial ends within the phase. */ @SerializedName("trial_end") Long trialEnd; @@ -1585,6 +1621,10 @@ public static class InvoiceSettings extends StripeObject { @SerializedName("account_tax_ids") List> accountTaxIds; + /** A list of up to 4 custom fields to be displayed on the invoice. */ + @SerializedName("custom_fields") + List customFields; + /** * Number of days within which a customer must pay invoices generated by this subscription * schedule. This value will be {@code null} for subscription schedules where {@code @@ -1593,6 +1633,14 @@ public static class InvoiceSettings extends StripeObject { @SerializedName("days_until_due") Long daysUntilDue; + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + @SerializedName("description") + String description; + + /** Footer to be displayed on the invoice. */ + @SerializedName("footer") + String footer; + /** * The connected account that issues the invoice. The invoice is presented with the branding * and support information of the specified account. @@ -1644,6 +1692,23 @@ public void setAccountTaxIdObjects(List objs) { : null; } + /** + * For more details about CustomField, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class CustomField extends StripeObject { + /** The name of the custom field. */ + @SerializedName("name") + String name; + + /** The value of the custom field. */ + @SerializedName("value") + String value; + } + /** * For more details about Issuer, please refer to the API Reference. diff --git a/src/main/java/com/stripe/model/TaxId.java b/src/main/java/com/stripe/model/TaxId.java index bc8c5cec2323..fe2675400d14 100644 --- a/src/main/java/com/stripe/model/TaxId.java +++ b/src/main/java/com/stripe/model/TaxId.java @@ -86,18 +86,19 @@ public class TaxId extends ApiResource implements HasId { * {@code cm_niu}, {@code cn_tin}, {@code co_nit}, {@code cr_tin}, {@code cv_nif}, {@code de_stn}, * {@code do_rcn}, {@code ec_ruc}, {@code eg_tin}, {@code es_cif}, {@code et_tin}, {@code * eu_oss_vat}, {@code eu_vat}, {@code fo_vat}, {@code gb_vat}, {@code ge_vat}, {@code gi_tin}, - * {@code gn_nif}, {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code id_npwp}, {@code il_vat}, - * {@code in_gst}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, - * {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, {@code la_tin}, - * {@code li_uid}, {@code li_vat}, {@code lk_vat}, {@code ma_vat}, {@code md_vat}, {@code me_pib}, - * {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, {@code my_frp}, {@code my_itn}, {@code my_sst}, - * {@code ng_tin}, {@code no_vat}, {@code no_voec}, {@code np_pan}, {@code nz_gst}, {@code - * om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code pl_nip}, {@code py_ruc}, {@code ro_tin}, {@code - * rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code sg_uen}, {@code - * si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code th_vat}, {@code tj_tin}, - * {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, {@code ug_tin}, {@code us_ein}, - * {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code ve_rif}, {@code vn_tin}, {@code za_vat}, - * {@code zm_tin}, or {@code zw_tin}. Note that some legacy tax IDs have type {@code unknown} + * {@code gn_nif}, {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code ic_nif}, {@code id_npwp}, + * {@code il_vat}, {@code in_gst}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, + * {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, + * {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_vat}, {@code ma_vat}, {@code md_vat}, + * {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, {@code my_frp}, {@code my_itn}, + * {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, {@code np_pan}, {@code + * nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code pl_nip}, {@code py_ruc}, {@code + * ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code + * sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code th_vat}, + * {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, {@code ug_tin}, + * {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code ve_rif}, {@code vn_tin}, + * {@code za_vat}, {@code zm_tin}, or {@code zw_tin}. Note that some legacy tax IDs have type + * {@code unknown} */ @SerializedName("type") String type; diff --git a/src/main/java/com/stripe/model/TaxRate.java b/src/main/java/com/stripe/model/TaxRate.java index 72799fe33e52..c598c1a88c37 100644 --- a/src/main/java/com/stripe/model/TaxRate.java +++ b/src/main/java/com/stripe/model/TaxRate.java @@ -159,8 +159,9 @@ public class TaxRate extends ApiResource implements HasId, MetadataStoreOne of {@code amusement_tax}, {@code communications_tax}, {@code gst}, {@code hst}, {@code - * igst}, {@code jct}, {@code lease_tax}, {@code pst}, {@code qst}, {@code retail_delivery_fee}, - * {@code rst}, {@code sales_tax}, {@code service_tax}, or {@code vat}. + * igst}, {@code jct}, {@code lease_tax}, {@code mass_transit_parking_tax}, {@code parking_tax}, + * {@code pst}, {@code qst}, {@code retail_delivery_fee}, {@code rst}, {@code sales_tax}, {@code + * service_tax}, or {@code vat}. */ @SerializedName("tax_type") String taxType; diff --git a/src/main/java/com/stripe/model/Topup.java b/src/main/java/com/stripe/model/Topup.java index e5de6e76025b..7a952a3041e3 100644 --- a/src/main/java/com/stripe/model/Topup.java +++ b/src/main/java/com/stripe/model/Topup.java @@ -81,6 +81,14 @@ public class Topup extends ApiResource implements MetadataStore, BalanceT @SerializedName("id") String id; + /** + * Indicates whether the top-up was initiated by Stripe or by the user. + * + *

One of {@code stripe}, or {@code user}. + */ + @SerializedName("initiated_by") + String initiatedBy; + /** * If the object exists in live mode, the value is {@code true}. If the object exists in test * mode, the value is {@code false}. @@ -105,6 +113,19 @@ public class Topup extends ApiResource implements MetadataStore, BalanceT @SerializedName("object") String object; + /** + * The ID of a PaymentMethod representing the payment method used for the top-up. A PaymentMethod + * of type {@code us_bank_account} can be used. + */ + @SerializedName("payment_method") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField paymentMethod; + + /** Payment-method-specific configuration for this top-up. */ + @SerializedName("payment_method_options") + PaymentMethodOptions paymentMethodOptions; + /** The source field is deprecated. It might not always be present in the API response. */ @SerializedName("source") Source source; @@ -149,6 +170,25 @@ public void setBalanceTransactionObject(BalanceTransaction expandableObject) { new ExpandableField(expandableObject.getId(), expandableObject); } + /** Get ID of expandable {@code paymentMethod} object. */ + public String getPaymentMethod() { + return (this.paymentMethod != null) ? this.paymentMethod.getId() : null; + } + + public void setPaymentMethod(String id) { + this.paymentMethod = ApiResource.setExpandableFieldId(id, this.paymentMethod); + } + + /** Get expanded {@code paymentMethod}. */ + public PaymentMethod getPaymentMethodObject() { + return (this.paymentMethod != null) ? this.paymentMethod.getExpanded() : null; + } + + public void setPaymentMethodObject(PaymentMethod expandableObject) { + this.paymentMethod = + new ExpandableField(expandableObject.getId(), expandableObject); + } + /** Cancels a top-up. Only pending top-ups can be canceled. */ public Topup cancel() throws StripeException { return cancel((Map) null, (RequestOptions) null); @@ -343,10 +383,45 @@ public Topup update(TopupUpdateParams params, RequestOptions options) throws Str return getResponseGetter().request(request, Topup.class); } + /** + * For more details about PaymentMethodOptions, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class PaymentMethodOptions extends StripeObject { + /** + * If this top-up is to be used with a {@code us_bank_account} payment method, this sub-hash + * contains configuration for it. + */ + @SerializedName("us_bank_account") + UsBankAccount usBankAccount; + + /** + * For more details about UsBankAccount, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class UsBankAccount extends StripeObject { + /** + * The US bank transfer network used for this top-up. The default is {@code ach}. + * + *

Equal to {@code ach}. + */ + @SerializedName("network") + String network; + } + } + @Override public void setResponseGetter(StripeResponseGetter responseGetter) { super.setResponseGetter(responseGetter); trySetResponseGetter(balanceTransaction, responseGetter); + trySetResponseGetter(paymentMethod, responseGetter); + trySetResponseGetter(paymentMethodOptions, responseGetter); trySetResponseGetter(source, responseGetter); } } diff --git a/src/main/java/com/stripe/model/billingportal/Configuration.java b/src/main/java/com/stripe/model/billingportal/Configuration.java index d3e548bdcd3c..5d701946e97f 100644 --- a/src/main/java/com/stripe/model/billingportal/Configuration.java +++ b/src/main/java/com/stripe/model/billingportal/Configuration.java @@ -53,7 +53,7 @@ public class Configuration extends ApiResource implements HasId, MetadataStoreoverriden + * href="https://docs.stripe.com/api/customer_portal/sessions/create#create_portal_session-return_url">overridden * when creating the session. */ @SerializedName("default_return_url") diff --git a/src/main/java/com/stripe/model/checkout/Session.java b/src/main/java/com/stripe/model/checkout/Session.java index efeefcbe75c8..1c4d56eb0310 100644 --- a/src/main/java/com/stripe/model/checkout/Session.java +++ b/src/main/java/com/stripe/model/checkout/Session.java @@ -1607,7 +1607,8 @@ public static class TaxId extends StripeObject { * {@code gn_nif}, {@code mk_vat}, {@code sr_fin}, {@code sn_ninea}, {@code am_tin}, {@code * np_pan}, {@code tj_tin}, {@code ug_tin}, {@code zm_tin}, {@code kh_tin}, {@code aw_tin}, * {@code az_tin}, {@code bd_bin}, {@code bj_ifu}, {@code et_tin}, {@code kg_tin}, {@code - * la_tin}, {@code cm_niu}, {@code cv_nif}, {@code bf_ifu}, or {@code unknown}. + * la_tin}, {@code cm_niu}, {@code cv_nif}, {@code bf_ifu}, {@code ic_nif}, or {@code + * unknown}. */ @SerializedName("type") String type; @@ -3470,6 +3471,30 @@ public static class Payco extends StripeObject { */ @SerializedName("capture_method") String captureMethod; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

If the payment method is {@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; } /** @@ -3825,6 +3850,30 @@ public static class SamsungPay extends StripeObject { */ @SerializedName("capture_method") String captureMethod; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

If the payment method is {@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; } /** diff --git a/src/main/java/com/stripe/model/financialconnections/Authorization.java b/src/main/java/com/stripe/model/financialconnections/Authorization.java new file mode 100644 index 000000000000..e1a05f0aa69d --- /dev/null +++ b/src/main/java/com/stripe/model/financialconnections/Authorization.java @@ -0,0 +1,106 @@ +// File generated from our OpenAPI spec +package com.stripe.model.financialconnections; + +import com.google.gson.annotations.SerializedName; +import com.stripe.model.HasId; +import com.stripe.model.StripeObject; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.Setter; + +/** + * An Authorization represents the set of credentials used to connect a group of Financial + * Connections Accounts. + */ +@Getter +@Setter +@EqualsAndHashCode(callSuper = false) +public class Authorization extends StripeObject implements HasId { + /** Unique identifier for the object. */ + @Getter(onMethod_ = {@Override}) + @SerializedName("id") + String id; + + /** The name of the institution that this authorization belongs to. */ + @SerializedName("institution_name") + String institutionName; + + /** + * If the object exists in live mode, the value is {@code true}. If the object exists in test + * mode, the value is {@code false}. + */ + @SerializedName("livemode") + Boolean livemode; + + /** + * String representing the object's type. Objects of the same type share the same value. + * + *

Equal to {@code financial_connections.authorization}. + */ + @SerializedName("object") + String object; + + /** + * The status of the connection to the Authorization. + * + *

One of {@code active}, or {@code inactive}. + */ + @SerializedName("status") + String status; + + @SerializedName("status_details") + StatusDetails statusDetails; + + /** + * For more details about StatusDetails, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetails extends StripeObject { + @SerializedName("active") + Active active; + + @SerializedName("inactive") + Inactive inactive; + + /** + * For more details about Active, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Active extends StripeObject { + /** + * The action (if any) to proactively relink the Authorization. + * + *

One of {@code none}, or {@code relink_required}. + */ + @SerializedName("action") + String action; + + /** When the Authorization is expected to become inactive, if applicable. */ + @SerializedName("expected_deactivation_date") + Long expectedDeactivationDate; + } + + /** + * For more details about Inactive, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Inactive extends StripeObject { + /** + * The action (if any) to relink the inactive Authorization. + * + *

One of {@code none}, or {@code relink_required}. + */ + @SerializedName("action") + String action; + } + } +} diff --git a/src/main/java/com/stripe/model/financialconnections/Session.java b/src/main/java/com/stripe/model/financialconnections/Session.java index 04b0b485069b..2d4d86ef0186 100644 --- a/src/main/java/com/stripe/model/financialconnections/Session.java +++ b/src/main/java/com/stripe/model/financialconnections/Session.java @@ -8,6 +8,7 @@ import com.stripe.model.ExpandableField; import com.stripe.model.HasId; import com.stripe.model.StripeObject; +import com.stripe.model.Token; import com.stripe.net.ApiRequest; import com.stripe.net.ApiRequestParams; import com.stripe.net.ApiResource; @@ -38,6 +39,29 @@ public class Session extends ApiResource implements HasId { @SerializedName("accounts") AccountCollection accounts; + /** + * Tokenization is the process Stripe uses to collect sensitive card or bank account details, or + * personally identifiable information (PII), directly from your customers in a secure manner. A + * token representing this information is returned to your server to use. Use our recommended payments integrations to perform this + * process on the client-side. This guarantees that no sensitive card data touches your server, + * and allows your integration to operate in a PCI-compliant way. + * + *

If you can't use client-side tokenization, you can also create tokens using the API with + * either your publishable or secret API key. If your integration uses this method, you're + * responsible for any PCI compliance that it might require, and you must keep your secret API key + * safe. Unlike with client-side tokenization, your customer's information isn't sent directly to + * Stripe, so we can't determine how it's handled or stored. + * + *

You can't store or use tokens more than once. To store card or bank account information for + * later use, create Customer objects or External accounts. Radar, our integrated solution for automatic fraud + * protection, performs best with integrations that use client-side tokenization. + */ + @SerializedName("bank_account_token") + Token bankAccountToken; + /** A value that will be passed to the client to launch the authentication flow. */ @SerializedName("client_secret") String clientSecret; @@ -50,6 +74,9 @@ public class Session extends ApiResource implements HasId { @SerializedName("id") String id; + @SerializedName("limits") + Limits limits; + /** * If the object exists in live mode, the value is {@code true}. If the object exists in test * mode, the value is {@code false}. @@ -57,6 +84,9 @@ public class Session extends ApiResource implements HasId { @SerializedName("livemode") Boolean livemode; + @SerializedName("manual_entry") + ManualEntry manualEntry; + /** * String representing the object's type. Objects of the same type share the same value. * @@ -255,6 +285,45 @@ public static class Filters extends StripeObject { /** List of countries from which to filter accounts. */ @SerializedName("countries") List countries; + + /** + * Whether the Session should require that linked accounts support payments and retrieve account + * numbers before completion. + * + *

One of {@code all}, {@code at_least_one}, or {@code none}. + */ + @SerializedName("require_payment_method_support") + String requirePaymentMethodSupport; + } + + /** + * For more details about Limits, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Limits extends StripeObject { + /** The number of accounts that can be linked in this Session. */ + @SerializedName("accounts") + Long accounts; + } + + /** + * For more details about ManualEntry, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class ManualEntry extends StripeObject { + /** + * Controls how manual entry of bank account details is presented to the user. + * + *

One of {@code automatic}, or {@code disabled}. + */ + @SerializedName("mode") + String mode; } @Override @@ -262,6 +331,9 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { super.setResponseGetter(responseGetter); trySetResponseGetter(accountHolder, responseGetter); trySetResponseGetter(accounts, responseGetter); + trySetResponseGetter(bankAccountToken, responseGetter); trySetResponseGetter(filters, responseGetter); + trySetResponseGetter(limits, responseGetter); + trySetResponseGetter(manualEntry, responseGetter); } } diff --git a/src/main/java/com/stripe/model/issuing/Authorization.java b/src/main/java/com/stripe/model/issuing/Authorization.java index df2bb695fb2a..dc0f9086e1f0 100644 --- a/src/main/java/com/stripe/model/issuing/Authorization.java +++ b/src/main/java/com/stripe/model/issuing/Authorization.java @@ -1126,9 +1126,9 @@ public static class RequestHistory extends StripeObject { * card_expired}, {@code card_inactive}, {@code cardholder_blocked}, {@code * cardholder_inactive}, {@code cardholder_verification_required}, {@code * insecure_authorization_method}, {@code insufficient_funds}, {@code network_fallback}, {@code - * not_allowed}, {@code pin_blocked}, {@code spending_controls}, {@code suspected_fraud}, {@code - * verification_failed}, {@code webhook_approved}, {@code webhook_declined}, {@code - * webhook_error}, or {@code webhook_timeout}. + * not_allowed}, {@code pin_blocked}, {@code spending_controls}, {@code stripe_internal_error}, + * {@code suspected_fraud}, {@code verification_failed}, {@code webhook_approved}, {@code + * webhook_declined}, {@code webhook_error}, or {@code webhook_timeout}. */ @SerializedName("reason") String reason; diff --git a/src/main/java/com/stripe/model/issuing/Card.java b/src/main/java/com/stripe/model/issuing/Card.java index ee0bdee582c7..00fea1100ebc 100644 --- a/src/main/java/com/stripe/model/issuing/Card.java +++ b/src/main/java/com/stripe/model/issuing/Card.java @@ -496,10 +496,17 @@ public static class Shipping extends StripeObject { @SerializedName("address_validation") AddressValidation addressValidation; + /** + * The name of the business at the shipping address, used on the shipping label to ensure + * delivery when the card is shipped to a cardholder's workplace. + */ + @SerializedName("business_name") + String businessName; + /** * The delivery company that shipped a card. * - *

One of {@code dhl}, {@code fedex}, {@code royal_mail}, or {@code usps}. + *

One of {@code correos}, {@code dhl}, {@code fedex}, {@code royal_mail}, or {@code usps}. */ @SerializedName("carrier") String carrier; diff --git a/src/main/java/com/stripe/model/issuing/Transaction.java b/src/main/java/com/stripe/model/issuing/Transaction.java index 4d6fa19afdcb..bd44212869d8 100644 --- a/src/main/java/com/stripe/model/issuing/Transaction.java +++ b/src/main/java/com/stripe/model/issuing/Transaction.java @@ -665,7 +665,7 @@ public static class ReportedBreakdown extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class Fuel extends StripeObject { /** - * Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive + * Gross fuel amount that should equal Fuel Volume multiplied by Fuel Unit Cost, inclusive * of taxes. */ @SerializedName("gross_amount_decimal") diff --git a/src/main/java/com/stripe/model/tax/Calculation.java b/src/main/java/com/stripe/model/tax/Calculation.java index 340316732539..357bdcb7e70b 100644 --- a/src/main/java/com/stripe/model/tax/Calculation.java +++ b/src/main/java/com/stripe/model/tax/Calculation.java @@ -346,7 +346,8 @@ public static class TaxId extends StripeObject { * {@code gn_nif}, {@code mk_vat}, {@code sr_fin}, {@code sn_ninea}, {@code am_tin}, {@code * np_pan}, {@code tj_tin}, {@code ug_tin}, {@code zm_tin}, {@code kh_tin}, {@code aw_tin}, * {@code az_tin}, {@code bd_bin}, {@code bj_ifu}, {@code et_tin}, {@code kg_tin}, {@code - * la_tin}, {@code cm_niu}, {@code cv_nif}, {@code bf_ifu}, or {@code unknown}. + * la_tin}, {@code cm_niu}, {@code cv_nif}, {@code bf_ifu}, {@code ic_nif}, or {@code + * unknown}. */ @SerializedName("type") String type; @@ -573,9 +574,9 @@ public static class TaxRateDetails extends StripeObject { * The tax type, such as {@code vat} or {@code sales_tax}. * *

One of {@code amusement_tax}, {@code communications_tax}, {@code gst}, {@code hst}, - * {@code igst}, {@code jct}, {@code lease_tax}, {@code pst}, {@code qst}, {@code - * retail_delivery_fee}, {@code rst}, {@code sales_tax}, {@code service_tax}, or {@code - * vat}. + * {@code igst}, {@code jct}, {@code lease_tax}, {@code mass_transit_parking_tax}, {@code + * parking_tax}, {@code pst}, {@code qst}, {@code retail_delivery_fee}, {@code rst}, {@code + * sales_tax}, {@code service_tax}, or {@code vat}. */ @SerializedName("tax_type") String taxType; @@ -674,8 +675,9 @@ public static class TaxRateDetails extends StripeObject { * The tax type, such as {@code vat} or {@code sales_tax}. * *

One of {@code amusement_tax}, {@code communications_tax}, {@code gst}, {@code hst}, - * {@code igst}, {@code jct}, {@code lease_tax}, {@code pst}, {@code qst}, {@code - * retail_delivery_fee}, {@code rst}, {@code sales_tax}, {@code service_tax}, or {@code vat}. + * {@code igst}, {@code jct}, {@code lease_tax}, {@code mass_transit_parking_tax}, {@code + * parking_tax}, {@code pst}, {@code qst}, {@code retail_delivery_fee}, {@code rst}, {@code + * sales_tax}, {@code service_tax}, or {@code vat}. */ @SerializedName("tax_type") String taxType; diff --git a/src/main/java/com/stripe/model/tax/CalculationLineItem.java b/src/main/java/com/stripe/model/tax/CalculationLineItem.java index 4053a98e231a..fa1b82b8020b 100644 --- a/src/main/java/com/stripe/model/tax/CalculationLineItem.java +++ b/src/main/java/com/stripe/model/tax/CalculationLineItem.java @@ -207,8 +207,9 @@ public static class TaxRateDetails extends StripeObject { * The tax type, such as {@code vat} or {@code sales_tax}. * *

One of {@code amusement_tax}, {@code communications_tax}, {@code gst}, {@code hst}, - * {@code igst}, {@code jct}, {@code lease_tax}, {@code pst}, {@code qst}, {@code - * retail_delivery_fee}, {@code rst}, {@code sales_tax}, {@code service_tax}, or {@code vat}. + * {@code igst}, {@code jct}, {@code lease_tax}, {@code mass_transit_parking_tax}, {@code + * parking_tax}, {@code pst}, {@code qst}, {@code retail_delivery_fee}, {@code rst}, {@code + * sales_tax}, {@code service_tax}, or {@code vat}. */ @SerializedName("tax_type") String taxType; diff --git a/src/main/java/com/stripe/model/tax/Registration.java b/src/main/java/com/stripe/model/tax/Registration.java index 74469d3db359..d01ff8ed307e 100644 --- a/src/main/java/com/stripe/model/tax/Registration.java +++ b/src/main/java/com/stripe/model/tax/Registration.java @@ -2889,6 +2889,12 @@ public static class Us extends StripeObject { @SerializedName("local_lease_tax") LocalLeaseTax localLeaseTax; + @SerializedName("mass_transit_parking_tax") + MassTransitParkingTax massTransitParkingTax; + + @SerializedName("parking_tax") + ParkingTax parkingTax; + /** * Two-letter US state code (ISO * 3166-2). @@ -2903,7 +2909,8 @@ public static class Us extends StripeObject { * Type of registration in the US. * *

One of {@code local_amusement_tax}, {@code local_lease_tax}, {@code - * state_communications_tax}, {@code state_retail_delivery_fee}, or {@code state_sales_tax}. + * mass_transit_parking_tax}, {@code parking_tax}, {@code state_communications_tax}, {@code + * state_retail_delivery_fee}, or {@code state_sales_tax}. */ @SerializedName("type") String type; @@ -2940,6 +2947,40 @@ public static class LocalLeaseTax extends StripeObject { String jurisdiction; } + /** + * For more details about MassTransitParkingTax, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class MassTransitParkingTax extends StripeObject { + /** + * A jurisdiction + * code representing the local jurisdiction. + */ + @SerializedName("jurisdiction") + String jurisdiction; + } + + /** + * For more details about ParkingTax, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class ParkingTax extends StripeObject { + /** + * A jurisdiction + * code representing the local jurisdiction. + */ + @SerializedName("jurisdiction") + String jurisdiction; + } + /** * For more details about StateSalesTax, please refer to the API Reference. diff --git a/src/main/java/com/stripe/model/tax/Transaction.java b/src/main/java/com/stripe/model/tax/Transaction.java index 9403ea8e01e6..7aa2912ee866 100644 --- a/src/main/java/com/stripe/model/tax/Transaction.java +++ b/src/main/java/com/stripe/model/tax/Transaction.java @@ -391,7 +391,8 @@ public static class TaxId extends StripeObject { * {@code gn_nif}, {@code mk_vat}, {@code sr_fin}, {@code sn_ninea}, {@code am_tin}, {@code * np_pan}, {@code tj_tin}, {@code ug_tin}, {@code zm_tin}, {@code kh_tin}, {@code aw_tin}, * {@code az_tin}, {@code bd_bin}, {@code bj_ifu}, {@code et_tin}, {@code kg_tin}, {@code - * la_tin}, {@code cm_niu}, {@code cv_nif}, {@code bf_ifu}, or {@code unknown}. + * la_tin}, {@code cm_niu}, {@code cv_nif}, {@code bf_ifu}, {@code ic_nif}, or {@code + * unknown}. */ @SerializedName("type") String type; @@ -634,9 +635,9 @@ public static class TaxRateDetails extends StripeObject { * The tax type, such as {@code vat} or {@code sales_tax}. * *

One of {@code amusement_tax}, {@code communications_tax}, {@code gst}, {@code hst}, - * {@code igst}, {@code jct}, {@code lease_tax}, {@code pst}, {@code qst}, {@code - * retail_delivery_fee}, {@code rst}, {@code sales_tax}, {@code service_tax}, or {@code - * vat}. + * {@code igst}, {@code jct}, {@code lease_tax}, {@code mass_transit_parking_tax}, {@code + * parking_tax}, {@code pst}, {@code qst}, {@code retail_delivery_fee}, {@code rst}, {@code + * sales_tax}, {@code service_tax}, or {@code vat}. */ @SerializedName("tax_type") String taxType; diff --git a/src/main/java/com/stripe/model/v2/billing/MeterEvent.java b/src/main/java/com/stripe/model/v2/billing/MeterEvent.java index c738fba0be25..d4667ced387c 100644 --- a/src/main/java/com/stripe/model/v2/billing/MeterEvent.java +++ b/src/main/java/com/stripe/model/v2/billing/MeterEvent.java @@ -28,7 +28,7 @@ public class MeterEvent extends StripeObject { /** * A unique identifier for the event. If not provided, one will be generated. We recommend using a - * globally unique identifier for this. We’ll enforce uniqueness within a rolling 24 hour period. + * globally unique identifier for this. We'll enforce uniqueness within a rolling 24 hour period. */ @SerializedName("identifier") String identifier; @@ -50,7 +50,7 @@ public class MeterEvent extends StripeObject { String object; /** - * The payload of the event. This must contain the fields corresponding to a meter’s {@code + * The payload of the event. This must contain the fields corresponding to a meter's {@code * customer_mapping.event_payload_key} (default is {@code stripe_customer_id}) and {@code * value_settings.event_payload_key} (default is {@code value}). Read more about the payload.. diff --git a/src/main/java/com/stripe/model/v2/billing/MeterEventAdjustment.java b/src/main/java/com/stripe/model/v2/billing/MeterEventAdjustment.java index c26cb58f4e4f..fbd6b93bb9d6 100644 --- a/src/main/java/com/stripe/model/v2/billing/MeterEventAdjustment.java +++ b/src/main/java/com/stripe/model/v2/billing/MeterEventAdjustment.java @@ -52,7 +52,7 @@ public class MeterEventAdjustment extends StripeObject implements HasId { String object; /** - * Open Enum. The meter event adjustment’s status. + * Open Enum. The meter event adjustment's status. * *

One of {@code complete}, or {@code pending}. */ diff --git a/src/main/java/com/stripe/model/v2/core/Account.java b/src/main/java/com/stripe/model/v2/core/Account.java index f9c5d0674b57..047a6609975d 100644 --- a/src/main/java/com/stripe/model/v2/core/Account.java +++ b/src/main/java/com/stripe/model/v2/core/Account.java @@ -4191,6 +4191,10 @@ public static class InnerAccount extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class BusinessDetails extends StripeObject { + /** Additional addresses associated with the business. */ + @SerializedName("additional_addresses") + List additionalAddresses; + /** The company’s primary address. */ @SerializedName("address") Address address; @@ -4258,6 +4262,54 @@ public static class BusinessDetails extends StripeObject { @SerializedName("structure") String structure; + /** + * For more details about AdditionalAddress, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AdditionalAddress extends StripeObject { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + String city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + String country; + + /** Address line 1 (e.g., street, PO Box, or company name). */ + @SerializedName("line1") + String line1; + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** + * Purpose of additional address. + * + *

One of {@code administrative}, or {@code principal_place_of_business}. + */ + @SerializedName("purpose") + String purpose; + + /** State, county, province, or region. */ + @SerializedName("state") + String state; + + /** Town or district. */ + @SerializedName("town") + String town; + } + /** The company’s primary address. */ @Getter @Setter diff --git a/src/main/java/com/stripe/param/AccountCreateParams.java b/src/main/java/com/stripe/param/AccountCreateParams.java index f92d3a781992..8dc79bcd16ce 100644 --- a/src/main/java/com/stripe/param/AccountCreateParams.java +++ b/src/main/java/com/stripe/param/AccountCreateParams.java @@ -7668,6 +7668,9 @@ public static class Company { @SerializedName("address_kanji") AddressKanji addressKanji; + @SerializedName("administrative_address") + AdministrativeAddress administrativeAddress; + /** * Whether the company's directors have been provided. Set this Boolean to {@code true} after * creating all the company's directors with the @@ -7755,6 +7758,9 @@ public static class Company { @SerializedName("phone") String phone; + @SerializedName("principal_place_of_business") + PrincipalPlaceOfBusiness principalPlaceOfBusiness; + /** When the business was incorporated or registered. */ @SerializedName("registration_date") Object registrationDate; @@ -7787,6 +7793,10 @@ public static class Company { * The business ID number of the company, as appropriate for the company’s country. (Examples * are an Employer ID Number in the U.S., a Business Number in Canada, or a Company Number in * the UK.) + * + *

Changing this value requires that the account re-accept the terms of + * service. */ @SerializedName("tax_id") String taxId; @@ -7809,6 +7819,7 @@ private Company( Address address, AddressKana addressKana, AddressKanji addressKanji, + AdministrativeAddress administrativeAddress, Boolean directorsProvided, DirectorshipDeclaration directorshipDeclaration, Boolean executivesProvided, @@ -7822,6 +7833,7 @@ private Company( OwnershipDeclaration ownershipDeclaration, ApiRequestParams.EnumParam ownershipExemptionReason, String phone, + PrincipalPlaceOfBusiness principalPlaceOfBusiness, Object registrationDate, String registrationNumber, RepresentativeDeclaration representativeDeclaration, @@ -7833,6 +7845,7 @@ private Company( this.address = address; this.addressKana = addressKana; this.addressKanji = addressKanji; + this.administrativeAddress = administrativeAddress; this.directorsProvided = directorsProvided; this.directorshipDeclaration = directorshipDeclaration; this.executivesProvided = executivesProvided; @@ -7846,6 +7859,7 @@ private Company( this.ownershipDeclaration = ownershipDeclaration; this.ownershipExemptionReason = ownershipExemptionReason; this.phone = phone; + this.principalPlaceOfBusiness = principalPlaceOfBusiness; this.registrationDate = registrationDate; this.registrationNumber = registrationNumber; this.representativeDeclaration = representativeDeclaration; @@ -7867,6 +7881,8 @@ public static class Builder { private AddressKanji addressKanji; + private AdministrativeAddress administrativeAddress; + private Boolean directorsProvided; private DirectorshipDeclaration directorshipDeclaration; @@ -7893,6 +7909,8 @@ public static class Builder { private String phone; + private PrincipalPlaceOfBusiness principalPlaceOfBusiness; + private Object registrationDate; private String registrationNumber; @@ -7915,6 +7933,7 @@ public AccountCreateParams.Company build() { this.address, this.addressKana, this.addressKanji, + this.administrativeAddress, this.directorsProvided, this.directorshipDeclaration, this.executivesProvided, @@ -7928,6 +7947,7 @@ public AccountCreateParams.Company build() { this.ownershipDeclaration, this.ownershipExemptionReason, this.phone, + this.principalPlaceOfBusiness, this.registrationDate, this.registrationNumber, this.representativeDeclaration, @@ -7956,6 +7976,12 @@ public Builder setAddressKanji(AccountCreateParams.Company.AddressKanji addressK return this; } + public Builder setAdministrativeAddress( + AccountCreateParams.Company.AdministrativeAddress administrativeAddress) { + this.administrativeAddress = administrativeAddress; + return this; + } + /** * Whether the company's directors have been provided. Set this Boolean to {@code true} after * creating all the company's directors with the @@ -8100,6 +8126,12 @@ public Builder setPhone(String phone) { return this; } + public Builder setPrincipalPlaceOfBusiness( + AccountCreateParams.Company.PrincipalPlaceOfBusiness principalPlaceOfBusiness) { + this.principalPlaceOfBusiness = principalPlaceOfBusiness; + return this; + } + /** When the business was incorporated or registered. */ public Builder setRegistrationDate( AccountCreateParams.Company.RegistrationDate registrationDate) { @@ -8158,6 +8190,10 @@ public Builder setStructure(EmptyParam structure) { * The business ID number of the company, as appropriate for the company’s country. (Examples * are an Employer ID Number in the U.S., a Business Number in Canada, or a Company Number in * the UK.) + * + *

Changing this value requires that the account re-accept the terms of + * service. */ public Builder setTaxId(String taxId) { this.taxId = taxId; @@ -8689,6 +8725,168 @@ public Builder setTown(String town) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AdministrativeAddress { + /** City, district, suburb, town, or village. */ + @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; + + /** Address line 1, such as the street, PO Box, or company name. */ + @SerializedName("line1") + String line1; + + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** + * State, county, province, or region (ISO + * 3166-2). + */ + @SerializedName("state") + String state; + + private AdministrativeAddress( + String city, + String country, + Map extraParams, + String line1, + String line2, + String postalCode, + String state) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + } + + 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; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Company.AdministrativeAddress build() { + return new AccountCreateParams.Company.AdministrativeAddress( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state); + } + + /** City, district, suburb, town, or village. */ + 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 AccountCreateParams.Company.AdministrativeAddress#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.Company.AdministrativeAddress#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** 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, such as the apartment, suite, unit, or building. */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** + * State, county, province, or region (ISO 3166-2). + */ + public Builder setState(String state) { + this.state = state; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class DirectorshipDeclaration { @@ -8892,6 +9090,168 @@ public Builder setUserAgent(String userAgent) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PrincipalPlaceOfBusiness { + /** City, district, suburb, town, or village. */ + @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; + + /** Address line 1, such as the street, PO Box, or company name. */ + @SerializedName("line1") + String line1; + + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** + * State, county, province, or region (ISO + * 3166-2). + */ + @SerializedName("state") + String state; + + private PrincipalPlaceOfBusiness( + String city, + String country, + Map extraParams, + String line1, + String line2, + String postalCode, + String state) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + } + + 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; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Company.PrincipalPlaceOfBusiness build() { + return new AccountCreateParams.Company.PrincipalPlaceOfBusiness( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state); + } + + /** City, district, suburb, town, or village. */ + 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 AccountCreateParams.Company.PrincipalPlaceOfBusiness#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.Company.PrincipalPlaceOfBusiness#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** 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, such as the apartment, suite, unit, or building. */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** + * State, county, province, or region (ISO 3166-2). + */ + public Builder setState(String state) { + this.state = state; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class RegistrationDate { @@ -9853,13 +10213,6 @@ public static class Documents { @SerializedName("proof_of_address") ProofOfAddress proofOfAddress; - /** - * One or more documents showing the company’s proof of registration with the national business - * registry. - */ - @SerializedName("proof_of_registration") - ProofOfRegistration proofOfRegistration; - /** One or more documents that demonstrate proof of ultimate beneficial ownership. */ @SerializedName("proof_of_ultimate_beneficial_ownership") ProofOfUltimateBeneficialOwnership proofOfUltimateBeneficialOwnership; @@ -9873,7 +10226,6 @@ private Documents( CompanyTaxIdVerification companyTaxIdVerification, Map extraParams, ProofOfAddress proofOfAddress, - ProofOfRegistration proofOfRegistration, ProofOfUltimateBeneficialOwnership proofOfUltimateBeneficialOwnership) { this.bankAccountOwnershipVerification = bankAccountOwnershipVerification; this.companyLicense = companyLicense; @@ -9883,7 +10235,6 @@ private Documents( this.companyTaxIdVerification = companyTaxIdVerification; this.extraParams = extraParams; this.proofOfAddress = proofOfAddress; - this.proofOfRegistration = proofOfRegistration; this.proofOfUltimateBeneficialOwnership = proofOfUltimateBeneficialOwnership; } @@ -9908,8 +10259,6 @@ public static class Builder { private ProofOfAddress proofOfAddress; - private ProofOfRegistration proofOfRegistration; - private ProofOfUltimateBeneficialOwnership proofOfUltimateBeneficialOwnership; /** Finalize and obtain parameter instance from this builder. */ @@ -9923,7 +10272,6 @@ public AccountCreateParams.Documents build() { this.companyTaxIdVerification, this.extraParams, this.proofOfAddress, - this.proofOfRegistration, this.proofOfUltimateBeneficialOwnership); } @@ -10020,16 +10368,6 @@ public Builder setProofOfAddress( return this; } - /** - * One or more documents showing the company’s proof of registration with the national - * business registry. - */ - public Builder setProofOfRegistration( - AccountCreateParams.Documents.ProofOfRegistration proofOfRegistration) { - this.proofOfRegistration = proofOfRegistration; - return this; - } - /** One or more documents that demonstrate proof of ultimate beneficial ownership. */ public Builder setProofOfUltimateBeneficialOwnership( AccountCreateParams.Documents.ProofOfUltimateBeneficialOwnership @@ -10717,188 +11055,6 @@ public Builder addAllFile(List elements) { } } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class ProofOfRegistration { - /** - * 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; - - /** - * One or more document ids returned by a file - * upload with a {@code purpose} value of {@code account_requirement}. - */ - @SerializedName("files") - List files; - - /** Information regarding the person signing the document if applicable. */ - @SerializedName("signer") - Signer signer; - - private ProofOfRegistration( - Map extraParams, List files, Signer signer) { - this.extraParams = extraParams; - this.files = files; - this.signer = signer; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private Map extraParams; - - private List files; - - private Signer signer; - - /** Finalize and obtain parameter instance from this builder. */ - public AccountCreateParams.Documents.ProofOfRegistration build() { - return new AccountCreateParams.Documents.ProofOfRegistration( - this.extraParams, this.files, this.signer); - } - - /** - * 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.Documents.ProofOfRegistration#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.Documents.ProofOfRegistration#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 an element to `files` list. A list is initialized for the first `add/addAll` call, - * and subsequent calls adds additional elements to the original list. See {@link - * AccountCreateParams.Documents.ProofOfRegistration#files} for the field documentation. - */ - public Builder addFile(String element) { - if (this.files == null) { - this.files = new ArrayList<>(); - } - this.files.add(element); - return this; - } - - /** - * Add all elements to `files` list. A list is initialized for the first `add/addAll` call, - * and subsequent calls adds additional elements to the original list. See {@link - * AccountCreateParams.Documents.ProofOfRegistration#files} for the field documentation. - */ - public Builder addAllFile(List elements) { - if (this.files == null) { - this.files = new ArrayList<>(); - } - this.files.addAll(elements); - return this; - } - - /** Information regarding the person signing the document if applicable. */ - public Builder setSigner(AccountCreateParams.Documents.ProofOfRegistration.Signer signer) { - this.signer = signer; - return this; - } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Signer { - /** - * 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 token of the person signing the document, if applicable. */ - @SerializedName("person") - String person; - - private Signer(Map extraParams, String person) { - this.extraParams = extraParams; - this.person = person; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private Map extraParams; - - private String person; - - /** Finalize and obtain parameter instance from this builder. */ - public AccountCreateParams.Documents.ProofOfRegistration.Signer build() { - return new AccountCreateParams.Documents.ProofOfRegistration.Signer( - this.extraParams, this.person); - } - - /** - * 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.Documents.ProofOfRegistration.Signer#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.Documents.ProofOfRegistration.Signer#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 token of the person signing the document, if applicable. */ - public Builder setPerson(String person) { - this.person = person; - return this; - } - } - } - } - @Getter @EqualsAndHashCode(callSuper = false) public static class ProofOfUltimateBeneficialOwnership { diff --git a/src/main/java/com/stripe/param/AccountPersonCreateParams.java b/src/main/java/com/stripe/param/AccountPersonCreateParams.java index fe380ee8a01d..251a56f04925 100644 --- a/src/main/java/com/stripe/param/AccountPersonCreateParams.java +++ b/src/main/java/com/stripe/param/AccountPersonCreateParams.java @@ -86,6 +86,10 @@ public class AccountPersonCreateParams extends ApiRequestParams { * in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also * provide a PII token provided * by Stripe.js. + * + *

Changing this value for the account's representative requires that the account re-accept the + * terms of + * service. */ @SerializedName("id_number") String idNumber; @@ -96,6 +100,10 @@ public class AccountPersonCreateParams extends ApiRequestParams { * Instead of the number itself, you can also provide a PII token provided by * Stripe.js. + * + *

Changing this value for the account's representative requires that the account re-accept the + * terms of + * service. */ @SerializedName("id_number_secondary") String idNumberSecondary; @@ -160,7 +168,13 @@ public class AccountPersonCreateParams extends ApiRequestParams { @SerializedName("relationship") Relationship relationship; - /** The last four digits of the person's Social Security number (U.S. only). */ + /** + * The last four digits of the person's Social Security number (U.S. only). + * + *

Changing this value for the account's representative requires that the account re-accept the + * terms of + * service. + */ @SerializedName("ssn_last_4") String ssnLast4; @@ -510,6 +524,10 @@ public Builder setGender(String gender) { * number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you * can also provide a PII * token provided by Stripe.js. + * + *

Changing this value for the account's representative requires that the account re-accept + * the terms of + * service. */ public Builder setIdNumber(String idNumber) { this.idNumber = idNumber; @@ -522,6 +540,10 @@ public Builder setIdNumber(String idNumber) { * card. Instead of the number itself, you can also provide a PII token provided by * Stripe.js. + * + *

Changing this value for the account's representative requires that the account re-accept + * the terms of + * service. */ public Builder setIdNumberSecondary(String idNumberSecondary) { this.idNumberSecondary = idNumberSecondary; @@ -651,7 +673,13 @@ public Builder setRelationship(AccountPersonCreateParams.Relationship relationsh return this; } - /** The last four digits of the person's Social Security number (U.S. only). */ + /** + * The last four digits of the person's Social Security number (U.S. only). + * + *

Changing this value for the account's representative requires that the account re-accept + * the terms of + * service. + */ public Builder setSsnLast4(String ssnLast4) { this.ssnLast4 = ssnLast4; return this; diff --git a/src/main/java/com/stripe/param/AccountPersonUpdateParams.java b/src/main/java/com/stripe/param/AccountPersonUpdateParams.java index a3a2222ef03d..9ff9594541bd 100644 --- a/src/main/java/com/stripe/param/AccountPersonUpdateParams.java +++ b/src/main/java/com/stripe/param/AccountPersonUpdateParams.java @@ -86,6 +86,10 @@ public class AccountPersonUpdateParams extends ApiRequestParams { * in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also * provide a PII token provided * by Stripe.js. + * + *

Changing this value for the account's representative requires that the account re-accept the + * terms of + * service. */ @SerializedName("id_number") Object idNumber; @@ -96,6 +100,10 @@ public class AccountPersonUpdateParams extends ApiRequestParams { * Instead of the number itself, you can also provide a PII token provided by * Stripe.js. + * + *

Changing this value for the account's representative requires that the account re-accept the + * terms of + * service. */ @SerializedName("id_number_secondary") Object idNumberSecondary; @@ -160,7 +168,13 @@ public class AccountPersonUpdateParams extends ApiRequestParams { @SerializedName("relationship") Relationship relationship; - /** The last four digits of the person's Social Security number (U.S. only). */ + /** + * The last four digits of the person's Social Security number (U.S. only). + * + *

Changing this value for the account's representative requires that the account re-accept the + * terms of + * service. + */ @SerializedName("ssn_last_4") Object ssnLast4; @@ -543,6 +557,10 @@ public Builder setGender(EmptyParam gender) { * number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you * can also provide a PII * token provided by Stripe.js. + * + *

Changing this value for the account's representative requires that the account re-accept + * the terms of + * service. */ public Builder setIdNumber(String idNumber) { this.idNumber = idNumber; @@ -554,6 +572,10 @@ public Builder setIdNumber(String idNumber) { * number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you * can also provide a PII * token provided by Stripe.js. + * + *

Changing this value for the account's representative requires that the account re-accept + * the terms of + * service. */ public Builder setIdNumber(EmptyParam idNumber) { this.idNumber = idNumber; @@ -566,6 +588,10 @@ public Builder setIdNumber(EmptyParam idNumber) { * card. Instead of the number itself, you can also provide a PII token provided by * Stripe.js. + * + *

Changing this value for the account's representative requires that the account re-accept + * the terms of + * service. */ public Builder setIdNumberSecondary(String idNumberSecondary) { this.idNumberSecondary = idNumberSecondary; @@ -578,6 +604,10 @@ public Builder setIdNumberSecondary(String idNumberSecondary) { * card. Instead of the number itself, you can also provide a PII token provided by * Stripe.js. + * + *

Changing this value for the account's representative requires that the account re-accept + * the terms of + * service. */ public Builder setIdNumberSecondary(EmptyParam idNumberSecondary) { this.idNumberSecondary = idNumberSecondary; @@ -756,13 +786,25 @@ public Builder setRelationship(AccountPersonUpdateParams.Relationship relationsh return this; } - /** The last four digits of the person's Social Security number (U.S. only). */ + /** + * The last four digits of the person's Social Security number (U.S. only). + * + *

Changing this value for the account's representative requires that the account re-accept + * the terms of + * service. + */ public Builder setSsnLast4(String ssnLast4) { this.ssnLast4 = ssnLast4; return this; } - /** The last four digits of the person's Social Security number (U.S. only). */ + /** + * The last four digits of the person's Social Security number (U.S. only). + * + *

Changing this value for the account's representative requires that the account re-accept + * the terms of + * service. + */ public Builder setSsnLast4(EmptyParam ssnLast4) { this.ssnLast4 = ssnLast4; return this; diff --git a/src/main/java/com/stripe/param/AccountRejectParams.java b/src/main/java/com/stripe/param/AccountRejectParams.java index 317d9c26c965..8fbc2d841c0b 100644 --- a/src/main/java/com/stripe/param/AccountRejectParams.java +++ b/src/main/java/com/stripe/param/AccountRejectParams.java @@ -26,6 +26,13 @@ public class AccountRejectParams extends ApiRequestParams { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** + * Whether to pause payouts on the account as part of the rejection. Defaults to {@code pause}. + * Use {@code none} to leave payouts enabled. + */ + @SerializedName("payouts_action") + PayoutsAction payoutsAction; + /** * Required. The reason for rejecting the account. Can be {@code fraud}, {@code * terms_of_service}, or {@code other}. @@ -33,9 +40,14 @@ public class AccountRejectParams extends ApiRequestParams { @SerializedName("reason") String reason; - private AccountRejectParams(List expand, Map extraParams, String reason) { + private AccountRejectParams( + List expand, + Map extraParams, + PayoutsAction payoutsAction, + String reason) { this.expand = expand; this.extraParams = extraParams; + this.payoutsAction = payoutsAction; this.reason = reason; } @@ -48,11 +60,14 @@ public static class Builder { private Map extraParams; + private PayoutsAction payoutsAction; + private String reason; /** Finalize and obtain parameter instance from this builder. */ public AccountRejectParams build() { - return new AccountRejectParams(this.expand, this.extraParams, this.reason); + return new AccountRejectParams( + this.expand, this.extraParams, this.payoutsAction, this.reason); } /** @@ -107,6 +122,15 @@ public Builder putAllExtraParam(Map map) { return this; } + /** + * Whether to pause payouts on the account as part of the rejection. Defaults to {@code pause}. + * Use {@code none} to leave payouts enabled. + */ + public Builder setPayoutsAction(AccountRejectParams.PayoutsAction payoutsAction) { + this.payoutsAction = payoutsAction; + return this; + } + /** * Required. The reason for rejecting the account. Can be {@code fraud}, {@code * terms_of_service}, or {@code other}. @@ -116,4 +140,19 @@ public Builder setReason(String reason) { return this; } } + + public enum PayoutsAction implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), + + @SerializedName("pause") + PAUSE("pause"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PayoutsAction(String value) { + this.value = value; + } + } } diff --git a/src/main/java/com/stripe/param/AccountSessionCreateParams.java b/src/main/java/com/stripe/param/AccountSessionCreateParams.java index 1745d15ce429..3d7a34b387a1 100644 --- a/src/main/java/com/stripe/param/AccountSessionCreateParams.java +++ b/src/main/java/com/stripe/param/AccountSessionCreateParams.java @@ -1631,17 +1631,26 @@ public static class Features { @SerializedName("refund_management") Boolean refundManagement; + /** + * Whether to allow connected accounts to submit disputes using Smart Disputes. Defaults to + * the value of {@code dispute_management}. + */ + @SerializedName("smart_disputes_management") + Boolean smartDisputesManagement; + private Features( Boolean capturePayments, Boolean destinationOnBehalfOfChargeManagement, Boolean disputeManagement, Map extraParams, - Boolean refundManagement) { + Boolean refundManagement, + Boolean smartDisputesManagement) { this.capturePayments = capturePayments; this.destinationOnBehalfOfChargeManagement = destinationOnBehalfOfChargeManagement; this.disputeManagement = disputeManagement; this.extraParams = extraParams; this.refundManagement = refundManagement; + this.smartDisputesManagement = smartDisputesManagement; } public static Builder builder() { @@ -1659,6 +1668,8 @@ public static class Builder { private Boolean refundManagement; + private Boolean smartDisputesManagement; + /** Finalize and obtain parameter instance from this builder. */ public AccountSessionCreateParams.Components.DisputesList.Features build() { return new AccountSessionCreateParams.Components.DisputesList.Features( @@ -1666,7 +1677,8 @@ public AccountSessionCreateParams.Components.DisputesList.Features build() { this.destinationOnBehalfOfChargeManagement, this.disputeManagement, this.extraParams, - this.refundManagement); + this.refundManagement, + this.smartDisputesManagement); } /** @@ -1732,6 +1744,15 @@ public Builder setRefundManagement(Boolean refundManagement) { this.refundManagement = refundManagement; return this; } + + /** + * Whether to allow connected accounts to submit disputes using Smart Disputes. Defaults + * to the value of {@code dispute_management}. + */ + public Builder setSmartDisputesManagement(Boolean smartDisputesManagement) { + this.smartDisputesManagement = smartDisputesManagement; + return this; + } } } } @@ -3274,17 +3295,26 @@ public static class Features { @SerializedName("refund_management") Boolean refundManagement; + /** + * Whether to allow connected accounts to submit disputes using Smart Disputes. Defaults to + * the value of {@code dispute_management}. + */ + @SerializedName("smart_disputes_management") + Boolean smartDisputesManagement; + private Features( Boolean capturePayments, Boolean destinationOnBehalfOfChargeManagement, Boolean disputeManagement, Map extraParams, - Boolean refundManagement) { + Boolean refundManagement, + Boolean smartDisputesManagement) { this.capturePayments = capturePayments; this.destinationOnBehalfOfChargeManagement = destinationOnBehalfOfChargeManagement; this.disputeManagement = disputeManagement; this.extraParams = extraParams; this.refundManagement = refundManagement; + this.smartDisputesManagement = smartDisputesManagement; } public static Builder builder() { @@ -3302,6 +3332,8 @@ public static class Builder { private Boolean refundManagement; + private Boolean smartDisputesManagement; + /** Finalize and obtain parameter instance from this builder. */ public AccountSessionCreateParams.Components.PaymentDetails.Features build() { return new AccountSessionCreateParams.Components.PaymentDetails.Features( @@ -3309,7 +3341,8 @@ public AccountSessionCreateParams.Components.PaymentDetails.Features build() { this.destinationOnBehalfOfChargeManagement, this.disputeManagement, this.extraParams, - this.refundManagement); + this.refundManagement, + this.smartDisputesManagement); } /** @@ -3375,6 +3408,15 @@ public Builder setRefundManagement(Boolean refundManagement) { this.refundManagement = refundManagement; return this; } + + /** + * Whether to allow connected accounts to submit disputes using Smart Disputes. Defaults + * to the value of {@code dispute_management}. + */ + public Builder setSmartDisputesManagement(Boolean smartDisputesManagement) { + this.smartDisputesManagement = smartDisputesManagement; + return this; + } } } } @@ -3495,15 +3537,24 @@ public static class Features { @SerializedName("refund_management") Boolean refundManagement; + /** + * Whether to allow connected accounts to submit disputes using Smart Disputes. Defaults to + * the value of {@code dispute_management}. + */ + @SerializedName("smart_disputes_management") + Boolean smartDisputesManagement; + private Features( Boolean destinationOnBehalfOfChargeManagement, Boolean disputeManagement, Map extraParams, - Boolean refundManagement) { + Boolean refundManagement, + Boolean smartDisputesManagement) { this.destinationOnBehalfOfChargeManagement = destinationOnBehalfOfChargeManagement; this.disputeManagement = disputeManagement; this.extraParams = extraParams; this.refundManagement = refundManagement; + this.smartDisputesManagement = smartDisputesManagement; } public static Builder builder() { @@ -3519,13 +3570,16 @@ public static class Builder { private Boolean refundManagement; + private Boolean smartDisputesManagement; + /** Finalize and obtain parameter instance from this builder. */ public AccountSessionCreateParams.Components.PaymentDisputes.Features build() { return new AccountSessionCreateParams.Components.PaymentDisputes.Features( this.destinationOnBehalfOfChargeManagement, this.disputeManagement, this.extraParams, - this.refundManagement); + this.refundManagement, + this.smartDisputesManagement); } /** @@ -3582,6 +3636,15 @@ public Builder setRefundManagement(Boolean refundManagement) { this.refundManagement = refundManagement; return this; } + + /** + * Whether to allow connected accounts to submit disputes using Smart Disputes. Defaults + * to the value of {@code dispute_management}. + */ + public Builder setSmartDisputesManagement(Boolean smartDisputesManagement) { + this.smartDisputesManagement = smartDisputesManagement; + return this; + } } } } @@ -3709,17 +3772,26 @@ public static class Features { @SerializedName("refund_management") Boolean refundManagement; + /** + * Whether to allow connected accounts to submit disputes using Smart Disputes. Defaults to + * the value of {@code dispute_management}. + */ + @SerializedName("smart_disputes_management") + Boolean smartDisputesManagement; + private Features( Boolean capturePayments, Boolean destinationOnBehalfOfChargeManagement, Boolean disputeManagement, Map extraParams, - Boolean refundManagement) { + Boolean refundManagement, + Boolean smartDisputesManagement) { this.capturePayments = capturePayments; this.destinationOnBehalfOfChargeManagement = destinationOnBehalfOfChargeManagement; this.disputeManagement = disputeManagement; this.extraParams = extraParams; this.refundManagement = refundManagement; + this.smartDisputesManagement = smartDisputesManagement; } public static Builder builder() { @@ -3737,6 +3809,8 @@ public static class Builder { private Boolean refundManagement; + private Boolean smartDisputesManagement; + /** Finalize and obtain parameter instance from this builder. */ public AccountSessionCreateParams.Components.Payments.Features build() { return new AccountSessionCreateParams.Components.Payments.Features( @@ -3744,7 +3818,8 @@ public AccountSessionCreateParams.Components.Payments.Features build() { this.destinationOnBehalfOfChargeManagement, this.disputeManagement, this.extraParams, - this.refundManagement); + this.refundManagement, + this.smartDisputesManagement); } /** @@ -3808,6 +3883,15 @@ public Builder setRefundManagement(Boolean refundManagement) { this.refundManagement = refundManagement; return this; } + + /** + * Whether to allow connected accounts to submit disputes using Smart Disputes. Defaults + * to the value of {@code dispute_management}. + */ + public Builder setSmartDisputesManagement(Boolean smartDisputesManagement) { + this.smartDisputesManagement = smartDisputesManagement; + return this; + } } } } diff --git a/src/main/java/com/stripe/param/AccountUnrejectParams.java b/src/main/java/com/stripe/param/AccountUnrejectParams.java new file mode 100644 index 000000000000..d86214732d88 --- /dev/null +++ b/src/main/java/com/stripe/param/AccountUnrejectParams.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 AccountUnrejectParams 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 AccountUnrejectParams(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 AccountUnrejectParams build() { + return new AccountUnrejectParams(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 + * AccountUnrejectParams#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 + * AccountUnrejectParams#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 + * AccountUnrejectParams#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 AccountUnrejectParams#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/AccountUpdateParams.java b/src/main/java/com/stripe/param/AccountUpdateParams.java index 1e3d0263b9e0..b7386562c451 100644 --- a/src/main/java/com/stripe/param/AccountUpdateParams.java +++ b/src/main/java/com/stripe/param/AccountUpdateParams.java @@ -7766,6 +7766,9 @@ public static class Company { @SerializedName("address_kanji") AddressKanji addressKanji; + @SerializedName("administrative_address") + AdministrativeAddress administrativeAddress; + /** * Whether the company's directors have been provided. Set this Boolean to {@code true} after * creating all the company's directors with the @@ -7853,6 +7856,9 @@ public static class Company { @SerializedName("phone") Object phone; + @SerializedName("principal_place_of_business") + PrincipalPlaceOfBusiness principalPlaceOfBusiness; + @SerializedName("registration_date") Object registrationDate; @@ -7884,6 +7890,10 @@ public static class Company { * The business ID number of the company, as appropriate for the company’s country. (Examples * are an Employer ID Number in the U.S., a Business Number in Canada, or a Company Number in * the UK.) + * + *

Changing this value requires that the account re-accept the terms of + * service. */ @SerializedName("tax_id") Object taxId; @@ -7906,6 +7916,7 @@ private Company( Address address, AddressKana addressKana, AddressKanji addressKanji, + AdministrativeAddress administrativeAddress, Boolean directorsProvided, DirectorshipDeclaration directorshipDeclaration, Boolean executivesProvided, @@ -7919,6 +7930,7 @@ private Company( OwnershipDeclaration ownershipDeclaration, ApiRequestParams.EnumParam ownershipExemptionReason, Object phone, + PrincipalPlaceOfBusiness principalPlaceOfBusiness, Object registrationDate, Object registrationNumber, RepresentativeDeclaration representativeDeclaration, @@ -7930,6 +7942,7 @@ private Company( this.address = address; this.addressKana = addressKana; this.addressKanji = addressKanji; + this.administrativeAddress = administrativeAddress; this.directorsProvided = directorsProvided; this.directorshipDeclaration = directorshipDeclaration; this.executivesProvided = executivesProvided; @@ -7943,6 +7956,7 @@ private Company( this.ownershipDeclaration = ownershipDeclaration; this.ownershipExemptionReason = ownershipExemptionReason; this.phone = phone; + this.principalPlaceOfBusiness = principalPlaceOfBusiness; this.registrationDate = registrationDate; this.registrationNumber = registrationNumber; this.representativeDeclaration = representativeDeclaration; @@ -7964,6 +7978,8 @@ public static class Builder { private AddressKanji addressKanji; + private AdministrativeAddress administrativeAddress; + private Boolean directorsProvided; private DirectorshipDeclaration directorshipDeclaration; @@ -7990,6 +8006,8 @@ public static class Builder { private Object phone; + private PrincipalPlaceOfBusiness principalPlaceOfBusiness; + private Object registrationDate; private Object registrationNumber; @@ -8012,6 +8030,7 @@ public AccountUpdateParams.Company build() { this.address, this.addressKana, this.addressKanji, + this.administrativeAddress, this.directorsProvided, this.directorshipDeclaration, this.executivesProvided, @@ -8025,6 +8044,7 @@ public AccountUpdateParams.Company build() { this.ownershipDeclaration, this.ownershipExemptionReason, this.phone, + this.principalPlaceOfBusiness, this.registrationDate, this.registrationNumber, this.representativeDeclaration, @@ -8053,6 +8073,12 @@ public Builder setAddressKanji(AccountUpdateParams.Company.AddressKanji addressK return this; } + public Builder setAdministrativeAddress( + AccountUpdateParams.Company.AdministrativeAddress administrativeAddress) { + this.administrativeAddress = administrativeAddress; + return this; + } + /** * Whether the company's directors have been provided. Set this Boolean to {@code true} after * creating all the company's directors with the @@ -8236,6 +8262,12 @@ public Builder setPhone(EmptyParam phone) { return this; } + public Builder setPrincipalPlaceOfBusiness( + AccountUpdateParams.Company.PrincipalPlaceOfBusiness principalPlaceOfBusiness) { + this.principalPlaceOfBusiness = principalPlaceOfBusiness; + return this; + } + public Builder setRegistrationDate( AccountUpdateParams.Company.RegistrationDate registrationDate) { this.registrationDate = registrationDate; @@ -8303,6 +8335,10 @@ public Builder setStructure(EmptyParam structure) { * The business ID number of the company, as appropriate for the company’s country. (Examples * are an Employer ID Number in the U.S., a Business Number in Canada, or a Company Number in * the UK.) + * + *

Changing this value requires that the account re-accept the terms of + * service. */ public Builder setTaxId(String taxId) { this.taxId = taxId; @@ -8313,6 +8349,10 @@ public Builder setTaxId(String taxId) { * The business ID number of the company, as appropriate for the company’s country. (Examples * are an Employer ID Number in the U.S., a Business Number in Canada, or a Company Number in * the UK.) + * + *

Changing this value requires that the account re-accept the terms of + * service. */ public Builder setTaxId(EmptyParam taxId) { this.taxId = taxId; @@ -8990,6 +9030,210 @@ public Builder setTown(EmptyParam town) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AdministrativeAddress { + /** City, district, suburb, town, or village. */ + @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; + + /** Address line 1, such as the street, PO Box, or company name. */ + @SerializedName("line1") + Object line1; + + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + Object line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + Object postalCode; + + /** + * State, county, province, or region (ISO + * 3166-2). + */ + @SerializedName("state") + Object state; + + private AdministrativeAddress( + Object city, + Object country, + Map extraParams, + Object line1, + Object line2, + Object postalCode, + Object state) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + } + + 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; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Company.AdministrativeAddress build() { + return new AccountUpdateParams.Company.AdministrativeAddress( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state); + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** City, district, suburb, town, or village. */ + 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 AccountUpdateParams.Company.AdministrativeAddress#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.Company.AdministrativeAddress#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** 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, such as the street, PO Box, or company name. */ + public Builder setLine1(EmptyParam line1) { + this.line1 = line1; + return this; + } + + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(EmptyParam line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } + + /** + * State, county, province, or region (ISO 3166-2). + */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** + * State, county, province, or region (ISO 3166-2). + */ + public Builder setState(EmptyParam state) { + this.state = state; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class DirectorshipDeclaration { @@ -9220,6 +9464,210 @@ public Builder setUserAgent(EmptyParam userAgent) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PrincipalPlaceOfBusiness { + /** City, district, suburb, town, or village. */ + @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; + + /** Address line 1, such as the street, PO Box, or company name. */ + @SerializedName("line1") + Object line1; + + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + Object line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + Object postalCode; + + /** + * State, county, province, or region (ISO + * 3166-2). + */ + @SerializedName("state") + Object state; + + private PrincipalPlaceOfBusiness( + Object city, + Object country, + Map extraParams, + Object line1, + Object line2, + Object postalCode, + Object state) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + } + + 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; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Company.PrincipalPlaceOfBusiness build() { + return new AccountUpdateParams.Company.PrincipalPlaceOfBusiness( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state); + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** City, district, suburb, town, or village. */ + 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 AccountUpdateParams.Company.PrincipalPlaceOfBusiness#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.Company.PrincipalPlaceOfBusiness#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** 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, such as the street, PO Box, or company name. */ + public Builder setLine1(EmptyParam line1) { + this.line1 = line1; + return this; + } + + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(EmptyParam line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } + + /** + * State, county, province, or region (ISO 3166-2). + */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** + * State, county, province, or region (ISO 3166-2). + */ + public Builder setState(EmptyParam state) { + this.state = state; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class RegistrationDate { @@ -13247,6 +13695,10 @@ public static class Settings { @SerializedName("payouts") Payouts payouts; + /** Settings specific to SEPA Direct Debit payments. */ + @SerializedName("sepa_debit_payments") + SepaDebitPayments sepaDebitPayments; + /** Settings specific to the account's Treasury FinancialAccounts. */ @SerializedName("treasury") Treasury treasury; @@ -13260,6 +13712,7 @@ private Settings( Invoices invoices, Payments payments, Payouts payouts, + SepaDebitPayments sepaDebitPayments, Treasury treasury) { this.bacsDebitPayments = bacsDebitPayments; this.branding = branding; @@ -13269,6 +13722,7 @@ private Settings( this.invoices = invoices; this.payments = payments; this.payouts = payouts; + this.sepaDebitPayments = sepaDebitPayments; this.treasury = treasury; } @@ -13293,6 +13747,8 @@ public static class Builder { private Payouts payouts; + private SepaDebitPayments sepaDebitPayments; + private Treasury treasury; /** Finalize and obtain parameter instance from this builder. */ @@ -13306,6 +13762,7 @@ public AccountUpdateParams.Settings build() { this.invoices, this.payments, this.payouts, + this.sepaDebitPayments, this.treasury); } @@ -13381,6 +13838,13 @@ public Builder setPayouts(AccountUpdateParams.Settings.Payouts payouts) { return this; } + /** Settings specific to SEPA Direct Debit payments. */ + public Builder setSepaDebitPayments( + AccountUpdateParams.Settings.SepaDebitPayments sepaDebitPayments) { + this.sepaDebitPayments = sepaDebitPayments; + return this; + } + /** Settings specific to the account's Treasury FinancialAccounts. */ public Builder setTreasury(AccountUpdateParams.Settings.Treasury treasury) { this.treasury = treasury; @@ -14987,6 +15451,84 @@ public enum WeeklyPayoutDay implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class SepaDebitPayments { + /** The business creditor id for european payments. */ + @SerializedName("creditor_id") + Object creditorId; + + /** + * 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 SepaDebitPayments(Object creditorId, Map extraParams) { + this.creditorId = creditorId; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object creditorId; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Settings.SepaDebitPayments build() { + return new AccountUpdateParams.Settings.SepaDebitPayments( + this.creditorId, this.extraParams); + } + + /** The business creditor id for european payments. */ + public Builder setCreditorId(String creditorId) { + this.creditorId = creditorId; + return this; + } + + /** The business creditor id for european payments. */ + public Builder setCreditorId(EmptyParam creditorId) { + this.creditorId = creditorId; + 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 AccountUpdateParams.Settings.SepaDebitPayments#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.Settings.SepaDebitPayments#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 Treasury { diff --git a/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java b/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java index e3966c7dc561..c72cc1964788 100644 --- a/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java +++ b/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java @@ -3227,12 +3227,18 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("bank_rakyat") BANK_RAKYAT("bank_rakyat"), + @SerializedName("bnp_paribas") + BNP_PARIBAS("bnp_paribas"), + @SerializedName("bsn") BSN("bsn"), @SerializedName("cimb") CIMB("cimb"), + @SerializedName("citibank") + CITIBANK("citibank"), + @SerializedName("deutsche_bank") DEUTSCHE_BANK("deutsche_bank"), @@ -3251,6 +3257,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("maybank2u") MAYBANK2U("maybank2u"), + @SerializedName("mbsb_bank") + MBSB_BANK("mbsb_bank"), + @SerializedName("ocbc") OCBC("ocbc"), diff --git a/src/main/java/com/stripe/param/CustomerCreateParams.java b/src/main/java/com/stripe/param/CustomerCreateParams.java index 0a8e143438ff..daed8d21f123 100644 --- a/src/main/java/com/stripe/param/CustomerCreateParams.java +++ b/src/main/java/com/stripe/param/CustomerCreateParams.java @@ -1733,18 +1733,18 @@ public static class TaxIdData { * {@code cr_tin}, {@code cv_nif}, {@code de_stn}, {@code do_rcn}, {@code ec_ruc}, {@code * eg_tin}, {@code es_cif}, {@code et_tin}, {@code eu_oss_vat}, {@code eu_vat}, {@code fo_vat}, * {@code gb_vat}, {@code ge_vat}, {@code gi_tin}, {@code gn_nif}, {@code hk_br}, {@code - * hr_oib}, {@code hu_tin}, {@code id_npwp}, {@code il_vat}, {@code in_gst}, {@code is_vat}, - * {@code it_cf}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, - * {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, {@code la_tin}, {@code li_uid}, {@code - * li_vat}, {@code lk_vat}, {@code ma_vat}, {@code md_vat}, {@code me_pib}, {@code mk_vat}, - * {@code mr_nif}, {@code mx_rfc}, {@code my_frp}, {@code my_itn}, {@code my_sst}, {@code - * ng_tin}, {@code no_vat}, {@code no_voec}, {@code np_pan}, {@code nz_gst}, {@code om_vat}, - * {@code pe_ruc}, {@code ph_tin}, {@code pl_nip}, {@code py_ruc}, {@code ro_tin}, {@code - * rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code sg_uen}, - * {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code th_vat}, {@code - * tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, {@code ug_tin}, - * {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code ve_rif}, {@code - * vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} + * hr_oib}, {@code hu_tin}, {@code ic_nif}, {@code id_npwp}, {@code il_vat}, {@code in_gst}, + * {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code ke_pin}, + * {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, {@code la_tin}, {@code + * li_uid}, {@code li_vat}, {@code lk_vat}, {@code ma_vat}, {@code md_vat}, {@code me_pib}, + * {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, {@code my_frp}, {@code my_itn}, {@code + * my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, {@code np_pan}, {@code nz_gst}, + * {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code pl_nip}, {@code py_ruc}, {@code + * ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, + * {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code + * th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, + * {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code + * ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} */ @SerializedName("type") Type type; @@ -1812,18 +1812,19 @@ public Builder putAllExtraParam(Map map) { * cn_tin}, {@code co_nit}, {@code cr_tin}, {@code cv_nif}, {@code de_stn}, {@code do_rcn}, * {@code ec_ruc}, {@code eg_tin}, {@code es_cif}, {@code et_tin}, {@code eu_oss_vat}, {@code * eu_vat}, {@code fo_vat}, {@code gb_vat}, {@code ge_vat}, {@code gi_tin}, {@code gn_nif}, - * {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code id_npwp}, {@code il_vat}, {@code - * in_gst}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, - * {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, {@code - * la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_vat}, {@code ma_vat}, {@code md_vat}, - * {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, {@code my_frp}, {@code - * my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, {@code np_pan}, - * {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code pl_nip}, {@code - * py_ruc}, {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, - * {@code sg_gst}, {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code - * sv_nit}, {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, - * {@code ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code - * uz_vat}, {@code ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} + * {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code ic_nif}, {@code id_npwp}, {@code + * il_vat}, {@code in_gst}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, + * {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code + * kz_bin}, {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_vat}, {@code ma_vat}, + * {@code md_vat}, {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, {@code + * my_frp}, {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, + * {@code np_pan}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code + * pl_nip}, {@code py_ruc}, {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, + * {@code sa_vat}, {@code sg_gst}, {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code + * sr_fin}, {@code sv_nit}, {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, + * {@code tz_vat}, {@code ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code + * uz_tin}, {@code uz_vat}, {@code ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or + * {@code zw_tin} */ public Builder setType(CustomerCreateParams.TaxIdData.Type type) { this.type = type; @@ -1997,6 +1998,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("hu_tin") HU_TIN("hu_tin"), + @SerializedName("ic_nif") + IC_NIF("ic_nif"), + @SerializedName("id_npwp") ID_NPWP("id_npwp"), diff --git a/src/main/java/com/stripe/param/CustomerTaxIdCreateParams.java b/src/main/java/com/stripe/param/CustomerTaxIdCreateParams.java index c17435beb692..a366ab20ee43 100644 --- a/src/main/java/com/stripe/param/CustomerTaxIdCreateParams.java +++ b/src/main/java/com/stripe/param/CustomerTaxIdCreateParams.java @@ -36,18 +36,18 @@ public class CustomerTaxIdCreateParams extends ApiRequestParams { * ch_vat}, {@code cl_tin}, {@code cm_niu}, {@code cn_tin}, {@code co_nit}, {@code cr_tin}, {@code * cv_nif}, {@code de_stn}, {@code do_rcn}, {@code ec_ruc}, {@code eg_tin}, {@code es_cif}, {@code * et_tin}, {@code eu_oss_vat}, {@code eu_vat}, {@code fo_vat}, {@code gb_vat}, {@code ge_vat}, - * {@code gi_tin}, {@code gn_nif}, {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code id_npwp}, - * {@code il_vat}, {@code in_gst}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, - * {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, - * {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_vat}, {@code ma_vat}, {@code md_vat}, - * {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, {@code my_frp}, {@code my_itn}, - * {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, {@code np_pan}, {@code - * nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code pl_nip}, {@code py_ruc}, {@code - * ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code - * sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code th_vat}, - * {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, {@code ug_tin}, - * {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code ve_rif}, {@code vn_tin}, - * {@code za_vat}, {@code zm_tin}, or {@code zw_tin} + * {@code gi_tin}, {@code gn_nif}, {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code ic_nif}, + * {@code id_npwp}, {@code il_vat}, {@code in_gst}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, + * {@code jp_rn}, {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, + * {@code kz_bin}, {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_vat}, {@code ma_vat}, + * {@code md_vat}, {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, {@code my_frp}, + * {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, {@code + * np_pan}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code pl_nip}, {@code + * py_ruc}, {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code + * sg_gst}, {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, + * {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, + * {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code ve_rif}, + * {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} */ @SerializedName("type") Type type; @@ -145,18 +145,18 @@ public Builder putAllExtraParam(Map map) { * {@code cr_tin}, {@code cv_nif}, {@code de_stn}, {@code do_rcn}, {@code ec_ruc}, {@code * eg_tin}, {@code es_cif}, {@code et_tin}, {@code eu_oss_vat}, {@code eu_vat}, {@code fo_vat}, * {@code gb_vat}, {@code ge_vat}, {@code gi_tin}, {@code gn_nif}, {@code hk_br}, {@code - * hr_oib}, {@code hu_tin}, {@code id_npwp}, {@code il_vat}, {@code in_gst}, {@code is_vat}, - * {@code it_cf}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, - * {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, {@code la_tin}, {@code li_uid}, {@code - * li_vat}, {@code lk_vat}, {@code ma_vat}, {@code md_vat}, {@code me_pib}, {@code mk_vat}, - * {@code mr_nif}, {@code mx_rfc}, {@code my_frp}, {@code my_itn}, {@code my_sst}, {@code - * ng_tin}, {@code no_vat}, {@code no_voec}, {@code np_pan}, {@code nz_gst}, {@code om_vat}, - * {@code pe_ruc}, {@code ph_tin}, {@code pl_nip}, {@code py_ruc}, {@code ro_tin}, {@code - * rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code sg_uen}, - * {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code th_vat}, {@code - * tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, {@code ug_tin}, - * {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code ve_rif}, {@code - * vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} + * hr_oib}, {@code hu_tin}, {@code ic_nif}, {@code id_npwp}, {@code il_vat}, {@code in_gst}, + * {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code ke_pin}, + * {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, {@code la_tin}, {@code + * li_uid}, {@code li_vat}, {@code lk_vat}, {@code ma_vat}, {@code md_vat}, {@code me_pib}, + * {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, {@code my_frp}, {@code my_itn}, {@code + * my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, {@code np_pan}, {@code nz_gst}, + * {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code pl_nip}, {@code py_ruc}, {@code + * ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, + * {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code + * th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, + * {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code + * ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} */ public Builder setType(CustomerTaxIdCreateParams.Type type) { this.type = type; @@ -330,6 +330,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("hu_tin") HU_TIN("hu_tin"), + @SerializedName("ic_nif") + IC_NIF("ic_nif"), + @SerializedName("id_npwp") ID_NPWP("id_npwp"), diff --git a/src/main/java/com/stripe/param/InvoiceAddLinesParams.java b/src/main/java/com/stripe/param/InvoiceAddLinesParams.java index da991d2ee3dd..d2b0223f3ecc 100644 --- a/src/main/java/com/stripe/param/InvoiceAddLinesParams.java +++ b/src/main/java/com/stripe/param/InvoiceAddLinesParams.java @@ -1844,6 +1844,12 @@ public enum TaxType implements ApiRequestParams.EnumParam { @SerializedName("lease_tax") LEASE_TAX("lease_tax"), + @SerializedName("mass_transit_parking_tax") + MASS_TRANSIT_PARKING_TAX("mass_transit_parking_tax"), + + @SerializedName("parking_tax") + PARKING_TAX("parking_tax"), + @SerializedName("pst") PST("pst"), diff --git a/src/main/java/com/stripe/param/InvoiceCreateParams.java b/src/main/java/com/stripe/param/InvoiceCreateParams.java index e334ea845647..90f50b11a7f0 100644 --- a/src/main/java/com/stripe/param/InvoiceCreateParams.java +++ b/src/main/java/com/stripe/param/InvoiceCreateParams.java @@ -4267,6 +4267,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("affirm") AFFIRM("affirm"), + @SerializedName("alipay") + ALIPAY("alipay"), + @SerializedName("amazon_pay") AMAZON_PAY("amazon_pay"), @@ -4330,6 +4333,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("link") LINK("link"), + @SerializedName("mb_way") + MB_WAY("mb_way"), + @SerializedName("multibanco") MULTIBANCO("multibanco"), diff --git a/src/main/java/com/stripe/param/InvoiceCreatePreviewParams.java b/src/main/java/com/stripe/param/InvoiceCreatePreviewParams.java index ac9f9057baa7..9af8c89e332b 100644 --- a/src/main/java/com/stripe/param/InvoiceCreatePreviewParams.java +++ b/src/main/java/com/stripe/param/InvoiceCreatePreviewParams.java @@ -1403,18 +1403,19 @@ public static class TaxId { * cn_tin}, {@code co_nit}, {@code cr_tin}, {@code cv_nif}, {@code de_stn}, {@code do_rcn}, * {@code ec_ruc}, {@code eg_tin}, {@code es_cif}, {@code et_tin}, {@code eu_oss_vat}, {@code * eu_vat}, {@code fo_vat}, {@code gb_vat}, {@code ge_vat}, {@code gi_tin}, {@code gn_nif}, - * {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code id_npwp}, {@code il_vat}, {@code - * in_gst}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, - * {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, {@code - * la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_vat}, {@code ma_vat}, {@code md_vat}, - * {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, {@code my_frp}, {@code - * my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, {@code np_pan}, - * {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code pl_nip}, {@code - * py_ruc}, {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, - * {@code sg_gst}, {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code - * sv_nit}, {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, - * {@code ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code - * uz_vat}, {@code ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} + * {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code ic_nif}, {@code id_npwp}, {@code + * il_vat}, {@code in_gst}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, + * {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code + * kz_bin}, {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_vat}, {@code ma_vat}, + * {@code md_vat}, {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, {@code + * my_frp}, {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, + * {@code np_pan}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code + * pl_nip}, {@code py_ruc}, {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, + * {@code sa_vat}, {@code sg_gst}, {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code + * sr_fin}, {@code sv_nit}, {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, + * {@code tz_vat}, {@code ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code + * uz_tin}, {@code uz_vat}, {@code ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or + * {@code zw_tin} */ @SerializedName("type") Type type; @@ -1485,19 +1486,19 @@ public Builder putAllExtraParam(Map map) { * cn_tin}, {@code co_nit}, {@code cr_tin}, {@code cv_nif}, {@code de_stn}, {@code do_rcn}, * {@code ec_ruc}, {@code eg_tin}, {@code es_cif}, {@code et_tin}, {@code eu_oss_vat}, * {@code eu_vat}, {@code fo_vat}, {@code gb_vat}, {@code ge_vat}, {@code gi_tin}, {@code - * gn_nif}, {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code id_npwp}, {@code il_vat}, - * {@code in_gst}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, {@code - * jp_trn}, {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, - * {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_vat}, {@code ma_vat}, {@code - * md_vat}, {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, {@code my_frp}, - * {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, {@code - * np_pan}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code pl_nip}, - * {@code py_ruc}, {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code - * sa_vat}, {@code sg_gst}, {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code - * sr_fin}, {@code sv_nit}, {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, - * {@code tz_vat}, {@code ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code - * uz_tin}, {@code uz_vat}, {@code ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, - * or {@code zw_tin} + * gn_nif}, {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code ic_nif}, {@code id_npwp}, + * {@code il_vat}, {@code in_gst}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code + * jp_rn}, {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, + * {@code kz_bin}, {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_vat}, {@code + * ma_vat}, {@code md_vat}, {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, + * {@code my_frp}, {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code + * no_voec}, {@code np_pan}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, + * {@code pl_nip}, {@code py_ruc}, {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code + * ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code sg_uen}, {@code si_tin}, {@code + * sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code th_vat}, {@code tj_tin}, {@code + * tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, {@code ug_tin}, {@code us_ein}, + * {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code ve_rif}, {@code vn_tin}, {@code + * za_vat}, {@code zm_tin}, or {@code zw_tin} */ public Builder setType(InvoiceCreatePreviewParams.CustomerDetails.TaxId.Type type) { this.type = type; @@ -1671,6 +1672,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("hu_tin") HU_TIN("hu_tin"), + @SerializedName("ic_nif") + IC_NIF("ic_nif"), + @SerializedName("id_npwp") ID_NPWP("id_npwp"), @@ -3550,7 +3554,9 @@ public static class Phase { /** * The date at which this phase of the subscription schedule starts or {@code now}. Must be - * set on the first phase. + * set on the first phase. Prefer to specify {@code now} over an explicit timestamp when + * appropriate to avoid unexpected behavior due to request delays or clock skew resulting in + * the phase being slightly backdated or postdated. */ @SerializedName("start_date") Object startDate; @@ -3570,8 +3576,9 @@ public static class Phase { Boolean trial; /** - * Sets the phase to trialing from the start date to this date. Must be before the phase end - * date, can not be combined with {@code trial} + * Sets the phase to trialing from the start date to this date. Must be within the phase. When + * previewing an update, if combined with {@code trial=true}, it must match the phase end + * date. */ @SerializedName("trial_end") Object trialEnd; @@ -4094,7 +4101,9 @@ public Builder setProrationBehavior( /** * The date at which this phase of the subscription schedule starts or {@code now}. Must be - * set on the first phase. + * set on the first phase. Prefer to specify {@code now} over an explicit timestamp when + * appropriate to avoid unexpected behavior due to request delays or clock skew resulting in + * the phase being slightly backdated or postdated. */ public Builder setStartDate(Long startDate) { this.startDate = startDate; @@ -4103,7 +4112,9 @@ public Builder setStartDate(Long startDate) { /** * The date at which this phase of the subscription schedule starts or {@code now}. Must be - * set on the first phase. + * set on the first phase. Prefer to specify {@code now} over an explicit timestamp when + * appropriate to avoid unexpected behavior due to request delays or clock skew resulting in + * the phase being slightly backdated or postdated. */ public Builder setStartDate( InvoiceCreatePreviewParams.ScheduleDetails.Phase.StartDate startDate) { @@ -4131,8 +4142,9 @@ public Builder setTrial(Boolean trial) { } /** - * Sets the phase to trialing from the start date to this date. Must be before the phase end - * date, can not be combined with {@code trial} + * Sets the phase to trialing from the start date to this date. Must be within the phase. + * When previewing an update, if combined with {@code trial=true}, it must match the phase + * end date. */ public Builder setTrialEnd(Long trialEnd) { this.trialEnd = trialEnd; @@ -4140,8 +4152,9 @@ public Builder setTrialEnd(Long trialEnd) { } /** - * Sets the phase to trialing from the start date to this date. Must be before the phase end - * date, can not be combined with {@code trial} + * Sets the phase to trialing from the start date to this date. Must be within the phase. + * When previewing an update, if combined with {@code trial=true}, it must match the phase + * end date. */ public Builder setTrialEnd( InvoiceCreatePreviewParams.ScheduleDetails.Phase.TrialEnd trialEnd) { @@ -7063,6 +7076,15 @@ public static class SubscriptionDetails { @SerializedName("items") List items; + /** + * Set of key-value pairs that you can attach + * to an object. This can be useful for storing additional information about the object in a + * structured format. Individual keys can be unset by posting an empty value to them. All keys + * can be unset by posting an empty value to {@code metadata}. + */ + @SerializedName("metadata") + Object metadata; + /** * Determines how to handle prorations when the @@ -7114,6 +7136,7 @@ private SubscriptionDetails( Object defaultTaxRates, Map extraParams, List items, + Object metadata, ProrationBehavior prorationBehavior, Long prorationDate, ResumeAt resumeAt, @@ -7128,6 +7151,7 @@ private SubscriptionDetails( this.defaultTaxRates = defaultTaxRates; this.extraParams = extraParams; this.items = items; + this.metadata = metadata; this.prorationBehavior = prorationBehavior; this.prorationDate = prorationDate; this.resumeAt = resumeAt; @@ -7158,6 +7182,8 @@ public static class Builder { private List items; + private Object metadata; + private ProrationBehavior prorationBehavior; private Long prorationDate; @@ -7180,6 +7206,7 @@ public InvoiceCreatePreviewParams.SubscriptionDetails build() { this.defaultTaxRates, this.extraParams, this.items, + this.metadata, this.prorationBehavior, this.prorationDate, this.resumeAt, @@ -7422,6 +7449,57 @@ public Builder addAllItem( 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 + * InvoiceCreatePreviewParams.SubscriptionDetails#metadata} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder putMetadata(String key, String value) { + if (this.metadata == null || this.metadata instanceof EmptyParam) { + this.metadata = new HashMap(); + } + ((Map) this.metadata).put(key, value); + return this; + } + + /** + * Add all map key/value pairs 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 InvoiceCreatePreviewParams.SubscriptionDetails#metadata} for the field + * documentation. + */ + @SuppressWarnings("unchecked") + public Builder putAllMetadata(Map map) { + if (this.metadata == null || this.metadata instanceof EmptyParam) { + this.metadata = new HashMap(); + } + ((Map) this.metadata).putAll(map); + return this; + } + + /** + * Set of key-value pairs that you can + * attach to an object. This can be useful for storing additional information about the object + * in a structured format. Individual keys can be unset by posting an empty value to them. All + * keys can be unset by posting an empty value to {@code metadata}. + */ + public Builder setMetadata(EmptyParam metadata) { + this.metadata = metadata; + return this; + } + + /** + * Set of key-value pairs that you can + * attach to an object. This can be useful for storing additional information about the object + * in a structured format. Individual keys can be unset by posting an empty value to them. All + * keys can be unset by posting an empty value to {@code metadata}. + */ + public Builder setMetadata(Map metadata) { + this.metadata = metadata; + return this; + } + /** * Determines how to handle prorations when the diff --git a/src/main/java/com/stripe/param/InvoiceLineItemUpdateParams.java b/src/main/java/com/stripe/param/InvoiceLineItemUpdateParams.java index 52ce22d5fe10..1756808bcf7e 100644 --- a/src/main/java/com/stripe/param/InvoiceLineItemUpdateParams.java +++ b/src/main/java/com/stripe/param/InvoiceLineItemUpdateParams.java @@ -1805,6 +1805,12 @@ public enum TaxType implements ApiRequestParams.EnumParam { @SerializedName("lease_tax") LEASE_TAX("lease_tax"), + @SerializedName("mass_transit_parking_tax") + MASS_TRANSIT_PARKING_TAX("mass_transit_parking_tax"), + + @SerializedName("parking_tax") + PARKING_TAX("parking_tax"), + @SerializedName("pst") PST("pst"), diff --git a/src/main/java/com/stripe/param/InvoiceUpdateLinesParams.java b/src/main/java/com/stripe/param/InvoiceUpdateLinesParams.java index a75f18ca4f70..30e431d20616 100644 --- a/src/main/java/com/stripe/param/InvoiceUpdateLinesParams.java +++ b/src/main/java/com/stripe/param/InvoiceUpdateLinesParams.java @@ -1870,6 +1870,12 @@ public enum TaxType implements ApiRequestParams.EnumParam { @SerializedName("lease_tax") LEASE_TAX("lease_tax"), + @SerializedName("mass_transit_parking_tax") + MASS_TRANSIT_PARKING_TAX("mass_transit_parking_tax"), + + @SerializedName("parking_tax") + PARKING_TAX("parking_tax"), + @SerializedName("pst") PST("pst"), diff --git a/src/main/java/com/stripe/param/InvoiceUpdateParams.java b/src/main/java/com/stripe/param/InvoiceUpdateParams.java index 7b3a755d3068..1bda54effc67 100644 --- a/src/main/java/com/stripe/param/InvoiceUpdateParams.java +++ b/src/main/java/com/stripe/param/InvoiceUpdateParams.java @@ -4270,6 +4270,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("affirm") AFFIRM("affirm"), + @SerializedName("alipay") + ALIPAY("alipay"), + @SerializedName("amazon_pay") AMAZON_PAY("amazon_pay"), @@ -4333,6 +4336,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("link") LINK("link"), + @SerializedName("mb_way") + MB_WAY("mb_way"), + @SerializedName("multibanco") MULTIBANCO("multibanco"), diff --git a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java index 3deba0187e52..2be7499d918c 100644 --- a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java @@ -14,6 +14,15 @@ @Getter @EqualsAndHashCode(callSuper = false) public class PaymentIntentConfirmParams extends ApiRequestParams { + /** + * The list of payment method types allowed for use with this payment. Stripe automatically + * returns compatible payment methods from this list in the {@code payment_method_types} field of + * the response, based on the other PaymentIntent parameters, such as {@code currency}, {@code + * amount}, and {@code customer}. + */ + @SerializedName("allowed_payment_method_types") + List allowedPaymentMethodTypes; + /** Provides industry-specific information about the amount. */ @SerializedName("amount_details") Object amountDetails; @@ -111,10 +120,10 @@ public class PaymentIntentConfirmParams extends ApiRequestParams { PaymentMethodOptions paymentMethodOptions; /** - * The list of payment method types (for example, a card) that this PaymentIntent can use. Use - * {@code automatic_payment_methods} to manage payment methods from the Stripe Dashboard. A list of - * valid payment method types can be found payment method settings. A + * list of valid payment method types can be found here. */ @SerializedName("payment_method_types") @@ -181,6 +190,7 @@ public class PaymentIntentConfirmParams extends ApiRequestParams { Boolean useStripeSdk; private PaymentIntentConfirmParams( + List allowedPaymentMethodTypes, Object amountDetails, Long amountToConfirm, CaptureMethod captureMethod, @@ -204,6 +214,7 @@ private PaymentIntentConfirmParams( ApiRequestParams.EnumParam setupFutureUsage, Object shipping, Boolean useStripeSdk) { + this.allowedPaymentMethodTypes = allowedPaymentMethodTypes; this.amountDetails = amountDetails; this.amountToConfirm = amountToConfirm; this.captureMethod = captureMethod; @@ -234,6 +245,8 @@ public static Builder builder() { } public static class Builder { + private List allowedPaymentMethodTypes; + private Object amountDetails; private Long amountToConfirm; @@ -283,6 +296,7 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentConfirmParams build() { return new PaymentIntentConfirmParams( + this.allowedPaymentMethodTypes, this.amountDetails, this.amountToConfirm, this.captureMethod, @@ -308,6 +322,34 @@ public PaymentIntentConfirmParams build() { this.useStripeSdk); } + /** + * Add an element to `allowedPaymentMethodTypes` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link PaymentIntentConfirmParams#allowedPaymentMethodTypes} for the field documentation. + */ + public Builder addAllowedPaymentMethodType( + PaymentIntentConfirmParams.AllowedPaymentMethodType element) { + if (this.allowedPaymentMethodTypes == null) { + this.allowedPaymentMethodTypes = new ArrayList<>(); + } + this.allowedPaymentMethodTypes.add(element); + return this; + } + + /** + * Add all elements to `allowedPaymentMethodTypes` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link PaymentIntentConfirmParams#allowedPaymentMethodTypes} for the field documentation. + */ + public Builder addAllAllowedPaymentMethodType( + List elements) { + if (this.allowedPaymentMethodTypes == null) { + this.allowedPaymentMethodTypes = new ArrayList<>(); + } + this.allowedPaymentMethodTypes.addAll(elements); + return this; + } + /** Provides industry-specific information about the amount. */ public Builder setAmountDetails(PaymentIntentConfirmParams.AmountDetails amountDetails) { this.amountDetails = amountDetails; @@ -5792,12 +5834,18 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("bank_rakyat") BANK_RAKYAT("bank_rakyat"), + @SerializedName("bnp_paribas") + BNP_PARIBAS("bnp_paribas"), + @SerializedName("bsn") BSN("bsn"), @SerializedName("cimb") CIMB("cimb"), + @SerializedName("citibank") + CITIBANK("citibank"), + @SerializedName("deutsche_bank") DEUTSCHE_BANK("deutsche_bank"), @@ -5816,6 +5864,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("maybank2u") MAYBANK2U("maybank2u"), + @SerializedName("mbsb_bank") + MBSB_BANK("mbsb_bank"), + @SerializedName("ocbc") OCBC("ocbc"), @@ -20193,9 +20244,35 @@ public static class Payco { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Payco(ApiRequestParams.EnumParam captureMethod, 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 Payco( + ApiRequestParams.EnumParam captureMethod, + Map extraParams, + SetupFutureUsage setupFutureUsage) { this.captureMethod = captureMethod; this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; } public static Builder builder() { @@ -20207,10 +20284,12 @@ public static class Builder { private Map extraParams; + private SetupFutureUsage setupFutureUsage; + /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentConfirmParams.PaymentMethodOptions.Payco build() { return new PaymentIntentConfirmParams.PaymentMethodOptions.Payco( - this.captureMethod, this.extraParams); + this.captureMethod, this.extraParams, this.setupFutureUsage); } /** @@ -20271,6 +20350,33 @@ public Builder putAllExtraParam(Map map) { 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. + */ + public Builder setSetupFutureUsage( + PaymentIntentConfirmParams.PaymentMethodOptions.Payco.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } } public enum CaptureMethod implements ApiRequestParams.EnumParam { @@ -20284,6 +20390,18 @@ public enum CaptureMethod implements ApiRequestParams.EnumParam { 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 @@ -22144,10 +22262,35 @@ public static class SamsungPay { @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 SamsungPay( - ApiRequestParams.EnumParam captureMethod, Map extraParams) { + ApiRequestParams.EnumParam captureMethod, + Map extraParams, + SetupFutureUsage setupFutureUsage) { this.captureMethod = captureMethod; this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; } public static Builder builder() { @@ -22159,10 +22302,12 @@ public static class Builder { private Map extraParams; + private SetupFutureUsage setupFutureUsage; + /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentConfirmParams.PaymentMethodOptions.SamsungPay build() { return new PaymentIntentConfirmParams.PaymentMethodOptions.SamsungPay( - this.captureMethod, this.extraParams); + this.captureMethod, this.extraParams, this.setupFutureUsage); } /** @@ -22224,6 +22369,33 @@ public Builder putAllExtraParam(Map map) { 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. + */ + public Builder setSetupFutureUsage( + PaymentIntentConfirmParams.PaymentMethodOptions.SamsungPay.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } } public enum CaptureMethod implements ApiRequestParams.EnumParam { @@ -22237,6 +22409,18 @@ public enum CaptureMethod implements ApiRequestParams.EnumParam { 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 @@ -25085,6 +25269,13 @@ public static class RadarOptions { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** + * The referrer URL of the current checkout session. You can use this to supply session-level + * referrer data when a Radar Session isn't available or doesn't contain a referrer. + */ + @SerializedName("referrer") + Object referrer; + /** * A Radar Session is a snapshot of * the browser metadata and device details that help Radar make more accurate predictions on @@ -25093,8 +25284,9 @@ public static class RadarOptions { @SerializedName("session") String session; - private RadarOptions(Map extraParams, String session) { + private RadarOptions(Map extraParams, Object referrer, String session) { this.extraParams = extraParams; + this.referrer = referrer; this.session = session; } @@ -25105,11 +25297,14 @@ public static Builder builder() { public static class Builder { private Map extraParams; + private Object referrer; + private String session; /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentConfirmParams.RadarOptions build() { - return new PaymentIntentConfirmParams.RadarOptions(this.extraParams, this.session); + return new PaymentIntentConfirmParams.RadarOptions( + this.extraParams, this.referrer, this.session); } /** @@ -25139,6 +25334,24 @@ public Builder putAllExtraParam(Map map) { return this; } + /** + * The referrer URL of the current checkout session. You can use this to supply session-level + * referrer data when a Radar Session isn't available or doesn't contain a referrer. + */ + public Builder setReferrer(String referrer) { + this.referrer = referrer; + return this; + } + + /** + * The referrer URL of the current checkout session. You can use this to supply session-level + * referrer data when a Radar Session isn't available or doesn't contain a referrer. + */ + public Builder setReferrer(EmptyParam referrer) { + this.referrer = referrer; + return this; + } + /** * A Radar Session is a snapshot of * the browser metadata and device details that help Radar make more accurate predictions on @@ -25452,6 +25665,303 @@ public Builder setState(String state) { } } + public enum AllowedPaymentMethodType 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("bizum") + BIZUM("bizum"), + + @SerializedName("blik") + BLIK("blik"), + + @SerializedName("boku_promptpay") + BOKU_PROMPTPAY("boku_promptpay"), + + @SerializedName("boleto") + BOLETO("boleto"), + + @SerializedName("capchase_pay") + CAPCHASE_PAY("capchase_pay"), + + @SerializedName("card") + CARD("card"), + + @SerializedName("cashapp") + CASHAPP("cashapp"), + + @SerializedName("check_scan") + CHECK_SCAN("check_scan"), + + @SerializedName("click_to_pay") + CLICK_TO_PAY("click_to_pay"), + + @SerializedName("crypto") + CRYPTO("crypto"), + + @SerializedName("customer_balance") + CUSTOMER_BALANCE("customer_balance"), + + @SerializedName("demo_pay") + DEMO_PAY("demo_pay"), + + @SerializedName("duitnow") + DUITNOW("duitnow"), + + @SerializedName("dummy_auth_push") + DUMMY_AUTH_PUSH("dummy_auth_push"), + + @SerializedName("dummy_passthrough_card") + DUMMY_PASSTHROUGH_CARD("dummy_passthrough_card"), + + @SerializedName("edenred") + EDENRED("edenred"), + + @SerializedName("eps") + EPS("eps"), + + @SerializedName("fpx") + FPX("fpx"), + + @SerializedName("gcash") + GCASH("gcash"), + + @SerializedName("getbalance") + GETBALANCE("getbalance"), + + @SerializedName("gift_card") + GIFT_CARD("gift_card"), + + @SerializedName("giropay") + GIROPAY("giropay"), + + @SerializedName("gopay") + GOPAY("gopay"), + + @SerializedName("grabpay") + GRABPAY("grabpay"), + + @SerializedName("id_bank_transfer") + ID_BANK_TRANSFER("id_bank_transfer"), + + @SerializedName("ideal") + IDEAL("ideal"), + + @SerializedName("kakao_pay") + KAKAO_PAY("kakao_pay"), + + @SerializedName("klarna") + KLARNA("klarna"), + + @SerializedName("knet") + KNET("knet"), + + @SerializedName("konbini") + KONBINI("konbini"), + + @SerializedName("kr_card") + KR_CARD("kr_card"), + + @SerializedName("kr_market") + KR_MARKET("kr_market"), + + @SerializedName("kriya") + KRIYA("kriya"), + + @SerializedName("link") + LINK("link"), + + @SerializedName("mb_way") + MB_WAY("mb_way"), + + @SerializedName("mobilepay") + MOBILEPAY("mobilepay"), + + @SerializedName("momo") + MOMO("momo"), + + @SerializedName("mondu") + MONDU("mondu"), + + @SerializedName("multibanco") + MULTIBANCO("multibanco"), + + @SerializedName("naver_pay") + NAVER_PAY("naver_pay"), + + @SerializedName("netbanking") + NETBANKING("netbanking"), + + @SerializedName("ng_bank") + NG_BANK("ng_bank"), + + @SerializedName("ng_bank_transfer") + NG_BANK_TRANSFER("ng_bank_transfer"), + + @SerializedName("ng_card") + NG_CARD("ng_card"), + + @SerializedName("ng_market") + NG_MARKET("ng_market"), + + @SerializedName("ng_ussd") + NG_USSD("ng_ussd"), + + @SerializedName("ng_wallet") + NG_WALLET("ng_wallet"), + + @SerializedName("nz_bank_account") + NZ_BANK_ACCOUNT("nz_bank_account"), + + @SerializedName("octopus") + OCTOPUS("octopus"), + + @SerializedName("oxxo") + OXXO("oxxo"), + + @SerializedName("p24") + P24("p24"), + + @SerializedName("paper_check") + PAPER_CHECK("paper_check"), + + @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("payto") + PAYTO("payto"), + + @SerializedName("pix") + PIX("pix"), + + @SerializedName("promptpay") + PROMPTPAY("promptpay"), + + @SerializedName("qris") + QRIS("qris"), + + @SerializedName("rechnung") + RECHNUNG("rechnung"), + + @SerializedName("revolut_pay") + REVOLUT_PAY("revolut_pay"), + + @SerializedName("samsung_pay") + SAMSUNG_PAY("samsung_pay"), + + @SerializedName("satispay") + SATISPAY("satispay"), + + @SerializedName("scalapay") + SCALAPAY("scalapay"), + + @SerializedName("sepa_debit") + SEPA_DEBIT("sepa_debit"), + + @SerializedName("sequra") + SEQURA("sequra"), + + @SerializedName("shop_pay") + SHOP_PAY("shop_pay"), + + @SerializedName("shopeepay") + SHOPEEPAY("shopeepay"), + + @SerializedName("sofort") + SOFORT("sofort"), + + @SerializedName("south_korea_market") + SOUTH_KOREA_MARKET("south_korea_market"), + + @SerializedName("stripe_balance") + STRIPE_BALANCE("stripe_balance"), + + @SerializedName("sunbit") + SUNBIT("sunbit"), + + @SerializedName("swish") + SWISH("swish"), + + @SerializedName("tamara") + TAMARA("tamara"), + + @SerializedName("test_pay") + TEST_PAY("test_pay"), + + @SerializedName("truemoney") + TRUEMONEY("truemoney"), + + @SerializedName("twint") + TWINT("twint"), + + @SerializedName("upi") + UPI("upi"), + + @SerializedName("us_bank_account") + US_BANK_ACCOUNT("us_bank_account"), + + @SerializedName("us_cash_voucher") + US_CASH_VOUCHER("us_cash_voucher"), + + @SerializedName("vipps") + VIPPS("vipps"), + + @SerializedName("wechat_pay") + WECHAT_PAY("wechat_pay"), + + @SerializedName("wero") + WERO("wero"), + + @SerializedName("zip") + ZIP("zip"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AllowedPaymentMethodType(String value) { + this.value = value; + } + } + public enum CaptureMethod implements ApiRequestParams.EnumParam { @SerializedName("automatic") AUTOMATIC("automatic"), diff --git a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java index 51190cda6589..400145b7a0fc 100644 --- a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java @@ -14,6 +14,15 @@ @Getter @EqualsAndHashCode(callSuper = false) public class PaymentIntentCreateParams extends ApiRequestParams { + /** + * The list of payment method types allowed for use with this payment. Stripe automatically + * returns compatible payment methods from this list in the {@code payment_method_types} field of + * the response, based on the other PaymentIntent parameters, such as {@code currency}, {@code + * amount}, and {@code customer}. + */ + @SerializedName("allowed_payment_method_types") + List allowedPaymentMethodTypes; + /** * Required. Amount intended to be collected by this PaymentIntent. A positive * integer representing how much to charge in the allowedPaymentMethodTypes, Long amount, AmountDetails amountDetails, Long applicationFeeAmount, @@ -386,6 +396,7 @@ private PaymentIntentCreateParams( TransferData transferData, String transferGroup, Boolean useStripeSdk) { + this.allowedPaymentMethodTypes = allowedPaymentMethodTypes; this.amount = amount; this.amountDetails = amountDetails; this.applicationFeeAmount = applicationFeeAmount; @@ -431,6 +442,8 @@ public static Builder builder() { } public static class Builder { + private List allowedPaymentMethodTypes; + private Long amount; private AmountDetails amountDetails; @@ -510,6 +523,7 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentCreateParams build() { return new PaymentIntentCreateParams( + this.allowedPaymentMethodTypes, this.amount, this.amountDetails, this.applicationFeeAmount, @@ -550,6 +564,34 @@ public PaymentIntentCreateParams build() { this.useStripeSdk); } + /** + * Add an element to `allowedPaymentMethodTypes` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link PaymentIntentCreateParams#allowedPaymentMethodTypes} for the field documentation. + */ + public Builder addAllowedPaymentMethodType( + PaymentIntentCreateParams.AllowedPaymentMethodType element) { + if (this.allowedPaymentMethodTypes == null) { + this.allowedPaymentMethodTypes = new ArrayList<>(); + } + this.allowedPaymentMethodTypes.add(element); + return this; + } + + /** + * Add all elements to `allowedPaymentMethodTypes` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link PaymentIntentCreateParams#allowedPaymentMethodTypes} for the field documentation. + */ + public Builder addAllAllowedPaymentMethodType( + List elements) { + if (this.allowedPaymentMethodTypes == null) { + this.allowedPaymentMethodTypes = new ArrayList<>(); + } + this.allowedPaymentMethodTypes.addAll(elements); + return this; + } + /** * Required. Amount intended to be collected by this PaymentIntent. A positive * integer representing how much to charge in the extraParams; - private Payco(ApiRequestParams.EnumParam captureMethod, 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 Payco( + ApiRequestParams.EnumParam captureMethod, + Map extraParams, + SetupFutureUsage setupFutureUsage) { this.captureMethod = captureMethod; this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; } public static Builder builder() { @@ -20700,10 +20777,12 @@ public static class Builder { private Map extraParams; + private SetupFutureUsage setupFutureUsage; + /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentCreateParams.PaymentMethodOptions.Payco build() { return new PaymentIntentCreateParams.PaymentMethodOptions.Payco( - this.captureMethod, this.extraParams); + this.captureMethod, this.extraParams, this.setupFutureUsage); } /** @@ -20764,6 +20843,33 @@ public Builder putAllExtraParam(Map map) { 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. + */ + public Builder setSetupFutureUsage( + PaymentIntentCreateParams.PaymentMethodOptions.Payco.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } } public enum CaptureMethod implements ApiRequestParams.EnumParam { @@ -20777,6 +20883,18 @@ public enum CaptureMethod implements ApiRequestParams.EnumParam { 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 @@ -22634,10 +22752,35 @@ public static class SamsungPay { @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 SamsungPay( - ApiRequestParams.EnumParam captureMethod, Map extraParams) { + ApiRequestParams.EnumParam captureMethod, + Map extraParams, + SetupFutureUsage setupFutureUsage) { this.captureMethod = captureMethod; this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; } public static Builder builder() { @@ -22649,10 +22792,12 @@ public static class Builder { private Map extraParams; + private SetupFutureUsage setupFutureUsage; + /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentCreateParams.PaymentMethodOptions.SamsungPay build() { return new PaymentIntentCreateParams.PaymentMethodOptions.SamsungPay( - this.captureMethod, this.extraParams); + this.captureMethod, this.extraParams, this.setupFutureUsage); } /** @@ -22713,6 +22858,33 @@ public Builder putAllExtraParam(Map map) { 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. + */ + public Builder setSetupFutureUsage( + PaymentIntentCreateParams.PaymentMethodOptions.SamsungPay.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } } public enum CaptureMethod implements ApiRequestParams.EnumParam { @@ -22726,6 +22898,18 @@ public enum CaptureMethod implements ApiRequestParams.EnumParam { 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 @@ -25572,6 +25756,13 @@ public static class RadarOptions { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** + * The referrer URL of the current checkout session. You can use this to supply session-level + * referrer data when a Radar Session isn't available or doesn't contain a referrer. + */ + @SerializedName("referrer") + Object referrer; + /** * A Radar Session is a snapshot of * the browser metadata and device details that help Radar make more accurate predictions on @@ -25580,8 +25771,9 @@ public static class RadarOptions { @SerializedName("session") String session; - private RadarOptions(Map extraParams, String session) { + private RadarOptions(Map extraParams, Object referrer, String session) { this.extraParams = extraParams; + this.referrer = referrer; this.session = session; } @@ -25592,11 +25784,14 @@ public static Builder builder() { public static class Builder { private Map extraParams; + private Object referrer; + private String session; /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentCreateParams.RadarOptions build() { - return new PaymentIntentCreateParams.RadarOptions(this.extraParams, this.session); + return new PaymentIntentCreateParams.RadarOptions( + this.extraParams, this.referrer, this.session); } /** @@ -25625,6 +25820,24 @@ public Builder putAllExtraParam(Map map) { return this; } + /** + * The referrer URL of the current checkout session. You can use this to supply session-level + * referrer data when a Radar Session isn't available or doesn't contain a referrer. + */ + public Builder setReferrer(String referrer) { + this.referrer = referrer; + return this; + } + + /** + * The referrer URL of the current checkout session. You can use this to supply session-level + * referrer data when a Radar Session isn't available or doesn't contain a referrer. + */ + public Builder setReferrer(EmptyParam referrer) { + this.referrer = referrer; + return this; + } + /** * A Radar Session is a snapshot of * the browser metadata and device details that help Radar make more accurate predictions on @@ -26282,6 +26495,303 @@ public Builder setMetadata(Map metadata) { } } + public enum AllowedPaymentMethodType 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("bizum") + BIZUM("bizum"), + + @SerializedName("blik") + BLIK("blik"), + + @SerializedName("boku_promptpay") + BOKU_PROMPTPAY("boku_promptpay"), + + @SerializedName("boleto") + BOLETO("boleto"), + + @SerializedName("capchase_pay") + CAPCHASE_PAY("capchase_pay"), + + @SerializedName("card") + CARD("card"), + + @SerializedName("cashapp") + CASHAPP("cashapp"), + + @SerializedName("check_scan") + CHECK_SCAN("check_scan"), + + @SerializedName("click_to_pay") + CLICK_TO_PAY("click_to_pay"), + + @SerializedName("crypto") + CRYPTO("crypto"), + + @SerializedName("customer_balance") + CUSTOMER_BALANCE("customer_balance"), + + @SerializedName("demo_pay") + DEMO_PAY("demo_pay"), + + @SerializedName("duitnow") + DUITNOW("duitnow"), + + @SerializedName("dummy_auth_push") + DUMMY_AUTH_PUSH("dummy_auth_push"), + + @SerializedName("dummy_passthrough_card") + DUMMY_PASSTHROUGH_CARD("dummy_passthrough_card"), + + @SerializedName("edenred") + EDENRED("edenred"), + + @SerializedName("eps") + EPS("eps"), + + @SerializedName("fpx") + FPX("fpx"), + + @SerializedName("gcash") + GCASH("gcash"), + + @SerializedName("getbalance") + GETBALANCE("getbalance"), + + @SerializedName("gift_card") + GIFT_CARD("gift_card"), + + @SerializedName("giropay") + GIROPAY("giropay"), + + @SerializedName("gopay") + GOPAY("gopay"), + + @SerializedName("grabpay") + GRABPAY("grabpay"), + + @SerializedName("id_bank_transfer") + ID_BANK_TRANSFER("id_bank_transfer"), + + @SerializedName("ideal") + IDEAL("ideal"), + + @SerializedName("kakao_pay") + KAKAO_PAY("kakao_pay"), + + @SerializedName("klarna") + KLARNA("klarna"), + + @SerializedName("knet") + KNET("knet"), + + @SerializedName("konbini") + KONBINI("konbini"), + + @SerializedName("kr_card") + KR_CARD("kr_card"), + + @SerializedName("kr_market") + KR_MARKET("kr_market"), + + @SerializedName("kriya") + KRIYA("kriya"), + + @SerializedName("link") + LINK("link"), + + @SerializedName("mb_way") + MB_WAY("mb_way"), + + @SerializedName("mobilepay") + MOBILEPAY("mobilepay"), + + @SerializedName("momo") + MOMO("momo"), + + @SerializedName("mondu") + MONDU("mondu"), + + @SerializedName("multibanco") + MULTIBANCO("multibanco"), + + @SerializedName("naver_pay") + NAVER_PAY("naver_pay"), + + @SerializedName("netbanking") + NETBANKING("netbanking"), + + @SerializedName("ng_bank") + NG_BANK("ng_bank"), + + @SerializedName("ng_bank_transfer") + NG_BANK_TRANSFER("ng_bank_transfer"), + + @SerializedName("ng_card") + NG_CARD("ng_card"), + + @SerializedName("ng_market") + NG_MARKET("ng_market"), + + @SerializedName("ng_ussd") + NG_USSD("ng_ussd"), + + @SerializedName("ng_wallet") + NG_WALLET("ng_wallet"), + + @SerializedName("nz_bank_account") + NZ_BANK_ACCOUNT("nz_bank_account"), + + @SerializedName("octopus") + OCTOPUS("octopus"), + + @SerializedName("oxxo") + OXXO("oxxo"), + + @SerializedName("p24") + P24("p24"), + + @SerializedName("paper_check") + PAPER_CHECK("paper_check"), + + @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("payto") + PAYTO("payto"), + + @SerializedName("pix") + PIX("pix"), + + @SerializedName("promptpay") + PROMPTPAY("promptpay"), + + @SerializedName("qris") + QRIS("qris"), + + @SerializedName("rechnung") + RECHNUNG("rechnung"), + + @SerializedName("revolut_pay") + REVOLUT_PAY("revolut_pay"), + + @SerializedName("samsung_pay") + SAMSUNG_PAY("samsung_pay"), + + @SerializedName("satispay") + SATISPAY("satispay"), + + @SerializedName("scalapay") + SCALAPAY("scalapay"), + + @SerializedName("sepa_debit") + SEPA_DEBIT("sepa_debit"), + + @SerializedName("sequra") + SEQURA("sequra"), + + @SerializedName("shop_pay") + SHOP_PAY("shop_pay"), + + @SerializedName("shopeepay") + SHOPEEPAY("shopeepay"), + + @SerializedName("sofort") + SOFORT("sofort"), + + @SerializedName("south_korea_market") + SOUTH_KOREA_MARKET("south_korea_market"), + + @SerializedName("stripe_balance") + STRIPE_BALANCE("stripe_balance"), + + @SerializedName("sunbit") + SUNBIT("sunbit"), + + @SerializedName("swish") + SWISH("swish"), + + @SerializedName("tamara") + TAMARA("tamara"), + + @SerializedName("test_pay") + TEST_PAY("test_pay"), + + @SerializedName("truemoney") + TRUEMONEY("truemoney"), + + @SerializedName("twint") + TWINT("twint"), + + @SerializedName("upi") + UPI("upi"), + + @SerializedName("us_bank_account") + US_BANK_ACCOUNT("us_bank_account"), + + @SerializedName("us_cash_voucher") + US_CASH_VOUCHER("us_cash_voucher"), + + @SerializedName("vipps") + VIPPS("vipps"), + + @SerializedName("wechat_pay") + WECHAT_PAY("wechat_pay"), + + @SerializedName("wero") + WERO("wero"), + + @SerializedName("zip") + ZIP("zip"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AllowedPaymentMethodType(String value) { + this.value = value; + } + } + public enum CaptureMethod implements ApiRequestParams.EnumParam { @SerializedName("automatic") AUTOMATIC("automatic"), diff --git a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java index be6a2c09643b..3aa87ecdda21 100644 --- a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java @@ -14,6 +14,15 @@ @Getter @EqualsAndHashCode(callSuper = false) public class PaymentIntentUpdateParams extends ApiRequestParams { + /** + * The list of payment method types allowed for use with this payment. Stripe automatically + * returns compatible payment methods from this list in the {@code payment_method_types} field of + * the response, based on the other PaymentIntent parameters, such as {@code currency}, {@code + * amount}, and {@code customer}. + */ + @SerializedName("allowed_payment_method_types") + List allowedPaymentMethodTypes; + /** * Amount intended to be collected by this PaymentIntent. A positive integer representing how much * to charge in the smallest currency @@ -239,6 +248,7 @@ public class PaymentIntentUpdateParams extends ApiRequestParams { Object transferGroup; private PaymentIntentUpdateParams( + List allowedPaymentMethodTypes, Long amount, Object amountDetails, Object applicationFeeAmount, @@ -265,6 +275,7 @@ private PaymentIntentUpdateParams( Object statementDescriptorSuffix, TransferData transferData, Object transferGroup) { + this.allowedPaymentMethodTypes = allowedPaymentMethodTypes; this.amount = amount; this.amountDetails = amountDetails; this.applicationFeeAmount = applicationFeeAmount; @@ -298,6 +309,8 @@ public static Builder builder() { } public static class Builder { + private List allowedPaymentMethodTypes; + private Long amount; private Object amountDetails; @@ -353,6 +366,7 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentUpdateParams build() { return new PaymentIntentUpdateParams( + this.allowedPaymentMethodTypes, this.amount, this.amountDetails, this.applicationFeeAmount, @@ -381,6 +395,34 @@ public PaymentIntentUpdateParams build() { this.transferGroup); } + /** + * Add an element to `allowedPaymentMethodTypes` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link PaymentIntentUpdateParams#allowedPaymentMethodTypes} for the field documentation. + */ + public Builder addAllowedPaymentMethodType( + PaymentIntentUpdateParams.AllowedPaymentMethodType element) { + if (this.allowedPaymentMethodTypes == null) { + this.allowedPaymentMethodTypes = new ArrayList<>(); + } + this.allowedPaymentMethodTypes.add(element); + return this; + } + + /** + * Add all elements to `allowedPaymentMethodTypes` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link PaymentIntentUpdateParams#allowedPaymentMethodTypes} for the field documentation. + */ + public Builder addAllAllowedPaymentMethodType( + List elements) { + if (this.allowedPaymentMethodTypes == null) { + this.allowedPaymentMethodTypes = new ArrayList<>(); + } + this.allowedPaymentMethodTypes.addAll(elements); + return this; + } + /** * Amount intended to be collected by this PaymentIntent. A positive integer representing how * much to charge in the smallest @@ -5878,12 +5920,18 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("bank_rakyat") BANK_RAKYAT("bank_rakyat"), + @SerializedName("bnp_paribas") + BNP_PARIBAS("bnp_paribas"), + @SerializedName("bsn") BSN("bsn"), @SerializedName("cimb") CIMB("cimb"), + @SerializedName("citibank") + CITIBANK("citibank"), + @SerializedName("deutsche_bank") DEUTSCHE_BANK("deutsche_bank"), @@ -5902,6 +5950,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("maybank2u") MAYBANK2U("maybank2u"), + @SerializedName("mbsb_bank") + MBSB_BANK("mbsb_bank"), + @SerializedName("ocbc") OCBC("ocbc"), @@ -20541,9 +20592,35 @@ public static class Payco { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Payco(ApiRequestParams.EnumParam captureMethod, 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 Payco( + ApiRequestParams.EnumParam captureMethod, + Map extraParams, + SetupFutureUsage setupFutureUsage) { this.captureMethod = captureMethod; this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; } public static Builder builder() { @@ -20555,10 +20632,12 @@ public static class Builder { private Map extraParams; + private SetupFutureUsage setupFutureUsage; + /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentUpdateParams.PaymentMethodOptions.Payco build() { return new PaymentIntentUpdateParams.PaymentMethodOptions.Payco( - this.captureMethod, this.extraParams); + this.captureMethod, this.extraParams, this.setupFutureUsage); } /** @@ -20619,6 +20698,33 @@ public Builder putAllExtraParam(Map map) { 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. + */ + public Builder setSetupFutureUsage( + PaymentIntentUpdateParams.PaymentMethodOptions.Payco.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } } public enum CaptureMethod implements ApiRequestParams.EnumParam { @@ -20632,6 +20738,18 @@ public enum CaptureMethod implements ApiRequestParams.EnumParam { 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 @@ -22544,10 +22662,35 @@ public static class SamsungPay { @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 SamsungPay( - ApiRequestParams.EnumParam captureMethod, Map extraParams) { + ApiRequestParams.EnumParam captureMethod, + Map extraParams, + SetupFutureUsage setupFutureUsage) { this.captureMethod = captureMethod; this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; } public static Builder builder() { @@ -22559,10 +22702,12 @@ public static class Builder { private Map extraParams; + private SetupFutureUsage setupFutureUsage; + /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentUpdateParams.PaymentMethodOptions.SamsungPay build() { return new PaymentIntentUpdateParams.PaymentMethodOptions.SamsungPay( - this.captureMethod, this.extraParams); + this.captureMethod, this.extraParams, this.setupFutureUsage); } /** @@ -22623,6 +22768,33 @@ public Builder putAllExtraParam(Map map) { 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. + */ + public Builder setSetupFutureUsage( + PaymentIntentUpdateParams.PaymentMethodOptions.SamsungPay.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } } public enum CaptureMethod implements ApiRequestParams.EnumParam { @@ -22636,6 +22808,18 @@ public enum CaptureMethod implements ApiRequestParams.EnumParam { 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 @@ -26201,6 +26385,303 @@ public Builder setMetadata(Map metadata) { } } + public enum AllowedPaymentMethodType 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("bizum") + BIZUM("bizum"), + + @SerializedName("blik") + BLIK("blik"), + + @SerializedName("boku_promptpay") + BOKU_PROMPTPAY("boku_promptpay"), + + @SerializedName("boleto") + BOLETO("boleto"), + + @SerializedName("capchase_pay") + CAPCHASE_PAY("capchase_pay"), + + @SerializedName("card") + CARD("card"), + + @SerializedName("cashapp") + CASHAPP("cashapp"), + + @SerializedName("check_scan") + CHECK_SCAN("check_scan"), + + @SerializedName("click_to_pay") + CLICK_TO_PAY("click_to_pay"), + + @SerializedName("crypto") + CRYPTO("crypto"), + + @SerializedName("customer_balance") + CUSTOMER_BALANCE("customer_balance"), + + @SerializedName("demo_pay") + DEMO_PAY("demo_pay"), + + @SerializedName("duitnow") + DUITNOW("duitnow"), + + @SerializedName("dummy_auth_push") + DUMMY_AUTH_PUSH("dummy_auth_push"), + + @SerializedName("dummy_passthrough_card") + DUMMY_PASSTHROUGH_CARD("dummy_passthrough_card"), + + @SerializedName("edenred") + EDENRED("edenred"), + + @SerializedName("eps") + EPS("eps"), + + @SerializedName("fpx") + FPX("fpx"), + + @SerializedName("gcash") + GCASH("gcash"), + + @SerializedName("getbalance") + GETBALANCE("getbalance"), + + @SerializedName("gift_card") + GIFT_CARD("gift_card"), + + @SerializedName("giropay") + GIROPAY("giropay"), + + @SerializedName("gopay") + GOPAY("gopay"), + + @SerializedName("grabpay") + GRABPAY("grabpay"), + + @SerializedName("id_bank_transfer") + ID_BANK_TRANSFER("id_bank_transfer"), + + @SerializedName("ideal") + IDEAL("ideal"), + + @SerializedName("kakao_pay") + KAKAO_PAY("kakao_pay"), + + @SerializedName("klarna") + KLARNA("klarna"), + + @SerializedName("knet") + KNET("knet"), + + @SerializedName("konbini") + KONBINI("konbini"), + + @SerializedName("kr_card") + KR_CARD("kr_card"), + + @SerializedName("kr_market") + KR_MARKET("kr_market"), + + @SerializedName("kriya") + KRIYA("kriya"), + + @SerializedName("link") + LINK("link"), + + @SerializedName("mb_way") + MB_WAY("mb_way"), + + @SerializedName("mobilepay") + MOBILEPAY("mobilepay"), + + @SerializedName("momo") + MOMO("momo"), + + @SerializedName("mondu") + MONDU("mondu"), + + @SerializedName("multibanco") + MULTIBANCO("multibanco"), + + @SerializedName("naver_pay") + NAVER_PAY("naver_pay"), + + @SerializedName("netbanking") + NETBANKING("netbanking"), + + @SerializedName("ng_bank") + NG_BANK("ng_bank"), + + @SerializedName("ng_bank_transfer") + NG_BANK_TRANSFER("ng_bank_transfer"), + + @SerializedName("ng_card") + NG_CARD("ng_card"), + + @SerializedName("ng_market") + NG_MARKET("ng_market"), + + @SerializedName("ng_ussd") + NG_USSD("ng_ussd"), + + @SerializedName("ng_wallet") + NG_WALLET("ng_wallet"), + + @SerializedName("nz_bank_account") + NZ_BANK_ACCOUNT("nz_bank_account"), + + @SerializedName("octopus") + OCTOPUS("octopus"), + + @SerializedName("oxxo") + OXXO("oxxo"), + + @SerializedName("p24") + P24("p24"), + + @SerializedName("paper_check") + PAPER_CHECK("paper_check"), + + @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("payto") + PAYTO("payto"), + + @SerializedName("pix") + PIX("pix"), + + @SerializedName("promptpay") + PROMPTPAY("promptpay"), + + @SerializedName("qris") + QRIS("qris"), + + @SerializedName("rechnung") + RECHNUNG("rechnung"), + + @SerializedName("revolut_pay") + REVOLUT_PAY("revolut_pay"), + + @SerializedName("samsung_pay") + SAMSUNG_PAY("samsung_pay"), + + @SerializedName("satispay") + SATISPAY("satispay"), + + @SerializedName("scalapay") + SCALAPAY("scalapay"), + + @SerializedName("sepa_debit") + SEPA_DEBIT("sepa_debit"), + + @SerializedName("sequra") + SEQURA("sequra"), + + @SerializedName("shop_pay") + SHOP_PAY("shop_pay"), + + @SerializedName("shopeepay") + SHOPEEPAY("shopeepay"), + + @SerializedName("sofort") + SOFORT("sofort"), + + @SerializedName("south_korea_market") + SOUTH_KOREA_MARKET("south_korea_market"), + + @SerializedName("stripe_balance") + STRIPE_BALANCE("stripe_balance"), + + @SerializedName("sunbit") + SUNBIT("sunbit"), + + @SerializedName("swish") + SWISH("swish"), + + @SerializedName("tamara") + TAMARA("tamara"), + + @SerializedName("test_pay") + TEST_PAY("test_pay"), + + @SerializedName("truemoney") + TRUEMONEY("truemoney"), + + @SerializedName("twint") + TWINT("twint"), + + @SerializedName("upi") + UPI("upi"), + + @SerializedName("us_bank_account") + US_BANK_ACCOUNT("us_bank_account"), + + @SerializedName("us_cash_voucher") + US_CASH_VOUCHER("us_cash_voucher"), + + @SerializedName("vipps") + VIPPS("vipps"), + + @SerializedName("wechat_pay") + WECHAT_PAY("wechat_pay"), + + @SerializedName("wero") + WERO("wero"), + + @SerializedName("zip") + ZIP("zip"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AllowedPaymentMethodType(String value) { + this.value = value; + } + } + public enum CaptureMethod implements ApiRequestParams.EnumParam { @SerializedName("automatic") AUTOMATIC("automatic"), diff --git a/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java b/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java index 4a28cc3bce53..31ff99b7eba9 100644 --- a/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java @@ -37,6 +37,10 @@ public class PaymentLinkUpdateParams extends ApiRequestParams { @SerializedName("billing_address_collection") BillingAddressCollection billingAddressCollection; + /** Configure fields to gather active consent from customers. */ + @SerializedName("consent_collection") + ConsentCollection consentCollection; + /** * Collect additional information from your customer using custom fields. Up to 3 fields are * supported. You can't set this parameter if {@code ui_mode} is {@code custom}. @@ -162,6 +166,14 @@ public class PaymentLinkUpdateParams extends ApiRequestParams { @SerializedName("shipping_address_collection") Object shippingAddressCollection; + /** + * The shipping rate options to apply to checkout sessions created by this + * payment link. + */ + @SerializedName("shipping_options") + Object shippingOptions; + /** * Describes the type of transaction being performed in order to customize relevant text on the * page, such as the submit button. Changing this value will also affect the hostname in the (); + } + ((List) this.shippingOptions).add(element); + return this; + } + + /** + * Add all elements to `shippingOptions` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentLinkUpdateParams#shippingOptions} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllShippingOption(List elements) { + if (this.shippingOptions == null || this.shippingOptions instanceof EmptyParam) { + this.shippingOptions = new ArrayList(); + } + ((List) this.shippingOptions).addAll(elements); + return this; + } + + /** + * The shipping rate options to apply to checkout sessions created by this + * payment link. + */ + public Builder setShippingOptions(EmptyParam shippingOptions) { + this.shippingOptions = shippingOptions; + return this; + } + + /** + * The shipping rate options to apply to checkout sessions created by this + * payment link. + */ + public Builder setShippingOptions( + List shippingOptions) { + this.shippingOptions = shippingOptions; + return this; + } + /** * Describes the type of transaction being performed in order to customize relevant text on the * page, such as the submit button. Changing this value will also affect the hostname in the extraParams; + + /** + * Determines the display of payment method reuse agreement text in the UI. If set to {@code + * hidden}, it will hide legal text related to the reuse of a payment method. + */ + @SerializedName("payment_method_reuse_agreement") + PaymentMethodReuseAgreement paymentMethodReuseAgreement; + + /** + * If set to {@code auto}, enables the collection of customer consent for promotional + * communications. The Checkout Session will determine whether to display an option to opt into + * promotional communication from the merchant depending on the customer's locale. Only + * available to US merchants and US customers. + */ + @SerializedName("promotions") + Promotions promotions; + + /** + * If set to {@code required}, it requires customers to check a terms of service checkbox before + * being able to pay. There must be a valid terms of service URL set in your Dashboard settings. + */ + @SerializedName("terms_of_service") + TermsOfService termsOfService; + + private ConsentCollection( + Map extraParams, + PaymentMethodReuseAgreement paymentMethodReuseAgreement, + Promotions promotions, + TermsOfService termsOfService) { + this.extraParams = extraParams; + this.paymentMethodReuseAgreement = paymentMethodReuseAgreement; + this.promotions = promotions; + this.termsOfService = termsOfService; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private PaymentMethodReuseAgreement paymentMethodReuseAgreement; + + private Promotions promotions; + + private TermsOfService termsOfService; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentLinkUpdateParams.ConsentCollection build() { + return new PaymentLinkUpdateParams.ConsentCollection( + this.extraParams, + this.paymentMethodReuseAgreement, + this.promotions, + this.termsOfService); + } + + /** + * 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 + * PaymentLinkUpdateParams.ConsentCollection#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 PaymentLinkUpdateParams.ConsentCollection#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Determines the display of payment method reuse agreement text in the UI. If set to {@code + * hidden}, it will hide legal text related to the reuse of a payment method. + */ + public Builder setPaymentMethodReuseAgreement( + PaymentLinkUpdateParams.ConsentCollection.PaymentMethodReuseAgreement + paymentMethodReuseAgreement) { + this.paymentMethodReuseAgreement = paymentMethodReuseAgreement; + return this; + } + + /** + * If set to {@code auto}, enables the collection of customer consent for promotional + * communications. The Checkout Session will determine whether to display an option to opt + * into promotional communication from the merchant depending on the customer's locale. Only + * available to US merchants and US customers. + */ + public Builder setPromotions( + PaymentLinkUpdateParams.ConsentCollection.Promotions promotions) { + this.promotions = promotions; + return this; + } + + /** + * If set to {@code required}, it requires customers to check a terms of service checkbox + * before being able to pay. There must be a valid terms of service URL set in your Dashboard settings. + */ + public Builder setTermsOfService( + PaymentLinkUpdateParams.ConsentCollection.TermsOfService termsOfService) { + this.termsOfService = termsOfService; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PaymentMethodReuseAgreement { + /** + * 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. Determines the position and visibility of the payment method + * reuse agreement in the UI. When set to {@code auto}, Stripe's defaults will be used. When + * set to {@code hidden}, the payment method reuse agreement text will always be hidden in the + * UI. + */ + @SerializedName("position") + Position position; + + private PaymentMethodReuseAgreement(Map extraParams, Position position) { + this.extraParams = extraParams; + this.position = position; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Position position; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentLinkUpdateParams.ConsentCollection.PaymentMethodReuseAgreement build() { + return new PaymentLinkUpdateParams.ConsentCollection.PaymentMethodReuseAgreement( + this.extraParams, this.position); + } + + /** + * 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 + * PaymentLinkUpdateParams.ConsentCollection.PaymentMethodReuseAgreement#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 + * PaymentLinkUpdateParams.ConsentCollection.PaymentMethodReuseAgreement#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. Determines the position and visibility of the payment method + * reuse agreement in the UI. When set to {@code auto}, Stripe's defaults will be used. When + * set to {@code hidden}, the payment method reuse agreement text will always be hidden in + * the UI. + */ + public Builder setPosition( + PaymentLinkUpdateParams.ConsentCollection.PaymentMethodReuseAgreement.Position + position) { + this.position = position; + return this; + } + } + + public enum Position implements ApiRequestParams.EnumParam { + @SerializedName("auto") + AUTO("auto"), + + @SerializedName("hidden") + HIDDEN("hidden"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Position(String value) { + this.value = value; + } + } + } + + public enum Promotions implements ApiRequestParams.EnumParam { + @SerializedName("auto") + AUTO("auto"), + + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Promotions(String value) { + this.value = value; + } + } + + public enum TermsOfService implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), + + @SerializedName("required") + REQUIRED("required"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + TermsOfService(String value) { + this.value = value; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class CustomField { @@ -4063,6 +4404,30 @@ public static class PaymentIntentData { @SerializedName("metadata") Object metadata; + /** + * Indicates that you intend to make future payments + * with the payment method collected by this Checkout Session. + * + *

When setting this to {@code on_session}, Checkout will show a notice to the customer that + * their payment details will be saved. + * + *

When setting this to {@code off_session}, Checkout will show a notice to the customer that + * their payment details will be saved and used for future payments. + * + *

If a Customer has been provided or Checkout creates a new Customer,Checkout will attach + * the payment method to the Customer. + * + *

If Checkout does not create a Customer, the payment method is not attached to a Customer. + * To reuse the payment method, you can retrieve it from the Checkout Session's PaymentIntent. + * + *

When processing card payments, Checkout also uses {@code setup_future_usage} to + * dynamically optimize your payment flow and comply with regional legislation and network + * rules, such as SCA. + */ + @SerializedName("setup_future_usage") + ApiRequestParams.EnumParam setupFutureUsage; + /** * Text that appears on the customer's statement as the statement descriptor for a non-card * charge. This value overrides the account's default statement descriptor. For information @@ -4098,12 +4463,14 @@ private PaymentIntentData( Object description, Map extraParams, Object metadata, + ApiRequestParams.EnumParam setupFutureUsage, Object statementDescriptor, Object statementDescriptorSuffix, Object transferGroup) { this.description = description; this.extraParams = extraParams; this.metadata = metadata; + this.setupFutureUsage = setupFutureUsage; this.statementDescriptor = statementDescriptor; this.statementDescriptorSuffix = statementDescriptorSuffix; this.transferGroup = transferGroup; @@ -4120,6 +4487,8 @@ public static class Builder { private Object metadata; + private ApiRequestParams.EnumParam setupFutureUsage; + private Object statementDescriptor; private Object statementDescriptorSuffix; @@ -4132,6 +4501,7 @@ public PaymentLinkUpdateParams.PaymentIntentData build() { this.description, this.extraParams, this.metadata, + this.setupFutureUsage, this.statementDescriptor, this.statementDescriptorSuffix, this.transferGroup); @@ -4226,6 +4596,61 @@ public Builder setMetadata(Map metadata) { return this; } + /** + * Indicates that you intend to make future + * payments with the payment method collected by this Checkout Session. + * + *

When setting this to {@code on_session}, Checkout will show a notice to the customer + * that their payment details will be saved. + * + *

When setting this to {@code off_session}, Checkout will show a notice to the customer + * that their payment details will be saved and used for future payments. + * + *

If a Customer has been provided or Checkout creates a new Customer,Checkout will attach + * the payment method to the Customer. + * + *

If Checkout does not create a Customer, the payment method is not attached to a + * Customer. To reuse the payment method, you can retrieve it from the Checkout Session's + * PaymentIntent. + * + *

When processing card payments, Checkout also uses {@code setup_future_usage} to + * dynamically optimize your payment flow and comply with regional legislation and network + * rules, such as SCA. + */ + public Builder setSetupFutureUsage( + PaymentLinkUpdateParams.PaymentIntentData.SetupFutureUsage setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + + /** + * Indicates that you intend to make future + * payments with the payment method collected by this Checkout Session. + * + *

When setting this to {@code on_session}, Checkout will show a notice to the customer + * that their payment details will be saved. + * + *

When setting this to {@code off_session}, Checkout will show a notice to the customer + * that their payment details will be saved and used for future payments. + * + *

If a Customer has been provided or Checkout creates a new Customer,Checkout will attach + * the payment method to the Customer. + * + *

If Checkout does not create a Customer, the payment method is not attached to a + * Customer. To reuse the payment method, you can retrieve it from the Checkout Session's + * PaymentIntent. + * + *

When processing card payments, Checkout also uses {@code setup_future_usage} to + * dynamically optimize your payment flow and comply with regional legislation and network + * rules, such as SCA. + */ + public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + /** * Text that appears on the customer's statement as the statement descriptor for a non-card * charge. This value overrides the account's default statement descriptor. For information @@ -4300,6 +4725,21 @@ public Builder setTransferGroup(EmptyParam transferGroup) { return this; } } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("off_session") + OFF_SESSION("off_session"), + + @SerializedName("on_session") + ON_SESSION("on_session"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } } @Getter @@ -5672,6 +6112,81 @@ public enum AllowedCountry implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ShippingOption { + /** + * 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 the Shipping Rate to use for this shipping option. */ + @SerializedName("shipping_rate") + Object shippingRate; + + private ShippingOption(Map extraParams, Object shippingRate) { + this.extraParams = extraParams; + this.shippingRate = shippingRate; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object shippingRate; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentLinkUpdateParams.ShippingOption build() { + return new PaymentLinkUpdateParams.ShippingOption(this.extraParams, this.shippingRate); + } + + /** + * 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 + * PaymentLinkUpdateParams.ShippingOption#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 PaymentLinkUpdateParams.ShippingOption#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 the Shipping Rate to use for this shipping option. */ + public Builder setShippingRate(String shippingRate) { + this.shippingRate = shippingRate; + return this; + } + + /** The ID of the Shipping Rate to use for this shipping option. */ + public Builder setShippingRate(EmptyParam shippingRate) { + this.shippingRate = shippingRate; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class SubscriptionData { diff --git a/src/main/java/com/stripe/param/PaymentMethodCreateParams.java b/src/main/java/com/stripe/param/PaymentMethodCreateParams.java index a7c77648b89f..5c25fa4a3509 100644 --- a/src/main/java/com/stripe/param/PaymentMethodCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodCreateParams.java @@ -3375,12 +3375,18 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("bank_rakyat") BANK_RAKYAT("bank_rakyat"), + @SerializedName("bnp_paribas") + BNP_PARIBAS("bnp_paribas"), + @SerializedName("bsn") BSN("bsn"), @SerializedName("cimb") CIMB("cimb"), + @SerializedName("citibank") + CITIBANK("citibank"), + @SerializedName("deutsche_bank") DEUTSCHE_BANK("deutsche_bank"), @@ -3399,6 +3405,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("maybank2u") MAYBANK2U("maybank2u"), + @SerializedName("mbsb_bank") + MBSB_BANK("mbsb_bank"), + @SerializedName("ocbc") OCBC("ocbc"), diff --git a/src/main/java/com/stripe/param/PaymentRecordListParams.java b/src/main/java/com/stripe/param/PaymentRecordListParams.java new file mode 100644 index 000000000000..7c9f6ada1ec6 --- /dev/null +++ b/src/main/java/com/stripe/param/PaymentRecordListParams.java @@ -0,0 +1,205 @@ +// 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 PaymentRecordListParams extends ApiRequestParams { + /** Only return Payment Records that were created after this unix timestamp. */ + @SerializedName("created_after") + Long createdAfter; + + /** Only return Payment Records that were created before this unix timestamp. */ + @SerializedName("created_before") + Long createdBefore; + + /** + * A cursor for use in pagination. {@code ending_before} is an object ID that defines your place + * in the list. For instance, if you make a list request and receive 100 objects, starting with + * {@code obj_bar}, your subsequent call can include {@code ending_before=obj_bar} in order to + * fetch the previous page of the list. + */ + @SerializedName("ending_before") + String endingBefore; + + /** 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; + + /** + * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the + * default is 10. + */ + @SerializedName("limit") + Long limit; + + /** + * A cursor for use in pagination. {@code starting_after} is an object ID that defines your place + * in the list. For instance, if you make a list request and receive 100 objects, ending with + * {@code obj_foo}, your subsequent call can include {@code starting_after=obj_foo} in order to + * fetch the next page of the list. + */ + @SerializedName("starting_after") + String startingAfter; + + private PaymentRecordListParams( + Long createdAfter, + Long createdBefore, + String endingBefore, + List expand, + Map extraParams, + Long limit, + String startingAfter) { + this.createdAfter = createdAfter; + this.createdBefore = createdBefore; + this.endingBefore = endingBefore; + this.expand = expand; + this.extraParams = extraParams; + this.limit = limit; + this.startingAfter = startingAfter; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long createdAfter; + + private Long createdBefore; + + private String endingBefore; + + private List expand; + + private Map extraParams; + + private Long limit; + + private String startingAfter; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentRecordListParams build() { + return new PaymentRecordListParams( + this.createdAfter, + this.createdBefore, + this.endingBefore, + this.expand, + this.extraParams, + this.limit, + this.startingAfter); + } + + /** Only return Payment Records that were created after this unix timestamp. */ + public Builder setCreatedAfter(Long createdAfter) { + this.createdAfter = createdAfter; + return this; + } + + /** Only return Payment Records that were created before this unix timestamp. */ + public Builder setCreatedBefore(Long createdBefore) { + this.createdBefore = createdBefore; + return this; + } + + /** + * A cursor for use in pagination. {@code ending_before} is an object ID that defines your place + * in the list. For instance, if you make a list request and receive 100 objects, starting with + * {@code obj_bar}, your subsequent call can include {@code ending_before=obj_bar} in order to + * fetch the previous page of the list. + */ + public Builder setEndingBefore(String endingBefore) { + this.endingBefore = endingBefore; + 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 + * PaymentRecordListParams#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 + * PaymentRecordListParams#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 + * PaymentRecordListParams#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 PaymentRecordListParams#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 limit on the number of objects to be returned. Limit can range between 1 and 100, and the + * default is 10. + */ + public Builder setLimit(Long limit) { + this.limit = limit; + return this; + } + + /** + * A cursor for use in pagination. {@code starting_after} is an object ID that defines your + * place in the list. For instance, if you make a list request and receive 100 objects, ending + * with {@code obj_foo}, your subsequent call can include {@code starting_after=obj_foo} in + * order to fetch the next page of the list. + */ + public Builder setStartingAfter(String startingAfter) { + this.startingAfter = startingAfter; + return this; + } + } +} diff --git a/src/main/java/com/stripe/param/PersonCollectionCreateParams.java b/src/main/java/com/stripe/param/PersonCollectionCreateParams.java index cfe05d1a1f88..4ed9e08a919e 100644 --- a/src/main/java/com/stripe/param/PersonCollectionCreateParams.java +++ b/src/main/java/com/stripe/param/PersonCollectionCreateParams.java @@ -86,6 +86,10 @@ public class PersonCollectionCreateParams extends ApiRequestParams { * in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also * provide a PII token provided * by Stripe.js. + * + *

Changing this value for the account's representative requires that the account re-accept the + * terms of + * service. */ @SerializedName("id_number") String idNumber; @@ -96,6 +100,10 @@ public class PersonCollectionCreateParams extends ApiRequestParams { * Instead of the number itself, you can also provide a PII token provided by * Stripe.js. + * + *

Changing this value for the account's representative requires that the account re-accept the + * terms of + * service. */ @SerializedName("id_number_secondary") String idNumberSecondary; @@ -160,7 +168,13 @@ public class PersonCollectionCreateParams extends ApiRequestParams { @SerializedName("relationship") Relationship relationship; - /** The last four digits of the person's Social Security number (U.S. only). */ + /** + * The last four digits of the person's Social Security number (U.S. only). + * + *

Changing this value for the account's representative requires that the account re-accept the + * terms of + * service. + */ @SerializedName("ssn_last_4") String ssnLast4; @@ -510,6 +524,10 @@ public Builder setGender(String gender) { * number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you * can also provide a PII * token provided by Stripe.js. + * + *

Changing this value for the account's representative requires that the account re-accept + * the terms of + * service. */ public Builder setIdNumber(String idNumber) { this.idNumber = idNumber; @@ -522,6 +540,10 @@ public Builder setIdNumber(String idNumber) { * card. Instead of the number itself, you can also provide a PII token provided by * Stripe.js. + * + *

Changing this value for the account's representative requires that the account re-accept + * the terms of + * service. */ public Builder setIdNumberSecondary(String idNumberSecondary) { this.idNumberSecondary = idNumberSecondary; @@ -651,7 +673,13 @@ public Builder setRelationship(PersonCollectionCreateParams.Relationship relatio return this; } - /** The last four digits of the person's Social Security number (U.S. only). */ + /** + * The last four digits of the person's Social Security number (U.S. only). + * + *

Changing this value for the account's representative requires that the account re-accept + * the terms of + * service. + */ public Builder setSsnLast4(String ssnLast4) { this.ssnLast4 = ssnLast4; return this; diff --git a/src/main/java/com/stripe/param/PersonUpdateParams.java b/src/main/java/com/stripe/param/PersonUpdateParams.java index bb6e6b882cf5..fda701f56453 100644 --- a/src/main/java/com/stripe/param/PersonUpdateParams.java +++ b/src/main/java/com/stripe/param/PersonUpdateParams.java @@ -86,6 +86,10 @@ public class PersonUpdateParams extends ApiRequestParams { * in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also * provide a PII token provided * by Stripe.js. + * + *

Changing this value for the account's representative requires that the account re-accept the + * terms of + * service. */ @SerializedName("id_number") Object idNumber; @@ -96,6 +100,10 @@ public class PersonUpdateParams extends ApiRequestParams { * Instead of the number itself, you can also provide a PII token provided by * Stripe.js. + * + *

Changing this value for the account's representative requires that the account re-accept the + * terms of + * service. */ @SerializedName("id_number_secondary") Object idNumberSecondary; @@ -160,7 +168,13 @@ public class PersonUpdateParams extends ApiRequestParams { @SerializedName("relationship") Relationship relationship; - /** The last four digits of the person's Social Security number (U.S. only). */ + /** + * The last four digits of the person's Social Security number (U.S. only). + * + *

Changing this value for the account's representative requires that the account re-accept the + * terms of + * service. + */ @SerializedName("ssn_last_4") Object ssnLast4; @@ -543,6 +557,10 @@ public Builder setGender(EmptyParam gender) { * number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you * can also provide a PII * token provided by Stripe.js. + * + *

Changing this value for the account's representative requires that the account re-accept + * the terms of + * service. */ public Builder setIdNumber(String idNumber) { this.idNumber = idNumber; @@ -554,6 +572,10 @@ public Builder setIdNumber(String idNumber) { * number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you * can also provide a PII * token provided by Stripe.js. + * + *

Changing this value for the account's representative requires that the account re-accept + * the terms of + * service. */ public Builder setIdNumber(EmptyParam idNumber) { this.idNumber = idNumber; @@ -566,6 +588,10 @@ public Builder setIdNumber(EmptyParam idNumber) { * card. Instead of the number itself, you can also provide a PII token provided by * Stripe.js. + * + *

Changing this value for the account's representative requires that the account re-accept + * the terms of + * service. */ public Builder setIdNumberSecondary(String idNumberSecondary) { this.idNumberSecondary = idNumberSecondary; @@ -578,6 +604,10 @@ public Builder setIdNumberSecondary(String idNumberSecondary) { * card. Instead of the number itself, you can also provide a PII token provided by * Stripe.js. + * + *

Changing this value for the account's representative requires that the account re-accept + * the terms of + * service. */ public Builder setIdNumberSecondary(EmptyParam idNumberSecondary) { this.idNumberSecondary = idNumberSecondary; @@ -754,13 +784,25 @@ public Builder setRelationship(PersonUpdateParams.Relationship relationship) { return this; } - /** The last four digits of the person's Social Security number (U.S. only). */ + /** + * The last four digits of the person's Social Security number (U.S. only). + * + *

Changing this value for the account's representative requires that the account re-accept + * the terms of + * service. + */ public Builder setSsnLast4(String ssnLast4) { this.ssnLast4 = ssnLast4; return this; } - /** The last four digits of the person's Social Security number (U.S. only). */ + /** + * The last four digits of the person's Social Security number (U.S. only). + * + *

Changing this value for the account's representative requires that the account re-accept + * the terms of + * service. + */ public Builder setSsnLast4(EmptyParam ssnLast4) { this.ssnLast4 = ssnLast4; return this; diff --git a/src/main/java/com/stripe/param/PromotionCodeCreateParams.java b/src/main/java/com/stripe/param/PromotionCodeCreateParams.java index c2a2da106ffe..b0c66b26176d 100644 --- a/src/main/java/com/stripe/param/PromotionCodeCreateParams.java +++ b/src/main/java/com/stripe/param/PromotionCodeCreateParams.java @@ -400,7 +400,8 @@ public static class Restrictions { /** * Promotion codes defined in each available currency option. Each key must be a three-letter ISO currency code and a supported currency. + * href="https://stripe.com/docs/currencies">supported currency. Each currency must be + * different from the {@code minimum_amount_currency} set on the promotion code. */ @SerializedName("currency_options") Map currencyOptions; diff --git a/src/main/java/com/stripe/param/PromotionCodeUpdateParams.java b/src/main/java/com/stripe/param/PromotionCodeUpdateParams.java index ba9971029004..775c9f4fe021 100644 --- a/src/main/java/com/stripe/param/PromotionCodeUpdateParams.java +++ b/src/main/java/com/stripe/param/PromotionCodeUpdateParams.java @@ -205,7 +205,8 @@ public static class Restrictions { /** * Promotion codes defined in each available currency option. Each key must be a three-letter ISO currency code and a supported currency. + * href="https://stripe.com/docs/currencies">supported currency. Each currency must be + * different from the {@code minimum_amount_currency} set on the promotion code. */ @SerializedName("currency_options") Map currencyOptions; diff --git a/src/main/java/com/stripe/param/QuoteCreateParams.java b/src/main/java/com/stripe/param/QuoteCreateParams.java index 72bf8f09a56b..25e980b3b61a 100644 --- a/src/main/java/com/stripe/param/QuoteCreateParams.java +++ b/src/main/java/com/stripe/param/QuoteCreateParams.java @@ -1061,6 +1061,10 @@ public Builder setQuote(String quote) { @Getter @EqualsAndHashCode(callSuper = false) public static class InvoiceSettings { + /** A list of up to 4 custom fields to be displayed on the invoice. */ + @SerializedName("custom_fields") + Object customFields; + /** * Number of days within which a customer must pay the invoice generated by this quote. This * value will be {@code null} for quotes where {@code collection_method=charge_automatically}. @@ -1068,6 +1072,10 @@ public static class InvoiceSettings { @SerializedName("days_until_due") Long daysUntilDue; + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + @SerializedName("description") + Object description; + /** * 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 @@ -1077,6 +1085,10 @@ public static class InvoiceSettings { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Footer to be displayed on the invoice. */ + @SerializedName("footer") + Object footer; + /** * The connected account that issues the invoice. The invoice is presented with the branding and * support information of the specified account. @@ -1084,9 +1096,18 @@ public static class InvoiceSettings { @SerializedName("issuer") Issuer issuer; - private InvoiceSettings(Long daysUntilDue, Map extraParams, Issuer issuer) { + private InvoiceSettings( + Object customFields, + Long daysUntilDue, + Object description, + Map extraParams, + Object footer, + Issuer issuer) { + this.customFields = customFields; this.daysUntilDue = daysUntilDue; + this.description = description; this.extraParams = extraParams; + this.footer = footer; this.issuer = issuer; } @@ -1095,16 +1116,69 @@ public static Builder builder() { } public static class Builder { + private Object customFields; + private Long daysUntilDue; + private Object description; + private Map extraParams; + private Object footer; + private Issuer issuer; /** Finalize and obtain parameter instance from this builder. */ public QuoteCreateParams.InvoiceSettings build() { return new QuoteCreateParams.InvoiceSettings( - this.daysUntilDue, this.extraParams, this.issuer); + this.customFields, + this.daysUntilDue, + this.description, + this.extraParams, + this.footer, + this.issuer); + } + + /** + * Add an element to `customFields` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * QuoteCreateParams.InvoiceSettings#customFields} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addCustomField(QuoteCreateParams.InvoiceSettings.CustomField element) { + if (this.customFields == null || this.customFields instanceof EmptyParam) { + this.customFields = new ArrayList(); + } + ((List) this.customFields).add(element); + return this; + } + + /** + * Add all elements to `customFields` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * QuoteCreateParams.InvoiceSettings#customFields} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllCustomField( + List elements) { + if (this.customFields == null || this.customFields instanceof EmptyParam) { + this.customFields = new ArrayList(); + } + ((List) this.customFields).addAll(elements); + return this; + } + + /** A list of up to 4 custom fields to be displayed on the invoice. */ + public Builder setCustomFields(EmptyParam customFields) { + this.customFields = customFields; + return this; + } + + /** A list of up to 4 custom fields to be displayed on the invoice. */ + public Builder setCustomFields( + List customFields) { + this.customFields = customFields; + return this; } /** @@ -1116,6 +1190,18 @@ public Builder setDaysUntilDue(Long daysUntilDue) { return this; } + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + public Builder setDescription(String description) { + this.description = description; + return this; + } + + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + public Builder setDescription(EmptyParam description) { + this.description = description; + 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 @@ -1142,6 +1228,18 @@ public Builder putAllExtraParam(Map map) { return this; } + /** Footer to be displayed on the invoice. */ + public Builder setFooter(String footer) { + this.footer = footer; + return this; + } + + /** Footer to be displayed on the invoice. */ + public Builder setFooter(EmptyParam footer) { + this.footer = footer; + return this; + } + /** * The connected account that issues the invoice. The invoice is presented with the branding * and support information of the specified account. @@ -1152,6 +1250,100 @@ public Builder setIssuer(QuoteCreateParams.InvoiceSettings.Issuer issuer) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CustomField { + /** + * 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 name of the custom field. This may be up to 40 characters. + */ + @SerializedName("name") + String name; + + /** + * Required. The value of the custom field. This may be up to 140 characters. + */ + @SerializedName("value") + String value; + + private CustomField(Map extraParams, String name, String value) { + this.extraParams = extraParams; + this.name = name; + this.value = value; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String name; + + private String value; + + /** Finalize and obtain parameter instance from this builder. */ + public QuoteCreateParams.InvoiceSettings.CustomField build() { + return new QuoteCreateParams.InvoiceSettings.CustomField( + this.extraParams, this.name, this.value); + } + + /** + * 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.InvoiceSettings.CustomField#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.InvoiceSettings.CustomField#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 name of the custom field. This may be up to 40 characters. + */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** + * Required. The value of the custom field. This may be up to 140 + * characters. + */ + public Builder setValue(String value) { + this.value = value; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Issuer { diff --git a/src/main/java/com/stripe/param/QuoteUpdateParams.java b/src/main/java/com/stripe/param/QuoteUpdateParams.java index 0512eaa122cb..ff51215ac741 100644 --- a/src/main/java/com/stripe/param/QuoteUpdateParams.java +++ b/src/main/java/com/stripe/param/QuoteUpdateParams.java @@ -941,6 +941,10 @@ public Builder setPromotionCode(EmptyParam promotionCode) { @Getter @EqualsAndHashCode(callSuper = false) public static class InvoiceSettings { + /** A list of up to 4 custom fields to be displayed on the invoice. */ + @SerializedName("custom_fields") + Object customFields; + /** * Number of days within which a customer must pay the invoice generated by this quote. This * value will be {@code null} for quotes where {@code collection_method=charge_automatically}. @@ -948,6 +952,10 @@ public static class InvoiceSettings { @SerializedName("days_until_due") Long daysUntilDue; + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + @SerializedName("description") + Object description; + /** * 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 @@ -957,6 +965,10 @@ public static class InvoiceSettings { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Footer to be displayed on the invoice. */ + @SerializedName("footer") + Object footer; + /** * The connected account that issues the invoice. The invoice is presented with the branding and * support information of the specified account. @@ -964,9 +976,18 @@ public static class InvoiceSettings { @SerializedName("issuer") Issuer issuer; - private InvoiceSettings(Long daysUntilDue, Map extraParams, Issuer issuer) { + private InvoiceSettings( + Object customFields, + Long daysUntilDue, + Object description, + Map extraParams, + Object footer, + Issuer issuer) { + this.customFields = customFields; this.daysUntilDue = daysUntilDue; + this.description = description; this.extraParams = extraParams; + this.footer = footer; this.issuer = issuer; } @@ -975,16 +996,69 @@ public static Builder builder() { } public static class Builder { + private Object customFields; + private Long daysUntilDue; + private Object description; + private Map extraParams; + private Object footer; + private Issuer issuer; /** Finalize and obtain parameter instance from this builder. */ public QuoteUpdateParams.InvoiceSettings build() { return new QuoteUpdateParams.InvoiceSettings( - this.daysUntilDue, this.extraParams, this.issuer); + this.customFields, + this.daysUntilDue, + this.description, + this.extraParams, + this.footer, + this.issuer); + } + + /** + * Add an element to `customFields` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * QuoteUpdateParams.InvoiceSettings#customFields} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addCustomField(QuoteUpdateParams.InvoiceSettings.CustomField element) { + if (this.customFields == null || this.customFields instanceof EmptyParam) { + this.customFields = new ArrayList(); + } + ((List) this.customFields).add(element); + return this; + } + + /** + * Add all elements to `customFields` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * QuoteUpdateParams.InvoiceSettings#customFields} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllCustomField( + List elements) { + if (this.customFields == null || this.customFields instanceof EmptyParam) { + this.customFields = new ArrayList(); + } + ((List) this.customFields).addAll(elements); + return this; + } + + /** A list of up to 4 custom fields to be displayed on the invoice. */ + public Builder setCustomFields(EmptyParam customFields) { + this.customFields = customFields; + return this; + } + + /** A list of up to 4 custom fields to be displayed on the invoice. */ + public Builder setCustomFields( + List customFields) { + this.customFields = customFields; + return this; } /** @@ -996,6 +1070,18 @@ public Builder setDaysUntilDue(Long daysUntilDue) { return this; } + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + public Builder setDescription(String description) { + this.description = description; + return this; + } + + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + public Builder setDescription(EmptyParam description) { + this.description = description; + 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 @@ -1022,6 +1108,18 @@ public Builder putAllExtraParam(Map map) { return this; } + /** Footer to be displayed on the invoice. */ + public Builder setFooter(String footer) { + this.footer = footer; + return this; + } + + /** Footer to be displayed on the invoice. */ + public Builder setFooter(EmptyParam footer) { + this.footer = footer; + return this; + } + /** * The connected account that issues the invoice. The invoice is presented with the branding * and support information of the specified account. @@ -1032,6 +1130,117 @@ public Builder setIssuer(QuoteUpdateParams.InvoiceSettings.Issuer issuer) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CustomField { + /** + * 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 name of the custom field. This may be up to 40 characters. + */ + @SerializedName("name") + Object name; + + /** + * Required. The value of the custom field. This may be up to 140 characters. + */ + @SerializedName("value") + Object value; + + private CustomField(Map extraParams, Object name, Object value) { + this.extraParams = extraParams; + this.name = name; + this.value = value; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object name; + + private Object value; + + /** Finalize and obtain parameter instance from this builder. */ + public QuoteUpdateParams.InvoiceSettings.CustomField build() { + return new QuoteUpdateParams.InvoiceSettings.CustomField( + this.extraParams, this.name, this.value); + } + + /** + * 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 QuoteUpdateParams.InvoiceSettings.CustomField#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 QuoteUpdateParams.InvoiceSettings.CustomField#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 name of the custom field. This may be up to 40 characters. + */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** + * Required. The name of the custom field. This may be up to 40 characters. + */ + public Builder setName(EmptyParam name) { + this.name = name; + return this; + } + + /** + * Required. The value of the custom field. This may be up to 140 + * characters. + */ + public Builder setValue(String value) { + this.value = value; + return this; + } + + /** + * Required. The value of the custom field. This may be up to 140 + * characters. + */ + public Builder setValue(EmptyParam value) { + this.value = value; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Issuer { diff --git a/src/main/java/com/stripe/param/SetupIntentConfirmParams.java b/src/main/java/com/stripe/param/SetupIntentConfirmParams.java index 8745308cc7f1..b599ce012122 100644 --- a/src/main/java/com/stripe/param/SetupIntentConfirmParams.java +++ b/src/main/java/com/stripe/param/SetupIntentConfirmParams.java @@ -14,6 +14,15 @@ @Getter @EqualsAndHashCode(callSuper = false) public class SetupIntentConfirmParams extends ApiRequestParams { + /** + * The list of payment method types to allow for this SetupIntent. Stripe will only use methods in + * this list when determining the payment methods to offer. A list of valid payment method types + * can be found here. + */ + @SerializedName("allowed_payment_method_types") + List allowedPaymentMethodTypes; + /** * ID of the ConfirmationToken used to confirm this SetupIntent. * @@ -75,6 +84,7 @@ public class SetupIntentConfirmParams extends ApiRequestParams { Boolean useStripeSdk; private SetupIntentConfirmParams( + List allowedPaymentMethodTypes, String confirmationToken, List expand, Map extraParams, @@ -84,6 +94,7 @@ private SetupIntentConfirmParams( PaymentMethodOptions paymentMethodOptions, String returnUrl, Boolean useStripeSdk) { + this.allowedPaymentMethodTypes = allowedPaymentMethodTypes; this.confirmationToken = confirmationToken; this.expand = expand; this.extraParams = extraParams; @@ -100,6 +111,8 @@ public static Builder builder() { } public static class Builder { + private List allowedPaymentMethodTypes; + private String confirmationToken; private List expand; @@ -121,6 +134,7 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public SetupIntentConfirmParams build() { return new SetupIntentConfirmParams( + this.allowedPaymentMethodTypes, this.confirmationToken, this.expand, this.extraParams, @@ -132,6 +146,34 @@ public SetupIntentConfirmParams build() { this.useStripeSdk); } + /** + * Add an element to `allowedPaymentMethodTypes` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link SetupIntentConfirmParams#allowedPaymentMethodTypes} for the field documentation. + */ + public Builder addAllowedPaymentMethodType( + SetupIntentConfirmParams.AllowedPaymentMethodType element) { + if (this.allowedPaymentMethodTypes == null) { + this.allowedPaymentMethodTypes = new ArrayList<>(); + } + this.allowedPaymentMethodTypes.add(element); + return this; + } + + /** + * Add all elements to `allowedPaymentMethodTypes` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link SetupIntentConfirmParams#allowedPaymentMethodTypes} for the field documentation. + */ + public Builder addAllAllowedPaymentMethodType( + List elements) { + if (this.allowedPaymentMethodTypes == null) { + this.allowedPaymentMethodTypes = new ArrayList<>(); + } + this.allowedPaymentMethodTypes.addAll(elements); + return this; + } + /** * ID of the ConfirmationToken used to confirm this SetupIntent. * @@ -3619,12 +3661,18 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("bank_rakyat") BANK_RAKYAT("bank_rakyat"), + @SerializedName("bnp_paribas") + BNP_PARIBAS("bnp_paribas"), + @SerializedName("bsn") BSN("bsn"), @SerializedName("cimb") CIMB("cimb"), + @SerializedName("citibank") + CITIBANK("citibank"), + @SerializedName("deutsche_bank") DEUTSCHE_BANK("deutsche_bank"), @@ -3643,6 +3691,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("maybank2u") MAYBANK2U("maybank2u"), + @SerializedName("mbsb_bank") + MBSB_BANK("mbsb_bank"), + @SerializedName("ocbc") OCBC("ocbc"), @@ -11943,4 +11994,301 @@ public enum VerificationMethod implements ApiRequestParams.EnumParam { } } } + + public enum AllowedPaymentMethodType 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("bizum") + BIZUM("bizum"), + + @SerializedName("blik") + BLIK("blik"), + + @SerializedName("boku_promptpay") + BOKU_PROMPTPAY("boku_promptpay"), + + @SerializedName("boleto") + BOLETO("boleto"), + + @SerializedName("capchase_pay") + CAPCHASE_PAY("capchase_pay"), + + @SerializedName("card") + CARD("card"), + + @SerializedName("cashapp") + CASHAPP("cashapp"), + + @SerializedName("check_scan") + CHECK_SCAN("check_scan"), + + @SerializedName("click_to_pay") + CLICK_TO_PAY("click_to_pay"), + + @SerializedName("crypto") + CRYPTO("crypto"), + + @SerializedName("customer_balance") + CUSTOMER_BALANCE("customer_balance"), + + @SerializedName("demo_pay") + DEMO_PAY("demo_pay"), + + @SerializedName("duitnow") + DUITNOW("duitnow"), + + @SerializedName("dummy_auth_push") + DUMMY_AUTH_PUSH("dummy_auth_push"), + + @SerializedName("dummy_passthrough_card") + DUMMY_PASSTHROUGH_CARD("dummy_passthrough_card"), + + @SerializedName("edenred") + EDENRED("edenred"), + + @SerializedName("eps") + EPS("eps"), + + @SerializedName("fpx") + FPX("fpx"), + + @SerializedName("gcash") + GCASH("gcash"), + + @SerializedName("getbalance") + GETBALANCE("getbalance"), + + @SerializedName("gift_card") + GIFT_CARD("gift_card"), + + @SerializedName("giropay") + GIROPAY("giropay"), + + @SerializedName("gopay") + GOPAY("gopay"), + + @SerializedName("grabpay") + GRABPAY("grabpay"), + + @SerializedName("id_bank_transfer") + ID_BANK_TRANSFER("id_bank_transfer"), + + @SerializedName("ideal") + IDEAL("ideal"), + + @SerializedName("kakao_pay") + KAKAO_PAY("kakao_pay"), + + @SerializedName("klarna") + KLARNA("klarna"), + + @SerializedName("knet") + KNET("knet"), + + @SerializedName("konbini") + KONBINI("konbini"), + + @SerializedName("kr_card") + KR_CARD("kr_card"), + + @SerializedName("kr_market") + KR_MARKET("kr_market"), + + @SerializedName("kriya") + KRIYA("kriya"), + + @SerializedName("link") + LINK("link"), + + @SerializedName("mb_way") + MB_WAY("mb_way"), + + @SerializedName("mobilepay") + MOBILEPAY("mobilepay"), + + @SerializedName("momo") + MOMO("momo"), + + @SerializedName("mondu") + MONDU("mondu"), + + @SerializedName("multibanco") + MULTIBANCO("multibanco"), + + @SerializedName("naver_pay") + NAVER_PAY("naver_pay"), + + @SerializedName("netbanking") + NETBANKING("netbanking"), + + @SerializedName("ng_bank") + NG_BANK("ng_bank"), + + @SerializedName("ng_bank_transfer") + NG_BANK_TRANSFER("ng_bank_transfer"), + + @SerializedName("ng_card") + NG_CARD("ng_card"), + + @SerializedName("ng_market") + NG_MARKET("ng_market"), + + @SerializedName("ng_ussd") + NG_USSD("ng_ussd"), + + @SerializedName("ng_wallet") + NG_WALLET("ng_wallet"), + + @SerializedName("nz_bank_account") + NZ_BANK_ACCOUNT("nz_bank_account"), + + @SerializedName("octopus") + OCTOPUS("octopus"), + + @SerializedName("oxxo") + OXXO("oxxo"), + + @SerializedName("p24") + P24("p24"), + + @SerializedName("paper_check") + PAPER_CHECK("paper_check"), + + @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("payto") + PAYTO("payto"), + + @SerializedName("pix") + PIX("pix"), + + @SerializedName("promptpay") + PROMPTPAY("promptpay"), + + @SerializedName("qris") + QRIS("qris"), + + @SerializedName("rechnung") + RECHNUNG("rechnung"), + + @SerializedName("revolut_pay") + REVOLUT_PAY("revolut_pay"), + + @SerializedName("samsung_pay") + SAMSUNG_PAY("samsung_pay"), + + @SerializedName("satispay") + SATISPAY("satispay"), + + @SerializedName("scalapay") + SCALAPAY("scalapay"), + + @SerializedName("sepa_debit") + SEPA_DEBIT("sepa_debit"), + + @SerializedName("sequra") + SEQURA("sequra"), + + @SerializedName("shop_pay") + SHOP_PAY("shop_pay"), + + @SerializedName("shopeepay") + SHOPEEPAY("shopeepay"), + + @SerializedName("sofort") + SOFORT("sofort"), + + @SerializedName("south_korea_market") + SOUTH_KOREA_MARKET("south_korea_market"), + + @SerializedName("stripe_balance") + STRIPE_BALANCE("stripe_balance"), + + @SerializedName("sunbit") + SUNBIT("sunbit"), + + @SerializedName("swish") + SWISH("swish"), + + @SerializedName("tamara") + TAMARA("tamara"), + + @SerializedName("test_pay") + TEST_PAY("test_pay"), + + @SerializedName("truemoney") + TRUEMONEY("truemoney"), + + @SerializedName("twint") + TWINT("twint"), + + @SerializedName("upi") + UPI("upi"), + + @SerializedName("us_bank_account") + US_BANK_ACCOUNT("us_bank_account"), + + @SerializedName("us_cash_voucher") + US_CASH_VOUCHER("us_cash_voucher"), + + @SerializedName("vipps") + VIPPS("vipps"), + + @SerializedName("wechat_pay") + WECHAT_PAY("wechat_pay"), + + @SerializedName("wero") + WERO("wero"), + + @SerializedName("zip") + ZIP("zip"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AllowedPaymentMethodType(String value) { + this.value = value; + } + } } diff --git a/src/main/java/com/stripe/param/SetupIntentCreateParams.java b/src/main/java/com/stripe/param/SetupIntentCreateParams.java index 49de00970a15..ec2cf5d9bb18 100644 --- a/src/main/java/com/stripe/param/SetupIntentCreateParams.java +++ b/src/main/java/com/stripe/param/SetupIntentCreateParams.java @@ -14,6 +14,15 @@ @Getter @EqualsAndHashCode(callSuper = false) public class SetupIntentCreateParams extends ApiRequestParams { + /** + * The list of payment method types to allow for this SetupIntent. Stripe will only use methods in + * this list when determining the payment methods to offer. A list of valid payment method types + * can be found here. + */ + @SerializedName("allowed_payment_method_types") + List allowedPaymentMethodTypes; + /** * If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. * @@ -191,6 +200,7 @@ public class SetupIntentCreateParams extends ApiRequestParams { Boolean useStripeSdk; private SetupIntentCreateParams( + List allowedPaymentMethodTypes, Boolean attachToSelf, AutomaticPaymentMethods automaticPaymentMethods, Boolean confirm, @@ -214,6 +224,7 @@ private SetupIntentCreateParams( SingleUse singleUse, Usage usage, Boolean useStripeSdk) { + this.allowedPaymentMethodTypes = allowedPaymentMethodTypes; this.attachToSelf = attachToSelf; this.automaticPaymentMethods = automaticPaymentMethods; this.confirm = confirm; @@ -244,6 +255,8 @@ public static Builder builder() { } public static class Builder { + private List allowedPaymentMethodTypes; + private Boolean attachToSelf; private AutomaticPaymentMethods automaticPaymentMethods; @@ -293,6 +306,7 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public SetupIntentCreateParams build() { return new SetupIntentCreateParams( + this.allowedPaymentMethodTypes, this.attachToSelf, this.automaticPaymentMethods, this.confirm, @@ -318,6 +332,34 @@ public SetupIntentCreateParams build() { this.useStripeSdk); } + /** + * Add an element to `allowedPaymentMethodTypes` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link SetupIntentCreateParams#allowedPaymentMethodTypes} for the field documentation. + */ + public Builder addAllowedPaymentMethodType( + SetupIntentCreateParams.AllowedPaymentMethodType element) { + if (this.allowedPaymentMethodTypes == null) { + this.allowedPaymentMethodTypes = new ArrayList<>(); + } + this.allowedPaymentMethodTypes.add(element); + return this; + } + + /** + * Add all elements to `allowedPaymentMethodTypes` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link SetupIntentCreateParams#allowedPaymentMethodTypes} for the field documentation. + */ + public Builder addAllAllowedPaymentMethodType( + List elements) { + if (this.allowedPaymentMethodTypes == null) { + this.allowedPaymentMethodTypes = new ArrayList<>(); + } + this.allowedPaymentMethodTypes.addAll(elements); + return this; + } + /** * If present, the SetupIntent's payment method will be attached to the in-context Stripe * Account. @@ -4155,12 +4197,18 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("bank_rakyat") BANK_RAKYAT("bank_rakyat"), + @SerializedName("bnp_paribas") + BNP_PARIBAS("bnp_paribas"), + @SerializedName("bsn") BSN("bsn"), @SerializedName("cimb") CIMB("cimb"), + @SerializedName("citibank") + CITIBANK("citibank"), + @SerializedName("deutsche_bank") DEUTSCHE_BANK("deutsche_bank"), @@ -4179,6 +4227,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("maybank2u") MAYBANK2U("maybank2u"), + @SerializedName("mbsb_bank") + MBSB_BANK("mbsb_bank"), + @SerializedName("ocbc") OCBC("ocbc"), @@ -12585,6 +12636,303 @@ public Builder putAllExtraParam(Map map) { } } + public enum AllowedPaymentMethodType 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("bizum") + BIZUM("bizum"), + + @SerializedName("blik") + BLIK("blik"), + + @SerializedName("boku_promptpay") + BOKU_PROMPTPAY("boku_promptpay"), + + @SerializedName("boleto") + BOLETO("boleto"), + + @SerializedName("capchase_pay") + CAPCHASE_PAY("capchase_pay"), + + @SerializedName("card") + CARD("card"), + + @SerializedName("cashapp") + CASHAPP("cashapp"), + + @SerializedName("check_scan") + CHECK_SCAN("check_scan"), + + @SerializedName("click_to_pay") + CLICK_TO_PAY("click_to_pay"), + + @SerializedName("crypto") + CRYPTO("crypto"), + + @SerializedName("customer_balance") + CUSTOMER_BALANCE("customer_balance"), + + @SerializedName("demo_pay") + DEMO_PAY("demo_pay"), + + @SerializedName("duitnow") + DUITNOW("duitnow"), + + @SerializedName("dummy_auth_push") + DUMMY_AUTH_PUSH("dummy_auth_push"), + + @SerializedName("dummy_passthrough_card") + DUMMY_PASSTHROUGH_CARD("dummy_passthrough_card"), + + @SerializedName("edenred") + EDENRED("edenred"), + + @SerializedName("eps") + EPS("eps"), + + @SerializedName("fpx") + FPX("fpx"), + + @SerializedName("gcash") + GCASH("gcash"), + + @SerializedName("getbalance") + GETBALANCE("getbalance"), + + @SerializedName("gift_card") + GIFT_CARD("gift_card"), + + @SerializedName("giropay") + GIROPAY("giropay"), + + @SerializedName("gopay") + GOPAY("gopay"), + + @SerializedName("grabpay") + GRABPAY("grabpay"), + + @SerializedName("id_bank_transfer") + ID_BANK_TRANSFER("id_bank_transfer"), + + @SerializedName("ideal") + IDEAL("ideal"), + + @SerializedName("kakao_pay") + KAKAO_PAY("kakao_pay"), + + @SerializedName("klarna") + KLARNA("klarna"), + + @SerializedName("knet") + KNET("knet"), + + @SerializedName("konbini") + KONBINI("konbini"), + + @SerializedName("kr_card") + KR_CARD("kr_card"), + + @SerializedName("kr_market") + KR_MARKET("kr_market"), + + @SerializedName("kriya") + KRIYA("kriya"), + + @SerializedName("link") + LINK("link"), + + @SerializedName("mb_way") + MB_WAY("mb_way"), + + @SerializedName("mobilepay") + MOBILEPAY("mobilepay"), + + @SerializedName("momo") + MOMO("momo"), + + @SerializedName("mondu") + MONDU("mondu"), + + @SerializedName("multibanco") + MULTIBANCO("multibanco"), + + @SerializedName("naver_pay") + NAVER_PAY("naver_pay"), + + @SerializedName("netbanking") + NETBANKING("netbanking"), + + @SerializedName("ng_bank") + NG_BANK("ng_bank"), + + @SerializedName("ng_bank_transfer") + NG_BANK_TRANSFER("ng_bank_transfer"), + + @SerializedName("ng_card") + NG_CARD("ng_card"), + + @SerializedName("ng_market") + NG_MARKET("ng_market"), + + @SerializedName("ng_ussd") + NG_USSD("ng_ussd"), + + @SerializedName("ng_wallet") + NG_WALLET("ng_wallet"), + + @SerializedName("nz_bank_account") + NZ_BANK_ACCOUNT("nz_bank_account"), + + @SerializedName("octopus") + OCTOPUS("octopus"), + + @SerializedName("oxxo") + OXXO("oxxo"), + + @SerializedName("p24") + P24("p24"), + + @SerializedName("paper_check") + PAPER_CHECK("paper_check"), + + @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("payto") + PAYTO("payto"), + + @SerializedName("pix") + PIX("pix"), + + @SerializedName("promptpay") + PROMPTPAY("promptpay"), + + @SerializedName("qris") + QRIS("qris"), + + @SerializedName("rechnung") + RECHNUNG("rechnung"), + + @SerializedName("revolut_pay") + REVOLUT_PAY("revolut_pay"), + + @SerializedName("samsung_pay") + SAMSUNG_PAY("samsung_pay"), + + @SerializedName("satispay") + SATISPAY("satispay"), + + @SerializedName("scalapay") + SCALAPAY("scalapay"), + + @SerializedName("sepa_debit") + SEPA_DEBIT("sepa_debit"), + + @SerializedName("sequra") + SEQURA("sequra"), + + @SerializedName("shop_pay") + SHOP_PAY("shop_pay"), + + @SerializedName("shopeepay") + SHOPEEPAY("shopeepay"), + + @SerializedName("sofort") + SOFORT("sofort"), + + @SerializedName("south_korea_market") + SOUTH_KOREA_MARKET("south_korea_market"), + + @SerializedName("stripe_balance") + STRIPE_BALANCE("stripe_balance"), + + @SerializedName("sunbit") + SUNBIT("sunbit"), + + @SerializedName("swish") + SWISH("swish"), + + @SerializedName("tamara") + TAMARA("tamara"), + + @SerializedName("test_pay") + TEST_PAY("test_pay"), + + @SerializedName("truemoney") + TRUEMONEY("truemoney"), + + @SerializedName("twint") + TWINT("twint"), + + @SerializedName("upi") + UPI("upi"), + + @SerializedName("us_bank_account") + US_BANK_ACCOUNT("us_bank_account"), + + @SerializedName("us_cash_voucher") + US_CASH_VOUCHER("us_cash_voucher"), + + @SerializedName("vipps") + VIPPS("vipps"), + + @SerializedName("wechat_pay") + WECHAT_PAY("wechat_pay"), + + @SerializedName("wero") + WERO("wero"), + + @SerializedName("zip") + ZIP("zip"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AllowedPaymentMethodType(String value) { + this.value = value; + } + } + public enum ExcludedPaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("acss_debit") ACSS_DEBIT("acss_debit"), diff --git a/src/main/java/com/stripe/param/SetupIntentUpdateParams.java b/src/main/java/com/stripe/param/SetupIntentUpdateParams.java index 0cdf892fa4ca..c876bd41ab45 100644 --- a/src/main/java/com/stripe/param/SetupIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/SetupIntentUpdateParams.java @@ -14,6 +14,15 @@ @Getter @EqualsAndHashCode(callSuper = false) public class SetupIntentUpdateParams extends ApiRequestParams { + /** + * The list of payment method types to allow for this SetupIntent. Stripe will only use methods in + * this list when determining the payment methods to offer. A list of valid payment method types + * can be found here. + */ + @SerializedName("allowed_payment_method_types") + Object allowedPaymentMethodTypes; + /** * If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. * @@ -120,6 +129,7 @@ public class SetupIntentUpdateParams extends ApiRequestParams { List paymentMethodTypes; private SetupIntentUpdateParams( + Object allowedPaymentMethodTypes, Boolean attachToSelf, Object customer, Object customerAccount, @@ -134,6 +144,7 @@ private SetupIntentUpdateParams( PaymentMethodData paymentMethodData, PaymentMethodOptions paymentMethodOptions, List paymentMethodTypes) { + this.allowedPaymentMethodTypes = allowedPaymentMethodTypes; this.attachToSelf = attachToSelf; this.customer = customer; this.customerAccount = customerAccount; @@ -155,6 +166,8 @@ public static Builder builder() { } public static class Builder { + private Object allowedPaymentMethodTypes; + private Boolean attachToSelf; private Object customer; @@ -186,6 +199,7 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public SetupIntentUpdateParams build() { return new SetupIntentUpdateParams( + this.allowedPaymentMethodTypes, this.attachToSelf, this.customer, this.customerAccount, @@ -202,6 +216,65 @@ public SetupIntentUpdateParams build() { this.paymentMethodTypes); } + /** + * Add an element to `allowedPaymentMethodTypes` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link SetupIntentUpdateParams#allowedPaymentMethodTypes} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllowedPaymentMethodType( + SetupIntentUpdateParams.AllowedPaymentMethodType element) { + if (this.allowedPaymentMethodTypes == null + || this.allowedPaymentMethodTypes instanceof EmptyParam) { + this.allowedPaymentMethodTypes = + new ArrayList(); + } + ((List) this.allowedPaymentMethodTypes) + .add(element); + return this; + } + + /** + * Add all elements to `allowedPaymentMethodTypes` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link SetupIntentUpdateParams#allowedPaymentMethodTypes} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllAllowedPaymentMethodType( + List elements) { + if (this.allowedPaymentMethodTypes == null + || this.allowedPaymentMethodTypes instanceof EmptyParam) { + this.allowedPaymentMethodTypes = + new ArrayList(); + } + ((List) this.allowedPaymentMethodTypes) + .addAll(elements); + return this; + } + + /** + * The list of payment method types to allow for this SetupIntent. Stripe will only use methods + * in this list when determining the payment methods to offer. A list of valid payment method + * types can be found here. + */ + public Builder setAllowedPaymentMethodTypes(EmptyParam allowedPaymentMethodTypes) { + this.allowedPaymentMethodTypes = allowedPaymentMethodTypes; + return this; + } + + /** + * The list of payment method types to allow for this SetupIntent. Stripe will only use methods + * in this list when determining the payment methods to offer. A list of valid payment method + * types can be found here. + */ + public Builder setAllowedPaymentMethodTypes( + List allowedPaymentMethodTypes) { + this.allowedPaymentMethodTypes = allowedPaymentMethodTypes; + return this; + } + /** * If present, the SetupIntent's payment method will be attached to the in-context Stripe * Account. @@ -3626,12 +3699,18 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("bank_rakyat") BANK_RAKYAT("bank_rakyat"), + @SerializedName("bnp_paribas") + BNP_PARIBAS("bnp_paribas"), + @SerializedName("bsn") BSN("bsn"), @SerializedName("cimb") CIMB("cimb"), + @SerializedName("citibank") + CITIBANK("citibank"), + @SerializedName("deutsche_bank") DEUTSCHE_BANK("deutsche_bank"), @@ -3650,6 +3729,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("maybank2u") MAYBANK2U("maybank2u"), + @SerializedName("mbsb_bank") + MBSB_BANK("mbsb_bank"), + @SerializedName("ocbc") OCBC("ocbc"), @@ -12222,6 +12304,303 @@ public enum VerificationMethod implements ApiRequestParams.EnumParam { } } + public enum AllowedPaymentMethodType 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("bizum") + BIZUM("bizum"), + + @SerializedName("blik") + BLIK("blik"), + + @SerializedName("boku_promptpay") + BOKU_PROMPTPAY("boku_promptpay"), + + @SerializedName("boleto") + BOLETO("boleto"), + + @SerializedName("capchase_pay") + CAPCHASE_PAY("capchase_pay"), + + @SerializedName("card") + CARD("card"), + + @SerializedName("cashapp") + CASHAPP("cashapp"), + + @SerializedName("check_scan") + CHECK_SCAN("check_scan"), + + @SerializedName("click_to_pay") + CLICK_TO_PAY("click_to_pay"), + + @SerializedName("crypto") + CRYPTO("crypto"), + + @SerializedName("customer_balance") + CUSTOMER_BALANCE("customer_balance"), + + @SerializedName("demo_pay") + DEMO_PAY("demo_pay"), + + @SerializedName("duitnow") + DUITNOW("duitnow"), + + @SerializedName("dummy_auth_push") + DUMMY_AUTH_PUSH("dummy_auth_push"), + + @SerializedName("dummy_passthrough_card") + DUMMY_PASSTHROUGH_CARD("dummy_passthrough_card"), + + @SerializedName("edenred") + EDENRED("edenred"), + + @SerializedName("eps") + EPS("eps"), + + @SerializedName("fpx") + FPX("fpx"), + + @SerializedName("gcash") + GCASH("gcash"), + + @SerializedName("getbalance") + GETBALANCE("getbalance"), + + @SerializedName("gift_card") + GIFT_CARD("gift_card"), + + @SerializedName("giropay") + GIROPAY("giropay"), + + @SerializedName("gopay") + GOPAY("gopay"), + + @SerializedName("grabpay") + GRABPAY("grabpay"), + + @SerializedName("id_bank_transfer") + ID_BANK_TRANSFER("id_bank_transfer"), + + @SerializedName("ideal") + IDEAL("ideal"), + + @SerializedName("kakao_pay") + KAKAO_PAY("kakao_pay"), + + @SerializedName("klarna") + KLARNA("klarna"), + + @SerializedName("knet") + KNET("knet"), + + @SerializedName("konbini") + KONBINI("konbini"), + + @SerializedName("kr_card") + KR_CARD("kr_card"), + + @SerializedName("kr_market") + KR_MARKET("kr_market"), + + @SerializedName("kriya") + KRIYA("kriya"), + + @SerializedName("link") + LINK("link"), + + @SerializedName("mb_way") + MB_WAY("mb_way"), + + @SerializedName("mobilepay") + MOBILEPAY("mobilepay"), + + @SerializedName("momo") + MOMO("momo"), + + @SerializedName("mondu") + MONDU("mondu"), + + @SerializedName("multibanco") + MULTIBANCO("multibanco"), + + @SerializedName("naver_pay") + NAVER_PAY("naver_pay"), + + @SerializedName("netbanking") + NETBANKING("netbanking"), + + @SerializedName("ng_bank") + NG_BANK("ng_bank"), + + @SerializedName("ng_bank_transfer") + NG_BANK_TRANSFER("ng_bank_transfer"), + + @SerializedName("ng_card") + NG_CARD("ng_card"), + + @SerializedName("ng_market") + NG_MARKET("ng_market"), + + @SerializedName("ng_ussd") + NG_USSD("ng_ussd"), + + @SerializedName("ng_wallet") + NG_WALLET("ng_wallet"), + + @SerializedName("nz_bank_account") + NZ_BANK_ACCOUNT("nz_bank_account"), + + @SerializedName("octopus") + OCTOPUS("octopus"), + + @SerializedName("oxxo") + OXXO("oxxo"), + + @SerializedName("p24") + P24("p24"), + + @SerializedName("paper_check") + PAPER_CHECK("paper_check"), + + @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("payto") + PAYTO("payto"), + + @SerializedName("pix") + PIX("pix"), + + @SerializedName("promptpay") + PROMPTPAY("promptpay"), + + @SerializedName("qris") + QRIS("qris"), + + @SerializedName("rechnung") + RECHNUNG("rechnung"), + + @SerializedName("revolut_pay") + REVOLUT_PAY("revolut_pay"), + + @SerializedName("samsung_pay") + SAMSUNG_PAY("samsung_pay"), + + @SerializedName("satispay") + SATISPAY("satispay"), + + @SerializedName("scalapay") + SCALAPAY("scalapay"), + + @SerializedName("sepa_debit") + SEPA_DEBIT("sepa_debit"), + + @SerializedName("sequra") + SEQURA("sequra"), + + @SerializedName("shop_pay") + SHOP_PAY("shop_pay"), + + @SerializedName("shopeepay") + SHOPEEPAY("shopeepay"), + + @SerializedName("sofort") + SOFORT("sofort"), + + @SerializedName("south_korea_market") + SOUTH_KOREA_MARKET("south_korea_market"), + + @SerializedName("stripe_balance") + STRIPE_BALANCE("stripe_balance"), + + @SerializedName("sunbit") + SUNBIT("sunbit"), + + @SerializedName("swish") + SWISH("swish"), + + @SerializedName("tamara") + TAMARA("tamara"), + + @SerializedName("test_pay") + TEST_PAY("test_pay"), + + @SerializedName("truemoney") + TRUEMONEY("truemoney"), + + @SerializedName("twint") + TWINT("twint"), + + @SerializedName("upi") + UPI("upi"), + + @SerializedName("us_bank_account") + US_BANK_ACCOUNT("us_bank_account"), + + @SerializedName("us_cash_voucher") + US_CASH_VOUCHER("us_cash_voucher"), + + @SerializedName("vipps") + VIPPS("vipps"), + + @SerializedName("wechat_pay") + WECHAT_PAY("wechat_pay"), + + @SerializedName("wero") + WERO("wero"), + + @SerializedName("zip") + ZIP("zip"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AllowedPaymentMethodType(String value) { + this.value = value; + } + } + public enum ExcludedPaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("acss_debit") ACSS_DEBIT("acss_debit"), diff --git a/src/main/java/com/stripe/param/SubscriptionCreateParams.java b/src/main/java/com/stripe/param/SubscriptionCreateParams.java index 7cd4229a9b8b..18cd2eff8be5 100644 --- a/src/main/java/com/stripe/param/SubscriptionCreateParams.java +++ b/src/main/java/com/stripe/param/SubscriptionCreateParams.java @@ -7286,6 +7286,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("affirm") AFFIRM("affirm"), + @SerializedName("alipay") + ALIPAY("alipay"), + @SerializedName("amazon_pay") AMAZON_PAY("amazon_pay"), @@ -7349,6 +7352,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("link") LINK("link"), + @SerializedName("mb_way") + MB_WAY("mb_way"), + @SerializedName("multibanco") MULTIBANCO("multibanco"), diff --git a/src/main/java/com/stripe/param/SubscriptionScheduleCreateParams.java b/src/main/java/com/stripe/param/SubscriptionScheduleCreateParams.java index 014ad2130556..e34c19e06d8f 100644 --- a/src/main/java/com/stripe/param/SubscriptionScheduleCreateParams.java +++ b/src/main/java/com/stripe/param/SubscriptionScheduleCreateParams.java @@ -82,8 +82,10 @@ public class SubscriptionScheduleCreateParams extends ApiRequestParams { /** * When the subscription schedule starts. We recommend using {@code now} so that it starts the - * subscription immediately. You can also use a Unix timestamp to backdate the subscription so - * that it starts on a past date, or set a future date for the subscription to start on. + * subscription immediately, and to avoid unexpected behavior due to request delays or clock skew + * resulting in a slightly backdated or postdated start. You can also use a Unix timestamp to + * backdate the subscription so that it starts on a past date, or set a future date for the + * subscription to start on. */ @SerializedName("start_date") Object startDate; @@ -334,8 +336,10 @@ public Builder addAllPhase(List elements /** * When the subscription schedule starts. We recommend using {@code now} so that it starts the - * subscription immediately. You can also use a Unix timestamp to backdate the subscription so - * that it starts on a past date, or set a future date for the subscription to start on. + * subscription immediately, and to avoid unexpected behavior due to request delays or clock + * skew resulting in a slightly backdated or postdated start. You can also use a Unix timestamp + * to backdate the subscription so that it starts on a past date, or set a future date for the + * subscription to start on. */ public Builder setStartDate(Long startDate) { this.startDate = startDate; @@ -344,8 +348,10 @@ public Builder setStartDate(Long startDate) { /** * When the subscription schedule starts. We recommend using {@code now} so that it starts the - * subscription immediately. You can also use a Unix timestamp to backdate the subscription so - * that it starts on a past date, or set a future date for the subscription to start on. + * subscription immediately, and to avoid unexpected behavior due to request delays or clock + * skew resulting in a slightly backdated or postdated start. You can also use a Unix timestamp + * to backdate the subscription so that it starts on a past date, or set a future date for the + * subscription to start on. */ public Builder setStartDate(SubscriptionScheduleCreateParams.StartDate startDate) { this.startDate = startDate; @@ -1181,6 +1187,9 @@ public static class InvoiceSettings { @SerializedName("account_tax_ids") Object accountTaxIds; + @SerializedName("custom_fields") + Object customFields; + /** * Number of days within which a customer must pay invoices generated by this subscription * schedule. This value will be {@code null} for subscription schedules where {@code @@ -1189,6 +1198,9 @@ public static class InvoiceSettings { @SerializedName("days_until_due") Long daysUntilDue; + @SerializedName("description") + Object description; + /** * 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. @@ -1198,6 +1210,9 @@ public static class InvoiceSettings { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + @SerializedName("footer") + Object footer; + /** * The connected account that issues the invoice. The invoice is presented with the branding * and support information of the specified account. @@ -1206,10 +1221,19 @@ public static class InvoiceSettings { Issuer issuer; private InvoiceSettings( - Object accountTaxIds, Long daysUntilDue, Map extraParams, Issuer issuer) { + Object accountTaxIds, + Object customFields, + Long daysUntilDue, + Object description, + Map extraParams, + Object footer, + Issuer issuer) { this.accountTaxIds = accountTaxIds; + this.customFields = customFields; this.daysUntilDue = daysUntilDue; + this.description = description; this.extraParams = extraParams; + this.footer = footer; this.issuer = issuer; } @@ -1220,16 +1244,28 @@ public static Builder builder() { public static class Builder { private Object accountTaxIds; + private Object customFields; + private Long daysUntilDue; + private Object description; + private Map extraParams; + private Object footer; + private Issuer issuer; /** Finalize and obtain parameter instance from this builder. */ public SubscriptionScheduleCreateParams.DefaultSettings.InvoiceSettings build() { return new SubscriptionScheduleCreateParams.DefaultSettings.InvoiceSettings( - this.accountTaxIds, this.daysUntilDue, this.extraParams, this.issuer); + this.accountTaxIds, + this.customFields, + this.daysUntilDue, + this.description, + this.extraParams, + this.footer, + this.issuer); } /** @@ -1281,6 +1317,59 @@ public Builder setAccountTaxIds(List accountTaxIds) { return this; } + /** + * Add an element to `customFields` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * SubscriptionScheduleCreateParams.DefaultSettings.InvoiceSettings#customFields} for the + * field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addCustomField( + SubscriptionScheduleCreateParams.DefaultSettings.InvoiceSettings.CustomField element) { + if (this.customFields == null || this.customFields instanceof EmptyParam) { + this.customFields = + new ArrayList< + SubscriptionScheduleCreateParams.DefaultSettings.InvoiceSettings.CustomField>(); + } + ((List) + this.customFields) + .add(element); + return this; + } + + /** + * Add all elements to `customFields` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * SubscriptionScheduleCreateParams.DefaultSettings.InvoiceSettings#customFields} for the + * field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllCustomField( + List + elements) { + if (this.customFields == null || this.customFields instanceof EmptyParam) { + this.customFields = + new ArrayList< + SubscriptionScheduleCreateParams.DefaultSettings.InvoiceSettings.CustomField>(); + } + ((List) + this.customFields) + .addAll(elements); + return this; + } + + public Builder setCustomFields(EmptyParam customFields) { + this.customFields = customFields; + return this; + } + + public Builder setCustomFields( + List + customFields) { + this.customFields = customFields; + return this; + } + /** * Number of days within which a customer must pay invoices generated by this subscription * schedule. This value will be {@code null} for subscription schedules where {@code @@ -1291,6 +1380,16 @@ public Builder setDaysUntilDue(Long daysUntilDue) { return this; } + public Builder setDescription(String description) { + this.description = description; + return this; + } + + public Builder setDescription(EmptyParam description) { + this.description = description; + 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 @@ -1321,6 +1420,16 @@ public Builder putAllExtraParam(Map map) { return this; } + public Builder setFooter(String footer) { + this.footer = footer; + return this; + } + + public Builder setFooter(EmptyParam footer) { + this.footer = footer; + return this; + } + /** * The connected account that issues the invoice. The invoice is presented with the branding * and support information of the specified account. @@ -1332,6 +1441,106 @@ public Builder setIssuer( } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CustomField { + /** + * 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 name of the custom field. This may be up to 40 characters. + */ + @SerializedName("name") + String name; + + /** + * Required. The value of the custom field. This may be up to 140 + * characters. + */ + @SerializedName("value") + String value; + + private CustomField(Map extraParams, String name, String value) { + this.extraParams = extraParams; + this.name = name; + this.value = value; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String name; + + private String value; + + /** Finalize and obtain parameter instance from this builder. */ + public SubscriptionScheduleCreateParams.DefaultSettings.InvoiceSettings.CustomField + build() { + return new SubscriptionScheduleCreateParams.DefaultSettings.InvoiceSettings.CustomField( + this.extraParams, this.name, this.value); + } + + /** + * 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.DefaultSettings.InvoiceSettings.CustomField#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.DefaultSettings.InvoiceSettings.CustomField#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 name of the custom field. This may be up to 40 + * characters. + */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** + * Required. The value of the custom field. This may be up to 140 + * characters. + */ + public Builder setValue(String value) { + this.value = value; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Issuer { @@ -3705,14 +3914,22 @@ public static class InvoiceSettings { @SerializedName("account_tax_ids") Object accountTaxIds; + /** A list of up to 4 custom fields to be displayed on the invoice. */ + @SerializedName("custom_fields") + Object customFields; + /** * Number of days within which a customer must pay invoices generated by this subscription * schedule. This value will be {@code null} for subscription schedules where {@code - * billing=charge_automatically}. + * collection_method=charge_automatically}. */ @SerializedName("days_until_due") Long daysUntilDue; + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + @SerializedName("description") + Object description; + /** * 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. @@ -3722,6 +3939,10 @@ public static class InvoiceSettings { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Footer to be displayed on the invoice. */ + @SerializedName("footer") + Object footer; + /** * The connected account that issues the invoice. The invoice is presented with the branding * and support information of the specified account. @@ -3730,10 +3951,19 @@ public static class InvoiceSettings { Issuer issuer; private InvoiceSettings( - Object accountTaxIds, Long daysUntilDue, Map extraParams, Issuer issuer) { + Object accountTaxIds, + Object customFields, + Long daysUntilDue, + Object description, + Map extraParams, + Object footer, + Issuer issuer) { this.accountTaxIds = accountTaxIds; + this.customFields = customFields; this.daysUntilDue = daysUntilDue; + this.description = description; this.extraParams = extraParams; + this.footer = footer; this.issuer = issuer; } @@ -3744,16 +3974,28 @@ public static Builder builder() { public static class Builder { private Object accountTaxIds; + private Object customFields; + private Long daysUntilDue; + private Object description; + private Map extraParams; + private Object footer; + private Issuer issuer; /** Finalize and obtain parameter instance from this builder. */ public SubscriptionScheduleCreateParams.Phase.InvoiceSettings build() { return new SubscriptionScheduleCreateParams.Phase.InvoiceSettings( - this.accountTaxIds, this.daysUntilDue, this.extraParams, this.issuer); + this.accountTaxIds, + this.customFields, + this.daysUntilDue, + this.description, + this.extraParams, + this.footer, + this.issuer); } /** @@ -3804,16 +4046,79 @@ public Builder setAccountTaxIds(List accountTaxIds) { return this; } + /** + * Add an element to `customFields` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * SubscriptionScheduleCreateParams.Phase.InvoiceSettings#customFields} for the field + * documentation. + */ + @SuppressWarnings("unchecked") + public Builder addCustomField( + SubscriptionScheduleCreateParams.Phase.InvoiceSettings.CustomField element) { + if (this.customFields == null || this.customFields instanceof EmptyParam) { + this.customFields = + new ArrayList(); + } + ((List) + this.customFields) + .add(element); + return this; + } + + /** + * Add all elements to `customFields` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * SubscriptionScheduleCreateParams.Phase.InvoiceSettings#customFields} for the field + * documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllCustomField( + List elements) { + if (this.customFields == null || this.customFields instanceof EmptyParam) { + this.customFields = + new ArrayList(); + } + ((List) + this.customFields) + .addAll(elements); + return this; + } + + /** A list of up to 4 custom fields to be displayed on the invoice. */ + public Builder setCustomFields(EmptyParam customFields) { + this.customFields = customFields; + return this; + } + + /** A list of up to 4 custom fields to be displayed on the invoice. */ + public Builder setCustomFields( + List customFields) { + this.customFields = customFields; + return this; + } + /** * Number of days within which a customer must pay invoices generated by this subscription * schedule. This value will be {@code null} for subscription schedules where {@code - * billing=charge_automatically}. + * collection_method=charge_automatically}. */ public Builder setDaysUntilDue(Long daysUntilDue) { this.daysUntilDue = daysUntilDue; return this; } + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + public Builder setDescription(String description) { + this.description = description; + return this; + } + + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + public Builder setDescription(EmptyParam description) { + this.description = description; + 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 @@ -3842,6 +4147,18 @@ public Builder putAllExtraParam(Map map) { return this; } + /** Footer to be displayed on the invoice. */ + public Builder setFooter(String footer) { + this.footer = footer; + return this; + } + + /** Footer to be displayed on the invoice. */ + public Builder setFooter(EmptyParam footer) { + this.footer = footer; + return this; + } + /** * The connected account that issues the invoice. The invoice is presented with the branding * and support information of the specified account. @@ -3853,6 +4170,105 @@ public Builder setIssuer( } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CustomField { + /** + * 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 name of the custom field. This may be up to 40 characters. + */ + @SerializedName("name") + String name; + + /** + * Required. The value of the custom field. This may be up to 140 + * characters. + */ + @SerializedName("value") + String value; + + private CustomField(Map extraParams, String name, String value) { + this.extraParams = extraParams; + this.name = name; + this.value = value; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String name; + + private String value; + + /** Finalize and obtain parameter instance from this builder. */ + public SubscriptionScheduleCreateParams.Phase.InvoiceSettings.CustomField build() { + return new SubscriptionScheduleCreateParams.Phase.InvoiceSettings.CustomField( + this.extraParams, this.name, this.value); + } + + /** + * 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.Phase.InvoiceSettings.CustomField#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.Phase.InvoiceSettings.CustomField#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 name of the custom field. This may be up to 40 + * characters. + */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** + * Required. The value of the custom field. This may be up to 140 + * characters. + */ + public Builder setValue(String value) { + this.value = value; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Issuer { diff --git a/src/main/java/com/stripe/param/SubscriptionScheduleListParams.java b/src/main/java/com/stripe/param/SubscriptionScheduleListParams.java index 0bf4525e628e..a6a420ed9dd4 100644 --- a/src/main/java/com/stripe/param/SubscriptionScheduleListParams.java +++ b/src/main/java/com/stripe/param/SubscriptionScheduleListParams.java @@ -25,7 +25,10 @@ public class SubscriptionScheduleListParams extends ApiRequestParams { @SerializedName("created") Object created; - /** Only return subscription schedules for the given customer. */ + /** + * Only return subscription schedules for the given customer. The response will not include + * subscription schedules for customers with a test clock attached if this parameter is not set. + */ @SerializedName("customer") String customer; @@ -188,7 +191,10 @@ public Builder setCreated(Long created) { return this; } - /** Only return subscription schedules for the given customer. */ + /** + * Only return subscription schedules for the given customer. The response will not include + * subscription schedules for customers with a test clock attached if this parameter is not set. + */ public Builder setCustomer(String customer) { this.customer = customer; return this; diff --git a/src/main/java/com/stripe/param/SubscriptionScheduleUpdateParams.java b/src/main/java/com/stripe/param/SubscriptionScheduleUpdateParams.java index 497229743739..b99400642408 100644 --- a/src/main/java/com/stripe/param/SubscriptionScheduleUpdateParams.java +++ b/src/main/java/com/stripe/param/SubscriptionScheduleUpdateParams.java @@ -921,6 +921,9 @@ public static class InvoiceSettings { @SerializedName("account_tax_ids") Object accountTaxIds; + @SerializedName("custom_fields") + Object customFields; + /** * Number of days within which a customer must pay invoices generated by this subscription * schedule. This value will be {@code null} for subscription schedules where {@code @@ -929,6 +932,9 @@ public static class InvoiceSettings { @SerializedName("days_until_due") Long daysUntilDue; + @SerializedName("description") + Object description; + /** * 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. @@ -938,6 +944,9 @@ public static class InvoiceSettings { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + @SerializedName("footer") + Object footer; + /** * The connected account that issues the invoice. The invoice is presented with the branding * and support information of the specified account. @@ -946,10 +955,19 @@ public static class InvoiceSettings { Issuer issuer; private InvoiceSettings( - Object accountTaxIds, Long daysUntilDue, Map extraParams, Issuer issuer) { + Object accountTaxIds, + Object customFields, + Long daysUntilDue, + Object description, + Map extraParams, + Object footer, + Issuer issuer) { this.accountTaxIds = accountTaxIds; + this.customFields = customFields; this.daysUntilDue = daysUntilDue; + this.description = description; this.extraParams = extraParams; + this.footer = footer; this.issuer = issuer; } @@ -960,16 +978,28 @@ public static Builder builder() { public static class Builder { private Object accountTaxIds; + private Object customFields; + private Long daysUntilDue; + private Object description; + private Map extraParams; + private Object footer; + private Issuer issuer; /** Finalize and obtain parameter instance from this builder. */ public SubscriptionScheduleUpdateParams.DefaultSettings.InvoiceSettings build() { return new SubscriptionScheduleUpdateParams.DefaultSettings.InvoiceSettings( - this.accountTaxIds, this.daysUntilDue, this.extraParams, this.issuer); + this.accountTaxIds, + this.customFields, + this.daysUntilDue, + this.description, + this.extraParams, + this.footer, + this.issuer); } /** @@ -1021,6 +1051,59 @@ public Builder setAccountTaxIds(List accountTaxIds) { return this; } + /** + * Add an element to `customFields` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * SubscriptionScheduleUpdateParams.DefaultSettings.InvoiceSettings#customFields} for the + * field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addCustomField( + SubscriptionScheduleUpdateParams.DefaultSettings.InvoiceSettings.CustomField element) { + if (this.customFields == null || this.customFields instanceof EmptyParam) { + this.customFields = + new ArrayList< + SubscriptionScheduleUpdateParams.DefaultSettings.InvoiceSettings.CustomField>(); + } + ((List) + this.customFields) + .add(element); + return this; + } + + /** + * Add all elements to `customFields` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * SubscriptionScheduleUpdateParams.DefaultSettings.InvoiceSettings#customFields} for the + * field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllCustomField( + List + elements) { + if (this.customFields == null || this.customFields instanceof EmptyParam) { + this.customFields = + new ArrayList< + SubscriptionScheduleUpdateParams.DefaultSettings.InvoiceSettings.CustomField>(); + } + ((List) + this.customFields) + .addAll(elements); + return this; + } + + public Builder setCustomFields(EmptyParam customFields) { + this.customFields = customFields; + return this; + } + + public Builder setCustomFields( + List + customFields) { + this.customFields = customFields; + return this; + } + /** * Number of days within which a customer must pay invoices generated by this subscription * schedule. This value will be {@code null} for subscription schedules where {@code @@ -1031,6 +1114,16 @@ public Builder setDaysUntilDue(Long daysUntilDue) { return this; } + public Builder setDescription(String description) { + this.description = description; + return this; + } + + public Builder setDescription(EmptyParam description) { + this.description = description; + 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 @@ -1061,6 +1154,16 @@ public Builder putAllExtraParam(Map map) { return this; } + public Builder setFooter(String footer) { + this.footer = footer; + return this; + } + + public Builder setFooter(EmptyParam footer) { + this.footer = footer; + return this; + } + /** * The connected account that issues the invoice. The invoice is presented with the branding * and support information of the specified account. @@ -1072,6 +1175,124 @@ public Builder setIssuer( } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CustomField { + /** + * 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 name of the custom field. This may be up to 40 characters. + */ + @SerializedName("name") + Object name; + + /** + * Required. The value of the custom field. This may be up to 140 + * characters. + */ + @SerializedName("value") + Object value; + + private CustomField(Map extraParams, Object name, Object value) { + this.extraParams = extraParams; + this.name = name; + this.value = value; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object name; + + private Object value; + + /** Finalize and obtain parameter instance from this builder. */ + public SubscriptionScheduleUpdateParams.DefaultSettings.InvoiceSettings.CustomField + build() { + return new SubscriptionScheduleUpdateParams.DefaultSettings.InvoiceSettings.CustomField( + this.extraParams, this.name, this.value); + } + + /** + * 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 + * SubscriptionScheduleUpdateParams.DefaultSettings.InvoiceSettings.CustomField#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 + * SubscriptionScheduleUpdateParams.DefaultSettings.InvoiceSettings.CustomField#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 name of the custom field. This may be up to 40 + * characters. + */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** + * Required. The name of the custom field. This may be up to 40 + * characters. + */ + public Builder setName(EmptyParam name) { + this.name = name; + return this; + } + + /** + * Required. The value of the custom field. This may be up to 140 + * characters. + */ + public Builder setValue(String value) { + this.value = value; + return this; + } + + /** + * Required. The value of the custom field. This may be up to 140 + * characters. + */ + public Builder setValue(EmptyParam value) { + this.value = value; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Issuer { @@ -1473,7 +1694,9 @@ public static class Phase { /** * The date at which this phase of the subscription schedule starts or {@code now}. Must be set - * on the first phase. + * on the first phase. Prefer to specify {@code now} over an explicit timestamp when appropriate + * to avoid unexpected behavior due to request delays or clock skew resulting in the phase being + * slightly backdated or postdated. */ @SerializedName("start_date") Object startDate; @@ -1493,8 +1716,8 @@ public static class Phase { Boolean trial; /** - * Sets the phase to trialing from the start date to this date. Must be before the phase end - * date, can not be combined with {@code trial} + * Sets the phase to trialing from the start date to this date. Must be within the phase. When + * combined with {@code trial=true}, it must match the phase end date. */ @SerializedName("trial_end") Object trialEnd; @@ -2028,7 +2251,9 @@ public Builder setProrationBehavior( /** * The date at which this phase of the subscription schedule starts or {@code now}. Must be - * set on the first phase. + * set on the first phase. Prefer to specify {@code now} over an explicit timestamp when + * appropriate to avoid unexpected behavior due to request delays or clock skew resulting in + * the phase being slightly backdated or postdated. */ public Builder setStartDate(Long startDate) { this.startDate = startDate; @@ -2037,7 +2262,9 @@ public Builder setStartDate(Long startDate) { /** * The date at which this phase of the subscription schedule starts or {@code now}. Must be - * set on the first phase. + * set on the first phase. Prefer to specify {@code now} over an explicit timestamp when + * appropriate to avoid unexpected behavior due to request delays or clock skew resulting in + * the phase being slightly backdated or postdated. */ public Builder setStartDate(SubscriptionScheduleUpdateParams.Phase.StartDate startDate) { this.startDate = startDate; @@ -2064,8 +2291,8 @@ public Builder setTrial(Boolean trial) { } /** - * Sets the phase to trialing from the start date to this date. Must be before the phase end - * date, can not be combined with {@code trial} + * Sets the phase to trialing from the start date to this date. Must be within the phase. When + * combined with {@code trial=true}, it must match the phase end date. */ public Builder setTrialEnd(Long trialEnd) { this.trialEnd = trialEnd; @@ -2073,8 +2300,8 @@ public Builder setTrialEnd(Long trialEnd) { } /** - * Sets the phase to trialing from the start date to this date. Must be before the phase end - * date, can not be combined with {@code trial} + * Sets the phase to trialing from the start date to this date. Must be within the phase. When + * combined with {@code trial=true}, it must match the phase end date. */ public Builder setTrialEnd(SubscriptionScheduleUpdateParams.Phase.TrialEnd trialEnd) { this.trialEnd = trialEnd; @@ -3613,14 +3840,22 @@ public static class InvoiceSettings { @SerializedName("account_tax_ids") Object accountTaxIds; + /** A list of up to 4 custom fields to be displayed on the invoice. */ + @SerializedName("custom_fields") + Object customFields; + /** * Number of days within which a customer must pay invoices generated by this subscription * schedule. This value will be {@code null} for subscription schedules where {@code - * billing=charge_automatically}. + * collection_method=charge_automatically}. */ @SerializedName("days_until_due") Long daysUntilDue; + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + @SerializedName("description") + Object description; + /** * 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. @@ -3630,6 +3865,10 @@ public static class InvoiceSettings { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Footer to be displayed on the invoice. */ + @SerializedName("footer") + Object footer; + /** * The connected account that issues the invoice. The invoice is presented with the branding * and support information of the specified account. @@ -3638,10 +3877,19 @@ public static class InvoiceSettings { Issuer issuer; private InvoiceSettings( - Object accountTaxIds, Long daysUntilDue, Map extraParams, Issuer issuer) { + Object accountTaxIds, + Object customFields, + Long daysUntilDue, + Object description, + Map extraParams, + Object footer, + Issuer issuer) { this.accountTaxIds = accountTaxIds; + this.customFields = customFields; this.daysUntilDue = daysUntilDue; + this.description = description; this.extraParams = extraParams; + this.footer = footer; this.issuer = issuer; } @@ -3652,16 +3900,28 @@ public static Builder builder() { public static class Builder { private Object accountTaxIds; + private Object customFields; + private Long daysUntilDue; + private Object description; + private Map extraParams; + private Object footer; + private Issuer issuer; /** Finalize and obtain parameter instance from this builder. */ public SubscriptionScheduleUpdateParams.Phase.InvoiceSettings build() { return new SubscriptionScheduleUpdateParams.Phase.InvoiceSettings( - this.accountTaxIds, this.daysUntilDue, this.extraParams, this.issuer); + this.accountTaxIds, + this.customFields, + this.daysUntilDue, + this.description, + this.extraParams, + this.footer, + this.issuer); } /** @@ -3712,16 +3972,79 @@ public Builder setAccountTaxIds(List accountTaxIds) { return this; } + /** + * Add an element to `customFields` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * SubscriptionScheduleUpdateParams.Phase.InvoiceSettings#customFields} for the field + * documentation. + */ + @SuppressWarnings("unchecked") + public Builder addCustomField( + SubscriptionScheduleUpdateParams.Phase.InvoiceSettings.CustomField element) { + if (this.customFields == null || this.customFields instanceof EmptyParam) { + this.customFields = + new ArrayList(); + } + ((List) + this.customFields) + .add(element); + return this; + } + + /** + * Add all elements to `customFields` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * SubscriptionScheduleUpdateParams.Phase.InvoiceSettings#customFields} for the field + * documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllCustomField( + List elements) { + if (this.customFields == null || this.customFields instanceof EmptyParam) { + this.customFields = + new ArrayList(); + } + ((List) + this.customFields) + .addAll(elements); + return this; + } + + /** A list of up to 4 custom fields to be displayed on the invoice. */ + public Builder setCustomFields(EmptyParam customFields) { + this.customFields = customFields; + return this; + } + + /** A list of up to 4 custom fields to be displayed on the invoice. */ + public Builder setCustomFields( + List customFields) { + this.customFields = customFields; + return this; + } + /** * Number of days within which a customer must pay invoices generated by this subscription * schedule. This value will be {@code null} for subscription schedules where {@code - * billing=charge_automatically}. + * collection_method=charge_automatically}. */ public Builder setDaysUntilDue(Long daysUntilDue) { this.daysUntilDue = daysUntilDue; return this; } + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + public Builder setDescription(String description) { + this.description = description; + return this; + } + + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + public Builder setDescription(EmptyParam description) { + this.description = description; + 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 @@ -3750,6 +4073,18 @@ public Builder putAllExtraParam(Map map) { return this; } + /** Footer to be displayed on the invoice. */ + public Builder setFooter(String footer) { + this.footer = footer; + return this; + } + + /** Footer to be displayed on the invoice. */ + public Builder setFooter(EmptyParam footer) { + this.footer = footer; + return this; + } + /** * The connected account that issues the invoice. The invoice is presented with the branding * and support information of the specified account. @@ -3761,6 +4096,123 @@ public Builder setIssuer( } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CustomField { + /** + * 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 name of the custom field. This may be up to 40 characters. + */ + @SerializedName("name") + Object name; + + /** + * Required. The value of the custom field. This may be up to 140 + * characters. + */ + @SerializedName("value") + Object value; + + private CustomField(Map extraParams, Object name, Object value) { + this.extraParams = extraParams; + this.name = name; + this.value = value; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object name; + + private Object value; + + /** Finalize and obtain parameter instance from this builder. */ + public SubscriptionScheduleUpdateParams.Phase.InvoiceSettings.CustomField build() { + return new SubscriptionScheduleUpdateParams.Phase.InvoiceSettings.CustomField( + this.extraParams, this.name, this.value); + } + + /** + * 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 + * SubscriptionScheduleUpdateParams.Phase.InvoiceSettings.CustomField#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 + * SubscriptionScheduleUpdateParams.Phase.InvoiceSettings.CustomField#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 name of the custom field. This may be up to 40 + * characters. + */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** + * Required. The name of the custom field. This may be up to 40 + * characters. + */ + public Builder setName(EmptyParam name) { + this.name = name; + return this; + } + + /** + * Required. The value of the custom field. This may be up to 140 + * characters. + */ + public Builder setValue(String value) { + this.value = value; + return this; + } + + /** + * Required. The value of the custom field. This may be up to 140 + * characters. + */ + public Builder setValue(EmptyParam value) { + this.value = value; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Issuer { diff --git a/src/main/java/com/stripe/param/SubscriptionUpdateParams.java b/src/main/java/com/stripe/param/SubscriptionUpdateParams.java index db96eded9e45..8235d73d479b 100644 --- a/src/main/java/com/stripe/param/SubscriptionUpdateParams.java +++ b/src/main/java/com/stripe/param/SubscriptionUpdateParams.java @@ -71,7 +71,7 @@ public class SubscriptionUpdateParams extends ApiRequestParams { /** * Indicate whether this subscription should cancel at the end of the current period ({@code - * current_period_end}). Defaults to {@code false}. + * current_period_end}). */ @SerializedName("cancel_at_period_end") Boolean cancelAtPeriodEnd; @@ -612,7 +612,7 @@ public Builder setCancelAt(EmptyParam cancelAt) { /** * Indicate whether this subscription should cancel at the end of the current period ({@code - * current_period_end}). Defaults to {@code false}. + * current_period_end}). */ public Builder setCancelAtPeriodEnd(Boolean cancelAtPeriodEnd) { this.cancelAtPeriodEnd = cancelAtPeriodEnd; @@ -7590,6 +7590,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("affirm") AFFIRM("affirm"), + @SerializedName("alipay") + ALIPAY("alipay"), + @SerializedName("amazon_pay") AMAZON_PAY("amazon_pay"), @@ -7653,6 +7656,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("link") LINK("link"), + @SerializedName("mb_way") + MB_WAY("mb_way"), + @SerializedName("multibanco") MULTIBANCO("multibanco"), diff --git a/src/main/java/com/stripe/param/TaxIdCollectionCreateParams.java b/src/main/java/com/stripe/param/TaxIdCollectionCreateParams.java index fa900046df73..0501f843cccd 100644 --- a/src/main/java/com/stripe/param/TaxIdCollectionCreateParams.java +++ b/src/main/java/com/stripe/param/TaxIdCollectionCreateParams.java @@ -36,18 +36,18 @@ public class TaxIdCollectionCreateParams extends ApiRequestParams { * ch_vat}, {@code cl_tin}, {@code cm_niu}, {@code cn_tin}, {@code co_nit}, {@code cr_tin}, {@code * cv_nif}, {@code de_stn}, {@code do_rcn}, {@code ec_ruc}, {@code eg_tin}, {@code es_cif}, {@code * et_tin}, {@code eu_oss_vat}, {@code eu_vat}, {@code fo_vat}, {@code gb_vat}, {@code ge_vat}, - * {@code gi_tin}, {@code gn_nif}, {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code id_npwp}, - * {@code il_vat}, {@code in_gst}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, - * {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, - * {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_vat}, {@code ma_vat}, {@code md_vat}, - * {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, {@code my_frp}, {@code my_itn}, - * {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, {@code np_pan}, {@code - * nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code pl_nip}, {@code py_ruc}, {@code - * ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code - * sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code th_vat}, - * {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, {@code ug_tin}, - * {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code ve_rif}, {@code vn_tin}, - * {@code za_vat}, {@code zm_tin}, or {@code zw_tin} + * {@code gi_tin}, {@code gn_nif}, {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code ic_nif}, + * {@code id_npwp}, {@code il_vat}, {@code in_gst}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, + * {@code jp_rn}, {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, + * {@code kz_bin}, {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_vat}, {@code ma_vat}, + * {@code md_vat}, {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, {@code my_frp}, + * {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, {@code + * np_pan}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code pl_nip}, {@code + * py_ruc}, {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code + * sg_gst}, {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, + * {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, + * {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code ve_rif}, + * {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} */ @SerializedName("type") Type type; @@ -145,18 +145,18 @@ public Builder putAllExtraParam(Map map) { * {@code cr_tin}, {@code cv_nif}, {@code de_stn}, {@code do_rcn}, {@code ec_ruc}, {@code * eg_tin}, {@code es_cif}, {@code et_tin}, {@code eu_oss_vat}, {@code eu_vat}, {@code fo_vat}, * {@code gb_vat}, {@code ge_vat}, {@code gi_tin}, {@code gn_nif}, {@code hk_br}, {@code - * hr_oib}, {@code hu_tin}, {@code id_npwp}, {@code il_vat}, {@code in_gst}, {@code is_vat}, - * {@code it_cf}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, - * {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, {@code la_tin}, {@code li_uid}, {@code - * li_vat}, {@code lk_vat}, {@code ma_vat}, {@code md_vat}, {@code me_pib}, {@code mk_vat}, - * {@code mr_nif}, {@code mx_rfc}, {@code my_frp}, {@code my_itn}, {@code my_sst}, {@code - * ng_tin}, {@code no_vat}, {@code no_voec}, {@code np_pan}, {@code nz_gst}, {@code om_vat}, - * {@code pe_ruc}, {@code ph_tin}, {@code pl_nip}, {@code py_ruc}, {@code ro_tin}, {@code - * rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code sg_uen}, - * {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code th_vat}, {@code - * tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, {@code ug_tin}, - * {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code ve_rif}, {@code - * vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} + * hr_oib}, {@code hu_tin}, {@code ic_nif}, {@code id_npwp}, {@code il_vat}, {@code in_gst}, + * {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code ke_pin}, + * {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, {@code la_tin}, {@code + * li_uid}, {@code li_vat}, {@code lk_vat}, {@code ma_vat}, {@code md_vat}, {@code me_pib}, + * {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, {@code my_frp}, {@code my_itn}, {@code + * my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, {@code np_pan}, {@code nz_gst}, + * {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code pl_nip}, {@code py_ruc}, {@code + * ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, + * {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code + * th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, + * {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code + * ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} */ public Builder setType(TaxIdCollectionCreateParams.Type type) { this.type = type; @@ -330,6 +330,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("hu_tin") HU_TIN("hu_tin"), + @SerializedName("ic_nif") + IC_NIF("ic_nif"), + @SerializedName("id_npwp") ID_NPWP("id_npwp"), diff --git a/src/main/java/com/stripe/param/TaxIdCreateParams.java b/src/main/java/com/stripe/param/TaxIdCreateParams.java index e6d2b3bbf58c..0e0d94f95009 100644 --- a/src/main/java/com/stripe/param/TaxIdCreateParams.java +++ b/src/main/java/com/stripe/param/TaxIdCreateParams.java @@ -40,18 +40,18 @@ public class TaxIdCreateParams extends ApiRequestParams { * ch_vat}, {@code cl_tin}, {@code cm_niu}, {@code cn_tin}, {@code co_nit}, {@code cr_tin}, {@code * cv_nif}, {@code de_stn}, {@code do_rcn}, {@code ec_ruc}, {@code eg_tin}, {@code es_cif}, {@code * et_tin}, {@code eu_oss_vat}, {@code eu_vat}, {@code fo_vat}, {@code gb_vat}, {@code ge_vat}, - * {@code gi_tin}, {@code gn_nif}, {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code id_npwp}, - * {@code il_vat}, {@code in_gst}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, - * {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, - * {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_vat}, {@code ma_vat}, {@code md_vat}, - * {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, {@code my_frp}, {@code my_itn}, - * {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, {@code np_pan}, {@code - * nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code pl_nip}, {@code py_ruc}, {@code - * ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code - * sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code th_vat}, - * {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, {@code ug_tin}, - * {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code ve_rif}, {@code vn_tin}, - * {@code za_vat}, {@code zm_tin}, or {@code zw_tin} + * {@code gi_tin}, {@code gn_nif}, {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code ic_nif}, + * {@code id_npwp}, {@code il_vat}, {@code in_gst}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, + * {@code jp_rn}, {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, + * {@code kz_bin}, {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_vat}, {@code ma_vat}, + * {@code md_vat}, {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, {@code my_frp}, + * {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, {@code + * np_pan}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code pl_nip}, {@code + * py_ruc}, {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code + * sg_gst}, {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, + * {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, + * {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code ve_rif}, + * {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} */ @SerializedName("type") Type type; @@ -159,18 +159,18 @@ public Builder setOwner(TaxIdCreateParams.Owner owner) { * {@code cr_tin}, {@code cv_nif}, {@code de_stn}, {@code do_rcn}, {@code ec_ruc}, {@code * eg_tin}, {@code es_cif}, {@code et_tin}, {@code eu_oss_vat}, {@code eu_vat}, {@code fo_vat}, * {@code gb_vat}, {@code ge_vat}, {@code gi_tin}, {@code gn_nif}, {@code hk_br}, {@code - * hr_oib}, {@code hu_tin}, {@code id_npwp}, {@code il_vat}, {@code in_gst}, {@code is_vat}, - * {@code it_cf}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, - * {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, {@code la_tin}, {@code li_uid}, {@code - * li_vat}, {@code lk_vat}, {@code ma_vat}, {@code md_vat}, {@code me_pib}, {@code mk_vat}, - * {@code mr_nif}, {@code mx_rfc}, {@code my_frp}, {@code my_itn}, {@code my_sst}, {@code - * ng_tin}, {@code no_vat}, {@code no_voec}, {@code np_pan}, {@code nz_gst}, {@code om_vat}, - * {@code pe_ruc}, {@code ph_tin}, {@code pl_nip}, {@code py_ruc}, {@code ro_tin}, {@code - * rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code sg_uen}, - * {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code th_vat}, {@code - * tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, {@code ug_tin}, - * {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code ve_rif}, {@code - * vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} + * hr_oib}, {@code hu_tin}, {@code ic_nif}, {@code id_npwp}, {@code il_vat}, {@code in_gst}, + * {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code ke_pin}, + * {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, {@code la_tin}, {@code + * li_uid}, {@code li_vat}, {@code lk_vat}, {@code ma_vat}, {@code md_vat}, {@code me_pib}, + * {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, {@code my_frp}, {@code my_itn}, {@code + * my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, {@code np_pan}, {@code nz_gst}, + * {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code pl_nip}, {@code py_ruc}, {@code + * ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, + * {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code + * th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, + * {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code + * ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} */ public Builder setType(TaxIdCreateParams.Type type) { this.type = type; @@ -485,6 +485,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("hu_tin") HU_TIN("hu_tin"), + @SerializedName("ic_nif") + IC_NIF("ic_nif"), + @SerializedName("id_npwp") ID_NPWP("id_npwp"), diff --git a/src/main/java/com/stripe/param/TaxRateCreateParams.java b/src/main/java/com/stripe/param/TaxRateCreateParams.java index ab45cf457765..e0bebfd3c178 100644 --- a/src/main/java/com/stripe/param/TaxRateCreateParams.java +++ b/src/main/java/com/stripe/param/TaxRateCreateParams.java @@ -334,6 +334,12 @@ public enum TaxType implements ApiRequestParams.EnumParam { @SerializedName("lease_tax") LEASE_TAX("lease_tax"), + @SerializedName("mass_transit_parking_tax") + MASS_TRANSIT_PARKING_TAX("mass_transit_parking_tax"), + + @SerializedName("parking_tax") + PARKING_TAX("parking_tax"), + @SerializedName("pst") PST("pst"), diff --git a/src/main/java/com/stripe/param/TaxRateUpdateParams.java b/src/main/java/com/stripe/param/TaxRateUpdateParams.java index af68f049e23f..c23ebbf3aada 100644 --- a/src/main/java/com/stripe/param/TaxRateUpdateParams.java +++ b/src/main/java/com/stripe/param/TaxRateUpdateParams.java @@ -368,6 +368,12 @@ public enum TaxType implements ApiRequestParams.EnumParam { @SerializedName("lease_tax") LEASE_TAX("lease_tax"), + @SerializedName("mass_transit_parking_tax") + MASS_TRANSIT_PARKING_TAX("mass_transit_parking_tax"), + + @SerializedName("parking_tax") + PARKING_TAX("parking_tax"), + @SerializedName("pst") PST("pst"), diff --git a/src/main/java/com/stripe/param/TokenCreateParams.java b/src/main/java/com/stripe/param/TokenCreateParams.java index 5a2dff74094a..0b6ad1b7cada 100644 --- a/src/main/java/com/stripe/param/TokenCreateParams.java +++ b/src/main/java/com/stripe/param/TokenCreateParams.java @@ -382,6 +382,9 @@ public static class Company { @SerializedName("address_kanji") AddressKanji addressKanji; + @SerializedName("administrative_address") + AdministrativeAddress administrativeAddress; + /** * Whether the company's directors have been provided. Set this Boolean to {@code true} after * creating all the company's directors with the @@ -476,6 +479,9 @@ public static class Company { @SerializedName("phone") String phone; + @SerializedName("principal_place_of_business") + PrincipalPlaceOfBusiness principalPlaceOfBusiness; + /** When the business was incorporated or registered. */ @SerializedName("registration_date") Object registrationDate; @@ -508,6 +514,10 @@ public static class Company { * The business ID number of the company, as appropriate for the company’s country. (Examples * are an Employer ID Number in the U.S., a Business Number in Canada, or a Company Number in * the UK.) + * + *

Changing this value requires that the account re-accept the terms of + * service. */ @SerializedName("tax_id") String taxId; @@ -530,6 +540,7 @@ private Company( Address address, AddressKana addressKana, AddressKanji addressKanji, + AdministrativeAddress administrativeAddress, Boolean directorsProvided, DirectorshipDeclaration directorshipDeclaration, Boolean executivesProvided, @@ -544,6 +555,7 @@ private Company( Boolean ownershipDeclarationShownAndSigned, ApiRequestParams.EnumParam ownershipExemptionReason, String phone, + PrincipalPlaceOfBusiness principalPlaceOfBusiness, Object registrationDate, String registrationNumber, RepresentativeDeclaration representativeDeclaration, @@ -555,6 +567,7 @@ private Company( this.address = address; this.addressKana = addressKana; this.addressKanji = addressKanji; + this.administrativeAddress = administrativeAddress; this.directorsProvided = directorsProvided; this.directorshipDeclaration = directorshipDeclaration; this.executivesProvided = executivesProvided; @@ -569,6 +582,7 @@ private Company( this.ownershipDeclarationShownAndSigned = ownershipDeclarationShownAndSigned; this.ownershipExemptionReason = ownershipExemptionReason; this.phone = phone; + this.principalPlaceOfBusiness = principalPlaceOfBusiness; this.registrationDate = registrationDate; this.registrationNumber = registrationNumber; this.representativeDeclaration = representativeDeclaration; @@ -590,6 +604,8 @@ public static class Builder { private AddressKanji addressKanji; + private AdministrativeAddress administrativeAddress; + private Boolean directorsProvided; private DirectorshipDeclaration directorshipDeclaration; @@ -618,6 +634,8 @@ public static class Builder { private String phone; + private PrincipalPlaceOfBusiness principalPlaceOfBusiness; + private Object registrationDate; private String registrationNumber; @@ -640,6 +658,7 @@ public TokenCreateParams.Account.Company build() { this.address, this.addressKana, this.addressKanji, + this.administrativeAddress, this.directorsProvided, this.directorshipDeclaration, this.executivesProvided, @@ -654,6 +673,7 @@ public TokenCreateParams.Account.Company build() { this.ownershipDeclarationShownAndSigned, this.ownershipExemptionReason, this.phone, + this.principalPlaceOfBusiness, this.registrationDate, this.registrationNumber, this.representativeDeclaration, @@ -683,6 +703,12 @@ public Builder setAddressKanji( return this; } + public Builder setAdministrativeAddress( + TokenCreateParams.Account.Company.AdministrativeAddress administrativeAddress) { + this.administrativeAddress = administrativeAddress; + return this; + } + /** * Whether the company's directors have been provided. Set this Boolean to {@code true} * after creating all the company's directors with Changing this value requires that the account re-accept the terms of + * service. */ public Builder setTaxId(String taxId) { this.taxId = taxId; @@ -1435,6 +1471,169 @@ public Builder setTown(String town) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AdministrativeAddress { + /** City, district, suburb, town, or village. */ + @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; + + /** Address line 1, such as the street, PO Box, or company name. */ + @SerializedName("line1") + String line1; + + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** + * State, county, province, or region (ISO 3166-2). + */ + @SerializedName("state") + String state; + + private AdministrativeAddress( + String city, + String country, + Map extraParams, + String line1, + String line2, + String postalCode, + String state) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + } + + 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; + + /** Finalize and obtain parameter instance from this builder. */ + public TokenCreateParams.Account.Company.AdministrativeAddress build() { + return new TokenCreateParams.Account.Company.AdministrativeAddress( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state); + } + + /** City, district, suburb, town, or village. */ + 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 TokenCreateParams.Account.Company.AdministrativeAddress#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 TokenCreateParams.Account.Company.AdministrativeAddress#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** 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, such as the apartment, suite, unit, or building. */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** + * State, county, province, or region (ISO 3166-2). + */ + public Builder setState(String state) { + this.state = state; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class DirectorshipDeclaration { @@ -1641,6 +1840,169 @@ public Builder setUserAgent(String userAgent) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PrincipalPlaceOfBusiness { + /** City, district, suburb, town, or village. */ + @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; + + /** Address line 1, such as the street, PO Box, or company name. */ + @SerializedName("line1") + String line1; + + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** + * State, county, province, or region (ISO 3166-2). + */ + @SerializedName("state") + String state; + + private PrincipalPlaceOfBusiness( + String city, + String country, + Map extraParams, + String line1, + String line2, + String postalCode, + String state) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + } + + 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; + + /** Finalize and obtain parameter instance from this builder. */ + public TokenCreateParams.Account.Company.PrincipalPlaceOfBusiness build() { + return new TokenCreateParams.Account.Company.PrincipalPlaceOfBusiness( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state); + } + + /** City, district, suburb, town, or village. */ + 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 TokenCreateParams.Account.Company.PrincipalPlaceOfBusiness#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 TokenCreateParams.Account.Company.PrincipalPlaceOfBusiness#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** 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, such as the apartment, suite, unit, or building. */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** + * State, county, province, or region (ISO 3166-2). + */ + public Builder setState(String state) { + this.state = state; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class RegistrationDate { @@ -4712,6 +5074,10 @@ public static class Person { * number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you * can also provide a PII * token provided by Stripe.js. + * + *

Changing this value for the account's representative requires that the account re-accept + * the terms of + * service. */ @SerializedName("id_number") String idNumber; @@ -4722,6 +5088,10 @@ public static class Person { * card. Instead of the number itself, you can also provide a PII token provided by * Stripe.js. + * + *

Changing this value for the account's representative requires that the account re-accept + * the terms of + * service. */ @SerializedName("id_number_secondary") String idNumberSecondary; @@ -4779,7 +5149,13 @@ public static class Person { @SerializedName("relationship") Relationship relationship; - /** The last four digits of the person's Social Security number (U.S. only). */ + /** + * The last four digits of the person's Social Security number (U.S. only). + * + *

Changing this value for the account's representative requires that the account re-accept + * the terms of + * service. + */ @SerializedName("ssn_last_4") String ssnLast4; @@ -5095,6 +5471,10 @@ public Builder setGender(String gender) { * you can also provide a PII token provided by * Stripe.js. + * + *

Changing this value for the account's representative requires that the account re-accept + * the terms of + * service. */ public Builder setIdNumber(String idNumber) { this.idNumber = idNumber; @@ -5107,6 +5487,10 @@ public Builder setIdNumber(String idNumber) { * of an ID card. Instead of the number itself, you can also provide a PII token provided by * Stripe.js. + * + *

Changing this value for the account's representative requires that the account re-accept + * the terms of + * service. */ public Builder setIdNumberSecondary(String idNumberSecondary) { this.idNumberSecondary = idNumberSecondary; @@ -5227,7 +5611,13 @@ public Builder setRelationship(TokenCreateParams.Person.Relationship relationshi return this; } - /** The last four digits of the person's Social Security number (U.S. only). */ + /** + * The last four digits of the person's Social Security number (U.S. only). + * + *

Changing this value for the account's representative requires that the account re-accept + * the terms of + * service. + */ public Builder setSsnLast4(String ssnLast4) { this.ssnLast4 = ssnLast4; return this; diff --git a/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java b/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java index 89c0f93affb9..b1a2f5e6d465 100644 --- a/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java +++ b/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java @@ -657,7 +657,10 @@ public enum ApiVersion implements ApiRequestParams.EnumParam { VERSION_2026_05_27_DAHLIA("2026-05-27.dahlia"), @SerializedName("2026-06-24.dahlia") - VERSION_2026_06_24_DAHLIA("2026-06-24.dahlia"); + VERSION_2026_06_24_DAHLIA("2026-06-24.dahlia"), + + @SerializedName("2026-07-29.dahlia") + VERSION_2026_07_29_DAHLIA("2026-07-29.dahlia"); @Getter(onMethod_ = {@Override}) private final String value; @@ -919,6 +922,10 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam { @SerializedName("financial_connections.account.disconnected") FINANCIAL_CONNECTIONS__ACCOUNT__DISCONNECTED("financial_connections.account.disconnected"), + @SerializedName("financial_connections.account.expected_deactivation_date_updated") + FINANCIAL_CONNECTIONS__ACCOUNT__EXPECTED_DEACTIVATION_DATE_UPDATED( + "financial_connections.account.expected_deactivation_date_updated"), + @SerializedName("financial_connections.account.reactivated") FINANCIAL_CONNECTIONS__ACCOUNT__REACTIVATED("financial_connections.account.reactivated"), @@ -934,10 +941,26 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam { FINANCIAL_CONNECTIONS__ACCOUNT__REFRESHED_TRANSACTIONS( "financial_connections.account.refreshed_transactions"), + @SerializedName("financial_connections.account.supported_payment_method_types_updated") + FINANCIAL_CONNECTIONS__ACCOUNT__SUPPORTED_PAYMENT_METHOD_TYPES_UPDATED( + "financial_connections.account.supported_payment_method_types_updated"), + @SerializedName("financial_connections.account.upcoming_account_number_expiry") FINANCIAL_CONNECTIONS__ACCOUNT__UPCOMING_ACCOUNT_NUMBER_EXPIRY( "financial_connections.account.upcoming_account_number_expiry"), + @SerializedName("financial_connections.account.upcoming_deactivation") + FINANCIAL_CONNECTIONS__ACCOUNT__UPCOMING_DEACTIVATION( + "financial_connections.account.upcoming_deactivation"), + + @SerializedName("financial_connections.authorization.expected_deactivation_date_updated") + FINANCIAL_CONNECTIONS__AUTHORIZATION__EXPECTED_DEACTIVATION_DATE_UPDATED( + "financial_connections.authorization.expected_deactivation_date_updated"), + + @SerializedName("financial_connections.authorization.upcoming_deactivation") + FINANCIAL_CONNECTIONS__AUTHORIZATION__UPCOMING_DEACTIVATION( + "financial_connections.authorization.upcoming_deactivation"), + @SerializedName("identity.verification_session.canceled") IDENTITY__VERIFICATION_SESSION__CANCELED("identity.verification_session.canceled"), diff --git a/src/main/java/com/stripe/param/WebhookEndpointUpdateParams.java b/src/main/java/com/stripe/param/WebhookEndpointUpdateParams.java index cd108f8203e1..17ade9cb4392 100644 --- a/src/main/java/com/stripe/param/WebhookEndpointUpdateParams.java +++ b/src/main/java/com/stripe/param/WebhookEndpointUpdateParams.java @@ -514,6 +514,10 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam { @SerializedName("financial_connections.account.disconnected") FINANCIAL_CONNECTIONS__ACCOUNT__DISCONNECTED("financial_connections.account.disconnected"), + @SerializedName("financial_connections.account.expected_deactivation_date_updated") + FINANCIAL_CONNECTIONS__ACCOUNT__EXPECTED_DEACTIVATION_DATE_UPDATED( + "financial_connections.account.expected_deactivation_date_updated"), + @SerializedName("financial_connections.account.reactivated") FINANCIAL_CONNECTIONS__ACCOUNT__REACTIVATED("financial_connections.account.reactivated"), @@ -529,10 +533,26 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam { FINANCIAL_CONNECTIONS__ACCOUNT__REFRESHED_TRANSACTIONS( "financial_connections.account.refreshed_transactions"), + @SerializedName("financial_connections.account.supported_payment_method_types_updated") + FINANCIAL_CONNECTIONS__ACCOUNT__SUPPORTED_PAYMENT_METHOD_TYPES_UPDATED( + "financial_connections.account.supported_payment_method_types_updated"), + @SerializedName("financial_connections.account.upcoming_account_number_expiry") FINANCIAL_CONNECTIONS__ACCOUNT__UPCOMING_ACCOUNT_NUMBER_EXPIRY( "financial_connections.account.upcoming_account_number_expiry"), + @SerializedName("financial_connections.account.upcoming_deactivation") + FINANCIAL_CONNECTIONS__ACCOUNT__UPCOMING_DEACTIVATION( + "financial_connections.account.upcoming_deactivation"), + + @SerializedName("financial_connections.authorization.expected_deactivation_date_updated") + FINANCIAL_CONNECTIONS__AUTHORIZATION__EXPECTED_DEACTIVATION_DATE_UPDATED( + "financial_connections.authorization.expected_deactivation_date_updated"), + + @SerializedName("financial_connections.authorization.upcoming_deactivation") + FINANCIAL_CONNECTIONS__AUTHORIZATION__UPCOMING_DEACTIVATION( + "financial_connections.authorization.upcoming_deactivation"), + @SerializedName("identity.verification_session.canceled") IDENTITY__VERIFICATION_SESSION__CANCELED("identity.verification_session.canceled"), diff --git a/src/main/java/com/stripe/param/billing/AlertCreateParams.java b/src/main/java/com/stripe/param/billing/AlertCreateParams.java index 18a37776bdff..787853479558 100644 --- a/src/main/java/com/stripe/param/billing/AlertCreateParams.java +++ b/src/main/java/com/stripe/param/billing/AlertCreateParams.java @@ -162,7 +162,10 @@ public static class UsageThreshold { @SerializedName("filters") List filters; - /** Required. Defines the threshold value that triggers the alert. */ + /** + * Required. Defines the threshold value that triggers the alert. The value + * must be greater than 0. + */ @SerializedName("gte") Long gte; @@ -263,7 +266,10 @@ public Builder addAllFilter(List elemen return this; } - /** Required. Defines the threshold value that triggers the alert. */ + /** + * Required. Defines the threshold value that triggers the alert. The value + * must be greater than 0. + */ public Builder setGte(Long gte) { this.gte = gte; 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 84478490051c..55a16d1c447f 100644 --- a/src/main/java/com/stripe/param/billingportal/ConfigurationCreateParams.java +++ b/src/main/java/com/stripe/param/billingportal/ConfigurationCreateParams.java @@ -21,7 +21,7 @@ public class ConfigurationCreateParams extends ApiRequestParams { /** * The default URL to redirect customers to when they click on the portal's link to return to your * website. This can be overriden + * href="https://docs.stripe.com/api/customer_portal/sessions/create#create_portal_session-return_url">overridden * when creating the session. */ @SerializedName("default_return_url") @@ -127,7 +127,7 @@ public Builder setBusinessProfile(ConfigurationCreateParams.BusinessProfile busi /** * The default URL to redirect customers to when they click on the portal's link to return to * your website. This can be overriden + * href="https://docs.stripe.com/api/customer_portal/sessions/create#create_portal_session-return_url">overridden * when creating the session. */ public Builder setDefaultReturnUrl(String defaultReturnUrl) { @@ -138,7 +138,7 @@ public Builder setDefaultReturnUrl(String defaultReturnUrl) { /** * The default URL to redirect customers to when they click on the portal's link to return to * your website. This can be overriden + * href="https://docs.stripe.com/api/customer_portal/sessions/create#create_portal_session-return_url">overridden * when creating the session. */ public Builder setDefaultReturnUrl(EmptyParam defaultReturnUrl) { diff --git a/src/main/java/com/stripe/param/billingportal/ConfigurationUpdateParams.java b/src/main/java/com/stripe/param/billingportal/ConfigurationUpdateParams.java index ace7cc763f7d..3724df5eb887 100644 --- a/src/main/java/com/stripe/param/billingportal/ConfigurationUpdateParams.java +++ b/src/main/java/com/stripe/param/billingportal/ConfigurationUpdateParams.java @@ -25,7 +25,7 @@ public class ConfigurationUpdateParams extends ApiRequestParams { /** * The default URL to redirect customers to when they click on the portal's link to return to your * website. This can be overriden + * href="https://docs.stripe.com/api/customer_portal/sessions/create#create_portal_session-return_url">overridden * when creating the session. */ @SerializedName("default_return_url") @@ -142,7 +142,7 @@ public Builder setBusinessProfile(ConfigurationUpdateParams.BusinessProfile busi /** * The default URL to redirect customers to when they click on the portal's link to return to * your website. This can be overriden + * href="https://docs.stripe.com/api/customer_portal/sessions/create#create_portal_session-return_url">overridden * when creating the session. */ public Builder setDefaultReturnUrl(String defaultReturnUrl) { @@ -153,7 +153,7 @@ public Builder setDefaultReturnUrl(String defaultReturnUrl) { /** * The default URL to redirect customers to when they click on the portal's link to return to * your website. This can be overriden + * href="https://docs.stripe.com/api/customer_portal/sessions/create#create_portal_session-return_url">overridden * when creating the session. */ public Builder setDefaultReturnUrl(EmptyParam defaultReturnUrl) { diff --git a/src/main/java/com/stripe/param/checkout/SessionCreateParams.java b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java index 782188cd18ec..ca437584faf5 100644 --- a/src/main/java/com/stripe/param/checkout/SessionCreateParams.java +++ b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java @@ -4817,15 +4817,6 @@ public static class LineItem { @SerializedName("adjustable_quantity") AdjustableQuantity adjustableQuantity; - /** - * The tax rates that will be applied to - * this line item depending on the customer's billing/shipping address. We currently support the - * following countries: US, GB, AU, and all countries in the EU. You can't set this parameter if - * {@code ui_mode} is {@code custom}. - */ - @SerializedName("dynamic_tax_rates") - List dynamicTaxRates; - /** * 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 @@ -4875,7 +4866,6 @@ public static class LineItem { private LineItem( AdjustableQuantity adjustableQuantity, - List dynamicTaxRates, Map extraParams, Map metadata, String price, @@ -4883,7 +4873,6 @@ private LineItem( Long quantity, List taxRates) { this.adjustableQuantity = adjustableQuantity; - this.dynamicTaxRates = dynamicTaxRates; this.extraParams = extraParams; this.metadata = metadata; this.price = price; @@ -4899,8 +4888,6 @@ public static Builder builder() { public static class Builder { private AdjustableQuantity adjustableQuantity; - private List dynamicTaxRates; - private Map extraParams; private Map metadata; @@ -4917,7 +4904,6 @@ public static class Builder { public SessionCreateParams.LineItem build() { return new SessionCreateParams.LineItem( this.adjustableQuantity, - this.dynamicTaxRates, this.extraParams, this.metadata, this.price, @@ -4936,32 +4922,6 @@ public Builder setAdjustableQuantity( return this; } - /** - * Add an element to `dynamicTaxRates` list. A list is initialized for the first `add/addAll` - * call, and subsequent calls adds additional elements to the original list. See {@link - * SessionCreateParams.LineItem#dynamicTaxRates} for the field documentation. - */ - public Builder addDynamicTaxRate(String element) { - if (this.dynamicTaxRates == null) { - this.dynamicTaxRates = new ArrayList<>(); - } - this.dynamicTaxRates.add(element); - return this; - } - - /** - * Add all elements to `dynamicTaxRates` list. A list is initialized for the first - * `add/addAll` call, and subsequent calls adds additional elements to the original list. See - * {@link SessionCreateParams.LineItem#dynamicTaxRates} for the field documentation. - */ - public Builder addAllDynamicTaxRate(List elements) { - if (this.dynamicTaxRates == null) { - this.dynamicTaxRates = new ArrayList<>(); - } - this.dynamicTaxRates.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 @@ -14035,9 +13995,35 @@ public static class Payco { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Payco(CaptureMethod captureMethod, 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 Payco( + CaptureMethod captureMethod, + Map extraParams, + SetupFutureUsage setupFutureUsage) { this.captureMethod = captureMethod; this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; } public static Builder builder() { @@ -14049,10 +14035,12 @@ public static class Builder { private Map extraParams; + private SetupFutureUsage setupFutureUsage; + /** Finalize and obtain parameter instance from this builder. */ public SessionCreateParams.PaymentMethodOptions.Payco build() { return new SessionCreateParams.PaymentMethodOptions.Payco( - this.captureMethod, this.extraParams); + this.captureMethod, this.extraParams, this.setupFutureUsage); } /** Controls when the funds will be captured from the customer's account. */ @@ -14089,6 +14077,32 @@ public Builder putAllExtraParam(Map map) { 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. + */ + public Builder setSetupFutureUsage( + SessionCreateParams.PaymentMethodOptions.Payco.SetupFutureUsage setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } } public enum CaptureMethod implements ApiRequestParams.EnumParam { @@ -14102,6 +14116,18 @@ public enum CaptureMethod implements ApiRequestParams.EnumParam { 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 @@ -15704,9 +15730,35 @@ public static class SamsungPay { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private SamsungPay(CaptureMethod captureMethod, 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 SamsungPay( + CaptureMethod captureMethod, + Map extraParams, + SetupFutureUsage setupFutureUsage) { this.captureMethod = captureMethod; this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; } public static Builder builder() { @@ -15718,10 +15770,12 @@ public static class Builder { private Map extraParams; + private SetupFutureUsage setupFutureUsage; + /** Finalize and obtain parameter instance from this builder. */ public SessionCreateParams.PaymentMethodOptions.SamsungPay build() { return new SessionCreateParams.PaymentMethodOptions.SamsungPay( - this.captureMethod, this.extraParams); + this.captureMethod, this.extraParams, this.setupFutureUsage); } /** Controls when the funds will be captured from the customer's account. */ @@ -15758,6 +15812,32 @@ public Builder putAllExtraParam(Map map) { 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. + */ + public Builder setSetupFutureUsage( + SessionCreateParams.PaymentMethodOptions.SamsungPay.SetupFutureUsage setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } } public enum CaptureMethod implements ApiRequestParams.EnumParam { @@ -15771,6 +15851,18 @@ public enum CaptureMethod implements ApiRequestParams.EnumParam { 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 @@ -19817,10 +19909,7 @@ public static class SubscriptionData { @SerializedName("application_fee_percent") BigDecimal applicationFeePercent; - /** - * A future timestamp to anchor the subscription's billing cycle for new subscriptions. You - * can't set this parameter if {@code ui_mode} is {@code elements}. - */ + /** A future timestamp to anchor the subscription's billing cycle for new subscriptions. */ @SerializedName("billing_cycle_anchor") Long billingCycleAnchor; @@ -20023,10 +20112,7 @@ public Builder setApplicationFeePercent(BigDecimal applicationFeePercent) { return this; } - /** - * A future timestamp to anchor the subscription's billing cycle for new subscriptions. You - * can't set this parameter if {@code ui_mode} is {@code elements}. - */ + /** A future timestamp to anchor the subscription's billing cycle for new subscriptions. */ public Builder setBillingCycleAnchor(Long billingCycleAnchor) { this.billingCycleAnchor = billingCycleAnchor; return this; diff --git a/src/main/java/com/stripe/param/financialconnections/SessionCreateParams.java b/src/main/java/com/stripe/param/financialconnections/SessionCreateParams.java index 93a0f6ad2607..3612d8564600 100644 --- a/src/main/java/com/stripe/param/financialconnections/SessionCreateParams.java +++ b/src/main/java/com/stripe/param/financialconnections/SessionCreateParams.java @@ -3,6 +3,7 @@ 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; @@ -34,6 +35,14 @@ public class SessionCreateParams extends ApiRequestParams { @SerializedName("filters") Filters filters; + /** Settings for configuring Session-specific limits. */ + @SerializedName("limits") + Limits limits; + + /** Customize manual entry behavior. */ + @SerializedName("manual_entry") + ManualEntry manualEntry; + /** * Required. List of data features that you would like to request access to. * @@ -59,6 +68,8 @@ private SessionCreateParams( List expand, Map extraParams, Filters filters, + Limits limits, + ManualEntry manualEntry, List permissions, List prefetch, String returnUrl) { @@ -66,6 +77,8 @@ private SessionCreateParams( this.expand = expand; this.extraParams = extraParams; this.filters = filters; + this.limits = limits; + this.manualEntry = manualEntry; this.permissions = permissions; this.prefetch = prefetch; this.returnUrl = returnUrl; @@ -84,6 +97,10 @@ public static class Builder { private Filters filters; + private Limits limits; + + private ManualEntry manualEntry; + private List permissions; private List prefetch; @@ -97,6 +114,8 @@ public SessionCreateParams build() { this.expand, this.extraParams, this.filters, + this.limits, + this.manualEntry, this.permissions, this.prefetch, this.returnUrl); @@ -166,6 +185,18 @@ public Builder setFilters(SessionCreateParams.Filters filters) { return this; } + /** Settings for configuring Session-specific limits. */ + public Builder setLimits(SessionCreateParams.Limits limits) { + this.limits = limits; + return this; + } + + /** Customize manual entry behavior. */ + public Builder setManualEntry(SessionCreateParams.ManualEntry manualEntry) { + this.manualEntry = manualEntry; + return this; + } + /** * Add an element to `permissions` list. A list is initialized for the first `add/addAll` call, * and subsequent calls adds additional elements to the original list. See {@link @@ -399,13 +430,22 @@ public static class Filters { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** + * Whether the session should require payment method support and successful account number + * retrieval before completion. + */ + @SerializedName("require_payment_method_support") + RequirePaymentMethodSupport requirePaymentMethodSupport; + private Filters( List accountSubcategories, List countries, - Map extraParams) { + Map extraParams, + RequirePaymentMethodSupport requirePaymentMethodSupport) { this.accountSubcategories = accountSubcategories; this.countries = countries; this.extraParams = extraParams; + this.requirePaymentMethodSupport = requirePaymentMethodSupport; } public static Builder builder() { @@ -419,10 +459,15 @@ public static class Builder { private Map extraParams; + private RequirePaymentMethodSupport requirePaymentMethodSupport; + /** Finalize and obtain parameter instance from this builder. */ public SessionCreateParams.Filters build() { return new SessionCreateParams.Filters( - this.accountSubcategories, this.countries, this.extraParams); + this.accountSubcategories, + this.countries, + this.extraParams, + this.requirePaymentMethodSupport); } /** @@ -503,6 +548,16 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } + + /** + * Whether the session should require payment method support and successful account number + * retrieval before completion. + */ + public Builder setRequirePaymentMethodSupport( + SessionCreateParams.Filters.RequirePaymentMethodSupport requirePaymentMethodSupport) { + this.requirePaymentMethodSupport = requirePaymentMethodSupport; + return this; + } } public enum AccountSubcategory implements ApiRequestParams.EnumParam { @@ -528,6 +583,192 @@ public enum AccountSubcategory implements ApiRequestParams.EnumParam { this.value = value; } } + + public enum RequirePaymentMethodSupport implements ApiRequestParams.EnumParam { + @SerializedName("all") + ALL("all"), + + @SerializedName("at_least_one") + AT_LEAST_ONE("at_least_one"), + + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + RequirePaymentMethodSupport(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Limits { + /** + * Required. The number of accounts that can be linked in this Session. Pass an + * empty value to allow any number of accounts. + */ + @SerializedName("accounts") + Object accounts; + + /** + * 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 Limits(Object accounts, Map extraParams) { + this.accounts = accounts; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object accounts; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionCreateParams.Limits build() { + return new SessionCreateParams.Limits(this.accounts, this.extraParams); + } + + /** + * Required. The number of accounts that can be linked in this Session. Pass + * an empty value to allow any number of accounts. + */ + public Builder setAccounts(Long accounts) { + this.accounts = accounts; + return this; + } + + /** + * Required. The number of accounts that can be linked in this Session. Pass + * an empty value to allow any number of accounts. + */ + public Builder setAccounts(EmptyParam accounts) { + this.accounts = accounts; + 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.Limits#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.Limits#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 ManualEntry { + /** + * 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 manual entry should be handled. */ + @SerializedName("mode") + Mode mode; + + private ManualEntry(Map extraParams, Mode mode) { + this.extraParams = extraParams; + this.mode = mode; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Mode mode; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionCreateParams.ManualEntry build() { + return new SessionCreateParams.ManualEntry(this.extraParams, this.mode); + } + + /** + * 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.ManualEntry#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.ManualEntry#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 manual entry should be handled. */ + public Builder setMode(SessionCreateParams.ManualEntry.Mode mode) { + this.mode = mode; + return this; + } + } + + public enum Mode implements ApiRequestParams.EnumParam { + @SerializedName("automatic") + AUTOMATIC("automatic"), + + @SerializedName("disabled") + DISABLED("disabled"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Mode(String value) { + this.value = value; + } + } } public enum Permission implements ApiRequestParams.EnumParam { diff --git a/src/main/java/com/stripe/param/issuing/AuthorizationCaptureParams.java b/src/main/java/com/stripe/param/issuing/AuthorizationCaptureParams.java index 1d32b5e97d31..d402e44938a8 100644 --- a/src/main/java/com/stripe/param/issuing/AuthorizationCaptureParams.java +++ b/src/main/java/com/stripe/param/issuing/AuthorizationCaptureParams.java @@ -745,7 +745,7 @@ public static class Fuel { Map extraParams; /** - * Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive + * Gross fuel amount that should equal Fuel Volume multiplied by Fuel Unit Cost, inclusive * of taxes. */ @SerializedName("gross_amount_decimal") @@ -802,7 +802,7 @@ public Builder putAllExtraParam(Map map) { } /** - * Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, + * Gross fuel amount that should equal Fuel Volume multiplied by Fuel Unit Cost, * inclusive of taxes. */ public Builder setGrossAmountDecimal(BigDecimal grossAmountDecimal) { diff --git a/src/main/java/com/stripe/param/issuing/AuthorizationCreateParams.java b/src/main/java/com/stripe/param/issuing/AuthorizationCreateParams.java index d185cfad08cc..384a43bb2ee1 100644 --- a/src/main/java/com/stripe/param/issuing/AuthorizationCreateParams.java +++ b/src/main/java/com/stripe/param/issuing/AuthorizationCreateParams.java @@ -903,8 +903,8 @@ public static class Fuel { Map extraParams; /** - * Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of - * taxes. + * Gross fuel amount that should equal Fuel Volume multiplied by Fuel Unit Cost, inclusive + * of taxes. */ @SerializedName("gross_amount_decimal") BigDecimal grossAmountDecimal; @@ -958,7 +958,7 @@ public Builder putAllExtraParam(Map map) { } /** - * Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive + * Gross fuel amount that should equal Fuel Volume multiplied by Fuel Unit Cost, inclusive * of taxes. */ public Builder setGrossAmountDecimal(BigDecimal grossAmountDecimal) { diff --git a/src/main/java/com/stripe/param/issuing/AuthorizationFinalizeAmountParams.java b/src/main/java/com/stripe/param/issuing/AuthorizationFinalizeAmountParams.java index 6d95c153c428..47f80bd779fd 100644 --- a/src/main/java/com/stripe/param/issuing/AuthorizationFinalizeAmountParams.java +++ b/src/main/java/com/stripe/param/issuing/AuthorizationFinalizeAmountParams.java @@ -557,8 +557,8 @@ public static class Fuel { Map extraParams; /** - * Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of - * taxes. + * Gross fuel amount that should equal Fuel Volume multiplied by Fuel Unit Cost, inclusive + * of taxes. */ @SerializedName("gross_amount_decimal") BigDecimal grossAmountDecimal; @@ -614,7 +614,7 @@ public Builder putAllExtraParam(Map map) { } /** - * Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive + * Gross fuel amount that should equal Fuel Volume multiplied by Fuel Unit Cost, inclusive * of taxes. */ public Builder setGrossAmountDecimal(BigDecimal grossAmountDecimal) { diff --git a/src/main/java/com/stripe/param/issuing/CardCreateParams.java b/src/main/java/com/stripe/param/issuing/CardCreateParams.java index a6855a4dcba8..90ef86afb858 100644 --- a/src/main/java/com/stripe/param/issuing/CardCreateParams.java +++ b/src/main/java/com/stripe/param/issuing/CardCreateParams.java @@ -664,6 +664,15 @@ public static class Shipping { @SerializedName("address_validation") AddressValidation addressValidation; + /** + * The name of the business at the shipping address, used on the shipping label to ensure + * delivery when the card is shipped to a cardholder's workplace. Allowed characters: {@code + * A-Z}, {@code a-z}, {@code 0-9}, {@code }, {@code .}, {@code -}. All other characters are + * stripped or ASCII-normalized when printed. + */ + @SerializedName("business_name") + String businessName; + /** Customs information for the shipment. */ @SerializedName("customs") Customs customs; @@ -700,6 +709,7 @@ public static class Shipping { private Shipping( Address address, AddressValidation addressValidation, + String businessName, Customs customs, Map extraParams, String name, @@ -709,6 +719,7 @@ private Shipping( Type type) { this.address = address; this.addressValidation = addressValidation; + this.businessName = businessName; this.customs = customs; this.extraParams = extraParams; this.name = name; @@ -727,6 +738,8 @@ public static class Builder { private AddressValidation addressValidation; + private String businessName; + private Customs customs; private Map extraParams; @@ -746,6 +759,7 @@ public CardCreateParams.Shipping build() { return new CardCreateParams.Shipping( this.address, this.addressValidation, + this.businessName, this.customs, this.extraParams, this.name, @@ -768,6 +782,17 @@ public Builder setAddressValidation( return this; } + /** + * The name of the business at the shipping address, used on the shipping label to ensure + * delivery when the card is shipped to a cardholder's workplace. Allowed characters: {@code + * A-Z}, {@code a-z}, {@code 0-9}, {@code }, {@code .}, {@code -}. All other characters are + * stripped or ASCII-normalized when printed. + */ + public Builder setBusinessName(String businessName) { + this.businessName = businessName; + return this; + } + /** Customs information for the shipment. */ public Builder setCustoms(CardCreateParams.Shipping.Customs customs) { this.customs = customs; diff --git a/src/main/java/com/stripe/param/issuing/CardUpdateParams.java b/src/main/java/com/stripe/param/issuing/CardUpdateParams.java index 5ea56176d2aa..2dc5ec283a89 100644 --- a/src/main/java/com/stripe/param/issuing/CardUpdateParams.java +++ b/src/main/java/com/stripe/param/issuing/CardUpdateParams.java @@ -364,6 +364,15 @@ public static class Shipping { @SerializedName("address_validation") AddressValidation addressValidation; + /** + * The name of the business at the shipping address, used on the shipping label to ensure + * delivery when the card is shipped to a cardholder's workplace. Allowed characters: {@code + * A-Z}, {@code a-z}, {@code 0-9}, {@code }, {@code .}, {@code -}. All other characters are + * stripped or ASCII-normalized when printed. + */ + @SerializedName("business_name") + Object businessName; + /** Customs information for the shipment. */ @SerializedName("customs") Customs customs; @@ -400,6 +409,7 @@ public static class Shipping { private Shipping( Address address, AddressValidation addressValidation, + Object businessName, Customs customs, Map extraParams, Object name, @@ -409,6 +419,7 @@ private Shipping( Type type) { this.address = address; this.addressValidation = addressValidation; + this.businessName = businessName; this.customs = customs; this.extraParams = extraParams; this.name = name; @@ -427,6 +438,8 @@ public static class Builder { private AddressValidation addressValidation; + private Object businessName; + private Customs customs; private Map extraParams; @@ -446,6 +459,7 @@ public CardUpdateParams.Shipping build() { return new CardUpdateParams.Shipping( this.address, this.addressValidation, + this.businessName, this.customs, this.extraParams, this.name, @@ -468,6 +482,28 @@ public Builder setAddressValidation( return this; } + /** + * The name of the business at the shipping address, used on the shipping label to ensure + * delivery when the card is shipped to a cardholder's workplace. Allowed characters: {@code + * A-Z}, {@code a-z}, {@code 0-9}, {@code }, {@code .}, {@code -}. All other characters are + * stripped or ASCII-normalized when printed. + */ + public Builder setBusinessName(String businessName) { + this.businessName = businessName; + return this; + } + + /** + * The name of the business at the shipping address, used on the shipping label to ensure + * delivery when the card is shipped to a cardholder's workplace. Allowed characters: {@code + * A-Z}, {@code a-z}, {@code 0-9}, {@code }, {@code .}, {@code -}. All other characters are + * stripped or ASCII-normalized when printed. + */ + public Builder setBusinessName(EmptyParam businessName) { + this.businessName = businessName; + return this; + } + /** Customs information for the shipment. */ public Builder setCustoms(CardUpdateParams.Shipping.Customs customs) { this.customs = customs; diff --git a/src/main/java/com/stripe/param/issuing/TransactionCreateForceCaptureParams.java b/src/main/java/com/stripe/param/issuing/TransactionCreateForceCaptureParams.java index 89744cea041d..c7f3c1fb0d25 100644 --- a/src/main/java/com/stripe/param/issuing/TransactionCreateForceCaptureParams.java +++ b/src/main/java/com/stripe/param/issuing/TransactionCreateForceCaptureParams.java @@ -1916,7 +1916,7 @@ public static class Fuel { Map extraParams; /** - * Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive + * Gross fuel amount that should equal Fuel Volume multiplied by Fuel Unit Cost, inclusive * of taxes. */ @SerializedName("gross_amount_decimal") @@ -1974,7 +1974,7 @@ public Builder putAllExtraParam(Map map) { } /** - * Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, + * Gross fuel amount that should equal Fuel Volume multiplied by Fuel Unit Cost, * inclusive of taxes. */ public Builder setGrossAmountDecimal(BigDecimal grossAmountDecimal) { diff --git a/src/main/java/com/stripe/param/issuing/TransactionCreateUnlinkedRefundParams.java b/src/main/java/com/stripe/param/issuing/TransactionCreateUnlinkedRefundParams.java index 3927c4f1dfc6..bfefedc948ad 100644 --- a/src/main/java/com/stripe/param/issuing/TransactionCreateUnlinkedRefundParams.java +++ b/src/main/java/com/stripe/param/issuing/TransactionCreateUnlinkedRefundParams.java @@ -1920,7 +1920,7 @@ public static class Fuel { Map extraParams; /** - * Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive + * Gross fuel amount that should equal Fuel Volume multiplied by Fuel Unit Cost, inclusive * of taxes. */ @SerializedName("gross_amount_decimal") @@ -1979,7 +1979,7 @@ public Builder putAllExtraParam(Map map) { } /** - * Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, + * Gross fuel amount that should equal Fuel Volume multiplied by Fuel Unit Cost, * inclusive of taxes. */ public Builder setGrossAmountDecimal(BigDecimal grossAmountDecimal) { diff --git a/src/main/java/com/stripe/param/tax/CalculationCreateParams.java b/src/main/java/com/stripe/param/tax/CalculationCreateParams.java index a6613ad0bbf6..f83c0851b43e 100644 --- a/src/main/java/com/stripe/param/tax/CalculationCreateParams.java +++ b/src/main/java/com/stripe/param/tax/CalculationCreateParams.java @@ -59,9 +59,11 @@ public class CalculationCreateParams extends ApiRequestParams { ShippingCost shippingCost; /** - * Timestamp of date at which the tax rules and rates in effect applies for the calculation. - * Measured in seconds since the Unix epoch. Can be up to 48 hours in the past, and up to 48 hours - * in the future. + * The calculation uses the tax rules and rates that are in effect at this timestamp. You can use + * a date up to 31 days in the past or up to 31 days in the future. If you use a future date, + * Stripe doesn't guarantee that the expected tax rules and rate being used match the actual rules + * and rate that will be in effect on that date. We deploy tax changes before their effective + * date, but not within a fixed window. */ @SerializedName("tax_date") Long taxDate; @@ -240,9 +242,11 @@ public Builder setShippingCost(CalculationCreateParams.ShippingCost shippingCost } /** - * Timestamp of date at which the tax rules and rates in effect applies for the calculation. - * Measured in seconds since the Unix epoch. Can be up to 48 hours in the past, and up to 48 - * hours in the future. + * The calculation uses the tax rules and rates that are in effect at this timestamp. You can + * use a date up to 31 days in the past or up to 31 days in the future. If you use a future + * date, Stripe doesn't guarantee that the expected tax rules and rate being used match the + * actual rules and rate that will be in effect on that date. We deploy tax changes before their + * effective date, but not within a fixed window. */ public Builder setTaxDate(Long taxDate) { this.taxDate = taxDate; @@ -640,18 +644,19 @@ public static class TaxId { * cn_tin}, {@code co_nit}, {@code cr_tin}, {@code cv_nif}, {@code de_stn}, {@code do_rcn}, * {@code ec_ruc}, {@code eg_tin}, {@code es_cif}, {@code et_tin}, {@code eu_oss_vat}, {@code * eu_vat}, {@code fo_vat}, {@code gb_vat}, {@code ge_vat}, {@code gi_tin}, {@code gn_nif}, - * {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code id_npwp}, {@code il_vat}, {@code - * in_gst}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, - * {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, {@code - * la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_vat}, {@code ma_vat}, {@code md_vat}, - * {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, {@code my_frp}, {@code - * my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, {@code np_pan}, - * {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code pl_nip}, {@code - * py_ruc}, {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, - * {@code sg_gst}, {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code - * sv_nit}, {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, - * {@code ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code - * uz_vat}, {@code ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} + * {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code ic_nif}, {@code id_npwp}, {@code + * il_vat}, {@code in_gst}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, + * {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code + * kz_bin}, {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_vat}, {@code ma_vat}, + * {@code md_vat}, {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, {@code + * my_frp}, {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, + * {@code np_pan}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code + * pl_nip}, {@code py_ruc}, {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, + * {@code sa_vat}, {@code sg_gst}, {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code + * sr_fin}, {@code sv_nit}, {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, + * {@code tz_vat}, {@code ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code + * uz_tin}, {@code uz_vat}, {@code ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or + * {@code zw_tin} */ @SerializedName("type") Type type; @@ -722,19 +727,19 @@ public Builder putAllExtraParam(Map map) { * cn_tin}, {@code co_nit}, {@code cr_tin}, {@code cv_nif}, {@code de_stn}, {@code do_rcn}, * {@code ec_ruc}, {@code eg_tin}, {@code es_cif}, {@code et_tin}, {@code eu_oss_vat}, * {@code eu_vat}, {@code fo_vat}, {@code gb_vat}, {@code ge_vat}, {@code gi_tin}, {@code - * gn_nif}, {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code id_npwp}, {@code il_vat}, - * {@code in_gst}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, {@code - * jp_trn}, {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, - * {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_vat}, {@code ma_vat}, {@code - * md_vat}, {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, {@code my_frp}, - * {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, {@code - * np_pan}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code pl_nip}, - * {@code py_ruc}, {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code - * sa_vat}, {@code sg_gst}, {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code - * sr_fin}, {@code sv_nit}, {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, - * {@code tz_vat}, {@code ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code - * uz_tin}, {@code uz_vat}, {@code ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, - * or {@code zw_tin} + * gn_nif}, {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code ic_nif}, {@code id_npwp}, + * {@code il_vat}, {@code in_gst}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code + * jp_rn}, {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, + * {@code kz_bin}, {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_vat}, {@code + * ma_vat}, {@code md_vat}, {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, + * {@code my_frp}, {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code + * no_voec}, {@code np_pan}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, + * {@code pl_nip}, {@code py_ruc}, {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code + * ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code sg_uen}, {@code si_tin}, {@code + * sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code th_vat}, {@code tj_tin}, {@code + * tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, {@code ug_tin}, {@code us_ein}, + * {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code ve_rif}, {@code vn_tin}, {@code + * za_vat}, {@code zm_tin}, or {@code zw_tin} */ public Builder setType(CalculationCreateParams.CustomerDetails.TaxId.Type type) { this.type = type; @@ -908,6 +913,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("hu_tin") HU_TIN("hu_tin"), + @SerializedName("ic_nif") + IC_NIF("ic_nif"), + @SerializedName("id_npwp") ID_NPWP("id_npwp"), diff --git a/src/main/java/com/stripe/param/tax/RegistrationCreateParams.java b/src/main/java/com/stripe/param/tax/RegistrationCreateParams.java index 0f5de5c976c1..d00e3b180cb6 100644 --- a/src/main/java/com/stripe/param/tax/RegistrationCreateParams.java +++ b/src/main/java/com/stripe/param/tax/RegistrationCreateParams.java @@ -15743,6 +15743,14 @@ public static class Us { @SerializedName("local_lease_tax") LocalLeaseTax localLeaseTax; + /** Options for the mass transit parking tax registration. */ + @SerializedName("mass_transit_parking_tax") + MassTransitParkingTax massTransitParkingTax; + + /** Options for the parking tax registration. */ + @SerializedName("parking_tax") + ParkingTax parkingTax; + /** * Required. Two-letter US state code (ISO 3166-2). @@ -15762,12 +15770,16 @@ private Us( Map extraParams, LocalAmusementTax localAmusementTax, LocalLeaseTax localLeaseTax, + MassTransitParkingTax massTransitParkingTax, + ParkingTax parkingTax, String state, StateSalesTax stateSalesTax, Type type) { this.extraParams = extraParams; this.localAmusementTax = localAmusementTax; this.localLeaseTax = localLeaseTax; + this.massTransitParkingTax = massTransitParkingTax; + this.parkingTax = parkingTax; this.state = state; this.stateSalesTax = stateSalesTax; this.type = type; @@ -15784,6 +15796,10 @@ public static class Builder { private LocalLeaseTax localLeaseTax; + private MassTransitParkingTax massTransitParkingTax; + + private ParkingTax parkingTax; + private String state; private StateSalesTax stateSalesTax; @@ -15796,6 +15812,8 @@ public RegistrationCreateParams.CountryOptions.Us build() { this.extraParams, this.localAmusementTax, this.localLeaseTax, + this.massTransitParkingTax, + this.parkingTax, this.state, this.stateSalesTax, this.type); @@ -15843,6 +15861,21 @@ public Builder setLocalLeaseTax( return this; } + /** Options for the mass transit parking tax registration. */ + public Builder setMassTransitParkingTax( + RegistrationCreateParams.CountryOptions.Us.MassTransitParkingTax + massTransitParkingTax) { + this.massTransitParkingTax = massTransitParkingTax; + return this; + } + + /** Options for the parking tax registration. */ + public Builder setParkingTax( + RegistrationCreateParams.CountryOptions.Us.ParkingTax parkingTax) { + this.parkingTax = parkingTax; + return this; + } + /** * Required. Two-letter US state code (ISO 3166-2). @@ -16030,6 +16063,170 @@ public Builder setJurisdiction(String jurisdiction) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MassTransitParkingTax { + /** + * 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. A jurisdiction code representing the local + * jurisdiction. + */ + @SerializedName("jurisdiction") + String jurisdiction; + + private MassTransitParkingTax(Map extraParams, String jurisdiction) { + this.extraParams = extraParams; + this.jurisdiction = jurisdiction; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String jurisdiction; + + /** Finalize and obtain parameter instance from this builder. */ + public RegistrationCreateParams.CountryOptions.Us.MassTransitParkingTax build() { + return new RegistrationCreateParams.CountryOptions.Us.MassTransitParkingTax( + this.extraParams, this.jurisdiction); + } + + /** + * 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 + * RegistrationCreateParams.CountryOptions.Us.MassTransitParkingTax#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 + * RegistrationCreateParams.CountryOptions.Us.MassTransitParkingTax#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. A jurisdiction code representing the local + * jurisdiction. + */ + public Builder setJurisdiction(String jurisdiction) { + this.jurisdiction = jurisdiction; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ParkingTax { + /** + * 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. A jurisdiction code representing the local + * jurisdiction. + */ + @SerializedName("jurisdiction") + String jurisdiction; + + private ParkingTax(Map extraParams, String jurisdiction) { + this.extraParams = extraParams; + this.jurisdiction = jurisdiction; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String jurisdiction; + + /** Finalize and obtain parameter instance from this builder. */ + public RegistrationCreateParams.CountryOptions.Us.ParkingTax build() { + return new RegistrationCreateParams.CountryOptions.Us.ParkingTax( + this.extraParams, this.jurisdiction); + } + + /** + * 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 RegistrationCreateParams.CountryOptions.Us.ParkingTax#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 RegistrationCreateParams.CountryOptions.Us.ParkingTax#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. A jurisdiction code representing the local + * jurisdiction. + */ + public Builder setJurisdiction(String jurisdiction) { + this.jurisdiction = jurisdiction; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class StateSalesTax { @@ -16257,6 +16454,12 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("local_lease_tax") LOCAL_LEASE_TAX("local_lease_tax"), + @SerializedName("mass_transit_parking_tax") + MASS_TRANSIT_PARKING_TAX("mass_transit_parking_tax"), + + @SerializedName("parking_tax") + PARKING_TAX("parking_tax"), + @SerializedName("state_communications_tax") STATE_COMMUNICATIONS_TAX("state_communications_tax"), diff --git a/src/main/java/com/stripe/param/v2/billing/MeterEventCreateParams.java b/src/main/java/com/stripe/param/v2/billing/MeterEventCreateParams.java index 3d447eef4fe9..eeb059d7f173 100644 --- a/src/main/java/com/stripe/param/v2/billing/MeterEventCreateParams.java +++ b/src/main/java/com/stripe/param/v2/billing/MeterEventCreateParams.java @@ -30,14 +30,14 @@ public class MeterEventCreateParams extends ApiRequestParams { /** * A unique identifier for the event. If not provided, one will be generated. We recommend using a - * globally unique identifier for this. We’ll enforce uniqueness within a rolling 24 hour period. + * globally unique identifier for this. We'll enforce uniqueness within a rolling 24 hour period. */ @SerializedName("identifier") String identifier; /** * Required. The payload of the event. This must contain the fields corresponding - * to a meter’s {@code customer_mapping.event_payload_key} (default is {@code stripe_customer_id}) + * to a meter's {@code customer_mapping.event_payload_key} (default is {@code stripe_customer_id}) * and {@code value_settings.event_payload_key} (default is {@code value}). Read more about the payload. */ @@ -122,7 +122,7 @@ public Builder putAllExtraParam(Map map) { /** * A unique identifier for the event. If not provided, one will be generated. We recommend using - * a globally unique identifier for this. We’ll enforce uniqueness within a rolling 24 hour + * a globally unique identifier for this. We'll enforce uniqueness within a rolling 24 hour * period. */ public Builder setIdentifier(String identifier) { diff --git a/src/main/java/com/stripe/param/v2/billing/MeterEventStreamCreateParams.java b/src/main/java/com/stripe/param/v2/billing/MeterEventStreamCreateParams.java index 8712b57029c8..8e4e900182de 100644 --- a/src/main/java/com/stripe/param/v2/billing/MeterEventStreamCreateParams.java +++ b/src/main/java/com/stripe/param/v2/billing/MeterEventStreamCreateParams.java @@ -124,7 +124,7 @@ public static class Event { /** * A unique identifier for the event. If not provided, one will be generated. We recommend using - * a globally unique identifier for this. We’ll enforce uniqueness within a rolling 24 hour + * a globally unique identifier for this. We'll enforce uniqueness within a rolling 24 hour * period. */ @SerializedName("identifier") @@ -132,7 +132,7 @@ public static class Event { /** * Required. The payload of the event. This must contain the fields - * corresponding to a meter’s {@code customer_mapping.event_payload_key} (default is {@code + * corresponding to a meter's {@code customer_mapping.event_payload_key} (default is {@code * stripe_customer_id}) and {@code value_settings.event_payload_key} (default is {@code value}). * Read more about the payload. @@ -218,7 +218,7 @@ public Builder putAllExtraParam(Map map) { /** * A unique identifier for the event. If not provided, one will be generated. We recommend - * using a globally unique identifier for this. We’ll enforce uniqueness within a rolling 24 + * using a globally unique identifier for this. We'll enforce uniqueness within a rolling 24 * hour period. */ public Builder setIdentifier(String identifier) { diff --git a/src/main/java/com/stripe/param/v2/core/AccountCreateParams.java b/src/main/java/com/stripe/param/v2/core/AccountCreateParams.java index 18148ee9f218..40bf5bc8f409 100644 --- a/src/main/java/com/stripe/param/v2/core/AccountCreateParams.java +++ b/src/main/java/com/stripe/param/v2/core/AccountCreateParams.java @@ -9668,6 +9668,10 @@ public Builder setUserAgent(String userAgent) { @Getter @EqualsAndHashCode(callSuper = false) public static class BusinessDetails { + /** Additional addresses associated with the business. */ + @SerializedName("additional_addresses") + List additionalAddresses; + /** The business registration address of the business entity. */ @SerializedName("address") Address address; @@ -9729,6 +9733,7 @@ public static class BusinessDetails { Structure structure; private BusinessDetails( + List additionalAddresses, Address address, AnnualRevenue annualRevenue, Documents documents, @@ -9742,6 +9747,7 @@ private BusinessDetails( ScriptAddresses scriptAddresses, ScriptNames scriptNames, Structure structure) { + this.additionalAddresses = additionalAddresses; this.address = address; this.annualRevenue = annualRevenue; this.documents = documents; @@ -9762,6 +9768,9 @@ public static Builder builder() { } public static class Builder { + private List + additionalAddresses; + private Address address; private AnnualRevenue annualRevenue; @@ -9791,6 +9800,7 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public AccountCreateParams.Identity.BusinessDetails build() { return new AccountCreateParams.Identity.BusinessDetails( + this.additionalAddresses, this.address, this.annualRevenue, this.documents, @@ -9806,6 +9816,36 @@ public AccountCreateParams.Identity.BusinessDetails build() { this.structure); } + /** + * Add an element to `additionalAddresses` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link AccountCreateParams.Identity.BusinessDetails#additionalAddresses} for the + * field documentation. + */ + public Builder addAdditionalAddress( + AccountCreateParams.Identity.BusinessDetails.AdditionalAddress element) { + if (this.additionalAddresses == null) { + this.additionalAddresses = new ArrayList<>(); + } + this.additionalAddresses.add(element); + return this; + } + + /** + * Add all elements to `additionalAddresses` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link AccountCreateParams.Identity.BusinessDetails#additionalAddresses} for the + * field documentation. + */ + public Builder addAllAdditionalAddress( + List elements) { + if (this.additionalAddresses == null) { + this.additionalAddresses = new ArrayList<>(); + } + this.additionalAddresses.addAll(elements); + return this; + } + /** The business registration address of the business entity. */ public Builder setAddress(AccountCreateParams.Identity.BusinessDetails.Address address) { this.address = address; @@ -9939,6 +9979,211 @@ public Builder setStructure( } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AdditionalAddress { + /** City, district, suburb, town, or village. */ + @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; + + /** Address line 1 (e.g., street, PO Box, or company name). */ + @SerializedName("line1") + String line1; + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** Required. Purpose of additional address. */ + @SerializedName("purpose") + Purpose purpose; + + /** State, county, province, or region. */ + @SerializedName("state") + String state; + + /** Town or district. */ + @SerializedName("town") + String town; + + private AdditionalAddress( + String city, + String country, + Map extraParams, + String line1, + String line2, + String postalCode, + Purpose purpose, + String state, + String town) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.purpose = purpose; + 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 Purpose purpose; + + private String state; + + private String town; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Identity.BusinessDetails.AdditionalAddress build() { + return new AccountCreateParams.Identity.BusinessDetails.AdditionalAddress( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.purpose, + this.state, + this.town); + } + + /** City, district, suburb, town, or village. */ + 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 + * AccountCreateParams.Identity.BusinessDetails.AdditionalAddress#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.Identity.BusinessDetails.AdditionalAddress#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Address line 1 (e.g., 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). */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** Required. Purpose of additional address. */ + public Builder setPurpose( + AccountCreateParams.Identity.BusinessDetails.AdditionalAddress.Purpose purpose) { + this.purpose = purpose; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** Town or district. */ + public Builder setTown(String town) { + this.town = town; + return this; + } + } + + public enum Purpose implements ApiRequestParams.EnumParam { + @SerializedName("administrative") + ADMINISTRATIVE("administrative"), + + @SerializedName("principal_place_of_business") + PRINCIPAL_PLACE_OF_BUSINESS("principal_place_of_business"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Purpose(String value) { + this.value = value; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Address { diff --git a/src/main/java/com/stripe/param/v2/core/AccountTokenCreateParams.java b/src/main/java/com/stripe/param/v2/core/AccountTokenCreateParams.java index 7b821226f94d..616cd1a4f831 100644 --- a/src/main/java/com/stripe/param/v2/core/AccountTokenCreateParams.java +++ b/src/main/java/com/stripe/param/v2/core/AccountTokenCreateParams.java @@ -974,6 +974,10 @@ public Builder setShownAndAccepted(Boolean shownAndAccepted) { @Getter @EqualsAndHashCode(callSuper = false) public static class BusinessDetails { + /** Additional addresses associated with the business. */ + @SerializedName("additional_addresses") + List additionalAddresses; + /** The business registration address of the business entity. */ @SerializedName("address") Address address; @@ -1035,6 +1039,8 @@ public static class BusinessDetails { Structure structure; private BusinessDetails( + List + additionalAddresses, Address address, AnnualRevenue annualRevenue, Documents documents, @@ -1048,6 +1054,7 @@ private BusinessDetails( ScriptAddresses scriptAddresses, ScriptNames scriptNames, Structure structure) { + this.additionalAddresses = additionalAddresses; this.address = address; this.annualRevenue = annualRevenue; this.documents = documents; @@ -1068,6 +1075,9 @@ public static Builder builder() { } public static class Builder { + private List + additionalAddresses; + private Address address; private AnnualRevenue annualRevenue; @@ -1097,6 +1107,7 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public AccountTokenCreateParams.Identity.BusinessDetails build() { return new AccountTokenCreateParams.Identity.BusinessDetails( + this.additionalAddresses, this.address, this.annualRevenue, this.documents, @@ -1112,6 +1123,36 @@ public AccountTokenCreateParams.Identity.BusinessDetails build() { this.structure); } + /** + * Add an element to `additionalAddresses` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link AccountTokenCreateParams.Identity.BusinessDetails#additionalAddresses} for the + * field documentation. + */ + public Builder addAdditionalAddress( + AccountTokenCreateParams.Identity.BusinessDetails.AdditionalAddress element) { + if (this.additionalAddresses == null) { + this.additionalAddresses = new ArrayList<>(); + } + this.additionalAddresses.add(element); + return this; + } + + /** + * Add all elements to `additionalAddresses` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link AccountTokenCreateParams.Identity.BusinessDetails#additionalAddresses} for the + * field documentation. + */ + public Builder addAllAdditionalAddress( + List elements) { + if (this.additionalAddresses == null) { + this.additionalAddresses = new ArrayList<>(); + } + this.additionalAddresses.addAll(elements); + return this; + } + /** The business registration address of the business entity. */ public Builder setAddress( AccountTokenCreateParams.Identity.BusinessDetails.Address address) { @@ -1247,6 +1288,211 @@ public Builder setStructure( } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AdditionalAddress { + /** City, district, suburb, town, or village. */ + @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; + + /** Address line 1 (e.g., street, PO Box, or company name). */ + @SerializedName("line1") + String line1; + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** Required. Purpose of additional address. */ + @SerializedName("purpose") + Purpose purpose; + + /** State, county, province, or region. */ + @SerializedName("state") + String state; + + /** Town or district. */ + @SerializedName("town") + String town; + + private AdditionalAddress( + String city, + String country, + Map extraParams, + String line1, + String line2, + String postalCode, + Purpose purpose, + String state, + String town) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.purpose = purpose; + 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 Purpose purpose; + + private String state; + + private String town; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.BusinessDetails.AdditionalAddress build() { + return new AccountTokenCreateParams.Identity.BusinessDetails.AdditionalAddress( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.purpose, + this.state, + this.town); + } + + /** City, district, suburb, town, or village. */ + 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 + * AccountTokenCreateParams.Identity.BusinessDetails.AdditionalAddress#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 + * AccountTokenCreateParams.Identity.BusinessDetails.AdditionalAddress#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Address line 1 (e.g., 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). */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** Required. Purpose of additional address. */ + public Builder setPurpose( + AccountTokenCreateParams.Identity.BusinessDetails.AdditionalAddress.Purpose purpose) { + this.purpose = purpose; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** Town or district. */ + public Builder setTown(String town) { + this.town = town; + return this; + } + } + + public enum Purpose implements ApiRequestParams.EnumParam { + @SerializedName("administrative") + ADMINISTRATIVE("administrative"), + + @SerializedName("principal_place_of_business") + PRINCIPAL_PLACE_OF_BUSINESS("principal_place_of_business"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Purpose(String value) { + this.value = value; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Address { diff --git a/src/main/java/com/stripe/param/v2/core/AccountUpdateParams.java b/src/main/java/com/stripe/param/v2/core/AccountUpdateParams.java index 8e1b182a0a89..adbc8bee883f 100644 --- a/src/main/java/com/stripe/param/v2/core/AccountUpdateParams.java +++ b/src/main/java/com/stripe/param/v2/core/AccountUpdateParams.java @@ -10576,6 +10576,10 @@ public Builder setUserAgent(EmptyParam userAgent) { @Getter @EqualsAndHashCode(callSuper = false) public static class BusinessDetails { + /** Additional addresses associated with the business. */ + @SerializedName("additional_addresses") + List additionalAddresses; + /** The business registration address of the business entity. */ @SerializedName("address") Address address; @@ -10637,6 +10641,7 @@ public static class BusinessDetails { Structure structure; private BusinessDetails( + List additionalAddresses, Address address, AnnualRevenue annualRevenue, Documents documents, @@ -10650,6 +10655,7 @@ private BusinessDetails( ScriptAddresses scriptAddresses, ScriptNames scriptNames, Structure structure) { + this.additionalAddresses = additionalAddresses; this.address = address; this.annualRevenue = annualRevenue; this.documents = documents; @@ -10670,6 +10676,9 @@ public static Builder builder() { } public static class Builder { + private List + additionalAddresses; + private Address address; private AnnualRevenue annualRevenue; @@ -10699,6 +10708,7 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public AccountUpdateParams.Identity.BusinessDetails build() { return new AccountUpdateParams.Identity.BusinessDetails( + this.additionalAddresses, this.address, this.annualRevenue, this.documents, @@ -10714,6 +10724,36 @@ public AccountUpdateParams.Identity.BusinessDetails build() { this.structure); } + /** + * Add an element to `additionalAddresses` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link AccountUpdateParams.Identity.BusinessDetails#additionalAddresses} for the + * field documentation. + */ + public Builder addAdditionalAddress( + AccountUpdateParams.Identity.BusinessDetails.AdditionalAddress element) { + if (this.additionalAddresses == null) { + this.additionalAddresses = new ArrayList<>(); + } + this.additionalAddresses.add(element); + return this; + } + + /** + * Add all elements to `additionalAddresses` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link AccountUpdateParams.Identity.BusinessDetails#additionalAddresses} for the + * field documentation. + */ + public Builder addAllAdditionalAddress( + List elements) { + if (this.additionalAddresses == null) { + this.additionalAddresses = new ArrayList<>(); + } + this.additionalAddresses.addAll(elements); + return this; + } + /** The business registration address of the business entity. */ public Builder setAddress(AccountUpdateParams.Identity.BusinessDetails.Address address) { this.address = address; @@ -10859,6 +10899,256 @@ public Builder setStructure( } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AdditionalAddress { + /** City, district, suburb, town, or village. */ + @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; + + /** Address line 1 (e.g., street, PO Box, or company name). */ + @SerializedName("line1") + Object line1; + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + @SerializedName("line2") + Object line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + Object postalCode; + + /** Required. Purpose of additional address. */ + @SerializedName("purpose") + Purpose purpose; + + /** State, county, province, or region. */ + @SerializedName("state") + Object state; + + /** Town or district. */ + @SerializedName("town") + Object town; + + private AdditionalAddress( + Object city, + Object country, + Map extraParams, + Object line1, + Object line2, + Object postalCode, + Purpose purpose, + Object state, + Object town) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.purpose = purpose; + 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 Purpose purpose; + + private Object state; + + private Object town; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Identity.BusinessDetails.AdditionalAddress build() { + return new AccountUpdateParams.Identity.BusinessDetails.AdditionalAddress( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.purpose, + this.state, + this.town); + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** City, district, suburb, town, or village. */ + 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 + * AccountUpdateParams.Identity.BusinessDetails.AdditionalAddress#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.Identity.BusinessDetails.AdditionalAddress#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Address line 1 (e.g., 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). */ + public Builder setLine1(EmptyParam line1) { + this.line1 = line1; + return this; + } + + /** Address line 2 (e.g., 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). */ + public Builder setLine2(EmptyParam line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } + + /** Required. Purpose of additional address. */ + public Builder setPurpose( + AccountUpdateParams.Identity.BusinessDetails.AdditionalAddress.Purpose purpose) { + this.purpose = purpose; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(EmptyParam state) { + this.state = state; + return this; + } + + /** Town or district. */ + public Builder setTown(String town) { + this.town = town; + return this; + } + + /** Town or district. */ + public Builder setTown(EmptyParam town) { + this.town = town; + return this; + } + } + + public enum Purpose implements ApiRequestParams.EnumParam { + @SerializedName("administrative") + ADMINISTRATIVE("administrative"), + + @SerializedName("principal_place_of_business") + PRINCIPAL_PLACE_OF_BUSINESS("principal_place_of_business"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Purpose(String value) { + this.value = value; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Address { diff --git a/src/main/java/com/stripe/service/AccountPersonService.java b/src/main/java/com/stripe/service/AccountPersonService.java index 4d369fa85dd7..70b542fb8502 100644 --- a/src/main/java/com/stripe/service/AccountPersonService.java +++ b/src/main/java/com/stripe/service/AccountPersonService.java @@ -25,7 +25,7 @@ public AccountPersonService(StripeResponseGetter responseGetter) { /** * Deletes an existing person’s relationship to the account’s legal entity. Any person with a * relationship for an account can be deleted through the API, except if the person is the {@code - * account_opener}. If your integration is using the {@code executive} parameter, you cannot + * representative}. If your integration is using the {@code executive} parameter, you cannot * delete the only verified {@code executive} on file. */ public Person delete(String account, String person) throws StripeException { @@ -34,7 +34,7 @@ public Person delete(String account, String person) throws StripeException { /** * Deletes an existing person’s relationship to the account’s legal entity. Any person with a * relationship for an account can be deleted through the API, except if the person is the {@code - * account_opener}. If your integration is using the {@code executive} parameter, you cannot + * representative}. If your integration is using the {@code executive} parameter, you cannot * delete the only verified {@code executive} on file. */ public Person delete(String account, String person, RequestOptions options) diff --git a/src/main/java/com/stripe/service/AccountService.java b/src/main/java/com/stripe/service/AccountService.java index fb2843acbde7..8c5774fcbcb0 100644 --- a/src/main/java/com/stripe/service/AccountService.java +++ b/src/main/java/com/stripe/service/AccountService.java @@ -17,6 +17,7 @@ import com.stripe.param.AccountRejectParams; import com.stripe.param.AccountRetrieveCurrentParams; import com.stripe.param.AccountRetrieveParams; +import com.stripe.param.AccountUnrejectParams; import com.stripe.param.AccountUpdateParams; public final class AccountService extends ApiService { @@ -263,9 +264,10 @@ public StripeCollection list(AccountListParams params, RequestOptions o * href="https://dashboard.stripe.com/account/applications/settings">register your platform. * *

If you’ve already collected information for your connected accounts, you can prefill that - * information when creating the account. Connect Onboarding won’t ask for the prefilled - * information during account onboarding. You can prefill any information on the account. + * href="https://stripe.com/connect/marketplace/tasks/create#prefill-account-information">can + * prefill that information when creating the account. Connect Onboarding won’t ask for the + * prefilled information during account onboarding. You can prefill any information on the + * account. */ public Account create(AccountCreateParams params) throws StripeException { return create(params, (RequestOptions) null); @@ -276,9 +278,10 @@ public Account create(AccountCreateParams params) throws StripeException { * href="https://dashboard.stripe.com/account/applications/settings">register your platform. * *

If you’ve already collected information for your connected accounts, you can prefill that - * information when creating the account. Connect Onboarding won’t ask for the prefilled - * information during account onboarding. You can prefill any information on the account. + * href="https://stripe.com/connect/marketplace/tasks/create#prefill-account-information">can + * prefill that information when creating the account. Connect Onboarding won’t ask for the + * prefilled information during account onboarding. You can prefill any information on the + * account. */ public Account create(RequestOptions options) throws StripeException { return create((AccountCreateParams) null, options); @@ -289,9 +292,10 @@ public Account create(RequestOptions options) throws StripeException { * href="https://dashboard.stripe.com/account/applications/settings">register your platform. * *

If you’ve already collected information for your connected accounts, you can prefill that - * information when creating the account. Connect Onboarding won’t ask for the prefilled - * information during account onboarding. You can prefill any information on the account. + * href="https://stripe.com/connect/marketplace/tasks/create#prefill-account-information">can + * prefill that information when creating the account. Connect Onboarding won’t ask for the + * prefilled information during account onboarding. You can prefill any information on the + * account. */ public Account create() throws StripeException { return create((AccountCreateParams) null, (RequestOptions) null); @@ -302,9 +306,10 @@ public Account create() throws StripeException { * href="https://dashboard.stripe.com/account/applications/settings">register your platform. * *

If you’ve already collected information for your connected accounts, you can prefill that - * information when creating the account. Connect Onboarding won’t ask for the prefilled - * information during account onboarding. You can prefill any information on the account. + * href="https://stripe.com/connect/marketplace/tasks/create#prefill-account-information">can + * prefill that information when creating the account. Connect Onboarding won’t ask for the + * prefilled information during account onboarding. You can prefill any information on the + * account. */ public Account create(AccountCreateParams params, RequestOptions options) throws StripeException { String path = "/v1/accounts"; @@ -322,8 +327,7 @@ public Account create(AccountCreateParams params, RequestOptions options) throws * flagged as suspicious. * *

Only accounts where your platform is liable for negative account balances, which includes - * Custom and Express accounts, can be rejected. Test-mode accounts can be rejected at any time. - * Live-mode accounts can only be rejected after all balances are zero. + * Custom and Express accounts, can be rejected. */ public Account reject(String account, AccountRejectParams params) throws StripeException { return reject(account, params, (RequestOptions) null); @@ -333,8 +337,7 @@ public Account reject(String account, AccountRejectParams params) throws StripeE * flagged as suspicious. * *

Only accounts where your platform is liable for negative account balances, which includes - * Custom and Express accounts, can be rejected. Test-mode accounts can be rejected at any time. - * Live-mode accounts can only be rejected after all balances are zero. + * Custom and Express accounts, can be rejected. */ public Account reject(String account, AccountRejectParams params, RequestOptions options) throws StripeException { @@ -348,6 +351,67 @@ public Account reject(String account, AccountRejectParams params, RequestOptions options); return this.request(request, Account.class); } + /** + * With Connect, you can unreject accounts that you have previously rejected. + * + *

Only accounts that were rejected by your platform can be unrejected. This API cannot be used + * to unreject accounts that were rejected by Stripe. + * + *

Unreject will only enable charges and/or payouts if there are no other restrictions other + * than those placed by a previous rejection. If you have separately paused charges and/or payouts + * outside of rejection, those pauses will remain in place after unrejection. + */ + public Account unreject(String account, AccountUnrejectParams params) throws StripeException { + return unreject(account, params, (RequestOptions) null); + } + /** + * With Connect, you can unreject accounts that you have previously rejected. + * + *

Only accounts that were rejected by your platform can be unrejected. This API cannot be used + * to unreject accounts that were rejected by Stripe. + * + *

Unreject will only enable charges and/or payouts if there are no other restrictions other + * than those placed by a previous rejection. If you have separately paused charges and/or payouts + * outside of rejection, those pauses will remain in place after unrejection. + */ + public Account unreject(String account, RequestOptions options) throws StripeException { + return unreject(account, (AccountUnrejectParams) null, options); + } + /** + * With Connect, you can unreject accounts that you have previously rejected. + * + *

Only accounts that were rejected by your platform can be unrejected. This API cannot be used + * to unreject accounts that were rejected by Stripe. + * + *

Unreject will only enable charges and/or payouts if there are no other restrictions other + * than those placed by a previous rejection. If you have separately paused charges and/or payouts + * outside of rejection, those pauses will remain in place after unrejection. + */ + public Account unreject(String account) throws StripeException { + return unreject(account, (AccountUnrejectParams) null, (RequestOptions) null); + } + /** + * With Connect, you can unreject accounts that you have previously rejected. + * + *

Only accounts that were rejected by your platform can be unrejected. This API cannot be used + * to unreject accounts that were rejected by Stripe. + * + *

Unreject will only enable charges and/or payouts if there are no other restrictions other + * than those placed by a previous rejection. If you have separately paused charges and/or payouts + * outside of rejection, those pauses will remain in place after unrejection. + */ + public Account unreject(String account, AccountUnrejectParams params, RequestOptions options) + throws StripeException { + String path = String.format("/v1/accounts/%s/unreject", ApiResource.urlEncodeId(account)); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, Account.class); + } public com.stripe.service.AccountCapabilityService capabilities() { return new com.stripe.service.AccountCapabilityService(this.getResponseGetter()); diff --git a/src/main/java/com/stripe/service/DisputeService.java b/src/main/java/com/stripe/service/DisputeService.java index 5d8bcc095c81..729539cf87df 100644 --- a/src/main/java/com/stripe/service/DisputeService.java +++ b/src/main/java/com/stripe/service/DisputeService.java @@ -135,7 +135,7 @@ public Dispute update(String dispute, DisputeUpdateParams params, RequestOptions } /** * Closing the dispute for a charge indicates that you do not have any evidence to submit and are - * essentially dismissing the dispute, acknowledging it as lost. + * essentially dismissing the dispute (accepting it), acknowledging it as lost. * *

The status of the dispute will change from {@code needs_response} to {@code lost}. * Closing a dispute is irreversible. @@ -145,7 +145,7 @@ public Dispute close(String dispute, DisputeCloseParams params) throws StripeExc } /** * Closing the dispute for a charge indicates that you do not have any evidence to submit and are - * essentially dismissing the dispute, acknowledging it as lost. + * essentially dismissing the dispute (accepting it), acknowledging it as lost. * *

The status of the dispute will change from {@code needs_response} to {@code lost}. * Closing a dispute is irreversible. @@ -155,7 +155,7 @@ public Dispute close(String dispute, RequestOptions options) throws StripeExcept } /** * Closing the dispute for a charge indicates that you do not have any evidence to submit and are - * essentially dismissing the dispute, acknowledging it as lost. + * essentially dismissing the dispute (accepting it), acknowledging it as lost. * *

The status of the dispute will change from {@code needs_response} to {@code lost}. * Closing a dispute is irreversible. @@ -165,7 +165,7 @@ public Dispute close(String dispute) throws StripeException { } /** * Closing the dispute for a charge indicates that you do not have any evidence to submit and are - * essentially dismissing the dispute, acknowledging it as lost. + * essentially dismissing the dispute (accepting it), acknowledging it as lost. * *

The status of the dispute will change from {@code needs_response} to {@code lost}. * Closing a dispute is irreversible. diff --git a/src/main/java/com/stripe/service/PaymentMethodService.java b/src/main/java/com/stripe/service/PaymentMethodService.java index 377a89efaf79..dec1d4087a19 100644 --- a/src/main/java/com/stripe/service/PaymentMethodService.java +++ b/src/main/java/com/stripe/service/PaymentMethodService.java @@ -291,30 +291,30 @@ public PaymentMethod attach( return this.request(request, PaymentMethod.class); } /** - * Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no - * longer be used for a payment or re-attached to a Customer. + * Detaches a PaymentMethod object from a Customer. Detachment is permanent and irreversible — + * once detached, a PaymentMethod can no longer be used for payments or re-attached to a Customer. */ public PaymentMethod detach(String paymentMethod, PaymentMethodDetachParams params) throws StripeException { return detach(paymentMethod, params, (RequestOptions) null); } /** - * Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no - * longer be used for a payment or re-attached to a Customer. + * Detaches a PaymentMethod object from a Customer. Detachment is permanent and irreversible — + * once detached, a PaymentMethod can no longer be used for payments or re-attached to a Customer. */ public PaymentMethod detach(String paymentMethod, RequestOptions options) throws StripeException { return detach(paymentMethod, (PaymentMethodDetachParams) null, options); } /** - * Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no - * longer be used for a payment or re-attached to a Customer. + * Detaches a PaymentMethod object from a Customer. Detachment is permanent and irreversible — + * once detached, a PaymentMethod can no longer be used for payments or re-attached to a Customer. */ public PaymentMethod detach(String paymentMethod) throws StripeException { return detach(paymentMethod, (PaymentMethodDetachParams) null, (RequestOptions) null); } /** - * Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no - * longer be used for a payment or re-attached to a Customer. + * Detaches a PaymentMethod object from a Customer. Detachment is permanent and irreversible — + * once detached, a PaymentMethod can no longer be used for payments or re-attached to a Customer. */ public PaymentMethod detach( String paymentMethod, PaymentMethodDetachParams params, RequestOptions options) diff --git a/src/main/java/com/stripe/service/PaymentRecordService.java b/src/main/java/com/stripe/service/PaymentRecordService.java index 8ab61a4ef4d0..8e875a3d9b1a 100644 --- a/src/main/java/com/stripe/service/PaymentRecordService.java +++ b/src/main/java/com/stripe/service/PaymentRecordService.java @@ -1,8 +1,10 @@ // File generated from our OpenAPI spec package com.stripe.service; +import com.google.gson.reflect.TypeToken; import com.stripe.exception.StripeException; import com.stripe.model.PaymentRecord; +import com.stripe.model.StripeCollection; import com.stripe.net.ApiRequest; import com.stripe.net.ApiRequestParams; import com.stripe.net.ApiResource; @@ -10,6 +12,7 @@ import com.stripe.net.BaseAddress; import com.stripe.net.RequestOptions; import com.stripe.net.StripeResponseGetter; +import com.stripe.param.PaymentRecordListParams; import com.stripe.param.PaymentRecordReportPaymentAttemptCanceledParams; import com.stripe.param.PaymentRecordReportPaymentAttemptFailedParams; import com.stripe.param.PaymentRecordReportPaymentAttemptGuaranteedParams; @@ -24,6 +27,32 @@ public PaymentRecordService(StripeResponseGetter responseGetter) { super(responseGetter); } + /** List all the Payment Records for a given merchant. */ + public StripeCollection list(PaymentRecordListParams params) + throws StripeException { + return list(params, (RequestOptions) null); + } + /** List all the Payment Records for a given merchant. */ + public StripeCollection list(RequestOptions options) throws StripeException { + return list((PaymentRecordListParams) null, options); + } + /** List all the Payment Records for a given merchant. */ + public StripeCollection list() throws StripeException { + return list((PaymentRecordListParams) null, (RequestOptions) null); + } + /** List all the Payment Records for a given merchant. */ + public StripeCollection list( + PaymentRecordListParams params, RequestOptions options) throws StripeException { + String path = "/v1/payment_records"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, new TypeToken>() {}.getType()); + } /** Retrieves a Payment Record with the given ID. */ public PaymentRecord retrieve(String id, PaymentRecordRetrieveParams params) throws StripeException { From a6ef3a364b635cfd15afdd349a73e11109f1b4b8 Mon Sep 17 00:00:00 2001 From: Jesse Rosalia Date: Wed, 29 Jul 2026 16:27:01 -0700 Subject: [PATCH 2/2] Bump version to 33.2.0 --- CHANGELOG.md | 40 ++++++++++++++++++++++++++++ README.md | 10 +++---- VERSION | 2 +- gradle.properties | 2 +- src/main/java/com/stripe/Stripe.java | 2 +- 5 files changed, 48 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 48729bcb660c..5e8519cb1273 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,45 @@ # Changelog +## 33.2.0 - 2026-07-29 +This release changes the pinned API version to 2026-07-29.dahlia. + +* [#2257](https://github.com/stripe/stripe-java/pull/2257) Update generated code + * Add support for new resource `financialconnections.Authorization` + * Add support for `unreject` method on resource `Account` + * Add support for `list` method on resource `PaymentRecord` + * Add support for `smartDisputesManagement` on `AccountSession.components.disputes_list.features`, `AccountSession.components.payment_details.features`, `AccountSession.components.payment_disputes.features`, `AccountSession.components.payments.features`, `AccountSessionCreateParams.components.disputes_list.features`, `AccountSessionCreateParams.components.payment_details.features`, `AccountSessionCreateParams.components.payment_disputes.features`, and `AccountSessionCreateParams.components.payments.features` + * Add support for `administrativeAddress` and `principalPlaceOfBusiness` on `Account.company`, `AccountCreateParams.company`, `AccountUpdateParams.company`, and `TokenCreateParams.account.company` + * Add support for `sepaDebitPayments` on `AccountUpdateParams.settings` + * Remove support for `proofOfRegistration` on `AccountCreateParams.documents`. This field was limited-use and is being deprecated. + * Add support for `payoutsAction` on `AccountRejectParams` + * Remove support for `dynamicTaxRates` on `checkout.SessionCreateParams.line_items[]`. This field was limited-use and is being deprecated. + * Add support for `setupFutureUsage` on `PaymentIntent.payment_method_options.payco`, `PaymentIntent.payment_method_options.samsung_pay`, `PaymentIntentConfirmParams.payment_method_options.payco`, `PaymentIntentConfirmParams.payment_method_options.samsung_pay`, `PaymentIntentCreateParams.payment_method_options.payco`, `PaymentIntentCreateParams.payment_method_options.samsung_pay`, `PaymentIntentUpdateParams.payment_method_options.payco`, `PaymentIntentUpdateParams.payment_method_options.samsung_pay`, `PaymentLinkUpdateParams.payment_intent_data`, `checkout.Session.payment_method_options.payco`, `checkout.Session.payment_method_options.samsung_pay`, `checkout.SessionCreateParams.payment_method_options.payco`, and `checkout.SessionCreateParams.payment_method_options.samsung_pay` + * Add support for new values `bnp_paribas`, `citibank`, and `mbsb_bank` on enums `ConfirmationTokenCreateParams.payment_method_data.fpx.bank`, `PaymentIntentConfirmParams.payment_method_data.fpx.bank`, `PaymentIntentCreateParams.payment_method_data.fpx.bank`, `PaymentIntentUpdateParams.payment_method_data.fpx.bank`, `PaymentMethodCreateParams.fpx.bank`, `SetupIntentConfirmParams.payment_method_data.fpx.bank`, `SetupIntentCreateParams.payment_method_data.fpx.bank`, and `SetupIntentUpdateParams.payment_method_data.fpx.bank` + * Add support for new value `ic_nif` on enums `CustomerCreateParams.tax_id_data[].type`, `InvoiceCreatePreviewParams.customer_details.tax_ids[].type`, `TaxIdCreateParams.type`, and `tax.CalculationCreateParams.customer_details.tax_ids[].type` + * Add support for `network` on `Dispute.payment_method_details.card` + * Add support for `limits` and `manualEntry` on `financialconnections.SessionCreateParams` and `financialconnections.Session` + * Add support for `requirePaymentMethodSupport` on `financialconnections.Session.filters` and `financialconnections.SessionCreateParams.filters` + * Add support for `bankAccountToken` on `financialconnections.Session` + * Add support for new values `alipay` and `mb_way` on enums `InvoiceCreateParams.payment_settings.paymentMethodTypes`, `InvoiceUpdateParams.payment_settings.paymentMethodTypes`, `SubscriptionCreateParams.payment_settings.paymentMethodTypes`, and `SubscriptionUpdateParams.payment_settings.paymentMethodTypes` + * Add support for new values `mass_transit_parking_tax` and `parking_tax` on enums `InvoiceAddLinesParams.lines[].tax_amounts[].tax_rate_data.taxType`, `InvoiceLineItemUpdateParams.tax_amounts[].tax_rate_data.taxType`, `InvoiceUpdateLinesParams.lines[].tax_amounts[].tax_rate_data.taxType`, `TaxRateCreateParams.taxType`, and `TaxRateUpdateParams.taxType` + * Add support for `metadata` on `InvoiceCreatePreviewParams.subscription_details` + * Add support for `businessName` on `issuing.Card.shipping`, `issuing.CardCreateParams.shipping`, and `issuing.CardUpdateParams.shipping` + * Add support for `allowedPaymentMethodTypes` on `PaymentIntentConfirmParams`, `PaymentIntentCreateParams`, `PaymentIntentUpdateParams`, `PaymentIntent`, `SetupIntentConfirmParams`, `SetupIntentCreateParams`, `SetupIntentUpdateParams`, and `SetupIntent` + * Add support for `referrer` on `PaymentIntentConfirmParams.radar_options` and `PaymentIntentCreateParams.radar_options` + * Add support for `consentCollection` and `shippingOptions` on `PaymentLinkUpdateParams` + * Add support for `customFields`, `description`, and `footer` on `Quote.invoice_settings`, `QuoteCreateParams.invoice_settings`, `QuoteUpdateParams.invoice_settings`, `SubscriptionSchedule.default_settings.invoice_settings`, `SubscriptionSchedule.phases[].invoice_settings`, `SubscriptionScheduleCreateParams.default_settings.invoice_settings`, `SubscriptionScheduleCreateParams.phases[].invoice_settings`, `SubscriptionScheduleUpdateParams.default_settings.invoice_settings`, and `SubscriptionScheduleUpdateParams.phases[].invoice_settings` + * Add support for `customerAccount` and `customer` on `Refund` + * Add support for `paymentMethod` on `Refund` and `Topup` + * Add support for `trial` on `SubscriptionSchedule.phases[]` + * Add support for `massTransitParkingTax` and `parkingTax` on `tax.Registration.country_options.us` and `tax.RegistrationCreateParams.country_options.us` + * Add support for new values `mass_transit_parking_tax` and `parking_tax` on enum `tax.RegistrationCreateParams.country_options.us.type` + * Add support for `initiatedBy` and `paymentMethodOptions` on `Topup` + * Add support for new values `financial_connections.account.expected_deactivation_date_updated`, `financial_connections.account.supported_payment_method_types_updated`, `financial_connections.account.upcoming_deactivation`, `financial_connections.authorization.expected_deactivation_date_updated`, and `financial_connections.authorization.upcoming_deactivation` on enums `WebhookEndpointCreateParams.enabledEvents` and `WebhookEndpointUpdateParams.enabledEvents` + * Add support for new value `2026-07-29.dahlia` on enum `WebhookEndpointCreateParams.apiVersion` + * Add support for `additionalAddresses` on `v2.core.Account.identity.business_details`, `v2.core.AccountCreateParams.identity.business_details`, `v2.core.AccountTokenCreateParams.identity.business_details`, and `v2.core.AccountUpdateParams.identity.business_details` + * Add support for snapshot events `financial_connections.account.expected_deactivation_date_updated`, `financial_connections.account.supported_payment_method_types_updated`, and `financial_connections.account.upcoming_deactivation` with resource `financialconnections.Account` + * Add support for snapshot events `financial_connections.authorization.expected_deactivation_date_updated` and `financial_connections.authorization.upcoming_deactivation` with resource `financialconnections.Authorization` + ## 33.1.1 - 2026-07-15 * [#2244](https://github.com/stripe/stripe-java/pull/2244) Replace source hash with Telemetry UUID diff --git a/README.md b/README.md index 567d9f1d3ad3..7c062196d87b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Stripe Java client library -[![Maven Central](https://img.shields.io/badge/maven--central-v33.1.1-blue)](https://mvnrepository.com/artifact/com.stripe/stripe-java) +[![Maven Central](https://img.shields.io/badge/maven--central-v33.2.0-blue)](https://mvnrepository.com/artifact/com.stripe/stripe-java) [![JavaDoc](http://img.shields.io/badge/javadoc-reference-blue.svg)](https://stripe.dev/stripe-java) [![Build Status](https://github.com/stripe/stripe-java/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/stripe/stripe-java/actions?query=branch%3Amaster) @@ -26,7 +26,7 @@ We support LTS versions of the JDK. Currently, that's Java versions: Add this dependency to your project's build file: ```groovy -implementation "com.stripe:stripe-java:33.1.1" +implementation "com.stripe:stripe-java:33.2.0" ``` ### Maven users @@ -37,7 +37,7 @@ Add this dependency to your project's POM: com.stripe stripe-java - 33.1.1 + 33.2.0 ``` @@ -46,8 +46,8 @@ Add this dependency to your project's POM: If you are not using Gradle or Maven, you will need to manually install the following JARs: 1. The Stripe JAR: - - Download the latest release version from [Maven Central](https://repo1.maven.org/maven2/com/stripe/stripe-java/33.1.1/stripe-java-33.1.1.jar) - - Current release version: 33.1.1 + - Download the latest release version from [Maven Central](https://repo1.maven.org/maven2/com/stripe/stripe-java/33.2.0/stripe-java-33.2.0.jar) + - Current release version: 33.2.0 2. Google Gson: - The Stripe JAR builds and tests with Gson version 2.10.1 diff --git a/VERSION b/VERSION index 3d875153e8ed..c16f43d7aa5a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -33.1.1 +33.2.0 diff --git a/gradle.properties b/gradle.properties index ca3a17e5c762..8bb0da299c61 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ GROUP=com.stripe -VERSION_NAME=33.1.1 +VERSION_NAME=33.2.0 POM_URL=https://github.com/stripe/stripe-java POM_SCM_URL=git@github.com:stripe/stripe-java.git diff --git a/src/main/java/com/stripe/Stripe.java b/src/main/java/com/stripe/Stripe.java index 58dada49100b..9f15777752ea 100644 --- a/src/main/java/com/stripe/Stripe.java +++ b/src/main/java/com/stripe/Stripe.java @@ -14,7 +14,7 @@ public abstract class Stripe { public static final String LIVE_API_BASE = "https://api.stripe.com"; public static final String UPLOAD_API_BASE = "https://files.stripe.com"; public static final String METER_EVENTS_API_BASE = "https://meter-events.stripe.com"; - public static final String VERSION = "33.1.1"; + public static final String VERSION = "33.2.0"; public static volatile String apiKey; public static volatile String clientId;