diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fff31d40222..d60b4c54b36 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -51,13 +51,16 @@ jobs: strategy: fail-fast: false matrix: + # We test Stripe SDK against Java LTS versions(8, 11, 17, 21) and currently supported non-LTS versions. + # https://www.oracle.com/java/technologies/java-se-support-roadmap.html java-version: - "1.8" - "11" - "17" - - "18" - - "19" - - "20" + - "21" + - "22" + - "23" + - "24" steps: - uses: extractions/setup-just@v2 diff --git a/API_VERSION b/API_VERSION new file mode 100644 index 00000000000..c77af7bdda0 --- /dev/null +++ b/API_VERSION @@ -0,0 +1 @@ +2025-06-30.preview \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index c09276e0d88..5ddfff6efb2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -657,7 +657,7 @@ However, [a bug](https://github.com/stripe/stripe-java/pull/1906) in the `27.x.y ## 27.0.0 - 2024-10-01 * [#1880](https://github.com/stripe/stripe-java/pull/1880) Support for APIs in the new API version 2024-09-30.acacia - This release changes the pinned API version to `2024-09-30.acacia`. Please read the [API Upgrade Guide](https://stripe.com/docs/upgrades#2024-09-30.acacia) and carefully review the API changes before upgrading. + This release changes the pinned API version to `2024-09-30.acacia`. Please read the [API Changelog](https://docs.stripe.com/changelog/acacia#2024-09-30.acacia) and carefully review the API changes before upgrading. ### ⚠️ Breaking changes due to changes in the API @@ -884,7 +884,7 @@ However, [a bug](https://github.com/stripe/stripe-java/pull/1906) in the `27.x.y ## 26.0.0 - 2024-06-24 * [#1825](https://github.com/stripe/stripe-java/pull/1825) - This release changes the pinned API version to 2024-06-20. Please read the [API Upgrade Guide](https://stripe.com/docs/upgrades#2024-06-20) and carefully review the API changes before upgrading. + This release changes the pinned API version to 2024-06-20. Please read the [API Changelog](https://docs.stripe.com/changelog/2024-06-20) and carefully review the API changes before upgrading. ### ⚠️ Breaking changes @@ -1082,7 +1082,7 @@ However, [a bug](https://github.com/stripe/stripe-java/pull/1906) in the `27.x.y ## 25.0.0 - 2024-04-10 * [#1776](https://github.com/stripe/stripe-java/pull/1776) - * This release changes the pinned API version to `2024-04-10`. Please read the [API Upgrade Guide](https://stripe.com/docs/upgrades#2024-04-10) and carefully review the API changes before upgrading. + * This release changes the pinned API version to `2024-04-10`. Please read the [API Changelog](https://docs.stripe.com/changelog/2024-04-10) and carefully review the API changes before upgrading. * Add a new `TaxIdService` for operations on `/v1/tax_ids` endpoints. @@ -1583,7 +1583,7 @@ However, [a bug](https://github.com/stripe/stripe-java/pull/1906) in the `27.x.y - Update pinned API version to `2023-10-16` ## 24.0.0 - 2023-10-16 -* This release changes the pinned API version to `2023-10-16`. Please read the [API Upgrade Guide](https://stripe.com/docs/upgrades#2023-10-16) and carefully review the API changes before upgrading `stripe-java`. +* This release changes the pinned API version to `2023-10-16`. Please read the [API Changelog](https://docs.stripe.com/changelog/2023-10-16) and carefully review the API changes before upgrading `stripe-java`. * [#1672](https://github.com/stripe/stripe-java/pull/1672) Update generated code * Add support for `legal_guardian` on `AccountPersonsParams.relationship` and `TokenCreateParams.person.relationship` * Add support for `additional_tos_acceptances` on `TokenCreateParams.person` @@ -1743,7 +1743,7 @@ However, [a bug](https://github.com/stripe/stripe-java/pull/1906) in the `27.x.y * Add support for `flat_amount` on `tax.TransactionCreateReversalParams` ## 23.0.0 - 2023-08-16 -* This release changes the pinned API version to `2023-08-16`. Please read the [API Upgrade Guide](https://stripe.com/docs/upgrades#2023-08-16) and carefully review the API changes before upgrading `stripe-java`. +* This release changes the pinned API version to `2023-08-16`. Please read the [API Changelog](https://docs.stripe.com/changelog/2023-08-16) and carefully review the API changes before upgrading `stripe-java`. * More information is available in the [stripe-java v23 migration guide](https://github.com/stripe/stripe-java/wiki/Migration-guide-for-v23) "⚠️" symbol highlights breaking changes. @@ -2310,7 +2310,7 @@ However, [a bug](https://github.com/stripe/stripe-java/pull/1906) in the `27.x.y ## 22.0.0 - 2022-11-16 * [#1471](https://github.com/stripe/stripe-java/pull/1471) Next major release changes -Breaking changes that arose during code generation of the library that we postponed for the next major version. For changes to the Stripe products, read more at https://stripe.com/docs/upgrades#2022-11-15. +Breaking changes that arose during code generation of the library that we postponed for the next major version. For changes to the Stripe products, read more at https://docs.stripe.com/changelog/2022-11-15. "⚠️" symbol highlights breaking changes. @@ -2514,7 +2514,7 @@ RequestOptionsBuilder.unsafeSetStripeVersionOverride(builder, "2022-11-15"); This release includes breaking changes resulting from: -* Moving to use the new API version "2022-08-01". To learn more about these changes to Stripe products, see https://stripe.com/docs/upgrades#2022-08-01 +* Moving to use the new API version "2022-08-01". To learn more about these changes to Stripe products, see https://docs.stripe.com/changelog/2022-08-01 * Cleaning up the SDK to remove deprecated/unused APIs and rename classes/methods/properties to sync with product APIs. Read more detailed description at https://github.com/stripe/stripe-java/wiki/Migration-guide-for-v21. "⚠️" symbol highlights breaking changes. @@ -3943,7 +3943,7 @@ Pull requests included in this release (cf. [#869](https://github.com/stripe/str * The above are technically breaking changes and should have been released with 14.0.0. ## 14.0.0 - 2019-10-18 -* [#863](https://github.com/stripe/stripe-java/pull/863) Upgrade to new API version [`2019-10-17`](https://stripe.com/docs/upgrades#2019-10-17) +* [#863](https://github.com/stripe/stripe-java/pull/863) Upgrade to new API version [`2019-10-17`](https://docs.stripe.com/changelog/2019-10-17) * Pin to API version `2019-10-17` * Remove `account_balance` from Customer model and parameter classes * Remove `billing` from Invoice, Subscription and Subscription Schedule model and parameter classes @@ -3970,7 +3970,7 @@ Pull requests included in this release (cf. [#869](https://github.com/stripe/str * Add support for `deviceType` on `ReaderListParams` ## 13.0.0 - 2019-10-08 -* [#853](https://github.com/stripe/stripe-java/pull/853) Upgrade to new API version [`2019-10-08`](https://stripe.com/docs/upgrades#2019-10-08) +* [#853](https://github.com/stripe/stripe-java/pull/853) Upgrade to new API version [`2019-10-08`](https://docs.stripe.com/changelog/2019-10-08) ## 12.2.0 - 2019-10-08 * [#852](https://github.com/stripe/stripe-java/pull/852) Setters for string properties in update params now all accept `EmptyParam` @@ -4039,7 +4039,7 @@ Pull requests included in this release (cf. [#869](https://github.com/stripe/str * [#826](https://github.com/stripe/stripe-java/pull/826) Add support for `executive` on `Person` create, update and list ## 11.0.0 - 2019-08-14 -* [#825](https://github.com/stripe/stripe-java/pull/825) Move to API version [`2019-08-14`](https://stripe.com/docs/upgrades#2019-08-14) +* [#825](https://github.com/stripe/stripe-java/pull/825) Move to API version [`2019-08-14`](https://docs.stripe.com/changelog/2019-08-14) * Rename `platform_payments` to `transfers` in `Account` * Introduce `executive` as a relationship on `Person` @@ -4234,7 +4234,7 @@ Pull requests included in this release: * [#701](https://github.com/stripe/stripe-java/pull/701) Fix java doc on deprecated `EventData#getObject` and `Event#getDataObjectDeserializer` ## 8.0.0 - 2019-03-19 -* [#662](https://github.com/stripe/stripe-java/pull/662) Major version release. Supports a pinned API version [2019-03-14](https://stripe.com/docs/upgrades#2019-03-14). Refer to our [migration guide for v8](https://github.com/stripe/stripe-java/wiki/Migration-guide-for-v8) for API upgrade guide and lists of backwards incompatible changes to watch out for. +* [#662](https://github.com/stripe/stripe-java/pull/662) Major version release. Supports a pinned API version [2019-03-14](https://docs.stripe.com/changelog/2019-03-14). Refer to our [migration guide for v8](https://github.com/stripe/stripe-java/wiki/Migration-guide-for-v8) for API upgrade guide and lists of backwards incompatible changes to watch out for. ## 7.63.1 - 2020-17-11 * Identical to 7.29.0 @@ -4372,7 +4372,7 @@ Pull requests included in this release: * [#581](https://github.com/stripe/stripe-java/pull/581) Add `Topup.cancel()` overload with no arguments ## 6.8.0 - 2018-08-28 -* [#577](https://github.com/stripe/stripe-java/pull/577) Update `Customer` and `Plan` models for API version [2018-08-23](https://stripe.com/docs/upgrades#2018-08-23) +* [#577](https://github.com/stripe/stripe-java/pull/577) Update `Customer` and `Plan` models for API version [2018-08-23](https://docs.stripe.com/changelog/2018-08-23) * [#579](https://github.com/stripe/stripe-java/pull/579) Add `authorizationCode` to `Charge` ## 6.7.0 - 2018-08-27 @@ -4611,7 +4611,7 @@ Pull requests included in this release: * Add support for `available_payout_methods` to `Card` model ## 4.2.0 - 2017-04-06 -* Add support for payouts; see: https://stripe.com/docs/upgrades#2017-04-06 +* Add support for payouts; see: https://docs.stripe.com/changelog/2017-04-06 ## 4.1.0 - 2017-04-04 * Make `rule` under `ChargeOutcome` expandable @@ -4839,7 +4839,7 @@ Pull requests included in this release: ## 1.23.0 - 2014-12-08 * Java 1.5 support dropped. We strongly suggest using newer versions of Java due to runtime, VM, language, and syntax improvements -* Dispute Evidence has been updated to reflect the new version of Dispute evidence format introduced as part of api version 2014-12-08. See https://stripe.com/docs/upgrades#2014-12-08 for details +* Dispute Evidence has been updated to reflect the new version of Dispute evidence format introduced as part of api version 2014-12-08. See https://docs.stripe.com/changelog/2014-12-08 for details ## 1.22.0 - 2014-12-03 * Convention is to call methods with a RequestOptions object, instead of an API Key directly @@ -4863,7 +4863,7 @@ Pull requests included in this release: * A few non-breaking general cleanups ## 1.18.0 - 2014-08-25 -* Added isChargeRefundable and balanceTransactions to Dispute https://stripe.com/docs/upgrades#2014-08-20 +* Added isChargeRefundable and balanceTransactions to Dispute https://docs.stripe.com/changelog/2014-08-20 ## 1.17.0 - 2014-08-19 * Added metadata to Coupons @@ -4990,7 +4990,7 @@ Pull requests included in this release: ## 1.2.5 - 2013-07-15 * Add support for new cards API. - * You will probably need to upgrade the Stripe API version on your account to 2013-07-05 or explicitly specify an API version with com.stripe.Stripe.apiVersion when you switch to this release of the bindings. More information about the relevant changes can be found at https://stripe.com/docs/upgrades#2013-07-05 and http://bit.ly/13miHM8 + * You will probably need to upgrade the Stripe API version on your account to 2013-07-05 or explicitly specify an API version with com.stripe.Stripe.apiVersion when you switch to this release of the bindings. More information about the relevant changes can be found at https://docs.stripe.com/changelog/2013-07-05 and http://bit.ly/13miHM8 * Add a StripeRawJsonObject type for deserializing webhook events we don't recognize * Add a Money class for representing account balances in individual currencies diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 3108db19f22..d8931ef8a65 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1773 \ No newline at end of file +v1819 \ No newline at end of file diff --git a/build.gradle b/build.gradle index f79a59f3227..87f2e32c815 100644 --- a/build.gradle +++ b/build.gradle @@ -1,8 +1,6 @@ buildscript { repositories { mavenCentral() - //Add only for SNAPSHOT versions - //maven { url "https://oss.sonatype.org/content/repositories/snapshots/" } } } diff --git a/deploy.gradle b/deploy.gradle index 7926c38711e..22eec908057 100644 --- a/deploy.gradle +++ b/deploy.gradle @@ -15,12 +15,12 @@ def isReleaseBuild() { def getReleaseRepositoryUrl() { return hasProperty("RELEASE_REPOSITORY_URL") ? RELEASE_REPOSITORY_URL - : "https://oss.sonatype.org/service/local/staging/deploy/maven2/" + : "https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2/" } def getSnapshotRepositoryUrl() { return hasProperty("SNAPSHOT_REPOSITORY_URL") ? SNAPSHOT_REPOSITORY_URL - : "https://oss.sonatype.org/content/repositories/snapshots/" + : "https://ossrh-staging-api.central.sonatype.com/content/repositories/snapshots/" } def getRepositoryUsername() { diff --git a/src/main/java/com/stripe/ApiVersion.java b/src/main/java/com/stripe/ApiVersion.java index 3992c755aa8..c1eedb5a6a0 100644 --- a/src/main/java/com/stripe/ApiVersion.java +++ b/src/main/java/com/stripe/ApiVersion.java @@ -2,5 +2,5 @@ package com.stripe; final class ApiVersion { - public static final String CURRENT = "2025-05-28.preview"; + public static final String CURRENT = "2025-06-30.preview"; } diff --git a/src/main/java/com/stripe/exception/FeatureNotEnabledException.java b/src/main/java/com/stripe/exception/FeatureNotEnabledException.java index 11fdaddd5f2..e7557529f14 100644 --- a/src/main/java/com/stripe/exception/FeatureNotEnabledException.java +++ b/src/main/java/com/stripe/exception/FeatureNotEnabledException.java @@ -6,10 +6,7 @@ import com.stripe.model.StripeObject; import com.stripe.net.StripeResponseGetter; -/** - * Error returned when recipient does not have the active features required to receive funds from - * this OutboundPayment request. - */ +/** The required storer capabilities are missing. */ public final class FeatureNotEnabledException extends ApiException { private static final long serialVersionUID = 2L; diff --git a/src/main/java/com/stripe/exception/InsufficientFundsException.java b/src/main/java/com/stripe/exception/InsufficientFundsException.java index 0f6dc9f1a3d..e28c0065d0d 100644 --- a/src/main/java/com/stripe/exception/InsufficientFundsException.java +++ b/src/main/java/com/stripe/exception/InsufficientFundsException.java @@ -8,7 +8,7 @@ /** * Error returned when the balance of provided financial account and balance type in the - * OutboundPayment request does not have enough funds. + * OutboundPayment/OutboundTransfer request does not have enough funds. */ public final class InsufficientFundsException extends ApiException { private static final long serialVersionUID = 2L; diff --git a/src/main/java/com/stripe/exception/StripeException.java b/src/main/java/com/stripe/exception/StripeException.java index 4f14cd2f3d9..506ab93e8ba 100644 --- a/src/main/java/com/stripe/exception/StripeException.java +++ b/src/main/java/com/stripe/exception/StripeException.java @@ -116,6 +116,9 @@ public static StripeException parseV2Exception( case "financial_account_not_open": return com.stripe.exception.FinancialAccountNotOpenException.parse( body, statusCode, requestId, responseGetter); + case "feature_not_enabled": + return com.stripe.exception.FeatureNotEnabledException.parse( + body, statusCode, requestId, responseGetter); case "blocked_by_stripe": return com.stripe.exception.BlockedByStripeException.parse( body, statusCode, requestId, responseGetter); @@ -134,9 +137,6 @@ public static StripeException parseV2Exception( case "recipient_not_notifiable": return com.stripe.exception.RecipientNotNotifiableException.parse( body, statusCode, requestId, responseGetter); - case "feature_not_enabled": - return com.stripe.exception.FeatureNotEnabledException.parse( - body, statusCode, requestId, responseGetter); case "invalid_payout_method": return com.stripe.exception.InvalidPayoutMethodException.parse( body, statusCode, requestId, responseGetter); diff --git a/src/main/java/com/stripe/model/Account.java b/src/main/java/com/stripe/model/Account.java index 7d4dff2f7ff..35514f577d0 100644 --- a/src/main/java/com/stripe/model/Account.java +++ b/src/main/java/com/stripe/model/Account.java @@ -1012,6 +1012,15 @@ public static class Capabilities extends StripeObject { @SerializedName("cashapp_payments") String cashappPayments; + /** + * The status of the Crypto capability of the account, or whether the account can directly + * process Crypto payments. + * + *

One of {@code active}, {@code inactive}, or {@code pending}. + */ + @SerializedName("crypto_payments") + String cryptoPayments; + /** * The status of the EPS payments capability of the account, or whether the account can directly * process EPS charges. @@ -2980,12 +2989,27 @@ public static class Schedule extends StripeObject { @SerializedName("monthly_anchor") Long monthlyAnchor; + /** + * The days of the month funds will be paid out. Only shown if {@code interval} is monthly. + * Payouts scheduled between the 29th and 31st of the month are sent on the last day of + * shorter months. + */ + @SerializedName("monthly_payout_days") + List monthlyPayoutDays; + /** * The day of the week funds will be paid out, of the style 'monday', 'tuesday', etc. Only * shown if {@code interval} is weekly. */ @SerializedName("weekly_anchor") String weeklyAnchor; + + /** + * The days of the week when available funds are paid out, specified as an array, for + * example, [{@code monday}, {@code tuesday}]. Only shown if {@code interval} is weekly. + */ + @SerializedName("weekly_payout_days") + List weeklyPayoutDays; } } diff --git a/src/main/java/com/stripe/model/AccountSession.java b/src/main/java/com/stripe/model/AccountSession.java index b0a5507de82..4674e78acf9 100644 --- a/src/main/java/com/stripe/model/AccountSession.java +++ b/src/main/java/com/stripe/model/AccountSession.java @@ -210,21 +210,20 @@ public static class AccountManagement extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class Features extends StripeObject { /** - * Disables Stripe user authentication for this embedded component. This value can only be - * true for accounts where {@code controller.requirement_collection} is {@code application}. - * The default value is the opposite of the {@code external_account_collection} value. For - * example, if you don’t set {@code external_account_collection}, it defaults to true and - * {@code disable_stripe_user_authentication} defaults to false. + * Whether Stripe user authentication is disabled. This value can only be {@code true} for + * accounts where {@code controller.requirement_collection} is {@code application} for the + * account. The default value is the opposite of the {@code external_account_collection} + * value. For example, if you don't set {@code external_account_collection}, it defaults to + * {@code true} and {@code disable_stripe_user_authentication} defaults to {@code false}. */ @SerializedName("disable_stripe_user_authentication") Boolean disableStripeUserAuthentication; /** - * Whether to allow platforms to control bank account collection for their connected - * accounts. This feature can only be false for accounts where you’re responsible for - * collecting updated information when requirements are due or change, like custom accounts. - * Otherwise, bank account collection is determined by compliance requirements. The default - * value for this feature is {@code true}. + * Whether external account collection is enabled. This feature can only be {@code false} + * for accounts where you’re responsible for collecting updated information when + * requirements are due or change, like Custom accounts. The default value for this feature + * is {@code true}. */ @SerializedName("external_account_collection") Boolean externalAccountCollection; @@ -255,21 +254,20 @@ public static class AccountOnboarding extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class Features extends StripeObject { /** - * Disables Stripe user authentication for this embedded component. This value can only be - * true for accounts where {@code controller.requirement_collection} is {@code application}. - * The default value is the opposite of the {@code external_account_collection} value. For - * example, if you don’t set {@code external_account_collection}, it defaults to true and - * {@code disable_stripe_user_authentication} defaults to false. + * Whether Stripe user authentication is disabled. This value can only be {@code true} for + * accounts where {@code controller.requirement_collection} is {@code application} for the + * account. The default value is the opposite of the {@code external_account_collection} + * value. For example, if you don't set {@code external_account_collection}, it defaults to + * {@code true} and {@code disable_stripe_user_authentication} defaults to {@code false}. */ @SerializedName("disable_stripe_user_authentication") Boolean disableStripeUserAuthentication; /** - * Whether to allow platforms to control bank account collection for their connected - * accounts. This feature can only be false for accounts where you’re responsible for - * collecting updated information when requirements are due or change, like custom accounts. - * Otherwise, bank account collection is determined by compliance requirements. The default - * value for this feature is {@code true}. + * Whether external account collection is enabled. This feature can only be {@code false} + * for accounts where you’re responsible for collecting updated information when + * requirements are due or change, like Custom accounts. The default value for this feature + * is {@code true}. */ @SerializedName("external_account_collection") Boolean externalAccountCollection; @@ -300,42 +298,44 @@ public static class Balances extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class Features extends StripeObject { /** - * Disables Stripe user authentication for this embedded component. This value can only be - * true for accounts where {@code controller.requirement_collection} is {@code application}. - * The default value is the opposite of the {@code external_account_collection} value. For - * example, if you don’t set {@code external_account_collection}, it defaults to true and - * {@code disable_stripe_user_authentication} defaults to false. + * Whether Stripe user authentication is disabled. This value can only be {@code true} for + * accounts where {@code controller.requirement_collection} is {@code application} for the + * account. The default value is the opposite of the {@code external_account_collection} + * value. For example, if you don't set {@code external_account_collection}, it defaults to + * {@code true} and {@code disable_stripe_user_authentication} defaults to {@code false}. */ @SerializedName("disable_stripe_user_authentication") Boolean disableStripeUserAuthentication; /** - * Whether to allow payout schedule to be changed. Default {@code true} when Stripe owns - * Loss Liability, default {@code false} otherwise. + * Whether to allow payout schedule to be changed. Defaults to {@code true} when {@code + * controller.losses.payments} is set to {@code stripe} for the account, otherwise {@code + * false}. */ @SerializedName("edit_payout_schedule") Boolean editPayoutSchedule; /** - * Whether to allow platforms to control bank account collection for their connected - * accounts. This feature can only be false for accounts where you’re responsible for - * collecting updated information when requirements are due or change, like custom accounts. - * Otherwise, bank account collection is determined by compliance requirements. The default - * value for this feature is {@code true}. + * Whether external account collection is enabled. This feature can only be {@code false} + * for accounts where you’re responsible for collecting updated information when + * requirements are due or change, like Custom accounts. The default value for this feature + * is {@code true}. */ @SerializedName("external_account_collection") Boolean externalAccountCollection; /** - * Whether to allow creation of instant payouts. Default {@code true} when Stripe owns Loss - * Liability, default {@code false} otherwise. + * Whether to allow creation of instant payouts. Defaults to {@code true} when {@code + * controller.losses.payments} is set to {@code stripe} for the account, otherwise {@code + * false}. */ @SerializedName("instant_payouts") Boolean instantPayouts; /** - * Whether to allow creation of standard payouts. Default {@code true} when Stripe owns Loss - * Liability, default {@code false} otherwise. + * Whether to allow creation of standard payouts. Defaults to {@code true} when {@code + * controller.losses.payments} is set to {@code stripe} for the account, otherwise {@code + * false}. */ @SerializedName("standard_payouts") Boolean standardPayouts; @@ -448,20 +448,20 @@ public static class Features extends StripeObject { Boolean capturePayments; /** - * Whether to allow connected accounts to manage destination charges that are created on - * behalf of them. This is {@code false} by default. + * Whether connected accounts can manage destination charges that are created on behalf of + * them. This is {@code false} by default. */ @SerializedName("destination_on_behalf_of_charge_management") Boolean destinationOnBehalfOfChargeManagement; /** - * Whether to allow responding to disputes, including submitting evidence and accepting + * Whether responding to disputes is enabled, including submitting evidence and accepting * disputes. This is {@code true} by default. */ @SerializedName("dispute_management") Boolean disputeManagement; - /** Whether to allow sending refunds. This is {@code true} by default. */ + /** Whether sending refunds is enabled. This is {@code true} by default. */ @SerializedName("refund_management") Boolean refundManagement; } @@ -516,16 +516,21 @@ public static class FinancialAccount extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class Features extends StripeObject { /** - * Disables Stripe user authentication for this embedded component. This value can only be - * true for accounts where {@code controller.requirement_collection} is {@code application}. - * The default value is the opposite of the {@code external_account_collection} value. For - * example, if you don’t set {@code external_account_collection}, it defaults to true and - * {@code disable_stripe_user_authentication} defaults to false. + * Whether Stripe user authentication is disabled. This value can only be {@code true} for + * accounts where {@code controller.requirement_collection} is {@code application} for the + * account. The default value is the opposite of the {@code external_account_collection} + * value. For example, if you don't set {@code external_account_collection}, it defaults to + * {@code true} and {@code disable_stripe_user_authentication} defaults to {@code false}. */ @SerializedName("disable_stripe_user_authentication") Boolean disableStripeUserAuthentication; - /** Whether to allow external accounts to be linked for money transfer. */ + /** + * Whether external account collection is enabled. This feature can only be {@code false} + * for accounts where you’re responsible for collecting updated information when + * requirements are due or change, like Custom accounts. The default value for this feature + * is {@code true}. + */ @SerializedName("external_account_collection") Boolean externalAccountCollection; @@ -645,9 +650,11 @@ public static class Features extends StripeObject { Boolean cardholderManagement; /** - * Disables Stripe user authentication for this embedded component. This feature can only be - * false for accounts where you’re responsible for collecting updated information when - * requirements are due or change, like custom accounts. + * Whether Stripe user authentication is disabled. This value can only be {@code true} for + * accounts where {@code controller.requirement_collection} is {@code application} for the + * account. The default value is the opposite of the {@code external_account_collection} + * value. For example, if you don't set {@code external_account_collection}, it defaults to + * {@code true} and {@code disable_stripe_user_authentication} defaults to {@code false}. */ @SerializedName("disable_stripe_user_authentication") Boolean disableStripeUserAuthentication; @@ -682,21 +689,20 @@ public static class NotificationBanner extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class Features extends StripeObject { /** - * Disables Stripe user authentication for this embedded component. This value can only be - * true for accounts where {@code controller.requirement_collection} is {@code application}. - * The default value is the opposite of the {@code external_account_collection} value. For - * example, if you don’t set {@code external_account_collection}, it defaults to true and - * {@code disable_stripe_user_authentication} defaults to false. + * Whether Stripe user authentication is disabled. This value can only be {@code true} for + * accounts where {@code controller.requirement_collection} is {@code application} for the + * account. The default value is the opposite of the {@code external_account_collection} + * value. For example, if you don't set {@code external_account_collection}, it defaults to + * {@code true} and {@code disable_stripe_user_authentication} defaults to {@code false}. */ @SerializedName("disable_stripe_user_authentication") Boolean disableStripeUserAuthentication; /** - * Whether to allow platforms to control bank account collection for their connected - * accounts. This feature can only be false for accounts where you’re responsible for - * collecting updated information when requirements are due or change, like custom accounts. - * Otherwise, bank account collection is determined by compliance requirements. The default - * value for this feature is {@code true}. + * Whether external account collection is enabled. This feature can only be {@code false} + * for accounts where you’re responsible for collecting updated information when + * requirements are due or change, like Custom accounts. The default value for this feature + * is {@code true}. */ @SerializedName("external_account_collection") Boolean externalAccountCollection; @@ -734,20 +740,20 @@ public static class Features extends StripeObject { Boolean capturePayments; /** - * Whether to allow connected accounts to manage destination charges that are created on - * behalf of them. This is {@code false} by default. + * Whether connected accounts can manage destination charges that are created on behalf of + * them. This is {@code false} by default. */ @SerializedName("destination_on_behalf_of_charge_management") Boolean destinationOnBehalfOfChargeManagement; /** - * Whether to allow responding to disputes, including submitting evidence and accepting + * Whether responding to disputes is enabled, including submitting evidence and accepting * disputes. This is {@code true} by default. */ @SerializedName("dispute_management") Boolean disputeManagement; - /** Whether to allow sending refunds. This is {@code true} by default. */ + /** Whether sending refunds is enabled. This is {@code true} by default. */ @SerializedName("refund_management") Boolean refundManagement; } @@ -777,20 +783,20 @@ public static class PaymentDisputes extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class Features extends StripeObject { /** - * Whether to allow connected accounts to manage destination charges that are created on - * behalf of them. This is {@code false} by default. + * Whether connected accounts can manage destination charges that are created on behalf of + * them. This is {@code false} by default. */ @SerializedName("destination_on_behalf_of_charge_management") Boolean destinationOnBehalfOfChargeManagement; /** - * Whether to allow responding to disputes, including submitting evidence and accepting + * Whether responding to disputes is enabled, including submitting evidence and accepting * disputes. This is {@code true} by default. */ @SerializedName("dispute_management") Boolean disputeManagement; - /** Whether to allow sending refunds. This is {@code true} by default. */ + /** Whether sending refunds is enabled. This is {@code true} by default. */ @SerializedName("refund_management") Boolean refundManagement; } @@ -827,20 +833,20 @@ public static class Features extends StripeObject { Boolean capturePayments; /** - * Whether to allow connected accounts to manage destination charges that are created on - * behalf of them. This is {@code false} by default. + * Whether connected accounts can manage destination charges that are created on behalf of + * them. This is {@code false} by default. */ @SerializedName("destination_on_behalf_of_charge_management") Boolean destinationOnBehalfOfChargeManagement; /** - * Whether to allow responding to disputes, including submitting evidence and accepting + * Whether responding to disputes is enabled, including submitting evidence and accepting * disputes. This is {@code true} by default. */ @SerializedName("dispute_management") Boolean disputeManagement; - /** Whether to allow sending refunds. This is {@code true} by default. */ + /** Whether sending refunds is enabled. This is {@code true} by default. */ @SerializedName("refund_management") Boolean refundManagement; } @@ -870,42 +876,44 @@ public static class Payouts extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class Features extends StripeObject { /** - * Disables Stripe user authentication for this embedded component. This value can only be - * true for accounts where {@code controller.requirement_collection} is {@code application}. - * The default value is the opposite of the {@code external_account_collection} value. For - * example, if you don’t set {@code external_account_collection}, it defaults to true and - * {@code disable_stripe_user_authentication} defaults to false. + * Whether Stripe user authentication is disabled. This value can only be {@code true} for + * accounts where {@code controller.requirement_collection} is {@code application} for the + * account. The default value is the opposite of the {@code external_account_collection} + * value. For example, if you don't set {@code external_account_collection}, it defaults to + * {@code true} and {@code disable_stripe_user_authentication} defaults to {@code false}. */ @SerializedName("disable_stripe_user_authentication") Boolean disableStripeUserAuthentication; /** - * Whether to allow payout schedule to be changed. Default {@code true} when Stripe owns - * Loss Liability, default {@code false} otherwise. + * Whether to allow payout schedule to be changed. Defaults to {@code true} when {@code + * controller.losses.payments} is set to {@code stripe} for the account, otherwise {@code + * false}. */ @SerializedName("edit_payout_schedule") Boolean editPayoutSchedule; /** - * Whether to allow platforms to control bank account collection for their connected - * accounts. This feature can only be false for accounts where you’re responsible for - * collecting updated information when requirements are due or change, like custom accounts. - * Otherwise, bank account collection is determined by compliance requirements. The default - * value for this feature is {@code true}. + * Whether external account collection is enabled. This feature can only be {@code false} + * for accounts where you’re responsible for collecting updated information when + * requirements are due or change, like Custom accounts. The default value for this feature + * is {@code true}. */ @SerializedName("external_account_collection") Boolean externalAccountCollection; /** - * Whether to allow creation of instant payouts. Default {@code true} when Stripe owns Loss - * Liability, default {@code false} otherwise. + * Whether to allow creation of instant payouts. Defaults to {@code true} when {@code + * controller.losses.payments} is set to {@code stripe} for the account, otherwise {@code + * false}. */ @SerializedName("instant_payouts") Boolean instantPayouts; /** - * Whether to allow creation of standard payouts. Default {@code true} when Stripe owns Loss - * Liability, default {@code false} otherwise. + * Whether to allow creation of standard payouts. Defaults to {@code true} when {@code + * controller.losses.payments} is set to {@code stripe} for the account, otherwise {@code + * false}. */ @SerializedName("standard_payouts") Boolean standardPayouts; diff --git a/src/main/java/com/stripe/model/Charge.java b/src/main/java/com/stripe/model/Charge.java index c3851727d1a..68bafaaa5e3 100644 --- a/src/main/java/com/stripe/model/Charge.java +++ b/src/main/java/com/stripe/model/Charge.java @@ -1200,6 +1200,9 @@ public static class PaymentMethodDetails extends StripeObject { @SerializedName("cashapp") Cashapp cashapp; + @SerializedName("crypto") + Crypto crypto; + @SerializedName("customer_balance") CustomerBalance customerBalance; @@ -1895,7 +1898,7 @@ public static class Card extends StripeObject { IncrementalAuthorization incrementalAuthorization; /** - * Installment details for this payment (Mexico only). + * Installment details for this payment. * *

For more information, see the installments integration guide. @@ -2088,7 +2091,10 @@ public static class Plan extends StripeObject { @SerializedName("interval") String interval; - /** Type of installment plan, one of {@code fixed_count}. */ + /** + * Type of installment plan, one of {@code fixed_count}, {@code bonus}, or {@code + * revolving}. + */ @SerializedName("type") String type; } @@ -2560,7 +2566,10 @@ public static class CardPresent extends StripeObject { @SerializedName("overcapture_supported") Boolean overcaptureSupported; - /** EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. */ + /** + * The languages that the issuing bank recommends using for localizing any customer-facing + * text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. + */ @SerializedName("preferred_locales") List preferredLocales; @@ -2620,11 +2629,18 @@ public static class Receipt extends StripeObject { @SerializedName("account_type") String accountType; - /** EMV tag 9F26, cryptogram generated by the integrated circuit chip. */ + /** + * The Application Cryptogram, a unique value generated by the card to authenticate the + * transaction with issuers. + */ @SerializedName("application_cryptogram") String applicationCryptogram; - /** Mnenomic of the Application Identifier. */ + /** + * The Application Identifier (AID) on the card used to determine which networks are + * eligible to process the transaction. Referenced from EMV tag 9F12, data encoded on the + * card's chip. + */ @SerializedName("application_preferred_name") String applicationPreferredName; @@ -2645,16 +2661,24 @@ public static class Receipt extends StripeObject { String cardholderVerificationMethod; /** - * EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. + * Similar to the application_preferred_name, identifying the applications (AIDs) available + * on the card. Referenced from EMV tag 84. */ @SerializedName("dedicated_file_name") String dedicatedFileName; - /** The outcome of a series of EMV functions performed by the card reader. */ + /** + * A 5-byte string that records the checks and validations that occur between the card and + * the terminal. These checks determine how the terminal processes the transaction and what + * risk tolerance is acceptable. Referenced from EMV Tag 95. + */ @SerializedName("terminal_verification_results") String terminalVerificationResults; - /** An indication of various EMV functions performed during the transaction. */ + /** + * An indication of which steps were completed during the card read process. Referenced from + * EMV Tag 9B. + */ @SerializedName("transaction_status_information") String transactionStatusInformation; } @@ -2693,6 +2717,39 @@ public static class Cashapp extends StripeObject { String cashtag; } + /** + * For more details about Crypto, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Crypto extends StripeObject { + /** The wallet address of the customer. */ + @SerializedName("buyer_address") + String buyerAddress; + + /** + * The blockchain network that the transaction was sent on. + * + *

One of {@code base}, {@code ethereum}, or {@code polygon}. + */ + @SerializedName("network") + String network; + + /** + * The token currency that the transaction was sent with. + * + *

One of {@code usdc}, {@code usdg}, or {@code usdp}. + */ + @SerializedName("token_currency") + String tokenCurrency; + + /** The blockchain transaction hash of the crypto payment. */ + @SerializedName("transaction_hash") + String transactionHash; + } + /** * For more details about CustomerBalance, please refer to the API Reference. @@ -2861,9 +2918,9 @@ public static class IdBankTransfer extends StripeObject { public static class Ideal extends StripeObject { /** * The customer's bank. Can be one of {@code abn_amro}, {@code asn_bank}, {@code bunq}, {@code - * handelsbanken}, {@code ing}, {@code knab}, {@code moneyou}, {@code n26}, {@code nn}, {@code - * rabobank}, {@code regiobank}, {@code revolut}, {@code sns_bank}, {@code triodos_bank}, - * {@code van_lanschot}, or {@code yoursafe}. + * buut}, {@code handelsbanken}, {@code ing}, {@code knab}, {@code moneyou}, {@code n26}, + * {@code nn}, {@code rabobank}, {@code regiobank}, {@code revolut}, {@code sns_bank}, {@code + * triodos_bank}, {@code van_lanschot}, or {@code yoursafe}. */ @SerializedName("bank") String bank; @@ -2872,9 +2929,9 @@ public static class Ideal extends StripeObject { * The Bank Identifier Code of the customer's bank. * *

One of {@code ABNANL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code BUNQNL2A}, {@code - * FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code KNABNL2H}, {@code MOYONL21}, {@code - * NNBANL2G}, {@code NTSBDEB1}, {@code RABONL2U}, {@code RBRBNL21}, {@code REVOIE23}, {@code - * REVOLT21}, {@code SNSBNL2A}, or {@code TRIONL2U}. + * BUUTNL2A}, {@code FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code KNABNL2H}, {@code + * MOYONL21}, {@code NNBANL2G}, {@code NTSBDEB1}, {@code RABONL2U}, {@code RBRBNL21}, {@code + * REVOIE23}, {@code REVOLT21}, {@code SNSBNL2A}, or {@code TRIONL2U}. */ @SerializedName("bic") String bic; @@ -3058,7 +3115,10 @@ public static class InteracPresent extends StripeObject { @SerializedName("network_transaction_id") String networkTransactionId; - /** EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. */ + /** + * The languages that the issuing bank recommends using for localizing any customer-facing + * text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. + */ @SerializedName("preferred_locales") List preferredLocales; @@ -3094,11 +3154,18 @@ public static class Receipt extends StripeObject { @SerializedName("account_type") String accountType; - /** EMV tag 9F26, cryptogram generated by the integrated circuit chip. */ + /** + * The Application Cryptogram, a unique value generated by the card to authenticate the + * transaction with issuers. + */ @SerializedName("application_cryptogram") String applicationCryptogram; - /** Mnenomic of the Application Identifier. */ + /** + * The Application Identifier (AID) on the card used to determine which networks are + * eligible to process the transaction. Referenced from EMV tag 9F12, data encoded on the + * card's chip. + */ @SerializedName("application_preferred_name") String applicationPreferredName; @@ -3119,16 +3186,24 @@ public static class Receipt extends StripeObject { String cardholderVerificationMethod; /** - * EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. + * Similar to the application_preferred_name, identifying the applications (AIDs) available + * on the card. Referenced from EMV tag 84. */ @SerializedName("dedicated_file_name") String dedicatedFileName; - /** The outcome of a series of EMV functions performed by the card reader. */ + /** + * A 5-byte string that records the checks and validations that occur between the card and + * the terminal. These checks determine how the terminal processes the transaction and what + * risk tolerance is acceptable. Referenced from EMV Tag 95. + */ @SerializedName("terminal_verification_results") String terminalVerificationResults; - /** An indication of various EMV functions performed during the transaction. */ + /** + * An indication of which steps were completed during the card read process. Referenced from + * EMV Tag 9B. + */ @SerializedName("transaction_status_information") String transactionStatusInformation; } diff --git a/src/main/java/com/stripe/model/ConfirmationToken.java b/src/main/java/com/stripe/model/ConfirmationToken.java index 66fb42ae2e8..d725d679641 100644 --- a/src/main/java/com/stripe/model/ConfirmationToken.java +++ b/src/main/java/com/stripe/model/ConfirmationToken.java @@ -251,7 +251,10 @@ public static class Plan extends StripeObject { @SerializedName("interval") String interval; - /** Type of installment plan, one of {@code fixed_count}. */ + /** + * Type of installment plan, one of {@code fixed_count}, {@code bonus}, or {@code + * revolving}. + */ @SerializedName("type") String type; } @@ -323,6 +326,9 @@ public static class PaymentMethodPreview extends StripeObject { @SerializedName("cashapp") Cashapp cashapp; + @SerializedName("crypto") + Crypto crypto; + /** * The ID of the Customer to which this PaymentMethod is saved. This will not be set when the * PaymentMethod has not been saved to a Customer. @@ -460,15 +466,15 @@ public static class PaymentMethodPreview extends StripeObject { *

One of {@code acss_debit}, {@code affirm}, {@code afterpay_clearpay}, {@code alipay}, * {@code alma}, {@code amazon_pay}, {@code au_becs_debit}, {@code bacs_debit}, {@code * bancontact}, {@code billie}, {@code blik}, {@code boleto}, {@code card}, {@code - * card_present}, {@code cashapp}, {@code customer_balance}, {@code eps}, {@code fpx}, {@code - * giropay}, {@code gopay}, {@code grabpay}, {@code id_bank_transfer}, {@code ideal}, {@code - * interac_present}, {@code kakao_pay}, {@code klarna}, {@code konbini}, {@code kr_card}, {@code - * link}, {@code mb_way}, {@code mobilepay}, {@code multibanco}, {@code naver_pay}, {@code - * nz_bank_account}, {@code oxxo}, {@code p24}, {@code pay_by_bank}, {@code payco}, {@code - * paynow}, {@code paypal}, {@code payto}, {@code pix}, {@code promptpay}, {@code qris}, {@code - * rechnung}, {@code revolut_pay}, {@code samsung_pay}, {@code satispay}, {@code sepa_debit}, - * {@code shopeepay}, {@code sofort}, {@code stripe_balance}, {@code swish}, {@code twint}, - * {@code us_bank_account}, {@code wechat_pay}, or {@code zip}. + * card_present}, {@code cashapp}, {@code crypto}, {@code customer_balance}, {@code eps}, {@code + * fpx}, {@code giropay}, {@code gopay}, {@code grabpay}, {@code id_bank_transfer}, {@code + * ideal}, {@code interac_present}, {@code kakao_pay}, {@code klarna}, {@code konbini}, {@code + * kr_card}, {@code link}, {@code mb_way}, {@code mobilepay}, {@code multibanco}, {@code + * naver_pay}, {@code nz_bank_account}, {@code oxxo}, {@code p24}, {@code pay_by_bank}, {@code + * payco}, {@code paynow}, {@code paypal}, {@code payto}, {@code pix}, {@code promptpay}, {@code + * qris}, {@code rechnung}, {@code revolut_pay}, {@code samsung_pay}, {@code satispay}, {@code + * sepa_debit}, {@code shopeepay}, {@code sofort}, {@code stripe_balance}, {@code swish}, {@code + * twint}, {@code us_bank_account}, {@code wechat_pay}, or {@code zip}. */ @SerializedName("type") String type; @@ -1054,7 +1060,11 @@ public static class CardPresent extends StripeObject { @SerializedName("overcapture_supported") Boolean overcaptureSupported; - /** EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. */ + /** + * The languages that the issuing bank recommends using for localizing any + * customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data + * encoded on the card's chip. + */ @SerializedName("preferred_locales") List preferredLocales; @@ -1115,11 +1125,18 @@ public static class Receipt extends StripeObject { @SerializedName("account_type") String accountType; - /** EMV tag 9F26, cryptogram generated by the integrated circuit chip. */ + /** + * The Application Cryptogram, a unique value generated by the card to authenticate + * the transaction with issuers. + */ @SerializedName("application_cryptogram") String applicationCryptogram; - /** Mnenomic of the Application Identifier. */ + /** + * The Application Identifier (AID) on the card used to determine which networks are + * eligible to process the transaction. Referenced from EMV tag 9F12, data encoded on + * the card's chip. + */ @SerializedName("application_preferred_name") String applicationPreferredName; @@ -1141,17 +1158,24 @@ public static class Receipt extends StripeObject { String cardholderVerificationMethod; /** - * EMV tag 84. Similar to the application identifier stored on the integrated circuit - * chip. + * Similar to the application_preferred_name, identifying the applications (AIDs) + * available on the card. Referenced from EMV tag 84. */ @SerializedName("dedicated_file_name") String dedicatedFileName; - /** The outcome of a series of EMV functions performed by the card reader. */ + /** + * A 5-byte string that records the checks and validations that occur between the card + * and the terminal. These checks determine how the terminal processes the transaction + * and what risk tolerance is acceptable. Referenced from EMV Tag 95. + */ @SerializedName("terminal_verification_results") String terminalVerificationResults; - /** An indication of various EMV functions performed during the transaction. */ + /** + * An indication of which steps were completed during the card read process. + * Referenced from EMV Tag 9B. + */ @SerializedName("transaction_status_information") String transactionStatusInformation; } @@ -1480,7 +1504,10 @@ public static class CardPresent extends StripeObject { @SerializedName("offline") Offline offline; - /** EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. */ + /** + * The languages that the issuing bank recommends using for localizing any customer-facing + * text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. + */ @SerializedName("preferred_locales") List preferredLocales; @@ -1571,6 +1598,15 @@ public static class Cashapp extends StripeObject { String cashtag; } + /** + * For more details about Crypto, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Crypto extends StripeObject {} + /** * For more details about CustomerBalance, please refer to the API Reference. @@ -1688,9 +1724,9 @@ public static class IdBankTransfer extends StripeObject { public static class Ideal extends StripeObject { /** * The customer's bank, if provided. Can be one of {@code abn_amro}, {@code asn_bank}, {@code - * bunq}, {@code handelsbanken}, {@code ing}, {@code knab}, {@code moneyou}, {@code n26}, - * {@code nn}, {@code rabobank}, {@code regiobank}, {@code revolut}, {@code sns_bank}, {@code - * triodos_bank}, {@code van_lanschot}, or {@code yoursafe}. + * bunq}, {@code buut}, {@code handelsbanken}, {@code ing}, {@code knab}, {@code moneyou}, + * {@code n26}, {@code nn}, {@code rabobank}, {@code regiobank}, {@code revolut}, {@code + * sns_bank}, {@code triodos_bank}, {@code van_lanschot}, or {@code yoursafe}. */ @SerializedName("bank") String bank; @@ -1699,9 +1735,9 @@ public static class Ideal extends StripeObject { * The Bank Identifier Code of the customer's bank, if the bank was provided. * *

One of {@code ABNANL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code BUNQNL2A}, {@code - * FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code KNABNL2H}, {@code MOYONL21}, {@code - * NNBANL2G}, {@code NTSBDEB1}, {@code RABONL2U}, {@code RBRBNL21}, {@code REVOIE23}, {@code - * REVOLT21}, {@code SNSBNL2A}, or {@code TRIONL2U}. + * BUUTNL2A}, {@code FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code KNABNL2H}, {@code + * MOYONL21}, {@code NNBANL2G}, {@code NTSBDEB1}, {@code RABONL2U}, {@code RBRBNL21}, {@code + * REVOIE23}, {@code REVOLT21}, {@code SNSBNL2A}, or {@code TRIONL2U}. */ @SerializedName("bic") String bic; @@ -1793,7 +1829,10 @@ public static class InteracPresent extends StripeObject { @SerializedName("networks") Networks networks; - /** EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. */ + /** + * The languages that the issuing bank recommends using for localizing any customer-facing + * text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. + */ @SerializedName("preferred_locales") List preferredLocales; diff --git a/src/main/java/com/stripe/model/CustomerSession.java b/src/main/java/com/stripe/model/CustomerSession.java index bedd6f22e4c..3992f240ad8 100644 --- a/src/main/java/com/stripe/model/CustomerSession.java +++ b/src/main/java/com/stripe/model/CustomerSession.java @@ -214,7 +214,7 @@ public static class Features extends StripeObject { /** * Determines the max number of saved payment methods for the Payment Element to display. - * This parameter defaults to {@code 3}. + * This parameter defaults to {@code 3}. The maximum redisplay limit is {@code 10}. */ @SerializedName("payment_method_redisplay_limit") Long paymentMethodRedisplayLimit; diff --git a/src/main/java/com/stripe/model/Dispute.java b/src/main/java/com/stripe/model/Dispute.java index e5bb2ce2a77..cb53bcc9abd 100644 --- a/src/main/java/com/stripe/model/Dispute.java +++ b/src/main/java/com/stripe/model/Dispute.java @@ -1044,6 +1044,14 @@ public static class EvidenceDetails extends StripeObject { @SerializedName("submission_count") Long submissionCount; + /** + * Whether the dispute was submitted manually, with Smart Disputes, or not submitted. + * + *

One of {@code manual}, {@code not_submitted}, or {@code smart_disputes}. + */ + @SerializedName("submission_method") + String submissionMethod; + /** * For more details about EnhancedEligibility, please refer to the API Reference. @@ -1166,7 +1174,7 @@ public static class Card extends StripeObject { * The type of dispute opened. Different case types may have varying fees and financial * impact. * - *

One of {@code chargeback}, or {@code inquiry}. + *

One of {@code chargeback}, {@code compliance}, or {@code inquiry}. */ @SerializedName("case_type") String caseType; diff --git a/src/main/java/com/stripe/model/Event.java b/src/main/java/com/stripe/model/Event.java index f1288c7d515..537bae69a3b 100644 --- a/src/main/java/com/stripe/model/Event.java +++ b/src/main/java/com/stripe/model/Event.java @@ -56,8 +56,9 @@ public class Event extends ApiResource implements HasId { String account; /** - * The Stripe API version used to render {@code data}. This property is populated only for events - * on or after October 31, 2014. + * The Stripe API version used to render {@code data} when the event was created. The contents of + * {@code data} never change, so this value remains static regardless of the API version currently + * in use. This property is populated only for events created on or after October 31, 2014. */ @SerializedName("api_version") String apiVersion; diff --git a/src/main/java/com/stripe/model/InvoiceItem.java b/src/main/java/com/stripe/model/InvoiceItem.java index d4a49b925b1..b32ed431cde 100644 --- a/src/main/java/com/stripe/model/InvoiceItem.java +++ b/src/main/java/com/stripe/model/InvoiceItem.java @@ -24,15 +24,15 @@ /** * Invoice Items represent the component lines of an invoice. An invoice item is added to an invoice - * by creating or updating it with an {@code invoice} field, at which point it will be included as - * an invoice line item within invoice. When you create an invoice item with an + * {@code invoice} field, it is attached to the specified invoice and included as an invoice line item within invoice.lines. * *

Invoice Items can be created before you are ready to actually send the invoice. This can be * particularly useful when combined with a subscription. Sometimes you want to add a - * charge or credit to a customer, but actually charge or credit the customer’s card only at the end + * charge or credit to a customer, but actually charge or credit the customer's card only at the end * of a regular billing cycle. This is useful for combining several charges (to minimize * per-transaction fees), or for having Stripe tabulate your usage-based billing totals. * diff --git a/src/main/java/com/stripe/model/Mandate.java b/src/main/java/com/stripe/model/Mandate.java index e1ef11973e8..3dd01a8d2b2 100644 --- a/src/main/java/com/stripe/model/Mandate.java +++ b/src/main/java/com/stripe/model/Mandate.java @@ -227,6 +227,9 @@ public static class PaymentMethodDetails extends StripeObject { @SerializedName("kakao_pay") KakaoPay kakaoPay; + @SerializedName("klarna") + Klarna klarna; + @SerializedName("kr_card") KrCard krCard; @@ -384,6 +387,15 @@ public static class Cashapp extends StripeObject {} @EqualsAndHashCode(callSuper = false) public static class KakaoPay extends StripeObject {} + /** + * For more details about Klarna, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Klarna extends StripeObject {} + /** * For more details about KrCard, please refer to the API * Reference. diff --git a/src/main/java/com/stripe/model/Order.java b/src/main/java/com/stripe/model/Order.java index c46c4b3489a..1bdf75695db 100644 --- a/src/main/java/com/stripe/model/Order.java +++ b/src/main/java/com/stripe/model/Order.java @@ -1274,7 +1274,7 @@ public static class Klarna extends StripeObject { * comply with regional legislation and network rules, such as SCA. * - *

Equal to {@code none}. + *

One of {@code none}, {@code off_session}, or {@code on_session}. */ @SerializedName("setup_future_usage") String setupFutureUsage; diff --git a/src/main/java/com/stripe/model/PaymentAttemptRecord.java b/src/main/java/com/stripe/model/PaymentAttemptRecord.java index 2b1e762a17e..feeb34588f6 100644 --- a/src/main/java/com/stripe/model/PaymentAttemptRecord.java +++ b/src/main/java/com/stripe/model/PaymentAttemptRecord.java @@ -361,6 +361,9 @@ public static class PaymentMethodDetails extends StripeObject { @SerializedName("cashapp") Cashapp cashapp; + @SerializedName("crypto") + Crypto crypto; + /** * Custom Payment Methods represent Payment Method types not modeled directly in the Stripe API. * This resource consists of details about the custom payment method used for this payment @@ -506,6 +509,7 @@ public static class PaymentMethodDetails extends StripeObject { @SerializedName("type") String type; + /** Details of the US Bank Account used for this payment attempt. */ @SerializedName("us_bank_account") UsBankAccount usBankAccount; @@ -1323,7 +1327,10 @@ public static class CardPresent extends StripeObject { @SerializedName("overcapture_supported") Boolean overcaptureSupported; - /** EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. */ + /** + * The languages that the issuing bank recommends using for localizing any customer-facing + * text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. + */ @SerializedName("preferred_locales") List preferredLocales; @@ -1383,11 +1390,18 @@ public static class Receipt extends StripeObject { @SerializedName("account_type") String accountType; - /** EMV tag 9F26, cryptogram generated by the integrated circuit chip. */ + /** + * The Application Cryptogram, a unique value generated by the card to authenticate the + * transaction with issuers. + */ @SerializedName("application_cryptogram") String applicationCryptogram; - /** Mnenomic of the Application Identifier. */ + /** + * The Application Identifier (AID) on the card used to determine which networks are + * eligible to process the transaction. Referenced from EMV tag 9F12, data encoded on the + * card's chip. + */ @SerializedName("application_preferred_name") String applicationPreferredName; @@ -1408,16 +1422,24 @@ public static class Receipt extends StripeObject { String cardholderVerificationMethod; /** - * EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. + * Similar to the application_preferred_name, identifying the applications (AIDs) available + * on the card. Referenced from EMV tag 84. */ @SerializedName("dedicated_file_name") String dedicatedFileName; - /** The outcome of a series of EMV functions performed by the card reader. */ + /** + * A 5-byte string that records the checks and validations that occur between the card and + * the terminal. These checks determine how the terminal processes the transaction and what + * risk tolerance is acceptable. Referenced from EMV Tag 95. + */ @SerializedName("terminal_verification_results") String terminalVerificationResults; - /** An indication of various EMV functions performed during the transaction. */ + /** + * An indication of which steps were completed during the card read process. Referenced from + * EMV Tag 9B. + */ @SerializedName("transaction_status_information") String transactionStatusInformation; } @@ -1456,6 +1478,39 @@ public static class Cashapp extends StripeObject { String cashtag; } + /** + * For more details about Crypto, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Crypto extends StripeObject { + /** The wallet address of the customer. */ + @SerializedName("buyer_address") + String buyerAddress; + + /** + * The blockchain network that the transaction was sent on. + * + *

One of {@code base}, {@code ethereum}, or {@code polygon}. + */ + @SerializedName("network") + String network; + + /** + * The token currency that the transaction was sent with. + * + *

One of {@code usdc}, {@code usdg}, or {@code usdp}. + */ + @SerializedName("token_currency") + String tokenCurrency; + + /** The blockchain transaction hash of the crypto payment. */ + @SerializedName("transaction_hash") + String transactionHash; + } + /** * Custom Payment Methods represent Payment Method types not modeled directly in the Stripe API. * This resource consists of details about the custom payment method used for this payment @@ -1644,9 +1699,9 @@ public static class IdBankTransfer extends StripeObject { public static class Ideal extends StripeObject { /** * The customer's bank. Can be one of {@code abn_amro}, {@code asn_bank}, {@code bunq}, {@code - * handelsbanken}, {@code ing}, {@code knab}, {@code moneyou}, {@code n26}, {@code nn}, {@code - * rabobank}, {@code regiobank}, {@code revolut}, {@code sns_bank}, {@code triodos_bank}, - * {@code van_lanschot}, or {@code yoursafe}. + * buut}, {@code handelsbanken}, {@code ing}, {@code knab}, {@code moneyou}, {@code n26}, + * {@code nn}, {@code rabobank}, {@code regiobank}, {@code revolut}, {@code sns_bank}, {@code + * triodos_bank}, {@code van_lanschot}, or {@code yoursafe}. */ @SerializedName("bank") String bank; @@ -1655,9 +1710,9 @@ public static class Ideal extends StripeObject { * The Bank Identifier Code of the customer's bank. * *

One of {@code ABNANL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code BUNQNL2A}, {@code - * FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code KNABNL2H}, {@code MOYONL21}, {@code - * NNBANL2G}, {@code NTSBDEB1}, {@code RABONL2U}, {@code RBRBNL21}, {@code REVOIE23}, {@code - * REVOLT21}, {@code SNSBNL2A}, or {@code TRIONL2U}. + * BUUTNL2A}, {@code FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code KNABNL2H}, {@code + * MOYONL21}, {@code NNBANL2G}, {@code NTSBDEB1}, {@code RABONL2U}, {@code RBRBNL21}, {@code + * REVOIE23}, {@code REVOLT21}, {@code SNSBNL2A}, or {@code TRIONL2U}. */ @SerializedName("bic") String bic; @@ -1841,7 +1896,10 @@ public static class InteracPresent extends StripeObject { @SerializedName("network_transaction_id") String networkTransactionId; - /** EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. */ + /** + * The languages that the issuing bank recommends using for localizing any customer-facing + * text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. + */ @SerializedName("preferred_locales") List preferredLocales; @@ -1877,11 +1935,18 @@ public static class Receipt extends StripeObject { @SerializedName("account_type") String accountType; - /** EMV tag 9F26, cryptogram generated by the integrated circuit chip. */ + /** + * The Application Cryptogram, a unique value generated by the card to authenticate the + * transaction with issuers. + */ @SerializedName("application_cryptogram") String applicationCryptogram; - /** Mnenomic of the Application Identifier. */ + /** + * The Application Identifier (AID) on the card used to determine which networks are + * eligible to process the transaction. Referenced from EMV tag 9F12, data encoded on the + * card's chip. + */ @SerializedName("application_preferred_name") String applicationPreferredName; @@ -1902,16 +1967,24 @@ public static class Receipt extends StripeObject { String cardholderVerificationMethod; /** - * EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. + * Similar to the application_preferred_name, identifying the applications (AIDs) available + * on the card. Referenced from EMV tag 84. */ @SerializedName("dedicated_file_name") String dedicatedFileName; - /** The outcome of a series of EMV functions performed by the card reader. */ + /** + * A 5-byte string that records the checks and validations that occur between the card and + * the terminal. These checks determine how the terminal processes the transaction and what + * risk tolerance is acceptable. Referenced from EMV Tag 95. + */ @SerializedName("terminal_verification_results") String terminalVerificationResults; - /** An indication of various EMV functions performed during the transaction. */ + /** + * An indication of which steps were completed during the card read process. Referenced from + * EMV Tag 9B. + */ @SerializedName("transaction_status_information") String transactionStatusInformation; } @@ -2774,27 +2847,14 @@ public static class Swish extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class Twint extends StripeObject {} - /** - * For more details about UsBankAccount, please refer to the API Reference. - */ + /** Details of the US Bank Account used for this payment attempt. */ @Getter @Setter @EqualsAndHashCode(callSuper = false) public static class UsBankAccount extends StripeObject { - /** - * Account holder type: individual or company. - * - *

One of {@code company}, or {@code individual}. - */ @SerializedName("account_holder_type") String accountHolderType; - /** - * Account type: checkings or savings. Defaults to checking if omitted. - * - *

One of {@code checking}, or {@code savings}. - */ @SerializedName("account_type") String accountType; @@ -2819,7 +2879,7 @@ public static class UsBankAccount extends StripeObject { @Setter(lombok.AccessLevel.NONE) ExpandableField mandate; - /** Reference number to locate ACH payments with customer's bank. */ + /** Reference number to locate ACH payments with customer’s bank. */ @SerializedName("payment_reference") String paymentReference; diff --git a/src/main/java/com/stripe/model/PaymentIntent.java b/src/main/java/com/stripe/model/PaymentIntent.java index cf663c29492..e77d124fd9a 100644 --- a/src/main/java/com/stripe/model/PaymentIntent.java +++ b/src/main/java/com/stripe/model/PaymentIntent.java @@ -3194,6 +3194,9 @@ public static class PaymentMethodOptions extends StripeObject { @SerializedName("cashapp") Cashapp cashapp; + @SerializedName("crypto") + Crypto crypto; + @SerializedName("customer_balance") CustomerBalance customerBalance; @@ -3844,7 +3847,7 @@ public static class Card extends StripeObject { String captureMethod; /** - * Installment details for this payment (Mexico only). + * Installment details for this payment. * *

For more information, see the installments integration guide. @@ -4031,7 +4034,10 @@ public static class AvailablePlan extends StripeObject { @SerializedName("interval") String interval; - /** Type of installment plan, one of {@code fixed_count}. */ + /** + * Type of installment plan, one of {@code fixed_count}, {@code bonus}, or {@code + * revolving}. + */ @SerializedName("type") String type; } @@ -4058,7 +4064,10 @@ public static class Plan extends StripeObject { @SerializedName("interval") String interval; - /** Type of installment plan, one of {@code fixed_count}. */ + /** + * Type of installment plan, one of {@code fixed_count}, {@code bonus}, or {@code + * revolving}. + */ @SerializedName("type") String type; } @@ -4272,6 +4281,39 @@ public static class Cashapp extends StripeObject { String setupFutureUsage; } + /** + * For more details about Crypto, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Crypto extends StripeObject { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

Equal to {@code none}. + */ + @SerializedName("setup_future_usage") + String setupFutureUsage; + } + /** * For more details about CustomerBalance, please refer to the API Reference. @@ -4494,7 +4536,7 @@ public static class Gopay extends StripeObject { * with regional legislation and network rules, such as SCA. * - *

Equal to {@code none}. + *

One of {@code none}, or {@code off_session}. */ @SerializedName("setup_future_usage") String setupFutureUsage; @@ -4702,7 +4744,7 @@ public static class Klarna extends StripeObject { * with regional legislation and network rules, such as SCA. * - *

Equal to {@code none}. + *

One of {@code none}, {@code off_session}, or {@code on_session}. */ @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 eebccc28523..197cdb73171 100644 --- a/src/main/java/com/stripe/model/PaymentMethod.java +++ b/src/main/java/com/stripe/model/PaymentMethod.java @@ -96,6 +96,9 @@ public class PaymentMethod extends ApiResource implements HasId, MetadataStore

One of {@code acss_debit}, {@code affirm}, {@code afterpay_clearpay}, {@code alipay}, {@code * alma}, {@code amazon_pay}, {@code au_becs_debit}, {@code bacs_debit}, {@code bancontact}, * {@code billie}, {@code blik}, {@code boleto}, {@code card}, {@code card_present}, {@code - * cashapp}, {@code customer_balance}, {@code eps}, {@code fpx}, {@code giropay}, {@code gopay}, - * {@code grabpay}, {@code id_bank_transfer}, {@code ideal}, {@code interac_present}, {@code - * kakao_pay}, {@code klarna}, {@code konbini}, {@code kr_card}, {@code link}, {@code mb_way}, - * {@code mobilepay}, {@code multibanco}, {@code naver_pay}, {@code nz_bank_account}, {@code - * oxxo}, {@code p24}, {@code pay_by_bank}, {@code payco}, {@code paynow}, {@code paypal}, {@code - * payto}, {@code pix}, {@code promptpay}, {@code qris}, {@code rechnung}, {@code revolut_pay}, - * {@code samsung_pay}, {@code satispay}, {@code sepa_debit}, {@code shopeepay}, {@code sofort}, - * {@code stripe_balance}, {@code swish}, {@code twint}, {@code us_bank_account}, {@code - * wechat_pay}, or {@code zip}. + * cashapp}, {@code crypto}, {@code customer_balance}, {@code eps}, {@code fpx}, {@code giropay}, + * {@code gopay}, {@code grabpay}, {@code id_bank_transfer}, {@code ideal}, {@code + * interac_present}, {@code kakao_pay}, {@code klarna}, {@code konbini}, {@code kr_card}, {@code + * link}, {@code mb_way}, {@code mobilepay}, {@code multibanco}, {@code naver_pay}, {@code + * nz_bank_account}, {@code oxxo}, {@code p24}, {@code pay_by_bank}, {@code payco}, {@code + * paynow}, {@code paypal}, {@code payto}, {@code pix}, {@code promptpay}, {@code qris}, {@code + * rechnung}, {@code revolut_pay}, {@code samsung_pay}, {@code satispay}, {@code sepa_debit}, + * {@code shopeepay}, {@code sofort}, {@code stripe_balance}, {@code swish}, {@code twint}, {@code + * us_bank_account}, {@code wechat_pay}, or {@code zip}. */ @SerializedName("type") String type; @@ -1287,7 +1290,11 @@ public static class CardPresent extends StripeObject { @SerializedName("overcapture_supported") Boolean overcaptureSupported; - /** EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. */ + /** + * The languages that the issuing bank recommends using for localizing any customer-facing + * text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's + * chip. + */ @SerializedName("preferred_locales") List preferredLocales; @@ -1348,11 +1355,18 @@ public static class Receipt extends StripeObject { @SerializedName("account_type") String accountType; - /** EMV tag 9F26, cryptogram generated by the integrated circuit chip. */ + /** + * The Application Cryptogram, a unique value generated by the card to authenticate the + * transaction with issuers. + */ @SerializedName("application_cryptogram") String applicationCryptogram; - /** Mnenomic of the Application Identifier. */ + /** + * The Application Identifier (AID) on the card used to determine which networks are + * eligible to process the transaction. Referenced from EMV tag 9F12, data encoded on + * the card's chip. + */ @SerializedName("application_preferred_name") String applicationPreferredName; @@ -1373,17 +1387,24 @@ public static class Receipt extends StripeObject { String cardholderVerificationMethod; /** - * EMV tag 84. Similar to the application identifier stored on the integrated circuit - * chip. + * Similar to the application_preferred_name, identifying the applications (AIDs) + * available on the card. Referenced from EMV tag 84. */ @SerializedName("dedicated_file_name") String dedicatedFileName; - /** The outcome of a series of EMV functions performed by the card reader. */ + /** + * A 5-byte string that records the checks and validations that occur between the card + * and the terminal. These checks determine how the terminal processes the transaction + * and what risk tolerance is acceptable. Referenced from EMV Tag 95. + */ @SerializedName("terminal_verification_results") String terminalVerificationResults; - /** An indication of various EMV functions performed during the transaction. */ + /** + * An indication of which steps were completed during the card read process. Referenced + * from EMV Tag 9B. + */ @SerializedName("transaction_status_information") String transactionStatusInformation; } @@ -1706,7 +1727,10 @@ public static class CardPresent extends StripeObject { @SerializedName("offline") Offline offline; - /** EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. */ + /** + * The languages that the issuing bank recommends using for localizing any customer-facing text, + * as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. + */ @SerializedName("preferred_locales") List preferredLocales; @@ -1797,6 +1821,15 @@ public static class Cashapp extends StripeObject { String cashtag; } + /** + * For more details about Crypto, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Crypto extends StripeObject {} + /** * For more details about CustomerBalance, please refer to the API Reference. @@ -1914,9 +1947,9 @@ public static class IdBankTransfer extends StripeObject { public static class Ideal extends StripeObject { /** * The customer's bank, if provided. Can be one of {@code abn_amro}, {@code asn_bank}, {@code - * bunq}, {@code handelsbanken}, {@code ing}, {@code knab}, {@code moneyou}, {@code n26}, {@code - * nn}, {@code rabobank}, {@code regiobank}, {@code revolut}, {@code sns_bank}, {@code - * triodos_bank}, {@code van_lanschot}, or {@code yoursafe}. + * bunq}, {@code buut}, {@code handelsbanken}, {@code ing}, {@code knab}, {@code moneyou}, + * {@code n26}, {@code nn}, {@code rabobank}, {@code regiobank}, {@code revolut}, {@code + * sns_bank}, {@code triodos_bank}, {@code van_lanschot}, or {@code yoursafe}. */ @SerializedName("bank") String bank; @@ -1925,9 +1958,9 @@ public static class Ideal extends StripeObject { * The Bank Identifier Code of the customer's bank, if the bank was provided. * *

One of {@code ABNANL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code BUNQNL2A}, {@code - * FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code KNABNL2H}, {@code MOYONL21}, {@code - * NNBANL2G}, {@code NTSBDEB1}, {@code RABONL2U}, {@code RBRBNL21}, {@code REVOIE23}, {@code - * REVOLT21}, {@code SNSBNL2A}, or {@code TRIONL2U}. + * BUUTNL2A}, {@code FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code KNABNL2H}, {@code + * MOYONL21}, {@code NNBANL2G}, {@code NTSBDEB1}, {@code RABONL2U}, {@code RBRBNL21}, {@code + * REVOIE23}, {@code REVOLT21}, {@code SNSBNL2A}, or {@code TRIONL2U}. */ @SerializedName("bic") String bic; @@ -2018,7 +2051,10 @@ public static class InteracPresent extends StripeObject { @SerializedName("networks") Networks networks; - /** EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. */ + /** + * The languages that the issuing bank recommends using for localizing any customer-facing text, + * as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. + */ @SerializedName("preferred_locales") List preferredLocales; @@ -2770,6 +2806,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { trySetResponseGetter(card, responseGetter); trySetResponseGetter(cardPresent, responseGetter); trySetResponseGetter(cashapp, responseGetter); + trySetResponseGetter(crypto, responseGetter); trySetResponseGetter(customer, responseGetter); trySetResponseGetter(customerBalance, responseGetter); trySetResponseGetter(eps, responseGetter); diff --git a/src/main/java/com/stripe/model/PaymentRecord.java b/src/main/java/com/stripe/model/PaymentRecord.java index 3a576345a01..06bd81a447f 100644 --- a/src/main/java/com/stripe/model/PaymentRecord.java +++ b/src/main/java/com/stripe/model/PaymentRecord.java @@ -561,6 +561,9 @@ public static class PaymentMethodDetails extends StripeObject { @SerializedName("cashapp") Cashapp cashapp; + @SerializedName("crypto") + Crypto crypto; + /** * Custom Payment Methods represent Payment Method types not modeled directly in the Stripe API. * This resource consists of details about the custom payment method used for this payment @@ -706,6 +709,7 @@ public static class PaymentMethodDetails extends StripeObject { @SerializedName("type") String type; + /** Details of the US Bank Account used for this payment attempt. */ @SerializedName("us_bank_account") UsBankAccount usBankAccount; @@ -1523,7 +1527,10 @@ public static class CardPresent extends StripeObject { @SerializedName("overcapture_supported") Boolean overcaptureSupported; - /** EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. */ + /** + * The languages that the issuing bank recommends using for localizing any customer-facing + * text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. + */ @SerializedName("preferred_locales") List preferredLocales; @@ -1583,11 +1590,18 @@ public static class Receipt extends StripeObject { @SerializedName("account_type") String accountType; - /** EMV tag 9F26, cryptogram generated by the integrated circuit chip. */ + /** + * The Application Cryptogram, a unique value generated by the card to authenticate the + * transaction with issuers. + */ @SerializedName("application_cryptogram") String applicationCryptogram; - /** Mnenomic of the Application Identifier. */ + /** + * The Application Identifier (AID) on the card used to determine which networks are + * eligible to process the transaction. Referenced from EMV tag 9F12, data encoded on the + * card's chip. + */ @SerializedName("application_preferred_name") String applicationPreferredName; @@ -1608,16 +1622,24 @@ public static class Receipt extends StripeObject { String cardholderVerificationMethod; /** - * EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. + * Similar to the application_preferred_name, identifying the applications (AIDs) available + * on the card. Referenced from EMV tag 84. */ @SerializedName("dedicated_file_name") String dedicatedFileName; - /** The outcome of a series of EMV functions performed by the card reader. */ + /** + * A 5-byte string that records the checks and validations that occur between the card and + * the terminal. These checks determine how the terminal processes the transaction and what + * risk tolerance is acceptable. Referenced from EMV Tag 95. + */ @SerializedName("terminal_verification_results") String terminalVerificationResults; - /** An indication of various EMV functions performed during the transaction. */ + /** + * An indication of which steps were completed during the card read process. Referenced from + * EMV Tag 9B. + */ @SerializedName("transaction_status_information") String transactionStatusInformation; } @@ -1656,6 +1678,39 @@ public static class Cashapp extends StripeObject { String cashtag; } + /** + * For more details about Crypto, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Crypto extends StripeObject { + /** The wallet address of the customer. */ + @SerializedName("buyer_address") + String buyerAddress; + + /** + * The blockchain network that the transaction was sent on. + * + *

One of {@code base}, {@code ethereum}, or {@code polygon}. + */ + @SerializedName("network") + String network; + + /** + * The token currency that the transaction was sent with. + * + *

One of {@code usdc}, {@code usdg}, or {@code usdp}. + */ + @SerializedName("token_currency") + String tokenCurrency; + + /** The blockchain transaction hash of the crypto payment. */ + @SerializedName("transaction_hash") + String transactionHash; + } + /** * Custom Payment Methods represent Payment Method types not modeled directly in the Stripe API. * This resource consists of details about the custom payment method used for this payment @@ -1844,9 +1899,9 @@ public static class IdBankTransfer extends StripeObject { public static class Ideal extends StripeObject { /** * The customer's bank. Can be one of {@code abn_amro}, {@code asn_bank}, {@code bunq}, {@code - * handelsbanken}, {@code ing}, {@code knab}, {@code moneyou}, {@code n26}, {@code nn}, {@code - * rabobank}, {@code regiobank}, {@code revolut}, {@code sns_bank}, {@code triodos_bank}, - * {@code van_lanschot}, or {@code yoursafe}. + * buut}, {@code handelsbanken}, {@code ing}, {@code knab}, {@code moneyou}, {@code n26}, + * {@code nn}, {@code rabobank}, {@code regiobank}, {@code revolut}, {@code sns_bank}, {@code + * triodos_bank}, {@code van_lanschot}, or {@code yoursafe}. */ @SerializedName("bank") String bank; @@ -1855,9 +1910,9 @@ public static class Ideal extends StripeObject { * The Bank Identifier Code of the customer's bank. * *

One of {@code ABNANL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code BUNQNL2A}, {@code - * FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code KNABNL2H}, {@code MOYONL21}, {@code - * NNBANL2G}, {@code NTSBDEB1}, {@code RABONL2U}, {@code RBRBNL21}, {@code REVOIE23}, {@code - * REVOLT21}, {@code SNSBNL2A}, or {@code TRIONL2U}. + * BUUTNL2A}, {@code FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code KNABNL2H}, {@code + * MOYONL21}, {@code NNBANL2G}, {@code NTSBDEB1}, {@code RABONL2U}, {@code RBRBNL21}, {@code + * REVOIE23}, {@code REVOLT21}, {@code SNSBNL2A}, or {@code TRIONL2U}. */ @SerializedName("bic") String bic; @@ -2041,7 +2096,10 @@ public static class InteracPresent extends StripeObject { @SerializedName("network_transaction_id") String networkTransactionId; - /** EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. */ + /** + * The languages that the issuing bank recommends using for localizing any customer-facing + * text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. + */ @SerializedName("preferred_locales") List preferredLocales; @@ -2077,11 +2135,18 @@ public static class Receipt extends StripeObject { @SerializedName("account_type") String accountType; - /** EMV tag 9F26, cryptogram generated by the integrated circuit chip. */ + /** + * The Application Cryptogram, a unique value generated by the card to authenticate the + * transaction with issuers. + */ @SerializedName("application_cryptogram") String applicationCryptogram; - /** Mnenomic of the Application Identifier. */ + /** + * The Application Identifier (AID) on the card used to determine which networks are + * eligible to process the transaction. Referenced from EMV tag 9F12, data encoded on the + * card's chip. + */ @SerializedName("application_preferred_name") String applicationPreferredName; @@ -2102,16 +2167,24 @@ public static class Receipt extends StripeObject { String cardholderVerificationMethod; /** - * EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. + * Similar to the application_preferred_name, identifying the applications (AIDs) available + * on the card. Referenced from EMV tag 84. */ @SerializedName("dedicated_file_name") String dedicatedFileName; - /** The outcome of a series of EMV functions performed by the card reader. */ + /** + * A 5-byte string that records the checks and validations that occur between the card and + * the terminal. These checks determine how the terminal processes the transaction and what + * risk tolerance is acceptable. Referenced from EMV Tag 95. + */ @SerializedName("terminal_verification_results") String terminalVerificationResults; - /** An indication of various EMV functions performed during the transaction. */ + /** + * An indication of which steps were completed during the card read process. Referenced from + * EMV Tag 9B. + */ @SerializedName("transaction_status_information") String transactionStatusInformation; } @@ -2973,27 +3046,14 @@ public static class Swish extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class Twint extends StripeObject {} - /** - * For more details about UsBankAccount, please refer to the API Reference. - */ + /** Details of the US Bank Account used for this payment attempt. */ @Getter @Setter @EqualsAndHashCode(callSuper = false) public static class UsBankAccount extends StripeObject { - /** - * Account holder type: individual or company. - * - *

One of {@code company}, or {@code individual}. - */ @SerializedName("account_holder_type") String accountHolderType; - /** - * Account type: checkings or savings. Defaults to checking if omitted. - * - *

One of {@code checking}, or {@code savings}. - */ @SerializedName("account_type") String accountType; @@ -3018,7 +3078,7 @@ public static class UsBankAccount extends StripeObject { @Setter(lombok.AccessLevel.NONE) ExpandableField mandate; - /** Reference number to locate ACH payments with customer's bank. */ + /** Reference number to locate ACH payments with customer’s bank. */ @SerializedName("payment_reference") String paymentReference; diff --git a/src/main/java/com/stripe/model/Quote.java b/src/main/java/com/stripe/model/Quote.java index d11d2081797..63445a35f30 100644 --- a/src/main/java/com/stripe/model/Quote.java +++ b/src/main/java/com/stripe/model/Quote.java @@ -1973,15 +1973,9 @@ public static class SubscriptionData extends StripeObject { @SerializedName("billing_cycle_anchor") String billingCycleAnchor; - /** - * The billing - * mode that will be set on the subscription once the quote is accepted. - * - *

One of {@code classic}, or {@code flexible}. - */ + /** The billing mode of the quote. */ @SerializedName("billing_mode") - String billingMode; + BillingMode billingMode; /** * The subscription's description, meant to be displayable to the customer. Use this field to @@ -2202,6 +2196,20 @@ public static class LineEndsAt extends StripeObject implements HasId { } } + /** The billing mode of the quote. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class BillingMode extends StripeObject { + /** + * Controls how prorations and invoices for subscriptions are calculated and orchestrated. + * + *

One of {@code classic}, or {@code flexible}. + */ + @SerializedName("type") + String type; + } + /** * For more details about Prebilling, please refer to the API Reference. diff --git a/src/main/java/com/stripe/model/QuotePreviewSubscriptionSchedule.java b/src/main/java/com/stripe/model/QuotePreviewSubscriptionSchedule.java index 47b07c29252..de875bf3fbb 100644 --- a/src/main/java/com/stripe/model/QuotePreviewSubscriptionSchedule.java +++ b/src/main/java/com/stripe/model/QuotePreviewSubscriptionSchedule.java @@ -44,15 +44,9 @@ public class QuotePreviewSubscriptionSchedule extends ApiResource implements Has @SerializedName("billing_behavior") String billingBehavior; - /** - * The billing - * mode that will be used to process all future operations for the subscription schedule. - * - *

One of {@code classic}, or {@code flexible}. - */ + /** The billing mode of the subscription. */ @SerializedName("billing_mode") - String billingMode; + BillingMode billingMode; /** * Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch. @@ -321,6 +315,24 @@ public static class AppliesTo extends StripeObject { String type; } + /** The billing mode of the subscription. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class BillingMode extends StripeObject { + /** + * Controls how prorations and invoices for subscriptions are calculated and orchestrated. + * + *

One of {@code classic}, or {@code flexible}. + */ + @SerializedName("type") + String type; + + /** Details on when the current billing_mode was adopted. */ + @SerializedName("updated_at") + Long updatedAt; + } + /** * For more details about CurrentPhase, please refer to the API Reference. @@ -1810,6 +1822,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { super.setResponseGetter(responseGetter); trySetResponseGetter(application, responseGetter); trySetResponseGetter(appliesTo, responseGetter); + trySetResponseGetter(billingMode, responseGetter); trySetResponseGetter(currentPhase, responseGetter); trySetResponseGetter(customer, responseGetter); trySetResponseGetter(defaultSettings, responseGetter); diff --git a/src/main/java/com/stripe/model/SetupAttempt.java b/src/main/java/com/stripe/model/SetupAttempt.java index 9625bd09f75..b73b4f4ee6c 100644 --- a/src/main/java/com/stripe/model/SetupAttempt.java +++ b/src/main/java/com/stripe/model/SetupAttempt.java @@ -837,9 +837,9 @@ public static class IdBankTransfer extends StripeObject { public static class Ideal extends StripeObject { /** * The customer's bank. Can be one of {@code abn_amro}, {@code asn_bank}, {@code bunq}, {@code - * handelsbanken}, {@code ing}, {@code knab}, {@code moneyou}, {@code n26}, {@code nn}, {@code - * rabobank}, {@code regiobank}, {@code revolut}, {@code sns_bank}, {@code triodos_bank}, - * {@code van_lanschot}, or {@code yoursafe}. + * buut}, {@code handelsbanken}, {@code ing}, {@code knab}, {@code moneyou}, {@code n26}, + * {@code nn}, {@code rabobank}, {@code regiobank}, {@code revolut}, {@code sns_bank}, {@code + * triodos_bank}, {@code van_lanschot}, or {@code yoursafe}. */ @SerializedName("bank") String bank; @@ -848,9 +848,9 @@ public static class Ideal extends StripeObject { * The Bank Identifier Code of the customer's bank. * *

One of {@code ABNANL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code BUNQNL2A}, {@code - * FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code KNABNL2H}, {@code MOYONL21}, {@code - * NNBANL2G}, {@code NTSBDEB1}, {@code RABONL2U}, {@code RBRBNL21}, {@code REVOIE23}, {@code - * REVOLT21}, {@code SNSBNL2A}, or {@code TRIONL2U}. + * BUUTNL2A}, {@code FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code KNABNL2H}, {@code + * MOYONL21}, {@code NNBANL2G}, {@code NTSBDEB1}, {@code RABONL2U}, {@code RBRBNL21}, {@code + * REVOIE23}, {@code REVOLT21}, {@code SNSBNL2A}, or {@code TRIONL2U}. */ @SerializedName("bic") String bic; diff --git a/src/main/java/com/stripe/model/SetupIntent.java b/src/main/java/com/stripe/model/SetupIntent.java index 42a5f9edc32..1148cbec846 100644 --- a/src/main/java/com/stripe/model/SetupIntent.java +++ b/src/main/java/com/stripe/model/SetupIntent.java @@ -214,7 +214,11 @@ public class SetupIntent extends ApiResource implements HasId, MetadataStorehere. + */ @SerializedName("payment_method_types") List paymentMethodTypes; @@ -1027,6 +1031,9 @@ public static class PaymentMethodOptions extends StripeObject { @SerializedName("card_present") CardPresent cardPresent; + @SerializedName("klarna") + Klarna klarna; + @SerializedName("link") Link link; @@ -1267,6 +1274,23 @@ public static class MandateOptions extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class CardPresent extends StripeObject {} + /** + * For more details about Klarna, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Klarna extends StripeObject { + /** The currency of the setup intent. Three letter ISO currency code. */ + @SerializedName("currency") + String currency; + + /** Preferred locale of the Klarna checkout page that the customer is redirected to. */ + @SerializedName("preferred_locale") + String preferredLocale; + } + /** * For more details about Link, please refer to the API * Reference. diff --git a/src/main/java/com/stripe/model/Subscription.java b/src/main/java/com/stripe/model/Subscription.java index ff48d95fcfd..765cfb7189c 100644 --- a/src/main/java/com/stripe/model/Subscription.java +++ b/src/main/java/com/stripe/model/Subscription.java @@ -66,17 +66,9 @@ public class Subscription extends ApiResource implements HasId, MetadataStoreOne of {@code classic}, or {@code flexible}. - */ + /** The billing mode of the subscription. */ @SerializedName("billing_mode") - String billingMode; - - /** Details about when the current billing_mode was updated. */ - @SerializedName("billing_mode_details") - BillingModeDetails billingModeDetails; + BillingMode billingMode; /** * Define thresholds at which an invoice will be sent, and the subscription advanced to a new @@ -91,8 +83,7 @@ public class Subscription extends ApiResource implements HasId, MetadataStoreOne of {@code classic}, or {@code flexible}. + */ + @SerializedName("type") + String type; + /** Details on when the current billing_mode was adopted. */ @SerializedName("updated_at") Long updatedAt; @@ -2214,7 +2210,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { trySetResponseGetter(application, responseGetter); trySetResponseGetter(automaticTax, responseGetter); trySetResponseGetter(billingCycleAnchorConfig, responseGetter); - trySetResponseGetter(billingModeDetails, responseGetter); + trySetResponseGetter(billingMode, responseGetter); trySetResponseGetter(billingThresholds, responseGetter); trySetResponseGetter(cancellationDetails, responseGetter); trySetResponseGetter(customer, responseGetter); diff --git a/src/main/java/com/stripe/model/SubscriptionSchedule.java b/src/main/java/com/stripe/model/SubscriptionSchedule.java index 8c3139c5ea8..0f986c7e3f7 100644 --- a/src/main/java/com/stripe/model/SubscriptionSchedule.java +++ b/src/main/java/com/stripe/model/SubscriptionSchedule.java @@ -56,15 +56,9 @@ public class SubscriptionSchedule extends ApiResource @SerializedName("billing_behavior") String billingBehavior; - /** - * The billing - * mode that will be used to process all future operations for the subscription schedule. - * - *

One of {@code classic}, or {@code flexible}. - */ + /** The billing mode of the subscription. */ @SerializedName("billing_mode") - String billingMode; + BillingMode billingMode; /** * Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch. @@ -636,6 +630,24 @@ public SubscriptionSchedule update( return getResponseGetter().request(request, SubscriptionSchedule.class); } + /** The billing mode of the subscription. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class BillingMode extends StripeObject { + /** + * Controls how prorations and invoices for subscriptions are calculated and orchestrated. + * + *

One of {@code classic}, or {@code flexible}. + */ + @SerializedName("type") + String type; + + /** Details on when the current billing_mode was adopted. */ + @SerializedName("updated_at") + Long updatedAt; + } + /** * For more details about CurrentPhase, please refer to the API Reference. @@ -2123,6 +2135,7 @@ public void setInvoiceObject(Invoice expandableObject) { public void setResponseGetter(StripeResponseGetter responseGetter) { super.setResponseGetter(responseGetter); trySetResponseGetter(application, responseGetter); + trySetResponseGetter(billingMode, responseGetter); trySetResponseGetter(currentPhase, responseGetter); trySetResponseGetter(customer, responseGetter); trySetResponseGetter(defaultSettings, responseGetter); diff --git a/src/main/java/com/stripe/model/billingportal/Session.java b/src/main/java/com/stripe/model/billingportal/Session.java index 2ab2fbbf35e..d9b72ff93cd 100644 --- a/src/main/java/com/stripe/model/billingportal/Session.java +++ b/src/main/java/com/stripe/model/billingportal/Session.java @@ -330,10 +330,7 @@ public static class SubscriptionUpdate extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class SubscriptionUpdateConfirm extends StripeObject { - /** - * The coupon or promotion code to apply to this subscription update. Currently, only up to - * one may be specified. - */ + /** The coupon or promotion code to apply to this subscription update. */ @SerializedName("discounts") List discounts; diff --git a/src/main/java/com/stripe/model/identity/VerificationSession.java b/src/main/java/com/stripe/model/identity/VerificationSession.java index b57f439d024..7547f8d709a 100644 --- a/src/main/java/com/stripe/model/identity/VerificationSession.java +++ b/src/main/java/com/stripe/model/identity/VerificationSession.java @@ -137,6 +137,9 @@ public class VerificationSession extends ApiResource @SerializedName("related_customer_account") String relatedCustomerAccount; + @SerializedName("related_person") + RelatedPerson relatedPerson; + /** * Status of this VerificationSession. Learn more about the lifecycle of @@ -721,6 +724,9 @@ public static class Options extends StripeObject { @SerializedName("id_number") IdNumber idNumber; + @SerializedName("matching") + Matching matching; + @SerializedName("phone") Phone phone; @@ -787,6 +793,31 @@ public static class Email extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class IdNumber extends StripeObject {} + /** + * For more details about Matching, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Matching extends StripeObject { + /** + * Strictness of the DOB matching policy to apply. + * + *

One of {@code none}, or {@code similar}. + */ + @SerializedName("dob") + String dob; + + /** + * Strictness of the name matching policy to apply. + * + *

One of {@code none}, or {@code similar}. + */ + @SerializedName("name") + String name; + } + /** * For more details about Phone, please refer to the API * Reference. @@ -835,6 +866,23 @@ public static class Redaction extends StripeObject { String status; } + /** + * For more details about RelatedPerson, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class RelatedPerson extends StripeObject { + /** Token referencing the associated Account of the related Person resource. */ + @SerializedName("account") + String account; + + /** Token referencing the related Person resource. */ + @SerializedName("person") + String person; + } + /** * For more details about VerifiedOutputs, please refer to the API Reference. @@ -922,6 +970,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { trySetResponseGetter(options, responseGetter); trySetResponseGetter(providedDetails, responseGetter); trySetResponseGetter(redaction, responseGetter); + trySetResponseGetter(relatedPerson, responseGetter); trySetResponseGetter(verifiedOutputs, responseGetter); } } diff --git a/src/main/java/com/stripe/model/tax/Registration.java b/src/main/java/com/stripe/model/tax/Registration.java index a926de6ef47..ee06edade1d 100644 --- a/src/main/java/com/stripe/model/tax/Registration.java +++ b/src/main/java/com/stripe/model/tax/Registration.java @@ -525,6 +525,9 @@ public static class CountryOptions extends StripeObject { @SerializedName("tz") Tz tz; + @SerializedName("ua") + Ua ua; + @SerializedName("ug") Ug ug; @@ -2638,6 +2641,23 @@ public static class Tz extends StripeObject { String type; } + /** + * For more details about Ua, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Ua extends StripeObject { + /** + * Type of registration in {@code country}. + * + *

Equal to {@code simplified}. + */ + @SerializedName("type") + String type; + } + /** * For more details about Ug, please refer to the API * Reference. diff --git a/src/main/java/com/stripe/model/terminal/Configuration.java b/src/main/java/com/stripe/model/terminal/Configuration.java index fea34241544..3ee272db124 100644 --- a/src/main/java/com/stripe/model/terminal/Configuration.java +++ b/src/main/java/com/stripe/model/terminal/Configuration.java @@ -23,7 +23,12 @@ import lombok.Getter; import lombok.Setter; -/** A Configurations object represents how features should be configured for terminal readers. */ +/** + * A Configurations object represents how features should be configured for terminal readers. For + * information about how to use it, see the Terminal configurations + * documentation. + */ @Getter @Setter @EqualsAndHashCode(callSuper = false) diff --git a/src/main/java/com/stripe/model/terminal/Reader.java b/src/main/java/com/stripe/model/terminal/Reader.java index 7544f1cc347..1d0abd080f1 100644 --- a/src/main/java/com/stripe/model/terminal/Reader.java +++ b/src/main/java/com/stripe/model/terminal/Reader.java @@ -992,7 +992,7 @@ public void setPaymentIntentObject(PaymentIntent expandableObject) { @Setter @EqualsAndHashCode(callSuper = false) public static class CollectConfig extends StripeObject { - /** Enable customer initiated cancellation when processing this payment. */ + /** Enable customer-initiated cancellation when processing this payment. */ @SerializedName("enable_customer_cancellation") Boolean enableCustomerCancellation; @@ -1064,8 +1064,8 @@ public void setPaymentIntentObject(PaymentIntent expandableObject) { @EqualsAndHashCode(callSuper = false) public static class ConfirmConfig extends StripeObject { /** - * If the customer does not abandon authenticating the payment, they will be redirected to - * this specified URL after completion. + * If the customer doesn't abandon authenticating the payment, they're redirected to this + * URL after completion. */ @SerializedName("return_url") String returnUrl; @@ -1115,13 +1115,13 @@ public void setPaymentIntentObject(PaymentIntent expandableObject) { @Setter @EqualsAndHashCode(callSuper = false) public static class ProcessConfig extends StripeObject { - /** Enable customer initiated cancellation when processing this payment. */ + /** Enable customer-initiated cancellation when processing this payment. */ @SerializedName("enable_customer_cancellation") Boolean enableCustomerCancellation; /** - * If the customer does not abandon authenticating the payment, they will be redirected to - * this specified URL after completion. + * If the customer doesn't abandon authenticating the payment, they're redirected to this + * URL after completion. */ @SerializedName("return_url") String returnUrl; @@ -1197,7 +1197,7 @@ public void setSetupIntentObject(SetupIntent expandableObject) { @Setter @EqualsAndHashCode(callSuper = false) public static class ProcessConfig extends StripeObject { - /** Enable customer initiated cancellation when processing this SetupIntent. */ + /** Enable customer-initiated cancellation when processing this SetupIntent. */ @SerializedName("enable_customer_cancellation") Boolean enableCustomerCancellation; } @@ -1333,7 +1333,7 @@ public void setRefundObject(Refund expandableObject) { @Setter @EqualsAndHashCode(callSuper = false) public static class RefundPaymentConfig extends StripeObject { - /** Enable customer initiated cancellation when refunding this payment. */ + /** Enable customer-initiated cancellation when refunding this payment. */ @SerializedName("enable_customer_cancellation") Boolean enableCustomerCancellation; } 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 bce4aeace95..6a4b09ac5d0 100644 --- a/src/main/java/com/stripe/model/v2/core/Account.java +++ b/src/main/java/com/stripe/model/v2/core/Account.java @@ -252,7 +252,7 @@ public static class Location extends StripeObject { * {@code tn}, {@code to}, {@code tr}, {@code tt}, {@code tv}, {@code tw}, {@code tz}, * {@code ua}, {@code ug}, {@code um}, {@code us}, {@code uy}, {@code uz}, {@code va}, * {@code vc}, {@code ve}, {@code vg}, {@code vi}, {@code vn}, {@code vu}, {@code wf}, - * {@code ws}, {@code ye}, {@code yt}, {@code za}, {@code zm}, or {@code zw}. + * {@code ws}, {@code xx}, {@code ye}, {@code yt}, {@code za}, {@code zm}, or {@code zw}. */ @SerializedName("country") String country; @@ -419,7 +419,8 @@ public static class StatusDetail extends StripeObject { * *

One of {@code determining_status}, {@code requirements_past_due}, {@code * requirements_pending_verification}, {@code restricted_other}, {@code - * unsupported_business}, or {@code unsupported_country}. + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. */ @SerializedName("code") String code; @@ -506,7 +507,7 @@ public static class Address extends StripeObject { * {@code tn}, {@code to}, {@code tr}, {@code tt}, {@code tv}, {@code tw}, {@code tz}, * {@code ua}, {@code ug}, {@code um}, {@code us}, {@code uy}, {@code uz}, {@code va}, * {@code vc}, {@code ve}, {@code vg}, {@code vi}, {@code vn}, {@code vu}, {@code wf}, - * {@code ws}, {@code ye}, {@code yt}, {@code za}, {@code zm}, or {@code zw}. + * {@code ws}, {@code xx}, {@code ye}, {@code yt}, {@code za}, {@code zm}, or {@code zw}. */ @SerializedName("country") String country; @@ -855,7 +856,8 @@ public static class StatusDetail extends StripeObject { * *

One of {@code determining_status}, {@code requirements_past_due}, {@code * requirements_pending_verification}, {@code restricted_other}, {@code - * unsupported_business}, or {@code unsupported_country}. + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. */ @SerializedName("code") String code; @@ -912,7 +914,8 @@ public static class StatusDetail extends StripeObject { * *

One of {@code determining_status}, {@code requirements_past_due}, {@code * requirements_pending_verification}, {@code restricted_other}, {@code - * unsupported_business}, or {@code unsupported_country}. + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. */ @SerializedName("code") String code; @@ -969,7 +972,8 @@ public static class StatusDetail extends StripeObject { * *

One of {@code determining_status}, {@code requirements_past_due}, {@code * requirements_pending_verification}, {@code restricted_other}, {@code - * unsupported_business}, or {@code unsupported_country}. + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. */ @SerializedName("code") String code; @@ -1026,7 +1030,8 @@ public static class StatusDetail extends StripeObject { * *

One of {@code determining_status}, {@code requirements_past_due}, {@code * requirements_pending_verification}, {@code restricted_other}, {@code - * unsupported_business}, or {@code unsupported_country}. + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. */ @SerializedName("code") String code; @@ -1082,7 +1087,8 @@ public static class StatusDetail extends StripeObject { * *

One of {@code determining_status}, {@code requirements_past_due}, {@code * requirements_pending_verification}, {@code restricted_other}, {@code - * unsupported_business}, or {@code unsupported_country}. + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. */ @SerializedName("code") String code; @@ -1139,7 +1145,8 @@ public static class StatusDetail extends StripeObject { * *

One of {@code determining_status}, {@code requirements_past_due}, {@code * requirements_pending_verification}, {@code restricted_other}, {@code - * unsupported_business}, or {@code unsupported_country}. + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. */ @SerializedName("code") String code; @@ -1196,7 +1203,8 @@ public static class StatusDetail extends StripeObject { * *

One of {@code determining_status}, {@code requirements_past_due}, {@code * requirements_pending_verification}, {@code restricted_other}, {@code - * unsupported_business}, or {@code unsupported_country}. + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. */ @SerializedName("code") String code; @@ -1253,7 +1261,8 @@ public static class StatusDetail extends StripeObject { * *

One of {@code determining_status}, {@code requirements_past_due}, {@code * requirements_pending_verification}, {@code restricted_other}, {@code - * unsupported_business}, or {@code unsupported_country}. + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. */ @SerializedName("code") String code; @@ -1310,7 +1319,8 @@ public static class StatusDetail extends StripeObject { * *

One of {@code determining_status}, {@code requirements_past_due}, {@code * requirements_pending_verification}, {@code restricted_other}, {@code - * unsupported_business}, or {@code unsupported_country}. + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. */ @SerializedName("code") String code; @@ -1366,7 +1376,8 @@ public static class StatusDetail extends StripeObject { * *

One of {@code determining_status}, {@code requirements_past_due}, {@code * requirements_pending_verification}, {@code restricted_other}, {@code - * unsupported_business}, or {@code unsupported_country}. + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. */ @SerializedName("code") String code; @@ -1423,7 +1434,8 @@ public static class StatusDetail extends StripeObject { * *

One of {@code determining_status}, {@code requirements_past_due}, {@code * requirements_pending_verification}, {@code restricted_other}, {@code - * unsupported_business}, or {@code unsupported_country}. + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. */ @SerializedName("code") String code; @@ -1479,7 +1491,8 @@ public static class StatusDetail extends StripeObject { * *

One of {@code determining_status}, {@code requirements_past_due}, {@code * requirements_pending_verification}, {@code restricted_other}, {@code - * unsupported_business}, or {@code unsupported_country}. + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. */ @SerializedName("code") String code; @@ -1536,7 +1549,8 @@ public static class StatusDetail extends StripeObject { * *

One of {@code determining_status}, {@code requirements_past_due}, {@code * requirements_pending_verification}, {@code restricted_other}, {@code - * unsupported_business}, or {@code unsupported_country}. + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. */ @SerializedName("code") String code; @@ -1593,7 +1607,8 @@ public static class StatusDetail extends StripeObject { * *

One of {@code determining_status}, {@code requirements_past_due}, {@code * requirements_pending_verification}, {@code restricted_other}, {@code - * unsupported_business}, or {@code unsupported_country}. + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. */ @SerializedName("code") String code; @@ -1649,7 +1664,8 @@ public static class StatusDetail extends StripeObject { * *

One of {@code determining_status}, {@code requirements_past_due}, {@code * requirements_pending_verification}, {@code restricted_other}, {@code - * unsupported_business}, or {@code unsupported_country}. + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. */ @SerializedName("code") String code; @@ -1705,7 +1721,8 @@ public static class StatusDetail extends StripeObject { * *

One of {@code determining_status}, {@code requirements_past_due}, {@code * requirements_pending_verification}, {@code restricted_other}, {@code - * unsupported_business}, or {@code unsupported_country}. + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. */ @SerializedName("code") String code; @@ -1762,7 +1779,8 @@ public static class StatusDetail extends StripeObject { * *

One of {@code determining_status}, {@code requirements_past_due}, {@code * requirements_pending_verification}, {@code restricted_other}, {@code - * unsupported_business}, or {@code unsupported_country}. + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. */ @SerializedName("code") String code; @@ -1819,7 +1837,8 @@ public static class StatusDetail extends StripeObject { * *

One of {@code determining_status}, {@code requirements_past_due}, {@code * requirements_pending_verification}, {@code restricted_other}, {@code - * unsupported_business}, or {@code unsupported_country}. + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. */ @SerializedName("code") String code; @@ -1876,7 +1895,8 @@ public static class StatusDetail extends StripeObject { * *

One of {@code determining_status}, {@code requirements_past_due}, {@code * requirements_pending_verification}, {@code restricted_other}, {@code - * unsupported_business}, or {@code unsupported_country}. + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. */ @SerializedName("code") String code; @@ -1932,7 +1952,8 @@ public static class StatusDetail extends StripeObject { * *

One of {@code determining_status}, {@code requirements_past_due}, {@code * requirements_pending_verification}, {@code restricted_other}, {@code - * unsupported_business}, or {@code unsupported_country}. + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. */ @SerializedName("code") String code; @@ -1989,7 +2010,8 @@ public static class StatusDetail extends StripeObject { * *

One of {@code determining_status}, {@code requirements_past_due}, {@code * requirements_pending_verification}, {@code restricted_other}, {@code - * unsupported_business}, or {@code unsupported_country}. + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. */ @SerializedName("code") String code; @@ -2046,7 +2068,8 @@ public static class StatusDetail extends StripeObject { * *

One of {@code determining_status}, {@code requirements_past_due}, {@code * requirements_pending_verification}, {@code restricted_other}, {@code - * unsupported_business}, or {@code unsupported_country}. + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. */ @SerializedName("code") String code; @@ -2103,7 +2126,8 @@ public static class StatusDetail extends StripeObject { * *

One of {@code determining_status}, {@code requirements_past_due}, {@code * requirements_pending_verification}, {@code restricted_other}, {@code - * unsupported_business}, or {@code unsupported_country}. + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. */ @SerializedName("code") String code; @@ -2160,7 +2184,8 @@ public static class StatusDetail extends StripeObject { * *

One of {@code determining_status}, {@code requirements_past_due}, {@code * requirements_pending_verification}, {@code restricted_other}, {@code - * unsupported_business}, or {@code unsupported_country}. + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. */ @SerializedName("code") String code; @@ -2217,7 +2242,8 @@ public static class StatusDetail extends StripeObject { * *

One of {@code determining_status}, {@code requirements_past_due}, {@code * requirements_pending_verification}, {@code restricted_other}, {@code - * unsupported_business}, or {@code unsupported_country}. + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. */ @SerializedName("code") String code; @@ -2273,7 +2299,8 @@ public static class StatusDetail extends StripeObject { * *

One of {@code determining_status}, {@code requirements_past_due}, {@code * requirements_pending_verification}, {@code restricted_other}, {@code - * unsupported_business}, or {@code unsupported_country}. + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. */ @SerializedName("code") String code; @@ -2330,7 +2357,8 @@ public static class StatusDetail extends StripeObject { * *

One of {@code determining_status}, {@code requirements_past_due}, {@code * requirements_pending_verification}, {@code restricted_other}, {@code - * unsupported_business}, or {@code unsupported_country}. + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. */ @SerializedName("code") String code; @@ -2387,7 +2415,8 @@ public static class StatusDetail extends StripeObject { * *

One of {@code determining_status}, {@code requirements_past_due}, {@code * requirements_pending_verification}, {@code restricted_other}, {@code - * unsupported_business}, or {@code unsupported_country}. + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. */ @SerializedName("code") String code; @@ -2444,7 +2473,8 @@ public static class StatusDetail extends StripeObject { * *

One of {@code determining_status}, {@code requirements_past_due}, {@code * requirements_pending_verification}, {@code restricted_other}, {@code - * unsupported_business}, or {@code unsupported_country}. + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. */ @SerializedName("code") String code; @@ -2501,7 +2531,8 @@ public static class StatusDetail extends StripeObject { * *

One of {@code determining_status}, {@code requirements_past_due}, {@code * requirements_pending_verification}, {@code restricted_other}, {@code - * unsupported_business}, or {@code unsupported_country}. + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. */ @SerializedName("code") String code; @@ -2557,7 +2588,8 @@ public static class StatusDetail extends StripeObject { * *

One of {@code determining_status}, {@code requirements_past_due}, {@code * requirements_pending_verification}, {@code restricted_other}, {@code - * unsupported_business}, or {@code unsupported_country}. + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. */ @SerializedName("code") String code; @@ -2613,7 +2645,8 @@ public static class StatusDetail extends StripeObject { * *

One of {@code determining_status}, {@code requirements_past_due}, {@code * requirements_pending_verification}, {@code restricted_other}, {@code - * unsupported_business}, or {@code unsupported_country}. + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. */ @SerializedName("code") String code; @@ -2670,7 +2703,8 @@ public static class StatusDetail extends StripeObject { * *

One of {@code determining_status}, {@code requirements_past_due}, {@code * requirements_pending_verification}, {@code restricted_other}, {@code - * unsupported_business}, or {@code unsupported_country}. + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. */ @SerializedName("code") String code; @@ -2727,7 +2761,8 @@ public static class StatusDetail extends StripeObject { * *

One of {@code determining_status}, {@code requirements_past_due}, {@code * requirements_pending_verification}, {@code restricted_other}, {@code - * unsupported_business}, or {@code unsupported_country}. + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. */ @SerializedName("code") String code; @@ -2784,7 +2819,8 @@ public static class StatusDetail extends StripeObject { * *

One of {@code determining_status}, {@code requirements_past_due}, {@code * requirements_pending_verification}, {@code restricted_other}, {@code - * unsupported_business}, or {@code unsupported_country}. + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. */ @SerializedName("code") String code; @@ -2841,7 +2877,8 @@ public static class StatusDetail extends StripeObject { * *

One of {@code determining_status}, {@code requirements_past_due}, {@code * requirements_pending_verification}, {@code restricted_other}, {@code - * unsupported_business}, or {@code unsupported_country}. + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. */ @SerializedName("code") String code; @@ -2898,7 +2935,8 @@ public static class StatusDetail extends StripeObject { * *

One of {@code determining_status}, {@code requirements_past_due}, {@code * requirements_pending_verification}, {@code restricted_other}, {@code - * unsupported_business}, or {@code unsupported_country}. + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. */ @SerializedName("code") String code; @@ -2955,7 +2993,8 @@ public static class StatusDetail extends StripeObject { * *

One of {@code determining_status}, {@code requirements_past_due}, {@code * requirements_pending_verification}, {@code restricted_other}, {@code - * unsupported_business}, or {@code unsupported_country}. + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. */ @SerializedName("code") String code; @@ -3012,7 +3051,8 @@ public static class StatusDetail extends StripeObject { * *

One of {@code determining_status}, {@code requirements_past_due}, {@code * requirements_pending_verification}, {@code restricted_other}, {@code - * unsupported_business}, or {@code unsupported_country}. + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. */ @SerializedName("code") String code; @@ -3069,7 +3109,8 @@ public static class StatusDetail extends StripeObject { * *

One of {@code determining_status}, {@code requirements_past_due}, {@code * requirements_pending_verification}, {@code restricted_other}, {@code - * unsupported_business}, or {@code unsupported_country}. + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. */ @SerializedName("code") String code; @@ -3139,7 +3180,8 @@ public static class StatusDetail extends StripeObject { * *

One of {@code determining_status}, {@code requirements_past_due}, {@code * requirements_pending_verification}, {@code restricted_other}, {@code - * unsupported_business}, or {@code unsupported_country}. + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. */ @SerializedName("code") String code; @@ -3197,7 +3239,8 @@ public static class StatusDetail extends StripeObject { * *

One of {@code determining_status}, {@code requirements_past_due}, {@code * requirements_pending_verification}, {@code restricted_other}, {@code - * unsupported_business}, or {@code unsupported_country}. + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. */ @SerializedName("code") String code; @@ -3254,7 +3297,8 @@ public static class StatusDetail extends StripeObject { * *

One of {@code determining_status}, {@code requirements_past_due}, {@code * requirements_pending_verification}, {@code restricted_other}, {@code - * unsupported_business}, or {@code unsupported_country}. + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. */ @SerializedName("code") String code; @@ -3311,7 +3355,8 @@ public static class StatusDetail extends StripeObject { * *

One of {@code determining_status}, {@code requirements_past_due}, {@code * requirements_pending_verification}, {@code restricted_other}, {@code - * unsupported_business}, or {@code unsupported_country}. + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. */ @SerializedName("code") String code; @@ -3367,7 +3412,8 @@ public static class StatusDetail extends StripeObject { * *

One of {@code determining_status}, {@code requirements_past_due}, {@code * requirements_pending_verification}, {@code restricted_other}, {@code - * unsupported_business}, or {@code unsupported_country}. + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. */ @SerializedName("code") String code; @@ -3543,7 +3589,7 @@ public static class Address extends StripeObject { * {@code tn}, {@code to}, {@code tr}, {@code tt}, {@code tv}, {@code tw}, {@code tz}, * {@code ua}, {@code ug}, {@code um}, {@code us}, {@code uy}, {@code uz}, {@code va}, * {@code vc}, {@code ve}, {@code vg}, {@code vi}, {@code vn}, {@code vu}, {@code wf}, - * {@code ws}, {@code ye}, {@code yt}, {@code za}, {@code zm}, or {@code zw}. + * {@code ws}, {@code xx}, {@code ye}, {@code yt}, {@code za}, {@code zm}, or {@code zw}. */ @SerializedName("country") String country; @@ -3672,7 +3718,8 @@ public static class StatusDetail extends StripeObject { * *

One of {@code determining_status}, {@code requirements_past_due}, {@code * requirements_pending_verification}, {@code restricted_other}, {@code - * unsupported_business}, or {@code unsupported_country}. + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. */ @SerializedName("code") String code; @@ -3730,7 +3777,8 @@ public static class StatusDetail extends StripeObject { * *

One of {@code determining_status}, {@code requirements_past_due}, {@code * requirements_pending_verification}, {@code restricted_other}, {@code - * unsupported_business}, or {@code unsupported_country}. + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. */ @SerializedName("code") String code; @@ -3787,7 +3835,8 @@ public static class StatusDetail extends StripeObject { * *

One of {@code determining_status}, {@code requirements_past_due}, {@code * requirements_pending_verification}, {@code restricted_other}, {@code - * unsupported_business}, or {@code unsupported_country}. + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. */ @SerializedName("code") String code; @@ -3863,7 +3912,8 @@ public static class StatusDetail extends StripeObject { * *

One of {@code determining_status}, {@code requirements_past_due}, {@code * requirements_pending_verification}, {@code restricted_other}, {@code - * unsupported_business}, or {@code unsupported_country}. + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. */ @SerializedName("code") String code; @@ -3923,7 +3973,8 @@ public static class StatusDetail extends StripeObject { * *

One of {@code determining_status}, {@code requirements_past_due}, {@code * requirements_pending_verification}, {@code restricted_other}, {@code - * unsupported_business}, or {@code unsupported_country}. + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. */ @SerializedName("code") String code; @@ -4115,8 +4166,8 @@ public static class Identity extends StripeObject { * {@code tg}, {@code th}, {@code tj}, {@code tk}, {@code tl}, {@code tm}, {@code tn}, {@code * to}, {@code tr}, {@code tt}, {@code tv}, {@code tw}, {@code tz}, {@code ua}, {@code ug}, * {@code um}, {@code us}, {@code uy}, {@code uz}, {@code va}, {@code vc}, {@code ve}, {@code - * vg}, {@code vi}, {@code vn}, {@code vu}, {@code wf}, {@code ws}, {@code ye}, {@code yt}, - * {@code za}, {@code zm}, or {@code zw}. + * vg}, {@code vi}, {@code vn}, {@code vu}, {@code wf}, {@code ws}, {@code xx}, {@code ye}, + * {@code yt}, {@code za}, {@code zm}, or {@code zw}. */ @SerializedName("country") String country; @@ -4440,7 +4491,7 @@ public static class Address extends StripeObject { * {@code to}, {@code tr}, {@code tt}, {@code tv}, {@code tw}, {@code tz}, {@code ua}, * {@code ug}, {@code um}, {@code us}, {@code uy}, {@code uz}, {@code va}, {@code vc}, * {@code ve}, {@code vg}, {@code vi}, {@code vn}, {@code vu}, {@code wf}, {@code ws}, - * {@code ye}, {@code yt}, {@code za}, {@code zm}, or {@code zw}. + * {@code xx}, {@code ye}, {@code yt}, {@code za}, {@code zm}, or {@code zw}. */ @SerializedName("country") String country; @@ -4532,6 +4583,10 @@ public static class Documents extends StripeObject { @SerializedName("primary_verification") PrimaryVerification primaryVerification; + /** One or more documents that demonstrate proof of address. */ + @SerializedName("proof_of_address") + ProofOfAddress proofOfAddress; + /** * One or more documents showing the company’s proof of registration with the national * business registry. @@ -4746,6 +4801,31 @@ public static class FrontBack extends StripeObject { } } + /** + * For more details about ProofOfAddress, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class ProofOfAddress extends StripeObject { + /** + * One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * The format of the document. Currently supports {@code files} only. + * + *

Equal to {@code files}. + */ + @SerializedName("type") + String type; + } + /** * For more details about ProofOfRegistration, please refer to the API Reference. @@ -4909,7 +4989,7 @@ public static class Kana extends StripeObject { * {@code tn}, {@code to}, {@code tr}, {@code tt}, {@code tv}, {@code tw}, {@code tz}, * {@code ua}, {@code ug}, {@code um}, {@code us}, {@code uy}, {@code uz}, {@code va}, * {@code vc}, {@code ve}, {@code vg}, {@code vi}, {@code vn}, {@code vu}, {@code wf}, - * {@code ws}, {@code ye}, {@code yt}, {@code za}, {@code zm}, or {@code zw}. + * {@code ws}, {@code xx}, {@code ye}, {@code yt}, {@code za}, {@code zm}, or {@code zw}. */ @SerializedName("country") String country; @@ -4986,7 +5066,7 @@ public static class Kanji extends StripeObject { * {@code tn}, {@code to}, {@code tr}, {@code tt}, {@code tv}, {@code tw}, {@code tz}, * {@code ua}, {@code ug}, {@code um}, {@code us}, {@code uy}, {@code uz}, {@code va}, * {@code vc}, {@code ve}, {@code vg}, {@code vi}, {@code vn}, {@code vu}, {@code wf}, - * {@code ws}, {@code ye}, {@code yt}, {@code za}, {@code zm}, or {@code zw}. + * {@code ws}, {@code xx}, {@code ye}, {@code yt}, {@code za}, {@code zm}, or {@code zw}. */ @SerializedName("country") String country; @@ -5229,7 +5309,7 @@ public static class AdditionalAddress extends StripeObject { * {@code to}, {@code tr}, {@code tt}, {@code tv}, {@code tw}, {@code tz}, {@code ua}, * {@code ug}, {@code um}, {@code us}, {@code uy}, {@code uz}, {@code va}, {@code vc}, * {@code ve}, {@code vg}, {@code vi}, {@code vn}, {@code vu}, {@code wf}, {@code ws}, - * {@code ye}, {@code yt}, {@code za}, {@code zm}, or {@code zw}. + * {@code xx}, {@code ye}, {@code yt}, {@code za}, {@code zm}, or {@code zw}. */ @SerializedName("country") String country; @@ -5386,7 +5466,7 @@ public static class Address extends StripeObject { * {@code to}, {@code tr}, {@code tt}, {@code tv}, {@code tw}, {@code tz}, {@code ua}, * {@code ug}, {@code um}, {@code us}, {@code uy}, {@code uz}, {@code va}, {@code vc}, * {@code ve}, {@code vg}, {@code vi}, {@code vn}, {@code vu}, {@code wf}, {@code ws}, - * {@code ye}, {@code yt}, {@code za}, {@code zm}, or {@code zw}. + * {@code xx}, {@code ye}, {@code yt}, {@code za}, {@code zm}, or {@code zw}. */ @SerializedName("country") String country; @@ -5797,7 +5877,7 @@ public static class Kana extends StripeObject { * {@code tn}, {@code to}, {@code tr}, {@code tt}, {@code tv}, {@code tw}, {@code tz}, * {@code ua}, {@code ug}, {@code um}, {@code us}, {@code uy}, {@code uz}, {@code va}, * {@code vc}, {@code ve}, {@code vg}, {@code vi}, {@code vn}, {@code vu}, {@code wf}, - * {@code ws}, {@code ye}, {@code yt}, {@code za}, {@code zm}, or {@code zw}. + * {@code ws}, {@code xx}, {@code ye}, {@code yt}, {@code za}, {@code zm}, or {@code zw}. */ @SerializedName("country") String country; @@ -5874,7 +5954,7 @@ public static class Kanji extends StripeObject { * {@code tn}, {@code to}, {@code tr}, {@code tt}, {@code tv}, {@code tw}, {@code tz}, * {@code ua}, {@code ug}, {@code um}, {@code us}, {@code uy}, {@code uz}, {@code va}, * {@code vc}, {@code ve}, {@code vg}, {@code vi}, {@code vn}, {@code vu}, {@code wf}, - * {@code ws}, {@code ye}, {@code yt}, {@code za}, {@code zm}, or {@code zw}. + * {@code ws}, {@code xx}, {@code ye}, {@code yt}, {@code za}, {@code zm}, or {@code zw}. */ @SerializedName("country") String country; diff --git a/src/main/java/com/stripe/model/v2/core/Person.java b/src/main/java/com/stripe/model/v2/core/Person.java index 1ec2296d240..96962d46630 100644 --- a/src/main/java/com/stripe/model/v2/core/Person.java +++ b/src/main/java/com/stripe/model/v2/core/Person.java @@ -189,8 +189,8 @@ public static class AdditionalAddress extends StripeObject { * {@code tg}, {@code th}, {@code tj}, {@code tk}, {@code tl}, {@code tm}, {@code tn}, {@code * to}, {@code tr}, {@code tt}, {@code tv}, {@code tw}, {@code tz}, {@code ua}, {@code ug}, * {@code um}, {@code us}, {@code uy}, {@code uz}, {@code va}, {@code vc}, {@code ve}, {@code - * vg}, {@code vi}, {@code vn}, {@code vu}, {@code wf}, {@code ws}, {@code ye}, {@code yt}, - * {@code za}, {@code zm}, or {@code zw}. + * vg}, {@code vi}, {@code vn}, {@code vu}, {@code wf}, {@code ws}, {@code xx}, {@code ye}, + * {@code yt}, {@code za}, {@code zm}, or {@code zw}. */ @SerializedName("country") String country; @@ -342,8 +342,8 @@ public static class Address extends StripeObject { * {@code tg}, {@code th}, {@code tj}, {@code tk}, {@code tl}, {@code tm}, {@code tn}, {@code * to}, {@code tr}, {@code tt}, {@code tv}, {@code tw}, {@code tz}, {@code ua}, {@code ug}, * {@code um}, {@code us}, {@code uy}, {@code uz}, {@code va}, {@code vc}, {@code ve}, {@code - * vg}, {@code vi}, {@code vn}, {@code vu}, {@code wf}, {@code ws}, {@code ye}, {@code yt}, - * {@code za}, {@code zm}, or {@code zw}. + * vg}, {@code vi}, {@code vn}, {@code vu}, {@code wf}, {@code ws}, {@code xx}, {@code ye}, + * {@code yt}, {@code za}, {@code zm}, or {@code zw}. */ @SerializedName("country") String country; @@ -742,8 +742,8 @@ public static class Kana extends StripeObject { * tf}, {@code tg}, {@code th}, {@code tj}, {@code tk}, {@code tl}, {@code tm}, {@code tn}, * {@code to}, {@code tr}, {@code tt}, {@code tv}, {@code tw}, {@code tz}, {@code ua}, {@code * ug}, {@code um}, {@code us}, {@code uy}, {@code uz}, {@code va}, {@code vc}, {@code ve}, - * {@code vg}, {@code vi}, {@code vn}, {@code vu}, {@code wf}, {@code ws}, {@code ye}, {@code - * yt}, {@code za}, {@code zm}, or {@code zw}. + * {@code vg}, {@code vi}, {@code vn}, {@code vu}, {@code wf}, {@code ws}, {@code xx}, {@code + * ye}, {@code yt}, {@code za}, {@code zm}, or {@code zw}. */ @SerializedName("country") String country; @@ -817,8 +817,8 @@ public static class Kanji extends StripeObject { * tf}, {@code tg}, {@code th}, {@code tj}, {@code tk}, {@code tl}, {@code tm}, {@code tn}, * {@code to}, {@code tr}, {@code tt}, {@code tv}, {@code tw}, {@code tz}, {@code ua}, {@code * ug}, {@code um}, {@code us}, {@code uy}, {@code uz}, {@code va}, {@code vc}, {@code ve}, - * {@code vg}, {@code vi}, {@code vn}, {@code vu}, {@code wf}, {@code ws}, {@code ye}, {@code - * yt}, {@code za}, {@code zm}, or {@code zw}. + * {@code vg}, {@code vi}, {@code vn}, {@code vu}, {@code wf}, {@code ws}, {@code xx}, {@code + * ye}, {@code yt}, {@code za}, {@code zm}, or {@code zw}. */ @SerializedName("country") String country; diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/FinancialAccount.java b/src/main/java/com/stripe/model/v2/moneymanagement/FinancialAccount.java index b8018d0e472..4a69c380d93 100644 --- a/src/main/java/com/stripe/model/v2/moneymanagement/FinancialAccount.java +++ b/src/main/java/com/stripe/model/v2/moneymanagement/FinancialAccount.java @@ -58,8 +58,8 @@ public class FinancialAccount extends StripeObject implements HasId { * {@code td}, {@code tf}, {@code tg}, {@code th}, {@code tj}, {@code tk}, {@code tl}, {@code tm}, * {@code tn}, {@code to}, {@code tr}, {@code tt}, {@code tv}, {@code tw}, {@code tz}, {@code ua}, * {@code ug}, {@code um}, {@code us}, {@code uy}, {@code uz}, {@code va}, {@code vc}, {@code ve}, - * {@code vg}, {@code vi}, {@code vn}, {@code vu}, {@code wf}, {@code ws}, {@code ye}, {@code yt}, - * {@code za}, {@code zm}, or {@code zw}. + * {@code vg}, {@code vi}, {@code vn}, {@code vu}, {@code wf}, {@code ws}, {@code xx}, {@code ye}, + * {@code yt}, {@code za}, {@code zm}, or {@code zw}. */ @SerializedName("country") String country; @@ -68,9 +68,6 @@ public class FinancialAccount extends StripeObject implements HasId { @SerializedName("created") Instant created; - @SerializedName("description") - String description; - /** Unique identifier for the object. */ @Getter(onMethod_ = {@Override}) @SerializedName("id") @@ -83,6 +80,10 @@ public class FinancialAccount extends StripeObject implements HasId { @SerializedName("livemode") Boolean livemode; + /** Metadata associated with the FinancialAccount. */ + @SerializedName("metadata") + Map metadata; + /** * String representing the object's type. Objects of the same type share the same value of the * object field. @@ -103,7 +104,7 @@ public class FinancialAccount extends StripeObject implements HasId { * Closed Enum. An enum representing the status of the FinancialAccount. This indicates whether or * not the FinancialAccount can be used for any money movement flows. * - *

One of {@code closed}, or {@code open}. + *

One of {@code closed}, {@code open}, or {@code pending}. */ @SerializedName("status") String status; @@ -137,7 +138,7 @@ public static class Balance extends StripeObject { @SerializedName("available") Map available; - /** Balance of inbound funds that will later transition to the {@code cash} balance. */ + /** Balance of inbound funds that will later transition to the {@code available} balance. */ @SerializedName("inbound_pending") Map inboundPending; diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/OutboundPayment.java b/src/main/java/com/stripe/model/v2/moneymanagement/OutboundPayment.java index 45e58d99c26..7de9c1f2081 100644 --- a/src/main/java/com/stripe/model/v2/moneymanagement/OutboundPayment.java +++ b/src/main/java/com/stripe/model/v2/moneymanagement/OutboundPayment.java @@ -100,7 +100,8 @@ public class OutboundPayment extends StripeObject implements HasId { /** * The description that appears on the receiving end for an OutboundPayment (for example, bank - * statement for external bank transfer). + * statement for external bank transfer). It will default to {@code STRIPE} if not set on the + * account settings. */ @SerializedName("statement_descriptor") String statementDescriptor; diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/OutboundTransfer.java b/src/main/java/com/stripe/model/v2/moneymanagement/OutboundTransfer.java index 85c6e449725..8749352020d 100644 --- a/src/main/java/com/stripe/model/v2/moneymanagement/OutboundTransfer.java +++ b/src/main/java/com/stripe/model/v2/moneymanagement/OutboundTransfer.java @@ -89,7 +89,8 @@ public class OutboundTransfer extends StripeObject implements HasId { /** * The description that appears on the receiving end for an OutboundTransfer (for example, bank - * statement for external bank transfer). + * statement for external bank transfer). It will default to {@code STRIPE} if not set on the + * account settings. */ @SerializedName("statement_descriptor") String statementDescriptor; diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedCredit.java b/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedCredit.java index f91b45bb37c..c627328e30b 100644 --- a/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedCredit.java +++ b/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedCredit.java @@ -110,14 +110,26 @@ public class ReceivedCredit extends StripeObject implements HasId { @Setter @EqualsAndHashCode(callSuper = false) public static class BalanceTransfer extends StripeObject { - /** The ID of the Stripe Money Movement that originated the ReceivedCredit. */ + /** The ID of the account that owns the source object originated the ReceivedCredit. */ + @SerializedName("from_account") + String fromAccount; + + /** The ID of the outbound payment object that originated the ReceivedCredit. */ + @SerializedName("outbound_payment") + String outboundPayment; + + /** The ID of the outbound transfer object that originated the ReceivedCredit. */ + @SerializedName("outbound_transfer") + String outboundTransfer; + + /** The ID of the payout object that originated the ReceivedCredit. */ @SerializedName("payout_v1") String payoutV1; /** * Open Enum. The type of Stripe Money Movement that originated the ReceivedCredit. * - *

Equal to {@code payout_v1}. + *

One of {@code outbound_payment}, {@code outbound_transfer}, or {@code payout_v1}. */ @SerializedName("type") String type; diff --git a/src/main/java/com/stripe/model/v2/payments/OffSessionPayment.java b/src/main/java/com/stripe/model/v2/payments/OffSessionPayment.java index bd8e7c7601b..c420e9a5b52 100644 --- a/src/main/java/com/stripe/model/v2/payments/OffSessionPayment.java +++ b/src/main/java/com/stripe/model/v2/payments/OffSessionPayment.java @@ -19,10 +19,6 @@ public class OffSessionPayment extends StripeObject implements HasId { @SerializedName("amount_requested") Amount amountRequested; - /** Number of authorization attempts. */ - @SerializedName("attempts") - Integer attempts; - /** * The frequency of the underlying payment that this OSP represents. * diff --git a/src/main/java/com/stripe/param/AccountCreateParams.java b/src/main/java/com/stripe/param/AccountCreateParams.java index e3a63946220..24edd33dabe 100644 --- a/src/main/java/com/stripe/param/AccountCreateParams.java +++ b/src/main/java/com/stripe/param/AccountCreateParams.java @@ -1366,6 +1366,10 @@ public static class Capabilities { @SerializedName("cashapp_payments") CashappPayments cashappPayments; + /** The crypto_payments capability. */ + @SerializedName("crypto_payments") + CryptoPayments cryptoPayments; + /** The eps_payments capability. */ @SerializedName("eps_payments") EpsPayments epsPayments; @@ -1613,6 +1617,7 @@ private Capabilities( CardPayments cardPayments, CartesBancairesPayments cartesBancairesPayments, CashappPayments cashappPayments, + CryptoPayments cryptoPayments, EpsPayments epsPayments, Map extraParams, FpxPayments fpxPayments, @@ -1686,6 +1691,7 @@ private Capabilities( this.cardPayments = cardPayments; this.cartesBancairesPayments = cartesBancairesPayments; this.cashappPayments = cashappPayments; + this.cryptoPayments = cryptoPayments; this.epsPayments = epsPayments; this.extraParams = extraParams; this.fpxPayments = fpxPayments; @@ -1783,6 +1789,8 @@ public static class Builder { private CashappPayments cashappPayments; + private CryptoPayments cryptoPayments; + private EpsPayments epsPayments; private Map extraParams; @@ -1915,6 +1923,7 @@ public AccountCreateParams.Capabilities build() { this.cardPayments, this.cartesBancairesPayments, this.cashappPayments, + this.cryptoPayments, this.epsPayments, this.extraParams, this.fpxPayments, @@ -2088,6 +2097,13 @@ public Builder setCashappPayments( return this; } + /** The crypto_payments capability. */ + public Builder setCryptoPayments( + AccountCreateParams.Capabilities.CryptoPayments cryptoPayments) { + this.cryptoPayments = cryptoPayments; + return this; + } + /** The eps_payments capability. */ public Builder setEpsPayments(AccountCreateParams.Capabilities.EpsPayments epsPayments) { this.epsPayments = epsPayments; @@ -3849,6 +3865,86 @@ public Builder setRequested(Boolean requested) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CryptoPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Passing true requests the capability for the account, if it is not already requested. A + * requested capability may not immediately become active. Any requirements to activate the + * capability are returned in the {@code requirements} arrays. + */ + @SerializedName("requested") + Boolean requested; + + private CryptoPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Capabilities.CryptoPayments build() { + return new AccountCreateParams.Capabilities.CryptoPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Capabilities.CryptoPayments#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Capabilities.CryptoPayments#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Passing true requests the capability for the account, if it is not already requested. A + * requested capability may not immediately become active. Any requirements to activate the + * capability are returned in the {@code requirements} arrays. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class EpsPayments { @@ -8346,6 +8442,7 @@ public static class Company { @SerializedName("phone") String phone; + /** When the business was incorporated or registered. */ @SerializedName("registration_date") Object registrationDate; @@ -8678,12 +8775,14 @@ public Builder setPhone(String phone) { return this; } + /** When the business was incorporated or registered. */ public Builder setRegistrationDate( AccountCreateParams.Company.RegistrationDate registrationDate) { this.registrationDate = registrationDate; return this; } + /** When the business was incorporated or registered. */ public Builder setRegistrationDate(EmptyParam registrationDate) { this.registrationDate = registrationDate; return this; @@ -10542,6 +10641,10 @@ public static class Documents { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** One or more documents that demonstrate proof of address. */ + @SerializedName("proof_of_address") + ProofOfAddress proofOfAddress; + /** * One or more documents showing the company’s proof of registration with the national business * registry. @@ -10561,6 +10664,7 @@ private Documents( CompanyRegistrationVerification companyRegistrationVerification, CompanyTaxIdVerification companyTaxIdVerification, Map extraParams, + ProofOfAddress proofOfAddress, ProofOfRegistration proofOfRegistration, ProofOfUltimateBeneficialOwnership proofOfUltimateBeneficialOwnership) { this.bankAccountOwnershipVerification = bankAccountOwnershipVerification; @@ -10570,6 +10674,7 @@ private Documents( this.companyRegistrationVerification = companyRegistrationVerification; this.companyTaxIdVerification = companyTaxIdVerification; this.extraParams = extraParams; + this.proofOfAddress = proofOfAddress; this.proofOfRegistration = proofOfRegistration; this.proofOfUltimateBeneficialOwnership = proofOfUltimateBeneficialOwnership; } @@ -10593,6 +10698,8 @@ public static class Builder { private Map extraParams; + private ProofOfAddress proofOfAddress; + private ProofOfRegistration proofOfRegistration; private ProofOfUltimateBeneficialOwnership proofOfUltimateBeneficialOwnership; @@ -10607,6 +10714,7 @@ public AccountCreateParams.Documents build() { this.companyRegistrationVerification, this.companyTaxIdVerification, this.extraParams, + this.proofOfAddress, this.proofOfRegistration, this.proofOfUltimateBeneficialOwnership); } @@ -10694,6 +10802,13 @@ public Builder putAllExtraParam(Map map) { return this; } + /** One or more documents that demonstrate proof of address. */ + public Builder setProofOfAddress( + AccountCreateParams.Documents.ProofOfAddress proofOfAddress) { + this.proofOfAddress = proofOfAddress; + return this; + } + /** * One or more documents showing the company’s proof of registration with the national * business registry. @@ -11303,6 +11418,101 @@ public Builder addAllFile(List elements) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ProofOfAddress { + /** + * 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; + + private ProofOfAddress(Map extraParams, List files) { + this.extraParams = extraParams; + this.files = files; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Documents.ProofOfAddress build() { + return new AccountCreateParams.Documents.ProofOfAddress(this.extraParams, this.files); + } + + /** + * 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.ProofOfAddress#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.ProofOfAddress#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.ProofOfAddress#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.ProofOfAddress#files} for the field documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class ProofOfRegistration { @@ -15171,6 +15381,15 @@ public static class Schedule { @SerializedName("monthly_anchor") Long monthlyAnchor; + /** + * The days of the month when available funds are paid out, specified as an array of numbers + * between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are + * instead sent on the last day of a shorter month. Required and applicable only if {@code + * interval} is {@code monthly} and {@code monthly_anchor} is not set. + */ + @SerializedName("monthly_payout_days") + List monthlyPayoutDays; + /** * The day of the week when available funds are paid out, specified as {@code monday}, * {@code tuesday}, etc. (required and applicable only if {@code interval} is {@code @@ -15179,17 +15398,29 @@ public static class Schedule { @SerializedName("weekly_anchor") WeeklyAnchor weeklyAnchor; + /** + * The days of the week when available funds are paid out, specified as an array, e.g., + * [{@code monday}, {@code tuesday}]. (required and applicable only if {@code interval} is + * {@code weekly} and {@code weekly_anchor} is not set.) + */ + @SerializedName("weekly_payout_days") + List weeklyPayoutDays; + private Schedule( Object delayDays, Map extraParams, Interval interval, Long monthlyAnchor, - WeeklyAnchor weeklyAnchor) { + List monthlyPayoutDays, + WeeklyAnchor weeklyAnchor, + List weeklyPayoutDays) { this.delayDays = delayDays; this.extraParams = extraParams; this.interval = interval; this.monthlyAnchor = monthlyAnchor; + this.monthlyPayoutDays = monthlyPayoutDays; this.weeklyAnchor = weeklyAnchor; + this.weeklyPayoutDays = weeklyPayoutDays; } public static Builder builder() { @@ -15205,8 +15436,13 @@ public static class Builder { private Long monthlyAnchor; + private List monthlyPayoutDays; + private WeeklyAnchor weeklyAnchor; + private List + weeklyPayoutDays; + /** Finalize and obtain parameter instance from this builder. */ public AccountCreateParams.Settings.Payouts.Schedule build() { return new AccountCreateParams.Settings.Payouts.Schedule( @@ -15214,7 +15450,9 @@ public AccountCreateParams.Settings.Payouts.Schedule build() { this.extraParams, this.interval, this.monthlyAnchor, - this.weeklyAnchor); + this.monthlyPayoutDays, + this.weeklyAnchor, + this.weeklyPayoutDays); } /** @@ -15293,6 +15531,34 @@ public Builder setMonthlyAnchor(Long monthlyAnchor) { return this; } + /** + * Add an element to `monthlyPayoutDays` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link AccountCreateParams.Settings.Payouts.Schedule#monthlyPayoutDays} for the + * field documentation. + */ + public Builder addMonthlyPayoutDay(Long element) { + if (this.monthlyPayoutDays == null) { + this.monthlyPayoutDays = new ArrayList<>(); + } + this.monthlyPayoutDays.add(element); + return this; + } + + /** + * Add all elements to `monthlyPayoutDays` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link AccountCreateParams.Settings.Payouts.Schedule#monthlyPayoutDays} for the + * field documentation. + */ + public Builder addAllMonthlyPayoutDay(List elements) { + if (this.monthlyPayoutDays == null) { + this.monthlyPayoutDays = new ArrayList<>(); + } + this.monthlyPayoutDays.addAll(elements); + return this; + } + /** * The day of the week when available funds are paid out, specified as {@code monday}, * {@code tuesday}, etc. (required and applicable only if {@code interval} is {@code @@ -15303,6 +15569,36 @@ public Builder setWeeklyAnchor( this.weeklyAnchor = weeklyAnchor; return this; } + + /** + * Add an element to `weeklyPayoutDays` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link AccountCreateParams.Settings.Payouts.Schedule#weeklyPayoutDays} for the + * field documentation. + */ + public Builder addWeeklyPayoutDay( + AccountCreateParams.Settings.Payouts.Schedule.WeeklyPayoutDay element) { + if (this.weeklyPayoutDays == null) { + this.weeklyPayoutDays = new ArrayList<>(); + } + this.weeklyPayoutDays.add(element); + return this; + } + + /** + * Add all elements to `weeklyPayoutDays` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link AccountCreateParams.Settings.Payouts.Schedule#weeklyPayoutDays} for the + * field documentation. + */ + public Builder addAllWeeklyPayoutDay( + List elements) { + if (this.weeklyPayoutDays == null) { + this.weeklyPayoutDays = new ArrayList<>(); + } + this.weeklyPayoutDays.addAll(elements); + return this; + } } public enum DelayDays implements ApiRequestParams.EnumParam { @@ -15367,6 +15663,36 @@ public enum WeeklyAnchor implements ApiRequestParams.EnumParam { this.value = value; } } + + public enum WeeklyPayoutDay implements ApiRequestParams.EnumParam { + @SerializedName("friday") + FRIDAY("friday"), + + @SerializedName("monday") + MONDAY("monday"), + + @SerializedName("saturday") + SATURDAY("saturday"), + + @SerializedName("sunday") + SUNDAY("sunday"), + + @SerializedName("thursday") + THURSDAY("thursday"), + + @SerializedName("tuesday") + TUESDAY("tuesday"), + + @SerializedName("wednesday") + WEDNESDAY("wednesday"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + WeeklyPayoutDay(String value) { + this.value = value; + } + } } } diff --git a/src/main/java/com/stripe/param/AccountSessionCreateParams.java b/src/main/java/com/stripe/param/AccountSessionCreateParams.java index 23506c41672..3baf36e3de1 100644 --- a/src/main/java/com/stripe/param/AccountSessionCreateParams.java +++ b/src/main/java/com/stripe/param/AccountSessionCreateParams.java @@ -138,51 +138,99 @@ public Builder putAllExtraParam(Map map) { @Getter @EqualsAndHashCode(callSuper = false) public static class Components { - /** Configuration for the account management embedded component. */ + /** + * Configuration for the account + * management embedded component. + */ @SerializedName("account_management") AccountManagement accountManagement; - /** Configuration for the account onboarding embedded component. */ + /** + * Configuration for the account + * onboarding embedded component. + */ @SerializedName("account_onboarding") AccountOnboarding accountOnboarding; - /** Configuration for the app install component. */ + /** + * Configuration for the app install + * embedded component. + */ @SerializedName("app_install") AppInstall appInstall; - /** Configuration for the app viewport component. */ + /** + * Configuration for the app + * viewport embedded component. + */ @SerializedName("app_viewport") AppViewport appViewport; - /** Configuration for the balances embedded component. */ + /** + * Configuration for the balances + * embedded component. + */ @SerializedName("balances") Balances balances; - /** Configuration for the capital financing embedded component. */ + /** + * Configuration for the Capital + * financing embedded component. + */ @SerializedName("capital_financing") CapitalFinancing capitalFinancing; - /** Configuration for the capital financing application embedded component. */ + /** + * Configuration for the Capital + * financing application embedded component. + */ @SerializedName("capital_financing_application") CapitalFinancingApplication capitalFinancingApplication; - /** Configuration for the capital financing promotion embedded component. */ + /** + * Configuration for the Capital + * financing promotion embedded component. + */ @SerializedName("capital_financing_promotion") CapitalFinancingPromotion capitalFinancingPromotion; - /** Configuration for the capital overview embedded component. */ + /** + * Configuration for the Capital + * overview embedded component. + */ @SerializedName("capital_overview") CapitalOverview capitalOverview; - /** Configuration for the disputes list embedded component. */ + /** + * Configuration for the disputes + * list embedded component. + */ @SerializedName("disputes_list") DisputesList disputesList; - /** Configuration for the documents embedded component. */ + /** + * Configuration for the documents + * embedded component. + */ @SerializedName("documents") Documents documents; - /** Configuration for the export tax transactions embedded component. */ + /** + * Configuration for the export + * tax transactions embedded component. + */ @SerializedName("export_tax_transactions") ExportTaxTransactions exportTaxTransactions; @@ -195,71 +243,139 @@ public static class Components { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Configuration for the financial account embedded component. */ + /** + * Configuration for the financial + * account embedded component. + */ @SerializedName("financial_account") FinancialAccount financialAccount; - /** Configuration for the financial account transactions embedded component. */ + /** + * Configuration for the financial + * account transactions embedded component. + */ @SerializedName("financial_account_transactions") FinancialAccountTransactions financialAccountTransactions; - /** Configuration for the issuing card embedded component. */ + /** + * Configuration for the issuing + * card embedded component. + */ @SerializedName("issuing_card") IssuingCard issuingCard; - /** Configuration for the issuing cards list embedded component. */ + /** + * Configuration for the issuing + * cards list embedded component. + */ @SerializedName("issuing_cards_list") IssuingCardsList issuingCardsList; - /** Configuration for the notification banner embedded component. */ + /** + * Configuration for the notification + * banner embedded component. + */ @SerializedName("notification_banner") NotificationBanner notificationBanner; - /** Configuration for the payment details embedded component. */ + /** + * Configuration for the payment + * details embedded component. + */ @SerializedName("payment_details") PaymentDetails paymentDetails; - /** Configuration for the payment disputes embedded component. */ + /** + * Configuration for the payment + * disputes embedded component. + */ @SerializedName("payment_disputes") PaymentDisputes paymentDisputes; - /** Configuration for the payment method settings embedded component. */ + /** + * Configuration for the payment + * method settings embedded component. + */ @SerializedName("payment_method_settings") PaymentMethodSettings paymentMethodSettings; - /** Configuration for the payments embedded component. */ + /** + * Configuration for the payments + * embedded component. + */ @SerializedName("payments") Payments payments; - /** Configuration for the payouts embedded component. */ + /** + * Configuration for the payouts embedded + * component. + */ @SerializedName("payouts") Payouts payouts; - /** Configuration for the payouts list embedded component. */ + /** + * Configuration for the payouts + * list embedded component. + */ @SerializedName("payouts_list") PayoutsList payoutsList; - /** Configuration for the product tax code selector embedded component. */ + /** + * Configuration for the product + * tax code selector embedded component. + */ @SerializedName("product_tax_code_selector") ProductTaxCodeSelector productTaxCodeSelector; - /** Configuration for the recipients component. */ + /** + * Configuration for the recipients + * embedded component. + */ @SerializedName("recipients") Recipients recipients; - /** Configuration for the reporting chart embedded component. */ + /** + * Configuration for the reporting + * chart embedded component. + */ @SerializedName("reporting_chart") ReportingChart reportingChart; - /** Configuration for the tax registrations embedded component. */ + /** + * Configuration for the tax + * registrations embedded component. + */ @SerializedName("tax_registrations") TaxRegistrations taxRegistrations; - /** Configuration for the tax settings embedded component. */ + /** + * Configuration for the tax + * settings embedded component. + */ @SerializedName("tax_settings") TaxSettings taxSettings; - /** Configuration for the tax threshold monitoring embedded component. */ + /** + * Configuration for the tax + * threshold monitoring embedded component. + */ @SerializedName("tax_threshold_monitoring") TaxThresholdMonitoring taxThresholdMonitoring; @@ -426,46 +542,74 @@ public AccountSessionCreateParams.Components build() { this.taxThresholdMonitoring); } - /** Configuration for the account management embedded component. */ + /** + * Configuration for the account + * management embedded component. + */ public Builder setAccountManagement( AccountSessionCreateParams.Components.AccountManagement accountManagement) { this.accountManagement = accountManagement; return this; } - /** Configuration for the account onboarding embedded component. */ + /** + * Configuration for the account + * onboarding embedded component. + */ public Builder setAccountOnboarding( AccountSessionCreateParams.Components.AccountOnboarding accountOnboarding) { this.accountOnboarding = accountOnboarding; return this; } - /** Configuration for the app install component. */ + /** + * Configuration for the app + * install embedded component. + */ public Builder setAppInstall(AccountSessionCreateParams.Components.AppInstall appInstall) { this.appInstall = appInstall; return this; } - /** Configuration for the app viewport component. */ + /** + * Configuration for the app + * viewport embedded component. + */ public Builder setAppViewport(AccountSessionCreateParams.Components.AppViewport appViewport) { this.appViewport = appViewport; return this; } - /** Configuration for the balances embedded component. */ + /** + * Configuration for the balances + * embedded component. + */ public Builder setBalances(AccountSessionCreateParams.Components.Balances balances) { this.balances = balances; return this; } - /** Configuration for the capital financing embedded component. */ + /** + * Configuration for the Capital + * financing embedded component. + */ public Builder setCapitalFinancing( AccountSessionCreateParams.Components.CapitalFinancing capitalFinancing) { this.capitalFinancing = capitalFinancing; return this; } - /** Configuration for the capital financing application embedded component. */ + /** + * Configuration for the Capital + * financing application embedded component. + */ public Builder setCapitalFinancingApplication( AccountSessionCreateParams.Components.CapitalFinancingApplication capitalFinancingApplication) { @@ -473,7 +617,11 @@ public Builder setCapitalFinancingApplication( return this; } - /** Configuration for the capital financing promotion embedded component. */ + /** + * Configuration for the Capital + * financing promotion embedded component. + */ public Builder setCapitalFinancingPromotion( AccountSessionCreateParams.Components.CapitalFinancingPromotion capitalFinancingPromotion) { @@ -481,27 +629,43 @@ public Builder setCapitalFinancingPromotion( return this; } - /** Configuration for the capital overview embedded component. */ + /** + * Configuration for the Capital + * overview embedded component. + */ public Builder setCapitalOverview( AccountSessionCreateParams.Components.CapitalOverview capitalOverview) { this.capitalOverview = capitalOverview; return this; } - /** Configuration for the disputes list embedded component. */ + /** + * Configuration for the disputes + * list embedded component. + */ public Builder setDisputesList( AccountSessionCreateParams.Components.DisputesList disputesList) { this.disputesList = disputesList; return this; } - /** Configuration for the documents embedded component. */ + /** + * Configuration for the documents + * embedded component. + */ public Builder setDocuments(AccountSessionCreateParams.Components.Documents documents) { this.documents = documents; return this; } - /** Configuration for the export tax transactions embedded component. */ + /** + * Configuration for the export + * tax transactions embedded component. + */ public Builder setExportTaxTransactions( AccountSessionCreateParams.Components.ExportTaxTransactions exportTaxTransactions) { this.exportTaxTransactions = exportTaxTransactions; @@ -534,14 +698,22 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Configuration for the financial account embedded component. */ + /** + * Configuration for the financial + * account embedded component. + */ public Builder setFinancialAccount( AccountSessionCreateParams.Components.FinancialAccount financialAccount) { this.financialAccount = financialAccount; return this; } - /** Configuration for the financial account transactions embedded component. */ + /** + * Configuration for the financial + * account transactions embedded component. + */ public Builder setFinancialAccountTransactions( AccountSessionCreateParams.Components.FinancialAccountTransactions financialAccountTransactions) { @@ -549,99 +721,159 @@ public Builder setFinancialAccountTransactions( return this; } - /** Configuration for the issuing card embedded component. */ + /** + * Configuration for the issuing + * card embedded component. + */ public Builder setIssuingCard(AccountSessionCreateParams.Components.IssuingCard issuingCard) { this.issuingCard = issuingCard; return this; } - /** Configuration for the issuing cards list embedded component. */ + /** + * Configuration for the issuing + * cards list embedded component. + */ public Builder setIssuingCardsList( AccountSessionCreateParams.Components.IssuingCardsList issuingCardsList) { this.issuingCardsList = issuingCardsList; return this; } - /** Configuration for the notification banner embedded component. */ + /** + * Configuration for the notification + * banner embedded component. + */ public Builder setNotificationBanner( AccountSessionCreateParams.Components.NotificationBanner notificationBanner) { this.notificationBanner = notificationBanner; return this; } - /** Configuration for the payment details embedded component. */ + /** + * Configuration for the payment + * details embedded component. + */ public Builder setPaymentDetails( AccountSessionCreateParams.Components.PaymentDetails paymentDetails) { this.paymentDetails = paymentDetails; return this; } - /** Configuration for the payment disputes embedded component. */ + /** + * Configuration for the payment + * disputes embedded component. + */ public Builder setPaymentDisputes( AccountSessionCreateParams.Components.PaymentDisputes paymentDisputes) { this.paymentDisputes = paymentDisputes; return this; } - /** Configuration for the payment method settings embedded component. */ + /** + * Configuration for the payment + * method settings embedded component. + */ public Builder setPaymentMethodSettings( AccountSessionCreateParams.Components.PaymentMethodSettings paymentMethodSettings) { this.paymentMethodSettings = paymentMethodSettings; return this; } - /** Configuration for the payments embedded component. */ + /** + * Configuration for the payments + * embedded component. + */ public Builder setPayments(AccountSessionCreateParams.Components.Payments payments) { this.payments = payments; return this; } - /** Configuration for the payouts embedded component. */ + /** + * Configuration for the payouts + * embedded component. + */ public Builder setPayouts(AccountSessionCreateParams.Components.Payouts payouts) { this.payouts = payouts; return this; } - /** Configuration for the payouts list embedded component. */ + /** + * Configuration for the payouts + * list embedded component. + */ public Builder setPayoutsList(AccountSessionCreateParams.Components.PayoutsList payoutsList) { this.payoutsList = payoutsList; return this; } - /** Configuration for the product tax code selector embedded component. */ + /** + * Configuration for the product + * tax code selector embedded component. + */ public Builder setProductTaxCodeSelector( AccountSessionCreateParams.Components.ProductTaxCodeSelector productTaxCodeSelector) { this.productTaxCodeSelector = productTaxCodeSelector; return this; } - /** Configuration for the recipients component. */ + /** + * Configuration for the recipients + * embedded component. + */ public Builder setRecipients(AccountSessionCreateParams.Components.Recipients recipients) { this.recipients = recipients; return this; } - /** Configuration for the reporting chart embedded component. */ + /** + * Configuration for the reporting + * chart embedded component. + */ public Builder setReportingChart( AccountSessionCreateParams.Components.ReportingChart reportingChart) { this.reportingChart = reportingChart; return this; } - /** Configuration for the tax registrations embedded component. */ + /** + * Configuration for the tax + * registrations embedded component. + */ public Builder setTaxRegistrations( AccountSessionCreateParams.Components.TaxRegistrations taxRegistrations) { this.taxRegistrations = taxRegistrations; return this; } - /** Configuration for the tax settings embedded component. */ + /** + * Configuration for the tax + * settings embedded component. + */ public Builder setTaxSettings(AccountSessionCreateParams.Components.TaxSettings taxSettings) { this.taxSettings = taxSettings; return this; } - /** Configuration for the tax threshold monitoring embedded component. */ + /** + * Configuration for the tax + * threshold monitoring embedded component. + */ public Builder setTaxThresholdMonitoring( AccountSessionCreateParams.Components.TaxThresholdMonitoring taxThresholdMonitoring) { this.taxThresholdMonitoring = taxThresholdMonitoring; @@ -739,21 +971,20 @@ public Builder setFeatures( @EqualsAndHashCode(callSuper = false) public static class Features { /** - * Disables Stripe user authentication for this embedded component. This value can only be - * true for accounts where {@code controller.requirement_collection} is {@code application}. - * The default value is the opposite of the {@code external_account_collection} value. For - * example, if you don’t set {@code external_account_collection}, it defaults to true and - * {@code disable_stripe_user_authentication} defaults to false. + * Whether Stripe user authentication is disabled. This value can only be {@code true} for + * accounts where {@code controller.requirement_collection} is {@code application} for the + * account. The default value is the opposite of the {@code external_account_collection} + * value. For example, if you don't set {@code external_account_collection}, it defaults to + * {@code true} and {@code disable_stripe_user_authentication} defaults to {@code false}. */ @SerializedName("disable_stripe_user_authentication") Boolean disableStripeUserAuthentication; /** - * Whether to allow platforms to control bank account collection for their connected - * accounts. This feature can only be false for accounts where you’re responsible for - * collecting updated information when requirements are due or change, like custom accounts. - * Otherwise, bank account collection is determined by compliance requirements. The default - * value for this feature is {@code true}. + * Whether external account collection is enabled. This feature can only be {@code false} + * for accounts where you’re responsible for collecting updated information when + * requirements are due or change, like Custom accounts. The default value for this feature + * is {@code true}. */ @SerializedName("external_account_collection") Boolean externalAccountCollection; @@ -797,12 +1028,12 @@ public AccountSessionCreateParams.Components.AccountManagement.Features build() } /** - * Disables Stripe user authentication for this embedded component. This value can only be - * true for accounts where {@code controller.requirement_collection} is {@code - * application}. The default value is the opposite of the {@code - * external_account_collection} value. For example, if you don’t set {@code - * external_account_collection}, it defaults to true and {@code - * disable_stripe_user_authentication} defaults to false. + * Whether Stripe user authentication is disabled. This value can only be {@code true} for + * accounts where {@code controller.requirement_collection} is {@code application} for the + * account. The default value is the opposite of the {@code external_account_collection} + * value. For example, if you don't set {@code external_account_collection}, it defaults + * to {@code true} and {@code disable_stripe_user_authentication} defaults to {@code + * false}. */ public Builder setDisableStripeUserAuthentication( Boolean disableStripeUserAuthentication) { @@ -811,11 +1042,10 @@ public Builder setDisableStripeUserAuthentication( } /** - * Whether to allow platforms to control bank account collection for their connected - * accounts. This feature can only be false for accounts where you’re responsible for - * collecting updated information when requirements are due or change, like custom - * accounts. Otherwise, bank account collection is determined by compliance requirements. - * The default value for this feature is {@code true}. + * Whether external account collection is enabled. This feature can only be {@code false} + * for accounts where you’re responsible for collecting updated information when + * requirements are due or change, like Custom accounts. The default value for this + * feature is {@code true}. */ public Builder setExternalAccountCollection(Boolean externalAccountCollection) { this.externalAccountCollection = externalAccountCollection; @@ -945,21 +1175,20 @@ public Builder setFeatures( @EqualsAndHashCode(callSuper = false) public static class Features { /** - * Disables Stripe user authentication for this embedded component. This value can only be - * true for accounts where {@code controller.requirement_collection} is {@code application}. - * The default value is the opposite of the {@code external_account_collection} value. For - * example, if you don’t set {@code external_account_collection}, it defaults to true and - * {@code disable_stripe_user_authentication} defaults to false. + * Whether Stripe user authentication is disabled. This value can only be {@code true} for + * accounts where {@code controller.requirement_collection} is {@code application} for the + * account. The default value is the opposite of the {@code external_account_collection} + * value. For example, if you don't set {@code external_account_collection}, it defaults to + * {@code true} and {@code disable_stripe_user_authentication} defaults to {@code false}. */ @SerializedName("disable_stripe_user_authentication") Boolean disableStripeUserAuthentication; /** - * Whether to allow platforms to control bank account collection for their connected - * accounts. This feature can only be false for accounts where you’re responsible for - * collecting updated information when requirements are due or change, like custom accounts. - * Otherwise, bank account collection is determined by compliance requirements. The default - * value for this feature is {@code true}. + * Whether external account collection is enabled. This feature can only be {@code false} + * for accounts where you’re responsible for collecting updated information when + * requirements are due or change, like Custom accounts. The default value for this feature + * is {@code true}. */ @SerializedName("external_account_collection") Boolean externalAccountCollection; @@ -1003,12 +1232,12 @@ public AccountSessionCreateParams.Components.AccountOnboarding.Features build() } /** - * Disables Stripe user authentication for this embedded component. This value can only be - * true for accounts where {@code controller.requirement_collection} is {@code - * application}. The default value is the opposite of the {@code - * external_account_collection} value. For example, if you don’t set {@code - * external_account_collection}, it defaults to true and {@code - * disable_stripe_user_authentication} defaults to false. + * Whether Stripe user authentication is disabled. This value can only be {@code true} for + * accounts where {@code controller.requirement_collection} is {@code application} for the + * account. The default value is the opposite of the {@code external_account_collection} + * value. For example, if you don't set {@code external_account_collection}, it defaults + * to {@code true} and {@code disable_stripe_user_authentication} defaults to {@code + * false}. */ public Builder setDisableStripeUserAuthentication( Boolean disableStripeUserAuthentication) { @@ -1017,11 +1246,10 @@ public Builder setDisableStripeUserAuthentication( } /** - * Whether to allow platforms to control bank account collection for their connected - * accounts. This feature can only be false for accounts where you’re responsible for - * collecting updated information when requirements are due or change, like custom - * accounts. Otherwise, bank account collection is determined by compliance requirements. - * The default value for this feature is {@code true}. + * Whether external account collection is enabled. This feature can only be {@code false} + * for accounts where you’re responsible for collecting updated information when + * requirements are due or change, like Custom accounts. The default value for this + * feature is {@code true}. */ public Builder setExternalAccountCollection(Boolean externalAccountCollection) { this.externalAccountCollection = externalAccountCollection; @@ -1149,7 +1377,7 @@ public Builder setFeatures( @Getter @EqualsAndHashCode(callSuper = false) public static class Features { - /** List of apps allowed to be enabled for this account session. */ + /** The list of apps allowed to be enabled in the embedded component. */ @SerializedName("allowed_apps") Object allowedApps; @@ -1213,13 +1441,13 @@ public Builder addAllAllowedApp(List elements) { return this; } - /** List of apps allowed to be enabled for this account session. */ + /** The list of apps allowed to be enabled in the embedded component. */ public Builder setAllowedApps(EmptyParam allowedApps) { this.allowedApps = allowedApps; return this; } - /** List of apps allowed to be enabled for this account session. */ + /** The list of apps allowed to be enabled in the embedded component. */ public Builder setAllowedApps(List allowedApps) { this.allowedApps = allowedApps; return this; @@ -1344,7 +1572,7 @@ public Builder setFeatures( @Getter @EqualsAndHashCode(callSuper = false) public static class Features { - /** List of apps allowed to be enabled for this account session. */ + /** The list of apps allowed to be enabled in the embedded component. */ @SerializedName("allowed_apps") Object allowedApps; @@ -1408,13 +1636,13 @@ public Builder addAllAllowedApp(List elements) { return this; } - /** List of apps allowed to be enabled for this account session. */ + /** The list of apps allowed to be enabled in the embedded component. */ public Builder setAllowedApps(EmptyParam allowedApps) { this.allowedApps = allowedApps; return this; } - /** List of apps allowed to be enabled for this account session. */ + /** The list of apps allowed to be enabled in the embedded component. */ public Builder setAllowedApps(List allowedApps) { this.allowedApps = allowedApps; return this; @@ -1540,28 +1768,28 @@ public Builder setFeatures( @EqualsAndHashCode(callSuper = false) public static class Features { /** - * Disables Stripe user authentication for this embedded component. This value can only be - * true for accounts where {@code controller.requirement_collection} is {@code application}. - * The default value is the opposite of the {@code external_account_collection} value. For - * example, if you don’t set {@code external_account_collection}, it defaults to true and - * {@code disable_stripe_user_authentication} defaults to false. + * Whether Stripe user authentication is disabled. This value can only be {@code true} for + * accounts where {@code controller.requirement_collection} is {@code application} for the + * account. The default value is the opposite of the {@code external_account_collection} + * value. For example, if you don't set {@code external_account_collection}, it defaults to + * {@code true} and {@code disable_stripe_user_authentication} defaults to {@code false}. */ @SerializedName("disable_stripe_user_authentication") Boolean disableStripeUserAuthentication; /** - * Whether to allow payout schedule to be changed. Default {@code true} when Stripe owns - * Loss Liability, default {@code false} otherwise. + * Whether to allow payout schedule to be changed. Defaults to {@code true} when {@code + * controller.losses.payments} is set to {@code stripe} for the account, otherwise {@code + * false}. */ @SerializedName("edit_payout_schedule") Boolean editPayoutSchedule; /** - * Whether to allow platforms to control bank account collection for their connected - * accounts. This feature can only be false for accounts where you’re responsible for - * collecting updated information when requirements are due or change, like custom accounts. - * Otherwise, bank account collection is determined by compliance requirements. The default - * value for this feature is {@code true}. + * Whether external account collection is enabled. This feature can only be {@code false} + * for accounts where you’re responsible for collecting updated information when + * requirements are due or change, like Custom accounts. The default value for this feature + * is {@code true}. */ @SerializedName("external_account_collection") Boolean externalAccountCollection; @@ -1577,15 +1805,17 @@ public static class Features { Map extraParams; /** - * Whether to allow creation of instant payouts. Default {@code true} when Stripe owns Loss - * Liability, default {@code false} otherwise. + * Whether to allow creation of instant payouts. Defaults to {@code true} when {@code + * controller.losses.payments} is set to {@code stripe} for the account, otherwise {@code + * false}. */ @SerializedName("instant_payouts") Boolean instantPayouts; /** - * Whether to allow creation of standard payouts. Default {@code true} when Stripe owns Loss - * Liability, default {@code false} otherwise. + * Whether to allow creation of standard payouts. Defaults to {@code true} when {@code + * controller.losses.payments} is set to {@code stripe} for the account, otherwise {@code + * false}. */ @SerializedName("standard_payouts") Boolean standardPayouts; @@ -1634,12 +1864,12 @@ public AccountSessionCreateParams.Components.Balances.Features build() { } /** - * Disables Stripe user authentication for this embedded component. This value can only be - * true for accounts where {@code controller.requirement_collection} is {@code - * application}. The default value is the opposite of the {@code - * external_account_collection} value. For example, if you don’t set {@code - * external_account_collection}, it defaults to true and {@code - * disable_stripe_user_authentication} defaults to false. + * Whether Stripe user authentication is disabled. This value can only be {@code true} for + * accounts where {@code controller.requirement_collection} is {@code application} for the + * account. The default value is the opposite of the {@code external_account_collection} + * value. For example, if you don't set {@code external_account_collection}, it defaults + * to {@code true} and {@code disable_stripe_user_authentication} defaults to {@code + * false}. */ public Builder setDisableStripeUserAuthentication( Boolean disableStripeUserAuthentication) { @@ -1648,8 +1878,9 @@ public Builder setDisableStripeUserAuthentication( } /** - * Whether to allow payout schedule to be changed. Default {@code true} when Stripe owns - * Loss Liability, default {@code false} otherwise. + * Whether to allow payout schedule to be changed. Defaults to {@code true} when {@code + * controller.losses.payments} is set to {@code stripe} for the account, otherwise {@code + * false}. */ public Builder setEditPayoutSchedule(Boolean editPayoutSchedule) { this.editPayoutSchedule = editPayoutSchedule; @@ -1657,11 +1888,10 @@ public Builder setEditPayoutSchedule(Boolean editPayoutSchedule) { } /** - * Whether to allow platforms to control bank account collection for their connected - * accounts. This feature can only be false for accounts where you’re responsible for - * collecting updated information when requirements are due or change, like custom - * accounts. Otherwise, bank account collection is determined by compliance requirements. - * The default value for this feature is {@code true}. + * Whether external account collection is enabled. This feature can only be {@code false} + * for accounts where you’re responsible for collecting updated information when + * requirements are due or change, like Custom accounts. The default value for this + * feature is {@code true}. */ public Builder setExternalAccountCollection(Boolean externalAccountCollection) { this.externalAccountCollection = externalAccountCollection; @@ -1697,8 +1927,9 @@ public Builder putAllExtraParam(Map map) { } /** - * Whether to allow creation of instant payouts. Default {@code true} when Stripe owns - * Loss Liability, default {@code false} otherwise. + * Whether to allow creation of instant payouts. Defaults to {@code true} when {@code + * controller.losses.payments} is set to {@code stripe} for the account, otherwise {@code + * false}. */ public Builder setInstantPayouts(Boolean instantPayouts) { this.instantPayouts = instantPayouts; @@ -1706,8 +1937,9 @@ public Builder setInstantPayouts(Boolean instantPayouts) { } /** - * Whether to allow creation of standard payouts. Default {@code true} when Stripe owns - * Loss Liability, default {@code false} otherwise. + * Whether to allow creation of standard payouts. Defaults to {@code true} when {@code + * controller.losses.payments} is set to {@code stripe} for the account, otherwise {@code + * false}. */ public Builder setStandardPayouts(Boolean standardPayouts) { this.standardPayouts = standardPayouts; @@ -2413,14 +2645,14 @@ public static class Features { Boolean capturePayments; /** - * Whether to allow connected accounts to manage destination charges that are created on - * behalf of them. This is {@code false} by default. + * Whether connected accounts can manage destination charges that are created on behalf of + * them. This is {@code false} by default. */ @SerializedName("destination_on_behalf_of_charge_management") Boolean destinationOnBehalfOfChargeManagement; /** - * Whether to allow responding to disputes, including submitting evidence and accepting + * Whether responding to disputes is enabled, including submitting evidence and accepting * disputes. This is {@code true} by default. */ @SerializedName("dispute_management") @@ -2436,7 +2668,7 @@ public static class Features { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Whether to allow sending refunds. This is {@code true} by default. */ + /** Whether sending refunds is enabled. This is {@code true} by default. */ @SerializedName("refund_management") Boolean refundManagement; @@ -2488,8 +2720,8 @@ public Builder setCapturePayments(Boolean capturePayments) { } /** - * Whether to allow connected accounts to manage destination charges that are created on - * behalf of them. This is {@code false} by default. + * Whether connected accounts can manage destination charges that are created on behalf of + * them. This is {@code false} by default. */ public Builder setDestinationOnBehalfOfChargeManagement( Boolean destinationOnBehalfOfChargeManagement) { @@ -2498,7 +2730,7 @@ public Builder setDestinationOnBehalfOfChargeManagement( } /** - * Whether to allow responding to disputes, including submitting evidence and accepting + * Whether responding to disputes is enabled, including submitting evidence and accepting * disputes. This is {@code true} by default. */ public Builder setDisputeManagement(Boolean disputeManagement) { @@ -2536,7 +2768,7 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Whether to allow sending refunds. This is {@code true} by default. */ + /** Whether sending refunds is enabled. This is {@code true} by default. */ public Builder setRefundManagement(Boolean refundManagement) { this.refundManagement = refundManagement; return this; @@ -2929,16 +3161,21 @@ public Builder setFeatures( @EqualsAndHashCode(callSuper = false) public static class Features { /** - * Disables Stripe user authentication for this embedded component. This value can only be - * true for accounts where {@code controller.requirement_collection} is {@code application}. - * The default value is the opposite of the {@code external_account_collection} value. For - * example, if you don’t set {@code external_account_collection}, it defaults to true and - * {@code disable_stripe_user_authentication} defaults to false. + * Whether Stripe user authentication is disabled. This value can only be {@code true} for + * accounts where {@code controller.requirement_collection} is {@code application} for the + * account. The default value is the opposite of the {@code external_account_collection} + * value. For example, if you don't set {@code external_account_collection}, it defaults to + * {@code true} and {@code disable_stripe_user_authentication} defaults to {@code false}. */ @SerializedName("disable_stripe_user_authentication") Boolean disableStripeUserAuthentication; - /** Whether to allow external accounts to be linked for money transfer. */ + /** + * Whether external account collection is enabled. This feature can only be {@code false} + * for accounts where you’re responsible for collecting updated information when + * requirements are due or change, like Custom accounts. The default value for this feature + * is {@code true}. + */ @SerializedName("external_account_collection") Boolean externalAccountCollection; @@ -2999,12 +3236,12 @@ public AccountSessionCreateParams.Components.FinancialAccount.Features build() { } /** - * Disables Stripe user authentication for this embedded component. This value can only be - * true for accounts where {@code controller.requirement_collection} is {@code - * application}. The default value is the opposite of the {@code - * external_account_collection} value. For example, if you don’t set {@code - * external_account_collection}, it defaults to true and {@code - * disable_stripe_user_authentication} defaults to false. + * Whether Stripe user authentication is disabled. This value can only be {@code true} for + * accounts where {@code controller.requirement_collection} is {@code application} for the + * account. The default value is the opposite of the {@code external_account_collection} + * value. For example, if you don't set {@code external_account_collection}, it defaults + * to {@code true} and {@code disable_stripe_user_authentication} defaults to {@code + * false}. */ public Builder setDisableStripeUserAuthentication( Boolean disableStripeUserAuthentication) { @@ -3012,7 +3249,12 @@ public Builder setDisableStripeUserAuthentication( return this; } - /** Whether to allow external accounts to be linked for money transfer. */ + /** + * Whether external account collection is enabled. This feature can only be {@code false} + * for accounts where you’re responsible for collecting updated information when + * requirements are due or change, like Custom accounts. The default value for this + * feature is {@code true}. + */ public Builder setExternalAccountCollection(Boolean externalAccountCollection) { this.externalAccountCollection = externalAccountCollection; return this; @@ -3537,9 +3779,11 @@ public static class Features { Boolean cardholderManagement; /** - * Disables Stripe user authentication for this embedded component. This feature can only be - * false for accounts where you’re responsible for collecting updated information when - * requirements are due or change, like custom accounts. + * Whether Stripe user authentication is disabled. This value can only be {@code true} for + * accounts where {@code controller.requirement_collection} is {@code application} for the + * account. The default value is the opposite of the {@code external_account_collection} + * value. For example, if you don't set {@code external_account_collection}, it defaults to + * {@code true} and {@code disable_stripe_user_authentication} defaults to {@code false}. */ @SerializedName("disable_stripe_user_authentication") Boolean disableStripeUserAuthentication; @@ -3620,9 +3864,12 @@ public Builder setCardholderManagement(Boolean cardholderManagement) { } /** - * Disables Stripe user authentication for this embedded component. This feature can only - * be false for accounts where you’re responsible for collecting updated information when - * requirements are due or change, like custom accounts. + * Whether Stripe user authentication is disabled. This value can only be {@code true} for + * accounts where {@code controller.requirement_collection} is {@code application} for the + * account. The default value is the opposite of the {@code external_account_collection} + * value. For example, if you don't set {@code external_account_collection}, it defaults + * to {@code true} and {@code disable_stripe_user_authentication} defaults to {@code + * false}. */ public Builder setDisableStripeUserAuthentication( Boolean disableStripeUserAuthentication) { @@ -3759,21 +4006,20 @@ public Builder setFeatures( @EqualsAndHashCode(callSuper = false) public static class Features { /** - * Disables Stripe user authentication for this embedded component. This value can only be - * true for accounts where {@code controller.requirement_collection} is {@code application}. - * The default value is the opposite of the {@code external_account_collection} value. For - * example, if you don’t set {@code external_account_collection}, it defaults to true and - * {@code disable_stripe_user_authentication} defaults to false. + * Whether Stripe user authentication is disabled. This value can only be {@code true} for + * accounts where {@code controller.requirement_collection} is {@code application} for the + * account. The default value is the opposite of the {@code external_account_collection} + * value. For example, if you don't set {@code external_account_collection}, it defaults to + * {@code true} and {@code disable_stripe_user_authentication} defaults to {@code false}. */ @SerializedName("disable_stripe_user_authentication") Boolean disableStripeUserAuthentication; /** - * Whether to allow platforms to control bank account collection for their connected - * accounts. This feature can only be false for accounts where you’re responsible for - * collecting updated information when requirements are due or change, like custom accounts. - * Otherwise, bank account collection is determined by compliance requirements. The default - * value for this feature is {@code true}. + * Whether external account collection is enabled. This feature can only be {@code false} + * for accounts where you’re responsible for collecting updated information when + * requirements are due or change, like Custom accounts. The default value for this feature + * is {@code true}. */ @SerializedName("external_account_collection") Boolean externalAccountCollection; @@ -3817,12 +4063,12 @@ public AccountSessionCreateParams.Components.NotificationBanner.Features build() } /** - * Disables Stripe user authentication for this embedded component. This value can only be - * true for accounts where {@code controller.requirement_collection} is {@code - * application}. The default value is the opposite of the {@code - * external_account_collection} value. For example, if you don’t set {@code - * external_account_collection}, it defaults to true and {@code - * disable_stripe_user_authentication} defaults to false. + * Whether Stripe user authentication is disabled. This value can only be {@code true} for + * accounts where {@code controller.requirement_collection} is {@code application} for the + * account. The default value is the opposite of the {@code external_account_collection} + * value. For example, if you don't set {@code external_account_collection}, it defaults + * to {@code true} and {@code disable_stripe_user_authentication} defaults to {@code + * false}. */ public Builder setDisableStripeUserAuthentication( Boolean disableStripeUserAuthentication) { @@ -3831,11 +4077,10 @@ public Builder setDisableStripeUserAuthentication( } /** - * Whether to allow platforms to control bank account collection for their connected - * accounts. This feature can only be false for accounts where you’re responsible for - * collecting updated information when requirements are due or change, like custom - * accounts. Otherwise, bank account collection is determined by compliance requirements. - * The default value for this feature is {@code true}. + * Whether external account collection is enabled. This feature can only be {@code false} + * for accounts where you’re responsible for collecting updated information when + * requirements are due or change, like Custom accounts. The default value for this + * feature is {@code true}. */ public Builder setExternalAccountCollection(Boolean externalAccountCollection) { this.externalAccountCollection = externalAccountCollection; @@ -3971,14 +4216,14 @@ public static class Features { Boolean capturePayments; /** - * Whether to allow connected accounts to manage destination charges that are created on - * behalf of them. This is {@code false} by default. + * Whether connected accounts can manage destination charges that are created on behalf of + * them. This is {@code false} by default. */ @SerializedName("destination_on_behalf_of_charge_management") Boolean destinationOnBehalfOfChargeManagement; /** - * Whether to allow responding to disputes, including submitting evidence and accepting + * Whether responding to disputes is enabled, including submitting evidence and accepting * disputes. This is {@code true} by default. */ @SerializedName("dispute_management") @@ -3994,7 +4239,7 @@ public static class Features { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Whether to allow sending refunds. This is {@code true} by default. */ + /** Whether sending refunds is enabled. This is {@code true} by default. */ @SerializedName("refund_management") Boolean refundManagement; @@ -4046,8 +4291,8 @@ public Builder setCapturePayments(Boolean capturePayments) { } /** - * Whether to allow connected accounts to manage destination charges that are created on - * behalf of them. This is {@code false} by default. + * Whether connected accounts can manage destination charges that are created on behalf of + * them. This is {@code false} by default. */ public Builder setDestinationOnBehalfOfChargeManagement( Boolean destinationOnBehalfOfChargeManagement) { @@ -4056,7 +4301,7 @@ public Builder setDestinationOnBehalfOfChargeManagement( } /** - * Whether to allow responding to disputes, including submitting evidence and accepting + * Whether responding to disputes is enabled, including submitting evidence and accepting * disputes. This is {@code true} by default. */ public Builder setDisputeManagement(Boolean disputeManagement) { @@ -4094,7 +4339,7 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Whether to allow sending refunds. This is {@code true} by default. */ + /** Whether sending refunds is enabled. This is {@code true} by default. */ public Builder setRefundManagement(Boolean refundManagement) { this.refundManagement = refundManagement; return this; @@ -4192,14 +4437,14 @@ public Builder setFeatures( @EqualsAndHashCode(callSuper = false) public static class Features { /** - * Whether to allow connected accounts to manage destination charges that are created on - * behalf of them. This is {@code false} by default. + * Whether connected accounts can manage destination charges that are created on behalf of + * them. This is {@code false} by default. */ @SerializedName("destination_on_behalf_of_charge_management") Boolean destinationOnBehalfOfChargeManagement; /** - * Whether to allow responding to disputes, including submitting evidence and accepting + * Whether responding to disputes is enabled, including submitting evidence and accepting * disputes. This is {@code true} by default. */ @SerializedName("dispute_management") @@ -4215,7 +4460,7 @@ public static class Features { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Whether to allow sending refunds. This is {@code true} by default. */ + /** Whether sending refunds is enabled. This is {@code true} by default. */ @SerializedName("refund_management") Boolean refundManagement; @@ -4253,8 +4498,8 @@ public AccountSessionCreateParams.Components.PaymentDisputes.Features build() { } /** - * Whether to allow connected accounts to manage destination charges that are created on - * behalf of them. This is {@code false} by default. + * Whether connected accounts can manage destination charges that are created on behalf of + * them. This is {@code false} by default. */ public Builder setDestinationOnBehalfOfChargeManagement( Boolean destinationOnBehalfOfChargeManagement) { @@ -4263,7 +4508,7 @@ public Builder setDestinationOnBehalfOfChargeManagement( } /** - * Whether to allow responding to disputes, including submitting evidence and accepting + * Whether responding to disputes is enabled, including submitting evidence and accepting * disputes. This is {@code true} by default. */ public Builder setDisputeManagement(Boolean disputeManagement) { @@ -4301,7 +4546,7 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Whether to allow sending refunds. This is {@code true} by default. */ + /** Whether sending refunds is enabled. This is {@code true} by default. */ public Builder setRefundManagement(Boolean refundManagement) { this.refundManagement = refundManagement; return this; @@ -4555,14 +4800,14 @@ public static class Features { Boolean capturePayments; /** - * Whether to allow connected accounts to manage destination charges that are created on - * behalf of them. This is {@code false} by default. + * Whether connected accounts can manage destination charges that are created on behalf of + * them. This is {@code false} by default. */ @SerializedName("destination_on_behalf_of_charge_management") Boolean destinationOnBehalfOfChargeManagement; /** - * Whether to allow responding to disputes, including submitting evidence and accepting + * Whether responding to disputes is enabled, including submitting evidence and accepting * disputes. This is {@code true} by default. */ @SerializedName("dispute_management") @@ -4578,7 +4823,7 @@ public static class Features { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Whether to allow sending refunds. This is {@code true} by default. */ + /** Whether sending refunds is enabled. This is {@code true} by default. */ @SerializedName("refund_management") Boolean refundManagement; @@ -4630,8 +4875,8 @@ public Builder setCapturePayments(Boolean capturePayments) { } /** - * Whether to allow connected accounts to manage destination charges that are created on - * behalf of them. This is {@code false} by default. + * Whether connected accounts can manage destination charges that are created on behalf of + * them. This is {@code false} by default. */ public Builder setDestinationOnBehalfOfChargeManagement( Boolean destinationOnBehalfOfChargeManagement) { @@ -4640,7 +4885,7 @@ public Builder setDestinationOnBehalfOfChargeManagement( } /** - * Whether to allow responding to disputes, including submitting evidence and accepting + * Whether responding to disputes is enabled, including submitting evidence and accepting * disputes. This is {@code true} by default. */ public Builder setDisputeManagement(Boolean disputeManagement) { @@ -4676,7 +4921,7 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Whether to allow sending refunds. This is {@code true} by default. */ + /** Whether sending refunds is enabled. This is {@code true} by default. */ public Builder setRefundManagement(Boolean refundManagement) { this.refundManagement = refundManagement; return this; @@ -4774,28 +5019,28 @@ public Builder setFeatures( @EqualsAndHashCode(callSuper = false) public static class Features { /** - * Disables Stripe user authentication for this embedded component. This value can only be - * true for accounts where {@code controller.requirement_collection} is {@code application}. - * The default value is the opposite of the {@code external_account_collection} value. For - * example, if you don’t set {@code external_account_collection}, it defaults to true and - * {@code disable_stripe_user_authentication} defaults to false. + * Whether Stripe user authentication is disabled. This value can only be {@code true} for + * accounts where {@code controller.requirement_collection} is {@code application} for the + * account. The default value is the opposite of the {@code external_account_collection} + * value. For example, if you don't set {@code external_account_collection}, it defaults to + * {@code true} and {@code disable_stripe_user_authentication} defaults to {@code false}. */ @SerializedName("disable_stripe_user_authentication") Boolean disableStripeUserAuthentication; /** - * Whether to allow payout schedule to be changed. Default {@code true} when Stripe owns - * Loss Liability, default {@code false} otherwise. + * Whether to allow payout schedule to be changed. Defaults to {@code true} when {@code + * controller.losses.payments} is set to {@code stripe} for the account, otherwise {@code + * false}. */ @SerializedName("edit_payout_schedule") Boolean editPayoutSchedule; /** - * Whether to allow platforms to control bank account collection for their connected - * accounts. This feature can only be false for accounts where you’re responsible for - * collecting updated information when requirements are due or change, like custom accounts. - * Otherwise, bank account collection is determined by compliance requirements. The default - * value for this feature is {@code true}. + * Whether external account collection is enabled. This feature can only be {@code false} + * for accounts where you’re responsible for collecting updated information when + * requirements are due or change, like Custom accounts. The default value for this feature + * is {@code true}. */ @SerializedName("external_account_collection") Boolean externalAccountCollection; @@ -4811,15 +5056,17 @@ public static class Features { Map extraParams; /** - * Whether to allow creation of instant payouts. Default {@code true} when Stripe owns Loss - * Liability, default {@code false} otherwise. + * Whether to allow creation of instant payouts. Defaults to {@code true} when {@code + * controller.losses.payments} is set to {@code stripe} for the account, otherwise {@code + * false}. */ @SerializedName("instant_payouts") Boolean instantPayouts; /** - * Whether to allow creation of standard payouts. Default {@code true} when Stripe owns Loss - * Liability, default {@code false} otherwise. + * Whether to allow creation of standard payouts. Defaults to {@code true} when {@code + * controller.losses.payments} is set to {@code stripe} for the account, otherwise {@code + * false}. */ @SerializedName("standard_payouts") Boolean standardPayouts; @@ -4868,12 +5115,12 @@ public AccountSessionCreateParams.Components.Payouts.Features build() { } /** - * Disables Stripe user authentication for this embedded component. This value can only be - * true for accounts where {@code controller.requirement_collection} is {@code - * application}. The default value is the opposite of the {@code - * external_account_collection} value. For example, if you don’t set {@code - * external_account_collection}, it defaults to true and {@code - * disable_stripe_user_authentication} defaults to false. + * Whether Stripe user authentication is disabled. This value can only be {@code true} for + * accounts where {@code controller.requirement_collection} is {@code application} for the + * account. The default value is the opposite of the {@code external_account_collection} + * value. For example, if you don't set {@code external_account_collection}, it defaults + * to {@code true} and {@code disable_stripe_user_authentication} defaults to {@code + * false}. */ public Builder setDisableStripeUserAuthentication( Boolean disableStripeUserAuthentication) { @@ -4882,8 +5129,9 @@ public Builder setDisableStripeUserAuthentication( } /** - * Whether to allow payout schedule to be changed. Default {@code true} when Stripe owns - * Loss Liability, default {@code false} otherwise. + * Whether to allow payout schedule to be changed. Defaults to {@code true} when {@code + * controller.losses.payments} is set to {@code stripe} for the account, otherwise {@code + * false}. */ public Builder setEditPayoutSchedule(Boolean editPayoutSchedule) { this.editPayoutSchedule = editPayoutSchedule; @@ -4891,11 +5139,10 @@ public Builder setEditPayoutSchedule(Boolean editPayoutSchedule) { } /** - * Whether to allow platforms to control bank account collection for their connected - * accounts. This feature can only be false for accounts where you’re responsible for - * collecting updated information when requirements are due or change, like custom - * accounts. Otherwise, bank account collection is determined by compliance requirements. - * The default value for this feature is {@code true}. + * Whether external account collection is enabled. This feature can only be {@code false} + * for accounts where you’re responsible for collecting updated information when + * requirements are due or change, like Custom accounts. The default value for this + * feature is {@code true}. */ public Builder setExternalAccountCollection(Boolean externalAccountCollection) { this.externalAccountCollection = externalAccountCollection; @@ -4931,8 +5178,9 @@ public Builder putAllExtraParam(Map map) { } /** - * Whether to allow creation of instant payouts. Default {@code true} when Stripe owns - * Loss Liability, default {@code false} otherwise. + * Whether to allow creation of instant payouts. Defaults to {@code true} when {@code + * controller.losses.payments} is set to {@code stripe} for the account, otherwise {@code + * false}. */ public Builder setInstantPayouts(Boolean instantPayouts) { this.instantPayouts = instantPayouts; @@ -4940,8 +5188,9 @@ public Builder setInstantPayouts(Boolean instantPayouts) { } /** - * Whether to allow creation of standard payouts. Default {@code true} when Stripe owns - * Loss Liability, default {@code false} otherwise. + * Whether to allow creation of standard payouts. Defaults to {@code true} when {@code + * controller.losses.payments} is set to {@code stripe} for the account, otherwise {@code + * false}. */ public Builder setStandardPayouts(Boolean standardPayouts) { this.standardPayouts = standardPayouts; diff --git a/src/main/java/com/stripe/param/AccountUpdateParams.java b/src/main/java/com/stripe/param/AccountUpdateParams.java index 0e5101fb449..f02835c4a2c 100644 --- a/src/main/java/com/stripe/param/AccountUpdateParams.java +++ b/src/main/java/com/stripe/param/AccountUpdateParams.java @@ -1464,6 +1464,10 @@ public static class Capabilities { @SerializedName("cashapp_payments") CashappPayments cashappPayments; + /** The crypto_payments capability. */ + @SerializedName("crypto_payments") + CryptoPayments cryptoPayments; + /** The eps_payments capability. */ @SerializedName("eps_payments") EpsPayments epsPayments; @@ -1711,6 +1715,7 @@ private Capabilities( CardPayments cardPayments, CartesBancairesPayments cartesBancairesPayments, CashappPayments cashappPayments, + CryptoPayments cryptoPayments, EpsPayments epsPayments, Map extraParams, FpxPayments fpxPayments, @@ -1784,6 +1789,7 @@ private Capabilities( this.cardPayments = cardPayments; this.cartesBancairesPayments = cartesBancairesPayments; this.cashappPayments = cashappPayments; + this.cryptoPayments = cryptoPayments; this.epsPayments = epsPayments; this.extraParams = extraParams; this.fpxPayments = fpxPayments; @@ -1881,6 +1887,8 @@ public static class Builder { private CashappPayments cashappPayments; + private CryptoPayments cryptoPayments; + private EpsPayments epsPayments; private Map extraParams; @@ -2013,6 +2021,7 @@ public AccountUpdateParams.Capabilities build() { this.cardPayments, this.cartesBancairesPayments, this.cashappPayments, + this.cryptoPayments, this.epsPayments, this.extraParams, this.fpxPayments, @@ -2186,6 +2195,13 @@ public Builder setCashappPayments( return this; } + /** The crypto_payments capability. */ + public Builder setCryptoPayments( + AccountUpdateParams.Capabilities.CryptoPayments cryptoPayments) { + this.cryptoPayments = cryptoPayments; + return this; + } + /** The eps_payments capability. */ public Builder setEpsPayments(AccountUpdateParams.Capabilities.EpsPayments epsPayments) { this.epsPayments = epsPayments; @@ -3947,6 +3963,86 @@ public Builder setRequested(Boolean requested) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CryptoPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Passing true requests the capability for the account, if it is not already requested. A + * requested capability may not immediately become active. Any requirements to activate the + * capability are returned in the {@code requirements} arrays. + */ + @SerializedName("requested") + Boolean requested; + + private CryptoPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Capabilities.CryptoPayments build() { + return new AccountUpdateParams.Capabilities.CryptoPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Capabilities.CryptoPayments#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Capabilities.CryptoPayments#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Passing true requests the capability for the account, if it is not already requested. A + * requested capability may not immediately become active. Any requirements to activate the + * capability are returned in the {@code requirements} arrays. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class EpsPayments { @@ -10225,6 +10321,10 @@ public static class Documents { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** One or more documents that demonstrate proof of address. */ + @SerializedName("proof_of_address") + ProofOfAddress proofOfAddress; + /** * One or more documents showing the company’s proof of registration with the national business * registry. @@ -10244,6 +10344,7 @@ private Documents( CompanyRegistrationVerification companyRegistrationVerification, CompanyTaxIdVerification companyTaxIdVerification, Map extraParams, + ProofOfAddress proofOfAddress, ProofOfRegistration proofOfRegistration, ProofOfUltimateBeneficialOwnership proofOfUltimateBeneficialOwnership) { this.bankAccountOwnershipVerification = bankAccountOwnershipVerification; @@ -10253,6 +10354,7 @@ private Documents( this.companyRegistrationVerification = companyRegistrationVerification; this.companyTaxIdVerification = companyTaxIdVerification; this.extraParams = extraParams; + this.proofOfAddress = proofOfAddress; this.proofOfRegistration = proofOfRegistration; this.proofOfUltimateBeneficialOwnership = proofOfUltimateBeneficialOwnership; } @@ -10276,6 +10378,8 @@ public static class Builder { private Map extraParams; + private ProofOfAddress proofOfAddress; + private ProofOfRegistration proofOfRegistration; private ProofOfUltimateBeneficialOwnership proofOfUltimateBeneficialOwnership; @@ -10290,6 +10394,7 @@ public AccountUpdateParams.Documents build() { this.companyRegistrationVerification, this.companyTaxIdVerification, this.extraParams, + this.proofOfAddress, this.proofOfRegistration, this.proofOfUltimateBeneficialOwnership); } @@ -10377,6 +10482,13 @@ public Builder putAllExtraParam(Map map) { return this; } + /** One or more documents that demonstrate proof of address. */ + public Builder setProofOfAddress( + AccountUpdateParams.Documents.ProofOfAddress proofOfAddress) { + this.proofOfAddress = proofOfAddress; + return this; + } + /** * One or more documents showing the company’s proof of registration with the national * business registry. @@ -10986,6 +11098,101 @@ public Builder addAllFile(List elements) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ProofOfAddress { + /** + * 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; + + private ProofOfAddress(Map extraParams, List files) { + this.extraParams = extraParams; + this.files = files; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Documents.ProofOfAddress build() { + return new AccountUpdateParams.Documents.ProofOfAddress(this.extraParams, this.files); + } + + /** + * 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.Documents.ProofOfAddress#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.Documents.ProofOfAddress#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 + * AccountUpdateParams.Documents.ProofOfAddress#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 + * AccountUpdateParams.Documents.ProofOfAddress#files} for the field documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class ProofOfRegistration { @@ -15346,6 +15553,15 @@ public static class Schedule { @SerializedName("monthly_anchor") Long monthlyAnchor; + /** + * The days of the month when available funds are paid out, specified as an array of numbers + * between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are + * instead sent on the last day of a shorter month. Required and applicable only if {@code + * interval} is {@code monthly} and {@code monthly_anchor} is not set. + */ + @SerializedName("monthly_payout_days") + List monthlyPayoutDays; + /** * The day of the week when available funds are paid out, specified as {@code monday}, * {@code tuesday}, etc. (required and applicable only if {@code interval} is {@code @@ -15354,17 +15570,29 @@ public static class Schedule { @SerializedName("weekly_anchor") WeeklyAnchor weeklyAnchor; + /** + * The days of the week when available funds are paid out, specified as an array, e.g., + * [{@code monday}, {@code tuesday}]. (required and applicable only if {@code interval} is + * {@code weekly} and {@code weekly_anchor} is not set.) + */ + @SerializedName("weekly_payout_days") + List weeklyPayoutDays; + private Schedule( Object delayDays, Map extraParams, Interval interval, Long monthlyAnchor, - WeeklyAnchor weeklyAnchor) { + List monthlyPayoutDays, + WeeklyAnchor weeklyAnchor, + List weeklyPayoutDays) { this.delayDays = delayDays; this.extraParams = extraParams; this.interval = interval; this.monthlyAnchor = monthlyAnchor; + this.monthlyPayoutDays = monthlyPayoutDays; this.weeklyAnchor = weeklyAnchor; + this.weeklyPayoutDays = weeklyPayoutDays; } public static Builder builder() { @@ -15380,8 +15608,13 @@ public static class Builder { private Long monthlyAnchor; + private List monthlyPayoutDays; + private WeeklyAnchor weeklyAnchor; + private List + weeklyPayoutDays; + /** Finalize and obtain parameter instance from this builder. */ public AccountUpdateParams.Settings.Payouts.Schedule build() { return new AccountUpdateParams.Settings.Payouts.Schedule( @@ -15389,7 +15622,9 @@ public AccountUpdateParams.Settings.Payouts.Schedule build() { this.extraParams, this.interval, this.monthlyAnchor, - this.weeklyAnchor); + this.monthlyPayoutDays, + this.weeklyAnchor, + this.weeklyPayoutDays); } /** @@ -15468,6 +15703,34 @@ public Builder setMonthlyAnchor(Long monthlyAnchor) { return this; } + /** + * Add an element to `monthlyPayoutDays` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link AccountUpdateParams.Settings.Payouts.Schedule#monthlyPayoutDays} for the + * field documentation. + */ + public Builder addMonthlyPayoutDay(Long element) { + if (this.monthlyPayoutDays == null) { + this.monthlyPayoutDays = new ArrayList<>(); + } + this.monthlyPayoutDays.add(element); + return this; + } + + /** + * Add all elements to `monthlyPayoutDays` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link AccountUpdateParams.Settings.Payouts.Schedule#monthlyPayoutDays} for the + * field documentation. + */ + public Builder addAllMonthlyPayoutDay(List elements) { + if (this.monthlyPayoutDays == null) { + this.monthlyPayoutDays = new ArrayList<>(); + } + this.monthlyPayoutDays.addAll(elements); + return this; + } + /** * The day of the week when available funds are paid out, specified as {@code monday}, * {@code tuesday}, etc. (required and applicable only if {@code interval} is {@code @@ -15478,6 +15741,36 @@ public Builder setWeeklyAnchor( this.weeklyAnchor = weeklyAnchor; return this; } + + /** + * Add an element to `weeklyPayoutDays` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link AccountUpdateParams.Settings.Payouts.Schedule#weeklyPayoutDays} for the + * field documentation. + */ + public Builder addWeeklyPayoutDay( + AccountUpdateParams.Settings.Payouts.Schedule.WeeklyPayoutDay element) { + if (this.weeklyPayoutDays == null) { + this.weeklyPayoutDays = new ArrayList<>(); + } + this.weeklyPayoutDays.add(element); + return this; + } + + /** + * Add all elements to `weeklyPayoutDays` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link AccountUpdateParams.Settings.Payouts.Schedule#weeklyPayoutDays} for the + * field documentation. + */ + public Builder addAllWeeklyPayoutDay( + List elements) { + if (this.weeklyPayoutDays == null) { + this.weeklyPayoutDays = new ArrayList<>(); + } + this.weeklyPayoutDays.addAll(elements); + return this; + } } public enum DelayDays implements ApiRequestParams.EnumParam { @@ -15542,6 +15835,36 @@ public enum WeeklyAnchor implements ApiRequestParams.EnumParam { this.value = value; } } + + public enum WeeklyPayoutDay implements ApiRequestParams.EnumParam { + @SerializedName("friday") + FRIDAY("friday"), + + @SerializedName("monday") + MONDAY("monday"), + + @SerializedName("saturday") + SATURDAY("saturday"), + + @SerializedName("sunday") + SUNDAY("sunday"), + + @SerializedName("thursday") + THURSDAY("thursday"), + + @SerializedName("tuesday") + TUESDAY("tuesday"), + + @SerializedName("wednesday") + WEDNESDAY("wednesday"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + WeeklyPayoutDay(String value) { + this.value = value; + } + } } } diff --git a/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java b/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java index 017d71f897b..cb870c26943 100644 --- a/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java +++ b/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java @@ -320,6 +320,13 @@ public static class PaymentMethodData { @SerializedName("cashapp") Cashapp cashapp; + /** + * If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment + * method. + */ + @SerializedName("crypto") + Crypto crypto; + /** * If this is a {@code customer_balance} PaymentMethod, this hash contains details about the * CustomerBalance payment method. @@ -658,6 +665,7 @@ private PaymentMethodData( Blik blik, Boleto boleto, Cashapp cashapp, + Crypto crypto, CustomerBalance customerBalance, Eps eps, Map extraParams, @@ -719,6 +727,7 @@ private PaymentMethodData( this.blik = blik; this.boleto = boleto; this.cashapp = cashapp; + this.crypto = crypto; this.customerBalance = customerBalance; this.eps = eps; this.extraParams = extraParams; @@ -802,6 +811,8 @@ public static class Builder { private Cashapp cashapp; + private Crypto crypto; + private CustomerBalance customerBalance; private Eps eps; @@ -912,6 +923,7 @@ public ConfirmationTokenCreateParams.PaymentMethodData build() { this.blik, this.boleto, this.cashapp, + this.crypto, this.customerBalance, this.eps, this.extraParams, @@ -1104,6 +1116,15 @@ public Builder setCashapp(ConfirmationTokenCreateParams.PaymentMethodData.Cashap return this; } + /** + * If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment + * method. + */ + public Builder setCrypto(ConfirmationTokenCreateParams.PaymentMethodData.Crypto crypto) { + this.crypto = crypto; + return this; + } + /** * If this is a {@code customer_balance} PaymentMethod, this hash contains details about the * CustomerBalance payment method. @@ -2770,6 +2791,64 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Crypto { + /** + * 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 Crypto(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public ConfirmationTokenCreateParams.PaymentMethodData.Crypto build() { + return new ConfirmationTokenCreateParams.PaymentMethodData.Crypto(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link ConfirmationTokenCreateParams.PaymentMethodData.Crypto#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link ConfirmationTokenCreateParams.PaymentMethodData.Crypto#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 CustomerBalance { @@ -3533,6 +3612,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("bunq") BUNQ("bunq"), + @SerializedName("buut") + BUUT("buut"), + @SerializedName("handelsbanken") HANDELSBANKEN("handelsbanken"), @@ -6429,6 +6511,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("cashapp") CASHAPP("cashapp"), + @SerializedName("crypto") + CRYPTO("crypto"), + @SerializedName("customer_balance") CUSTOMER_BALANCE("customer_balance"), @@ -6812,7 +6897,10 @@ public static class Plan { @SerializedName("interval") Interval interval; - /** Required. Type of installment plan, one of {@code fixed_count}. */ + /** + * Required. Type of installment plan, one of {@code fixed_count}, {@code + * bonus}, or {@code revolving}. + */ @SerializedName("type") Type type; @@ -6894,7 +6982,10 @@ public Builder setInterval( return this; } - /** Required. Type of installment plan, one of {@code fixed_count}. */ + /** + * Required. Type of installment plan, one of {@code fixed_count}, + * {@code bonus}, or {@code revolving}. + */ public Builder setType( ConfirmationTokenCreateParams.PaymentMethodOptions.Card.Installments.Plan.Type type) { @@ -6916,8 +7007,14 @@ public enum Interval implements ApiRequestParams.EnumParam { } public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("bonus") + BONUS("bonus"), + @SerializedName("fixed_count") - FIXED_COUNT("fixed_count"); + FIXED_COUNT("fixed_count"), + + @SerializedName("revolving") + REVOLVING("revolving"); @Getter(onMethod_ = {@Override}) private final String value; diff --git a/src/main/java/com/stripe/param/CreditNoteCreateParams.java b/src/main/java/com/stripe/param/CreditNoteCreateParams.java index ba8b2b660ef..ea0afac7f61 100644 --- a/src/main/java/com/stripe/param/CreditNoteCreateParams.java +++ b/src/main/java/com/stripe/param/CreditNoteCreateParams.java @@ -17,7 +17,7 @@ public class CreditNoteCreateParams extends ApiRequestParams { /** * The integer amount in cents (or local equivalent) representing the total amount of the credit - * note. + * note. One of {@code amount}, {@code lines}, or {@code shipping_cost} must be provided. */ @SerializedName("amount") Long amount; @@ -61,7 +61,10 @@ public class CreditNoteCreateParams extends ApiRequestParams { @SerializedName("invoice") String invoice; - /** Line items that make up the credit note. */ + /** + * Line items that make up the credit note. One of {@code amount}, {@code lines}, or {@code + * shipping_cost} must be provided. + */ @SerializedName("lines") List lines; @@ -105,7 +108,8 @@ public class CreditNoteCreateParams extends ApiRequestParams { /** * When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included - * in the credit note. + * in the credit note. One of {@code amount}, {@code lines}, or {@code shipping_cost} must be + * provided. */ @SerializedName("shipping_cost") ShippingCost shippingCost; @@ -200,7 +204,7 @@ public CreditNoteCreateParams build() { /** * The integer amount in cents (or local equivalent) representing the total amount of the credit - * note. + * note. One of {@code amount}, {@code lines}, or {@code shipping_cost} must be provided. */ public Builder setAmount(Long amount) { this.amount = amount; @@ -406,7 +410,8 @@ public Builder addAllRefund(List elements) { /** * When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included - * in the credit note. + * in the credit note. One of {@code amount}, {@code lines}, or {@code shipping_cost} must be + * provided. */ public Builder setShippingCost(CreditNoteCreateParams.ShippingCost shippingCost) { this.shippingCost = shippingCost; diff --git a/src/main/java/com/stripe/param/CreditNotePreviewLinesListParams.java b/src/main/java/com/stripe/param/CreditNotePreviewLinesListParams.java index efd898e2778..681af744339 100644 --- a/src/main/java/com/stripe/param/CreditNotePreviewLinesListParams.java +++ b/src/main/java/com/stripe/param/CreditNotePreviewLinesListParams.java @@ -17,7 +17,7 @@ public class CreditNotePreviewLinesListParams extends ApiRequestParams { /** * The integer amount in cents (or local equivalent) representing the total amount of the credit - * note. + * note. One of {@code amount}, {@code lines}, or {@code shipping_cost} must be provided. */ @SerializedName("amount") Long amount; @@ -77,7 +77,10 @@ public class CreditNotePreviewLinesListParams extends ApiRequestParams { @SerializedName("limit") Long limit; - /** Line items that make up the credit note. */ + /** + * Line items that make up the credit note. One of {@code amount}, {@code lines}, or {@code + * shipping_cost} must be provided. + */ @SerializedName("lines") List lines; @@ -121,7 +124,8 @@ public class CreditNotePreviewLinesListParams extends ApiRequestParams { /** * When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included - * in the credit note. + * in the credit note. One of {@code amount}, {@code lines}, or {@code shipping_cost} must be + * provided. */ @SerializedName("shipping_cost") ShippingCost shippingCost; @@ -240,7 +244,7 @@ public CreditNotePreviewLinesListParams build() { /** * The integer amount in cents (or local equivalent) representing the total amount of the credit - * note. + * note. One of {@code amount}, {@code lines}, or {@code shipping_cost} must be provided. */ public Builder setAmount(Long amount) { this.amount = amount; @@ -466,7 +470,8 @@ public Builder addAllRefund(List elemen /** * When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included - * in the credit note. + * in the credit note. One of {@code amount}, {@code lines}, or {@code shipping_cost} must be + * provided. */ public Builder setShippingCost(CreditNotePreviewLinesListParams.ShippingCost shippingCost) { this.shippingCost = shippingCost; diff --git a/src/main/java/com/stripe/param/CreditNotePreviewParams.java b/src/main/java/com/stripe/param/CreditNotePreviewParams.java index a4dff4543ea..3c1d564b083 100644 --- a/src/main/java/com/stripe/param/CreditNotePreviewParams.java +++ b/src/main/java/com/stripe/param/CreditNotePreviewParams.java @@ -17,7 +17,7 @@ public class CreditNotePreviewParams extends ApiRequestParams { /** * The integer amount in cents (or local equivalent) representing the total amount of the credit - * note. + * note. One of {@code amount}, {@code lines}, or {@code shipping_cost} must be provided. */ @SerializedName("amount") Long amount; @@ -61,7 +61,10 @@ public class CreditNotePreviewParams extends ApiRequestParams { @SerializedName("invoice") String invoice; - /** Line items that make up the credit note. */ + /** + * Line items that make up the credit note. One of {@code amount}, {@code lines}, or {@code + * shipping_cost} must be provided. + */ @SerializedName("lines") List lines; @@ -105,7 +108,8 @@ public class CreditNotePreviewParams extends ApiRequestParams { /** * When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included - * in the credit note. + * in the credit note. One of {@code amount}, {@code lines}, or {@code shipping_cost} must be + * provided. */ @SerializedName("shipping_cost") ShippingCost shippingCost; @@ -200,7 +204,7 @@ public CreditNotePreviewParams build() { /** * The integer amount in cents (or local equivalent) representing the total amount of the credit - * note. + * note. One of {@code amount}, {@code lines}, or {@code shipping_cost} must be provided. */ public Builder setAmount(Long amount) { this.amount = amount; @@ -406,7 +410,8 @@ public Builder addAllRefund(List elements) { /** * When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included - * in the credit note. + * in the credit note. One of {@code amount}, {@code lines}, or {@code shipping_cost} must be + * provided. */ public Builder setShippingCost(CreditNotePreviewParams.ShippingCost shippingCost) { this.shippingCost = shippingCost; diff --git a/src/main/java/com/stripe/param/CustomerListPaymentMethodsParams.java b/src/main/java/com/stripe/param/CustomerListPaymentMethodsParams.java index 586201f4397..0f3a43861bf 100644 --- a/src/main/java/com/stripe/param/CustomerListPaymentMethodsParams.java +++ b/src/main/java/com/stripe/param/CustomerListPaymentMethodsParams.java @@ -282,6 +282,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("cashapp") CASHAPP("cashapp"), + @SerializedName("crypto") + CRYPTO("crypto"), + @SerializedName("customer_balance") CUSTOMER_BALANCE("customer_balance"), diff --git a/src/main/java/com/stripe/param/CustomerPaymentMethodListParams.java b/src/main/java/com/stripe/param/CustomerPaymentMethodListParams.java index 61d38766405..5cb4ae87970 100644 --- a/src/main/java/com/stripe/param/CustomerPaymentMethodListParams.java +++ b/src/main/java/com/stripe/param/CustomerPaymentMethodListParams.java @@ -282,6 +282,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("cashapp") CASHAPP("cashapp"), + @SerializedName("crypto") + CRYPTO("crypto"), + @SerializedName("customer_balance") CUSTOMER_BALANCE("customer_balance"), diff --git a/src/main/java/com/stripe/param/CustomerSessionCreateParams.java b/src/main/java/com/stripe/param/CustomerSessionCreateParams.java index 54de4139315..315f12ca54c 100644 --- a/src/main/java/com/stripe/param/CustomerSessionCreateParams.java +++ b/src/main/java/com/stripe/param/CustomerSessionCreateParams.java @@ -446,7 +446,7 @@ public static class Features { /** * Determines the max number of saved payment methods for the Payment Element to display. - * This parameter defaults to {@code 3}. + * This parameter defaults to {@code 3}. The maximum redisplay limit is {@code 10}. */ @SerializedName("payment_method_redisplay_limit") Long paymentMethodRedisplayLimit; @@ -626,7 +626,7 @@ public Builder setPaymentMethodRedisplay( /** * Determines the max number of saved payment methods for the Payment Element to display. - * This parameter defaults to {@code 3}. + * This parameter defaults to {@code 3}. The maximum redisplay limit is {@code 10}. */ public Builder setPaymentMethodRedisplayLimit(Long paymentMethodRedisplayLimit) { this.paymentMethodRedisplayLimit = paymentMethodRedisplayLimit; diff --git a/src/main/java/com/stripe/param/InvoiceCreateParams.java b/src/main/java/com/stripe/param/InvoiceCreateParams.java index 09c9697ac56..7dbb7c4332c 100644 --- a/src/main/java/com/stripe/param/InvoiceCreateParams.java +++ b/src/main/java/com/stripe/param/InvoiceCreateParams.java @@ -3048,7 +3048,10 @@ public static class Plan { @SerializedName("interval") Interval interval; - /** Required. Type of installment plan, one of {@code fixed_count}. */ + /** + * Required. Type of installment plan, one of {@code fixed_count}, + * {@code bonus}, or {@code revolving}. + */ @SerializedName("type") Type type; @@ -3133,7 +3136,8 @@ public Builder setInterval( } /** - * Required. Type of installment plan, one of {@code fixed_count}. + * Required. Type of installment plan, one of {@code fixed_count}, + * {@code bonus}, or {@code revolving}. */ public Builder setType( InvoiceCreateParams.PaymentSettings.PaymentMethodOptions.Card.Installments.Plan @@ -3157,8 +3161,14 @@ public enum Interval implements ApiRequestParams.EnumParam { } public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("bonus") + BONUS("bonus"), + @SerializedName("fixed_count") - FIXED_COUNT("fixed_count"); + FIXED_COUNT("fixed_count"), + + @SerializedName("revolving") + REVOLVING("revolving"); @Getter(onMethod_ = {@Override}) private final String value; @@ -4208,6 +4218,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("cashapp") CASHAPP("cashapp"), + @SerializedName("crypto") + CRYPTO("crypto"), + @SerializedName("custom") CUSTOM("custom"), diff --git a/src/main/java/com/stripe/param/InvoiceCreatePreviewParams.java b/src/main/java/com/stripe/param/InvoiceCreatePreviewParams.java index d99f9cc0569..08b765a4b31 100644 --- a/src/main/java/com/stripe/param/InvoiceCreatePreviewParams.java +++ b/src/main/java/com/stripe/param/InvoiceCreatePreviewParams.java @@ -7837,6 +7837,93 @@ public enum SetScheduleEnd implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BillingMode { + /** + * 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. */ + @SerializedName("type") + Type type; + + private BillingMode(Map extraParams, Type type) { + this.extraParams = extraParams; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public InvoiceCreatePreviewParams.ScheduleDetails.BillingMode build() { + return new InvoiceCreatePreviewParams.ScheduleDetails.BillingMode( + this.extraParams, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link InvoiceCreatePreviewParams.ScheduleDetails.BillingMode#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link InvoiceCreatePreviewParams.ScheduleDetails.BillingMode#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. */ + public Builder setType(InvoiceCreatePreviewParams.ScheduleDetails.BillingMode.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("classic") + CLASSIC("classic"), + + @SerializedName("flexible") + FLEXIBLE("flexible"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Phase { @@ -12668,21 +12755,6 @@ public enum BillingBehavior implements ApiRequestParams.EnumParam { } } - public enum BillingMode implements ApiRequestParams.EnumParam { - @SerializedName("classic") - CLASSIC("classic"), - - @SerializedName("flexible") - FLEXIBLE("flexible"); - - @Getter(onMethod_ = {@Override}) - private final String value; - - BillingMode(String value) { - this.value = value; - } - } - public enum EndBehavior implements ApiRequestParams.EnumParam { @SerializedName("cancel") CANCEL("cancel"), @@ -12745,8 +12817,7 @@ public static class SubscriptionDetails { /** * Indicate whether this subscription should cancel at the end of the current period ({@code - * current_period_end}). Defaults to {@code false}. This param will be removed in a future API - * version. Please use {@code cancel_at} instead. + * current_period_end}). Defaults to {@code false}. */ @SerializedName("cancel_at_period_end") Boolean cancelAtPeriodEnd; @@ -12971,8 +13042,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}. This param will be removed in a future API - * version. Please use {@code cancel_at} instead. + * current_period_end}). Defaults to {@code false}. */ public Builder setCancelAtPeriodEnd(Boolean cancelAtPeriodEnd) { this.cancelAtPeriodEnd = cancelAtPeriodEnd; @@ -13159,6 +13229,94 @@ public Builder setTrialEnd(Long trialEnd) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BillingMode { + /** + * 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. */ + @SerializedName("type") + Type type; + + private BillingMode(Map extraParams, Type type) { + this.extraParams = extraParams; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public InvoiceCreatePreviewParams.SubscriptionDetails.BillingMode build() { + return new InvoiceCreatePreviewParams.SubscriptionDetails.BillingMode( + this.extraParams, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link InvoiceCreatePreviewParams.SubscriptionDetails.BillingMode#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link InvoiceCreatePreviewParams.SubscriptionDetails.BillingMode#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. */ + public Builder setType( + InvoiceCreatePreviewParams.SubscriptionDetails.BillingMode.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("classic") + CLASSIC("classic"), + + @SerializedName("flexible") + FLEXIBLE("flexible"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Item { @@ -14477,21 +14635,6 @@ public enum BillingCycleAnchor implements ApiRequestParams.EnumParam { } } - public enum BillingMode implements ApiRequestParams.EnumParam { - @SerializedName("classic") - CLASSIC("classic"), - - @SerializedName("flexible") - FLEXIBLE("flexible"); - - @Getter(onMethod_ = {@Override}) - private final String value; - - BillingMode(String value) { - this.value = value; - } - } - public enum CancelAt implements ApiRequestParams.EnumParam { @SerializedName("max_period_end") MAX_PERIOD_END("max_period_end"), diff --git a/src/main/java/com/stripe/param/InvoiceUpdateParams.java b/src/main/java/com/stripe/param/InvoiceUpdateParams.java index 95e615f6efc..dc77d7ba1d4 100644 --- a/src/main/java/com/stripe/param/InvoiceUpdateParams.java +++ b/src/main/java/com/stripe/param/InvoiceUpdateParams.java @@ -3042,7 +3042,10 @@ public static class Plan { @SerializedName("interval") Interval interval; - /** Required. Type of installment plan, one of {@code fixed_count}. */ + /** + * Required. Type of installment plan, one of {@code fixed_count}, + * {@code bonus}, or {@code revolving}. + */ @SerializedName("type") Type type; @@ -3127,7 +3130,8 @@ public Builder setInterval( } /** - * Required. Type of installment plan, one of {@code fixed_count}. + * Required. Type of installment plan, one of {@code fixed_count}, + * {@code bonus}, or {@code revolving}. */ public Builder setType( InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Card.Installments.Plan @@ -3151,8 +3155,14 @@ public enum Interval implements ApiRequestParams.EnumParam { } public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("bonus") + BONUS("bonus"), + @SerializedName("fixed_count") - FIXED_COUNT("fixed_count"); + FIXED_COUNT("fixed_count"), + + @SerializedName("revolving") + REVOLVING("revolving"); @Getter(onMethod_ = {@Override}) private final String value; @@ -4237,6 +4247,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("cashapp") CASHAPP("cashapp"), + @SerializedName("crypto") + CRYPTO("crypto"), + @SerializedName("custom") CUSTOM("custom"), diff --git a/src/main/java/com/stripe/param/OrderCreateParams.java b/src/main/java/com/stripe/param/OrderCreateParams.java index 8dcec64fe1c..b1992b366be 100644 --- a/src/main/java/com/stripe/param/OrderCreateParams.java +++ b/src/main/java/com/stripe/param/OrderCreateParams.java @@ -4509,6 +4509,10 @@ public static class Klarna { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** On-demand details if setting up or charging an on-demand payment. */ + @SerializedName("on_demand") + OnDemand onDemand; + /** * Preferred language of the Klarna authorization page that the customer is redirected to. */ @@ -4542,15 +4546,23 @@ public static class Klarna { @SerializedName("setup_future_usage") SetupFutureUsage setupFutureUsage; + /** Subscription details if setting up or charging a subscription. */ + @SerializedName("subscriptions") + Object subscriptions; + private Klarna( ApiRequestParams.EnumParam captureMethod, Map extraParams, + OnDemand onDemand, PreferredLocale preferredLocale, - SetupFutureUsage setupFutureUsage) { + SetupFutureUsage setupFutureUsage, + Object subscriptions) { this.captureMethod = captureMethod; this.extraParams = extraParams; + this.onDemand = onDemand; this.preferredLocale = preferredLocale; this.setupFutureUsage = setupFutureUsage; + this.subscriptions = subscriptions; } public static Builder builder() { @@ -4562,17 +4574,23 @@ public static class Builder { private Map extraParams; + private OnDemand onDemand; + private PreferredLocale preferredLocale; private SetupFutureUsage setupFutureUsage; + private Object subscriptions; + /** Finalize and obtain parameter instance from this builder. */ public OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna build() { return new OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna( this.captureMethod, this.extraParams, + this.onDemand, this.preferredLocale, - this.setupFutureUsage); + this.setupFutureUsage, + this.subscriptions); } /** @@ -4639,6 +4657,13 @@ public Builder putAllExtraParam(Map map) { return this; } + /** On-demand details if setting up or charging an on-demand payment. */ + public Builder setOnDemand( + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.OnDemand onDemand) { + this.onDemand = onDemand; + return this; + } + /** * Preferred language of the Klarna authorization page that the customer is redirected * to. @@ -4680,6 +4705,527 @@ public Builder setSetupFutureUsage( this.setupFutureUsage = setupFutureUsage; return this; } + + /** + * Add an element to `subscriptions` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna#subscriptions} for the + * field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addSubscription( + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.Subscription + element) { + if (this.subscriptions == null || this.subscriptions instanceof EmptyParam) { + this.subscriptions = + new ArrayList< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .Subscription>(); + } + ((List) + this.subscriptions) + .add(element); + return this; + } + + /** + * Add all elements to `subscriptions` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna#subscriptions} for the + * field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllSubscription( + List + elements) { + if (this.subscriptions == null || this.subscriptions instanceof EmptyParam) { + this.subscriptions = + new ArrayList< + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .Subscription>(); + } + ((List) + this.subscriptions) + .addAll(elements); + return this; + } + + /** Subscription details if setting up or charging a subscription. */ + public Builder setSubscriptions(EmptyParam subscriptions) { + this.subscriptions = subscriptions; + return this; + } + + /** Subscription details if setting up or charging a subscription. */ + public Builder setSubscriptions( + List + subscriptions) { + this.subscriptions = subscriptions; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class OnDemand { + /** + * Your average amount value. You can use a value across your customer base, or segment + * based on customer type, country, etc. + */ + @SerializedName("average_amount") + Long averageAmount; + + /** + * 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 maximum value you may charge a customer per purchase. You can use a value across + * your customer base, or segment based on customer type, country, etc. + */ + @SerializedName("maximum_amount") + Long maximumAmount; + + /** + * The lowest or minimum value you may charge a customer per purchase. You can use a + * value across your customer base, or segment based on customer type, country, etc. + */ + @SerializedName("minimum_amount") + Long minimumAmount; + + /** Interval at which the customer is making purchases. */ + @SerializedName("purchase_interval") + PurchaseInterval purchaseInterval; + + /** The number of {@code purchase_interval} between charges. */ + @SerializedName("purchase_interval_count") + Long purchaseIntervalCount; + + private OnDemand( + Long averageAmount, + Map extraParams, + Long maximumAmount, + Long minimumAmount, + PurchaseInterval purchaseInterval, + Long purchaseIntervalCount) { + this.averageAmount = averageAmount; + this.extraParams = extraParams; + this.maximumAmount = maximumAmount; + this.minimumAmount = minimumAmount; + this.purchaseInterval = purchaseInterval; + this.purchaseIntervalCount = purchaseIntervalCount; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long averageAmount; + + private Map extraParams; + + private Long maximumAmount; + + private Long minimumAmount; + + private PurchaseInterval purchaseInterval; + + private Long purchaseIntervalCount; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.OnDemand + build() { + return new OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.OnDemand( + this.averageAmount, + this.extraParams, + this.maximumAmount, + this.minimumAmount, + this.purchaseInterval, + this.purchaseIntervalCount); + } + + /** + * Your average amount value. You can use a value across your customer base, or + * segment based on customer type, country, etc. + */ + public Builder setAverageAmount(Long averageAmount) { + this.averageAmount = averageAmount; + 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 + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.OnDemand#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 + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.OnDemand#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 maximum value you may charge a customer per purchase. You can use a value + * across your customer base, or segment based on customer type, country, etc. + */ + public Builder setMaximumAmount(Long maximumAmount) { + this.maximumAmount = maximumAmount; + return this; + } + + /** + * The lowest or minimum value you may charge a customer per purchase. You can use a + * value across your customer base, or segment based on customer type, country, etc. + */ + public Builder setMinimumAmount(Long minimumAmount) { + this.minimumAmount = minimumAmount; + return this; + } + + /** Interval at which the customer is making purchases. */ + public Builder setPurchaseInterval( + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.OnDemand + .PurchaseInterval + purchaseInterval) { + this.purchaseInterval = purchaseInterval; + return this; + } + + /** The number of {@code purchase_interval} between charges. */ + public Builder setPurchaseIntervalCount(Long purchaseIntervalCount) { + this.purchaseIntervalCount = purchaseIntervalCount; + return this; + } + } + + public enum PurchaseInterval implements ApiRequestParams.EnumParam { + @SerializedName("day") + DAY("day"), + + @SerializedName("month") + MONTH("month"), + + @SerializedName("week") + WEEK("week"), + + @SerializedName("year") + YEAR("year"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PurchaseInterval(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Subscription { + /** + * 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. Unit of time between subscription charges. */ + @SerializedName("interval") + Interval interval; + + /** + * The number of intervals (specified in the {@code interval} attribute) between + * subscription charges. For example, {@code interval=month} and {@code + * interval_count=3} charges every 3 months. + */ + @SerializedName("interval_count") + Long intervalCount; + + /** Name for subscription. */ + @SerializedName("name") + String name; + + /** Describes the upcoming charge for this subscription. */ + @SerializedName("next_billing") + NextBilling nextBilling; + + /** + * Required. A non-customer-facing reference to correlate subscription + * charges in the Klarna app. Use a value that persists across subscription charges. + */ + @SerializedName("reference") + String reference; + + private Subscription( + Map extraParams, + Interval interval, + Long intervalCount, + String name, + NextBilling nextBilling, + String reference) { + this.extraParams = extraParams; + this.interval = interval; + this.intervalCount = intervalCount; + this.name = name; + this.nextBilling = nextBilling; + this.reference = reference; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Interval interval; + + private Long intervalCount; + + private String name; + + private NextBilling nextBilling; + + private String reference; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.Subscription + build() { + return new OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .Subscription( + this.extraParams, + this.interval, + this.intervalCount, + this.name, + this.nextBilling, + this.reference); + } + + /** + * 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 + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.Subscription#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 + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.Subscription#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. Unit of time between subscription charges. */ + public Builder setInterval( + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.Subscription + .Interval + interval) { + this.interval = interval; + return this; + } + + /** + * The number of intervals (specified in the {@code interval} attribute) between + * subscription charges. For example, {@code interval=month} and {@code + * interval_count=3} charges every 3 months. + */ + public Builder setIntervalCount(Long intervalCount) { + this.intervalCount = intervalCount; + return this; + } + + /** Name for subscription. */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** Describes the upcoming charge for this subscription. */ + public Builder setNextBilling( + OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.Subscription + .NextBilling + nextBilling) { + this.nextBilling = nextBilling; + return this; + } + + /** + * Required. A non-customer-facing reference to correlate + * subscription charges in the Klarna app. Use a value that persists across + * subscription charges. + */ + public Builder setReference(String reference) { + this.reference = reference; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class NextBilling { + /** Required. The amount of the next charge for the subscription. */ + @SerializedName("amount") + Long amount; + + /** + * Required. The date of the next charge for the subscription in + * YYYY-MM-DD format. + */ + @SerializedName("date") + String date; + + /** + * 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 NextBilling(Long amount, String date, Map extraParams) { + this.amount = amount; + this.date = date; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private String date; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.Subscription + .NextBilling + build() { + return new OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna + .Subscription.NextBilling(this.amount, this.date, this.extraParams); + } + + /** + * Required. The amount of the next charge for the subscription. + */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** + * Required. The date of the next charge for the subscription in + * YYYY-MM-DD format. + */ + public Builder setDate(String date) { + this.date = date; + 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 + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.Subscription.NextBilling#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 + * OrderCreateParams.Payment.Settings.PaymentMethodOptions.Klarna.Subscription.NextBilling#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + public enum Interval implements ApiRequestParams.EnumParam { + @SerializedName("day") + DAY("day"), + + @SerializedName("month") + MONTH("month"), + + @SerializedName("week") + WEEK("week"), + + @SerializedName("year") + YEAR("year"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Interval(String value) { + this.value = value; + } + } } public enum CaptureMethod implements ApiRequestParams.EnumParam { @@ -4843,7 +5389,13 @@ public enum PreferredLocale implements ApiRequestParams.EnumParam { public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @SerializedName("none") - NONE("none"); + NONE("none"), + + @SerializedName("off_session") + OFF_SESSION("off_session"), + + @SerializedName("on_session") + ON_SESSION("on_session"); @Getter(onMethod_ = {@Override}) private final String value; diff --git a/src/main/java/com/stripe/param/OrderUpdateParams.java b/src/main/java/com/stripe/param/OrderUpdateParams.java index c13ece09e37..8c027218dd3 100644 --- a/src/main/java/com/stripe/param/OrderUpdateParams.java +++ b/src/main/java/com/stripe/param/OrderUpdateParams.java @@ -4981,6 +4981,10 @@ public static class Klarna { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** On-demand details if setting up or charging an on-demand payment. */ + @SerializedName("on_demand") + OnDemand onDemand; + /** * Preferred language of the Klarna authorization page that the customer is redirected to. */ @@ -5014,15 +5018,23 @@ public static class Klarna { @SerializedName("setup_future_usage") SetupFutureUsage setupFutureUsage; + /** Subscription details if setting up or charging a subscription. */ + @SerializedName("subscriptions") + Object subscriptions; + private Klarna( ApiRequestParams.EnumParam captureMethod, Map extraParams, + OnDemand onDemand, PreferredLocale preferredLocale, - SetupFutureUsage setupFutureUsage) { + SetupFutureUsage setupFutureUsage, + Object subscriptions) { this.captureMethod = captureMethod; this.extraParams = extraParams; + this.onDemand = onDemand; this.preferredLocale = preferredLocale; this.setupFutureUsage = setupFutureUsage; + this.subscriptions = subscriptions; } public static Builder builder() { @@ -5034,17 +5046,23 @@ public static class Builder { private Map extraParams; + private OnDemand onDemand; + private PreferredLocale preferredLocale; private SetupFutureUsage setupFutureUsage; + private Object subscriptions; + /** Finalize and obtain parameter instance from this builder. */ public OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna build() { return new OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna( this.captureMethod, this.extraParams, + this.onDemand, this.preferredLocale, - this.setupFutureUsage); + this.setupFutureUsage, + this.subscriptions); } /** @@ -5111,6 +5129,13 @@ public Builder putAllExtraParam(Map map) { return this; } + /** On-demand details if setting up or charging an on-demand payment. */ + public Builder setOnDemand( + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.OnDemand onDemand) { + this.onDemand = onDemand; + return this; + } + /** * Preferred language of the Klarna authorization page that the customer is redirected * to. @@ -5152,6 +5177,552 @@ public Builder setSetupFutureUsage( this.setupFutureUsage = setupFutureUsage; return this; } + + /** + * Add an element to `subscriptions` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna#subscriptions} for the + * field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addSubscription( + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.Subscription + element) { + if (this.subscriptions == null || this.subscriptions instanceof EmptyParam) { + this.subscriptions = + new ArrayList< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .Subscription>(); + } + ((List) + this.subscriptions) + .add(element); + return this; + } + + /** + * Add all elements to `subscriptions` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna#subscriptions} for the + * field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllSubscription( + List + elements) { + if (this.subscriptions == null || this.subscriptions instanceof EmptyParam) { + this.subscriptions = + new ArrayList< + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .Subscription>(); + } + ((List) + this.subscriptions) + .addAll(elements); + return this; + } + + /** Subscription details if setting up or charging a subscription. */ + public Builder setSubscriptions(EmptyParam subscriptions) { + this.subscriptions = subscriptions; + return this; + } + + /** Subscription details if setting up or charging a subscription. */ + public Builder setSubscriptions( + List + subscriptions) { + this.subscriptions = subscriptions; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class OnDemand { + /** + * Your average amount value. You can use a value across your customer base, or segment + * based on customer type, country, etc. + */ + @SerializedName("average_amount") + Long averageAmount; + + /** + * 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 maximum value you may charge a customer per purchase. You can use a value across + * your customer base, or segment based on customer type, country, etc. + */ + @SerializedName("maximum_amount") + Long maximumAmount; + + /** + * The lowest or minimum value you may charge a customer per purchase. You can use a + * value across your customer base, or segment based on customer type, country, etc. + */ + @SerializedName("minimum_amount") + Long minimumAmount; + + /** Interval at which the customer is making purchases. */ + @SerializedName("purchase_interval") + PurchaseInterval purchaseInterval; + + /** The number of {@code purchase_interval} between charges. */ + @SerializedName("purchase_interval_count") + Long purchaseIntervalCount; + + private OnDemand( + Long averageAmount, + Map extraParams, + Long maximumAmount, + Long minimumAmount, + PurchaseInterval purchaseInterval, + Long purchaseIntervalCount) { + this.averageAmount = averageAmount; + this.extraParams = extraParams; + this.maximumAmount = maximumAmount; + this.minimumAmount = minimumAmount; + this.purchaseInterval = purchaseInterval; + this.purchaseIntervalCount = purchaseIntervalCount; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long averageAmount; + + private Map extraParams; + + private Long maximumAmount; + + private Long minimumAmount; + + private PurchaseInterval purchaseInterval; + + private Long purchaseIntervalCount; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.OnDemand + build() { + return new OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.OnDemand( + this.averageAmount, + this.extraParams, + this.maximumAmount, + this.minimumAmount, + this.purchaseInterval, + this.purchaseIntervalCount); + } + + /** + * Your average amount value. You can use a value across your customer base, or + * segment based on customer type, country, etc. + */ + public Builder setAverageAmount(Long averageAmount) { + this.averageAmount = averageAmount; + 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 + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.OnDemand#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 + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.OnDemand#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 maximum value you may charge a customer per purchase. You can use a value + * across your customer base, or segment based on customer type, country, etc. + */ + public Builder setMaximumAmount(Long maximumAmount) { + this.maximumAmount = maximumAmount; + return this; + } + + /** + * The lowest or minimum value you may charge a customer per purchase. You can use a + * value across your customer base, or segment based on customer type, country, etc. + */ + public Builder setMinimumAmount(Long minimumAmount) { + this.minimumAmount = minimumAmount; + return this; + } + + /** Interval at which the customer is making purchases. */ + public Builder setPurchaseInterval( + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.OnDemand + .PurchaseInterval + purchaseInterval) { + this.purchaseInterval = purchaseInterval; + return this; + } + + /** The number of {@code purchase_interval} between charges. */ + public Builder setPurchaseIntervalCount(Long purchaseIntervalCount) { + this.purchaseIntervalCount = purchaseIntervalCount; + return this; + } + } + + public enum PurchaseInterval implements ApiRequestParams.EnumParam { + @SerializedName("day") + DAY("day"), + + @SerializedName("month") + MONTH("month"), + + @SerializedName("week") + WEEK("week"), + + @SerializedName("year") + YEAR("year"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PurchaseInterval(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Subscription { + /** + * 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. Unit of time between subscription charges. */ + @SerializedName("interval") + Interval interval; + + /** + * The number of intervals (specified in the {@code interval} attribute) between + * subscription charges. For example, {@code interval=month} and {@code + * interval_count=3} charges every 3 months. + */ + @SerializedName("interval_count") + Long intervalCount; + + /** Name for subscription. */ + @SerializedName("name") + Object name; + + /** Describes the upcoming charge for this subscription. */ + @SerializedName("next_billing") + NextBilling nextBilling; + + /** + * Required. A non-customer-facing reference to correlate subscription + * charges in the Klarna app. Use a value that persists across subscription charges. + */ + @SerializedName("reference") + Object reference; + + private Subscription( + Map extraParams, + Interval interval, + Long intervalCount, + Object name, + NextBilling nextBilling, + Object reference) { + this.extraParams = extraParams; + this.interval = interval; + this.intervalCount = intervalCount; + this.name = name; + this.nextBilling = nextBilling; + this.reference = reference; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Interval interval; + + private Long intervalCount; + + private Object name; + + private NextBilling nextBilling; + + private Object reference; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.Subscription + build() { + return new OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .Subscription( + this.extraParams, + this.interval, + this.intervalCount, + this.name, + this.nextBilling, + this.reference); + } + + /** + * 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 + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.Subscription#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 + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.Subscription#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. Unit of time between subscription charges. */ + public Builder setInterval( + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.Subscription + .Interval + interval) { + this.interval = interval; + return this; + } + + /** + * The number of intervals (specified in the {@code interval} attribute) between + * subscription charges. For example, {@code interval=month} and {@code + * interval_count=3} charges every 3 months. + */ + public Builder setIntervalCount(Long intervalCount) { + this.intervalCount = intervalCount; + return this; + } + + /** Name for subscription. */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** Name for subscription. */ + public Builder setName(EmptyParam name) { + this.name = name; + return this; + } + + /** Describes the upcoming charge for this subscription. */ + public Builder setNextBilling( + OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.Subscription + .NextBilling + nextBilling) { + this.nextBilling = nextBilling; + return this; + } + + /** + * Required. A non-customer-facing reference to correlate + * subscription charges in the Klarna app. Use a value that persists across + * subscription charges. + */ + public Builder setReference(String reference) { + this.reference = reference; + return this; + } + + /** + * Required. A non-customer-facing reference to correlate + * subscription charges in the Klarna app. Use a value that persists across + * subscription charges. + */ + public Builder setReference(EmptyParam reference) { + this.reference = reference; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class NextBilling { + /** Required. The amount of the next charge for the subscription. */ + @SerializedName("amount") + Long amount; + + /** + * Required. The date of the next charge for the subscription in + * YYYY-MM-DD format. + */ + @SerializedName("date") + Object date; + + /** + * 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 NextBilling(Long amount, Object date, Map extraParams) { + this.amount = amount; + this.date = date; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private Object date; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.Subscription + .NextBilling + build() { + return new OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna + .Subscription.NextBilling(this.amount, this.date, this.extraParams); + } + + /** + * Required. The amount of the next charge for the subscription. + */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** + * Required. The date of the next charge for the subscription in + * YYYY-MM-DD format. + */ + public Builder setDate(String date) { + this.date = date; + return this; + } + + /** + * Required. The date of the next charge for the subscription in + * YYYY-MM-DD format. + */ + public Builder setDate(EmptyParam date) { + this.date = date; + 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 + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.Subscription.NextBilling#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 + * OrderUpdateParams.Payment.Settings.PaymentMethodOptions.Klarna.Subscription.NextBilling#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + public enum Interval implements ApiRequestParams.EnumParam { + @SerializedName("day") + DAY("day"), + + @SerializedName("month") + MONTH("month"), + + @SerializedName("week") + WEEK("week"), + + @SerializedName("year") + YEAR("year"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Interval(String value) { + this.value = value; + } + } } public enum CaptureMethod implements ApiRequestParams.EnumParam { @@ -5315,7 +5886,13 @@ public enum PreferredLocale implements ApiRequestParams.EnumParam { public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @SerializedName("none") - NONE("none"); + NONE("none"), + + @SerializedName("off_session") + OFF_SESSION("off_session"), + + @SerializedName("on_session") + ON_SESSION("on_session"); @Getter(onMethod_ = {@Override}) private final String value; diff --git a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java index 7c4a1070603..47692d0ff6e 100644 --- a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java @@ -118,7 +118,9 @@ public class PaymentIntentConfirmParams extends ApiRequestParams { /** * 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. + * href="https://dashboard.stripe.com/settings/payment_methods">Stripe Dashboard. A list of + * valid payment method types can be found here. */ @SerializedName("payment_method_types") List paymentMethodTypes; @@ -5731,6 +5733,13 @@ public static class PaymentMethodData { @SerializedName("cashapp") Cashapp cashapp; + /** + * If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment + * method. + */ + @SerializedName("crypto") + Crypto crypto; + /** * If this is a {@code customer_balance} PaymentMethod, this hash contains details about the * CustomerBalance payment method. @@ -6069,6 +6078,7 @@ private PaymentMethodData( Blik blik, Boleto boleto, Cashapp cashapp, + Crypto crypto, CustomerBalance customerBalance, Eps eps, Map extraParams, @@ -6130,6 +6140,7 @@ private PaymentMethodData( this.blik = blik; this.boleto = boleto; this.cashapp = cashapp; + this.crypto = crypto; this.customerBalance = customerBalance; this.eps = eps; this.extraParams = extraParams; @@ -6213,6 +6224,8 @@ public static class Builder { private Cashapp cashapp; + private Crypto crypto; + private CustomerBalance customerBalance; private Eps eps; @@ -6323,6 +6336,7 @@ public PaymentIntentConfirmParams.PaymentMethodData build() { this.blik, this.boleto, this.cashapp, + this.crypto, this.customerBalance, this.eps, this.extraParams, @@ -6515,6 +6529,15 @@ public Builder setCashapp(PaymentIntentConfirmParams.PaymentMethodData.Cashapp c return this; } + /** + * If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment + * method. + */ + public Builder setCrypto(PaymentIntentConfirmParams.PaymentMethodData.Crypto crypto) { + this.crypto = crypto; + return this; + } + /** * If this is a {@code customer_balance} PaymentMethod, this hash contains details about the * CustomerBalance payment method. @@ -8175,6 +8198,64 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Crypto { + /** + * 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 Crypto(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodData.Crypto build() { + return new PaymentIntentConfirmParams.PaymentMethodData.Crypto(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Crypto#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Crypto#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 CustomerBalance { @@ -8931,6 +9012,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("bunq") BUNQ("bunq"), + @SerializedName("buut") + BUUT("buut"), + @SerializedName("handelsbanken") HANDELSBANKEN("handelsbanken"), @@ -11815,6 +11899,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("cashapp") CASHAPP("cashapp"), + @SerializedName("crypto") + CRYPTO("crypto"), + @SerializedName("customer_balance") CUSTOMER_BALANCE("customer_balance"), @@ -12052,6 +12139,13 @@ public static class PaymentMethodOptions { @SerializedName("cashapp") Object cashapp; + /** + * If this is a {@code crypto} PaymentMethod, this sub-hash contains details about the Crypto + * payment method options. + */ + @SerializedName("crypto") + Object crypto; + /** * If this is a {@code customer balance} PaymentMethod, this sub-hash contains details about the * customer balance payment method options. @@ -12371,6 +12465,7 @@ private PaymentMethodOptions( Object card, Object cardPresent, Object cashapp, + Object crypto, Object customerBalance, Object eps, Map extraParams, @@ -12429,6 +12524,7 @@ private PaymentMethodOptions( this.card = card; this.cardPresent = cardPresent; this.cashapp = cashapp; + this.crypto = crypto; this.customerBalance = customerBalance; this.eps = eps; this.extraParams = extraParams; @@ -12509,6 +12605,8 @@ public static class Builder { private Object cashapp; + private Object crypto; + private Object customerBalance; private Object eps; @@ -12613,6 +12711,7 @@ public PaymentIntentConfirmParams.PaymentMethodOptions build() { this.card, this.cardPresent, this.cashapp, + this.crypto, this.customerBalance, this.eps, this.extraParams, @@ -12929,6 +13028,24 @@ public Builder setCashapp(EmptyParam cashapp) { return this; } + /** + * If this is a {@code crypto} PaymentMethod, this sub-hash contains details about the Crypto + * payment method options. + */ + public Builder setCrypto(PaymentIntentConfirmParams.PaymentMethodOptions.Crypto crypto) { + this.crypto = crypto; + return this; + } + + /** + * If this is a {@code crypto} PaymentMethod, this sub-hash contains details about the Crypto + * payment method options. + */ + public Builder setCrypto(EmptyParam crypto) { + this.crypto = crypto; + return this; + } + /** * If this is a {@code customer balance} PaymentMethod, this sub-hash contains details about * the customer balance payment method options. @@ -17049,7 +17166,10 @@ public static class Plan { @SerializedName("interval") Interval interval; - /** Required. Type of installment plan, one of {@code fixed_count}. */ + /** + * Required. Type of installment plan, one of {@code fixed_count}, {@code + * bonus}, or {@code revolving}. + */ @SerializedName("type") Type type; @@ -17130,7 +17250,10 @@ public Builder setInterval( return this; } - /** Required. Type of installment plan, one of {@code fixed_count}. */ + /** + * Required. Type of installment plan, one of {@code fixed_count}, + * {@code bonus}, or {@code revolving}. + */ public Builder setType( PaymentIntentConfirmParams.PaymentMethodOptions.Card.Installments.Plan.Type type) { this.type = type; @@ -17151,8 +17274,14 @@ public enum Interval implements ApiRequestParams.EnumParam { } public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("bonus") + BONUS("bonus"), + @SerializedName("fixed_count") - FIXED_COUNT("fixed_count"); + FIXED_COUNT("fixed_count"), + + @SerializedName("revolving") + REVOLVING("revolving"); @Getter(onMethod_ = {@Override}) private final String value; @@ -18943,6 +19072,137 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Crypto { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

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

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentConfirmParams.PaymentMethodOptions.Crypto.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class CustomerBalance { @@ -19951,7 +20211,10 @@ public Builder setSetupFutureUsage( public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @SerializedName("none") - NONE("none"); + NONE("none"), + + @SerializedName("off_session") + OFF_SESSION("off_session"); @Getter(onMethod_ = {@Override}) private final String value; @@ -20730,6 +20993,10 @@ public static class Klarna { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** On-demand details if setting up or charging an on-demand payment. */ + @SerializedName("on_demand") + OnDemand onDemand; + /** Preferred language of the Klarna authorization page that the customer is redirected to. */ @SerializedName("preferred_locale") PreferredLocale preferredLocale; @@ -20760,15 +21027,23 @@ public static class Klarna { @SerializedName("setup_future_usage") SetupFutureUsage setupFutureUsage; + /** Subscription details if setting up or charging a subscription. */ + @SerializedName("subscriptions") + Object subscriptions; + private Klarna( ApiRequestParams.EnumParam captureMethod, Map extraParams, + OnDemand onDemand, PreferredLocale preferredLocale, - SetupFutureUsage setupFutureUsage) { + SetupFutureUsage setupFutureUsage, + Object subscriptions) { this.captureMethod = captureMethod; this.extraParams = extraParams; + this.onDemand = onDemand; this.preferredLocale = preferredLocale; this.setupFutureUsage = setupFutureUsage; + this.subscriptions = subscriptions; } public static Builder builder() { @@ -20780,14 +21055,23 @@ public static class Builder { private Map extraParams; + private OnDemand onDemand; + private PreferredLocale preferredLocale; private SetupFutureUsage setupFutureUsage; + private Object subscriptions; + /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentConfirmParams.PaymentMethodOptions.Klarna build() { return new PaymentIntentConfirmParams.PaymentMethodOptions.Klarna( - this.captureMethod, this.extraParams, this.preferredLocale, this.setupFutureUsage); + this.captureMethod, + this.extraParams, + this.onDemand, + this.preferredLocale, + this.setupFutureUsage, + this.subscriptions); } /** @@ -20849,6 +21133,13 @@ public Builder putAllExtraParam(Map map) { return this; } + /** On-demand details if setting up or charging an on-demand payment. */ + public Builder setOnDemand( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.OnDemand onDemand) { + this.onDemand = onDemand; + return this; + } + /** * Preferred language of the Klarna authorization page that the customer is redirected to. */ @@ -20889,17 +21180,522 @@ public Builder setSetupFutureUsage( this.setupFutureUsage = setupFutureUsage; return this; } - } - public enum CaptureMethod implements ApiRequestParams.EnumParam { - @SerializedName("manual") - MANUAL("manual"); + /** + * Add an element to `subscriptions` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna#subscriptions} for the field + * documentation. + */ + @SuppressWarnings("unchecked") + public Builder addSubscription( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.Subscription element) { + if (this.subscriptions == null || this.subscriptions instanceof EmptyParam) { + this.subscriptions = + new ArrayList< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.Subscription>(); + } + ((List) + this.subscriptions) + .add(element); + return this; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** + * Add all elements to `subscriptions` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Klarna#subscriptions} for the + * field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllSubscription( + List elements) { + if (this.subscriptions == null || this.subscriptions instanceof EmptyParam) { + this.subscriptions = + new ArrayList< + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.Subscription>(); + } + ((List) + this.subscriptions) + .addAll(elements); + return this; + } - CaptureMethod(String value) { - this.value = value; + /** Subscription details if setting up or charging a subscription. */ + public Builder setSubscriptions(EmptyParam subscriptions) { + this.subscriptions = subscriptions; + return this; + } + + /** Subscription details if setting up or charging a subscription. */ + public Builder setSubscriptions( + List + subscriptions) { + this.subscriptions = subscriptions; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class OnDemand { + /** + * Your average amount value. You can use a value across your customer base, or segment + * based on customer type, country, etc. + */ + @SerializedName("average_amount") + Long averageAmount; + + /** + * 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 maximum value you may charge a customer per purchase. You can use a value across your + * customer base, or segment based on customer type, country, etc. + */ + @SerializedName("maximum_amount") + Long maximumAmount; + + /** + * The lowest or minimum value you may charge a customer per purchase. You can use a value + * across your customer base, or segment based on customer type, country, etc. + */ + @SerializedName("minimum_amount") + Long minimumAmount; + + /** Interval at which the customer is making purchases. */ + @SerializedName("purchase_interval") + PurchaseInterval purchaseInterval; + + /** The number of {@code purchase_interval} between charges. */ + @SerializedName("purchase_interval_count") + Long purchaseIntervalCount; + + private OnDemand( + Long averageAmount, + Map extraParams, + Long maximumAmount, + Long minimumAmount, + PurchaseInterval purchaseInterval, + Long purchaseIntervalCount) { + this.averageAmount = averageAmount; + this.extraParams = extraParams; + this.maximumAmount = maximumAmount; + this.minimumAmount = minimumAmount; + this.purchaseInterval = purchaseInterval; + this.purchaseIntervalCount = purchaseIntervalCount; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long averageAmount; + + private Map extraParams; + + private Long maximumAmount; + + private Long minimumAmount; + + private PurchaseInterval purchaseInterval; + + private Long purchaseIntervalCount; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.OnDemand build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.OnDemand( + this.averageAmount, + this.extraParams, + this.maximumAmount, + this.minimumAmount, + this.purchaseInterval, + this.purchaseIntervalCount); + } + + /** + * Your average amount value. You can use a value across your customer base, or segment + * based on customer type, country, etc. + */ + public Builder setAverageAmount(Long averageAmount) { + this.averageAmount = averageAmount; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.OnDemand#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.OnDemand#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 maximum value you may charge a customer per purchase. You can use a value across + * your customer base, or segment based on customer type, country, etc. + */ + public Builder setMaximumAmount(Long maximumAmount) { + this.maximumAmount = maximumAmount; + return this; + } + + /** + * The lowest or minimum value you may charge a customer per purchase. You can use a value + * across your customer base, or segment based on customer type, country, etc. + */ + public Builder setMinimumAmount(Long minimumAmount) { + this.minimumAmount = minimumAmount; + return this; + } + + /** Interval at which the customer is making purchases. */ + public Builder setPurchaseInterval( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.OnDemand.PurchaseInterval + purchaseInterval) { + this.purchaseInterval = purchaseInterval; + return this; + } + + /** The number of {@code purchase_interval} between charges. */ + public Builder setPurchaseIntervalCount(Long purchaseIntervalCount) { + this.purchaseIntervalCount = purchaseIntervalCount; + return this; + } + } + + public enum PurchaseInterval implements ApiRequestParams.EnumParam { + @SerializedName("day") + DAY("day"), + + @SerializedName("month") + MONTH("month"), + + @SerializedName("week") + WEEK("week"), + + @SerializedName("year") + YEAR("year"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PurchaseInterval(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Subscription { + /** + * 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. Unit of time between subscription charges. */ + @SerializedName("interval") + Interval interval; + + /** + * The number of intervals (specified in the {@code interval} attribute) between + * subscription charges. For example, {@code interval=month} and {@code interval_count=3} + * charges every 3 months. + */ + @SerializedName("interval_count") + Long intervalCount; + + /** Name for subscription. */ + @SerializedName("name") + String name; + + /** Describes the upcoming charge for this subscription. */ + @SerializedName("next_billing") + NextBilling nextBilling; + + /** + * Required. A non-customer-facing reference to correlate subscription + * charges in the Klarna app. Use a value that persists across subscription charges. + */ + @SerializedName("reference") + String reference; + + private Subscription( + Map extraParams, + Interval interval, + Long intervalCount, + String name, + NextBilling nextBilling, + String reference) { + this.extraParams = extraParams; + this.interval = interval; + this.intervalCount = intervalCount; + this.name = name; + this.nextBilling = nextBilling; + this.reference = reference; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Interval interval; + + private Long intervalCount; + + private String name; + + private NextBilling nextBilling; + + private String reference; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.Subscription build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.Subscription( + this.extraParams, + this.interval, + this.intervalCount, + this.name, + this.nextBilling, + this.reference); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.Subscription#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.Subscription#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. Unit of time between subscription charges. */ + public Builder setInterval( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.Subscription.Interval + interval) { + this.interval = interval; + return this; + } + + /** + * The number of intervals (specified in the {@code interval} attribute) between + * subscription charges. For example, {@code interval=month} and {@code interval_count=3} + * charges every 3 months. + */ + public Builder setIntervalCount(Long intervalCount) { + this.intervalCount = intervalCount; + return this; + } + + /** Name for subscription. */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** Describes the upcoming charge for this subscription. */ + public Builder setNextBilling( + PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.Subscription.NextBilling + nextBilling) { + this.nextBilling = nextBilling; + return this; + } + + /** + * Required. A non-customer-facing reference to correlate subscription + * charges in the Klarna app. Use a value that persists across subscription charges. + */ + public Builder setReference(String reference) { + this.reference = reference; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class NextBilling { + /** Required. The amount of the next charge for the subscription. */ + @SerializedName("amount") + Long amount; + + /** + * Required. The date of the next charge for the subscription in + * YYYY-MM-DD format. + */ + @SerializedName("date") + String date; + + /** + * 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 NextBilling(Long amount, String date, Map extraParams) { + this.amount = amount; + this.date = date; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private String date; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.Subscription.NextBilling + build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.Subscription + .NextBilling(this.amount, this.date, this.extraParams); + } + + /** Required. The amount of the next charge for the subscription. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** + * Required. The date of the next charge for the subscription in + * YYYY-MM-DD format. + */ + public Builder setDate(String date) { + this.date = date; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.Subscription.NextBilling#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Klarna.Subscription.NextBilling#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + public enum Interval implements ApiRequestParams.EnumParam { + @SerializedName("day") + DAY("day"), + + @SerializedName("month") + MONTH("month"), + + @SerializedName("week") + WEEK("week"), + + @SerializedName("year") + YEAR("year"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Interval(String value) { + this.value = value; + } + } + } + + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; } } @@ -21052,7 +21848,13 @@ public enum PreferredLocale implements ApiRequestParams.EnumParam { public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @SerializedName("none") - NONE("none"); + NONE("none"), + + @SerializedName("off_session") + OFF_SESSION("off_session"), + + @SerializedName("on_session") + ON_SESSION("on_session"); @Getter(onMethod_ = {@Override}) private final String value; diff --git a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java index 7a8013a4006..bb36666714d 100644 --- a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java @@ -242,7 +242,9 @@ public class PaymentIntentCreateParams extends ApiRequestParams { /** * The list of payment method types (for example, a card) that this PaymentIntent can use. If you * don't provide this, Stripe will dynamically show relevant payment methods from your payment method settings. + * href="https://dashboard.stripe.com/settings/payment_methods">payment method settings. A + * list of valid payment method types can be found here. */ @SerializedName("payment_method_types") List paymentMethodTypes; @@ -6268,6 +6270,13 @@ public static class PaymentMethodData { @SerializedName("cashapp") Cashapp cashapp; + /** + * If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment + * method. + */ + @SerializedName("crypto") + Crypto crypto; + /** * If this is a {@code customer_balance} PaymentMethod, this hash contains details about the * CustomerBalance payment method. @@ -6606,6 +6615,7 @@ private PaymentMethodData( Blik blik, Boleto boleto, Cashapp cashapp, + Crypto crypto, CustomerBalance customerBalance, Eps eps, Map extraParams, @@ -6667,6 +6677,7 @@ private PaymentMethodData( this.blik = blik; this.boleto = boleto; this.cashapp = cashapp; + this.crypto = crypto; this.customerBalance = customerBalance; this.eps = eps; this.extraParams = extraParams; @@ -6750,6 +6761,8 @@ public static class Builder { private Cashapp cashapp; + private Crypto crypto; + private CustomerBalance customerBalance; private Eps eps; @@ -6860,6 +6873,7 @@ public PaymentIntentCreateParams.PaymentMethodData build() { this.blik, this.boleto, this.cashapp, + this.crypto, this.customerBalance, this.eps, this.extraParams, @@ -7049,6 +7063,15 @@ public Builder setCashapp(PaymentIntentCreateParams.PaymentMethodData.Cashapp ca return this; } + /** + * If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment + * method. + */ + public Builder setCrypto(PaymentIntentCreateParams.PaymentMethodData.Crypto crypto) { + this.crypto = crypto; + return this; + } + /** * If this is a {@code customer_balance} PaymentMethod, this hash contains details about the * CustomerBalance payment method. @@ -8700,6 +8723,64 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Crypto { + /** + * 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 Crypto(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodData.Crypto build() { + return new PaymentIntentCreateParams.PaymentMethodData.Crypto(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Crypto#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Crypto#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 CustomerBalance { @@ -9455,6 +9536,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("bunq") BUNQ("bunq"), + @SerializedName("buut") + BUUT("buut"), + @SerializedName("handelsbanken") HANDELSBANKEN("handelsbanken"), @@ -12338,6 +12422,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("cashapp") CASHAPP("cashapp"), + @SerializedName("crypto") + CRYPTO("crypto"), + @SerializedName("customer_balance") CUSTOMER_BALANCE("customer_balance"), @@ -12575,6 +12662,13 @@ public static class PaymentMethodOptions { @SerializedName("cashapp") Object cashapp; + /** + * If this is a {@code crypto} PaymentMethod, this sub-hash contains details about the Crypto + * payment method options. + */ + @SerializedName("crypto") + Object crypto; + /** * If this is a {@code customer balance} PaymentMethod, this sub-hash contains details about the * customer balance payment method options. @@ -12894,6 +12988,7 @@ private PaymentMethodOptions( Object card, Object cardPresent, Object cashapp, + Object crypto, Object customerBalance, Object eps, Map extraParams, @@ -12952,6 +13047,7 @@ private PaymentMethodOptions( this.card = card; this.cardPresent = cardPresent; this.cashapp = cashapp; + this.crypto = crypto; this.customerBalance = customerBalance; this.eps = eps; this.extraParams = extraParams; @@ -13032,6 +13128,8 @@ public static class Builder { private Object cashapp; + private Object crypto; + private Object customerBalance; private Object eps; @@ -13136,6 +13234,7 @@ public PaymentIntentCreateParams.PaymentMethodOptions build() { this.card, this.cardPresent, this.cashapp, + this.crypto, this.customerBalance, this.eps, this.extraParams, @@ -13452,6 +13551,24 @@ public Builder setCashapp(EmptyParam cashapp) { return this; } + /** + * If this is a {@code crypto} PaymentMethod, this sub-hash contains details about the Crypto + * payment method options. + */ + public Builder setCrypto(PaymentIntentCreateParams.PaymentMethodOptions.Crypto crypto) { + this.crypto = crypto; + return this; + } + + /** + * If this is a {@code crypto} PaymentMethod, this sub-hash contains details about the Crypto + * payment method options. + */ + public Builder setCrypto(EmptyParam crypto) { + this.crypto = crypto; + return this; + } + /** * If this is a {@code customer balance} PaymentMethod, this sub-hash contains details about * the customer balance payment method options. @@ -17565,7 +17682,10 @@ public static class Plan { @SerializedName("interval") Interval interval; - /** Required. Type of installment plan, one of {@code fixed_count}. */ + /** + * Required. Type of installment plan, one of {@code fixed_count}, {@code + * bonus}, or {@code revolving}. + */ @SerializedName("type") Type type; @@ -17646,7 +17766,10 @@ public Builder setInterval( return this; } - /** Required. Type of installment plan, one of {@code fixed_count}. */ + /** + * Required. Type of installment plan, one of {@code fixed_count}, + * {@code bonus}, or {@code revolving}. + */ public Builder setType( PaymentIntentCreateParams.PaymentMethodOptions.Card.Installments.Plan.Type type) { this.type = type; @@ -17667,8 +17790,14 @@ public enum Interval implements ApiRequestParams.EnumParam { } public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("bonus") + BONUS("bonus"), + @SerializedName("fixed_count") - FIXED_COUNT("fixed_count"); + FIXED_COUNT("fixed_count"), + + @SerializedName("revolving") + REVOLVING("revolving"); @Getter(onMethod_ = {@Override}) private final String value; @@ -19457,6 +19586,137 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Crypto { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

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

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentCreateParams.PaymentMethodOptions.Crypto.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class CustomerBalance { @@ -20465,7 +20725,10 @@ public Builder setSetupFutureUsage( public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @SerializedName("none") - NONE("none"); + NONE("none"), + + @SerializedName("off_session") + OFF_SESSION("off_session"); @Getter(onMethod_ = {@Override}) private final String value; @@ -21244,6 +21507,10 @@ public static class Klarna { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** On-demand details if setting up or charging an on-demand payment. */ + @SerializedName("on_demand") + OnDemand onDemand; + /** Preferred language of the Klarna authorization page that the customer is redirected to. */ @SerializedName("preferred_locale") PreferredLocale preferredLocale; @@ -21274,15 +21541,23 @@ public static class Klarna { @SerializedName("setup_future_usage") SetupFutureUsage setupFutureUsage; + /** Subscription details if setting up or charging a subscription. */ + @SerializedName("subscriptions") + Object subscriptions; + private Klarna( ApiRequestParams.EnumParam captureMethod, Map extraParams, + OnDemand onDemand, PreferredLocale preferredLocale, - SetupFutureUsage setupFutureUsage) { + SetupFutureUsage setupFutureUsage, + Object subscriptions) { this.captureMethod = captureMethod; this.extraParams = extraParams; + this.onDemand = onDemand; this.preferredLocale = preferredLocale; this.setupFutureUsage = setupFutureUsage; + this.subscriptions = subscriptions; } public static Builder builder() { @@ -21294,14 +21569,23 @@ public static class Builder { private Map extraParams; + private OnDemand onDemand; + private PreferredLocale preferredLocale; private SetupFutureUsage setupFutureUsage; + private Object subscriptions; + /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentCreateParams.PaymentMethodOptions.Klarna build() { return new PaymentIntentCreateParams.PaymentMethodOptions.Klarna( - this.captureMethod, this.extraParams, this.preferredLocale, this.setupFutureUsage); + this.captureMethod, + this.extraParams, + this.onDemand, + this.preferredLocale, + this.setupFutureUsage, + this.subscriptions); } /** @@ -21363,6 +21647,13 @@ public Builder putAllExtraParam(Map map) { return this; } + /** On-demand details if setting up or charging an on-demand payment. */ + public Builder setOnDemand( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.OnDemand onDemand) { + this.onDemand = onDemand; + return this; + } + /** * Preferred language of the Klarna authorization page that the customer is redirected to. */ @@ -21402,17 +21693,520 @@ public Builder setSetupFutureUsage( this.setupFutureUsage = setupFutureUsage; return this; } - } - public enum CaptureMethod implements ApiRequestParams.EnumParam { - @SerializedName("manual") - MANUAL("manual"); + /** + * Add an element to `subscriptions` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna#subscriptions} for the field + * documentation. + */ + @SuppressWarnings("unchecked") + public Builder addSubscription( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.Subscription element) { + if (this.subscriptions == null || this.subscriptions instanceof EmptyParam) { + this.subscriptions = + new ArrayList(); + } + ((List) + this.subscriptions) + .add(element); + return this; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** + * Add all elements to `subscriptions` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link PaymentIntentCreateParams.PaymentMethodOptions.Klarna#subscriptions} for the + * field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllSubscription( + List elements) { + if (this.subscriptions == null || this.subscriptions instanceof EmptyParam) { + this.subscriptions = + new ArrayList(); + } + ((List) + this.subscriptions) + .addAll(elements); + return this; + } - CaptureMethod(String value) { - this.value = value; + /** Subscription details if setting up or charging a subscription. */ + public Builder setSubscriptions(EmptyParam subscriptions) { + this.subscriptions = subscriptions; + return this; + } + + /** Subscription details if setting up or charging a subscription. */ + public Builder setSubscriptions( + List + subscriptions) { + this.subscriptions = subscriptions; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class OnDemand { + /** + * Your average amount value. You can use a value across your customer base, or segment + * based on customer type, country, etc. + */ + @SerializedName("average_amount") + Long averageAmount; + + /** + * 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 maximum value you may charge a customer per purchase. You can use a value across your + * customer base, or segment based on customer type, country, etc. + */ + @SerializedName("maximum_amount") + Long maximumAmount; + + /** + * The lowest or minimum value you may charge a customer per purchase. You can use a value + * across your customer base, or segment based on customer type, country, etc. + */ + @SerializedName("minimum_amount") + Long minimumAmount; + + /** Interval at which the customer is making purchases. */ + @SerializedName("purchase_interval") + PurchaseInterval purchaseInterval; + + /** The number of {@code purchase_interval} between charges. */ + @SerializedName("purchase_interval_count") + Long purchaseIntervalCount; + + private OnDemand( + Long averageAmount, + Map extraParams, + Long maximumAmount, + Long minimumAmount, + PurchaseInterval purchaseInterval, + Long purchaseIntervalCount) { + this.averageAmount = averageAmount; + this.extraParams = extraParams; + this.maximumAmount = maximumAmount; + this.minimumAmount = minimumAmount; + this.purchaseInterval = purchaseInterval; + this.purchaseIntervalCount = purchaseIntervalCount; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long averageAmount; + + private Map extraParams; + + private Long maximumAmount; + + private Long minimumAmount; + + private PurchaseInterval purchaseInterval; + + private Long purchaseIntervalCount; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Klarna.OnDemand build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Klarna.OnDemand( + this.averageAmount, + this.extraParams, + this.maximumAmount, + this.minimumAmount, + this.purchaseInterval, + this.purchaseIntervalCount); + } + + /** + * Your average amount value. You can use a value across your customer base, or segment + * based on customer type, country, etc. + */ + public Builder setAverageAmount(Long averageAmount) { + this.averageAmount = averageAmount; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.OnDemand#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.OnDemand#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 maximum value you may charge a customer per purchase. You can use a value across + * your customer base, or segment based on customer type, country, etc. + */ + public Builder setMaximumAmount(Long maximumAmount) { + this.maximumAmount = maximumAmount; + return this; + } + + /** + * The lowest or minimum value you may charge a customer per purchase. You can use a value + * across your customer base, or segment based on customer type, country, etc. + */ + public Builder setMinimumAmount(Long minimumAmount) { + this.minimumAmount = minimumAmount; + return this; + } + + /** Interval at which the customer is making purchases. */ + public Builder setPurchaseInterval( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.OnDemand.PurchaseInterval + purchaseInterval) { + this.purchaseInterval = purchaseInterval; + return this; + } + + /** The number of {@code purchase_interval} between charges. */ + public Builder setPurchaseIntervalCount(Long purchaseIntervalCount) { + this.purchaseIntervalCount = purchaseIntervalCount; + return this; + } + } + + public enum PurchaseInterval implements ApiRequestParams.EnumParam { + @SerializedName("day") + DAY("day"), + + @SerializedName("month") + MONTH("month"), + + @SerializedName("week") + WEEK("week"), + + @SerializedName("year") + YEAR("year"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PurchaseInterval(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Subscription { + /** + * 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. Unit of time between subscription charges. */ + @SerializedName("interval") + Interval interval; + + /** + * The number of intervals (specified in the {@code interval} attribute) between + * subscription charges. For example, {@code interval=month} and {@code interval_count=3} + * charges every 3 months. + */ + @SerializedName("interval_count") + Long intervalCount; + + /** Name for subscription. */ + @SerializedName("name") + String name; + + /** Describes the upcoming charge for this subscription. */ + @SerializedName("next_billing") + NextBilling nextBilling; + + /** + * Required. A non-customer-facing reference to correlate subscription + * charges in the Klarna app. Use a value that persists across subscription charges. + */ + @SerializedName("reference") + String reference; + + private Subscription( + Map extraParams, + Interval interval, + Long intervalCount, + String name, + NextBilling nextBilling, + String reference) { + this.extraParams = extraParams; + this.interval = interval; + this.intervalCount = intervalCount; + this.name = name; + this.nextBilling = nextBilling; + this.reference = reference; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Interval interval; + + private Long intervalCount; + + private String name; + + private NextBilling nextBilling; + + private String reference; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Klarna.Subscription build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Klarna.Subscription( + this.extraParams, + this.interval, + this.intervalCount, + this.name, + this.nextBilling, + this.reference); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.Subscription#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.Subscription#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. Unit of time between subscription charges. */ + public Builder setInterval( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.Subscription.Interval + interval) { + this.interval = interval; + return this; + } + + /** + * The number of intervals (specified in the {@code interval} attribute) between + * subscription charges. For example, {@code interval=month} and {@code interval_count=3} + * charges every 3 months. + */ + public Builder setIntervalCount(Long intervalCount) { + this.intervalCount = intervalCount; + return this; + } + + /** Name for subscription. */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** Describes the upcoming charge for this subscription. */ + public Builder setNextBilling( + PaymentIntentCreateParams.PaymentMethodOptions.Klarna.Subscription.NextBilling + nextBilling) { + this.nextBilling = nextBilling; + return this; + } + + /** + * Required. A non-customer-facing reference to correlate subscription + * charges in the Klarna app. Use a value that persists across subscription charges. + */ + public Builder setReference(String reference) { + this.reference = reference; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class NextBilling { + /** Required. The amount of the next charge for the subscription. */ + @SerializedName("amount") + Long amount; + + /** + * Required. The date of the next charge for the subscription in + * YYYY-MM-DD format. + */ + @SerializedName("date") + String date; + + /** + * 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 NextBilling(Long amount, String date, Map extraParams) { + this.amount = amount; + this.date = date; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private String date; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Klarna.Subscription.NextBilling + build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Klarna.Subscription + .NextBilling(this.amount, this.date, this.extraParams); + } + + /** Required. The amount of the next charge for the subscription. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** + * Required. The date of the next charge for the subscription in + * YYYY-MM-DD format. + */ + public Builder setDate(String date) { + this.date = date; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.Subscription.NextBilling#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Klarna.Subscription.NextBilling#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + public enum Interval implements ApiRequestParams.EnumParam { + @SerializedName("day") + DAY("day"), + + @SerializedName("month") + MONTH("month"), + + @SerializedName("week") + WEEK("week"), + + @SerializedName("year") + YEAR("year"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Interval(String value) { + this.value = value; + } + } + } + + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; } } @@ -21565,7 +22359,13 @@ public enum PreferredLocale implements ApiRequestParams.EnumParam { public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @SerializedName("none") - NONE("none"); + NONE("none"), + + @SerializedName("off_session") + OFF_SESSION("off_session"), + + @SerializedName("on_session") + ON_SESSION("on_session"); @Getter(onMethod_ = {@Override}) private final String value; diff --git a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java index 7bd113f8e30..bbe925a55c2 100644 --- a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java @@ -152,7 +152,9 @@ public class PaymentIntentUpdateParams extends ApiRequestParams { /** * The list of payment method types (for example, card) that this PaymentIntent can use. Use * {@code automatic_payment_methods} to manage payment methods from the Stripe Dashboard. + * href="https://dashboard.stripe.com/settings/payment_methods">Stripe Dashboard. A list of + * valid payment method types can be found here. */ @SerializedName("payment_method_types") List paymentMethodTypes; @@ -6378,6 +6380,13 @@ public static class PaymentMethodData { @SerializedName("cashapp") Cashapp cashapp; + /** + * If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment + * method. + */ + @SerializedName("crypto") + Crypto crypto; + /** * If this is a {@code customer_balance} PaymentMethod, this hash contains details about the * CustomerBalance payment method. @@ -6716,6 +6725,7 @@ private PaymentMethodData( Blik blik, Boleto boleto, Cashapp cashapp, + Crypto crypto, CustomerBalance customerBalance, Eps eps, Map extraParams, @@ -6777,6 +6787,7 @@ private PaymentMethodData( this.blik = blik; this.boleto = boleto; this.cashapp = cashapp; + this.crypto = crypto; this.customerBalance = customerBalance; this.eps = eps; this.extraParams = extraParams; @@ -6860,6 +6871,8 @@ public static class Builder { private Cashapp cashapp; + private Crypto crypto; + private CustomerBalance customerBalance; private Eps eps; @@ -6970,6 +6983,7 @@ public PaymentIntentUpdateParams.PaymentMethodData build() { this.blik, this.boleto, this.cashapp, + this.crypto, this.customerBalance, this.eps, this.extraParams, @@ -7159,6 +7173,15 @@ public Builder setCashapp(PaymentIntentUpdateParams.PaymentMethodData.Cashapp ca return this; } + /** + * If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment + * method. + */ + public Builder setCrypto(PaymentIntentUpdateParams.PaymentMethodData.Crypto crypto) { + this.crypto = crypto; + return this; + } + /** * If this is a {@code customer_balance} PaymentMethod, this hash contains details about the * CustomerBalance payment method. @@ -8909,6 +8932,64 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Crypto { + /** + * 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 Crypto(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodData.Crypto build() { + return new PaymentIntentUpdateParams.PaymentMethodData.Crypto(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Crypto#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Crypto#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 CustomerBalance { @@ -9664,6 +9745,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("bunq") BUNQ("bunq"), + @SerializedName("buut") + BUUT("buut"), + @SerializedName("handelsbanken") HANDELSBANKEN("handelsbanken"), @@ -12643,6 +12727,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("cashapp") CASHAPP("cashapp"), + @SerializedName("crypto") + CRYPTO("crypto"), + @SerializedName("customer_balance") CUSTOMER_BALANCE("customer_balance"), @@ -12880,6 +12967,13 @@ public static class PaymentMethodOptions { @SerializedName("cashapp") Object cashapp; + /** + * If this is a {@code crypto} PaymentMethod, this sub-hash contains details about the Crypto + * payment method options. + */ + @SerializedName("crypto") + Object crypto; + /** * If this is a {@code customer balance} PaymentMethod, this sub-hash contains details about the * customer balance payment method options. @@ -13199,6 +13293,7 @@ private PaymentMethodOptions( Object card, Object cardPresent, Object cashapp, + Object crypto, Object customerBalance, Object eps, Map extraParams, @@ -13257,6 +13352,7 @@ private PaymentMethodOptions( this.card = card; this.cardPresent = cardPresent; this.cashapp = cashapp; + this.crypto = crypto; this.customerBalance = customerBalance; this.eps = eps; this.extraParams = extraParams; @@ -13337,6 +13433,8 @@ public static class Builder { private Object cashapp; + private Object crypto; + private Object customerBalance; private Object eps; @@ -13441,6 +13539,7 @@ public PaymentIntentUpdateParams.PaymentMethodOptions build() { this.card, this.cardPresent, this.cashapp, + this.crypto, this.customerBalance, this.eps, this.extraParams, @@ -13757,6 +13856,24 @@ public Builder setCashapp(EmptyParam cashapp) { return this; } + /** + * If this is a {@code crypto} PaymentMethod, this sub-hash contains details about the Crypto + * payment method options. + */ + public Builder setCrypto(PaymentIntentUpdateParams.PaymentMethodOptions.Crypto crypto) { + this.crypto = crypto; + return this; + } + + /** + * If this is a {@code crypto} PaymentMethod, this sub-hash contains details about the Crypto + * payment method options. + */ + public Builder setCrypto(EmptyParam crypto) { + this.crypto = crypto; + return this; + } + /** * If this is a {@code customer balance} PaymentMethod, this sub-hash contains details about * the customer balance payment method options. @@ -17946,7 +18063,10 @@ public static class Plan { @SerializedName("interval") Interval interval; - /** Required. Type of installment plan, one of {@code fixed_count}. */ + /** + * Required. Type of installment plan, one of {@code fixed_count}, {@code + * bonus}, or {@code revolving}. + */ @SerializedName("type") Type type; @@ -18027,7 +18147,10 @@ public Builder setInterval( return this; } - /** Required. Type of installment plan, one of {@code fixed_count}. */ + /** + * Required. Type of installment plan, one of {@code fixed_count}, + * {@code bonus}, or {@code revolving}. + */ public Builder setType( PaymentIntentUpdateParams.PaymentMethodOptions.Card.Installments.Plan.Type type) { this.type = type; @@ -18048,8 +18171,14 @@ public enum Interval implements ApiRequestParams.EnumParam { } public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("bonus") + BONUS("bonus"), + @SerializedName("fixed_count") - FIXED_COUNT("fixed_count"); + FIXED_COUNT("fixed_count"), + + @SerializedName("revolving") + REVOLVING("revolving"); @Getter(onMethod_ = {@Override}) private final String value; @@ -19937,6 +20066,137 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Crypto { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

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

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentUpdateParams.PaymentMethodOptions.Crypto.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class CustomerBalance { @@ -20955,7 +21215,10 @@ public Builder setSetupFutureUsage( public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @SerializedName("none") - NONE("none"); + NONE("none"), + + @SerializedName("off_session") + OFF_SESSION("off_session"); @Getter(onMethod_ = {@Override}) private final String value; @@ -21734,6 +21997,10 @@ public static class Klarna { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** On-demand details if setting up or charging an on-demand payment. */ + @SerializedName("on_demand") + OnDemand onDemand; + /** Preferred language of the Klarna authorization page that the customer is redirected to. */ @SerializedName("preferred_locale") PreferredLocale preferredLocale; @@ -21764,15 +22031,23 @@ public static class Klarna { @SerializedName("setup_future_usage") SetupFutureUsage setupFutureUsage; + /** Subscription details if setting up or charging a subscription. */ + @SerializedName("subscriptions") + Object subscriptions; + private Klarna( ApiRequestParams.EnumParam captureMethod, Map extraParams, + OnDemand onDemand, PreferredLocale preferredLocale, - SetupFutureUsage setupFutureUsage) { + SetupFutureUsage setupFutureUsage, + Object subscriptions) { this.captureMethod = captureMethod; this.extraParams = extraParams; + this.onDemand = onDemand; this.preferredLocale = preferredLocale; this.setupFutureUsage = setupFutureUsage; + this.subscriptions = subscriptions; } public static Builder builder() { @@ -21784,14 +22059,23 @@ public static class Builder { private Map extraParams; + private OnDemand onDemand; + private PreferredLocale preferredLocale; private SetupFutureUsage setupFutureUsage; + private Object subscriptions; + /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentUpdateParams.PaymentMethodOptions.Klarna build() { return new PaymentIntentUpdateParams.PaymentMethodOptions.Klarna( - this.captureMethod, this.extraParams, this.preferredLocale, this.setupFutureUsage); + this.captureMethod, + this.extraParams, + this.onDemand, + this.preferredLocale, + this.setupFutureUsage, + this.subscriptions); } /** @@ -21853,6 +22137,13 @@ public Builder putAllExtraParam(Map map) { return this; } + /** On-demand details if setting up or charging an on-demand payment. */ + public Builder setOnDemand( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.OnDemand onDemand) { + this.onDemand = onDemand; + return this; + } + /** * Preferred language of the Klarna authorization page that the customer is redirected to. */ @@ -21892,17 +22183,544 @@ public Builder setSetupFutureUsage( this.setupFutureUsage = setupFutureUsage; return this; } - } - public enum CaptureMethod implements ApiRequestParams.EnumParam { - @SerializedName("manual") - MANUAL("manual"); + /** + * Add an element to `subscriptions` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna#subscriptions} for the field + * documentation. + */ + @SuppressWarnings("unchecked") + public Builder addSubscription( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.Subscription element) { + if (this.subscriptions == null || this.subscriptions instanceof EmptyParam) { + this.subscriptions = + new ArrayList(); + } + ((List) + this.subscriptions) + .add(element); + return this; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** + * Add all elements to `subscriptions` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Klarna#subscriptions} for the + * field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllSubscription( + List elements) { + if (this.subscriptions == null || this.subscriptions instanceof EmptyParam) { + this.subscriptions = + new ArrayList(); + } + ((List) + this.subscriptions) + .addAll(elements); + return this; + } - CaptureMethod(String value) { - this.value = value; + /** Subscription details if setting up or charging a subscription. */ + public Builder setSubscriptions(EmptyParam subscriptions) { + this.subscriptions = subscriptions; + return this; + } + + /** Subscription details if setting up or charging a subscription. */ + public Builder setSubscriptions( + List + subscriptions) { + this.subscriptions = subscriptions; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class OnDemand { + /** + * Your average amount value. You can use a value across your customer base, or segment + * based on customer type, country, etc. + */ + @SerializedName("average_amount") + Long averageAmount; + + /** + * 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 maximum value you may charge a customer per purchase. You can use a value across your + * customer base, or segment based on customer type, country, etc. + */ + @SerializedName("maximum_amount") + Long maximumAmount; + + /** + * The lowest or minimum value you may charge a customer per purchase. You can use a value + * across your customer base, or segment based on customer type, country, etc. + */ + @SerializedName("minimum_amount") + Long minimumAmount; + + /** Interval at which the customer is making purchases. */ + @SerializedName("purchase_interval") + PurchaseInterval purchaseInterval; + + /** The number of {@code purchase_interval} between charges. */ + @SerializedName("purchase_interval_count") + Long purchaseIntervalCount; + + private OnDemand( + Long averageAmount, + Map extraParams, + Long maximumAmount, + Long minimumAmount, + PurchaseInterval purchaseInterval, + Long purchaseIntervalCount) { + this.averageAmount = averageAmount; + this.extraParams = extraParams; + this.maximumAmount = maximumAmount; + this.minimumAmount = minimumAmount; + this.purchaseInterval = purchaseInterval; + this.purchaseIntervalCount = purchaseIntervalCount; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long averageAmount; + + private Map extraParams; + + private Long maximumAmount; + + private Long minimumAmount; + + private PurchaseInterval purchaseInterval; + + private Long purchaseIntervalCount; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.OnDemand build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.OnDemand( + this.averageAmount, + this.extraParams, + this.maximumAmount, + this.minimumAmount, + this.purchaseInterval, + this.purchaseIntervalCount); + } + + /** + * Your average amount value. You can use a value across your customer base, or segment + * based on customer type, country, etc. + */ + public Builder setAverageAmount(Long averageAmount) { + this.averageAmount = averageAmount; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.OnDemand#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.OnDemand#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 maximum value you may charge a customer per purchase. You can use a value across + * your customer base, or segment based on customer type, country, etc. + */ + public Builder setMaximumAmount(Long maximumAmount) { + this.maximumAmount = maximumAmount; + return this; + } + + /** + * The lowest or minimum value you may charge a customer per purchase. You can use a value + * across your customer base, or segment based on customer type, country, etc. + */ + public Builder setMinimumAmount(Long minimumAmount) { + this.minimumAmount = minimumAmount; + return this; + } + + /** Interval at which the customer is making purchases. */ + public Builder setPurchaseInterval( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.OnDemand.PurchaseInterval + purchaseInterval) { + this.purchaseInterval = purchaseInterval; + return this; + } + + /** The number of {@code purchase_interval} between charges. */ + public Builder setPurchaseIntervalCount(Long purchaseIntervalCount) { + this.purchaseIntervalCount = purchaseIntervalCount; + return this; + } + } + + public enum PurchaseInterval implements ApiRequestParams.EnumParam { + @SerializedName("day") + DAY("day"), + + @SerializedName("month") + MONTH("month"), + + @SerializedName("week") + WEEK("week"), + + @SerializedName("year") + YEAR("year"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PurchaseInterval(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Subscription { + /** + * 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. Unit of time between subscription charges. */ + @SerializedName("interval") + Interval interval; + + /** + * The number of intervals (specified in the {@code interval} attribute) between + * subscription charges. For example, {@code interval=month} and {@code interval_count=3} + * charges every 3 months. + */ + @SerializedName("interval_count") + Long intervalCount; + + /** Name for subscription. */ + @SerializedName("name") + Object name; + + /** Describes the upcoming charge for this subscription. */ + @SerializedName("next_billing") + NextBilling nextBilling; + + /** + * Required. A non-customer-facing reference to correlate subscription + * charges in the Klarna app. Use a value that persists across subscription charges. + */ + @SerializedName("reference") + Object reference; + + private Subscription( + Map extraParams, + Interval interval, + Long intervalCount, + Object name, + NextBilling nextBilling, + Object reference) { + this.extraParams = extraParams; + this.interval = interval; + this.intervalCount = intervalCount; + this.name = name; + this.nextBilling = nextBilling; + this.reference = reference; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Interval interval; + + private Long intervalCount; + + private Object name; + + private NextBilling nextBilling; + + private Object reference; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.Subscription build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.Subscription( + this.extraParams, + this.interval, + this.intervalCount, + this.name, + this.nextBilling, + this.reference); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.Subscription#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.Subscription#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. Unit of time between subscription charges. */ + public Builder setInterval( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.Subscription.Interval + interval) { + this.interval = interval; + return this; + } + + /** + * The number of intervals (specified in the {@code interval} attribute) between + * subscription charges. For example, {@code interval=month} and {@code interval_count=3} + * charges every 3 months. + */ + public Builder setIntervalCount(Long intervalCount) { + this.intervalCount = intervalCount; + return this; + } + + /** Name for subscription. */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** Name for subscription. */ + public Builder setName(EmptyParam name) { + this.name = name; + return this; + } + + /** Describes the upcoming charge for this subscription. */ + public Builder setNextBilling( + PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.Subscription.NextBilling + nextBilling) { + this.nextBilling = nextBilling; + return this; + } + + /** + * Required. A non-customer-facing reference to correlate subscription + * charges in the Klarna app. Use a value that persists across subscription charges. + */ + public Builder setReference(String reference) { + this.reference = reference; + return this; + } + + /** + * Required. A non-customer-facing reference to correlate subscription + * charges in the Klarna app. Use a value that persists across subscription charges. + */ + public Builder setReference(EmptyParam reference) { + this.reference = reference; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class NextBilling { + /** Required. The amount of the next charge for the subscription. */ + @SerializedName("amount") + Long amount; + + /** + * Required. The date of the next charge for the subscription in + * YYYY-MM-DD format. + */ + @SerializedName("date") + Object date; + + /** + * 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 NextBilling(Long amount, Object date, Map extraParams) { + this.amount = amount; + this.date = date; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private Object date; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.Subscription.NextBilling + build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.Subscription + .NextBilling(this.amount, this.date, this.extraParams); + } + + /** Required. The amount of the next charge for the subscription. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** + * Required. The date of the next charge for the subscription in + * YYYY-MM-DD format. + */ + public Builder setDate(String date) { + this.date = date; + return this; + } + + /** + * Required. The date of the next charge for the subscription in + * YYYY-MM-DD format. + */ + public Builder setDate(EmptyParam date) { + this.date = date; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.Subscription.NextBilling#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Klarna.Subscription.NextBilling#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + public enum Interval implements ApiRequestParams.EnumParam { + @SerializedName("day") + DAY("day"), + + @SerializedName("month") + MONTH("month"), + + @SerializedName("week") + WEEK("week"), + + @SerializedName("year") + YEAR("year"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Interval(String value) { + this.value = value; + } + } + } + + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; } } @@ -22055,7 +22873,13 @@ public enum PreferredLocale implements ApiRequestParams.EnumParam { public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @SerializedName("none") - NONE("none"); + NONE("none"), + + @SerializedName("off_session") + OFF_SESSION("off_session"), + + @SerializedName("on_session") + ON_SESSION("on_session"); @Getter(onMethod_ = {@Override}) private final String value; diff --git a/src/main/java/com/stripe/param/PaymentMethodCreateParams.java b/src/main/java/com/stripe/param/PaymentMethodCreateParams.java index cb575764397..a496774aac2 100644 --- a/src/main/java/com/stripe/param/PaymentMethodCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodCreateParams.java @@ -129,6 +129,12 @@ public class PaymentMethodCreateParams extends ApiRequestParams { @SerializedName("cashapp") Cashapp cashapp; + /** + * If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. + */ + @SerializedName("crypto") + Crypto crypto; + /** The {@code Customer} to whom the original PaymentMethod is attached. */ @SerializedName("customer") String customer; @@ -478,6 +484,7 @@ private PaymentMethodCreateParams( Boleto boleto, Object card, Cashapp cashapp, + Crypto crypto, String customer, CustomerBalance customerBalance, Eps eps, @@ -543,6 +550,7 @@ private PaymentMethodCreateParams( this.boleto = boleto; this.card = card; this.cashapp = cashapp; + this.crypto = crypto; this.customer = customer; this.customerBalance = customerBalance; this.eps = eps; @@ -631,6 +639,8 @@ public static class Builder { private Cashapp cashapp; + private Crypto crypto; + private String customer; private CustomerBalance customerBalance; @@ -748,6 +758,7 @@ public PaymentMethodCreateParams build() { this.boleto, this.card, this.cashapp, + this.crypto, this.customer, this.customerBalance, this.eps, @@ -962,6 +973,15 @@ public Builder setCashapp(PaymentMethodCreateParams.Cashapp cashapp) { return this; } + /** + * If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment + * method. + */ + public Builder setCrypto(PaymentMethodCreateParams.Crypto crypto) { + this.crypto = crypto; + return this; + } + /** The {@code Customer} to whom the original PaymentMethod is attached. */ public Builder setCustomer(String customer) { this.customer = customer; @@ -2833,6 +2853,62 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Crypto { + /** + * 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 Crypto(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentMethodCreateParams.Crypto build() { + return new PaymentMethodCreateParams.Crypto(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentMethodCreateParams.Crypto#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentMethodCreateParams.Crypto#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 CustomerBalance { @@ -3572,6 +3648,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("bunq") BUNQ("bunq"), + @SerializedName("buut") + BUUT("buut"), + @SerializedName("handelsbanken") HANDELSBANKEN("handelsbanken"), @@ -6457,6 +6536,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("cashapp") CASHAPP("cashapp"), + @SerializedName("crypto") + CRYPTO("crypto"), + @SerializedName("customer_balance") CUSTOMER_BALANCE("customer_balance"), diff --git a/src/main/java/com/stripe/param/PaymentMethodListParams.java b/src/main/java/com/stripe/param/PaymentMethodListParams.java index 4818968cfb7..b74c269ad92 100644 --- a/src/main/java/com/stripe/param/PaymentMethodListParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodListParams.java @@ -255,6 +255,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("cashapp") CASHAPP("cashapp"), + @SerializedName("crypto") + CRYPTO("crypto"), + @SerializedName("customer_balance") CUSTOMER_BALANCE("customer_balance"), diff --git a/src/main/java/com/stripe/param/QuoteCreateParams.java b/src/main/java/com/stripe/param/QuoteCreateParams.java index d1677cb665c..6ef1199aa8b 100644 --- a/src/main/java/com/stripe/param/QuoteCreateParams.java +++ b/src/main/java/com/stripe/param/QuoteCreateParams.java @@ -7549,6 +7549,92 @@ public enum Type implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BillingMode { + /** + * 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. */ + @SerializedName("type") + Type type; + + private BillingMode(Map extraParams, Type type) { + this.extraParams = extraParams; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public QuoteCreateParams.SubscriptionData.BillingMode build() { + return new QuoteCreateParams.SubscriptionData.BillingMode(this.extraParams, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link QuoteCreateParams.SubscriptionData.BillingMode#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link QuoteCreateParams.SubscriptionData.BillingMode#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. */ + public Builder setType(QuoteCreateParams.SubscriptionData.BillingMode.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("classic") + CLASSIC("classic"), + + @SerializedName("flexible") + FLEXIBLE("flexible"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Prebilling { @@ -7654,21 +7740,6 @@ public enum BillingCycleAnchor implements ApiRequestParams.EnumParam { } } - public enum BillingMode implements ApiRequestParams.EnumParam { - @SerializedName("classic") - CLASSIC("classic"), - - @SerializedName("flexible") - FLEXIBLE("flexible"); - - @Getter(onMethod_ = {@Override}) - private final String value; - - BillingMode(String value) { - this.value = value; - } - } - public enum EffectiveDate implements ApiRequestParams.EnumParam { @SerializedName("current_period_end") CURRENT_PERIOD_END("current_period_end"); diff --git a/src/main/java/com/stripe/param/SetupIntentConfirmParams.java b/src/main/java/com/stripe/param/SetupIntentConfirmParams.java index 286565daccf..3019adbf01a 100644 --- a/src/main/java/com/stripe/param/SetupIntentConfirmParams.java +++ b/src/main/java/com/stripe/param/SetupIntentConfirmParams.java @@ -734,6 +734,13 @@ public static class PaymentMethodData { @SerializedName("cashapp") Cashapp cashapp; + /** + * If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment + * method. + */ + @SerializedName("crypto") + Crypto crypto; + /** * If this is a {@code customer_balance} PaymentMethod, this hash contains details about the * CustomerBalance payment method. @@ -1072,6 +1079,7 @@ private PaymentMethodData( Blik blik, Boleto boleto, Cashapp cashapp, + Crypto crypto, CustomerBalance customerBalance, Eps eps, Map extraParams, @@ -1133,6 +1141,7 @@ private PaymentMethodData( this.blik = blik; this.boleto = boleto; this.cashapp = cashapp; + this.crypto = crypto; this.customerBalance = customerBalance; this.eps = eps; this.extraParams = extraParams; @@ -1216,6 +1225,8 @@ public static class Builder { private Cashapp cashapp; + private Crypto crypto; + private CustomerBalance customerBalance; private Eps eps; @@ -1326,6 +1337,7 @@ public SetupIntentConfirmParams.PaymentMethodData build() { this.blik, this.boleto, this.cashapp, + this.crypto, this.customerBalance, this.eps, this.extraParams, @@ -1515,6 +1527,15 @@ public Builder setCashapp(SetupIntentConfirmParams.PaymentMethodData.Cashapp cas return this; } + /** + * If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment + * method. + */ + public Builder setCrypto(SetupIntentConfirmParams.PaymentMethodData.Crypto crypto) { + this.crypto = crypto; + return this; + } + /** * If this is a {@code customer_balance} PaymentMethod, this hash contains details about the * CustomerBalance payment method. @@ -3166,6 +3187,64 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Crypto { + /** + * 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 Crypto(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public SetupIntentConfirmParams.PaymentMethodData.Crypto build() { + return new SetupIntentConfirmParams.PaymentMethodData.Crypto(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SetupIntentConfirmParams.PaymentMethodData.Crypto#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SetupIntentConfirmParams.PaymentMethodData.Crypto#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 CustomerBalance { @@ -3921,6 +4000,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("bunq") BUNQ("bunq"), + @SerializedName("buut") + BUUT("buut"), + @SerializedName("handelsbanken") HANDELSBANKEN("handelsbanken"), @@ -6804,6 +6886,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("cashapp") CASHAPP("cashapp"), + @SerializedName("crypto") + CRYPTO("crypto"), + @SerializedName("customer_balance") CUSTOMER_BALANCE("customer_balance"), @@ -6980,6 +7065,13 @@ public static class PaymentMethodOptions { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** + * If this is a {@code klarna} PaymentMethod, this hash contains details about the Klarna + * payment method options. + */ + @SerializedName("klarna") + Klarna klarna; + /** * If this is a {@code link} PaymentMethod, this sub-hash contains details about the Link * payment method options. @@ -7022,6 +7114,7 @@ private PaymentMethodOptions( Card card, CardPresent cardPresent, Map extraParams, + Klarna klarna, Link link, Paypal paypal, Payto payto, @@ -7033,6 +7126,7 @@ private PaymentMethodOptions( this.card = card; this.cardPresent = cardPresent; this.extraParams = extraParams; + this.klarna = klarna; this.link = link; this.paypal = paypal; this.payto = payto; @@ -7057,6 +7151,8 @@ public static class Builder { private Map extraParams; + private Klarna klarna; + private Link link; private Paypal paypal; @@ -7076,6 +7172,7 @@ public SetupIntentConfirmParams.PaymentMethodOptions build() { this.card, this.cardPresent, this.extraParams, + this.klarna, this.link, this.paypal, this.payto, @@ -7156,6 +7253,15 @@ public Builder putAllExtraParam(Map map) { return this; } + /** + * If this is a {@code klarna} PaymentMethod, this hash contains details about the Klarna + * payment method options. + */ + public Builder setKlarna(SetupIntentConfirmParams.PaymentMethodOptions.Klarna klarna) { + this.klarna = klarna; + return this; + } + /** * If this is a {@code link} PaymentMethod, this sub-hash contains details about the Link * payment method options. @@ -9003,6 +9109,772 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Klarna { + /** The currency of the SetupIntent. Three letter ISO currency code. */ + @SerializedName("currency") + String currency; + + /** + * 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; + + /** On-demand details if setting up a payment method for on-demand payments. */ + @SerializedName("on_demand") + OnDemand onDemand; + + /** Preferred language of the Klarna authorization page that the customer is redirected to. */ + @SerializedName("preferred_locale") + PreferredLocale preferredLocale; + + /** Subscription details if setting up or charging a subscription. */ + @SerializedName("subscriptions") + Object subscriptions; + + private Klarna( + String currency, + Map extraParams, + OnDemand onDemand, + PreferredLocale preferredLocale, + Object subscriptions) { + this.currency = currency; + this.extraParams = extraParams; + this.onDemand = onDemand; + this.preferredLocale = preferredLocale; + this.subscriptions = subscriptions; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String currency; + + private Map extraParams; + + private OnDemand onDemand; + + private PreferredLocale preferredLocale; + + private Object subscriptions; + + /** Finalize and obtain parameter instance from this builder. */ + public SetupIntentConfirmParams.PaymentMethodOptions.Klarna build() { + return new SetupIntentConfirmParams.PaymentMethodOptions.Klarna( + this.currency, + this.extraParams, + this.onDemand, + this.preferredLocale, + this.subscriptions); + } + + /** The currency of the SetupIntent. Three letter ISO currency code. */ + public Builder setCurrency(String currency) { + this.currency = currency; + 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 SetupIntentConfirmParams.PaymentMethodOptions.Klarna#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SetupIntentConfirmParams.PaymentMethodOptions.Klarna#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** On-demand details if setting up a payment method for on-demand payments. */ + public Builder setOnDemand( + SetupIntentConfirmParams.PaymentMethodOptions.Klarna.OnDemand onDemand) { + this.onDemand = onDemand; + return this; + } + + /** + * Preferred language of the Klarna authorization page that the customer is redirected to. + */ + public Builder setPreferredLocale( + SetupIntentConfirmParams.PaymentMethodOptions.Klarna.PreferredLocale preferredLocale) { + this.preferredLocale = preferredLocale; + return this; + } + + /** + * Add an element to `subscriptions` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * SetupIntentConfirmParams.PaymentMethodOptions.Klarna#subscriptions} for the field + * documentation. + */ + @SuppressWarnings("unchecked") + public Builder addSubscription( + SetupIntentConfirmParams.PaymentMethodOptions.Klarna.Subscription element) { + if (this.subscriptions == null || this.subscriptions instanceof EmptyParam) { + this.subscriptions = + new ArrayList(); + } + ((List) + this.subscriptions) + .add(element); + return this; + } + + /** + * Add all elements to `subscriptions` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link SetupIntentConfirmParams.PaymentMethodOptions.Klarna#subscriptions} for the + * field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllSubscription( + List elements) { + if (this.subscriptions == null || this.subscriptions instanceof EmptyParam) { + this.subscriptions = + new ArrayList(); + } + ((List) + this.subscriptions) + .addAll(elements); + return this; + } + + /** Subscription details if setting up or charging a subscription. */ + public Builder setSubscriptions(EmptyParam subscriptions) { + this.subscriptions = subscriptions; + return this; + } + + /** Subscription details if setting up or charging a subscription. */ + public Builder setSubscriptions( + List subscriptions) { + this.subscriptions = subscriptions; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class OnDemand { + /** + * Your average amount value. You can use a value across your customer base, or segment + * based on customer type, country, etc. + */ + @SerializedName("average_amount") + Long averageAmount; + + /** + * 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 maximum value you may charge a customer per purchase. You can use a value across your + * customer base, or segment based on customer type, country, etc. + */ + @SerializedName("maximum_amount") + Long maximumAmount; + + /** + * The lowest or minimum value you may charge a customer per purchase. You can use a value + * across your customer base, or segment based on customer type, country, etc. + */ + @SerializedName("minimum_amount") + Long minimumAmount; + + /** Interval at which the customer is making purchases. */ + @SerializedName("purchase_interval") + PurchaseInterval purchaseInterval; + + /** The number of {@code purchase_interval} between charges. */ + @SerializedName("purchase_interval_count") + Long purchaseIntervalCount; + + private OnDemand( + Long averageAmount, + Map extraParams, + Long maximumAmount, + Long minimumAmount, + PurchaseInterval purchaseInterval, + Long purchaseIntervalCount) { + this.averageAmount = averageAmount; + this.extraParams = extraParams; + this.maximumAmount = maximumAmount; + this.minimumAmount = minimumAmount; + this.purchaseInterval = purchaseInterval; + this.purchaseIntervalCount = purchaseIntervalCount; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long averageAmount; + + private Map extraParams; + + private Long maximumAmount; + + private Long minimumAmount; + + private PurchaseInterval purchaseInterval; + + private Long purchaseIntervalCount; + + /** Finalize and obtain parameter instance from this builder. */ + public SetupIntentConfirmParams.PaymentMethodOptions.Klarna.OnDemand build() { + return new SetupIntentConfirmParams.PaymentMethodOptions.Klarna.OnDemand( + this.averageAmount, + this.extraParams, + this.maximumAmount, + this.minimumAmount, + this.purchaseInterval, + this.purchaseIntervalCount); + } + + /** + * Your average amount value. You can use a value across your customer base, or segment + * based on customer type, country, etc. + */ + public Builder setAverageAmount(Long averageAmount) { + this.averageAmount = averageAmount; + 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 + * SetupIntentConfirmParams.PaymentMethodOptions.Klarna.OnDemand#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * SetupIntentConfirmParams.PaymentMethodOptions.Klarna.OnDemand#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 maximum value you may charge a customer per purchase. You can use a value across + * your customer base, or segment based on customer type, country, etc. + */ + public Builder setMaximumAmount(Long maximumAmount) { + this.maximumAmount = maximumAmount; + return this; + } + + /** + * The lowest or minimum value you may charge a customer per purchase. You can use a value + * across your customer base, or segment based on customer type, country, etc. + */ + public Builder setMinimumAmount(Long minimumAmount) { + this.minimumAmount = minimumAmount; + return this; + } + + /** Interval at which the customer is making purchases. */ + public Builder setPurchaseInterval( + SetupIntentConfirmParams.PaymentMethodOptions.Klarna.OnDemand.PurchaseInterval + purchaseInterval) { + this.purchaseInterval = purchaseInterval; + return this; + } + + /** The number of {@code purchase_interval} between charges. */ + public Builder setPurchaseIntervalCount(Long purchaseIntervalCount) { + this.purchaseIntervalCount = purchaseIntervalCount; + return this; + } + } + + public enum PurchaseInterval implements ApiRequestParams.EnumParam { + @SerializedName("day") + DAY("day"), + + @SerializedName("month") + MONTH("month"), + + @SerializedName("week") + WEEK("week"), + + @SerializedName("year") + YEAR("year"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PurchaseInterval(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Subscription { + /** + * 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. Unit of time between subscription charges. */ + @SerializedName("interval") + Interval interval; + + /** + * The number of intervals (specified in the {@code interval} attribute) between + * subscription charges. For example, {@code interval=month} and {@code interval_count=3} + * charges every 3 months. + */ + @SerializedName("interval_count") + Long intervalCount; + + /** Name for subscription. */ + @SerializedName("name") + String name; + + /** Required. Describes the upcoming charge for this subscription. */ + @SerializedName("next_billing") + NextBilling nextBilling; + + /** + * Required. A non-customer-facing reference to correlate subscription + * charges in the Klarna app. Use a value that persists across subscription charges. + */ + @SerializedName("reference") + String reference; + + private Subscription( + Map extraParams, + Interval interval, + Long intervalCount, + String name, + NextBilling nextBilling, + String reference) { + this.extraParams = extraParams; + this.interval = interval; + this.intervalCount = intervalCount; + this.name = name; + this.nextBilling = nextBilling; + this.reference = reference; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Interval interval; + + private Long intervalCount; + + private String name; + + private NextBilling nextBilling; + + private String reference; + + /** Finalize and obtain parameter instance from this builder. */ + public SetupIntentConfirmParams.PaymentMethodOptions.Klarna.Subscription build() { + return new SetupIntentConfirmParams.PaymentMethodOptions.Klarna.Subscription( + this.extraParams, + this.interval, + this.intervalCount, + this.name, + this.nextBilling, + this.reference); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * SetupIntentConfirmParams.PaymentMethodOptions.Klarna.Subscription#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * SetupIntentConfirmParams.PaymentMethodOptions.Klarna.Subscription#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. Unit of time between subscription charges. */ + public Builder setInterval( + SetupIntentConfirmParams.PaymentMethodOptions.Klarna.Subscription.Interval interval) { + this.interval = interval; + return this; + } + + /** + * The number of intervals (specified in the {@code interval} attribute) between + * subscription charges. For example, {@code interval=month} and {@code interval_count=3} + * charges every 3 months. + */ + public Builder setIntervalCount(Long intervalCount) { + this.intervalCount = intervalCount; + return this; + } + + /** Name for subscription. */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** Required. Describes the upcoming charge for this subscription. */ + public Builder setNextBilling( + SetupIntentConfirmParams.PaymentMethodOptions.Klarna.Subscription.NextBilling + nextBilling) { + this.nextBilling = nextBilling; + return this; + } + + /** + * Required. A non-customer-facing reference to correlate subscription + * charges in the Klarna app. Use a value that persists across subscription charges. + */ + public Builder setReference(String reference) { + this.reference = reference; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class NextBilling { + /** Required. The amount of the next charge for the subscription. */ + @SerializedName("amount") + Long amount; + + /** + * Required. The date of the next charge for the subscription in + * YYYY-MM-DD format. + */ + @SerializedName("date") + String date; + + /** + * 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 NextBilling(Long amount, String date, Map extraParams) { + this.amount = amount; + this.date = date; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private String date; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public SetupIntentConfirmParams.PaymentMethodOptions.Klarna.Subscription.NextBilling + build() { + return new SetupIntentConfirmParams.PaymentMethodOptions.Klarna.Subscription + .NextBilling(this.amount, this.date, this.extraParams); + } + + /** Required. The amount of the next charge for the subscription. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** + * Required. The date of the next charge for the subscription in + * YYYY-MM-DD format. + */ + public Builder setDate(String date) { + this.date = date; + 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 + * SetupIntentConfirmParams.PaymentMethodOptions.Klarna.Subscription.NextBilling#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * SetupIntentConfirmParams.PaymentMethodOptions.Klarna.Subscription.NextBilling#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + public enum Interval implements ApiRequestParams.EnumParam { + @SerializedName("day") + DAY("day"), + + @SerializedName("month") + MONTH("month"), + + @SerializedName("week") + WEEK("week"), + + @SerializedName("year") + YEAR("year"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Interval(String value) { + this.value = value; + } + } + } + + public enum PreferredLocale implements ApiRequestParams.EnumParam { + @SerializedName("cs-CZ") + CS_CZ("cs-CZ"), + + @SerializedName("da-DK") + DA_DK("da-DK"), + + @SerializedName("de-AT") + DE_AT("de-AT"), + + @SerializedName("de-CH") + DE_CH("de-CH"), + + @SerializedName("de-DE") + DE_DE("de-DE"), + + @SerializedName("el-GR") + EL_GR("el-GR"), + + @SerializedName("en-AT") + EN_AT("en-AT"), + + @SerializedName("en-AU") + EN_AU("en-AU"), + + @SerializedName("en-BE") + EN_BE("en-BE"), + + @SerializedName("en-CA") + EN_CA("en-CA"), + + @SerializedName("en-CH") + EN_CH("en-CH"), + + @SerializedName("en-CZ") + EN_CZ("en-CZ"), + + @SerializedName("en-DE") + EN_DE("en-DE"), + + @SerializedName("en-DK") + EN_DK("en-DK"), + + @SerializedName("en-ES") + EN_ES("en-ES"), + + @SerializedName("en-FI") + EN_FI("en-FI"), + + @SerializedName("en-FR") + EN_FR("en-FR"), + + @SerializedName("en-GB") + EN_GB("en-GB"), + + @SerializedName("en-GR") + EN_GR("en-GR"), + + @SerializedName("en-IE") + EN_IE("en-IE"), + + @SerializedName("en-IT") + EN_IT("en-IT"), + + @SerializedName("en-NL") + EN_NL("en-NL"), + + @SerializedName("en-NO") + EN_NO("en-NO"), + + @SerializedName("en-NZ") + EN_NZ("en-NZ"), + + @SerializedName("en-PL") + EN_PL("en-PL"), + + @SerializedName("en-PT") + EN_PT("en-PT"), + + @SerializedName("en-RO") + EN_RO("en-RO"), + + @SerializedName("en-SE") + EN_SE("en-SE"), + + @SerializedName("en-US") + EN_US("en-US"), + + @SerializedName("es-ES") + ES_ES("es-ES"), + + @SerializedName("es-US") + ES_US("es-US"), + + @SerializedName("fi-FI") + FI_FI("fi-FI"), + + @SerializedName("fr-BE") + FR_BE("fr-BE"), + + @SerializedName("fr-CA") + FR_CA("fr-CA"), + + @SerializedName("fr-CH") + FR_CH("fr-CH"), + + @SerializedName("fr-FR") + FR_FR("fr-FR"), + + @SerializedName("it-CH") + IT_CH("it-CH"), + + @SerializedName("it-IT") + IT_IT("it-IT"), + + @SerializedName("nb-NO") + NB_NO("nb-NO"), + + @SerializedName("nl-BE") + NL_BE("nl-BE"), + + @SerializedName("nl-NL") + NL_NL("nl-NL"), + + @SerializedName("pl-PL") + PL_PL("pl-PL"), + + @SerializedName("pt-PT") + PT_PT("pt-PT"), + + @SerializedName("ro-RO") + RO_RO("ro-RO"), + + @SerializedName("sv-FI") + SV_FI("sv-FI"), + + @SerializedName("sv-SE") + SV_SE("sv-SE"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PreferredLocale(String value) { + this.value = value; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Link { diff --git a/src/main/java/com/stripe/param/SetupIntentCreateParams.java b/src/main/java/com/stripe/param/SetupIntentCreateParams.java index eb0fdba4b76..e4840b570aa 100644 --- a/src/main/java/com/stripe/param/SetupIntentCreateParams.java +++ b/src/main/java/com/stripe/param/SetupIntentCreateParams.java @@ -144,7 +144,9 @@ public class SetupIntentCreateParams extends ApiRequestParams { /** * The list of payment method types (for example, card) that this SetupIntent can use. If you * don't provide this, Stripe will dynamically show relevant payment methods from your payment method settings. + * href="https://dashboard.stripe.com/settings/payment_methods">payment method settings. A + * list of valid payment method types can be found here. */ @SerializedName("payment_method_types") List paymentMethodTypes; @@ -1233,6 +1235,13 @@ public static class PaymentMethodData { @SerializedName("cashapp") Cashapp cashapp; + /** + * If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment + * method. + */ + @SerializedName("crypto") + Crypto crypto; + /** * If this is a {@code customer_balance} PaymentMethod, this hash contains details about the * CustomerBalance payment method. @@ -1571,6 +1580,7 @@ private PaymentMethodData( Blik blik, Boleto boleto, Cashapp cashapp, + Crypto crypto, CustomerBalance customerBalance, Eps eps, Map extraParams, @@ -1632,6 +1642,7 @@ private PaymentMethodData( this.blik = blik; this.boleto = boleto; this.cashapp = cashapp; + this.crypto = crypto; this.customerBalance = customerBalance; this.eps = eps; this.extraParams = extraParams; @@ -1715,6 +1726,8 @@ public static class Builder { private Cashapp cashapp; + private Crypto crypto; + private CustomerBalance customerBalance; private Eps eps; @@ -1825,6 +1838,7 @@ public SetupIntentCreateParams.PaymentMethodData build() { this.blik, this.boleto, this.cashapp, + this.crypto, this.customerBalance, this.eps, this.extraParams, @@ -2014,6 +2028,15 @@ public Builder setCashapp(SetupIntentCreateParams.PaymentMethodData.Cashapp cash return this; } + /** + * If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment + * method. + */ + public Builder setCrypto(SetupIntentCreateParams.PaymentMethodData.Crypto crypto) { + this.crypto = crypto; + return this; + } + /** * If this is a {@code customer_balance} PaymentMethod, this hash contains details about the * CustomerBalance payment method. @@ -3663,6 +3686,64 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Crypto { + /** + * 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 Crypto(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public SetupIntentCreateParams.PaymentMethodData.Crypto build() { + return new SetupIntentCreateParams.PaymentMethodData.Crypto(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SetupIntentCreateParams.PaymentMethodData.Crypto#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SetupIntentCreateParams.PaymentMethodData.Crypto#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 CustomerBalance { @@ -4417,6 +4498,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("bunq") BUNQ("bunq"), + @SerializedName("buut") + BUUT("buut"), + @SerializedName("handelsbanken") HANDELSBANKEN("handelsbanken"), @@ -7299,6 +7383,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("cashapp") CASHAPP("cashapp"), + @SerializedName("crypto") + CRYPTO("crypto"), + @SerializedName("customer_balance") CUSTOMER_BALANCE("customer_balance"), @@ -7475,6 +7562,13 @@ public static class PaymentMethodOptions { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** + * If this is a {@code klarna} PaymentMethod, this hash contains details about the Klarna + * payment method options. + */ + @SerializedName("klarna") + Klarna klarna; + /** * If this is a {@code link} PaymentMethod, this sub-hash contains details about the Link * payment method options. @@ -7517,6 +7611,7 @@ private PaymentMethodOptions( Card card, CardPresent cardPresent, Map extraParams, + Klarna klarna, Link link, Paypal paypal, Payto payto, @@ -7528,6 +7623,7 @@ private PaymentMethodOptions( this.card = card; this.cardPresent = cardPresent; this.extraParams = extraParams; + this.klarna = klarna; this.link = link; this.paypal = paypal; this.payto = payto; @@ -7552,6 +7648,8 @@ public static class Builder { private Map extraParams; + private Klarna klarna; + private Link link; private Paypal paypal; @@ -7571,6 +7669,7 @@ public SetupIntentCreateParams.PaymentMethodOptions build() { this.card, this.cardPresent, this.extraParams, + this.klarna, this.link, this.paypal, this.payto, @@ -7651,6 +7750,15 @@ public Builder putAllExtraParam(Map map) { return this; } + /** + * If this is a {@code klarna} PaymentMethod, this hash contains details about the Klarna + * payment method options. + */ + public Builder setKlarna(SetupIntentCreateParams.PaymentMethodOptions.Klarna klarna) { + this.klarna = klarna; + return this; + } + /** * If this is a {@code link} PaymentMethod, this sub-hash contains details about the Link * payment method options. @@ -9496,6 +9604,772 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Klarna { + /** The currency of the SetupIntent. Three letter ISO currency code. */ + @SerializedName("currency") + String currency; + + /** + * 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; + + /** On-demand details if setting up a payment method for on-demand payments. */ + @SerializedName("on_demand") + OnDemand onDemand; + + /** Preferred language of the Klarna authorization page that the customer is redirected to. */ + @SerializedName("preferred_locale") + PreferredLocale preferredLocale; + + /** Subscription details if setting up or charging a subscription. */ + @SerializedName("subscriptions") + Object subscriptions; + + private Klarna( + String currency, + Map extraParams, + OnDemand onDemand, + PreferredLocale preferredLocale, + Object subscriptions) { + this.currency = currency; + this.extraParams = extraParams; + this.onDemand = onDemand; + this.preferredLocale = preferredLocale; + this.subscriptions = subscriptions; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String currency; + + private Map extraParams; + + private OnDemand onDemand; + + private PreferredLocale preferredLocale; + + private Object subscriptions; + + /** Finalize and obtain parameter instance from this builder. */ + public SetupIntentCreateParams.PaymentMethodOptions.Klarna build() { + return new SetupIntentCreateParams.PaymentMethodOptions.Klarna( + this.currency, + this.extraParams, + this.onDemand, + this.preferredLocale, + this.subscriptions); + } + + /** The currency of the SetupIntent. Three letter ISO currency code. */ + public Builder setCurrency(String currency) { + this.currency = currency; + 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 SetupIntentCreateParams.PaymentMethodOptions.Klarna#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SetupIntentCreateParams.PaymentMethodOptions.Klarna#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** On-demand details if setting up a payment method for on-demand payments. */ + public Builder setOnDemand( + SetupIntentCreateParams.PaymentMethodOptions.Klarna.OnDemand onDemand) { + this.onDemand = onDemand; + return this; + } + + /** + * Preferred language of the Klarna authorization page that the customer is redirected to. + */ + public Builder setPreferredLocale( + SetupIntentCreateParams.PaymentMethodOptions.Klarna.PreferredLocale preferredLocale) { + this.preferredLocale = preferredLocale; + return this; + } + + /** + * Add an element to `subscriptions` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * SetupIntentCreateParams.PaymentMethodOptions.Klarna#subscriptions} for the field + * documentation. + */ + @SuppressWarnings("unchecked") + public Builder addSubscription( + SetupIntentCreateParams.PaymentMethodOptions.Klarna.Subscription element) { + if (this.subscriptions == null || this.subscriptions instanceof EmptyParam) { + this.subscriptions = + new ArrayList(); + } + ((List) + this.subscriptions) + .add(element); + return this; + } + + /** + * Add all elements to `subscriptions` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link SetupIntentCreateParams.PaymentMethodOptions.Klarna#subscriptions} for the + * field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllSubscription( + List elements) { + if (this.subscriptions == null || this.subscriptions instanceof EmptyParam) { + this.subscriptions = + new ArrayList(); + } + ((List) + this.subscriptions) + .addAll(elements); + return this; + } + + /** Subscription details if setting up or charging a subscription. */ + public Builder setSubscriptions(EmptyParam subscriptions) { + this.subscriptions = subscriptions; + return this; + } + + /** Subscription details if setting up or charging a subscription. */ + public Builder setSubscriptions( + List subscriptions) { + this.subscriptions = subscriptions; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class OnDemand { + /** + * Your average amount value. You can use a value across your customer base, or segment + * based on customer type, country, etc. + */ + @SerializedName("average_amount") + Long averageAmount; + + /** + * 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 maximum value you may charge a customer per purchase. You can use a value across your + * customer base, or segment based on customer type, country, etc. + */ + @SerializedName("maximum_amount") + Long maximumAmount; + + /** + * The lowest or minimum value you may charge a customer per purchase. You can use a value + * across your customer base, or segment based on customer type, country, etc. + */ + @SerializedName("minimum_amount") + Long minimumAmount; + + /** Interval at which the customer is making purchases. */ + @SerializedName("purchase_interval") + PurchaseInterval purchaseInterval; + + /** The number of {@code purchase_interval} between charges. */ + @SerializedName("purchase_interval_count") + Long purchaseIntervalCount; + + private OnDemand( + Long averageAmount, + Map extraParams, + Long maximumAmount, + Long minimumAmount, + PurchaseInterval purchaseInterval, + Long purchaseIntervalCount) { + this.averageAmount = averageAmount; + this.extraParams = extraParams; + this.maximumAmount = maximumAmount; + this.minimumAmount = minimumAmount; + this.purchaseInterval = purchaseInterval; + this.purchaseIntervalCount = purchaseIntervalCount; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long averageAmount; + + private Map extraParams; + + private Long maximumAmount; + + private Long minimumAmount; + + private PurchaseInterval purchaseInterval; + + private Long purchaseIntervalCount; + + /** Finalize and obtain parameter instance from this builder. */ + public SetupIntentCreateParams.PaymentMethodOptions.Klarna.OnDemand build() { + return new SetupIntentCreateParams.PaymentMethodOptions.Klarna.OnDemand( + this.averageAmount, + this.extraParams, + this.maximumAmount, + this.minimumAmount, + this.purchaseInterval, + this.purchaseIntervalCount); + } + + /** + * Your average amount value. You can use a value across your customer base, or segment + * based on customer type, country, etc. + */ + public Builder setAverageAmount(Long averageAmount) { + this.averageAmount = averageAmount; + 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 + * SetupIntentCreateParams.PaymentMethodOptions.Klarna.OnDemand#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * SetupIntentCreateParams.PaymentMethodOptions.Klarna.OnDemand#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 maximum value you may charge a customer per purchase. You can use a value across + * your customer base, or segment based on customer type, country, etc. + */ + public Builder setMaximumAmount(Long maximumAmount) { + this.maximumAmount = maximumAmount; + return this; + } + + /** + * The lowest or minimum value you may charge a customer per purchase. You can use a value + * across your customer base, or segment based on customer type, country, etc. + */ + public Builder setMinimumAmount(Long minimumAmount) { + this.minimumAmount = minimumAmount; + return this; + } + + /** Interval at which the customer is making purchases. */ + public Builder setPurchaseInterval( + SetupIntentCreateParams.PaymentMethodOptions.Klarna.OnDemand.PurchaseInterval + purchaseInterval) { + this.purchaseInterval = purchaseInterval; + return this; + } + + /** The number of {@code purchase_interval} between charges. */ + public Builder setPurchaseIntervalCount(Long purchaseIntervalCount) { + this.purchaseIntervalCount = purchaseIntervalCount; + return this; + } + } + + public enum PurchaseInterval implements ApiRequestParams.EnumParam { + @SerializedName("day") + DAY("day"), + + @SerializedName("month") + MONTH("month"), + + @SerializedName("week") + WEEK("week"), + + @SerializedName("year") + YEAR("year"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PurchaseInterval(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Subscription { + /** + * 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. Unit of time between subscription charges. */ + @SerializedName("interval") + Interval interval; + + /** + * The number of intervals (specified in the {@code interval} attribute) between + * subscription charges. For example, {@code interval=month} and {@code interval_count=3} + * charges every 3 months. + */ + @SerializedName("interval_count") + Long intervalCount; + + /** Name for subscription. */ + @SerializedName("name") + String name; + + /** Required. Describes the upcoming charge for this subscription. */ + @SerializedName("next_billing") + NextBilling nextBilling; + + /** + * Required. A non-customer-facing reference to correlate subscription + * charges in the Klarna app. Use a value that persists across subscription charges. + */ + @SerializedName("reference") + String reference; + + private Subscription( + Map extraParams, + Interval interval, + Long intervalCount, + String name, + NextBilling nextBilling, + String reference) { + this.extraParams = extraParams; + this.interval = interval; + this.intervalCount = intervalCount; + this.name = name; + this.nextBilling = nextBilling; + this.reference = reference; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Interval interval; + + private Long intervalCount; + + private String name; + + private NextBilling nextBilling; + + private String reference; + + /** Finalize and obtain parameter instance from this builder. */ + public SetupIntentCreateParams.PaymentMethodOptions.Klarna.Subscription build() { + return new SetupIntentCreateParams.PaymentMethodOptions.Klarna.Subscription( + this.extraParams, + this.interval, + this.intervalCount, + this.name, + this.nextBilling, + this.reference); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * SetupIntentCreateParams.PaymentMethodOptions.Klarna.Subscription#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * SetupIntentCreateParams.PaymentMethodOptions.Klarna.Subscription#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. Unit of time between subscription charges. */ + public Builder setInterval( + SetupIntentCreateParams.PaymentMethodOptions.Klarna.Subscription.Interval interval) { + this.interval = interval; + return this; + } + + /** + * The number of intervals (specified in the {@code interval} attribute) between + * subscription charges. For example, {@code interval=month} and {@code interval_count=3} + * charges every 3 months. + */ + public Builder setIntervalCount(Long intervalCount) { + this.intervalCount = intervalCount; + return this; + } + + /** Name for subscription. */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** Required. Describes the upcoming charge for this subscription. */ + public Builder setNextBilling( + SetupIntentCreateParams.PaymentMethodOptions.Klarna.Subscription.NextBilling + nextBilling) { + this.nextBilling = nextBilling; + return this; + } + + /** + * Required. A non-customer-facing reference to correlate subscription + * charges in the Klarna app. Use a value that persists across subscription charges. + */ + public Builder setReference(String reference) { + this.reference = reference; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class NextBilling { + /** Required. The amount of the next charge for the subscription. */ + @SerializedName("amount") + Long amount; + + /** + * Required. The date of the next charge for the subscription in + * YYYY-MM-DD format. + */ + @SerializedName("date") + String date; + + /** + * 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 NextBilling(Long amount, String date, Map extraParams) { + this.amount = amount; + this.date = date; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private String date; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public SetupIntentCreateParams.PaymentMethodOptions.Klarna.Subscription.NextBilling + build() { + return new SetupIntentCreateParams.PaymentMethodOptions.Klarna.Subscription + .NextBilling(this.amount, this.date, this.extraParams); + } + + /** Required. The amount of the next charge for the subscription. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** + * Required. The date of the next charge for the subscription in + * YYYY-MM-DD format. + */ + public Builder setDate(String date) { + this.date = date; + 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 + * SetupIntentCreateParams.PaymentMethodOptions.Klarna.Subscription.NextBilling#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * SetupIntentCreateParams.PaymentMethodOptions.Klarna.Subscription.NextBilling#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + public enum Interval implements ApiRequestParams.EnumParam { + @SerializedName("day") + DAY("day"), + + @SerializedName("month") + MONTH("month"), + + @SerializedName("week") + WEEK("week"), + + @SerializedName("year") + YEAR("year"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Interval(String value) { + this.value = value; + } + } + } + + public enum PreferredLocale implements ApiRequestParams.EnumParam { + @SerializedName("cs-CZ") + CS_CZ("cs-CZ"), + + @SerializedName("da-DK") + DA_DK("da-DK"), + + @SerializedName("de-AT") + DE_AT("de-AT"), + + @SerializedName("de-CH") + DE_CH("de-CH"), + + @SerializedName("de-DE") + DE_DE("de-DE"), + + @SerializedName("el-GR") + EL_GR("el-GR"), + + @SerializedName("en-AT") + EN_AT("en-AT"), + + @SerializedName("en-AU") + EN_AU("en-AU"), + + @SerializedName("en-BE") + EN_BE("en-BE"), + + @SerializedName("en-CA") + EN_CA("en-CA"), + + @SerializedName("en-CH") + EN_CH("en-CH"), + + @SerializedName("en-CZ") + EN_CZ("en-CZ"), + + @SerializedName("en-DE") + EN_DE("en-DE"), + + @SerializedName("en-DK") + EN_DK("en-DK"), + + @SerializedName("en-ES") + EN_ES("en-ES"), + + @SerializedName("en-FI") + EN_FI("en-FI"), + + @SerializedName("en-FR") + EN_FR("en-FR"), + + @SerializedName("en-GB") + EN_GB("en-GB"), + + @SerializedName("en-GR") + EN_GR("en-GR"), + + @SerializedName("en-IE") + EN_IE("en-IE"), + + @SerializedName("en-IT") + EN_IT("en-IT"), + + @SerializedName("en-NL") + EN_NL("en-NL"), + + @SerializedName("en-NO") + EN_NO("en-NO"), + + @SerializedName("en-NZ") + EN_NZ("en-NZ"), + + @SerializedName("en-PL") + EN_PL("en-PL"), + + @SerializedName("en-PT") + EN_PT("en-PT"), + + @SerializedName("en-RO") + EN_RO("en-RO"), + + @SerializedName("en-SE") + EN_SE("en-SE"), + + @SerializedName("en-US") + EN_US("en-US"), + + @SerializedName("es-ES") + ES_ES("es-ES"), + + @SerializedName("es-US") + ES_US("es-US"), + + @SerializedName("fi-FI") + FI_FI("fi-FI"), + + @SerializedName("fr-BE") + FR_BE("fr-BE"), + + @SerializedName("fr-CA") + FR_CA("fr-CA"), + + @SerializedName("fr-CH") + FR_CH("fr-CH"), + + @SerializedName("fr-FR") + FR_FR("fr-FR"), + + @SerializedName("it-CH") + IT_CH("it-CH"), + + @SerializedName("it-IT") + IT_IT("it-IT"), + + @SerializedName("nb-NO") + NB_NO("nb-NO"), + + @SerializedName("nl-BE") + NL_BE("nl-BE"), + + @SerializedName("nl-NL") + NL_NL("nl-NL"), + + @SerializedName("pl-PL") + PL_PL("pl-PL"), + + @SerializedName("pt-PT") + PT_PT("pt-PT"), + + @SerializedName("ro-RO") + RO_RO("ro-RO"), + + @SerializedName("sv-FI") + SV_FI("sv-FI"), + + @SerializedName("sv-SE") + SV_SE("sv-SE"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PreferredLocale(String value) { + this.value = value; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Link { diff --git a/src/main/java/com/stripe/param/SetupIntentUpdateParams.java b/src/main/java/com/stripe/param/SetupIntentUpdateParams.java index 6ef7ecabaff..7f34784c401 100644 --- a/src/main/java/com/stripe/param/SetupIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/SetupIntentUpdateParams.java @@ -108,7 +108,9 @@ public class SetupIntentUpdateParams extends ApiRequestParams { /** * The list of payment method types (for example, card) that this SetupIntent can set up. If you * don't provide this, Stripe will dynamically show relevant payment methods from your payment method settings. + * href="https://dashboard.stripe.com/settings/payment_methods">payment method settings. A + * list of valid payment method types can be found here. */ @SerializedName("payment_method_types") List paymentMethodTypes; @@ -581,6 +583,13 @@ public static class PaymentMethodData { @SerializedName("cashapp") Cashapp cashapp; + /** + * If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment + * method. + */ + @SerializedName("crypto") + Crypto crypto; + /** * If this is a {@code customer_balance} PaymentMethod, this hash contains details about the * CustomerBalance payment method. @@ -919,6 +928,7 @@ private PaymentMethodData( Blik blik, Boleto boleto, Cashapp cashapp, + Crypto crypto, CustomerBalance customerBalance, Eps eps, Map extraParams, @@ -980,6 +990,7 @@ private PaymentMethodData( this.blik = blik; this.boleto = boleto; this.cashapp = cashapp; + this.crypto = crypto; this.customerBalance = customerBalance; this.eps = eps; this.extraParams = extraParams; @@ -1063,6 +1074,8 @@ public static class Builder { private Cashapp cashapp; + private Crypto crypto; + private CustomerBalance customerBalance; private Eps eps; @@ -1173,6 +1186,7 @@ public SetupIntentUpdateParams.PaymentMethodData build() { this.blik, this.boleto, this.cashapp, + this.crypto, this.customerBalance, this.eps, this.extraParams, @@ -1362,6 +1376,15 @@ public Builder setCashapp(SetupIntentUpdateParams.PaymentMethodData.Cashapp cash return this; } + /** + * If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment + * method. + */ + public Builder setCrypto(SetupIntentUpdateParams.PaymentMethodData.Crypto crypto) { + this.crypto = crypto; + return this; + } + /** * If this is a {@code customer_balance} PaymentMethod, this hash contains details about the * CustomerBalance payment method. @@ -3110,6 +3133,64 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Crypto { + /** + * 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 Crypto(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public SetupIntentUpdateParams.PaymentMethodData.Crypto build() { + return new SetupIntentUpdateParams.PaymentMethodData.Crypto(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SetupIntentUpdateParams.PaymentMethodData.Crypto#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SetupIntentUpdateParams.PaymentMethodData.Crypto#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 CustomerBalance { @@ -3864,6 +3945,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("bunq") BUNQ("bunq"), + @SerializedName("buut") + BUUT("buut"), + @SerializedName("handelsbanken") HANDELSBANKEN("handelsbanken"), @@ -6842,6 +6926,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("cashapp") CASHAPP("cashapp"), + @SerializedName("crypto") + CRYPTO("crypto"), + @SerializedName("customer_balance") CUSTOMER_BALANCE("customer_balance"), @@ -7018,6 +7105,13 @@ public static class PaymentMethodOptions { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** + * If this is a {@code klarna} PaymentMethod, this hash contains details about the Klarna + * payment method options. + */ + @SerializedName("klarna") + Klarna klarna; + /** * If this is a {@code link} PaymentMethod, this sub-hash contains details about the Link * payment method options. @@ -7060,6 +7154,7 @@ private PaymentMethodOptions( Card card, CardPresent cardPresent, Map extraParams, + Klarna klarna, Link link, Paypal paypal, Payto payto, @@ -7071,6 +7166,7 @@ private PaymentMethodOptions( this.card = card; this.cardPresent = cardPresent; this.extraParams = extraParams; + this.klarna = klarna; this.link = link; this.paypal = paypal; this.payto = payto; @@ -7095,6 +7191,8 @@ public static class Builder { private Map extraParams; + private Klarna klarna; + private Link link; private Paypal paypal; @@ -7114,6 +7212,7 @@ public SetupIntentUpdateParams.PaymentMethodOptions build() { this.card, this.cardPresent, this.extraParams, + this.klarna, this.link, this.paypal, this.payto, @@ -7194,6 +7293,15 @@ public Builder putAllExtraParam(Map map) { return this; } + /** + * If this is a {@code klarna} PaymentMethod, this hash contains details about the Klarna + * payment method options. + */ + public Builder setKlarna(SetupIntentUpdateParams.PaymentMethodOptions.Klarna klarna) { + this.klarna = klarna; + return this; + } + /** * If this is a {@code link} PaymentMethod, this sub-hash contains details about the Link * payment method options. @@ -9113,6 +9221,802 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Klarna { + /** The currency of the SetupIntent. Three letter ISO currency code. */ + @SerializedName("currency") + Object currency; + + /** + * 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; + + /** On-demand details if setting up a payment method for on-demand payments. */ + @SerializedName("on_demand") + OnDemand onDemand; + + /** Preferred language of the Klarna authorization page that the customer is redirected to. */ + @SerializedName("preferred_locale") + PreferredLocale preferredLocale; + + /** Subscription details if setting up or charging a subscription. */ + @SerializedName("subscriptions") + Object subscriptions; + + private Klarna( + Object currency, + Map extraParams, + OnDemand onDemand, + PreferredLocale preferredLocale, + Object subscriptions) { + this.currency = currency; + this.extraParams = extraParams; + this.onDemand = onDemand; + this.preferredLocale = preferredLocale; + this.subscriptions = subscriptions; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object currency; + + private Map extraParams; + + private OnDemand onDemand; + + private PreferredLocale preferredLocale; + + private Object subscriptions; + + /** Finalize and obtain parameter instance from this builder. */ + public SetupIntentUpdateParams.PaymentMethodOptions.Klarna build() { + return new SetupIntentUpdateParams.PaymentMethodOptions.Klarna( + this.currency, + this.extraParams, + this.onDemand, + this.preferredLocale, + this.subscriptions); + } + + /** The currency of the SetupIntent. Three letter ISO currency code. */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** The currency of the SetupIntent. Three letter ISO currency code. */ + public Builder setCurrency(EmptyParam currency) { + this.currency = currency; + 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 SetupIntentUpdateParams.PaymentMethodOptions.Klarna#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SetupIntentUpdateParams.PaymentMethodOptions.Klarna#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** On-demand details if setting up a payment method for on-demand payments. */ + public Builder setOnDemand( + SetupIntentUpdateParams.PaymentMethodOptions.Klarna.OnDemand onDemand) { + this.onDemand = onDemand; + return this; + } + + /** + * Preferred language of the Klarna authorization page that the customer is redirected to. + */ + public Builder setPreferredLocale( + SetupIntentUpdateParams.PaymentMethodOptions.Klarna.PreferredLocale preferredLocale) { + this.preferredLocale = preferredLocale; + return this; + } + + /** + * Add an element to `subscriptions` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * SetupIntentUpdateParams.PaymentMethodOptions.Klarna#subscriptions} for the field + * documentation. + */ + @SuppressWarnings("unchecked") + public Builder addSubscription( + SetupIntentUpdateParams.PaymentMethodOptions.Klarna.Subscription element) { + if (this.subscriptions == null || this.subscriptions instanceof EmptyParam) { + this.subscriptions = + new ArrayList(); + } + ((List) + this.subscriptions) + .add(element); + return this; + } + + /** + * Add all elements to `subscriptions` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link SetupIntentUpdateParams.PaymentMethodOptions.Klarna#subscriptions} for the + * field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllSubscription( + List elements) { + if (this.subscriptions == null || this.subscriptions instanceof EmptyParam) { + this.subscriptions = + new ArrayList(); + } + ((List) + this.subscriptions) + .addAll(elements); + return this; + } + + /** Subscription details if setting up or charging a subscription. */ + public Builder setSubscriptions(EmptyParam subscriptions) { + this.subscriptions = subscriptions; + return this; + } + + /** Subscription details if setting up or charging a subscription. */ + public Builder setSubscriptions( + List subscriptions) { + this.subscriptions = subscriptions; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class OnDemand { + /** + * Your average amount value. You can use a value across your customer base, or segment + * based on customer type, country, etc. + */ + @SerializedName("average_amount") + Long averageAmount; + + /** + * 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 maximum value you may charge a customer per purchase. You can use a value across your + * customer base, or segment based on customer type, country, etc. + */ + @SerializedName("maximum_amount") + Long maximumAmount; + + /** + * The lowest or minimum value you may charge a customer per purchase. You can use a value + * across your customer base, or segment based on customer type, country, etc. + */ + @SerializedName("minimum_amount") + Long minimumAmount; + + /** Interval at which the customer is making purchases. */ + @SerializedName("purchase_interval") + PurchaseInterval purchaseInterval; + + /** The number of {@code purchase_interval} between charges. */ + @SerializedName("purchase_interval_count") + Long purchaseIntervalCount; + + private OnDemand( + Long averageAmount, + Map extraParams, + Long maximumAmount, + Long minimumAmount, + PurchaseInterval purchaseInterval, + Long purchaseIntervalCount) { + this.averageAmount = averageAmount; + this.extraParams = extraParams; + this.maximumAmount = maximumAmount; + this.minimumAmount = minimumAmount; + this.purchaseInterval = purchaseInterval; + this.purchaseIntervalCount = purchaseIntervalCount; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long averageAmount; + + private Map extraParams; + + private Long maximumAmount; + + private Long minimumAmount; + + private PurchaseInterval purchaseInterval; + + private Long purchaseIntervalCount; + + /** Finalize and obtain parameter instance from this builder. */ + public SetupIntentUpdateParams.PaymentMethodOptions.Klarna.OnDemand build() { + return new SetupIntentUpdateParams.PaymentMethodOptions.Klarna.OnDemand( + this.averageAmount, + this.extraParams, + this.maximumAmount, + this.minimumAmount, + this.purchaseInterval, + this.purchaseIntervalCount); + } + + /** + * Your average amount value. You can use a value across your customer base, or segment + * based on customer type, country, etc. + */ + public Builder setAverageAmount(Long averageAmount) { + this.averageAmount = averageAmount; + 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 + * SetupIntentUpdateParams.PaymentMethodOptions.Klarna.OnDemand#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * SetupIntentUpdateParams.PaymentMethodOptions.Klarna.OnDemand#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 maximum value you may charge a customer per purchase. You can use a value across + * your customer base, or segment based on customer type, country, etc. + */ + public Builder setMaximumAmount(Long maximumAmount) { + this.maximumAmount = maximumAmount; + return this; + } + + /** + * The lowest or minimum value you may charge a customer per purchase. You can use a value + * across your customer base, or segment based on customer type, country, etc. + */ + public Builder setMinimumAmount(Long minimumAmount) { + this.minimumAmount = minimumAmount; + return this; + } + + /** Interval at which the customer is making purchases. */ + public Builder setPurchaseInterval( + SetupIntentUpdateParams.PaymentMethodOptions.Klarna.OnDemand.PurchaseInterval + purchaseInterval) { + this.purchaseInterval = purchaseInterval; + return this; + } + + /** The number of {@code purchase_interval} between charges. */ + public Builder setPurchaseIntervalCount(Long purchaseIntervalCount) { + this.purchaseIntervalCount = purchaseIntervalCount; + return this; + } + } + + public enum PurchaseInterval implements ApiRequestParams.EnumParam { + @SerializedName("day") + DAY("day"), + + @SerializedName("month") + MONTH("month"), + + @SerializedName("week") + WEEK("week"), + + @SerializedName("year") + YEAR("year"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PurchaseInterval(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Subscription { + /** + * 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. Unit of time between subscription charges. */ + @SerializedName("interval") + Interval interval; + + /** + * The number of intervals (specified in the {@code interval} attribute) between + * subscription charges. For example, {@code interval=month} and {@code interval_count=3} + * charges every 3 months. + */ + @SerializedName("interval_count") + Long intervalCount; + + /** Name for subscription. */ + @SerializedName("name") + Object name; + + /** Required. Describes the upcoming charge for this subscription. */ + @SerializedName("next_billing") + NextBilling nextBilling; + + /** + * Required. A non-customer-facing reference to correlate subscription + * charges in the Klarna app. Use a value that persists across subscription charges. + */ + @SerializedName("reference") + Object reference; + + private Subscription( + Map extraParams, + Interval interval, + Long intervalCount, + Object name, + NextBilling nextBilling, + Object reference) { + this.extraParams = extraParams; + this.interval = interval; + this.intervalCount = intervalCount; + this.name = name; + this.nextBilling = nextBilling; + this.reference = reference; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Interval interval; + + private Long intervalCount; + + private Object name; + + private NextBilling nextBilling; + + private Object reference; + + /** Finalize and obtain parameter instance from this builder. */ + public SetupIntentUpdateParams.PaymentMethodOptions.Klarna.Subscription build() { + return new SetupIntentUpdateParams.PaymentMethodOptions.Klarna.Subscription( + this.extraParams, + this.interval, + this.intervalCount, + this.name, + this.nextBilling, + this.reference); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * SetupIntentUpdateParams.PaymentMethodOptions.Klarna.Subscription#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * SetupIntentUpdateParams.PaymentMethodOptions.Klarna.Subscription#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. Unit of time between subscription charges. */ + public Builder setInterval( + SetupIntentUpdateParams.PaymentMethodOptions.Klarna.Subscription.Interval interval) { + this.interval = interval; + return this; + } + + /** + * The number of intervals (specified in the {@code interval} attribute) between + * subscription charges. For example, {@code interval=month} and {@code interval_count=3} + * charges every 3 months. + */ + public Builder setIntervalCount(Long intervalCount) { + this.intervalCount = intervalCount; + return this; + } + + /** Name for subscription. */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** Name for subscription. */ + public Builder setName(EmptyParam name) { + this.name = name; + return this; + } + + /** Required. Describes the upcoming charge for this subscription. */ + public Builder setNextBilling( + SetupIntentUpdateParams.PaymentMethodOptions.Klarna.Subscription.NextBilling + nextBilling) { + this.nextBilling = nextBilling; + return this; + } + + /** + * Required. A non-customer-facing reference to correlate subscription + * charges in the Klarna app. Use a value that persists across subscription charges. + */ + public Builder setReference(String reference) { + this.reference = reference; + return this; + } + + /** + * Required. A non-customer-facing reference to correlate subscription + * charges in the Klarna app. Use a value that persists across subscription charges. + */ + public Builder setReference(EmptyParam reference) { + this.reference = reference; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class NextBilling { + /** Required. The amount of the next charge for the subscription. */ + @SerializedName("amount") + Long amount; + + /** + * Required. The date of the next charge for the subscription in + * YYYY-MM-DD format. + */ + @SerializedName("date") + Object date; + + /** + * 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 NextBilling(Long amount, Object date, Map extraParams) { + this.amount = amount; + this.date = date; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private Object date; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public SetupIntentUpdateParams.PaymentMethodOptions.Klarna.Subscription.NextBilling + build() { + return new SetupIntentUpdateParams.PaymentMethodOptions.Klarna.Subscription + .NextBilling(this.amount, this.date, this.extraParams); + } + + /** Required. The amount of the next charge for the subscription. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** + * Required. The date of the next charge for the subscription in + * YYYY-MM-DD format. + */ + public Builder setDate(String date) { + this.date = date; + return this; + } + + /** + * Required. The date of the next charge for the subscription in + * YYYY-MM-DD format. + */ + public Builder setDate(EmptyParam date) { + this.date = date; + 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 + * SetupIntentUpdateParams.PaymentMethodOptions.Klarna.Subscription.NextBilling#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * SetupIntentUpdateParams.PaymentMethodOptions.Klarna.Subscription.NextBilling#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + public enum Interval implements ApiRequestParams.EnumParam { + @SerializedName("day") + DAY("day"), + + @SerializedName("month") + MONTH("month"), + + @SerializedName("week") + WEEK("week"), + + @SerializedName("year") + YEAR("year"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Interval(String value) { + this.value = value; + } + } + } + + public enum PreferredLocale implements ApiRequestParams.EnumParam { + @SerializedName("cs-CZ") + CS_CZ("cs-CZ"), + + @SerializedName("da-DK") + DA_DK("da-DK"), + + @SerializedName("de-AT") + DE_AT("de-AT"), + + @SerializedName("de-CH") + DE_CH("de-CH"), + + @SerializedName("de-DE") + DE_DE("de-DE"), + + @SerializedName("el-GR") + EL_GR("el-GR"), + + @SerializedName("en-AT") + EN_AT("en-AT"), + + @SerializedName("en-AU") + EN_AU("en-AU"), + + @SerializedName("en-BE") + EN_BE("en-BE"), + + @SerializedName("en-CA") + EN_CA("en-CA"), + + @SerializedName("en-CH") + EN_CH("en-CH"), + + @SerializedName("en-CZ") + EN_CZ("en-CZ"), + + @SerializedName("en-DE") + EN_DE("en-DE"), + + @SerializedName("en-DK") + EN_DK("en-DK"), + + @SerializedName("en-ES") + EN_ES("en-ES"), + + @SerializedName("en-FI") + EN_FI("en-FI"), + + @SerializedName("en-FR") + EN_FR("en-FR"), + + @SerializedName("en-GB") + EN_GB("en-GB"), + + @SerializedName("en-GR") + EN_GR("en-GR"), + + @SerializedName("en-IE") + EN_IE("en-IE"), + + @SerializedName("en-IT") + EN_IT("en-IT"), + + @SerializedName("en-NL") + EN_NL("en-NL"), + + @SerializedName("en-NO") + EN_NO("en-NO"), + + @SerializedName("en-NZ") + EN_NZ("en-NZ"), + + @SerializedName("en-PL") + EN_PL("en-PL"), + + @SerializedName("en-PT") + EN_PT("en-PT"), + + @SerializedName("en-RO") + EN_RO("en-RO"), + + @SerializedName("en-SE") + EN_SE("en-SE"), + + @SerializedName("en-US") + EN_US("en-US"), + + @SerializedName("es-ES") + ES_ES("es-ES"), + + @SerializedName("es-US") + ES_US("es-US"), + + @SerializedName("fi-FI") + FI_FI("fi-FI"), + + @SerializedName("fr-BE") + FR_BE("fr-BE"), + + @SerializedName("fr-CA") + FR_CA("fr-CA"), + + @SerializedName("fr-CH") + FR_CH("fr-CH"), + + @SerializedName("fr-FR") + FR_FR("fr-FR"), + + @SerializedName("it-CH") + IT_CH("it-CH"), + + @SerializedName("it-IT") + IT_IT("it-IT"), + + @SerializedName("nb-NO") + NB_NO("nb-NO"), + + @SerializedName("nl-BE") + NL_BE("nl-BE"), + + @SerializedName("nl-NL") + NL_NL("nl-NL"), + + @SerializedName("pl-PL") + PL_PL("pl-PL"), + + @SerializedName("pt-PT") + PT_PT("pt-PT"), + + @SerializedName("ro-RO") + RO_RO("ro-RO"), + + @SerializedName("sv-FI") + SV_FI("sv-FI"), + + @SerializedName("sv-SE") + SV_SE("sv-SE"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PreferredLocale(String value) { + this.value = value; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Link { diff --git a/src/main/java/com/stripe/param/SubscriptionCreateParams.java b/src/main/java/com/stripe/param/SubscriptionCreateParams.java index 64c6f4b89a4..9f81b4f9ff6 100644 --- a/src/main/java/com/stripe/param/SubscriptionCreateParams.java +++ b/src/main/java/com/stripe/param/SubscriptionCreateParams.java @@ -33,17 +33,14 @@ public class SubscriptionCreateParams extends ApiRequestParams { @SerializedName("application_fee_percent") Object applicationFeePercent; - /** - * Automatic tax settings for this subscription. We recommend you only include this parameter when - * the existing value is being changed. - */ + /** Automatic tax settings for this subscription. */ @SerializedName("automatic_tax") AutomaticTax automaticTax; /** - * For new subscriptions, a past timestamp to backdate the subscription's start date to. If set, - * the first invoice will contain a proration for the timespan between the start date and the - * current time. Can be combined with trials and the billing cycle anchor. + * A past timestamp to backdate the subscription's start date to. If set, the first invoice will + * contain line items for the timespan between the start date and the current time. Can be + * combined with trials and the billing cycle anchor. */ @SerializedName("backdate_start_date") Long backdateStartDate; @@ -88,8 +85,7 @@ public class SubscriptionCreateParams extends ApiRequestParams { /** * Indicate whether this subscription should cancel at the end of the current period ({@code - * current_period_end}). Defaults to {@code false}. This param will be removed in a future API - * version. Please use {@code cancel_at} instead. + * current_period_end}). Defaults to {@code false}. */ @SerializedName("cancel_at_period_end") Boolean cancelAtPeriodEnd; @@ -565,19 +561,16 @@ public Builder setApplicationFeePercent(EmptyParam applicationFeePercent) { return this; } - /** - * Automatic tax settings for this subscription. We recommend you only include this parameter - * when the existing value is being changed. - */ + /** Automatic tax settings for this subscription. */ public Builder setAutomaticTax(SubscriptionCreateParams.AutomaticTax automaticTax) { this.automaticTax = automaticTax; return this; } /** - * For new subscriptions, a past timestamp to backdate the subscription's start date to. If set, - * the first invoice will contain a proration for the timespan between the start date and the - * current time. Can be combined with trials and the billing cycle anchor. + * A past timestamp to backdate the subscription's start date to. If set, the first invoice will + * contain line items for the timespan between the start date and the current time. Can be + * combined with trials and the billing cycle anchor. */ public Builder setBackdateStartDate(Long backdateStartDate) { this.backdateStartDate = backdateStartDate; @@ -656,8 +649,7 @@ public Builder setCancelAt(SubscriptionCreateParams.CancelAt cancelAt) { /** * Indicate whether this subscription should cancel at the end of the current period ({@code - * current_period_end}). Defaults to {@code false}. This param will be removed in a future API - * version. Please use {@code cancel_at} instead. + * current_period_end}). Defaults to {@code false}. */ public Builder setCancelAtPeriodEnd(Boolean cancelAtPeriodEnd) { this.cancelAtPeriodEnd = cancelAtPeriodEnd; @@ -2243,6 +2235,90 @@ public Builder setSecond(Long second) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BillingMode { + /** + * 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. */ + @SerializedName("type") + Type type; + + private BillingMode(Map extraParams, Type type) { + this.extraParams = extraParams; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public SubscriptionCreateParams.BillingMode build() { + return new SubscriptionCreateParams.BillingMode(this.extraParams, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * SubscriptionCreateParams.BillingMode#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link SubscriptionCreateParams.BillingMode#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. */ + public Builder setType(SubscriptionCreateParams.BillingMode.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("classic") + CLASSIC("classic"), + + @SerializedName("flexible") + FLEXIBLE("flexible"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class BillingThresholds { @@ -6322,6 +6398,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("cashapp") CASHAPP("cashapp"), + @SerializedName("crypto") + CRYPTO("crypto"), + @SerializedName("custom") CUSTOM("custom"), @@ -6936,21 +7015,6 @@ public enum MissingPaymentMethod implements ApiRequestParams.EnumParam { } } - public enum BillingMode implements ApiRequestParams.EnumParam { - @SerializedName("classic") - CLASSIC("classic"), - - @SerializedName("flexible") - FLEXIBLE("flexible"); - - @Getter(onMethod_ = {@Override}) - private final String value; - - BillingMode(String value) { - this.value = value; - } - } - public enum CancelAt implements ApiRequestParams.EnumParam { @SerializedName("max_period_end") MAX_PERIOD_END("max_period_end"), diff --git a/src/main/java/com/stripe/param/SubscriptionMigrateParams.java b/src/main/java/com/stripe/param/SubscriptionMigrateParams.java index 46ba3095b90..18da721a8c8 100644 --- a/src/main/java/com/stripe/param/SubscriptionMigrateParams.java +++ b/src/main/java/com/stripe/param/SubscriptionMigrateParams.java @@ -118,15 +118,84 @@ public Builder putAllExtraParam(Map map) { } } - public enum BillingMode implements ApiRequestParams.EnumParam { - @SerializedName("flexible") - FLEXIBLE("flexible"); + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BillingMode { + /** + * 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. */ + @SerializedName("type") + Type type; + + private BillingMode(Map extraParams, Type type) { + this.extraParams = extraParams; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public SubscriptionMigrateParams.BillingMode build() { + return new SubscriptionMigrateParams.BillingMode(this.extraParams, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * SubscriptionMigrateParams.BillingMode#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link SubscriptionMigrateParams.BillingMode#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(onMethod_ = {@Override}) - private final String value; + /** Required. */ + public Builder setType(SubscriptionMigrateParams.BillingMode.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("flexible") + FLEXIBLE("flexible"); - BillingMode(String value) { - this.value = value; + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } } } } diff --git a/src/main/java/com/stripe/param/SubscriptionScheduleCreateParams.java b/src/main/java/com/stripe/param/SubscriptionScheduleCreateParams.java index 11b9609aaee..a1e823133c8 100644 --- a/src/main/java/com/stripe/param/SubscriptionScheduleCreateParams.java +++ b/src/main/java/com/stripe/param/SubscriptionScheduleCreateParams.java @@ -396,6 +396,91 @@ public Builder setStartDate(SubscriptionScheduleCreateParams.StartDate startDate } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BillingMode { + /** + * 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. */ + @SerializedName("type") + Type type; + + private BillingMode(Map extraParams, Type type) { + this.extraParams = extraParams; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public SubscriptionScheduleCreateParams.BillingMode build() { + return new SubscriptionScheduleCreateParams.BillingMode(this.extraParams, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * SubscriptionScheduleCreateParams.BillingMode#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link SubscriptionScheduleCreateParams.BillingMode#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. */ + public Builder setType(SubscriptionScheduleCreateParams.BillingMode.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("classic") + CLASSIC("classic"), + + @SerializedName("flexible") + FLEXIBLE("flexible"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class DefaultSettings { @@ -5712,21 +5797,6 @@ public enum BillingBehavior implements ApiRequestParams.EnumParam { } } - public enum BillingMode implements ApiRequestParams.EnumParam { - @SerializedName("classic") - CLASSIC("classic"), - - @SerializedName("flexible") - FLEXIBLE("flexible"); - - @Getter(onMethod_ = {@Override}) - private final String value; - - BillingMode(String value) { - this.value = value; - } - } - public enum EndBehavior implements ApiRequestParams.EnumParam { @SerializedName("cancel") CANCEL("cancel"), diff --git a/src/main/java/com/stripe/param/SubscriptionUpdateParams.java b/src/main/java/com/stripe/param/SubscriptionUpdateParams.java index c81f07514b0..66d6b807310 100644 --- a/src/main/java/com/stripe/param/SubscriptionUpdateParams.java +++ b/src/main/java/com/stripe/param/SubscriptionUpdateParams.java @@ -67,8 +67,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}. This param will be removed in a future API - * version. Please use {@code cancel_at} instead. + * current_period_end}). Defaults to {@code false}. */ @SerializedName("cancel_at_period_end") Boolean cancelAtPeriodEnd; @@ -595,8 +594,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}. This param will be removed in a future API - * version. Please use {@code cancel_at} instead. + * current_period_end}). Defaults to {@code false}. */ public Builder setCancelAtPeriodEnd(Boolean cancelAtPeriodEnd) { this.cancelAtPeriodEnd = cancelAtPeriodEnd; @@ -6578,6 +6576,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("cashapp") CASHAPP("cashapp"), + @SerializedName("crypto") + CRYPTO("crypto"), + @SerializedName("custom") CUSTOM("custom"), diff --git a/src/main/java/com/stripe/param/TokenCreateParams.java b/src/main/java/com/stripe/param/TokenCreateParams.java index f834ba437f5..05cfd38dfd7 100644 --- a/src/main/java/com/stripe/param/TokenCreateParams.java +++ b/src/main/java/com/stripe/param/TokenCreateParams.java @@ -476,6 +476,7 @@ public static class Company { @SerializedName("phone") String phone; + /** When the business was incorporated or registered. */ @SerializedName("registration_date") Object registrationDate; @@ -828,12 +829,14 @@ public Builder setPhone(String phone) { return this; } + /** When the business was incorporated or registered. */ public Builder setRegistrationDate( TokenCreateParams.Account.Company.RegistrationDate registrationDate) { this.registrationDate = registrationDate; return this; } + /** When the business was incorporated or registered. */ public Builder setRegistrationDate(EmptyParam registrationDate) { this.registrationDate = registrationDate; return this; diff --git a/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java b/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java index ac8791e5ea9..6af16038546 100644 --- a/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java +++ b/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java @@ -618,7 +618,10 @@ public enum ApiVersion implements ApiRequestParams.EnumParam { VERSION_2025_04_30_BASIL("2025-04-30.basil"), @SerializedName("2025-05-28.basil") - VERSION_2025_05_28_BASIL("2025-05-28.basil"); + VERSION_2025_05_28_BASIL("2025-05-28.basil"), + + @SerializedName("2025-06-30.basil") + VERSION_2025_06_30_BASIL("2025-06-30.basil"); @Getter(onMethod_ = {@Override}) private final String value; diff --git a/src/main/java/com/stripe/param/billingportal/SessionCreateParams.java b/src/main/java/com/stripe/param/billingportal/SessionCreateParams.java index 3dc1ffb47af..0004e0e7545 100644 --- a/src/main/java/com/stripe/param/billingportal/SessionCreateParams.java +++ b/src/main/java/com/stripe/param/billingportal/SessionCreateParams.java @@ -1003,10 +1003,7 @@ public Builder setSubscription(String subscription) { @Getter @EqualsAndHashCode(callSuper = false) public static class SubscriptionUpdateConfirm { - /** - * The coupon or promotion code to apply to this subscription update. Currently, only up to - * one may be specified. - */ + /** The coupon or promotion code to apply to this subscription update. */ @SerializedName("discounts") List discounts; diff --git a/src/main/java/com/stripe/param/checkout/SessionCreateParams.java b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java index 4cf35861ab6..961fecf182e 100644 --- a/src/main/java/com/stripe/param/checkout/SessionCreateParams.java +++ b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java @@ -180,7 +180,8 @@ public class SessionCreateParams extends ApiRequestParams { /** * A list of items the customer is purchasing. Use this parameter to pass one-time or recurring Prices. + * href="https://stripe.com/docs/api/prices">Prices. The parameter is required for {@code + * payment} and {@code subscription} mode. * *

For {@code payment} mode, there is a maximum of 100 line items, however it is recommended to * consolidate line items if there are more than a few dozen. @@ -10513,9 +10514,17 @@ public static class Klarna { @SerializedName("setup_future_usage") SetupFutureUsage setupFutureUsage; - private Klarna(Map extraParams, SetupFutureUsage setupFutureUsage) { + /** Subscription details if the Checkout Session sets up a future subscription. */ + @SerializedName("subscriptions") + Object subscriptions; + + private Klarna( + Map extraParams, + SetupFutureUsage setupFutureUsage, + Object subscriptions) { this.extraParams = extraParams; this.setupFutureUsage = setupFutureUsage; + this.subscriptions = subscriptions; } public static Builder builder() { @@ -10527,10 +10536,12 @@ public static class Builder { private SetupFutureUsage setupFutureUsage; + private Object subscriptions; + /** Finalize and obtain parameter instance from this builder. */ public SessionCreateParams.PaymentMethodOptions.Klarna build() { return new SessionCreateParams.PaymentMethodOptions.Klarna( - this.extraParams, this.setupFutureUsage); + this.extraParams, this.setupFutureUsage, this.subscriptions); } /** @@ -10586,6 +10597,326 @@ public Builder setSetupFutureUsage( this.setupFutureUsage = setupFutureUsage; return this; } + + /** + * Add an element to `subscriptions` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * SessionCreateParams.PaymentMethodOptions.Klarna#subscriptions} for the field + * documentation. + */ + @SuppressWarnings("unchecked") + public Builder addSubscription( + SessionCreateParams.PaymentMethodOptions.Klarna.Subscription element) { + if (this.subscriptions == null || this.subscriptions instanceof EmptyParam) { + this.subscriptions = + new ArrayList(); + } + ((List) this.subscriptions) + .add(element); + return this; + } + + /** + * Add all elements to `subscriptions` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link SessionCreateParams.PaymentMethodOptions.Klarna#subscriptions} for the field + * documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllSubscription( + List elements) { + if (this.subscriptions == null || this.subscriptions instanceof EmptyParam) { + this.subscriptions = + new ArrayList(); + } + ((List) this.subscriptions) + .addAll(elements); + return this; + } + + /** Subscription details if the Checkout Session sets up a future subscription. */ + public Builder setSubscriptions(EmptyParam subscriptions) { + this.subscriptions = subscriptions; + return this; + } + + /** Subscription details if the Checkout Session sets up a future subscription. */ + public Builder setSubscriptions( + List subscriptions) { + this.subscriptions = subscriptions; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Subscription { + /** + * 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. Unit of time between subscription charges. */ + @SerializedName("interval") + Interval interval; + + /** + * The number of intervals (specified in the {@code interval} attribute) between + * subscription charges. For example, {@code interval=month} and {@code interval_count=3} + * charges every 3 months. + */ + @SerializedName("interval_count") + Long intervalCount; + + /** Name for subscription. */ + @SerializedName("name") + String name; + + /** Required. Describes the upcoming charge for this subscription. */ + @SerializedName("next_billing") + NextBilling nextBilling; + + /** + * Required. A non-customer-facing reference to correlate subscription + * charges in the Klarna app. Use a value that persists across subscription charges. + */ + @SerializedName("reference") + String reference; + + private Subscription( + Map extraParams, + Interval interval, + Long intervalCount, + String name, + NextBilling nextBilling, + String reference) { + this.extraParams = extraParams; + this.interval = interval; + this.intervalCount = intervalCount; + this.name = name; + this.nextBilling = nextBilling; + this.reference = reference; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Interval interval; + + private Long intervalCount; + + private String name; + + private NextBilling nextBilling; + + private String reference; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionCreateParams.PaymentMethodOptions.Klarna.Subscription build() { + return new SessionCreateParams.PaymentMethodOptions.Klarna.Subscription( + this.extraParams, + this.interval, + this.intervalCount, + this.name, + this.nextBilling, + this.reference); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * SessionCreateParams.PaymentMethodOptions.Klarna.Subscription#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * SessionCreateParams.PaymentMethodOptions.Klarna.Subscription#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. Unit of time between subscription charges. */ + public Builder setInterval( + SessionCreateParams.PaymentMethodOptions.Klarna.Subscription.Interval interval) { + this.interval = interval; + return this; + } + + /** + * The number of intervals (specified in the {@code interval} attribute) between + * subscription charges. For example, {@code interval=month} and {@code interval_count=3} + * charges every 3 months. + */ + public Builder setIntervalCount(Long intervalCount) { + this.intervalCount = intervalCount; + return this; + } + + /** Name for subscription. */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** Required. Describes the upcoming charge for this subscription. */ + public Builder setNextBilling( + SessionCreateParams.PaymentMethodOptions.Klarna.Subscription.NextBilling + nextBilling) { + this.nextBilling = nextBilling; + return this; + } + + /** + * Required. A non-customer-facing reference to correlate subscription + * charges in the Klarna app. Use a value that persists across subscription charges. + */ + public Builder setReference(String reference) { + this.reference = reference; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class NextBilling { + /** Required. The amount of the next charge for the subscription. */ + @SerializedName("amount") + Long amount; + + /** + * Required. The date of the next charge for the subscription in + * YYYY-MM-DD format. + */ + @SerializedName("date") + String date; + + /** + * 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 NextBilling(Long amount, String date, Map extraParams) { + this.amount = amount; + this.date = date; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private String date; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionCreateParams.PaymentMethodOptions.Klarna.Subscription.NextBilling + build() { + return new SessionCreateParams.PaymentMethodOptions.Klarna.Subscription.NextBilling( + this.amount, this.date, this.extraParams); + } + + /** Required. The amount of the next charge for the subscription. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** + * Required. The date of the next charge for the subscription in + * YYYY-MM-DD format. + */ + public Builder setDate(String date) { + this.date = date; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * SessionCreateParams.PaymentMethodOptions.Klarna.Subscription.NextBilling#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * SessionCreateParams.PaymentMethodOptions.Klarna.Subscription.NextBilling#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + public enum Interval implements ApiRequestParams.EnumParam { + @SerializedName("day") + DAY("day"), + + @SerializedName("month") + MONTH("month"), + + @SerializedName("week") + WEEK("week"), + + @SerializedName("year") + YEAR("year"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Interval(String value) { + this.value = value; + } + } } public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @@ -16995,6 +17326,92 @@ public Builder setTrialSettings( } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BillingMode { + /** + * 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. */ + @SerializedName("type") + Type type; + + private BillingMode(Map extraParams, Type type) { + this.extraParams = extraParams; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionCreateParams.SubscriptionData.BillingMode build() { + return new SessionCreateParams.SubscriptionData.BillingMode(this.extraParams, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionCreateParams.SubscriptionData.BillingMode#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionCreateParams.SubscriptionData.BillingMode#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. */ + public Builder setType(SessionCreateParams.SubscriptionData.BillingMode.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("classic") + CLASSIC("classic"), + + @SerializedName("flexible") + FLEXIBLE("flexible"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class InvoiceSettings { @@ -17453,21 +17870,6 @@ public enum MissingPaymentMethod implements ApiRequestParams.EnumParam { } } - public enum BillingMode implements ApiRequestParams.EnumParam { - @SerializedName("classic") - CLASSIC("classic"), - - @SerializedName("flexible") - FLEXIBLE("flexible"); - - @Getter(onMethod_ = {@Override}) - private final String value; - - BillingMode(String value) { - this.value = value; - } - } - public enum ProrationBehavior implements ApiRequestParams.EnumParam { @SerializedName("create_prorations") CREATE_PRORATIONS("create_prorations"), @@ -17989,6 +18391,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("cashapp") CASHAPP("cashapp"), + @SerializedName("crypto") + CRYPTO("crypto"), + @SerializedName("customer_balance") CUSTOMER_BALANCE("customer_balance"), diff --git a/src/main/java/com/stripe/param/identity/VerificationSessionCreateParams.java b/src/main/java/com/stripe/param/identity/VerificationSessionCreateParams.java index a88f512efb6..ac81935a686 100644 --- a/src/main/java/com/stripe/param/identity/VerificationSessionCreateParams.java +++ b/src/main/java/com/stripe/param/identity/VerificationSessionCreateParams.java @@ -59,6 +59,10 @@ public class VerificationSessionCreateParams extends ApiRequestParams { @SerializedName("related_customer_account") String relatedCustomerAccount; + /** Tokens referencing a Person resource and it's associated account. */ + @SerializedName("related_person") + RelatedPerson relatedPerson; + /** The URL that the user will be redirected to upon completing the verification flow. */ @SerializedName("return_url") String returnUrl; @@ -87,6 +91,7 @@ private VerificationSessionCreateParams( ProvidedDetails providedDetails, String relatedCustomer, String relatedCustomerAccount, + RelatedPerson relatedPerson, String returnUrl, Type type, String verificationFlow) { @@ -98,6 +103,7 @@ private VerificationSessionCreateParams( this.providedDetails = providedDetails; this.relatedCustomer = relatedCustomer; this.relatedCustomerAccount = relatedCustomerAccount; + this.relatedPerson = relatedPerson; this.returnUrl = returnUrl; this.type = type; this.verificationFlow = verificationFlow; @@ -124,6 +130,8 @@ public static class Builder { private String relatedCustomerAccount; + private RelatedPerson relatedPerson; + private String returnUrl; private Type type; @@ -141,6 +149,7 @@ public VerificationSessionCreateParams build() { this.providedDetails, this.relatedCustomer, this.relatedCustomerAccount, + this.relatedPerson, this.returnUrl, this.type, this.verificationFlow); @@ -258,6 +267,12 @@ public Builder setRelatedCustomerAccount(String relatedCustomerAccount) { return this; } + /** Tokens referencing a Person resource and it's associated account. */ + public Builder setRelatedPerson(VerificationSessionCreateParams.RelatedPerson relatedPerson) { + this.relatedPerson = relatedPerson; + return this; + } + /** The URL that the user will be redirected to upon completing the verification flow. */ public Builder setReturnUrl(String returnUrl) { this.returnUrl = returnUrl; @@ -645,6 +660,102 @@ public Builder setPhone(String phone) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class RelatedPerson { + /** + * Required. A token representing a connected account. If provided, the person + * parameter is also required and must be associated with the account. + */ + @SerializedName("account") + String account; + + /** + * 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 token referencing a Person resource that this verification is + * being used to verify. + */ + @SerializedName("person") + String person; + + private RelatedPerson(String account, Map extraParams, String person) { + this.account = account; + this.extraParams = extraParams; + this.person = person; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String account; + + private Map extraParams; + + private String person; + + /** Finalize and obtain parameter instance from this builder. */ + public VerificationSessionCreateParams.RelatedPerson build() { + return new VerificationSessionCreateParams.RelatedPerson( + this.account, this.extraParams, this.person); + } + + /** + * Required. A token representing a connected account. If provided, the + * person parameter is also required and must be associated with the account. + */ + public Builder setAccount(String account) { + this.account = account; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * VerificationSessionCreateParams.RelatedPerson#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 VerificationSessionCreateParams.RelatedPerson#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 token referencing a Person resource that this verification is + * being used to verify. + */ + public Builder setPerson(String person) { + this.person = person; + return this; + } + } + } + public enum Type implements ApiRequestParams.EnumParam { @SerializedName("document") DOCUMENT("document"), diff --git a/src/main/java/com/stripe/param/tax/RegistrationCreateParams.java b/src/main/java/com/stripe/param/tax/RegistrationCreateParams.java index b699668442c..a50243c371e 100644 --- a/src/main/java/com/stripe/param/tax/RegistrationCreateParams.java +++ b/src/main/java/com/stripe/param/tax/RegistrationCreateParams.java @@ -570,6 +570,10 @@ public static class CountryOptions { @SerializedName("tz") Tz tz; + /** Options for the registration in UA. */ + @SerializedName("ua") + Ua ua; + /** Options for the registration in UG. */ @SerializedName("ug") Ug ug; @@ -694,6 +698,7 @@ private CountryOptions( Tj tj, Tr tr, Tz tz, + Ua ua, Ug ug, Us us, Uy uy, @@ -793,6 +798,7 @@ private CountryOptions( this.tj = tj; this.tr = tr; this.tz = tz; + this.ua = ua; this.ug = ug; this.us = us; this.uy = uy; @@ -990,6 +996,8 @@ public static class Builder { private Tz tz; + private Ua ua; + private Ug ug; private Us us; @@ -1100,6 +1108,7 @@ public RegistrationCreateParams.CountryOptions build() { this.tj, this.tr, this.tz, + this.ua, this.ug, this.us, this.uy, @@ -1677,6 +1686,12 @@ public Builder setTz(RegistrationCreateParams.CountryOptions.Tz tz) { return this; } + /** Options for the registration in UA. */ + public Builder setUa(RegistrationCreateParams.CountryOptions.Ua ua) { + this.ua = ua; + return this; + } + /** Options for the registration in UG. */ public Builder setUg(RegistrationCreateParams.CountryOptions.Ug ug) { this.ug = ug; @@ -12457,6 +12472,89 @@ public enum Type implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Ua { + /** + * 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. Type of registration to be created in {@code country}. */ + @SerializedName("type") + Type type; + + private Ua(Map extraParams, Type type) { + this.extraParams = extraParams; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public RegistrationCreateParams.CountryOptions.Ua build() { + return new RegistrationCreateParams.CountryOptions.Ua(this.extraParams, this.type); + } + + /** + * 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.Ua#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.Ua#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Required. Type of registration to be created in {@code country}. */ + public Builder setType(RegistrationCreateParams.CountryOptions.Ua.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("simplified") + SIMPLIFIED("simplified"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Ug { diff --git a/src/main/java/com/stripe/param/terminal/ReaderCollectPaymentMethodParams.java b/src/main/java/com/stripe/param/terminal/ReaderCollectPaymentMethodParams.java index fe565ff1836..251ac892a71 100644 --- a/src/main/java/com/stripe/param/terminal/ReaderCollectPaymentMethodParams.java +++ b/src/main/java/com/stripe/param/terminal/ReaderCollectPaymentMethodParams.java @@ -30,7 +30,7 @@ public class ReaderCollectPaymentMethodParams extends ApiRequestParams { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. PaymentIntent ID */ + /** Required. PaymentIntent ID. */ @SerializedName("payment_intent") String paymentIntent; @@ -122,7 +122,7 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. PaymentIntent ID */ + /** Required. PaymentIntent ID. */ public Builder setPaymentIntent(String paymentIntent) { this.paymentIntent = paymentIntent; return this; diff --git a/src/main/java/com/stripe/param/terminal/ReaderConfirmPaymentIntentParams.java b/src/main/java/com/stripe/param/terminal/ReaderConfirmPaymentIntentParams.java index 80043209dc2..766dba8d1cf 100644 --- a/src/main/java/com/stripe/param/terminal/ReaderConfirmPaymentIntentParams.java +++ b/src/main/java/com/stripe/param/terminal/ReaderConfirmPaymentIntentParams.java @@ -30,7 +30,7 @@ public class ReaderConfirmPaymentIntentParams extends ApiRequestParams { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. PaymentIntent ID */ + /** Required. PaymentIntent ID. */ @SerializedName("payment_intent") String paymentIntent; @@ -122,7 +122,7 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. PaymentIntent ID */ + /** Required. PaymentIntent ID. */ public Builder setPaymentIntent(String paymentIntent) { this.paymentIntent = paymentIntent; return this; diff --git a/src/main/java/com/stripe/param/treasury/FinancialAccountListParams.java b/src/main/java/com/stripe/param/treasury/FinancialAccountListParams.java index 5425d6a7899..b729ed58d78 100644 --- a/src/main/java/com/stripe/param/treasury/FinancialAccountListParams.java +++ b/src/main/java/com/stripe/param/treasury/FinancialAccountListParams.java @@ -42,19 +42,25 @@ public class FinancialAccountListParams extends ApiRequestParams { @SerializedName("starting_after") String startingAfter; + /** Only return FinancialAccounts that have the given status: {@code open} or {@code closed}. */ + @SerializedName("status") + Status status; + private FinancialAccountListParams( Object created, String endingBefore, List expand, Map extraParams, Long limit, - String startingAfter) { + String startingAfter, + Status status) { this.created = created; this.endingBefore = endingBefore; this.expand = expand; this.extraParams = extraParams; this.limit = limit; this.startingAfter = startingAfter; + this.status = status; } public static Builder builder() { @@ -74,6 +80,8 @@ public static class Builder { private String startingAfter; + private Status status; + /** Finalize and obtain parameter instance from this builder. */ public FinancialAccountListParams build() { return new FinancialAccountListParams( @@ -82,7 +90,8 @@ public FinancialAccountListParams build() { this.expand, this.extraParams, this.limit, - this.startingAfter); + this.startingAfter, + this.status); } /** Only return FinancialAccounts that were created during the given date interval. */ @@ -166,6 +175,12 @@ public Builder setStartingAfter(String startingAfter) { this.startingAfter = startingAfter; return this; } + + /** Only return FinancialAccounts that have the given status: {@code open} or {@code closed}. */ + public Builder setStatus(FinancialAccountListParams.Status status) { + this.status = status; + return this; + } } @Getter @@ -276,4 +291,19 @@ public Builder setLte(Long lte) { } } } + + public enum Status implements ApiRequestParams.EnumParam { + @SerializedName("closed") + CLOSED("closed"), + + @SerializedName("open") + OPEN("open"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Status(String value) { + this.value = value; + } + } } 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 74ac9eed165..f4d212cc71d 100644 --- a/src/main/java/com/stripe/param/v2/core/AccountCreateParams.java +++ b/src/main/java/com/stripe/param/v2/core/AccountCreateParams.java @@ -2319,6 +2319,9 @@ public enum Country implements ApiRequestParams.EnumParam { @SerializedName("ws") WS("ws"), + @SerializedName("xx") + XX("xx"), + @SerializedName("ye") YE("ye"), @@ -8441,6 +8444,9 @@ public enum Country implements ApiRequestParams.EnumParam { @SerializedName("ws") WS("ws"), + @SerializedName("xx") + XX("xx"), + @SerializedName("ye") YE("ye"), @@ -12310,6 +12316,9 @@ public enum Country implements ApiRequestParams.EnumParam { @SerializedName("ws") WS("ws"), + @SerializedName("xx") + XX("xx"), + @SerializedName("ye") YE("ye"), @@ -12478,6 +12487,10 @@ public static class Documents { @SerializedName("primary_verification") PrimaryVerification primaryVerification; + /** One or more documents that demonstrate proof of address. */ + @SerializedName("proof_of_address") + ProofOfAddress proofOfAddress; + /** * One or more documents showing the company’s proof of registration with the national * business registry. @@ -12498,6 +12511,7 @@ private Documents( CompanyTaxIdVerification companyTaxIdVerification, Map extraParams, PrimaryVerification primaryVerification, + ProofOfAddress proofOfAddress, ProofOfRegistration proofOfRegistration, ProofOfUltimateBeneficialOwnership proofOfUltimateBeneficialOwnership) { this.bankAccountOwnershipVerification = bankAccountOwnershipVerification; @@ -12508,6 +12522,7 @@ private Documents( this.companyTaxIdVerification = companyTaxIdVerification; this.extraParams = extraParams; this.primaryVerification = primaryVerification; + this.proofOfAddress = proofOfAddress; this.proofOfRegistration = proofOfRegistration; this.proofOfUltimateBeneficialOwnership = proofOfUltimateBeneficialOwnership; } @@ -12533,6 +12548,8 @@ public static class Builder { private PrimaryVerification primaryVerification; + private ProofOfAddress proofOfAddress; + private ProofOfRegistration proofOfRegistration; private ProofOfUltimateBeneficialOwnership proofOfUltimateBeneficialOwnership; @@ -12548,6 +12565,7 @@ public AccountCreateParams.Identity.BusinessDetails.Documents build() { this.companyTaxIdVerification, this.extraParams, this.primaryVerification, + this.proofOfAddress, this.proofOfRegistration, this.proofOfUltimateBeneficialOwnership); } @@ -12647,6 +12665,14 @@ public Builder setPrimaryVerification( return this; } + /** One or more documents that demonstrate proof of address. */ + public Builder setProofOfAddress( + AccountCreateParams.Identity.BusinessDetails.Documents.ProofOfAddress + proofOfAddress) { + this.proofOfAddress = proofOfAddress; + return this; + } + /** * One or more documents showing the company’s proof of registration with the national * business registry. @@ -13722,6 +13748,139 @@ public enum Type implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ProofOfAddress { + /** + * 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. One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + @SerializedName("type") + Type type; + + private ProofOfAddress(Map extraParams, List files, Type type) { + this.extraParams = extraParams; + this.files = files; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Identity.BusinessDetails.Documents.ProofOfAddress build() { + return new AccountCreateParams.Identity.BusinessDetails.Documents.ProofOfAddress( + this.extraParams, this.files, this.type); + } + + /** + * 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.Documents.ProofOfAddress#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.Documents.ProofOfAddress#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.Identity.BusinessDetails.Documents.ProofOfAddress#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.Identity.BusinessDetails.Documents.ProofOfAddress#files} for the + * field documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + + /** + * Required. The format of the document. Currently supports {@code + * files} only. + */ + public Builder setType( + AccountCreateParams.Identity.BusinessDetails.Documents.ProofOfAddress.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("files") + FILES("files"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class ProofOfRegistration { @@ -15357,6 +15516,9 @@ public enum Country implements ApiRequestParams.EnumParam { @SerializedName("ws") WS("ws"), + @SerializedName("xx") + XX("xx"), + @SerializedName("ye") YE("ye"), @@ -16292,6 +16454,9 @@ public enum Country implements ApiRequestParams.EnumParam { @SerializedName("ws") WS("ws"), + @SerializedName("xx") + XX("xx"), + @SerializedName("ye") YE("ye"), @@ -18014,6 +18179,9 @@ public enum Country implements ApiRequestParams.EnumParam { @SerializedName("ws") WS("ws"), + @SerializedName("xx") + XX("xx"), + @SerializedName("ye") YE("ye"), @@ -19091,6 +19259,9 @@ public enum Country implements ApiRequestParams.EnumParam { @SerializedName("ws") WS("ws"), + @SerializedName("xx") + XX("xx"), + @SerializedName("ye") YE("ye"), @@ -21536,6 +21707,9 @@ public enum Country implements ApiRequestParams.EnumParam { @SerializedName("ws") WS("ws"), + @SerializedName("xx") + XX("xx"), + @SerializedName("ye") YE("ye"), @@ -22470,6 +22644,9 @@ public enum Country implements ApiRequestParams.EnumParam { @SerializedName("ws") WS("ws"), + @SerializedName("xx") + XX("xx"), + @SerializedName("ye") YE("ye"), @@ -23508,6 +23685,9 @@ public enum Nationality implements ApiRequestParams.EnumParam { @SerializedName("ws") WS("ws"), + @SerializedName("xx") + XX("xx"), + @SerializedName("ye") YE("ye"), @@ -24283,6 +24463,9 @@ public enum Country implements ApiRequestParams.EnumParam { @SerializedName("ws") WS("ws"), + @SerializedName("xx") + XX("xx"), + @SerializedName("ye") YE("ye"), 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 da984514d9e..f803e28ee0a 100644 --- a/src/main/java/com/stripe/param/v2/core/AccountUpdateParams.java +++ b/src/main/java/com/stripe/param/v2/core/AccountUpdateParams.java @@ -2528,6 +2528,9 @@ public enum Country implements ApiRequestParams.EnumParam { @SerializedName("ws") WS("ws"), + @SerializedName("xx") + XX("xx"), + @SerializedName("ye") YE("ye"), @@ -8786,6 +8789,9 @@ public enum Country implements ApiRequestParams.EnumParam { @SerializedName("ws") WS("ws"), + @SerializedName("xx") + XX("xx"), + @SerializedName("ye") YE("ye"), @@ -12883,6 +12889,9 @@ public enum Country implements ApiRequestParams.EnumParam { @SerializedName("ws") WS("ws"), + @SerializedName("xx") + XX("xx"), + @SerializedName("ye") YE("ye"), @@ -13060,6 +13069,10 @@ public static class Documents { @SerializedName("primary_verification") Object primaryVerification; + /** One or more documents that demonstrate proof of address. */ + @SerializedName("proof_of_address") + ProofOfAddress proofOfAddress; + /** * One or more documents showing the company’s proof of registration with the national * business registry. @@ -13080,6 +13093,7 @@ private Documents( Object companyTaxIdVerification, Map extraParams, Object primaryVerification, + ProofOfAddress proofOfAddress, Object proofOfRegistration, ProofOfUltimateBeneficialOwnership proofOfUltimateBeneficialOwnership) { this.bankAccountOwnershipVerification = bankAccountOwnershipVerification; @@ -13090,6 +13104,7 @@ private Documents( this.companyTaxIdVerification = companyTaxIdVerification; this.extraParams = extraParams; this.primaryVerification = primaryVerification; + this.proofOfAddress = proofOfAddress; this.proofOfRegistration = proofOfRegistration; this.proofOfUltimateBeneficialOwnership = proofOfUltimateBeneficialOwnership; } @@ -13115,6 +13130,8 @@ public static class Builder { private Object primaryVerification; + private ProofOfAddress proofOfAddress; + private Object proofOfRegistration; private ProofOfUltimateBeneficialOwnership proofOfUltimateBeneficialOwnership; @@ -13130,6 +13147,7 @@ public AccountUpdateParams.Identity.BusinessDetails.Documents build() { this.companyTaxIdVerification, this.extraParams, this.primaryVerification, + this.proofOfAddress, this.proofOfRegistration, this.proofOfUltimateBeneficialOwnership); } @@ -13284,6 +13302,14 @@ public Builder setPrimaryVerification(EmptyParam primaryVerification) { return this; } + /** One or more documents that demonstrate proof of address. */ + public Builder setProofOfAddress( + AccountUpdateParams.Identity.BusinessDetails.Documents.ProofOfAddress + proofOfAddress) { + this.proofOfAddress = proofOfAddress; + return this; + } + /** * One or more documents showing the company’s proof of registration with the national * business registry. @@ -14391,6 +14417,139 @@ public enum Type implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ProofOfAddress { + /** + * 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. One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + @SerializedName("type") + Type type; + + private ProofOfAddress(Map extraParams, List files, Type type) { + this.extraParams = extraParams; + this.files = files; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Identity.BusinessDetails.Documents.ProofOfAddress build() { + return new AccountUpdateParams.Identity.BusinessDetails.Documents.ProofOfAddress( + this.extraParams, this.files, this.type); + } + + /** + * 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.Documents.ProofOfAddress#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.Documents.ProofOfAddress#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 + * AccountUpdateParams.Identity.BusinessDetails.Documents.ProofOfAddress#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 + * AccountUpdateParams.Identity.BusinessDetails.Documents.ProofOfAddress#files} for the + * field documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + + /** + * Required. The format of the document. Currently supports {@code + * files} only. + */ + public Builder setType( + AccountUpdateParams.Identity.BusinessDetails.Documents.ProofOfAddress.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("files") + FILES("files"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class ProofOfRegistration { @@ -16095,6 +16254,9 @@ public enum Country implements ApiRequestParams.EnumParam { @SerializedName("ws") WS("ws"), + @SerializedName("xx") + XX("xx"), + @SerializedName("ye") YE("ye"), @@ -17075,6 +17237,9 @@ public enum Country implements ApiRequestParams.EnumParam { @SerializedName("ws") WS("ws"), + @SerializedName("xx") + XX("xx"), + @SerializedName("ye") YE("ye"), @@ -19015,6 +19180,9 @@ public enum Country implements ApiRequestParams.EnumParam { @SerializedName("ws") WS("ws"), + @SerializedName("xx") + XX("xx"), + @SerializedName("ye") YE("ye"), @@ -20155,6 +20323,9 @@ public enum Country implements ApiRequestParams.EnumParam { @SerializedName("ws") WS("ws"), + @SerializedName("xx") + XX("xx"), + @SerializedName("ye") YE("ye"), @@ -22763,6 +22934,9 @@ public enum Country implements ApiRequestParams.EnumParam { @SerializedName("ws") WS("ws"), + @SerializedName("xx") + XX("xx"), + @SerializedName("ye") YE("ye"), @@ -23742,6 +23916,9 @@ public enum Country implements ApiRequestParams.EnumParam { @SerializedName("ws") WS("ws"), + @SerializedName("xx") + XX("xx"), + @SerializedName("ye") YE("ye"), @@ -24816,6 +24993,9 @@ public enum Nationality implements ApiRequestParams.EnumParam { @SerializedName("ws") WS("ws"), + @SerializedName("xx") + XX("xx"), + @SerializedName("ye") YE("ye"), @@ -25591,6 +25771,9 @@ public enum Country implements ApiRequestParams.EnumParam { @SerializedName("ws") WS("ws"), + @SerializedName("xx") + XX("xx"), + @SerializedName("ye") YE("ye"), diff --git a/src/main/java/com/stripe/param/v2/core/accounts/PersonCreateParams.java b/src/main/java/com/stripe/param/v2/core/accounts/PersonCreateParams.java index 6c38854ba93..3367c1e8468 100644 --- a/src/main/java/com/stripe/param/v2/core/accounts/PersonCreateParams.java +++ b/src/main/java/com/stripe/param/v2/core/accounts/PersonCreateParams.java @@ -1367,6 +1367,9 @@ public enum Country implements ApiRequestParams.EnumParam { @SerializedName("ws") WS("ws"), + @SerializedName("xx") + XX("xx"), + @SerializedName("ye") YE("ye"), @@ -2624,6 +2627,9 @@ public enum Country implements ApiRequestParams.EnumParam { @SerializedName("ws") WS("ws"), + @SerializedName("xx") + XX("xx"), + @SerializedName("ye") YE("ye"), @@ -5023,6 +5029,9 @@ public enum Country implements ApiRequestParams.EnumParam { @SerializedName("ws") WS("ws"), + @SerializedName("xx") + XX("xx"), + @SerializedName("ye") YE("ye"), @@ -5953,6 +5962,9 @@ public enum Country implements ApiRequestParams.EnumParam { @SerializedName("ws") WS("ws"), + @SerializedName("xx") + XX("xx"), + @SerializedName("ye") YE("ye"), @@ -6981,6 +6993,9 @@ public enum Nationality implements ApiRequestParams.EnumParam { @SerializedName("ws") WS("ws"), + @SerializedName("xx") + XX("xx"), + @SerializedName("ye") YE("ye"), diff --git a/src/main/java/com/stripe/param/v2/core/accounts/PersonUpdateParams.java b/src/main/java/com/stripe/param/v2/core/accounts/PersonUpdateParams.java index ffa80ed5b99..2a20bd8727e 100644 --- a/src/main/java/com/stripe/param/v2/core/accounts/PersonUpdateParams.java +++ b/src/main/java/com/stripe/param/v2/core/accounts/PersonUpdateParams.java @@ -1467,6 +1467,9 @@ public enum Country implements ApiRequestParams.EnumParam { @SerializedName("ws") WS("ws"), + @SerializedName("xx") + XX("xx"), + @SerializedName("ye") YE("ye"), @@ -2796,6 +2799,9 @@ public enum Country implements ApiRequestParams.EnumParam { @SerializedName("ws") WS("ws"), + @SerializedName("xx") + XX("xx"), + @SerializedName("ye") YE("ye"), @@ -5331,6 +5337,9 @@ public enum Country implements ApiRequestParams.EnumParam { @SerializedName("ws") WS("ws"), + @SerializedName("xx") + XX("xx"), + @SerializedName("ye") YE("ye"), @@ -6306,6 +6315,9 @@ public enum Country implements ApiRequestParams.EnumParam { @SerializedName("ws") WS("ws"), + @SerializedName("xx") + XX("xx"), + @SerializedName("ye") YE("ye"), @@ -7370,6 +7382,9 @@ public enum Nationality implements ApiRequestParams.EnumParam { @SerializedName("ws") WS("ws"), + @SerializedName("xx") + XX("xx"), + @SerializedName("ye") YE("ye"), diff --git a/src/main/java/com/stripe/param/v2/payments/OffSessionPaymentCreateParams.java b/src/main/java/com/stripe/param/v2/payments/OffSessionPaymentCreateParams.java index 27a82d9fd49..f93bc7c6988 100644 --- a/src/main/java/com/stripe/param/v2/payments/OffSessionPaymentCreateParams.java +++ b/src/main/java/com/stripe/param/v2/payments/OffSessionPaymentCreateParams.java @@ -346,7 +346,7 @@ public enum RetryStrategy implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) public static class TransferData { - /** Required. Amount in minor units that you want to transfer. */ + /** Amount in minor units that you want to transfer. */ @SerializedName("amount") Integer amount; @@ -386,7 +386,7 @@ public OffSessionPaymentCreateParams.TransferData build() { this.amount, this.destination, this.extraParams); } - /** Required. Amount in minor units that you want to transfer. */ + /** Amount in minor units that you want to transfer. */ public Builder setAmount(Integer amount) { this.amount = amount; return this; diff --git a/src/main/java/com/stripe/service/v2/core/AccountService.java b/src/main/java/com/stripe/service/v2/core/AccountService.java index 19546194123..a140809df6c 100644 --- a/src/main/java/com/stripe/service/v2/core/AccountService.java +++ b/src/main/java/com/stripe/service/v2/core/AccountService.java @@ -23,30 +23,30 @@ public AccountService(StripeResponseGetter responseGetter) { super(responseGetter); } - /** Removes access to the Account and its associated resources. */ - public Account close(String id, AccountCloseParams params) throws StripeException { - return close(id, params, (RequestOptions) null); + /** Returns a list of Accounts. */ + public StripeCollection list(AccountListParams params) throws StripeException { + return list(params, (RequestOptions) null); } - /** Removes access to the Account and its associated resources. */ - public Account close(String id, RequestOptions options) throws StripeException { - return close(id, (AccountCloseParams) null, options); + /** Returns a list of Accounts. */ + public StripeCollection list(RequestOptions options) throws StripeException { + return list((AccountListParams) null, options); } - /** Removes access to the Account and its associated resources. */ - public Account close(String id) throws StripeException { - return close(id, (AccountCloseParams) null, (RequestOptions) null); + /** Returns a list of Accounts. */ + public StripeCollection list() throws StripeException { + return list((AccountListParams) null, (RequestOptions) null); } - /** Removes access to the Account and its associated resources. */ - public Account close(String id, AccountCloseParams params, RequestOptions options) + /** Returns a list of Accounts. */ + public StripeCollection list(AccountListParams params, RequestOptions options) throws StripeException { - String path = String.format("/v2/core/accounts/%s/close", ApiResource.urlEncodeId(id)); + String path = "/v2/core/accounts"; ApiRequest request = new ApiRequest( BaseAddress.API, - ApiResource.RequestMethod.POST, + ApiResource.RequestMethod.GET, path, ApiRequestParams.paramsToMap(params), options); - return this.request(request, Account.class); + return this.request(request, new TypeToken>() {}.getType()); } /** * An Account is a representation of a company, individual or other entity that a user interacts @@ -92,31 +92,6 @@ public Account create(AccountCreateParams params, RequestOptions options) throws options); return this.request(request, Account.class); } - /** Returns a list of Accounts. */ - public StripeCollection list(AccountListParams params) throws StripeException { - return list(params, (RequestOptions) null); - } - /** Returns a list of Accounts. */ - public StripeCollection list(RequestOptions options) throws StripeException { - return list((AccountListParams) null, options); - } - /** Returns a list of Accounts. */ - public StripeCollection list() throws StripeException { - return list((AccountListParams) null, (RequestOptions) null); - } - /** Returns a list of Accounts. */ - public StripeCollection list(AccountListParams params, RequestOptions options) - throws StripeException { - String path = "/v2/core/accounts"; - ApiRequest request = - new ApiRequest( - BaseAddress.API, - ApiResource.RequestMethod.GET, - path, - ApiRequestParams.paramsToMap(params), - options); - return this.request(request, new TypeToken>() {}.getType()); - } /** Retrieves the details of an Account. */ public Account retrieve(String id, AccountRetrieveParams params) throws StripeException { return retrieve(id, params, (RequestOptions) null); @@ -167,6 +142,31 @@ public Account update(String id, AccountUpdateParams params, RequestOptions opti options); return this.request(request, Account.class); } + /** Removes access to the Account and its associated resources. */ + public Account close(String id, AccountCloseParams params) throws StripeException { + return close(id, params, (RequestOptions) null); + } + /** Removes access to the Account and its associated resources. */ + public Account close(String id, RequestOptions options) throws StripeException { + return close(id, (AccountCloseParams) null, options); + } + /** Removes access to the Account and its associated resources. */ + public Account close(String id) throws StripeException { + return close(id, (AccountCloseParams) null, (RequestOptions) null); + } + /** Removes access to the Account and its associated resources. */ + public Account close(String id, AccountCloseParams params, RequestOptions options) + throws StripeException { + String path = String.format("/v2/core/accounts/%s/close", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, Account.class); + } public com.stripe.service.v2.core.accounts.PersonService persons() { return new com.stripe.service.v2.core.accounts.PersonService(this.getResponseGetter()); diff --git a/src/main/java/com/stripe/service/v2/core/EventDestinationService.java b/src/main/java/com/stripe/service/v2/core/EventDestinationService.java index fd421f81a09..8553d0ac58e 100644 --- a/src/main/java/com/stripe/service/v2/core/EventDestinationService.java +++ b/src/main/java/com/stripe/service/v2/core/EventDestinationService.java @@ -23,58 +23,6 @@ public EventDestinationService(StripeResponseGetter responseGetter) { super(responseGetter); } - /** Create a new event destination. */ - public EventDestination create(EventDestinationCreateParams params) throws StripeException { - return create(params, (RequestOptions) null); - } - /** Create a new event destination. */ - public EventDestination create(EventDestinationCreateParams params, RequestOptions options) - throws StripeException { - String path = "/v2/core/event_destinations"; - ApiRequest request = - new ApiRequest( - BaseAddress.API, - ApiResource.RequestMethod.POST, - path, - ApiRequestParams.paramsToMap(params), - options); - return this.request(request, EventDestination.class); - } - /** Delete an event destination. */ - public EventDestination delete(String id) throws StripeException { - return delete(id, (RequestOptions) null); - } - /** Delete an event destination. */ - public EventDestination delete(String id, RequestOptions options) throws StripeException { - String path = String.format("/v2/core/event_destinations/%s", ApiResource.urlEncodeId(id)); - ApiRequest request = - new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.DELETE, path, null, options); - return this.request(request, EventDestination.class); - } - /** Disable an event destination. */ - public EventDestination disable(String id) throws StripeException { - return disable(id, (RequestOptions) null); - } - /** Disable an event destination. */ - public EventDestination disable(String id, RequestOptions options) throws StripeException { - String path = - String.format("/v2/core/event_destinations/%s/disable", ApiResource.urlEncodeId(id)); - ApiRequest request = - new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, null, options); - return this.request(request, EventDestination.class); - } - /** Enable an event destination. */ - public EventDestination enable(String id) throws StripeException { - return enable(id, (RequestOptions) null); - } - /** Enable an event destination. */ - public EventDestination enable(String id, RequestOptions options) throws StripeException { - String path = - String.format("/v2/core/event_destinations/%s/enable", ApiResource.urlEncodeId(id)); - ApiRequest request = - new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, null, options); - return this.request(request, EventDestination.class); - } /** Lists all event destinations. */ public StripeCollection list(EventDestinationListParams params) throws StripeException { @@ -101,16 +49,33 @@ public StripeCollection list( options); return this.request(request, new TypeToken>() {}.getType()); } - /** Send a {@code ping} event to an event destination. */ - public Event ping(String id) throws StripeException { - return ping(id, (RequestOptions) null); + /** Create a new event destination. */ + public EventDestination create(EventDestinationCreateParams params) throws StripeException { + return create(params, (RequestOptions) null); } - /** Send a {@code ping} event to an event destination. */ - public Event ping(String id, RequestOptions options) throws StripeException { - String path = String.format("/v2/core/event_destinations/%s/ping", ApiResource.urlEncodeId(id)); + /** Create a new event destination. */ + public EventDestination create(EventDestinationCreateParams params, RequestOptions options) + throws StripeException { + String path = "/v2/core/event_destinations"; ApiRequest request = - new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, null, options); - return this.request(request, Event.class); + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, EventDestination.class); + } + /** Delete an event destination. */ + public EventDestination delete(String id) throws StripeException { + return delete(id, (RequestOptions) null); + } + /** Delete an event destination. */ + public EventDestination delete(String id, RequestOptions options) throws StripeException { + String path = String.format("/v2/core/event_destinations/%s", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.DELETE, path, null, options); + return this.request(request, EventDestination.class); } /** Retrieves the details of an event destination. */ public EventDestination retrieve(String id, EventDestinationRetrieveParams params) @@ -166,4 +131,39 @@ public EventDestination update( options); return this.request(request, EventDestination.class); } + /** Disable an event destination. */ + public EventDestination disable(String id) throws StripeException { + return disable(id, (RequestOptions) null); + } + /** Disable an event destination. */ + public EventDestination disable(String id, RequestOptions options) throws StripeException { + String path = + String.format("/v2/core/event_destinations/%s/disable", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, null, options); + return this.request(request, EventDestination.class); + } + /** Enable an event destination. */ + public EventDestination enable(String id) throws StripeException { + return enable(id, (RequestOptions) null); + } + /** Enable an event destination. */ + public EventDestination enable(String id, RequestOptions options) throws StripeException { + String path = + String.format("/v2/core/event_destinations/%s/enable", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, null, options); + return this.request(request, EventDestination.class); + } + /** Send a {@code ping} event to an event destination. */ + public Event ping(String id) throws StripeException { + return ping(id, (RequestOptions) null); + } + /** Send a {@code ping} event to an event destination. */ + public Event ping(String id, RequestOptions options) throws StripeException { + String path = String.format("/v2/core/event_destinations/%s/ping", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, null, options); + return this.request(request, Event.class); + } } diff --git a/src/main/java/com/stripe/service/v2/core/accounts/PersonService.java b/src/main/java/com/stripe/service/v2/core/accounts/PersonService.java index bcfc6599688..6cece69901f 100644 --- a/src/main/java/com/stripe/service/v2/core/accounts/PersonService.java +++ b/src/main/java/com/stripe/service/v2/core/accounts/PersonService.java @@ -21,6 +21,33 @@ public PersonService(StripeResponseGetter responseGetter) { super(responseGetter); } + /** Returns a list of Persons associated with an Account. */ + public StripeCollection list(String accountId, PersonListParams params) + throws StripeException { + return list(accountId, params, (RequestOptions) null); + } + /** Returns a list of Persons associated with an Account. */ + public StripeCollection list(String accountId, RequestOptions options) + throws StripeException { + return list(accountId, (PersonListParams) null, options); + } + /** Returns a list of Persons associated with an Account. */ + public StripeCollection list(String accountId) throws StripeException { + return list(accountId, (PersonListParams) null, (RequestOptions) null); + } + /** Returns a list of Persons associated with an Account. */ + public StripeCollection list( + String accountId, PersonListParams params, RequestOptions options) throws StripeException { + String path = String.format("/v2/core/accounts/%s/persons", ApiResource.urlEncodeId(accountId)); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, new TypeToken>() {}.getType()); + } /** Create a Person associated with an Account. */ public Person create(String accountId, PersonCreateParams params) throws StripeException { return create(accountId, params, (RequestOptions) null); @@ -60,33 +87,6 @@ public Person delete(String accountId, String id, RequestOptions options) throws new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.DELETE, path, null, options); return this.request(request, Person.class); } - /** Returns a list of Persons associated with an Account. */ - public StripeCollection list(String accountId, PersonListParams params) - throws StripeException { - return list(accountId, params, (RequestOptions) null); - } - /** Returns a list of Persons associated with an Account. */ - public StripeCollection list(String accountId, RequestOptions options) - throws StripeException { - return list(accountId, (PersonListParams) null, options); - } - /** Returns a list of Persons associated with an Account. */ - public StripeCollection list(String accountId) throws StripeException { - return list(accountId, (PersonListParams) null, (RequestOptions) null); - } - /** Returns a list of Persons associated with an Account. */ - public StripeCollection list( - String accountId, PersonListParams params, RequestOptions options) throws StripeException { - String path = String.format("/v2/core/accounts/%s/persons", ApiResource.urlEncodeId(accountId)); - ApiRequest request = - new ApiRequest( - BaseAddress.API, - ApiResource.RequestMethod.GET, - path, - ApiRequestParams.paramsToMap(params), - options); - return this.request(request, new TypeToken>() {}.getType()); - } /** Retrieves a Person associated with an Account. */ public Person retrieve(String accountId, String id) throws StripeException { return retrieve(accountId, id, (RequestOptions) null); diff --git a/src/main/java/com/stripe/service/v2/core/vault/GbBankAccountService.java b/src/main/java/com/stripe/service/v2/core/vault/GbBankAccountService.java index 4001770b299..76965eb88e1 100644 --- a/src/main/java/com/stripe/service/v2/core/vault/GbBankAccountService.java +++ b/src/main/java/com/stripe/service/v2/core/vault/GbBankAccountService.java @@ -18,6 +18,34 @@ public GbBankAccountService(StripeResponseGetter responseGetter) { super(responseGetter); } + /** Create a GB bank account. */ + public GbBankAccount create(GbBankAccountCreateParams params) throws StripeException { + return create(params, (RequestOptions) null); + } + /** Create a GB bank account. */ + public GbBankAccount create(GbBankAccountCreateParams params, RequestOptions options) + throws StripeException { + String path = "/v2/core/vault/gb_bank_accounts"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, GbBankAccount.class); + } + /** Retrieve a GB bank account. */ + public GbBankAccount retrieve(String id) throws StripeException { + return retrieve(id, (RequestOptions) null); + } + /** Retrieve a GB bank account. */ + public GbBankAccount retrieve(String id, RequestOptions options) throws StripeException { + String path = String.format("/v2/core/vault/gb_bank_accounts/%s", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, null, options); + return this.request(request, GbBankAccount.class); + } /** * Confirm that you have received the result of the Confirmation of Payee request, and that you * are okay with proceeding to pay out to this bank account despite the account not matching, @@ -63,23 +91,6 @@ public GbBankAccount archive(String id, RequestOptions options) throws StripeExc new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, null, options); return this.request(request, GbBankAccount.class); } - /** Create a GB bank account. */ - public GbBankAccount create(GbBankAccountCreateParams params) throws StripeException { - return create(params, (RequestOptions) null); - } - /** Create a GB bank account. */ - public GbBankAccount create(GbBankAccountCreateParams params, RequestOptions options) - throws StripeException { - String path = "/v2/core/vault/gb_bank_accounts"; - ApiRequest request = - new ApiRequest( - BaseAddress.API, - ApiResource.RequestMethod.POST, - path, - ApiRequestParams.paramsToMap(params), - options); - return this.request(request, GbBankAccount.class); - } /** * Initiate Confirmation of Payee (CoP) in order to verify that the owner of a UK bank account * matches who you expect. This must be done on all UK bank accounts before sending domestic @@ -133,15 +144,4 @@ public GbBankAccount initiateConfirmationOfPayee( options); return this.request(request, GbBankAccount.class); } - /** Retrieve a GB bank account. */ - public GbBankAccount retrieve(String id) throws StripeException { - return retrieve(id, (RequestOptions) null); - } - /** Retrieve a GB bank account. */ - public GbBankAccount retrieve(String id, RequestOptions options) throws StripeException { - String path = String.format("/v2/core/vault/gb_bank_accounts/%s", ApiResource.urlEncodeId(id)); - ApiRequest request = - new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, null, options); - return this.request(request, GbBankAccount.class); - } } diff --git a/src/main/java/com/stripe/service/v2/core/vault/UsBankAccountService.java b/src/main/java/com/stripe/service/v2/core/vault/UsBankAccountService.java index 8c8ffaf43b9..177838d0420 100644 --- a/src/main/java/com/stripe/service/v2/core/vault/UsBankAccountService.java +++ b/src/main/java/com/stripe/service/v2/core/vault/UsBankAccountService.java @@ -22,27 +22,6 @@ public UsBankAccountService(StripeResponseGetter responseGetter) { super(responseGetter); } - /** - * Archive a USBankAccount object. USBankAccount objects will not be automatically archived by - * Stripe. Archived USBankAccount objects cannot be used as outbound destinations and will not - * appear in the outbound destination list. - */ - public UsBankAccount archive(String id) throws StripeException, ControlledByDashboardException { - return archive(id, (RequestOptions) null); - } - /** - * Archive a USBankAccount object. USBankAccount objects will not be automatically archived by - * Stripe. Archived USBankAccount objects cannot be used as outbound destinations and will not - * appear in the outbound destination list. - */ - public UsBankAccount archive(String id, RequestOptions options) - throws StripeException, ControlledByDashboardException { - String path = - String.format("/v2/core/vault/us_bank_accounts/%s/archive", ApiResource.urlEncodeId(id)); - ApiRequest request = - new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, null, options); - return this.request(request, UsBankAccount.class); - } /** Create a USBankAccount object. */ public UsBankAccount create(UsBankAccountCreateParams params) throws StripeException, BlockedByStripeException, InvalidPaymentMethodException, @@ -118,4 +97,25 @@ public UsBankAccount update(String id, UsBankAccountUpdateParams params, Request options); return this.request(request, UsBankAccount.class); } + /** + * Archive a USBankAccount object. USBankAccount objects will not be automatically archived by + * Stripe. Archived USBankAccount objects cannot be used as outbound destinations and will not + * appear in the outbound destination list. + */ + public UsBankAccount archive(String id) throws StripeException, ControlledByDashboardException { + return archive(id, (RequestOptions) null); + } + /** + * Archive a USBankAccount object. USBankAccount objects will not be automatically archived by + * Stripe. Archived USBankAccount objects cannot be used as outbound destinations and will not + * appear in the outbound destination list. + */ + public UsBankAccount archive(String id, RequestOptions options) + throws StripeException, ControlledByDashboardException { + String path = + String.format("/v2/core/vault/us_bank_accounts/%s/archive", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, null, options); + return this.request(request, UsBankAccount.class); + } } diff --git a/src/main/java/com/stripe/service/v2/moneymanagement/FinancialAddressService.java b/src/main/java/com/stripe/service/v2/moneymanagement/FinancialAddressService.java index 61dd6af524f..9339ed2528b 100644 --- a/src/main/java/com/stripe/service/v2/moneymanagement/FinancialAddressService.java +++ b/src/main/java/com/stripe/service/v2/moneymanagement/FinancialAddressService.java @@ -2,6 +2,7 @@ package com.stripe.service.v2.moneymanagement; import com.google.gson.reflect.TypeToken; +import com.stripe.exception.FeatureNotEnabledException; import com.stripe.exception.FinancialAccountNotOpenException; import com.stripe.exception.StripeException; import com.stripe.model.v2.StripeCollection; @@ -22,24 +23,6 @@ public FinancialAddressService(StripeResponseGetter responseGetter) { super(responseGetter); } - /** Create a new FinancialAddress for a FinancialAccount. */ - public FinancialAddress create(FinancialAddressCreateParams params) - throws StripeException, FinancialAccountNotOpenException { - return create(params, (RequestOptions) null); - } - /** Create a new FinancialAddress for a FinancialAccount. */ - public FinancialAddress create(FinancialAddressCreateParams params, RequestOptions options) - throws StripeException, FinancialAccountNotOpenException { - String path = "/v2/money_management/financial_addresses"; - ApiRequest request = - new ApiRequest( - BaseAddress.API, - ApiResource.RequestMethod.POST, - path, - ApiRequestParams.paramsToMap(params), - options); - return this.request(request, FinancialAddress.class); - } /** List all FinancialAddresses for a FinancialAccount. */ public StripeCollection list(FinancialAddressListParams params) throws StripeException { @@ -66,6 +49,24 @@ public StripeCollection list( options); return this.request(request, new TypeToken>() {}.getType()); } + /** Create a new FinancialAddress for a FinancialAccount. */ + public FinancialAddress create(FinancialAddressCreateParams params) + throws StripeException, FinancialAccountNotOpenException, FeatureNotEnabledException { + return create(params, (RequestOptions) null); + } + /** Create a new FinancialAddress for a FinancialAccount. */ + public FinancialAddress create(FinancialAddressCreateParams params, RequestOptions options) + throws StripeException, FinancialAccountNotOpenException, FeatureNotEnabledException { + String path = "/v2/money_management/financial_addresses"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, FinancialAddress.class); + } /** * Retrieve a FinancialAddress. By default, the FinancialAddress will be returned in its * unexpanded state, revealing only the last 4 digits of the account number. diff --git a/src/main/java/com/stripe/service/v2/moneymanagement/InboundTransferService.java b/src/main/java/com/stripe/service/v2/moneymanagement/InboundTransferService.java index 5c05cc0a4dd..99e0b2ae81a 100644 --- a/src/main/java/com/stripe/service/v2/moneymanagement/InboundTransferService.java +++ b/src/main/java/com/stripe/service/v2/moneymanagement/InboundTransferService.java @@ -21,24 +21,6 @@ public InboundTransferService(StripeResponseGetter responseGetter) { super(responseGetter); } - /** InboundTransfers APIs are used to create, retrieve or list InboundTransfers. */ - public InboundTransfer create(InboundTransferCreateParams params) - throws StripeException, BlockedByStripeException { - return create(params, (RequestOptions) null); - } - /** InboundTransfers APIs are used to create, retrieve or list InboundTransfers. */ - public InboundTransfer create(InboundTransferCreateParams params, RequestOptions options) - throws StripeException, BlockedByStripeException { - String path = "/v2/money_management/inbound_transfers"; - ApiRequest request = - new ApiRequest( - BaseAddress.API, - ApiResource.RequestMethod.POST, - path, - ApiRequestParams.paramsToMap(params), - options); - return this.request(request, InboundTransfer.class); - } /** Retrieves a list of InboundTransfers. */ public StripeCollection list(InboundTransferListParams params) throws StripeException { @@ -65,6 +47,24 @@ public StripeCollection list( options); return this.request(request, new TypeToken>() {}.getType()); } + /** InboundTransfers APIs are used to create, retrieve or list InboundTransfers. */ + public InboundTransfer create(InboundTransferCreateParams params) + throws StripeException, BlockedByStripeException { + return create(params, (RequestOptions) null); + } + /** InboundTransfers APIs are used to create, retrieve or list InboundTransfers. */ + public InboundTransfer create(InboundTransferCreateParams params, RequestOptions options) + throws StripeException, BlockedByStripeException { + String path = "/v2/money_management/inbound_transfers"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, InboundTransfer.class); + } /** Retrieve an InboundTransfer by ID. */ public InboundTransfer retrieve(String id) throws StripeException { return retrieve(id, (RequestOptions) null); diff --git a/src/main/java/com/stripe/service/v2/moneymanagement/OutboundPaymentService.java b/src/main/java/com/stripe/service/v2/moneymanagement/OutboundPaymentService.java index dff8bc43139..6cbc880a6d5 100644 --- a/src/main/java/com/stripe/service/v2/moneymanagement/OutboundPaymentService.java +++ b/src/main/java/com/stripe/service/v2/moneymanagement/OutboundPaymentService.java @@ -26,41 +26,6 @@ public OutboundPaymentService(StripeResponseGetter responseGetter) { super(responseGetter); } - /** Cancels an OutboundPayment. Only processing OutboundPayments can be canceled. */ - public OutboundPayment cancel(String id) - throws StripeException, AlreadyCanceledException, NotCancelableException { - return cancel(id, (RequestOptions) null); - } - /** Cancels an OutboundPayment. Only processing OutboundPayments can be canceled. */ - public OutboundPayment cancel(String id, RequestOptions options) - throws StripeException, AlreadyCanceledException, NotCancelableException { - String path = - String.format( - "/v2/money_management/outbound_payments/%s/cancel", ApiResource.urlEncodeId(id)); - ApiRequest request = - new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, null, options); - return this.request(request, OutboundPayment.class); - } - /** Creates an OutboundPayment. */ - public OutboundPayment create(OutboundPaymentCreateParams params) - throws StripeException, InsufficientFundsException, QuotaExceededException, - RecipientNotNotifiableException, FeatureNotEnabledException { - return create(params, (RequestOptions) null); - } - /** Creates an OutboundPayment. */ - public OutboundPayment create(OutboundPaymentCreateParams params, RequestOptions options) - throws StripeException, InsufficientFundsException, QuotaExceededException, - RecipientNotNotifiableException, FeatureNotEnabledException { - String path = "/v2/money_management/outbound_payments"; - ApiRequest request = - new ApiRequest( - BaseAddress.API, - ApiResource.RequestMethod.POST, - path, - ApiRequestParams.paramsToMap(params), - options); - return this.request(request, OutboundPayment.class); - } /** Returns a list of OutboundPayments that match the provided filters. */ public StripeCollection list(OutboundPaymentListParams params) throws StripeException { @@ -87,6 +52,26 @@ public StripeCollection list( options); return this.request(request, new TypeToken>() {}.getType()); } + /** Creates an OutboundPayment. */ + public OutboundPayment create(OutboundPaymentCreateParams params) + throws StripeException, InsufficientFundsException, QuotaExceededException, + RecipientNotNotifiableException, FeatureNotEnabledException { + return create(params, (RequestOptions) null); + } + /** Creates an OutboundPayment. */ + public OutboundPayment create(OutboundPaymentCreateParams params, RequestOptions options) + throws StripeException, InsufficientFundsException, QuotaExceededException, + RecipientNotNotifiableException, FeatureNotEnabledException { + String path = "/v2/money_management/outbound_payments"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, OutboundPayment.class); + } /** * Retrieves the details of an existing OutboundPayment by passing the unique OutboundPayment ID * from either the OutboundPayment create or list response. @@ -105,4 +90,19 @@ public OutboundPayment retrieve(String id, RequestOptions options) throws Stripe new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, null, options); return this.request(request, OutboundPayment.class); } + /** Cancels an OutboundPayment. Only processing OutboundPayments can be canceled. */ + public OutboundPayment cancel(String id) + throws StripeException, AlreadyCanceledException, NotCancelableException { + return cancel(id, (RequestOptions) null); + } + /** Cancels an OutboundPayment. Only processing OutboundPayments can be canceled. */ + public OutboundPayment cancel(String id, RequestOptions options) + throws StripeException, AlreadyCanceledException, NotCancelableException { + String path = + String.format( + "/v2/money_management/outbound_payments/%s/cancel", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, null, options); + return this.request(request, OutboundPayment.class); + } } diff --git a/src/main/java/com/stripe/service/v2/moneymanagement/OutboundSetupIntentService.java b/src/main/java/com/stripe/service/v2/moneymanagement/OutboundSetupIntentService.java index 38cca0ca4fd..3f513461b0b 100644 --- a/src/main/java/com/stripe/service/v2/moneymanagement/OutboundSetupIntentService.java +++ b/src/main/java/com/stripe/service/v2/moneymanagement/OutboundSetupIntentService.java @@ -24,18 +24,32 @@ public OutboundSetupIntentService(StripeResponseGetter responseGetter) { super(responseGetter); } - /** Cancel an OutboundSetupIntent object. */ - public OutboundSetupIntent cancel(String id) throws StripeException { - return cancel(id, (RequestOptions) null); + /** List the OutboundSetupIntent objects. */ + public StripeCollection list(OutboundSetupIntentListParams params) + throws StripeException { + return list(params, (RequestOptions) null); } - /** Cancel an OutboundSetupIntent object. */ - public OutboundSetupIntent cancel(String id, RequestOptions options) throws StripeException { - String path = - String.format( - "/v2/money_management/outbound_setup_intents/%s/cancel", ApiResource.urlEncodeId(id)); + /** List the OutboundSetupIntent objects. */ + public StripeCollection list(RequestOptions options) throws StripeException { + return list((OutboundSetupIntentListParams) null, options); + } + /** List the OutboundSetupIntent objects. */ + public StripeCollection list() throws StripeException { + return list((OutboundSetupIntentListParams) null, (RequestOptions) null); + } + /** List the OutboundSetupIntent objects. */ + public StripeCollection list( + OutboundSetupIntentListParams params, RequestOptions options) throws StripeException { + String path = "/v2/money_management/outbound_setup_intents"; ApiRequest request = - new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, null, options); - return this.request(request, OutboundSetupIntent.class); + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request( + request, new TypeToken>() {}.getType()); } /** Create an OutboundSetupIntent object. */ public OutboundSetupIntent create(OutboundSetupIntentCreateParams params) @@ -69,33 +83,6 @@ public OutboundSetupIntent create(OutboundSetupIntentCreateParams params, Reques options); return this.request(request, OutboundSetupIntent.class); } - /** List the OutboundSetupIntent objects. */ - public StripeCollection list(OutboundSetupIntentListParams params) - throws StripeException { - return list(params, (RequestOptions) null); - } - /** List the OutboundSetupIntent objects. */ - public StripeCollection list(RequestOptions options) throws StripeException { - return list((OutboundSetupIntentListParams) null, options); - } - /** List the OutboundSetupIntent objects. */ - public StripeCollection list() throws StripeException { - return list((OutboundSetupIntentListParams) null, (RequestOptions) null); - } - /** List the OutboundSetupIntent objects. */ - public StripeCollection list( - OutboundSetupIntentListParams params, RequestOptions options) throws StripeException { - String path = "/v2/money_management/outbound_setup_intents"; - ApiRequest request = - new ApiRequest( - BaseAddress.API, - ApiResource.RequestMethod.GET, - path, - ApiRequestParams.paramsToMap(params), - options); - return this.request( - request, new TypeToken>() {}.getType()); - } /** Retrieve an OutboundSetupIntent object. */ public OutboundSetupIntent retrieve(String id) throws StripeException { return retrieve(id, (RequestOptions) null); @@ -144,4 +131,17 @@ public OutboundSetupIntent update( options); return this.request(request, OutboundSetupIntent.class); } + /** Cancel an OutboundSetupIntent object. */ + public OutboundSetupIntent cancel(String id) throws StripeException { + return cancel(id, (RequestOptions) null); + } + /** Cancel an OutboundSetupIntent object. */ + public OutboundSetupIntent cancel(String id, RequestOptions options) throws StripeException { + String path = + String.format( + "/v2/money_management/outbound_setup_intents/%s/cancel", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, null, options); + return this.request(request, OutboundSetupIntent.class); + } } diff --git a/src/main/java/com/stripe/service/v2/moneymanagement/OutboundTransferService.java b/src/main/java/com/stripe/service/v2/moneymanagement/OutboundTransferService.java index 4665370e136..8c407046ee2 100644 --- a/src/main/java/com/stripe/service/v2/moneymanagement/OutboundTransferService.java +++ b/src/main/java/com/stripe/service/v2/moneymanagement/OutboundTransferService.java @@ -3,6 +3,7 @@ import com.google.gson.reflect.TypeToken; import com.stripe.exception.AlreadyCanceledException; +import com.stripe.exception.FeatureNotEnabledException; import com.stripe.exception.InsufficientFundsException; import com.stripe.exception.NotCancelableException; import com.stripe.exception.StripeException; @@ -23,39 +24,6 @@ public OutboundTransferService(StripeResponseGetter responseGetter) { super(responseGetter); } - /** Cancels an OutboundTransfer. Only processing OutboundTransfers can be canceled. */ - public OutboundTransfer cancel(String id) - throws StripeException, AlreadyCanceledException, NotCancelableException { - return cancel(id, (RequestOptions) null); - } - /** Cancels an OutboundTransfer. Only processing OutboundTransfers can be canceled. */ - public OutboundTransfer cancel(String id, RequestOptions options) - throws StripeException, AlreadyCanceledException, NotCancelableException { - String path = - String.format( - "/v2/money_management/outbound_transfers/%s/cancel", ApiResource.urlEncodeId(id)); - ApiRequest request = - new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, null, options); - return this.request(request, OutboundTransfer.class); - } - /** Creates an OutboundTransfer. */ - public OutboundTransfer create(OutboundTransferCreateParams params) - throws StripeException, InsufficientFundsException { - return create(params, (RequestOptions) null); - } - /** Creates an OutboundTransfer. */ - public OutboundTransfer create(OutboundTransferCreateParams params, RequestOptions options) - throws StripeException, InsufficientFundsException { - String path = "/v2/money_management/outbound_transfers"; - ApiRequest request = - new ApiRequest( - BaseAddress.API, - ApiResource.RequestMethod.POST, - path, - ApiRequestParams.paramsToMap(params), - options); - return this.request(request, OutboundTransfer.class); - } /** Returns a list of OutboundTransfers that match the provided filters. */ public StripeCollection list(OutboundTransferListParams params) throws StripeException { @@ -82,6 +50,24 @@ public StripeCollection list( options); return this.request(request, new TypeToken>() {}.getType()); } + /** Creates an OutboundTransfer. */ + public OutboundTransfer create(OutboundTransferCreateParams params) + throws StripeException, InsufficientFundsException, FeatureNotEnabledException { + return create(params, (RequestOptions) null); + } + /** Creates an OutboundTransfer. */ + public OutboundTransfer create(OutboundTransferCreateParams params, RequestOptions options) + throws StripeException, InsufficientFundsException, FeatureNotEnabledException { + String path = "/v2/money_management/outbound_transfers"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, OutboundTransfer.class); + } /** * Retrieves the details of an existing OutboundTransfer by passing the unique OutboundTransfer ID * from either the OutboundPayment create or list response. @@ -100,4 +86,19 @@ public OutboundTransfer retrieve(String id, RequestOptions options) throws Strip new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, null, options); return this.request(request, OutboundTransfer.class); } + /** Cancels an OutboundTransfer. Only processing OutboundTransfers can be canceled. */ + public OutboundTransfer cancel(String id) + throws StripeException, AlreadyCanceledException, NotCancelableException { + return cancel(id, (RequestOptions) null); + } + /** Cancels an OutboundTransfer. Only processing OutboundTransfers can be canceled. */ + public OutboundTransfer cancel(String id, RequestOptions options) + throws StripeException, AlreadyCanceledException, NotCancelableException { + String path = + String.format( + "/v2/money_management/outbound_transfers/%s/cancel", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, null, options); + return this.request(request, OutboundTransfer.class); + } } diff --git a/src/main/java/com/stripe/service/v2/moneymanagement/PayoutMethodService.java b/src/main/java/com/stripe/service/v2/moneymanagement/PayoutMethodService.java index eb6448d1513..7887d42b156 100644 --- a/src/main/java/com/stripe/service/v2/moneymanagement/PayoutMethodService.java +++ b/src/main/java/com/stripe/service/v2/moneymanagement/PayoutMethodService.java @@ -21,27 +21,6 @@ public PayoutMethodService(StripeResponseGetter responseGetter) { super(responseGetter); } - /** - * Archive a PayoutMethod object. Archived objects cannot be used as payout methods and will not - * appear in the payout method list. - */ - public PayoutMethod archive(String id) - throws StripeException, ControlledByDashboardException, InvalidPayoutMethodException { - return archive(id, (RequestOptions) null); - } - /** - * Archive a PayoutMethod object. Archived objects cannot be used as payout methods and will not - * appear in the payout method list. - */ - public PayoutMethod archive(String id, RequestOptions options) - throws StripeException, ControlledByDashboardException, InvalidPayoutMethodException { - String path = - String.format( - "/v2/money_management/payout_methods/%s/archive", ApiResource.urlEncodeId(id)); - ApiRequest request = - new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, null, options); - return this.request(request, PayoutMethod.class); - } /** List objects that adhere to the PayoutMethod interface. */ public StripeCollection list(PayoutMethodListParams params) throws StripeException { return list(params, (RequestOptions) null); @@ -80,6 +59,27 @@ public PayoutMethod retrieve(String id, RequestOptions options) new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, null, options); return this.request(request, PayoutMethod.class); } + /** + * Archive a PayoutMethod object. Archived objects cannot be used as payout methods and will not + * appear in the payout method list. + */ + public PayoutMethod archive(String id) + throws StripeException, ControlledByDashboardException, InvalidPayoutMethodException { + return archive(id, (RequestOptions) null); + } + /** + * Archive a PayoutMethod object. Archived objects cannot be used as payout methods and will not + * appear in the payout method list. + */ + public PayoutMethod archive(String id, RequestOptions options) + throws StripeException, ControlledByDashboardException, InvalidPayoutMethodException { + String path = + String.format( + "/v2/money_management/payout_methods/%s/archive", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, null, options); + return this.request(request, PayoutMethod.class); + } /** Unarchive an PayoutMethod object. */ public PayoutMethod unarchive(String id) throws StripeException, ControlledByDashboardException, InvalidPayoutMethodException { diff --git a/src/main/java/com/stripe/service/v2/payments/OffSessionPaymentService.java b/src/main/java/com/stripe/service/v2/payments/OffSessionPaymentService.java index 5e4f48c0132..c0dfad6e8ce 100644 --- a/src/main/java/com/stripe/service/v2/payments/OffSessionPaymentService.java +++ b/src/main/java/com/stripe/service/v2/payments/OffSessionPaymentService.java @@ -20,35 +20,6 @@ public OffSessionPaymentService(StripeResponseGetter responseGetter) { super(responseGetter); } - /** Cancel OSP. */ - public OffSessionPayment cancel(String id) throws StripeException { - return cancel(id, (RequestOptions) null); - } - /** Cancel OSP. */ - public OffSessionPayment cancel(String id, RequestOptions options) throws StripeException { - String path = - String.format("/v2/payments/off_session_payments/%s/cancel", ApiResource.urlEncodeId(id)); - ApiRequest request = - new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, null, options); - return this.request(request, OffSessionPayment.class); - } - /** Create OSP. */ - public OffSessionPayment create(OffSessionPaymentCreateParams params) throws StripeException { - return create(params, (RequestOptions) null); - } - /** Create OSP. */ - public OffSessionPayment create(OffSessionPaymentCreateParams params, RequestOptions options) - throws StripeException { - String path = "/v2/payments/off_session_payments"; - ApiRequest request = - new ApiRequest( - BaseAddress.API, - ApiResource.RequestMethod.POST, - path, - ApiRequestParams.paramsToMap(params), - options); - return this.request(request, OffSessionPayment.class); - } /** List OSPs matching filter. */ public StripeCollection list(OffSessionPaymentListParams params) throws StripeException { @@ -75,6 +46,23 @@ public StripeCollection list( options); return this.request(request, new TypeToken>() {}.getType()); } + /** Create OSP. */ + public OffSessionPayment create(OffSessionPaymentCreateParams params) throws StripeException { + return create(params, (RequestOptions) null); + } + /** Create OSP. */ + public OffSessionPayment create(OffSessionPaymentCreateParams params, RequestOptions options) + throws StripeException { + String path = "/v2/payments/off_session_payments"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, OffSessionPayment.class); + } /** Retrieve OSP by ID. */ public OffSessionPayment retrieve(String id) throws StripeException { return retrieve(id, (RequestOptions) null); @@ -87,4 +75,16 @@ public OffSessionPayment retrieve(String id, RequestOptions options) throws Stri new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, null, options); return this.request(request, OffSessionPayment.class); } + /** Cancel OSP. */ + public OffSessionPayment cancel(String id) throws StripeException { + return cancel(id, (RequestOptions) null); + } + /** Cancel OSP. */ + public OffSessionPayment cancel(String id, RequestOptions options) throws StripeException { + String path = + String.format("/v2/payments/off_session_payments/%s/cancel", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, null, options); + return this.request(request, OffSessionPayment.class); + } } diff --git a/src/test/java/com/stripe/functional/GeneratedExamples.java b/src/test/java/com/stripe/functional/GeneratedExamples.java index d6186485fcf..8458843c3da 100644 --- a/src/test/java/com/stripe/functional/GeneratedExamples.java +++ b/src/test/java/com/stripe/functional/GeneratedExamples.java @@ -15635,50 +15635,172 @@ public void testWebhookEndpointsPost2Services() throws StripeException { } @Test - public void testV2CoreAccountPostServices() throws StripeException { + public void testV2BillingMeterEventAdjustmentPostServices() throws StripeException { stubRequest( BaseAddress.API, ApiResource.RequestMethod.POST, - "/v2/core/accounts/id_123/close", + "/v2/billing/meter_event_adjustments", null, null, - com.stripe.model.v2.core.Account.class, - "{\"applied_configurations\":[\"recipient\"],\"configuration\":null,\"contact_email\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"dashboard\":null,\"defaults\":null,\"display_name\":null,\"id\":\"obj_123\",\"identity\":null,\"metadata\":null,\"object\":\"v2.core.account\",\"requirements\":null,\"livemode\":true}"); + com.stripe.model.v2.billing.MeterEventAdjustment.class, + "{\"cancel\":{\"identifier\":\"identifier\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"event_name\":\"event_name\",\"id\":\"obj_123\",\"object\":\"v2.billing.meter_event_adjustment\",\"status\":\"complete\",\"type\":\"cancel\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); - com.stripe.param.v2.core.AccountCloseParams params = - com.stripe.param.v2.core.AccountCloseParams.builder().build(); + com.stripe.param.v2.billing.MeterEventAdjustmentCreateParams params = + com.stripe.param.v2.billing.MeterEventAdjustmentCreateParams.builder() + .setCancel( + com.stripe.param.v2.billing.MeterEventAdjustmentCreateParams.Cancel.builder() + .setIdentifier("identifier") + .build()) + .setEventName("event_name") + .setType(com.stripe.param.v2.billing.MeterEventAdjustmentCreateParams.Type.CANCEL) + .build(); - com.stripe.model.v2.core.Account account = - client.v2().core().accounts().close("id_123", params); - assertNotNull(account); + com.stripe.model.v2.billing.MeterEventAdjustment meterEventAdjustment = + client.v2().billing().meterEventAdjustments().create(params); + assertNotNull(meterEventAdjustment); verifyRequest( BaseAddress.API, ApiResource.RequestMethod.POST, - "/v2/core/accounts/id_123/close", + "/v2/billing/meter_event_adjustments", params.toMap(), null); } @Test - public void testV2CoreAccountPost2Services() throws StripeException { + public void testV2BillingMeterEventSessionPostServices() throws StripeException { stubRequest( BaseAddress.API, ApiResource.RequestMethod.POST, - "/v2/core/accounts", + "/v2/billing/meter_event_session", null, null, - com.stripe.model.v2.core.Account.class, - "{\"applied_configurations\":[\"recipient\"],\"configuration\":null,\"contact_email\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"dashboard\":null,\"defaults\":null,\"display_name\":null,\"id\":\"obj_123\",\"identity\":null,\"metadata\":null,\"object\":\"v2.core.account\",\"requirements\":null,\"livemode\":true}"); + com.stripe.model.v2.billing.MeterEventSession.class, + "{\"authentication_token\":\"authentication_token\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"object\":\"v2.billing.meter_event_session\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); - com.stripe.param.v2.core.AccountCreateParams params = - com.stripe.param.v2.core.AccountCreateParams.builder().build(); + com.stripe.model.v2.billing.MeterEventSession meterEventSession = + client.v2().billing().meterEventSession().create(); + assertNotNull(meterEventSession); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/billing/meter_event_session", + null, + null); + } - com.stripe.model.v2.core.Account account = client.v2().core().accounts().create(params); - assertNotNull(account); + @Test + public void testV2BillingMeterEventStreamPostServices() throws StripeException { + stubRequest( + BaseAddress.METER_EVENTS, + ApiResource.RequestMethod.POST, + "/v2/billing/meter_event_stream", + null, + null, + com.stripe.v2.EmptyStripeObject.class, + "{}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.billing.MeterEventStreamCreateParams params = + com.stripe.param.v2.billing.MeterEventStreamCreateParams.builder() + .addEvent( + com.stripe.param.v2.billing.MeterEventStreamCreateParams.Event.builder() + .setEventName("event_name") + .setIdentifier("identifier") + .putPayload("undefined", "payload") + .setTimestamp(Instant.parse("1970-01-01T15:18:46.294Z")) + .build()) + .build(); + + client.v2().billing().meterEventStream().create(params); verifyRequest( - BaseAddress.API, ApiResource.RequestMethod.POST, "/v2/core/accounts", params.toMap(), null); + BaseAddress.METER_EVENTS, + ApiResource.RequestMethod.POST, + "/v2/billing/meter_event_stream", + params.toMap(), + null); + } + + @Test + public void testV2BillingMeterEventPostServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/billing/meter_events", + null, + null, + com.stripe.model.v2.billing.MeterEvent.class, + "{\"created\":\"1970-01-12T21:42:34.472Z\",\"event_name\":\"event_name\",\"identifier\":\"identifier\",\"object\":\"v2.billing.meter_event\",\"payload\":{\"undefined\":\"payload\"},\"timestamp\":\"1970-01-01T15:18:46.294Z\",\"livemode\":true}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.billing.MeterEventCreateParams params = + com.stripe.param.v2.billing.MeterEventCreateParams.builder() + .setEventName("event_name") + .putPayload("undefined", "payload") + .build(); + + com.stripe.model.v2.billing.MeterEvent meterEvent = + client.v2().billing().meterEvents().create(params); + assertNotNull(meterEvent); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/billing/meter_events", + params.toMap(), + null); + } + + @Test + public void testV2CoreAccountLinkPostServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/core/account_links", + null, + null, + com.stripe.model.v2.core.AccountLink.class, + "{\"account\":\"account\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"object\":\"v2.core.account_link\",\"url\":\"url\",\"use_case\":{\"type\":\"account_onboarding\",\"account_onboarding\":null,\"account_update\":null},\"livemode\":true}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.core.AccountLinkCreateParams params = + com.stripe.param.v2.core.AccountLinkCreateParams.builder() + .setAccount("account") + .setUseCase( + com.stripe.param.v2.core.AccountLinkCreateParams.UseCase.builder() + .setType( + com.stripe.param.v2.core.AccountLinkCreateParams.UseCase.Type + .ACCOUNT_ONBOARDING) + .setAccountOnboarding( + com.stripe.param.v2.core.AccountLinkCreateParams.UseCase.AccountOnboarding + .builder() + .addConfiguration( + com.stripe.param.v2.core.AccountLinkCreateParams.UseCase + .AccountOnboarding.Configuration.RECIPIENT) + .setRefreshUrl("refresh_url") + .setReturnUrl("return_url") + .build()) + .setAccountUpdate( + com.stripe.param.v2.core.AccountLinkCreateParams.UseCase.AccountUpdate + .builder() + .addConfiguration( + com.stripe.param.v2.core.AccountLinkCreateParams.UseCase + .AccountUpdate.Configuration.RECIPIENT) + .setRefreshUrl("refresh_url") + .setReturnUrl("return_url") + .build()) + .build()) + .build(); + + com.stripe.model.v2.core.AccountLink accountLink = + client.v2().core().accountLinks().create(params); + assertNotNull(accountLink); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/core/account_links", + params.toMap(), + null); } @Test @@ -15704,6 +15826,27 @@ public void testV2CoreAccountGetServices() throws StripeException { BaseAddress.API, ApiResource.RequestMethod.GET, "/v2/core/accounts", params.toMap(), null); } + @Test + public void testV2CoreAccountPostServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/core/accounts", + null, + null, + com.stripe.model.v2.core.Account.class, + "{\"applied_configurations\":[\"recipient\"],\"configuration\":null,\"contact_email\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"dashboard\":null,\"defaults\":null,\"display_name\":null,\"id\":\"obj_123\",\"identity\":null,\"metadata\":null,\"object\":\"v2.core.account\",\"requirements\":null,\"livemode\":true}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.core.AccountCreateParams params = + com.stripe.param.v2.core.AccountCreateParams.builder().build(); + + com.stripe.model.v2.core.Account account = client.v2().core().accounts().create(params); + assertNotNull(account); + verifyRequest( + BaseAddress.API, ApiResource.RequestMethod.POST, "/v2/core/accounts", params.toMap(), null); + } + @Test public void testV2CoreAccountGet2Services() throws StripeException { stubRequest( @@ -15731,7 +15874,7 @@ public void testV2CoreAccountGet2Services() throws StripeException { } @Test - public void testV2CoreAccountPost3Services() throws StripeException { + public void testV2CoreAccountPost2Services() throws StripeException { stubRequest( BaseAddress.API, ApiResource.RequestMethod.POST, @@ -15756,6 +15899,59 @@ public void testV2CoreAccountPost3Services() throws StripeException { null); } + @Test + public void testV2CoreAccountPost3Services() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/core/accounts/id_123/close", + null, + null, + com.stripe.model.v2.core.Account.class, + "{\"applied_configurations\":[\"recipient\"],\"configuration\":null,\"contact_email\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"dashboard\":null,\"defaults\":null,\"display_name\":null,\"id\":\"obj_123\",\"identity\":null,\"metadata\":null,\"object\":\"v2.core.account\",\"requirements\":null,\"livemode\":true}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.core.AccountCloseParams params = + com.stripe.param.v2.core.AccountCloseParams.builder().build(); + + com.stripe.model.v2.core.Account account = + client.v2().core().accounts().close("id_123", params); + assertNotNull(account); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/core/accounts/id_123/close", + params.toMap(), + null); + } + + @Test + public void testV2CoreAccountsPersonGetServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/core/accounts/account_id_123/persons", + null, + null, + new TypeToken< + com.stripe.model.v2.StripeCollection>() {}.getType(), + "{\"data\":[{\"account\":\"account\",\"additional_addresses\":null,\"additional_names\":null,\"additional_terms_of_service\":null,\"address\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"date_of_birth\":null,\"documents\":null,\"email\":null,\"given_name\":null,\"id\":\"obj_123\",\"id_numbers\":null,\"legal_gender\":null,\"metadata\":null,\"nationalities\":null,\"object\":\"v2.core.account_person\",\"phone\":null,\"political_exposure\":null,\"relationship\":null,\"script_addresses\":null,\"script_names\":null,\"surname\":null,\"updated\":\"1970-01-03T17:07:10.277Z\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.core.accounts.PersonListParams params = + com.stripe.param.v2.core.accounts.PersonListParams.builder().build(); + + com.stripe.model.v2.StripeCollection stripeCollection = + client.v2().core().accounts().persons().list("account_id_123", params); + assertNotNull(stripeCollection); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/core/accounts/account_id_123/persons", + params.toMap(), + null); + } + @Test public void testV2CoreAccountsPersonPostServices() throws StripeException { stubRequest( @@ -15805,33 +16001,6 @@ public void testV2CoreAccountsPersonDeleteServices() throws StripeException { null); } - @Test - public void testV2CoreAccountsPersonGetServices() throws StripeException { - stubRequest( - BaseAddress.API, - ApiResource.RequestMethod.GET, - "/v2/core/accounts/account_id_123/persons", - null, - null, - new TypeToken< - com.stripe.model.v2.StripeCollection>() {}.getType(), - "{\"data\":[{\"account\":\"account\",\"additional_addresses\":null,\"additional_names\":null,\"additional_terms_of_service\":null,\"address\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"date_of_birth\":null,\"documents\":null,\"email\":null,\"given_name\":null,\"id\":\"obj_123\",\"id_numbers\":null,\"legal_gender\":null,\"metadata\":null,\"nationalities\":null,\"object\":\"v2.core.account_person\",\"phone\":null,\"political_exposure\":null,\"relationship\":null,\"script_addresses\":null,\"script_names\":null,\"surname\":null,\"updated\":\"1970-01-03T17:07:10.277Z\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); - StripeClient client = new StripeClient(networkSpy); - - com.stripe.param.v2.core.accounts.PersonListParams params = - com.stripe.param.v2.core.accounts.PersonListParams.builder().build(); - - com.stripe.model.v2.StripeCollection stripeCollection = - client.v2().core().accounts().persons().list("account_id_123", params); - assertNotNull(stripeCollection); - verifyRequest( - BaseAddress.API, - ApiResource.RequestMethod.GET, - "/v2/core/accounts/account_id_123/persons", - params.toMap(), - null); - } - @Test public void testV2CoreAccountsPersonGet2Services() throws StripeException { stubRequest( @@ -15882,53 +16051,29 @@ public void testV2CoreAccountsPersonPost2Services() throws StripeException { } @Test - public void testV2CoreAccountLinkPostServices() throws StripeException { + public void testV2CoreEventDestinationGetServices() throws StripeException { stubRequest( BaseAddress.API, - ApiResource.RequestMethod.POST, - "/v2/core/account_links", + ApiResource.RequestMethod.GET, + "/v2/core/event_destinations", null, null, - com.stripe.model.v2.core.AccountLink.class, - "{\"account\":\"account\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"object\":\"v2.core.account_link\",\"url\":\"url\",\"use_case\":{\"type\":\"account_onboarding\",\"account_onboarding\":null,\"account_update\":null},\"livemode\":true}"); + new TypeToken< + com.stripe.model.v2.StripeCollection< + com.stripe.model.v2.EventDestination>>() {}.getType(), + "{\"data\":[{\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"events_from\":null,\"id\":\"obj_123\",\"metadata\":null,\"name\":\"name\",\"object\":\"v2.core.event_destination\",\"snapshot_api_version\":null,\"status\":\"disabled\",\"status_details\":null,\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\",\"livemode\":true,\"amazon_eventbridge\":null,\"webhook_endpoint\":null}],\"next_page_url\":null,\"previous_page_url\":null}"); StripeClient client = new StripeClient(networkSpy); - com.stripe.param.v2.core.AccountLinkCreateParams params = - com.stripe.param.v2.core.AccountLinkCreateParams.builder() - .setAccount("account") - .setUseCase( - com.stripe.param.v2.core.AccountLinkCreateParams.UseCase.builder() - .setType( - com.stripe.param.v2.core.AccountLinkCreateParams.UseCase.Type - .ACCOUNT_ONBOARDING) - .setAccountOnboarding( - com.stripe.param.v2.core.AccountLinkCreateParams.UseCase.AccountOnboarding - .builder() - .addConfiguration( - com.stripe.param.v2.core.AccountLinkCreateParams.UseCase - .AccountOnboarding.Configuration.RECIPIENT) - .setRefreshUrl("refresh_url") - .setReturnUrl("return_url") - .build()) - .setAccountUpdate( - com.stripe.param.v2.core.AccountLinkCreateParams.UseCase.AccountUpdate - .builder() - .addConfiguration( - com.stripe.param.v2.core.AccountLinkCreateParams.UseCase - .AccountUpdate.Configuration.RECIPIENT) - .setRefreshUrl("refresh_url") - .setReturnUrl("return_url") - .build()) - .build()) - .build(); + com.stripe.param.v2.core.EventDestinationListParams params = + com.stripe.param.v2.core.EventDestinationListParams.builder().build(); - com.stripe.model.v2.core.AccountLink accountLink = - client.v2().core().accountLinks().create(params); - assertNotNull(accountLink); + com.stripe.model.v2.StripeCollection stripeCollection = + client.v2().core().eventDestinations().list(params); + assertNotNull(stripeCollection); verifyRequest( BaseAddress.API, - ApiResource.RequestMethod.POST, - "/v2/core/account_links", + ApiResource.RequestMethod.GET, + "/v2/core/event_destinations", params.toMap(), null); } @@ -15989,124 +16134,100 @@ public void testV2CoreEventDestinationDeleteServices() throws StripeException { } @Test - public void testV2CoreEventDestinationPost2Services() throws StripeException { + public void testV2CoreEventDestinationGet2Services() throws StripeException { stubRequest( BaseAddress.API, - ApiResource.RequestMethod.POST, - "/v2/core/event_destinations/id_123/disable", + ApiResource.RequestMethod.GET, + "/v2/core/event_destinations/id_123", null, null, com.stripe.model.v2.EventDestination.class, "{\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"events_from\":null,\"id\":\"obj_123\",\"metadata\":null,\"name\":\"name\",\"object\":\"v2.core.event_destination\",\"snapshot_api_version\":null,\"status\":\"disabled\",\"status_details\":null,\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\",\"livemode\":true,\"amazon_eventbridge\":null,\"webhook_endpoint\":null}"); StripeClient client = new StripeClient(networkSpy); - com.stripe.model.v2.EventDestination eventDestination = - client.v2().core().eventDestinations().disable("id_123"); - assertNotNull(eventDestination); - verifyRequest( - BaseAddress.API, - ApiResource.RequestMethod.POST, - "/v2/core/event_destinations/id_123/disable", - null, - null); - } - - @Test - public void testV2CoreEventDestinationPost3Services() throws StripeException { - stubRequest( - BaseAddress.API, - ApiResource.RequestMethod.POST, - "/v2/core/event_destinations/id_123/enable", - null, - null, - com.stripe.model.v2.EventDestination.class, - "{\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"events_from\":null,\"id\":\"obj_123\",\"metadata\":null,\"name\":\"name\",\"object\":\"v2.core.event_destination\",\"snapshot_api_version\":null,\"status\":\"disabled\",\"status_details\":null,\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\",\"livemode\":true,\"amazon_eventbridge\":null,\"webhook_endpoint\":null}"); - StripeClient client = new StripeClient(networkSpy); + com.stripe.param.v2.core.EventDestinationRetrieveParams params = + com.stripe.param.v2.core.EventDestinationRetrieveParams.builder().build(); com.stripe.model.v2.EventDestination eventDestination = - client.v2().core().eventDestinations().enable("id_123"); + client.v2().core().eventDestinations().retrieve("id_123", params); assertNotNull(eventDestination); verifyRequest( BaseAddress.API, - ApiResource.RequestMethod.POST, - "/v2/core/event_destinations/id_123/enable", - null, + ApiResource.RequestMethod.GET, + "/v2/core/event_destinations/id_123", + params.toMap(), null); } @Test - public void testV2CoreEventDestinationGetServices() throws StripeException { + public void testV2CoreEventDestinationPost2Services() throws StripeException { stubRequest( BaseAddress.API, - ApiResource.RequestMethod.GET, - "/v2/core/event_destinations", + ApiResource.RequestMethod.POST, + "/v2/core/event_destinations/id_123", null, null, - new TypeToken< - com.stripe.model.v2.StripeCollection< - com.stripe.model.v2.EventDestination>>() {}.getType(), - "{\"data\":[{\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"events_from\":null,\"id\":\"obj_123\",\"metadata\":null,\"name\":\"name\",\"object\":\"v2.core.event_destination\",\"snapshot_api_version\":null,\"status\":\"disabled\",\"status_details\":null,\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\",\"livemode\":true,\"amazon_eventbridge\":null,\"webhook_endpoint\":null}],\"next_page_url\":null,\"previous_page_url\":null}"); + com.stripe.model.v2.EventDestination.class, + "{\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"events_from\":null,\"id\":\"obj_123\",\"metadata\":null,\"name\":\"name\",\"object\":\"v2.core.event_destination\",\"snapshot_api_version\":null,\"status\":\"disabled\",\"status_details\":null,\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\",\"livemode\":true,\"amazon_eventbridge\":null,\"webhook_endpoint\":null}"); StripeClient client = new StripeClient(networkSpy); - com.stripe.param.v2.core.EventDestinationListParams params = - com.stripe.param.v2.core.EventDestinationListParams.builder().build(); + com.stripe.param.v2.core.EventDestinationUpdateParams params = + com.stripe.param.v2.core.EventDestinationUpdateParams.builder().build(); - com.stripe.model.v2.StripeCollection stripeCollection = - client.v2().core().eventDestinations().list(params); - assertNotNull(stripeCollection); + com.stripe.model.v2.EventDestination eventDestination = + client.v2().core().eventDestinations().update("id_123", params); + assertNotNull(eventDestination); verifyRequest( BaseAddress.API, - ApiResource.RequestMethod.GET, - "/v2/core/event_destinations", + ApiResource.RequestMethod.POST, + "/v2/core/event_destinations/id_123", params.toMap(), null); } @Test - public void testV2CoreEventDestinationPost4Services() throws StripeException { + public void testV2CoreEventDestinationPost3Services() throws StripeException { stubRequest( BaseAddress.API, ApiResource.RequestMethod.POST, - "/v2/core/event_destinations/id_123/ping", + "/v2/core/event_destinations/id_123/disable", null, null, - com.stripe.model.v2.Event.class, - "{\"context\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.core.event\",\"reason\":null,\"type\":\"type\",\"livemode\":true}"); + com.stripe.model.v2.EventDestination.class, + "{\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"events_from\":null,\"id\":\"obj_123\",\"metadata\":null,\"name\":\"name\",\"object\":\"v2.core.event_destination\",\"snapshot_api_version\":null,\"status\":\"disabled\",\"status_details\":null,\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\",\"livemode\":true,\"amazon_eventbridge\":null,\"webhook_endpoint\":null}"); StripeClient client = new StripeClient(networkSpy); - com.stripe.model.v2.Event event = client.v2().core().eventDestinations().ping("id_123"); - assertNotNull(event); + com.stripe.model.v2.EventDestination eventDestination = + client.v2().core().eventDestinations().disable("id_123"); + assertNotNull(eventDestination); verifyRequest( BaseAddress.API, ApiResource.RequestMethod.POST, - "/v2/core/event_destinations/id_123/ping", + "/v2/core/event_destinations/id_123/disable", null, null); } @Test - public void testV2CoreEventDestinationGet2Services() throws StripeException { + public void testV2CoreEventDestinationPost4Services() throws StripeException { stubRequest( BaseAddress.API, - ApiResource.RequestMethod.GET, - "/v2/core/event_destinations/id_123", + ApiResource.RequestMethod.POST, + "/v2/core/event_destinations/id_123/enable", null, null, com.stripe.model.v2.EventDestination.class, "{\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"events_from\":null,\"id\":\"obj_123\",\"metadata\":null,\"name\":\"name\",\"object\":\"v2.core.event_destination\",\"snapshot_api_version\":null,\"status\":\"disabled\",\"status_details\":null,\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\",\"livemode\":true,\"amazon_eventbridge\":null,\"webhook_endpoint\":null}"); StripeClient client = new StripeClient(networkSpy); - com.stripe.param.v2.core.EventDestinationRetrieveParams params = - com.stripe.param.v2.core.EventDestinationRetrieveParams.builder().build(); - com.stripe.model.v2.EventDestination eventDestination = - client.v2().core().eventDestinations().retrieve("id_123", params); + client.v2().core().eventDestinations().enable("id_123"); assertNotNull(eventDestination); verifyRequest( BaseAddress.API, - ApiResource.RequestMethod.GET, - "/v2/core/event_destinations/id_123", - params.toMap(), + ApiResource.RequestMethod.POST, + "/v2/core/event_destinations/id_123/enable", + null, null); } @@ -16115,24 +16236,20 @@ public void testV2CoreEventDestinationPost5Services() throws StripeException { stubRequest( BaseAddress.API, ApiResource.RequestMethod.POST, - "/v2/core/event_destinations/id_123", + "/v2/core/event_destinations/id_123/ping", null, null, - com.stripe.model.v2.EventDestination.class, - "{\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"events_from\":null,\"id\":\"obj_123\",\"metadata\":null,\"name\":\"name\",\"object\":\"v2.core.event_destination\",\"snapshot_api_version\":null,\"status\":\"disabled\",\"status_details\":null,\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\",\"livemode\":true,\"amazon_eventbridge\":null,\"webhook_endpoint\":null}"); + com.stripe.model.v2.Event.class, + "{\"context\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.core.event\",\"reason\":null,\"type\":\"type\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); - com.stripe.param.v2.core.EventDestinationUpdateParams params = - com.stripe.param.v2.core.EventDestinationUpdateParams.builder().build(); - - com.stripe.model.v2.EventDestination eventDestination = - client.v2().core().eventDestinations().update("id_123", params); - assertNotNull(eventDestination); + com.stripe.model.v2.Event event = client.v2().core().eventDestinations().ping("id_123"); + assertNotNull(event); verifyRequest( BaseAddress.API, ApiResource.RequestMethod.POST, - "/v2/core/event_destinations/id_123", - params.toMap(), + "/v2/core/event_destinations/id_123/ping", + null, null); } @@ -16182,30 +16299,36 @@ public void testV2CoreVaultGbBankAccountPostServices() throws StripeException { stubRequest( BaseAddress.API, ApiResource.RequestMethod.POST, - "/v2/core/vault/gb_bank_accounts/id_123/acknowledge_confirmation_of_payee", + "/v2/core/vault/gb_bank_accounts", null, null, com.stripe.model.v2.core.vault.GbBankAccount.class, "{\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"confirmation_of_payee\":{\"result\":{\"created\":\"1970-01-12T21:42:34.472Z\",\"match_result\":\"unavailable\",\"matched\":{\"business_type\":null,\"name\":null},\"message\":\"message\",\"provided\":{\"business_type\":\"personal\",\"name\":\"name\"}},\"status\":\"awaiting_acknowledgement\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"object\":\"v2.core.vault.gb_bank_account\",\"sort_code\":\"sort_code\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); + com.stripe.param.v2.core.vault.GbBankAccountCreateParams params = + com.stripe.param.v2.core.vault.GbBankAccountCreateParams.builder() + .setAccountNumber("account_number") + .setSortCode("sort_code") + .build(); + com.stripe.model.v2.core.vault.GbBankAccount gbBankAccount = - client.v2().core().vault().gbBankAccounts().acknowledgeConfirmationOfPayee("id_123"); + client.v2().core().vault().gbBankAccounts().create(params); assertNotNull(gbBankAccount); verifyRequest( BaseAddress.API, ApiResource.RequestMethod.POST, - "/v2/core/vault/gb_bank_accounts/id_123/acknowledge_confirmation_of_payee", - null, + "/v2/core/vault/gb_bank_accounts", + params.toMap(), null); } @Test - public void testV2CoreVaultGbBankAccountPost2Services() throws StripeException { + public void testV2CoreVaultGbBankAccountGetServices() throws StripeException { stubRequest( BaseAddress.API, - ApiResource.RequestMethod.POST, - "/v2/core/vault/gb_bank_accounts/id_123/archive", + ApiResource.RequestMethod.GET, + "/v2/core/vault/gb_bank_accounts/id_123", null, null, com.stripe.model.v2.core.vault.GbBankAccount.class, @@ -16213,120 +16336,91 @@ public void testV2CoreVaultGbBankAccountPost2Services() throws StripeException { StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.core.vault.GbBankAccount gbBankAccount = - client.v2().core().vault().gbBankAccounts().archive("id_123"); + client.v2().core().vault().gbBankAccounts().retrieve("id_123"); assertNotNull(gbBankAccount); verifyRequest( BaseAddress.API, - ApiResource.RequestMethod.POST, - "/v2/core/vault/gb_bank_accounts/id_123/archive", + ApiResource.RequestMethod.GET, + "/v2/core/vault/gb_bank_accounts/id_123", null, null); } @Test - public void testV2CoreVaultGbBankAccountPost3Services() throws StripeException { + public void testV2CoreVaultGbBankAccountPost2Services() throws StripeException { stubRequest( BaseAddress.API, ApiResource.RequestMethod.POST, - "/v2/core/vault/gb_bank_accounts", + "/v2/core/vault/gb_bank_accounts/id_123/acknowledge_confirmation_of_payee", null, null, com.stripe.model.v2.core.vault.GbBankAccount.class, "{\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"confirmation_of_payee\":{\"result\":{\"created\":\"1970-01-12T21:42:34.472Z\",\"match_result\":\"unavailable\",\"matched\":{\"business_type\":null,\"name\":null},\"message\":\"message\",\"provided\":{\"business_type\":\"personal\",\"name\":\"name\"}},\"status\":\"awaiting_acknowledgement\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"object\":\"v2.core.vault.gb_bank_account\",\"sort_code\":\"sort_code\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); - com.stripe.param.v2.core.vault.GbBankAccountCreateParams params = - com.stripe.param.v2.core.vault.GbBankAccountCreateParams.builder() - .setAccountNumber("account_number") - .setSortCode("sort_code") - .build(); - com.stripe.model.v2.core.vault.GbBankAccount gbBankAccount = - client.v2().core().vault().gbBankAccounts().create(params); + client.v2().core().vault().gbBankAccounts().acknowledgeConfirmationOfPayee("id_123"); assertNotNull(gbBankAccount); verifyRequest( BaseAddress.API, ApiResource.RequestMethod.POST, - "/v2/core/vault/gb_bank_accounts", - params.toMap(), + "/v2/core/vault/gb_bank_accounts/id_123/acknowledge_confirmation_of_payee", + null, null); } @Test - public void testV2CoreVaultGbBankAccountPost4Services() throws StripeException { + public void testV2CoreVaultGbBankAccountPost3Services() throws StripeException { stubRequest( BaseAddress.API, ApiResource.RequestMethod.POST, - "/v2/core/vault/gb_bank_accounts/id_123/initiate_confirmation_of_payee", + "/v2/core/vault/gb_bank_accounts/id_123/archive", null, null, com.stripe.model.v2.core.vault.GbBankAccount.class, "{\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"confirmation_of_payee\":{\"result\":{\"created\":\"1970-01-12T21:42:34.472Z\",\"match_result\":\"unavailable\",\"matched\":{\"business_type\":null,\"name\":null},\"message\":\"message\",\"provided\":{\"business_type\":\"personal\",\"name\":\"name\"}},\"status\":\"awaiting_acknowledgement\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"object\":\"v2.core.vault.gb_bank_account\",\"sort_code\":\"sort_code\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); - com.stripe.param.v2.core.vault.GbBankAccountInitiateConfirmationOfPayeeParams params = - com.stripe.param.v2.core.vault.GbBankAccountInitiateConfirmationOfPayeeParams.builder() - .build(); - com.stripe.model.v2.core.vault.GbBankAccount gbBankAccount = - client.v2().core().vault().gbBankAccounts().initiateConfirmationOfPayee("id_123", params); + client.v2().core().vault().gbBankAccounts().archive("id_123"); assertNotNull(gbBankAccount); verifyRequest( BaseAddress.API, ApiResource.RequestMethod.POST, - "/v2/core/vault/gb_bank_accounts/id_123/initiate_confirmation_of_payee", - params.toMap(), + "/v2/core/vault/gb_bank_accounts/id_123/archive", + null, null); } @Test - public void testV2CoreVaultGbBankAccountGetServices() throws StripeException { + public void testV2CoreVaultGbBankAccountPost4Services() throws StripeException { stubRequest( BaseAddress.API, - ApiResource.RequestMethod.GET, - "/v2/core/vault/gb_bank_accounts/id_123", + ApiResource.RequestMethod.POST, + "/v2/core/vault/gb_bank_accounts/id_123/initiate_confirmation_of_payee", null, null, com.stripe.model.v2.core.vault.GbBankAccount.class, "{\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"confirmation_of_payee\":{\"result\":{\"created\":\"1970-01-12T21:42:34.472Z\",\"match_result\":\"unavailable\",\"matched\":{\"business_type\":null,\"name\":null},\"message\":\"message\",\"provided\":{\"business_type\":\"personal\",\"name\":\"name\"}},\"status\":\"awaiting_acknowledgement\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"object\":\"v2.core.vault.gb_bank_account\",\"sort_code\":\"sort_code\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); + com.stripe.param.v2.core.vault.GbBankAccountInitiateConfirmationOfPayeeParams params = + com.stripe.param.v2.core.vault.GbBankAccountInitiateConfirmationOfPayeeParams.builder() + .build(); + com.stripe.model.v2.core.vault.GbBankAccount gbBankAccount = - client.v2().core().vault().gbBankAccounts().retrieve("id_123"); + client.v2().core().vault().gbBankAccounts().initiateConfirmationOfPayee("id_123", params); assertNotNull(gbBankAccount); - verifyRequest( - BaseAddress.API, - ApiResource.RequestMethod.GET, - "/v2/core/vault/gb_bank_accounts/id_123", - null, - null); - } - - @Test - public void testV2CoreVaultUsBankAccountPostServices() throws StripeException { - stubRequest( - BaseAddress.API, - ApiResource.RequestMethod.POST, - "/v2/core/vault/us_bank_accounts/id_123/archive", - null, - null, - com.stripe.model.v2.core.vault.UsBankAccount.class, - "{\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"created\":\"1970-01-12T21:42:34.472Z\",\"fedwire_routing_number\":null,\"id\":\"obj_123\",\"last4\":\"last4\",\"object\":\"v2.core.vault.us_bank_account\",\"routing_number\":null,\"livemode\":true}"); - StripeClient client = new StripeClient(networkSpy); - - com.stripe.model.v2.core.vault.UsBankAccount usBankAccount = - client.v2().core().vault().usBankAccounts().archive("id_123"); - assertNotNull(usBankAccount); verifyRequest( BaseAddress.API, ApiResource.RequestMethod.POST, - "/v2/core/vault/us_bank_accounts/id_123/archive", - null, + "/v2/core/vault/gb_bank_accounts/id_123/initiate_confirmation_of_payee", + params.toMap(), null); } @Test - public void testV2CoreVaultUsBankAccountPost2Services() throws StripeException { + public void testV2CoreVaultUsBankAccountPostServices() throws StripeException { stubRequest( BaseAddress.API, ApiResource.RequestMethod.POST, @@ -16377,7 +16471,7 @@ public void testV2CoreVaultUsBankAccountGetServices() throws StripeException { } @Test - public void testV2CoreVaultUsBankAccountPost3Services() throws StripeException { + public void testV2CoreVaultUsBankAccountPost2Services() throws StripeException { stubRequest( BaseAddress.API, ApiResource.RequestMethod.POST, @@ -16402,6 +16496,29 @@ public void testV2CoreVaultUsBankAccountPost3Services() throws StripeException { null); } + @Test + public void testV2CoreVaultUsBankAccountPost3Services() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/core/vault/us_bank_accounts/id_123/archive", + null, + null, + com.stripe.model.v2.core.vault.UsBankAccount.class, + "{\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"created\":\"1970-01-12T21:42:34.472Z\",\"fedwire_routing_number\":null,\"id\":\"obj_123\",\"last4\":\"last4\",\"object\":\"v2.core.vault.us_bank_account\",\"routing_number\":null,\"livemode\":true}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.model.v2.core.vault.UsBankAccount usBankAccount = + client.v2().core().vault().usBankAccounts().archive("id_123"); + assertNotNull(usBankAccount); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/core/vault/us_bank_accounts/id_123/archive", + null, + null); + } + @Test public void testV2MoneyManagementAdjustmentGetServices() throws StripeException { stubRequest( @@ -16464,7 +16581,7 @@ public void testV2MoneyManagementFinancialAccountGetServices() throws StripeExce new TypeToken< com.stripe.model.v2.StripeCollection< com.stripe.model.v2.moneymanagement.FinancialAccount>>() {}.getType(), - "{\"data\":[{\"balance\":{\"available\":{\"undefined\":{\"currency\":\"USD\",\"value\":35}},\"inbound_pending\":{\"undefined\":{\"currency\":\"USD\",\"value\":11}},\"outbound_pending\":{\"undefined\":{\"currency\":\"USD\",\"value\":60}}},\"country\":\"ec\",\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":null,\"id\":\"obj_123\",\"object\":\"v2.money_management.financial_account\",\"other\":null,\"status\":\"closed\",\"storage\":null,\"type\":\"other\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"balance\":{\"available\":{\"undefined\":{\"currency\":\"USD\",\"value\":35}},\"inbound_pending\":{\"undefined\":{\"currency\":\"USD\",\"value\":11}},\"outbound_pending\":{\"undefined\":{\"currency\":\"USD\",\"value\":60}}},\"country\":\"af\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"metadata\":null,\"object\":\"v2.money_management.financial_account\",\"other\":null,\"status\":\"closed\",\"storage\":null,\"type\":\"other\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.moneymanagement.FinancialAccountListParams params = @@ -16490,7 +16607,7 @@ public void testV2MoneyManagementFinancialAccountGet2Services() throws StripeExc null, null, com.stripe.model.v2.moneymanagement.FinancialAccount.class, - "{\"balance\":{\"available\":{\"undefined\":{\"currency\":\"USD\",\"value\":35}},\"inbound_pending\":{\"undefined\":{\"currency\":\"USD\",\"value\":11}},\"outbound_pending\":{\"undefined\":{\"currency\":\"USD\",\"value\":60}}},\"country\":\"ec\",\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":null,\"id\":\"obj_123\",\"object\":\"v2.money_management.financial_account\",\"other\":null,\"status\":\"closed\",\"storage\":null,\"type\":\"other\",\"livemode\":true}"); + "{\"balance\":{\"available\":{\"undefined\":{\"currency\":\"USD\",\"value\":35}},\"inbound_pending\":{\"undefined\":{\"currency\":\"USD\",\"value\":11}},\"outbound_pending\":{\"undefined\":{\"currency\":\"USD\",\"value\":60}}},\"country\":\"af\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"metadata\":null,\"object\":\"v2.money_management.financial_account\",\"other\":null,\"status\":\"closed\",\"storage\":null,\"type\":\"other\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.moneymanagement.FinancialAccount financialAccount = @@ -16504,6 +16621,34 @@ public void testV2MoneyManagementFinancialAccountGet2Services() throws StripeExc null); } + @Test + public void testV2MoneyManagementFinancialAddressGetServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/money_management/financial_addresses", + null, + null, + new TypeToken< + com.stripe.model.v2.StripeCollection< + com.stripe.model.v2.moneymanagement.FinancialAddress>>() {}.getType(), + "{\"data\":[{\"created\":\"1970-01-12T21:42:34.472Z\",\"credentials\":null,\"currency\":\"stn\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"object\":\"v2.money_management.financial_address\",\"status\":\"failed\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.moneymanagement.FinancialAddressListParams params = + com.stripe.param.v2.moneymanagement.FinancialAddressListParams.builder().build(); + + com.stripe.model.v2.StripeCollection + stripeCollection = client.v2().moneyManagement().financialAddresses().list(params); + assertNotNull(stripeCollection); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/money_management/financial_addresses", + params.toMap(), + null); + } + @Test public void testV2MoneyManagementFinancialAddressPostServices() throws StripeException { stubRequest( @@ -16535,55 +16680,55 @@ public void testV2MoneyManagementFinancialAddressPostServices() throws StripeExc } @Test - public void testV2MoneyManagementFinancialAddressGetServices() throws StripeException { + public void testV2MoneyManagementFinancialAddressGet2Services() throws StripeException { stubRequest( BaseAddress.API, ApiResource.RequestMethod.GET, - "/v2/money_management/financial_addresses", + "/v2/money_management/financial_addresses/id_123", null, null, - new TypeToken< - com.stripe.model.v2.StripeCollection< - com.stripe.model.v2.moneymanagement.FinancialAddress>>() {}.getType(), - "{\"data\":[{\"created\":\"1970-01-12T21:42:34.472Z\",\"credentials\":null,\"currency\":\"stn\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"object\":\"v2.money_management.financial_address\",\"status\":\"failed\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + com.stripe.model.v2.moneymanagement.FinancialAddress.class, + "{\"created\":\"1970-01-12T21:42:34.472Z\",\"credentials\":null,\"currency\":\"stn\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"object\":\"v2.money_management.financial_address\",\"status\":\"failed\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); - com.stripe.param.v2.moneymanagement.FinancialAddressListParams params = - com.stripe.param.v2.moneymanagement.FinancialAddressListParams.builder().build(); + com.stripe.param.v2.moneymanagement.FinancialAddressRetrieveParams params = + com.stripe.param.v2.moneymanagement.FinancialAddressRetrieveParams.builder().build(); - com.stripe.model.v2.StripeCollection - stripeCollection = client.v2().moneyManagement().financialAddresses().list(params); - assertNotNull(stripeCollection); + com.stripe.model.v2.moneymanagement.FinancialAddress financialAddress = + client.v2().moneyManagement().financialAddresses().retrieve("id_123", params); + assertNotNull(financialAddress); verifyRequest( BaseAddress.API, ApiResource.RequestMethod.GET, - "/v2/money_management/financial_addresses", + "/v2/money_management/financial_addresses/id_123", params.toMap(), null); } @Test - public void testV2MoneyManagementFinancialAddressGet2Services() throws StripeException { + public void testV2MoneyManagementInboundTransferGetServices() throws StripeException { stubRequest( BaseAddress.API, ApiResource.RequestMethod.GET, - "/v2/money_management/financial_addresses/id_123", + "/v2/money_management/inbound_transfers", null, null, - com.stripe.model.v2.moneymanagement.FinancialAddress.class, - "{\"created\":\"1970-01-12T21:42:34.472Z\",\"credentials\":null,\"currency\":\"stn\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"object\":\"v2.money_management.financial_address\",\"status\":\"failed\",\"livemode\":true}"); + new TypeToken< + com.stripe.model.v2.StripeCollection< + com.stripe.model.v2.moneymanagement.InboundTransfer>>() {}.getType(), + "{\"data\":[{\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"payment_method\":{\"type\":\"type\",\"us_bank_account\":null}},\"id\":\"obj_123\",\"object\":\"v2.money_management.inbound_transfer\",\"receipt_url\":null,\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"financial_account\":\"financial_account\"},\"transfer_history\":[{\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"level\":\"canonical\",\"type\":\"bank_debit_failed\",\"bank_debit_failed\":null,\"bank_debit_processing\":null,\"bank_debit_queued\":null,\"bank_debit_returned\":null,\"bank_debit_succeeded\":null}],\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); StripeClient client = new StripeClient(networkSpy); - com.stripe.param.v2.moneymanagement.FinancialAddressRetrieveParams params = - com.stripe.param.v2.moneymanagement.FinancialAddressRetrieveParams.builder().build(); - - com.stripe.model.v2.moneymanagement.FinancialAddress financialAddress = - client.v2().moneyManagement().financialAddresses().retrieve("id_123", params); - assertNotNull(financialAddress); + com.stripe.param.v2.moneymanagement.InboundTransferListParams params = + com.stripe.param.v2.moneymanagement.InboundTransferListParams.builder().build(); + + com.stripe.model.v2.StripeCollection + stripeCollection = client.v2().moneyManagement().inboundTransfers().list(params); + assertNotNull(stripeCollection); verifyRequest( BaseAddress.API, ApiResource.RequestMethod.GET, - "/v2/money_management/financial_addresses/id_123", + "/v2/money_management/inbound_transfers", params.toMap(), null); } @@ -16626,34 +16771,6 @@ public void testV2MoneyManagementInboundTransferPostServices() throws StripeExce null); } - @Test - public void testV2MoneyManagementInboundTransferGetServices() throws StripeException { - stubRequest( - BaseAddress.API, - ApiResource.RequestMethod.GET, - "/v2/money_management/inbound_transfers", - null, - null, - new TypeToken< - com.stripe.model.v2.StripeCollection< - com.stripe.model.v2.moneymanagement.InboundTransfer>>() {}.getType(), - "{\"data\":[{\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"payment_method\":{\"type\":\"type\",\"us_bank_account\":null}},\"id\":\"obj_123\",\"object\":\"v2.money_management.inbound_transfer\",\"receipt_url\":null,\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"financial_account\":\"financial_account\"},\"transfer_history\":[{\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"level\":\"canonical\",\"type\":\"bank_debit_failed\",\"bank_debit_failed\":null,\"bank_debit_processing\":null,\"bank_debit_queued\":null,\"bank_debit_returned\":null,\"bank_debit_succeeded\":null}],\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); - StripeClient client = new StripeClient(networkSpy); - - com.stripe.param.v2.moneymanagement.InboundTransferListParams params = - com.stripe.param.v2.moneymanagement.InboundTransferListParams.builder().build(); - - com.stripe.model.v2.StripeCollection - stripeCollection = client.v2().moneyManagement().inboundTransfers().list(params); - assertNotNull(stripeCollection); - verifyRequest( - BaseAddress.API, - ApiResource.RequestMethod.GET, - "/v2/money_management/inbound_transfers", - params.toMap(), - null); - } - @Test public void testV2MoneyManagementInboundTransferGet2Services() throws StripeException { stubRequest( @@ -16678,67 +16795,67 @@ public void testV2MoneyManagementInboundTransferGet2Services() throws StripeExce } @Test - public void testV2MoneyManagementOutboundPaymentPostServices() throws StripeException { - stubRequest( - BaseAddress.API, - ApiResource.RequestMethod.POST, - "/v2/money_management/outbound_payments/id_123/cancel", - null, - null, - com.stripe.model.v2.moneymanagement.OutboundPayment.class, - "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"delivery_options\":null,\"description\":null,\"expected_arrival_date\":null,\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"metadata\":null,\"object\":\"v2.money_management.outbound_payment\",\"outbound_payment_quote\":null,\"receipt_url\":null,\"recipient_notification\":{\"setting\":\"configured\"},\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"status_details\":null,\"status_transitions\":null,\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"trace_id\":{\"status\":\"pending\",\"value\":null},\"livemode\":true}"); - StripeClient client = new StripeClient(networkSpy); - - com.stripe.model.v2.moneymanagement.OutboundPayment outboundPayment = - client.v2().moneyManagement().outboundPayments().cancel("id_123"); - assertNotNull(outboundPayment); - verifyRequest( - BaseAddress.API, - ApiResource.RequestMethod.POST, - "/v2/money_management/outbound_payments/id_123/cancel", - null, - null); - } - - @Test - public void testV2MoneyManagementOutboundPaymentPost2Services() throws StripeException { + public void testV2MoneyManagementOutboundPaymentQuotePostServices() throws StripeException { stubRequest( BaseAddress.API, ApiResource.RequestMethod.POST, - "/v2/money_management/outbound_payments", + "/v2/money_management/outbound_payment_quotes", null, null, - com.stripe.model.v2.moneymanagement.OutboundPayment.class, - "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"delivery_options\":null,\"description\":null,\"expected_arrival_date\":null,\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"metadata\":null,\"object\":\"v2.money_management.outbound_payment\",\"outbound_payment_quote\":null,\"receipt_url\":null,\"recipient_notification\":{\"setting\":\"configured\"},\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"status_details\":null,\"status_transitions\":null,\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"trace_id\":{\"status\":\"pending\",\"value\":null},\"livemode\":true}"); + com.stripe.model.v2.moneymanagement.OutboundPaymentQuote.class, + "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"delivery_options\":null,\"estimated_fees\":[{\"amount\":{\"currency\":\"USD\",\"value\":96},\"type\":\"cross_border_payout_fee\"}],\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"fx_quote\":{\"lock_duration\":\"five_minutes\",\"lock_expires_at\":\"1970-01-18T15:15:29.586Z\",\"lock_status\":\"active\",\"rates\":{\"undefined\":{\"exchange_rate\":\"exchange_rate\"}},\"to_currency\":\"to_currency\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_payment_quote\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); - com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams params = - com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams.builder() + com.stripe.param.v2.moneymanagement.OutboundPaymentQuoteCreateParams params = + com.stripe.param.v2.moneymanagement.OutboundPaymentQuoteCreateParams.builder() .setAmount(new com.stripe.v2.Amount(96, "USD")) .setFrom( - com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams.From.builder() + com.stripe.param.v2.moneymanagement.OutboundPaymentQuoteCreateParams.From.builder() .setCurrency("currency") .setFinancialAccount("financial_account") .build()) .setTo( - com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams.To.builder() + com.stripe.param.v2.moneymanagement.OutboundPaymentQuoteCreateParams.To.builder() .setCurrency("currency") .setPayoutMethod("payout_method") .setRecipient("recipient") .build()) .build(); - com.stripe.model.v2.moneymanagement.OutboundPayment outboundPayment = - client.v2().moneyManagement().outboundPayments().create(params); - assertNotNull(outboundPayment); + com.stripe.model.v2.moneymanagement.OutboundPaymentQuote outboundPaymentQuote = + client.v2().moneyManagement().outboundPaymentQuotes().create(params); + assertNotNull(outboundPaymentQuote); verifyRequest( BaseAddress.API, ApiResource.RequestMethod.POST, - "/v2/money_management/outbound_payments", + "/v2/money_management/outbound_payment_quotes", params.toMap(), null); } + @Test + public void testV2MoneyManagementOutboundPaymentQuoteGetServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/money_management/outbound_payment_quotes/id_123", + null, + null, + com.stripe.model.v2.moneymanagement.OutboundPaymentQuote.class, + "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"delivery_options\":null,\"estimated_fees\":[{\"amount\":{\"currency\":\"USD\",\"value\":96},\"type\":\"cross_border_payout_fee\"}],\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"fx_quote\":{\"lock_duration\":\"five_minutes\",\"lock_expires_at\":\"1970-01-18T15:15:29.586Z\",\"lock_status\":\"active\",\"rates\":{\"undefined\":{\"exchange_rate\":\"exchange_rate\"}},\"to_currency\":\"to_currency\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_payment_quote\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"livemode\":true}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.model.v2.moneymanagement.OutboundPaymentQuote outboundPaymentQuote = + client.v2().moneyManagement().outboundPaymentQuotes().retrieve("id_123"); + assertNotNull(outboundPaymentQuote); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/money_management/outbound_payment_quotes/id_123", + null, + null); + } + @Test public void testV2MoneyManagementOutboundPaymentGetServices() throws StripeException { stubRequest( @@ -16768,347 +16885,324 @@ public void testV2MoneyManagementOutboundPaymentGetServices() throws StripeExcep } @Test - public void testV2MoneyManagementOutboundPaymentGet2Services() throws StripeException { + public void testV2MoneyManagementOutboundPaymentPostServices() throws StripeException { stubRequest( BaseAddress.API, - ApiResource.RequestMethod.GET, - "/v2/money_management/outbound_payments/id_123", + ApiResource.RequestMethod.POST, + "/v2/money_management/outbound_payments", null, null, com.stripe.model.v2.moneymanagement.OutboundPayment.class, "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"delivery_options\":null,\"description\":null,\"expected_arrival_date\":null,\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"metadata\":null,\"object\":\"v2.money_management.outbound_payment\",\"outbound_payment_quote\":null,\"receipt_url\":null,\"recipient_notification\":{\"setting\":\"configured\"},\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"status_details\":null,\"status_transitions\":null,\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"trace_id\":{\"status\":\"pending\",\"value\":null},\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); - com.stripe.model.v2.moneymanagement.OutboundPayment outboundPayment = - client.v2().moneyManagement().outboundPayments().retrieve("id_123"); - assertNotNull(outboundPayment); - verifyRequest( - BaseAddress.API, - ApiResource.RequestMethod.GET, - "/v2/money_management/outbound_payments/id_123", - null, - null); - } - - @Test - public void testV2MoneyManagementOutboundPaymentQuotePostServices() throws StripeException { - stubRequest( - BaseAddress.API, - ApiResource.RequestMethod.POST, - "/v2/money_management/outbound_payment_quotes", - null, - null, - com.stripe.model.v2.moneymanagement.OutboundPaymentQuote.class, - "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"delivery_options\":null,\"estimated_fees\":[{\"amount\":{\"currency\":\"USD\",\"value\":96},\"type\":\"cross_border_payout_fee\"}],\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"fx_quote\":{\"lock_duration\":\"five_minutes\",\"lock_expires_at\":\"1970-01-18T15:15:29.586Z\",\"lock_status\":\"active\",\"rates\":{\"undefined\":{\"exchange_rate\":\"exchange_rate\"}},\"to_currency\":\"to_currency\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_payment_quote\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"livemode\":true}"); - StripeClient client = new StripeClient(networkSpy); - - com.stripe.param.v2.moneymanagement.OutboundPaymentQuoteCreateParams params = - com.stripe.param.v2.moneymanagement.OutboundPaymentQuoteCreateParams.builder() + com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams params = + com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams.builder() .setAmount(new com.stripe.v2.Amount(96, "USD")) .setFrom( - com.stripe.param.v2.moneymanagement.OutboundPaymentQuoteCreateParams.From.builder() + com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams.From.builder() .setCurrency("currency") .setFinancialAccount("financial_account") .build()) .setTo( - com.stripe.param.v2.moneymanagement.OutboundPaymentQuoteCreateParams.To.builder() + com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams.To.builder() .setCurrency("currency") .setPayoutMethod("payout_method") .setRecipient("recipient") .build()) .build(); - com.stripe.model.v2.moneymanagement.OutboundPaymentQuote outboundPaymentQuote = - client.v2().moneyManagement().outboundPaymentQuotes().create(params); - assertNotNull(outboundPaymentQuote); + com.stripe.model.v2.moneymanagement.OutboundPayment outboundPayment = + client.v2().moneyManagement().outboundPayments().create(params); + assertNotNull(outboundPayment); verifyRequest( BaseAddress.API, ApiResource.RequestMethod.POST, - "/v2/money_management/outbound_payment_quotes", + "/v2/money_management/outbound_payments", params.toMap(), null); } @Test - public void testV2MoneyManagementOutboundPaymentQuoteGetServices() throws StripeException { + public void testV2MoneyManagementOutboundPaymentGet2Services() throws StripeException { stubRequest( BaseAddress.API, ApiResource.RequestMethod.GET, - "/v2/money_management/outbound_payment_quotes/id_123", + "/v2/money_management/outbound_payments/id_123", null, null, - com.stripe.model.v2.moneymanagement.OutboundPaymentQuote.class, - "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"delivery_options\":null,\"estimated_fees\":[{\"amount\":{\"currency\":\"USD\",\"value\":96},\"type\":\"cross_border_payout_fee\"}],\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"fx_quote\":{\"lock_duration\":\"five_minutes\",\"lock_expires_at\":\"1970-01-18T15:15:29.586Z\",\"lock_status\":\"active\",\"rates\":{\"undefined\":{\"exchange_rate\":\"exchange_rate\"}},\"to_currency\":\"to_currency\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_payment_quote\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"livemode\":true}"); + com.stripe.model.v2.moneymanagement.OutboundPayment.class, + "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"delivery_options\":null,\"description\":null,\"expected_arrival_date\":null,\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"metadata\":null,\"object\":\"v2.money_management.outbound_payment\",\"outbound_payment_quote\":null,\"receipt_url\":null,\"recipient_notification\":{\"setting\":\"configured\"},\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"status_details\":null,\"status_transitions\":null,\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"trace_id\":{\"status\":\"pending\",\"value\":null},\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); - com.stripe.model.v2.moneymanagement.OutboundPaymentQuote outboundPaymentQuote = - client.v2().moneyManagement().outboundPaymentQuotes().retrieve("id_123"); - assertNotNull(outboundPaymentQuote); + com.stripe.model.v2.moneymanagement.OutboundPayment outboundPayment = + client.v2().moneyManagement().outboundPayments().retrieve("id_123"); + assertNotNull(outboundPayment); verifyRequest( BaseAddress.API, ApiResource.RequestMethod.GET, - "/v2/money_management/outbound_payment_quotes/id_123", + "/v2/money_management/outbound_payments/id_123", null, null); } @Test - public void testV2MoneyManagementOutboundTransferPostServices() throws StripeException { + public void testV2MoneyManagementOutboundPaymentPost2Services() throws StripeException { stubRequest( BaseAddress.API, ApiResource.RequestMethod.POST, - "/v2/money_management/outbound_transfers/id_123/cancel", + "/v2/money_management/outbound_payments/id_123/cancel", null, null, - com.stripe.model.v2.moneymanagement.OutboundTransfer.class, - "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"delivery_options\":null,\"description\":null,\"expected_arrival_date\":null,\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"metadata\":null,\"object\":\"v2.money_management.outbound_transfer\",\"receipt_url\":null,\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"status_details\":null,\"status_transitions\":null,\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\"},\"trace_id\":{\"status\":\"pending\",\"value\":null},\"livemode\":true}"); + com.stripe.model.v2.moneymanagement.OutboundPayment.class, + "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"delivery_options\":null,\"description\":null,\"expected_arrival_date\":null,\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"metadata\":null,\"object\":\"v2.money_management.outbound_payment\",\"outbound_payment_quote\":null,\"receipt_url\":null,\"recipient_notification\":{\"setting\":\"configured\"},\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"status_details\":null,\"status_transitions\":null,\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"trace_id\":{\"status\":\"pending\",\"value\":null},\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); - com.stripe.model.v2.moneymanagement.OutboundTransfer outboundTransfer = - client.v2().moneyManagement().outboundTransfers().cancel("id_123"); - assertNotNull(outboundTransfer); + com.stripe.model.v2.moneymanagement.OutboundPayment outboundPayment = + client.v2().moneyManagement().outboundPayments().cancel("id_123"); + assertNotNull(outboundPayment); verifyRequest( BaseAddress.API, ApiResource.RequestMethod.POST, - "/v2/money_management/outbound_transfers/id_123/cancel", + "/v2/money_management/outbound_payments/id_123/cancel", null, null); } @Test - public void testV2MoneyManagementOutboundTransferPost2Services() throws StripeException { + public void testV2MoneyManagementOutboundSetupIntentGetServices() throws StripeException { stubRequest( BaseAddress.API, - ApiResource.RequestMethod.POST, - "/v2/money_management/outbound_transfers", + ApiResource.RequestMethod.GET, + "/v2/money_management/outbound_setup_intents", null, null, - com.stripe.model.v2.moneymanagement.OutboundTransfer.class, - "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"delivery_options\":null,\"description\":null,\"expected_arrival_date\":null,\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"metadata\":null,\"object\":\"v2.money_management.outbound_transfer\",\"receipt_url\":null,\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"status_details\":null,\"status_transitions\":null,\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\"},\"trace_id\":{\"status\":\"pending\",\"value\":null},\"livemode\":true}"); + new TypeToken< + com.stripe.model.v2.StripeCollection< + com.stripe.model.v2.moneymanagement.OutboundSetupIntent>>() {}.getType(), + "{\"data\":[{\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"next_action\":null,\"object\":\"v2.money_management.outbound_setup_intent\",\"payout_method\":{\"available_payout_speeds\":[\"standard\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"latest_outbound_setup_intent\":null,\"object\":\"v2.money_management.payout_method\",\"type\":\"bank_account\",\"usage_status\":{\"payments\":\"requires_action\",\"transfers\":\"invalid\"},\"livemode\":true,\"bank_account\":null,\"card\":null},\"status\":\"requires_payout_method\",\"usage_intent\":\"payment\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); StripeClient client = new StripeClient(networkSpy); - com.stripe.param.v2.moneymanagement.OutboundTransferCreateParams params = - com.stripe.param.v2.moneymanagement.OutboundTransferCreateParams.builder() - .setAmount(new com.stripe.v2.Amount(96, "USD")) - .setFrom( - com.stripe.param.v2.moneymanagement.OutboundTransferCreateParams.From.builder() - .setCurrency("currency") - .setFinancialAccount("financial_account") - .build()) - .setTo( - com.stripe.param.v2.moneymanagement.OutboundTransferCreateParams.To.builder() - .setCurrency("currency") - .setPayoutMethod("payout_method") - .build()) - .build(); + com.stripe.param.v2.moneymanagement.OutboundSetupIntentListParams params = + com.stripe.param.v2.moneymanagement.OutboundSetupIntentListParams.builder().build(); - com.stripe.model.v2.moneymanagement.OutboundTransfer outboundTransfer = - client.v2().moneyManagement().outboundTransfers().create(params); - assertNotNull(outboundTransfer); + com.stripe.model.v2.StripeCollection + stripeCollection = client.v2().moneyManagement().outboundSetupIntents().list(params); + assertNotNull(stripeCollection); verifyRequest( BaseAddress.API, - ApiResource.RequestMethod.POST, - "/v2/money_management/outbound_transfers", + ApiResource.RequestMethod.GET, + "/v2/money_management/outbound_setup_intents", params.toMap(), null); } @Test - public void testV2MoneyManagementOutboundTransferGetServices() throws StripeException { + public void testV2MoneyManagementOutboundSetupIntentPostServices() throws StripeException { stubRequest( BaseAddress.API, - ApiResource.RequestMethod.GET, - "/v2/money_management/outbound_transfers", + ApiResource.RequestMethod.POST, + "/v2/money_management/outbound_setup_intents", null, null, - new TypeToken< - com.stripe.model.v2.StripeCollection< - com.stripe.model.v2.moneymanagement.OutboundTransfer>>() {}.getType(), - "{\"data\":[{\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"delivery_options\":null,\"description\":null,\"expected_arrival_date\":null,\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"metadata\":null,\"object\":\"v2.money_management.outbound_transfer\",\"receipt_url\":null,\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"status_details\":null,\"status_transitions\":null,\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\"},\"trace_id\":{\"status\":\"pending\",\"value\":null},\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + com.stripe.model.v2.moneymanagement.OutboundSetupIntent.class, + "{\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"next_action\":null,\"object\":\"v2.money_management.outbound_setup_intent\",\"payout_method\":{\"available_payout_speeds\":[\"standard\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"latest_outbound_setup_intent\":null,\"object\":\"v2.money_management.payout_method\",\"type\":\"bank_account\",\"usage_status\":{\"payments\":\"requires_action\",\"transfers\":\"invalid\"},\"livemode\":true,\"bank_account\":null,\"card\":null},\"status\":\"requires_payout_method\",\"usage_intent\":\"payment\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); - com.stripe.param.v2.moneymanagement.OutboundTransferListParams params = - com.stripe.param.v2.moneymanagement.OutboundTransferListParams.builder().build(); + com.stripe.param.v2.moneymanagement.OutboundSetupIntentCreateParams params = + com.stripe.param.v2.moneymanagement.OutboundSetupIntentCreateParams.builder().build(); - com.stripe.model.v2.StripeCollection - stripeCollection = client.v2().moneyManagement().outboundTransfers().list(params); - assertNotNull(stripeCollection); + com.stripe.model.v2.moneymanagement.OutboundSetupIntent outboundSetupIntent = + client.v2().moneyManagement().outboundSetupIntents().create(params); + assertNotNull(outboundSetupIntent); verifyRequest( BaseAddress.API, - ApiResource.RequestMethod.GET, - "/v2/money_management/outbound_transfers", + ApiResource.RequestMethod.POST, + "/v2/money_management/outbound_setup_intents", params.toMap(), null); } @Test - public void testV2MoneyManagementOutboundTransferGet2Services() throws StripeException { + public void testV2MoneyManagementOutboundSetupIntentGet2Services() throws StripeException { stubRequest( BaseAddress.API, ApiResource.RequestMethod.GET, - "/v2/money_management/outbound_transfers/id_123", + "/v2/money_management/outbound_setup_intents/id_123", null, null, - com.stripe.model.v2.moneymanagement.OutboundTransfer.class, - "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"delivery_options\":null,\"description\":null,\"expected_arrival_date\":null,\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"metadata\":null,\"object\":\"v2.money_management.outbound_transfer\",\"receipt_url\":null,\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"status_details\":null,\"status_transitions\":null,\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\"},\"trace_id\":{\"status\":\"pending\",\"value\":null},\"livemode\":true}"); + com.stripe.model.v2.moneymanagement.OutboundSetupIntent.class, + "{\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"next_action\":null,\"object\":\"v2.money_management.outbound_setup_intent\",\"payout_method\":{\"available_payout_speeds\":[\"standard\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"latest_outbound_setup_intent\":null,\"object\":\"v2.money_management.payout_method\",\"type\":\"bank_account\",\"usage_status\":{\"payments\":\"requires_action\",\"transfers\":\"invalid\"},\"livemode\":true,\"bank_account\":null,\"card\":null},\"status\":\"requires_payout_method\",\"usage_intent\":\"payment\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); - com.stripe.model.v2.moneymanagement.OutboundTransfer outboundTransfer = - client.v2().moneyManagement().outboundTransfers().retrieve("id_123"); - assertNotNull(outboundTransfer); + com.stripe.model.v2.moneymanagement.OutboundSetupIntent outboundSetupIntent = + client.v2().moneyManagement().outboundSetupIntents().retrieve("id_123"); + assertNotNull(outboundSetupIntent); verifyRequest( BaseAddress.API, ApiResource.RequestMethod.GET, - "/v2/money_management/outbound_transfers/id_123", + "/v2/money_management/outbound_setup_intents/id_123", null, null); } @Test - public void testV2MoneyManagementOutboundSetupIntentPostServices() throws StripeException { + public void testV2MoneyManagementOutboundSetupIntentPost2Services() throws StripeException { stubRequest( BaseAddress.API, ApiResource.RequestMethod.POST, - "/v2/money_management/outbound_setup_intents/id_123/cancel", + "/v2/money_management/outbound_setup_intents/id_123", null, null, com.stripe.model.v2.moneymanagement.OutboundSetupIntent.class, "{\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"next_action\":null,\"object\":\"v2.money_management.outbound_setup_intent\",\"payout_method\":{\"available_payout_speeds\":[\"standard\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"latest_outbound_setup_intent\":null,\"object\":\"v2.money_management.payout_method\",\"type\":\"bank_account\",\"usage_status\":{\"payments\":\"requires_action\",\"transfers\":\"invalid\"},\"livemode\":true,\"bank_account\":null,\"card\":null},\"status\":\"requires_payout_method\",\"usage_intent\":\"payment\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); + com.stripe.param.v2.moneymanagement.OutboundSetupIntentUpdateParams params = + com.stripe.param.v2.moneymanagement.OutboundSetupIntentUpdateParams.builder().build(); + com.stripe.model.v2.moneymanagement.OutboundSetupIntent outboundSetupIntent = - client.v2().moneyManagement().outboundSetupIntents().cancel("id_123"); + client.v2().moneyManagement().outboundSetupIntents().update("id_123", params); assertNotNull(outboundSetupIntent); verifyRequest( BaseAddress.API, ApiResource.RequestMethod.POST, - "/v2/money_management/outbound_setup_intents/id_123/cancel", - null, + "/v2/money_management/outbound_setup_intents/id_123", + params.toMap(), null); } @Test - public void testV2MoneyManagementOutboundSetupIntentPost2Services() throws StripeException { + public void testV2MoneyManagementOutboundSetupIntentPost3Services() throws StripeException { stubRequest( BaseAddress.API, ApiResource.RequestMethod.POST, - "/v2/money_management/outbound_setup_intents", + "/v2/money_management/outbound_setup_intents/id_123/cancel", null, null, com.stripe.model.v2.moneymanagement.OutboundSetupIntent.class, "{\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"next_action\":null,\"object\":\"v2.money_management.outbound_setup_intent\",\"payout_method\":{\"available_payout_speeds\":[\"standard\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"latest_outbound_setup_intent\":null,\"object\":\"v2.money_management.payout_method\",\"type\":\"bank_account\",\"usage_status\":{\"payments\":\"requires_action\",\"transfers\":\"invalid\"},\"livemode\":true,\"bank_account\":null,\"card\":null},\"status\":\"requires_payout_method\",\"usage_intent\":\"payment\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); - com.stripe.param.v2.moneymanagement.OutboundSetupIntentCreateParams params = - com.stripe.param.v2.moneymanagement.OutboundSetupIntentCreateParams.builder().build(); - com.stripe.model.v2.moneymanagement.OutboundSetupIntent outboundSetupIntent = - client.v2().moneyManagement().outboundSetupIntents().create(params); + client.v2().moneyManagement().outboundSetupIntents().cancel("id_123"); assertNotNull(outboundSetupIntent); verifyRequest( BaseAddress.API, ApiResource.RequestMethod.POST, - "/v2/money_management/outbound_setup_intents", - params.toMap(), + "/v2/money_management/outbound_setup_intents/id_123/cancel", + null, null); } @Test - public void testV2MoneyManagementOutboundSetupIntentGetServices() throws StripeException { + public void testV2MoneyManagementOutboundTransferGetServices() throws StripeException { stubRequest( BaseAddress.API, ApiResource.RequestMethod.GET, - "/v2/money_management/outbound_setup_intents", + "/v2/money_management/outbound_transfers", null, null, new TypeToken< com.stripe.model.v2.StripeCollection< - com.stripe.model.v2.moneymanagement.OutboundSetupIntent>>() {}.getType(), - "{\"data\":[{\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"next_action\":null,\"object\":\"v2.money_management.outbound_setup_intent\",\"payout_method\":{\"available_payout_speeds\":[\"standard\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"latest_outbound_setup_intent\":null,\"object\":\"v2.money_management.payout_method\",\"type\":\"bank_account\",\"usage_status\":{\"payments\":\"requires_action\",\"transfers\":\"invalid\"},\"livemode\":true,\"bank_account\":null,\"card\":null},\"status\":\"requires_payout_method\",\"usage_intent\":\"payment\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + com.stripe.model.v2.moneymanagement.OutboundTransfer>>() {}.getType(), + "{\"data\":[{\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"delivery_options\":null,\"description\":null,\"expected_arrival_date\":null,\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"metadata\":null,\"object\":\"v2.money_management.outbound_transfer\",\"receipt_url\":null,\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"status_details\":null,\"status_transitions\":null,\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\"},\"trace_id\":{\"status\":\"pending\",\"value\":null},\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); StripeClient client = new StripeClient(networkSpy); - com.stripe.param.v2.moneymanagement.OutboundSetupIntentListParams params = - com.stripe.param.v2.moneymanagement.OutboundSetupIntentListParams.builder().build(); + com.stripe.param.v2.moneymanagement.OutboundTransferListParams params = + com.stripe.param.v2.moneymanagement.OutboundTransferListParams.builder().build(); - com.stripe.model.v2.StripeCollection - stripeCollection = client.v2().moneyManagement().outboundSetupIntents().list(params); + com.stripe.model.v2.StripeCollection + stripeCollection = client.v2().moneyManagement().outboundTransfers().list(params); assertNotNull(stripeCollection); verifyRequest( BaseAddress.API, ApiResource.RequestMethod.GET, - "/v2/money_management/outbound_setup_intents", + "/v2/money_management/outbound_transfers", params.toMap(), null); } @Test - public void testV2MoneyManagementOutboundSetupIntentGet2Services() throws StripeException { + public void testV2MoneyManagementOutboundTransferPostServices() throws StripeException { stubRequest( BaseAddress.API, - ApiResource.RequestMethod.GET, - "/v2/money_management/outbound_setup_intents/id_123", + ApiResource.RequestMethod.POST, + "/v2/money_management/outbound_transfers", null, null, - com.stripe.model.v2.moneymanagement.OutboundSetupIntent.class, - "{\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"next_action\":null,\"object\":\"v2.money_management.outbound_setup_intent\",\"payout_method\":{\"available_payout_speeds\":[\"standard\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"latest_outbound_setup_intent\":null,\"object\":\"v2.money_management.payout_method\",\"type\":\"bank_account\",\"usage_status\":{\"payments\":\"requires_action\",\"transfers\":\"invalid\"},\"livemode\":true,\"bank_account\":null,\"card\":null},\"status\":\"requires_payout_method\",\"usage_intent\":\"payment\",\"livemode\":true}"); + com.stripe.model.v2.moneymanagement.OutboundTransfer.class, + "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"delivery_options\":null,\"description\":null,\"expected_arrival_date\":null,\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"metadata\":null,\"object\":\"v2.money_management.outbound_transfer\",\"receipt_url\":null,\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"status_details\":null,\"status_transitions\":null,\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\"},\"trace_id\":{\"status\":\"pending\",\"value\":null},\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); - com.stripe.model.v2.moneymanagement.OutboundSetupIntent outboundSetupIntent = - client.v2().moneyManagement().outboundSetupIntents().retrieve("id_123"); - assertNotNull(outboundSetupIntent); + com.stripe.param.v2.moneymanagement.OutboundTransferCreateParams params = + com.stripe.param.v2.moneymanagement.OutboundTransferCreateParams.builder() + .setAmount(new com.stripe.v2.Amount(96, "USD")) + .setFrom( + com.stripe.param.v2.moneymanagement.OutboundTransferCreateParams.From.builder() + .setCurrency("currency") + .setFinancialAccount("financial_account") + .build()) + .setTo( + com.stripe.param.v2.moneymanagement.OutboundTransferCreateParams.To.builder() + .setCurrency("currency") + .setPayoutMethod("payout_method") + .build()) + .build(); + + com.stripe.model.v2.moneymanagement.OutboundTransfer outboundTransfer = + client.v2().moneyManagement().outboundTransfers().create(params); + assertNotNull(outboundTransfer); verifyRequest( BaseAddress.API, - ApiResource.RequestMethod.GET, - "/v2/money_management/outbound_setup_intents/id_123", - null, + ApiResource.RequestMethod.POST, + "/v2/money_management/outbound_transfers", + params.toMap(), null); } @Test - public void testV2MoneyManagementOutboundSetupIntentPost3Services() throws StripeException { + public void testV2MoneyManagementOutboundTransferGet2Services() throws StripeException { stubRequest( BaseAddress.API, - ApiResource.RequestMethod.POST, - "/v2/money_management/outbound_setup_intents/id_123", + ApiResource.RequestMethod.GET, + "/v2/money_management/outbound_transfers/id_123", null, null, - com.stripe.model.v2.moneymanagement.OutboundSetupIntent.class, - "{\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"next_action\":null,\"object\":\"v2.money_management.outbound_setup_intent\",\"payout_method\":{\"available_payout_speeds\":[\"standard\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"latest_outbound_setup_intent\":null,\"object\":\"v2.money_management.payout_method\",\"type\":\"bank_account\",\"usage_status\":{\"payments\":\"requires_action\",\"transfers\":\"invalid\"},\"livemode\":true,\"bank_account\":null,\"card\":null},\"status\":\"requires_payout_method\",\"usage_intent\":\"payment\",\"livemode\":true}"); + com.stripe.model.v2.moneymanagement.OutboundTransfer.class, + "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"delivery_options\":null,\"description\":null,\"expected_arrival_date\":null,\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"metadata\":null,\"object\":\"v2.money_management.outbound_transfer\",\"receipt_url\":null,\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"status_details\":null,\"status_transitions\":null,\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\"},\"trace_id\":{\"status\":\"pending\",\"value\":null},\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); - com.stripe.param.v2.moneymanagement.OutboundSetupIntentUpdateParams params = - com.stripe.param.v2.moneymanagement.OutboundSetupIntentUpdateParams.builder().build(); - - com.stripe.model.v2.moneymanagement.OutboundSetupIntent outboundSetupIntent = - client.v2().moneyManagement().outboundSetupIntents().update("id_123", params); - assertNotNull(outboundSetupIntent); + com.stripe.model.v2.moneymanagement.OutboundTransfer outboundTransfer = + client.v2().moneyManagement().outboundTransfers().retrieve("id_123"); + assertNotNull(outboundTransfer); verifyRequest( BaseAddress.API, - ApiResource.RequestMethod.POST, - "/v2/money_management/outbound_setup_intents/id_123", - params.toMap(), + ApiResource.RequestMethod.GET, + "/v2/money_management/outbound_transfers/id_123", + null, null); } @Test - public void testV2MoneyManagementPayoutMethodPostServices() throws StripeException { + public void testV2MoneyManagementOutboundTransferPost2Services() throws StripeException { stubRequest( BaseAddress.API, ApiResource.RequestMethod.POST, - "/v2/money_management/payout_methods/id_123/archive", + "/v2/money_management/outbound_transfers/id_123/cancel", null, null, - com.stripe.model.v2.moneymanagement.PayoutMethod.class, - "{\"available_payout_speeds\":[\"standard\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"latest_outbound_setup_intent\":null,\"object\":\"v2.money_management.payout_method\",\"type\":\"bank_account\",\"usage_status\":{\"payments\":\"requires_action\",\"transfers\":\"invalid\"},\"livemode\":true,\"bank_account\":null,\"card\":null}"); + com.stripe.model.v2.moneymanagement.OutboundTransfer.class, + "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"cancelable\":true,\"created\":\"1970-01-12T21:42:34.472Z\",\"delivery_options\":null,\"description\":null,\"expected_arrival_date\":null,\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"id\":\"obj_123\",\"metadata\":null,\"object\":\"v2.money_management.outbound_transfer\",\"receipt_url\":null,\"statement_descriptor\":\"statement_descriptor\",\"status\":\"canceled\",\"status_details\":null,\"status_transitions\":null,\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\"},\"trace_id\":{\"status\":\"pending\",\"value\":null},\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); - com.stripe.model.v2.moneymanagement.PayoutMethod payoutMethod = - client.v2().moneyManagement().payoutMethods().archive("id_123"); - assertNotNull(payoutMethod); + com.stripe.model.v2.moneymanagement.OutboundTransfer outboundTransfer = + client.v2().moneyManagement().outboundTransfers().cancel("id_123"); + assertNotNull(outboundTransfer); verifyRequest( BaseAddress.API, ApiResource.RequestMethod.POST, - "/v2/money_management/payout_methods/id_123/archive", + "/v2/money_management/outbound_transfers/id_123/cancel", null, null); } @@ -17164,6 +17258,29 @@ public void testV2MoneyManagementPayoutMethodGet2Services() throws StripeExcepti null); } + @Test + public void testV2MoneyManagementPayoutMethodPostServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/payout_methods/id_123/archive", + null, + null, + com.stripe.model.v2.moneymanagement.PayoutMethod.class, + "{\"available_payout_speeds\":[\"standard\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"latest_outbound_setup_intent\":null,\"object\":\"v2.money_management.payout_method\",\"type\":\"bank_account\",\"usage_status\":{\"payments\":\"requires_action\",\"transfers\":\"invalid\"},\"livemode\":true,\"bank_account\":null,\"card\":null}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.model.v2.moneymanagement.PayoutMethod payoutMethod = + client.v2().moneyManagement().payoutMethods().archive("id_123"); + assertNotNull(payoutMethod); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/payout_methods/id_123/archive", + null, + null); + } + @Test public void testV2MoneyManagementPayoutMethodPost2Services() throws StripeException { stubRequest( @@ -17317,57 +17434,6 @@ public void testV2MoneyManagementReceivedDebitGet2Services() throws StripeExcept null); } - @Test - public void testV2MoneyManagementTransactionGetServices() throws StripeException { - stubRequest( - BaseAddress.API, - ApiResource.RequestMethod.GET, - "/v2/money_management/transactions", - null, - null, - new TypeToken< - com.stripe.model.v2.StripeCollection< - com.stripe.model.v2.moneymanagement.Transaction>>() {}.getType(), - "{\"data\":[{\"amount\":{\"currency\":\"USD\",\"value\":96},\"balance_impact\":{\"available\":{\"currency\":\"USD\",\"value\":35},\"inbound_pending\":{\"currency\":\"USD\",\"value\":11},\"outbound_pending\":{\"currency\":\"USD\",\"value\":60}},\"category\":\"return\",\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"flow\":{\"type\":\"outbound_payment\",\"adjustment\":null,\"fee_transaction\":null,\"inbound_transfer\":null,\"outbound_payment\":null,\"outbound_transfer\":null,\"received_credit\":null,\"received_debit\":null},\"id\":\"obj_123\",\"object\":\"v2.money_management.transaction\",\"status\":\"pending\",\"status_transitions\":{\"posted_at\":null,\"void_at\":null},\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); - StripeClient client = new StripeClient(networkSpy); - - com.stripe.param.v2.moneymanagement.TransactionListParams params = - com.stripe.param.v2.moneymanagement.TransactionListParams.builder().build(); - - com.stripe.model.v2.StripeCollection - stripeCollection = client.v2().moneyManagement().transactions().list(params); - assertNotNull(stripeCollection); - verifyRequest( - BaseAddress.API, - ApiResource.RequestMethod.GET, - "/v2/money_management/transactions", - params.toMap(), - null); - } - - @Test - public void testV2MoneyManagementTransactionGet2Services() throws StripeException { - stubRequest( - BaseAddress.API, - ApiResource.RequestMethod.GET, - "/v2/money_management/transactions/id_123", - null, - null, - com.stripe.model.v2.moneymanagement.Transaction.class, - "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"balance_impact\":{\"available\":{\"currency\":\"USD\",\"value\":35},\"inbound_pending\":{\"currency\":\"USD\",\"value\":11},\"outbound_pending\":{\"currency\":\"USD\",\"value\":60}},\"category\":\"return\",\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"flow\":{\"type\":\"outbound_payment\",\"adjustment\":null,\"fee_transaction\":null,\"inbound_transfer\":null,\"outbound_payment\":null,\"outbound_transfer\":null,\"received_credit\":null,\"received_debit\":null},\"id\":\"obj_123\",\"object\":\"v2.money_management.transaction\",\"status\":\"pending\",\"status_transitions\":{\"posted_at\":null,\"void_at\":null},\"livemode\":true}"); - StripeClient client = new StripeClient(networkSpy); - - com.stripe.model.v2.moneymanagement.Transaction transaction = - client.v2().moneyManagement().transactions().retrieve("id_123"); - assertNotNull(transaction); - verifyRequest( - BaseAddress.API, - ApiResource.RequestMethod.GET, - "/v2/money_management/transactions/id_123", - null, - null); - } - @Test public void testV2MoneyManagementTransactionEntryGetServices() throws StripeException { stubRequest( @@ -17420,177 +17486,142 @@ public void testV2MoneyManagementTransactionEntryGet2Services() throws StripeExc } @Test - public void testV2BillingMeterEventSessionPostServices() throws StripeException { - stubRequest( - BaseAddress.API, - ApiResource.RequestMethod.POST, - "/v2/billing/meter_event_session", - null, - null, - com.stripe.model.v2.billing.MeterEventSession.class, - "{\"authentication_token\":\"authentication_token\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"object\":\"v2.billing.meter_event_session\",\"livemode\":true}"); - StripeClient client = new StripeClient(networkSpy); - - com.stripe.model.v2.billing.MeterEventSession meterEventSession = - client.v2().billing().meterEventSession().create(); - assertNotNull(meterEventSession); - verifyRequest( - BaseAddress.API, - ApiResource.RequestMethod.POST, - "/v2/billing/meter_event_session", - null, - null); - } - - @Test - public void testV2BillingMeterEventAdjustmentPostServices() throws StripeException { + public void testV2MoneyManagementTransactionGetServices() throws StripeException { stubRequest( BaseAddress.API, - ApiResource.RequestMethod.POST, - "/v2/billing/meter_event_adjustments", + ApiResource.RequestMethod.GET, + "/v2/money_management/transactions", null, null, - com.stripe.model.v2.billing.MeterEventAdjustment.class, - "{\"cancel\":{\"identifier\":\"identifier\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"event_name\":\"event_name\",\"id\":\"obj_123\",\"object\":\"v2.billing.meter_event_adjustment\",\"status\":\"complete\",\"type\":\"cancel\",\"livemode\":true}"); + new TypeToken< + com.stripe.model.v2.StripeCollection< + com.stripe.model.v2.moneymanagement.Transaction>>() {}.getType(), + "{\"data\":[{\"amount\":{\"currency\":\"USD\",\"value\":96},\"balance_impact\":{\"available\":{\"currency\":\"USD\",\"value\":35},\"inbound_pending\":{\"currency\":\"USD\",\"value\":11},\"outbound_pending\":{\"currency\":\"USD\",\"value\":60}},\"category\":\"return\",\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"flow\":{\"type\":\"outbound_payment\",\"adjustment\":null,\"fee_transaction\":null,\"inbound_transfer\":null,\"outbound_payment\":null,\"outbound_transfer\":null,\"received_credit\":null,\"received_debit\":null},\"id\":\"obj_123\",\"object\":\"v2.money_management.transaction\",\"status\":\"pending\",\"status_transitions\":{\"posted_at\":null,\"void_at\":null},\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); StripeClient client = new StripeClient(networkSpy); - com.stripe.param.v2.billing.MeterEventAdjustmentCreateParams params = - com.stripe.param.v2.billing.MeterEventAdjustmentCreateParams.builder() - .setCancel( - com.stripe.param.v2.billing.MeterEventAdjustmentCreateParams.Cancel.builder() - .setIdentifier("identifier") - .build()) - .setEventName("event_name") - .setType(com.stripe.param.v2.billing.MeterEventAdjustmentCreateParams.Type.CANCEL) - .build(); + com.stripe.param.v2.moneymanagement.TransactionListParams params = + com.stripe.param.v2.moneymanagement.TransactionListParams.builder().build(); - com.stripe.model.v2.billing.MeterEventAdjustment meterEventAdjustment = - client.v2().billing().meterEventAdjustments().create(params); - assertNotNull(meterEventAdjustment); + com.stripe.model.v2.StripeCollection + stripeCollection = client.v2().moneyManagement().transactions().list(params); + assertNotNull(stripeCollection); verifyRequest( - BaseAddress.API, - ApiResource.RequestMethod.POST, - "/v2/billing/meter_event_adjustments", + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/money_management/transactions", params.toMap(), null); } @Test - public void testV2BillingMeterEventStreamPostServices() throws StripeException { + public void testV2MoneyManagementTransactionGet2Services() throws StripeException { stubRequest( - BaseAddress.METER_EVENTS, - ApiResource.RequestMethod.POST, - "/v2/billing/meter_event_stream", + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/money_management/transactions/id_123", null, null, - com.stripe.v2.EmptyStripeObject.class, - "{}"); + com.stripe.model.v2.moneymanagement.Transaction.class, + "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"balance_impact\":{\"available\":{\"currency\":\"USD\",\"value\":35},\"inbound_pending\":{\"currency\":\"USD\",\"value\":11},\"outbound_pending\":{\"currency\":\"USD\",\"value\":60}},\"category\":\"return\",\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"flow\":{\"type\":\"outbound_payment\",\"adjustment\":null,\"fee_transaction\":null,\"inbound_transfer\":null,\"outbound_payment\":null,\"outbound_transfer\":null,\"received_credit\":null,\"received_debit\":null},\"id\":\"obj_123\",\"object\":\"v2.money_management.transaction\",\"status\":\"pending\",\"status_transitions\":{\"posted_at\":null,\"void_at\":null},\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); - com.stripe.param.v2.billing.MeterEventStreamCreateParams params = - com.stripe.param.v2.billing.MeterEventStreamCreateParams.builder() - .addEvent( - com.stripe.param.v2.billing.MeterEventStreamCreateParams.Event.builder() - .setEventName("event_name") - .setIdentifier("identifier") - .putPayload("undefined", "payload") - .setTimestamp(Instant.parse("1970-01-01T15:18:46.294Z")) - .build()) - .build(); - - client.v2().billing().meterEventStream().create(params); + com.stripe.model.v2.moneymanagement.Transaction transaction = + client.v2().moneyManagement().transactions().retrieve("id_123"); + assertNotNull(transaction); verifyRequest( - BaseAddress.METER_EVENTS, - ApiResource.RequestMethod.POST, - "/v2/billing/meter_event_stream", - params.toMap(), + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/money_management/transactions/id_123", + null, null); } @Test - public void testV2BillingMeterEventPostServices() throws StripeException { + public void testV2PaymentsOffSessionPaymentGetServices() throws StripeException { stubRequest( BaseAddress.API, - ApiResource.RequestMethod.POST, - "/v2/billing/meter_events", + ApiResource.RequestMethod.GET, + "/v2/payments/off_session_payments", null, null, - com.stripe.model.v2.billing.MeterEvent.class, - "{\"created\":\"1970-01-12T21:42:34.472Z\",\"event_name\":\"event_name\",\"identifier\":\"identifier\",\"object\":\"v2.billing.meter_event\",\"payload\":{\"undefined\":\"payload\"},\"timestamp\":\"1970-01-01T15:18:46.294Z\",\"livemode\":true}"); + new TypeToken< + com.stripe.model.v2.StripeCollection< + com.stripe.model.v2.payments.OffSessionPayment>>() {}.getType(), + "{\"data\":[{\"amount_requested\":{\"currency\":\"USD\",\"value\":47},\"cadence\":\"unscheduled\",\"compartment_id\":\"compartment_id\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"failure_reason\":null,\"id\":\"obj_123\",\"last_authorization_attempt_error\":null,\"latest_payment_attempt_record\":null,\"livemode\":true,\"metadata\":{\"undefined\":\"metadata\"},\"object\":\"v2.payments.off_session_payment\",\"on_behalf_of\":null,\"payment_method\":\"payment_method\",\"payment_record\":null,\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"none\"},\"statement_descriptor\":null,\"statement_descriptor_suffix\":null,\"status\":\"pending\",\"test_clock\":null,\"transfer_data\":null}],\"next_page_url\":null,\"previous_page_url\":null}"); StripeClient client = new StripeClient(networkSpy); - com.stripe.param.v2.billing.MeterEventCreateParams params = - com.stripe.param.v2.billing.MeterEventCreateParams.builder() - .setEventName("event_name") - .putPayload("undefined", "payload") - .build(); + com.stripe.param.v2.payments.OffSessionPaymentListParams params = + com.stripe.param.v2.payments.OffSessionPaymentListParams.builder().build(); - com.stripe.model.v2.billing.MeterEvent meterEvent = - client.v2().billing().meterEvents().create(params); - assertNotNull(meterEvent); + com.stripe.model.v2.StripeCollection + stripeCollection = client.v2().payments().offSessionPayments().list(params); + assertNotNull(stripeCollection); verifyRequest( BaseAddress.API, - ApiResource.RequestMethod.POST, - "/v2/billing/meter_events", + ApiResource.RequestMethod.GET, + "/v2/payments/off_session_payments", params.toMap(), null); } @Test - public void testV2TestHelpersFinancialAddressPostServices() throws StripeException { + public void testV2PaymentsOffSessionPaymentPostServices() throws StripeException { stubRequest( BaseAddress.API, ApiResource.RequestMethod.POST, - "/v2/test_helpers/financial_addresses/id_123/credit", + "/v2/payments/off_session_payments", null, null, - com.stripe.model.v2.FinancialAddressCreditSimulation.class, - "{\"object\":\"financial_address_credit_simulation\",\"status\":\"status\",\"livemode\":true}"); + com.stripe.model.v2.payments.OffSessionPayment.class, + "{\"amount_requested\":{\"currency\":\"USD\",\"value\":47},\"cadence\":\"unscheduled\",\"compartment_id\":\"compartment_id\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"failure_reason\":null,\"id\":\"obj_123\",\"last_authorization_attempt_error\":null,\"latest_payment_attempt_record\":null,\"livemode\":true,\"metadata\":{\"undefined\":\"metadata\"},\"object\":\"v2.payments.off_session_payment\",\"on_behalf_of\":null,\"payment_method\":\"payment_method\",\"payment_record\":null,\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"none\"},\"statement_descriptor\":null,\"statement_descriptor_suffix\":null,\"status\":\"pending\",\"test_clock\":null,\"transfer_data\":null}"); StripeClient client = new StripeClient(networkSpy); - com.stripe.param.v2.testhelpers.FinancialAddressCreditParams params = - com.stripe.param.v2.testhelpers.FinancialAddressCreditParams.builder() + com.stripe.param.v2.payments.OffSessionPaymentCreateParams params = + com.stripe.param.v2.payments.OffSessionPaymentCreateParams.builder() .setAmount(new com.stripe.v2.Amount(96, "USD")) - .setNetwork(com.stripe.param.v2.testhelpers.FinancialAddressCreditParams.Network.RTP) + .setCadence( + com.stripe.param.v2.payments.OffSessionPaymentCreateParams.Cadence.UNSCHEDULED) + .setCustomer("customer") + .putMetadata("undefined", "metadata") + .setPaymentMethod("payment_method") .build(); - com.stripe.model.v2.FinancialAddressCreditSimulation financialAddressCreditSimulation = - client.v2().testHelpers().financialAddresses().credit("id_123", params); - assertNotNull(financialAddressCreditSimulation); + com.stripe.model.v2.payments.OffSessionPayment offSessionPayment = + client.v2().payments().offSessionPayments().create(params); + assertNotNull(offSessionPayment); verifyRequest( BaseAddress.API, ApiResource.RequestMethod.POST, - "/v2/test_helpers/financial_addresses/id_123/credit", + "/v2/payments/off_session_payments", params.toMap(), null); } @Test - public void testV2TestHelpersFinancialAddressPost2Services() throws StripeException { + public void testV2PaymentsOffSessionPaymentGet2Services() throws StripeException { stubRequest( BaseAddress.API, - ApiResource.RequestMethod.POST, - "/v2/test_helpers/financial_addresses/id_123/generate_microdeposits", + ApiResource.RequestMethod.GET, + "/v2/payments/off_session_payments/id_123", null, null, - com.stripe.model.v2.FinancialAddressGeneratedMicrodeposits.class, - "{\"amounts\":[{\"currency\":\"USD\",\"value\":1}],\"object\":\"financial_address_generated_microdeposits\",\"status\":\"accepted\",\"livemode\":true}"); + com.stripe.model.v2.payments.OffSessionPayment.class, + "{\"amount_requested\":{\"currency\":\"USD\",\"value\":47},\"cadence\":\"unscheduled\",\"compartment_id\":\"compartment_id\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"failure_reason\":null,\"id\":\"obj_123\",\"last_authorization_attempt_error\":null,\"latest_payment_attempt_record\":null,\"livemode\":true,\"metadata\":{\"undefined\":\"metadata\"},\"object\":\"v2.payments.off_session_payment\",\"on_behalf_of\":null,\"payment_method\":\"payment_method\",\"payment_record\":null,\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"none\"},\"statement_descriptor\":null,\"statement_descriptor_suffix\":null,\"status\":\"pending\",\"test_clock\":null,\"transfer_data\":null}"); StripeClient client = new StripeClient(networkSpy); - com.stripe.model.v2.FinancialAddressGeneratedMicrodeposits - financialAddressGeneratedMicrodeposits = - client.v2().testHelpers().financialAddresses().generateMicrodeposits("id_123"); - assertNotNull(financialAddressGeneratedMicrodeposits); + com.stripe.model.v2.payments.OffSessionPayment offSessionPayment = + client.v2().payments().offSessionPayments().retrieve("id_123"); + assertNotNull(offSessionPayment); verifyRequest( BaseAddress.API, - ApiResource.RequestMethod.POST, - "/v2/test_helpers/financial_addresses/id_123/generate_microdeposits", + ApiResource.RequestMethod.GET, + "/v2/payments/off_session_payments/id_123", null, null); } @Test - public void testV2PaymentsOffSessionPaymentPostServices() throws StripeException { + public void testV2PaymentsOffSessionPaymentPost2Services() throws StripeException { stubRequest( BaseAddress.API, ApiResource.RequestMethod.POST, @@ -17598,7 +17629,7 @@ public void testV2PaymentsOffSessionPaymentPostServices() throws StripeException null, null, com.stripe.model.v2.payments.OffSessionPayment.class, - "{\"amount_requested\":{\"currency\":\"USD\",\"value\":47},\"attempts\":542738246,\"cadence\":\"unscheduled\",\"compartment_id\":\"compartment_id\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"failure_reason\":null,\"id\":\"obj_123\",\"last_authorization_attempt_error\":null,\"latest_payment_attempt_record\":null,\"livemode\":true,\"metadata\":{\"undefined\":\"metadata\"},\"object\":\"v2.payments.off_session_payment\",\"on_behalf_of\":null,\"payment_method\":\"payment_method\",\"payment_record\":null,\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"none\"},\"statement_descriptor\":null,\"statement_descriptor_suffix\":null,\"status\":\"pending\",\"test_clock\":null,\"transfer_data\":null}"); + "{\"amount_requested\":{\"currency\":\"USD\",\"value\":47},\"cadence\":\"unscheduled\",\"compartment_id\":\"compartment_id\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"failure_reason\":null,\"id\":\"obj_123\",\"last_authorization_attempt_error\":null,\"latest_payment_attempt_record\":null,\"livemode\":true,\"metadata\":{\"undefined\":\"metadata\"},\"object\":\"v2.payments.off_session_payment\",\"on_behalf_of\":null,\"payment_method\":\"payment_method\",\"payment_record\":null,\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"none\"},\"statement_descriptor\":null,\"statement_descriptor_suffix\":null,\"status\":\"pending\",\"test_clock\":null,\"transfer_data\":null}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.payments.OffSessionPayment offSessionPayment = @@ -17613,85 +17644,54 @@ public void testV2PaymentsOffSessionPaymentPostServices() throws StripeException } @Test - public void testV2PaymentsOffSessionPaymentPost2Services() throws StripeException { + public void testV2TestHelpersFinancialAddressPostServices() throws StripeException { stubRequest( BaseAddress.API, ApiResource.RequestMethod.POST, - "/v2/payments/off_session_payments", + "/v2/test_helpers/financial_addresses/id_123/credit", null, null, - com.stripe.model.v2.payments.OffSessionPayment.class, - "{\"amount_requested\":{\"currency\":\"USD\",\"value\":47},\"attempts\":542738246,\"cadence\":\"unscheduled\",\"compartment_id\":\"compartment_id\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"failure_reason\":null,\"id\":\"obj_123\",\"last_authorization_attempt_error\":null,\"latest_payment_attempt_record\":null,\"livemode\":true,\"metadata\":{\"undefined\":\"metadata\"},\"object\":\"v2.payments.off_session_payment\",\"on_behalf_of\":null,\"payment_method\":\"payment_method\",\"payment_record\":null,\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"none\"},\"statement_descriptor\":null,\"statement_descriptor_suffix\":null,\"status\":\"pending\",\"test_clock\":null,\"transfer_data\":null}"); + com.stripe.model.v2.FinancialAddressCreditSimulation.class, + "{\"object\":\"financial_address_credit_simulation\",\"status\":\"status\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); - com.stripe.param.v2.payments.OffSessionPaymentCreateParams params = - com.stripe.param.v2.payments.OffSessionPaymentCreateParams.builder() + com.stripe.param.v2.testhelpers.FinancialAddressCreditParams params = + com.stripe.param.v2.testhelpers.FinancialAddressCreditParams.builder() .setAmount(new com.stripe.v2.Amount(96, "USD")) - .setCadence( - com.stripe.param.v2.payments.OffSessionPaymentCreateParams.Cadence.UNSCHEDULED) - .setCustomer("customer") - .putMetadata("undefined", "metadata") - .setPaymentMethod("payment_method") + .setNetwork(com.stripe.param.v2.testhelpers.FinancialAddressCreditParams.Network.RTP) .build(); - com.stripe.model.v2.payments.OffSessionPayment offSessionPayment = - client.v2().payments().offSessionPayments().create(params); - assertNotNull(offSessionPayment); + com.stripe.model.v2.FinancialAddressCreditSimulation financialAddressCreditSimulation = + client.v2().testHelpers().financialAddresses().credit("id_123", params); + assertNotNull(financialAddressCreditSimulation); verifyRequest( BaseAddress.API, ApiResource.RequestMethod.POST, - "/v2/payments/off_session_payments", - params.toMap(), - null); - } - - @Test - public void testV2PaymentsOffSessionPaymentGetServices() throws StripeException { - stubRequest( - BaseAddress.API, - ApiResource.RequestMethod.GET, - "/v2/payments/off_session_payments", - null, - null, - new TypeToken< - com.stripe.model.v2.StripeCollection< - com.stripe.model.v2.payments.OffSessionPayment>>() {}.getType(), - "{\"data\":[{\"amount_requested\":{\"currency\":\"USD\",\"value\":47},\"attempts\":542738246,\"cadence\":\"unscheduled\",\"compartment_id\":\"compartment_id\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"failure_reason\":null,\"id\":\"obj_123\",\"last_authorization_attempt_error\":null,\"latest_payment_attempt_record\":null,\"livemode\":true,\"metadata\":{\"undefined\":\"metadata\"},\"object\":\"v2.payments.off_session_payment\",\"on_behalf_of\":null,\"payment_method\":\"payment_method\",\"payment_record\":null,\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"none\"},\"statement_descriptor\":null,\"statement_descriptor_suffix\":null,\"status\":\"pending\",\"test_clock\":null,\"transfer_data\":null}],\"next_page_url\":null,\"previous_page_url\":null}"); - StripeClient client = new StripeClient(networkSpy); - - com.stripe.param.v2.payments.OffSessionPaymentListParams params = - com.stripe.param.v2.payments.OffSessionPaymentListParams.builder().build(); - - com.stripe.model.v2.StripeCollection - stripeCollection = client.v2().payments().offSessionPayments().list(params); - assertNotNull(stripeCollection); - verifyRequest( - BaseAddress.API, - ApiResource.RequestMethod.GET, - "/v2/payments/off_session_payments", + "/v2/test_helpers/financial_addresses/id_123/credit", params.toMap(), null); } @Test - public void testV2PaymentsOffSessionPaymentGet2Services() throws StripeException { + public void testV2TestHelpersFinancialAddressPost2Services() throws StripeException { stubRequest( BaseAddress.API, - ApiResource.RequestMethod.GET, - "/v2/payments/off_session_payments/id_123", + ApiResource.RequestMethod.POST, + "/v2/test_helpers/financial_addresses/id_123/generate_microdeposits", null, null, - com.stripe.model.v2.payments.OffSessionPayment.class, - "{\"amount_requested\":{\"currency\":\"USD\",\"value\":47},\"attempts\":542738246,\"cadence\":\"unscheduled\",\"compartment_id\":\"compartment_id\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"failure_reason\":null,\"id\":\"obj_123\",\"last_authorization_attempt_error\":null,\"latest_payment_attempt_record\":null,\"livemode\":true,\"metadata\":{\"undefined\":\"metadata\"},\"object\":\"v2.payments.off_session_payment\",\"on_behalf_of\":null,\"payment_method\":\"payment_method\",\"payment_record\":null,\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"none\"},\"statement_descriptor\":null,\"statement_descriptor_suffix\":null,\"status\":\"pending\",\"test_clock\":null,\"transfer_data\":null}"); + com.stripe.model.v2.FinancialAddressGeneratedMicrodeposits.class, + "{\"amounts\":[{\"currency\":\"USD\",\"value\":1}],\"object\":\"financial_address_generated_microdeposits\",\"status\":\"accepted\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); - com.stripe.model.v2.payments.OffSessionPayment offSessionPayment = - client.v2().payments().offSessionPayments().retrieve("id_123"); - assertNotNull(offSessionPayment); + com.stripe.model.v2.FinancialAddressGeneratedMicrodeposits + financialAddressGeneratedMicrodeposits = + client.v2().testHelpers().financialAddresses().generateMicrodeposits("id_123"); + assertNotNull(financialAddressGeneratedMicrodeposits); verifyRequest( BaseAddress.API, - ApiResource.RequestMethod.GET, - "/v2/payments/off_session_payments/id_123", + ApiResource.RequestMethod.POST, + "/v2/test_helpers/financial_addresses/id_123/generate_microdeposits", null, null); } @@ -17764,6 +17764,39 @@ public void testFinancialAccountNotOpenErrorServices() throws StripeException { null); } + @Test + public void testFeatureNotEnabledErrorServices() throws StripeException { + stubRequestReturnError( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/financial_addresses", + null, + null, + "{\"error\":{\"type\":\"feature_not_enabled\",\"code\":\"storer_capability_missing\"}}", + 400); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.moneymanagement.FinancialAddressCreateParams params = + com.stripe.param.v2.moneymanagement.FinancialAddressCreateParams.builder() + .setCurrency( + com.stripe.param.v2.moneymanagement.FinancialAddressCreateParams.Currency.STN) + .setFinancialAccount("financial_account") + .build(); + + try { + client.v2().moneyManagement().financialAddresses().create(params); + } catch (FeatureNotEnabledException e) { + + } + ; + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/financial_addresses", + params.toMap(), + null); + } + @Test public void testBlockedByStripeErrorServices() throws StripeException { stubRequestReturnError( @@ -17855,7 +17888,7 @@ public void testInsufficientFundsErrorServices() throws StripeException { "/v2/money_management/outbound_payments", null, null, - "{\"error\":{\"type\":\"insufficient_funds\",\"code\":\"outbound_payment_insufficient_funds\"}}", + "{\"error\":{\"type\":\"insufficient_funds\",\"code\":\"insufficient_funds\"}}", 400); StripeClient client = new StripeClient(networkSpy); @@ -17895,7 +17928,7 @@ public void testQuotaExceededErrorServices() throws StripeException { "/v2/core/vault/us_bank_accounts", null, null, - "{\"error\":{\"type\":\"quota_exceeded\",\"code\":\"outbound_payment_recipient_amount_limit_exceeded\"}}", + "{\"error\":{\"type\":\"quota_exceeded\",\"code\":\"recipient_amount_limit_exceeded\"}}", 400); StripeClient client = new StripeClient(networkSpy); @@ -17926,7 +17959,7 @@ public void testRecipientNotNotifiableErrorServices() throws StripeException { "/v2/money_management/outbound_payments", null, null, - "{\"error\":{\"type\":\"recipient_not_notifiable\",\"code\":\"outbound_payment_recipient_email_does_not_exist\"}}", + "{\"error\":{\"type\":\"recipient_not_notifiable\",\"code\":\"recipient_email_does_not_exist\"}}", 400); StripeClient client = new StripeClient(networkSpy); @@ -17958,46 +17991,6 @@ public void testRecipientNotNotifiableErrorServices() throws StripeException { null); } - @Test - public void testFeatureNotEnabledErrorServices() throws StripeException { - stubRequestReturnError( - BaseAddress.API, - ApiResource.RequestMethod.POST, - "/v2/money_management/outbound_payments", - null, - null, - "{\"error\":{\"type\":\"feature_not_enabled\",\"code\":\"outbound_payment_recipient_feature_not_active\"}}", - 400); - StripeClient client = new StripeClient(networkSpy); - - com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams params = - com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams.builder() - .setAmount(new com.stripe.v2.Amount(96, "USD")) - .setFrom( - com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams.From.builder() - .setCurrency("currency") - .setFinancialAccount("financial_account") - .build()) - .setTo( - com.stripe.param.v2.moneymanagement.OutboundPaymentCreateParams.To.builder() - .setRecipient("recipient") - .build()) - .build(); - - try { - client.v2().moneyManagement().outboundPayments().create(params); - } catch (FeatureNotEnabledException e) { - - } - ; - verifyRequest( - BaseAddress.API, - ApiResource.RequestMethod.POST, - "/v2/money_management/outbound_payments", - params.toMap(), - null); - } - @Test public void testInvalidPayoutMethodErrorServices() throws StripeException { stubRequestReturnError(