From 73961c60c7cc029ae7296c87e917f39a10cb876a Mon Sep 17 00:00:00 2001 From: "stripe-openapi[bot]" <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 27 Jan 2025 19:44:21 +0000 Subject: [PATCH] Update generated code (#1936) * Update generated code for v1441 * Update generated code for v1455 --------- Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Co-authored-by: helenye-stripe <111009531+helenye-stripe@users.noreply.github.com> --- OPENAPI_VERSION | 2 +- src/main/java/com/stripe/ApiVersion.java | 2 +- src/main/java/com/stripe/model/Account.java | 43 + .../java/com/stripe/model/AccountSession.java | 178 ++++ src/main/java/com/stripe/model/Charge.java | 30 + .../com/stripe/model/ConfirmationToken.java | 28 +- .../java/com/stripe/model/PaymentIntent.java | 12 + .../java/com/stripe/model/PaymentMethod.java | 26 +- .../model/PaymentMethodConfiguration.java | 55 ++ .../java/com/stripe/model/StripeError.java | 8 + .../com/stripe/model/checkout/Session.java | 66 +- .../stripe/model/terminal/Configuration.java | 27 + .../model/treasury/FinancialAccount.java | 74 ++ .../model/treasury/OutboundTransfer.java | 27 +- .../stripe/model/treasury/ReceivedCredit.java | 25 +- .../com/stripe/param/AccountCreateParams.java | 375 +++++++- .../param/AccountSessionCreateParams.java | 886 ++++++++++++++++++ .../com/stripe/param/AccountUpdateParams.java | 390 +++++++- .../param/ConfirmationTokenCreateParams.java | 82 ++ .../CustomerListPaymentMethodsParams.java | 3 + .../CustomerPaymentMethodListParams.java | 3 + .../param/PaymentIntentConfirmParams.java | 170 ++++ .../param/PaymentIntentCreateParams.java | 169 ++++ .../param/PaymentIntentUpdateParams.java | 169 ++++ .../stripe/param/PaymentLinkCreateParams.java | 6 + .../stripe/param/PaymentLinkUpdateParams.java | 99 ++ ...aymentMethodConfigurationCreateParams.java | 189 ++++ ...aymentMethodConfigurationUpdateParams.java | 189 ++++ .../param/PaymentMethodCreateParams.java | 79 ++ .../stripe/param/PaymentMethodListParams.java | 3 + .../param/PaymentMethodUpdateParams.java | 76 ++ .../param/SetupIntentConfirmParams.java | 81 ++ .../stripe/param/SetupIntentCreateParams.java | 81 ++ .../stripe/param/SetupIntentUpdateParams.java | 81 ++ .../com/stripe/param/TokenCreateParams.java | 162 ++++ .../param/WebhookEndpointCreateParams.java | 5 +- .../ConfigurationCreateParams.java | 10 +- .../ConfigurationUpdateParams.java | 10 +- .../param/checkout/SessionCreateParams.java | 90 +- .../TransactionListParams.java | 6 +- .../terminal/ConfigurationCreateParams.java | 162 ++++ .../terminal/ConfigurationUpdateParams.java | 162 ++++ .../treasury/FinancialAccountCloseParams.java | 238 +++++ .../FinancialAccountCreateParams.java | 22 + .../FinancialAccountUpdateParams.java | 180 +++- .../OutboundTransferCreateParams.java | 125 +++ .../treasury/ReceivedCreditListParams.java | 3 + .../treasury/FinancialAccountService.java | 43 + .../stripe/functional/GeneratedExamples.java | 44 + 49 files changed, 4963 insertions(+), 33 deletions(-) create mode 100644 src/main/java/com/stripe/param/treasury/FinancialAccountCloseParams.java diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index bf0daa66a74..217ac84ad04 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1412 \ No newline at end of file +v1455 \ No newline at end of file diff --git a/src/main/java/com/stripe/ApiVersion.java b/src/main/java/com/stripe/ApiVersion.java index f582b3a469b..40e6e8ec23f 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 = "2024-12-18.acacia"; + public static final String CURRENT = "2025-01-27.acacia"; } diff --git a/src/main/java/com/stripe/model/Account.java b/src/main/java/com/stripe/model/Account.java index 3449c963d85..9c0bf1f7022 100644 --- a/src/main/java/com/stripe/model/Account.java +++ b/src/main/java/com/stripe/model/Account.java @@ -1180,6 +1180,15 @@ public static class Capabilities extends StripeObject { @SerializedName("p24_payments") String p24Payments; + /** + * The status of the pay_by_bank payments capability of the account, or whether the account can + * directly process pay_by_bank charges. + * + *

One of {@code active}, {@code inactive}, or {@code pending}. + */ + @SerializedName("pay_by_bank_payments") + String payByBankPayments; + /** * The status of the Payco capability of the account, or whether the account can directly * process Payco payments. @@ -1359,6 +1368,13 @@ public static class Company extends StripeObject { @SerializedName("directors_provided") Boolean directorsProvided; + /** + * This hash is used to attest that the director information provided to Stripe is both current + * and correct. + */ + @SerializedName("directorship_declaration") + DirectorshipDeclaration directorshipDeclaration; + /** * Whether the company's executives have been provided. This Boolean will be {@code true} if * you've manually indicated that all executives are provided via API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class DirectorshipDeclaration extends StripeObject { + /** The Unix timestamp marking when the directorship declaration attestation was made. */ + @SerializedName("date") + Long date; + + /** The IP address from which the directorship declaration attestation was made. */ + @SerializedName("ip") + String ip; + + /** + * The user-agent string from the browser where the directorship declaration attestation was + * made. + */ + @SerializedName("user_agent") + String userAgent; + } + /** * For more details about OwnershipDeclaration, please refer to the API Reference. diff --git a/src/main/java/com/stripe/model/AccountSession.java b/src/main/java/com/stripe/model/AccountSession.java index cbe1dc2cd11..ec1f6523fcc 100644 --- a/src/main/java/com/stripe/model/AccountSession.java +++ b/src/main/java/com/stripe/model/AccountSession.java @@ -138,6 +138,18 @@ public static class Components extends StripeObject { @SerializedName("documents") Documents documents; + @SerializedName("financial_account") + FinancialAccount financialAccount; + + @SerializedName("financial_account_transactions") + FinancialAccountTransactions financialAccountTransactions; + + @SerializedName("issuing_card") + IssuingCard issuingCard; + + @SerializedName("issuing_cards_list") + IssuingCardsList issuingCardsList; + @SerializedName("notification_banner") NotificationBanner notificationBanner; @@ -340,6 +352,172 @@ public static class Documents extends StripeObject { public static class Features extends StripeObject {} } + /** + * For more details about FinancialAccount, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class FinancialAccount extends StripeObject { + /** Whether the embedded component is enabled. */ + @SerializedName("enabled") + Boolean enabled; + + @SerializedName("features") + Features features; + + /** + * For more details about Features, please refer to the API Reference. + */ + @Getter + @Setter + @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. + */ + @SerializedName("disable_stripe_user_authentication") + Boolean disableStripeUserAuthentication; + + /** Whether to allow external accounts to be linked for money transfer. */ + @SerializedName("external_account_collection") + Boolean externalAccountCollection; + + /** Whether to allow sending money. */ + @SerializedName("send_money") + Boolean sendMoney; + + /** Whether to allow transferring balance. */ + @SerializedName("transfer_balance") + Boolean transferBalance; + } + } + + /** + * For more details about FinancialAccountTransactions, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class FinancialAccountTransactions extends StripeObject { + /** Whether the embedded component is enabled. */ + @SerializedName("enabled") + Boolean enabled; + + @SerializedName("features") + Features features; + + /** + * For more details about Features, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Features extends StripeObject { + /** Whether to allow card spend dispute management features. */ + @SerializedName("card_spend_dispute_management") + Boolean cardSpendDisputeManagement; + } + } + + /** + * For more details about IssuingCard, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class IssuingCard extends StripeObject { + /** Whether the embedded component is enabled. */ + @SerializedName("enabled") + Boolean enabled; + + @SerializedName("features") + Features features; + + /** + * For more details about Features, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Features extends StripeObject { + /** Whether to allow card management features. */ + @SerializedName("card_management") + Boolean cardManagement; + + /** Whether to allow card spend dispute management features. */ + @SerializedName("card_spend_dispute_management") + Boolean cardSpendDisputeManagement; + + /** Whether to allow cardholder management features. */ + @SerializedName("cardholder_management") + Boolean cardholderManagement; + + /** Whether to allow spend control management features. */ + @SerializedName("spend_control_management") + Boolean spendControlManagement; + } + } + + /** + * For more details about IssuingCardsList, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class IssuingCardsList extends StripeObject { + /** Whether the embedded component is enabled. */ + @SerializedName("enabled") + Boolean enabled; + + @SerializedName("features") + Features features; + + /** + * For more details about Features, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Features extends StripeObject { + /** Whether to allow card management features. */ + @SerializedName("card_management") + Boolean cardManagement; + + /** Whether to allow card spend dispute management features. */ + @SerializedName("card_spend_dispute_management") + Boolean cardSpendDisputeManagement; + + /** Whether to allow cardholder management features. */ + @SerializedName("cardholder_management") + 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. + */ + @SerializedName("disable_stripe_user_authentication") + Boolean disableStripeUserAuthentication; + + /** Whether to allow spend control management features. */ + @SerializedName("spend_control_management") + Boolean spendControlManagement; + } + } + /** * For more details about NotificationBanner, please refer to the API Reference. diff --git a/src/main/java/com/stripe/model/Charge.java b/src/main/java/com/stripe/model/Charge.java index e5ca12f37e2..8c8f3527f61 100644 --- a/src/main/java/com/stripe/model/Charge.java +++ b/src/main/java/com/stripe/model/Charge.java @@ -1028,6 +1028,16 @@ public static class LineItem extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Outcome extends StripeObject { + /** + * An enumerated value providing a more detailed explanation on how to proceed with an + * error. + * + *

One of {@code confirm_card_data}, {@code do_not_try_again}, or {@code try_again_later}. + */ + @SerializedName("advice_code") + String adviceCode; + /** * For charges declined by the network, a 2 digit code which indicates the advice returned by * the network on how to proceed with an error. @@ -1252,6 +1262,9 @@ public static class PaymentMethodDetails extends StripeObject { @SerializedName("p24") P24 p24; + @SerializedName("pay_by_bank") + PayByBank payByBank; + @SerializedName("payco") Payco payco; @@ -3258,6 +3271,15 @@ public static class P24 extends StripeObject { String verifiedName; } + /** + * For more details about PayByBank, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class PayByBank extends StripeObject {} + /** * For more details about Payco, please refer to the API * Reference. @@ -3292,6 +3314,14 @@ public static class Paynow extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Paypal extends StripeObject { + /** + * Two-letter ISO code representing the buyer's country. Values are provided by PayPal + * directly (if supported) at the time of authorization or settlement. They cannot be set or + * mutated. + */ + @SerializedName("country") + String country; + /** * Owner's email. Values are provided by PayPal directly (if supported) at the time of * authorization or settlement. They cannot be set or mutated. diff --git a/src/main/java/com/stripe/model/ConfirmationToken.java b/src/main/java/com/stripe/model/ConfirmationToken.java index 739c30f19ff..b498b819d9e 100644 --- a/src/main/java/com/stripe/model/ConfirmationToken.java +++ b/src/main/java/com/stripe/model/ConfirmationToken.java @@ -340,6 +340,9 @@ public static class PaymentMethodPreview extends StripeObject { @SerializedName("p24") P24 p24; + @SerializedName("pay_by_bank") + PayByBank payByBank; + @SerializedName("payco") Payco payco; @@ -384,10 +387,10 @@ public static class PaymentMethodPreview extends StripeObject { * cashapp}, {@code customer_balance}, {@code eps}, {@code fpx}, {@code giropay}, {@code * grabpay}, {@code ideal}, {@code interac_present}, {@code kakao_pay}, {@code klarna}, {@code * konbini}, {@code kr_card}, {@code link}, {@code mobilepay}, {@code multibanco}, {@code - * naver_pay}, {@code oxxo}, {@code p24}, {@code payco}, {@code paynow}, {@code paypal}, {@code - * pix}, {@code promptpay}, {@code revolut_pay}, {@code samsung_pay}, {@code sepa_debit}, {@code - * sofort}, {@code swish}, {@code twint}, {@code us_bank_account}, {@code wechat_pay}, or {@code - * zip}. + * naver_pay}, {@code oxxo}, {@code p24}, {@code pay_by_bank}, {@code payco}, {@code paynow}, + * {@code paypal}, {@code pix}, {@code promptpay}, {@code revolut_pay}, {@code samsung_pay}, + * {@code sepa_debit}, {@code sofort}, {@code swish}, {@code twint}, {@code us_bank_account}, + * {@code wechat_pay}, or {@code zip}. */ @SerializedName("type") String type; @@ -1851,6 +1854,15 @@ public static class P24 extends StripeObject { String bank; } + /** + * For more details about PayByBank, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class PayByBank extends StripeObject {} + /** * For more details about Payco, please refer to the API * Reference. @@ -1877,6 +1889,14 @@ public static class Paynow extends StripeObject {} @Setter @EqualsAndHashCode(callSuper = false) public static class Paypal extends StripeObject { + /** + * Two-letter ISO code representing the buyer's country. Values are provided by PayPal + * directly (if supported) at the time of authorization or settlement. They cannot be set or + * mutated. + */ + @SerializedName("country") + String country; + /** * Owner's email. Values are provided by PayPal directly (if supported) at the time of * authorization or settlement. They cannot be set or mutated. diff --git a/src/main/java/com/stripe/model/PaymentIntent.java b/src/main/java/com/stripe/model/PaymentIntent.java index 2d1e5e08678..bb4b2970ec9 100644 --- a/src/main/java/com/stripe/model/PaymentIntent.java +++ b/src/main/java/com/stripe/model/PaymentIntent.java @@ -2585,6 +2585,9 @@ public static class PaymentMethodOptions extends StripeObject { @SerializedName("p24") P24 p24; + @SerializedName("pay_by_bank") + PayByBank payByBank; + @SerializedName("payco") Payco payco; @@ -4136,6 +4139,15 @@ public static class P24 extends StripeObject { String setupFutureUsage; } + /** + * For more details about PayByBank, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class PayByBank extends StripeObject {} + /** * For more details about Payco, please refer to the API * Reference. diff --git a/src/main/java/com/stripe/model/PaymentMethod.java b/src/main/java/com/stripe/model/PaymentMethod.java index 07772ca71b9..93d71b74d35 100644 --- a/src/main/java/com/stripe/model/PaymentMethod.java +++ b/src/main/java/com/stripe/model/PaymentMethod.java @@ -182,6 +182,9 @@ public class PaymentMethod extends ApiResource implements HasId, MetadataStore

API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class PayByBank extends StripeObject {} + /** * For more details about Payco, please refer to the API * Reference. @@ -2099,6 +2111,13 @@ public static class Paynow extends StripeObject {} @Setter @EqualsAndHashCode(callSuper = false) public static class Paypal extends StripeObject { + /** + * Two-letter ISO code representing the buyer's country. Values are provided by PayPal directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + @SerializedName("country") + String country; + /** * Owner's email. Values are provided by PayPal directly (if supported) at the time of * authorization or settlement. They cannot be set or mutated. @@ -2456,6 +2475,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { trySetResponseGetter(naverPay, responseGetter); trySetResponseGetter(oxxo, responseGetter); trySetResponseGetter(p24, responseGetter); + trySetResponseGetter(payByBank, responseGetter); trySetResponseGetter(payco, responseGetter); trySetResponseGetter(paynow, responseGetter); trySetResponseGetter(paypal, responseGetter); diff --git a/src/main/java/com/stripe/model/PaymentMethodConfiguration.java b/src/main/java/com/stripe/model/PaymentMethodConfiguration.java index 9dbdf8363d8..f102561b10a 100644 --- a/src/main/java/com/stripe/model/PaymentMethodConfiguration.java +++ b/src/main/java/com/stripe/model/PaymentMethodConfiguration.java @@ -182,6 +182,9 @@ public class PaymentMethodConfiguration extends ApiResource implements HasId { @SerializedName("parent") String parent; + @SerializedName("pay_by_bank") + PayByBank payByBank; + @SerializedName("paynow") Paynow paynow; @@ -1899,6 +1902,57 @@ public static class DisplayPreference extends StripeObject { } } + /** + * For more details about PayByBank, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class PayByBank extends StripeObject { + /** + * Whether this payment method may be offered at checkout. True if {@code display_preference} is + * {@code on} and the payment method's capability is active. + */ + @SerializedName("available") + Boolean available; + + @SerializedName("display_preference") + DisplayPreference displayPreference; + + /** + * For more details about DisplayPreference, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class DisplayPreference extends StripeObject { + /** + * For child configs, whether or not the account's preference will be observed. If {@code + * false}, the parent configuration's default is used. + */ + @SerializedName("overridable") + Boolean overridable; + + /** + * The account's display preference. + * + *

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

One of {@code off}, or {@code on}. + */ + @SerializedName("value") + String value; + } + } + /** * For more details about Paynow, please refer to the API * Reference. @@ -2493,6 +2547,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { trySetResponseGetter(multibanco, responseGetter); trySetResponseGetter(oxxo, responseGetter); trySetResponseGetter(p24, responseGetter); + trySetResponseGetter(payByBank, responseGetter); trySetResponseGetter(paynow, responseGetter); trySetResponseGetter(paypal, responseGetter); trySetResponseGetter(promptpay, responseGetter); diff --git a/src/main/java/com/stripe/model/StripeError.java b/src/main/java/com/stripe/model/StripeError.java index 6675cd8e32a..1b65a02412b 100644 --- a/src/main/java/com/stripe/model/StripeError.java +++ b/src/main/java/com/stripe/model/StripeError.java @@ -10,6 +10,14 @@ @Setter @EqualsAndHashCode(callSuper = false) public class StripeError extends StripeObject { + /** + * For card errors resulting from a card issuer decline, a short string indicating how to proceed with an + * error if they provide one. + */ + @SerializedName("advice_code") + String adviceCode; + /** For card errors, the ID of the failed charge. */ @SerializedName("charge") String charge; diff --git a/src/main/java/com/stripe/model/checkout/Session.java b/src/main/java/com/stripe/model/checkout/Session.java index a65c703fc97..929fc6b4d12 100644 --- a/src/main/java/com/stripe/model/checkout/Session.java +++ b/src/main/java/com/stripe/model/checkout/Session.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Account; import com.stripe.model.Address; +import com.stripe.model.Coupon; import com.stripe.model.Customer; import com.stripe.model.ExpandableField; import com.stripe.model.HasId; @@ -13,6 +14,7 @@ import com.stripe.model.MetadataStore; import com.stripe.model.PaymentIntent; import com.stripe.model.PaymentLink; +import com.stripe.model.PromotionCode; import com.stripe.model.SetupIntent; import com.stripe.model.ShippingDetails; import com.stripe.model.ShippingRate; @@ -185,6 +187,10 @@ public class Session extends ApiResource implements HasId, MetadataStore discounts; + /** The timestamp at which the Checkout Session will expire. */ @SerializedName("expires_at") Long expiresAt; @@ -1361,6 +1367,64 @@ public static class TaxId extends StripeObject { } } + /** + * For more details about Discount, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Discount extends StripeObject { + /** Coupon attached to the Checkout Session. */ + @SerializedName("coupon") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField coupon; + + /** Promotion code attached to the Checkout Session. */ + @SerializedName("promotion_code") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField promotionCode; + + /** Get ID of expandable {@code coupon} object. */ + public String getCoupon() { + return (this.coupon != null) ? this.coupon.getId() : null; + } + + public void setCoupon(String id) { + this.coupon = ApiResource.setExpandableFieldId(id, this.coupon); + } + + /** Get expanded {@code coupon}. */ + public Coupon getCouponObject() { + return (this.coupon != null) ? this.coupon.getExpanded() : null; + } + + public void setCouponObject(Coupon expandableObject) { + this.coupon = new ExpandableField(expandableObject.getId(), expandableObject); + } + + /** Get ID of expandable {@code promotionCode} object. */ + public String getPromotionCode() { + return (this.promotionCode != null) ? this.promotionCode.getId() : null; + } + + public void setPromotionCode(String id) { + this.promotionCode = ApiResource.setExpandableFieldId(id, this.promotionCode); + } + + /** Get expanded {@code promotionCode}. */ + public PromotionCode getPromotionCodeObject() { + return (this.promotionCode != null) ? this.promotionCode.getExpanded() : null; + } + + public void setPromotionCodeObject(PromotionCode expandableObject) { + this.promotionCode = + new ExpandableField(expandableObject.getId(), expandableObject); + } + } + /** * For more details about InvoiceCreation, please refer to the API Reference. @@ -3243,7 +3307,7 @@ public static class ShippingAddressCollection extends StripeObject { /** * An array of two-letter ISO country codes representing which countries Checkout should provide * as options for shipping locations. Unsupported country codes: {@code AS, CX, CC, CU, HM, IR, - * KP, MH, FM, NF, MP, PW, SD, SY, UM, VI}. + * KP, MH, FM, NF, MP, PW, SY, UM, VI}. */ @SerializedName("allowed_countries") List allowedCountries; diff --git a/src/main/java/com/stripe/model/terminal/Configuration.java b/src/main/java/com/stripe/model/terminal/Configuration.java index 250a5f3bd41..d390315727d 100644 --- a/src/main/java/com/stripe/model/terminal/Configuration.java +++ b/src/main/java/com/stripe/model/terminal/Configuration.java @@ -381,6 +381,9 @@ public static class Tipping extends StripeObject { @SerializedName("hkd") Hkd hkd; + @SerializedName("jpy") + Jpy jpy; + @SerializedName("myr") Myr myr; @@ -594,6 +597,30 @@ public static class Hkd extends StripeObject { Long smartTipThreshold; } + /** + * For more details about Jpy, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Jpy extends StripeObject { + /** Fixed amounts displayed when collecting a tip. */ + @SerializedName("fixed_amounts") + List fixedAmounts; + + /** Percentages displayed when collecting a tip. */ + @SerializedName("percentages") + List percentages; + + /** + * Below this amount, fixed amounts will be displayed; above it, percentages will be + * displayed. + */ + @SerializedName("smart_tip_threshold") + Long smartTipThreshold; + } + /** * For more details about Myr, please refer to the API * Reference. diff --git a/src/main/java/com/stripe/model/treasury/FinancialAccount.java b/src/main/java/com/stripe/model/treasury/FinancialAccount.java index 7d2af2f134a..68e188410c4 100644 --- a/src/main/java/com/stripe/model/treasury/FinancialAccount.java +++ b/src/main/java/com/stripe/model/treasury/FinancialAccount.java @@ -12,6 +12,7 @@ import com.stripe.net.BaseAddress; import com.stripe.net.RequestOptions; import com.stripe.net.StripeResponseGetter; +import com.stripe.param.treasury.FinancialAccountCloseParams; import com.stripe.param.treasury.FinancialAccountCreateParams; import com.stripe.param.treasury.FinancialAccountListParams; import com.stripe.param.treasury.FinancialAccountRetrieveFeaturesParams; @@ -70,6 +71,9 @@ public class FinancialAccount extends ApiResource @SerializedName("id") String id; + @SerializedName("is_default") + Boolean isDefault; + /** * Has the value {@code true} if the object exists in live mode or the value {@code false} if the * object exists in test mode. @@ -86,6 +90,10 @@ public class FinancialAccount extends ApiResource @SerializedName("metadata") Map metadata; + /** The nickname for the FinancialAccount. */ + @SerializedName("nickname") + String nickname; + /** * String representing the object's type. Objects of the same type share the same value. * @@ -124,6 +132,72 @@ public class FinancialAccount extends ApiResource @SerializedName("supported_currencies") List supportedCurrencies; + /** + * Closes a FinancialAccount. A FinancialAccount can only be closed if it has a zero balance, has + * no pending InboundTransfers, and has canceled all attached Issuing cards. + */ + public FinancialAccount close() throws StripeException { + return close((Map) null, (RequestOptions) null); + } + + /** + * Closes a FinancialAccount. A FinancialAccount can only be closed if it has a zero balance, has + * no pending InboundTransfers, and has canceled all attached Issuing cards. + */ + public FinancialAccount close(RequestOptions options) throws StripeException { + return close((Map) null, options); + } + + /** + * Closes a FinancialAccount. A FinancialAccount can only be closed if it has a zero balance, has + * no pending InboundTransfers, and has canceled all attached Issuing cards. + */ + public FinancialAccount close(Map params) throws StripeException { + return close(params, (RequestOptions) null); + } + + /** + * Closes a FinancialAccount. A FinancialAccount can only be closed if it has a zero balance, has + * no pending InboundTransfers, and has canceled all attached Issuing cards. + */ + public FinancialAccount close(Map params, RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/treasury/financial_accounts/%s/close", ApiResource.urlEncodeId(this.getId())); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options); + return getResponseGetter().request(request, FinancialAccount.class); + } + + /** + * Closes a FinancialAccount. A FinancialAccount can only be closed if it has a zero balance, has + * no pending InboundTransfers, and has canceled all attached Issuing cards. + */ + public FinancialAccount close(FinancialAccountCloseParams params) throws StripeException { + return close(params, (RequestOptions) null); + } + + /** + * Closes a FinancialAccount. A FinancialAccount can only be closed if it has a zero balance, has + * no pending InboundTransfers, and has canceled all attached Issuing cards. + */ + public FinancialAccount close(FinancialAccountCloseParams params, RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/treasury/financial_accounts/%s/close", ApiResource.urlEncodeId(this.getId())); + ApiResource.checkNullTypedParams(path, params); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return getResponseGetter().request(request, FinancialAccount.class); + } + /** * Creates a new FinancialAccount. For now, each connected account can only have one * FinancialAccount. diff --git a/src/main/java/com/stripe/model/treasury/OutboundTransfer.java b/src/main/java/com/stripe/model/treasury/OutboundTransfer.java index c25bf4c61e2..a40719ffb18 100644 --- a/src/main/java/com/stripe/model/treasury/OutboundTransfer.java +++ b/src/main/java/com/stripe/model/treasury/OutboundTransfer.java @@ -357,10 +357,13 @@ public static class DestinationPaymentMethodDetails extends StripeObject { @SerializedName("billing_details") BillingDetails billingDetails; + @SerializedName("financial_account") + FinancialAccount financialAccount; + /** * The type of the payment method used in the OutboundTransfer. * - *

Equal to {@code us_bank_account}. + *

One of {@code financial_account}, or {@code us_bank_account}. */ @SerializedName("type") String type; @@ -388,6 +391,28 @@ public static class BillingDetails extends StripeObject { String name; } + /** + * For more details about FinancialAccount, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class FinancialAccount extends StripeObject implements HasId { + /** Token of the FinancialAccount. */ + @Getter(onMethod_ = {@Override}) + @SerializedName("id") + String id; + + /** + * The rails used to send funds. + * + *

Equal to {@code stripe}. + */ + @SerializedName("network") + String network; + } + /** * For more details about UsBankAccount, please refer to the API Reference. diff --git a/src/main/java/com/stripe/model/treasury/ReceivedCredit.java b/src/main/java/com/stripe/model/treasury/ReceivedCredit.java index ae8aae33115..b924b699d35 100644 --- a/src/main/java/com/stripe/model/treasury/ReceivedCredit.java +++ b/src/main/java/com/stripe/model/treasury/ReceivedCredit.java @@ -413,6 +413,27 @@ public static class SourceFlowDetails extends StripeObject { @SerializedName("outbound_payment") OutboundPayment outboundPayment; + /** + * Use OutboundTransfers + * to transfer funds from a FinancialAccount to a + * PaymentMethod belonging to the same entity. To send funds to a different party, use OutboundPayments instead. You can + * send funds over ACH rails or through a domestic wire transfer to a user's own external bank + * account. + * + *

Simulate OutboundTransfer state changes with the {@code + * /v1/test_helpers/treasury/outbound_transfers} endpoints. These methods can only be called + * on test mode objects. + * + *

Related guide: Moving + * money with Treasury using OutboundTransfer objects + */ + @SerializedName("outbound_transfer") + OutboundTransfer outboundTransfer; + /** * A {@code Payout} object is created when you receive funds from Stripe, or when you initiate * a payout to either a bank account or debit card of a One of {@code credit_reversal}, {@code other}, {@code outbound_payment}, or {@code - * payout}. + *

One of {@code credit_reversal}, {@code other}, {@code outbound_payment}, {@code + * outbound_transfer}, or {@code payout}. */ @SerializedName("type") String type; diff --git a/src/main/java/com/stripe/param/AccountCreateParams.java b/src/main/java/com/stripe/param/AccountCreateParams.java index 6e02ba32d52..fa28974a3f0 100644 --- a/src/main/java/com/stripe/param/AccountCreateParams.java +++ b/src/main/java/com/stripe/param/AccountCreateParams.java @@ -1355,6 +1355,10 @@ public static class Capabilities { @SerializedName("p24_payments") P24Payments p24Payments; + /** The pay_by_bank_payments capability. */ + @SerializedName("pay_by_bank_payments") + PayByBankPayments payByBankPayments; + /** The payco_payments capability. */ @SerializedName("payco_payments") PaycoPayments paycoPayments; @@ -1461,6 +1465,7 @@ private Capabilities( NaverPayPayments naverPayPayments, OxxoPayments oxxoPayments, P24Payments p24Payments, + PayByBankPayments payByBankPayments, PaycoPayments paycoPayments, PaynowPayments paynowPayments, PromptpayPayments promptpayPayments, @@ -1515,6 +1520,7 @@ private Capabilities( this.naverPayPayments = naverPayPayments; this.oxxoPayments = oxxoPayments; this.p24Payments = p24Payments; + this.payByBankPayments = payByBankPayments; this.paycoPayments = paycoPayments; this.paynowPayments = paynowPayments; this.promptpayPayments = promptpayPayments; @@ -1613,6 +1619,8 @@ public static class Builder { private P24Payments p24Payments; + private PayByBankPayments payByBankPayments; + private PaycoPayments paycoPayments; private PaynowPayments paynowPayments; @@ -1687,6 +1695,7 @@ public AccountCreateParams.Capabilities build() { this.naverPayPayments, this.oxxoPayments, this.p24Payments, + this.payByBankPayments, this.paycoPayments, this.paynowPayments, this.promptpayPayments, @@ -1974,6 +1983,13 @@ public Builder setP24Payments(AccountCreateParams.Capabilities.P24Payments p24Pa return this; } + /** The pay_by_bank_payments capability. */ + public Builder setPayByBankPayments( + AccountCreateParams.Capabilities.PayByBankPayments payByBankPayments) { + this.payByBankPayments = payByBankPayments; + return this; + } + /** The payco_payments capability. */ public Builder setPaycoPayments( AccountCreateParams.Capabilities.PaycoPayments paycoPayments) { @@ -4930,6 +4946,85 @@ public Builder setRequested(Boolean requested) { } } + @Getter + public static class PayByBankPayments { + /** + * 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 PayByBankPayments(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.PayByBankPayments build() { + return new AccountCreateParams.Capabilities.PayByBankPayments( + 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.PayByBankPayments#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.PayByBankPayments#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 public static class PaycoPayments { /** @@ -6295,6 +6390,13 @@ public static class Company { @SerializedName("directors_provided") Boolean directorsProvided; + /** + * This hash is used to attest that the directors information provided to Stripe is both current + * and correct. + */ + @SerializedName("directorship_declaration") + DirectorshipDeclaration directorshipDeclaration; + /** * Whether the company's executives have been provided. Set this Boolean to {@code true} after * creating all the company's executives with the @@ -6350,6 +6452,9 @@ public static class Company { @SerializedName("ownership_declaration") OwnershipDeclaration ownershipDeclaration; + @SerializedName("ownership_exemption_reason") + ApiRequestParams.EnumParam ownershipExemptionReason; + /** The company's phone number (used for verification). */ @SerializedName("phone") String phone; @@ -6398,6 +6503,7 @@ private Company( AddressKana addressKana, AddressKanji addressKanji, Boolean directorsProvided, + DirectorshipDeclaration directorshipDeclaration, Boolean executivesProvided, String exportLicenseId, String exportPurposeCode, @@ -6407,6 +6513,7 @@ private Company( String nameKanji, Boolean ownersProvided, OwnershipDeclaration ownershipDeclaration, + ApiRequestParams.EnumParam ownershipExemptionReason, String phone, String registrationNumber, ApiRequestParams.EnumParam structure, @@ -6418,6 +6525,7 @@ private Company( this.addressKana = addressKana; this.addressKanji = addressKanji; this.directorsProvided = directorsProvided; + this.directorshipDeclaration = directorshipDeclaration; this.executivesProvided = executivesProvided; this.exportLicenseId = exportLicenseId; this.exportPurposeCode = exportPurposeCode; @@ -6427,6 +6535,7 @@ private Company( this.nameKanji = nameKanji; this.ownersProvided = ownersProvided; this.ownershipDeclaration = ownershipDeclaration; + this.ownershipExemptionReason = ownershipExemptionReason; this.phone = phone; this.registrationNumber = registrationNumber; this.structure = structure; @@ -6449,6 +6558,8 @@ public static class Builder { private Boolean directorsProvided; + private DirectorshipDeclaration directorshipDeclaration; + private Boolean executivesProvided; private String exportLicenseId; @@ -6467,6 +6578,8 @@ public static class Builder { private OwnershipDeclaration ownershipDeclaration; + private ApiRequestParams.EnumParam ownershipExemptionReason; + private String phone; private String registrationNumber; @@ -6488,6 +6601,7 @@ public AccountCreateParams.Company build() { this.addressKana, this.addressKanji, this.directorsProvided, + this.directorshipDeclaration, this.executivesProvided, this.exportLicenseId, this.exportPurposeCode, @@ -6497,6 +6611,7 @@ public AccountCreateParams.Company build() { this.nameKanji, this.ownersProvided, this.ownershipDeclaration, + this.ownershipExemptionReason, this.phone, this.registrationNumber, this.structure, @@ -6536,6 +6651,16 @@ public Builder setDirectorsProvided(Boolean directorsProvided) { return this; } + /** + * This hash is used to attest that the directors information provided to Stripe is both + * current and correct. + */ + public Builder setDirectorshipDeclaration( + AccountCreateParams.Company.DirectorshipDeclaration directorshipDeclaration) { + this.directorshipDeclaration = directorshipDeclaration; + return this; + } + /** * Whether the company's executives have been provided. Set this Boolean to {@code true} after * creating all the company's executives with the @@ -6625,6 +6750,17 @@ public Builder setOwnershipDeclaration( return this; } + public Builder setOwnershipExemptionReason( + AccountCreateParams.Company.OwnershipExemptionReason ownershipExemptionReason) { + this.ownershipExemptionReason = ownershipExemptionReason; + return this; + } + + public Builder setOwnershipExemptionReason(EmptyParam ownershipExemptionReason) { + this.ownershipExemptionReason = ownershipExemptionReason; + return this; + } + /** The company's phone number (used for verification). */ public Builder setPhone(String phone) { this.phone = phone; @@ -7188,6 +7324,109 @@ public Builder setTown(String town) { } } + @Getter + public static class DirectorshipDeclaration { + /** The Unix timestamp marking when the directorship declaration attestation was made. */ + @SerializedName("date") + Long 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; + + /** The IP address from which the directorship declaration attestation was made. */ + @SerializedName("ip") + String ip; + + /** + * The user agent of the browser from which the directorship declaration attestation was made. + */ + @SerializedName("user_agent") + String userAgent; + + private DirectorshipDeclaration( + Long date, Map extraParams, String ip, String userAgent) { + this.date = date; + this.extraParams = extraParams; + this.ip = ip; + this.userAgent = userAgent; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long date; + + private Map extraParams; + + private String ip; + + private String userAgent; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Company.DirectorshipDeclaration build() { + return new AccountCreateParams.Company.DirectorshipDeclaration( + this.date, this.extraParams, this.ip, this.userAgent); + } + + /** The Unix timestamp marking when the directorship declaration attestation was made. */ + public Builder setDate(Long 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 AccountCreateParams.Company.DirectorshipDeclaration#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Company.DirectorshipDeclaration#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 IP address from which the directorship declaration attestation was made. */ + public Builder setIp(String ip) { + this.ip = ip; + return this; + } + + /** + * The user agent of the browser from which the directorship declaration attestation was + * made. + */ + public Builder setUserAgent(String userAgent) { + this.userAgent = userAgent; + return this; + } + } + } + @Getter public static class OwnershipDeclaration { /** The Unix timestamp marking when the beneficial owner attestation was made. */ @@ -7465,6 +7704,21 @@ public Builder setFront(String front) { } } + public enum OwnershipExemptionReason implements ApiRequestParams.EnumParam { + @SerializedName("qualified_entity_exceeds_ownership_threshold") + QUALIFIED_ENTITY_EXCEEDS_OWNERSHIP_THRESHOLD("qualified_entity_exceeds_ownership_threshold"), + + @SerializedName("qualifies_as_financial_institution") + QUALIFIES_AS_FINANCIAL_INSTITUTION("qualifies_as_financial_institution"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + OwnershipExemptionReason(String value) { + this.value = value; + } + } + public enum Structure implements ApiRequestParams.EnumParam { @SerializedName("free_zone_establishment") FREE_ZONE_ESTABLISHMENT("free_zone_establishment"), @@ -8026,6 +8280,10 @@ public static class Documents { @SerializedName("proof_of_registration") ProofOfRegistration proofOfRegistration; + /** One or more documents that demonstrate proof of ultimate beneficial ownership. */ + @SerializedName("proof_of_ultimate_beneficial_ownership") + ProofOfUltimateBeneficialOwnership proofOfUltimateBeneficialOwnership; + private Documents( BankAccountOwnershipVerification bankAccountOwnershipVerification, CompanyLicense companyLicense, @@ -8034,7 +8292,8 @@ private Documents( CompanyRegistrationVerification companyRegistrationVerification, CompanyTaxIdVerification companyTaxIdVerification, Map extraParams, - ProofOfRegistration proofOfRegistration) { + ProofOfRegistration proofOfRegistration, + ProofOfUltimateBeneficialOwnership proofOfUltimateBeneficialOwnership) { this.bankAccountOwnershipVerification = bankAccountOwnershipVerification; this.companyLicense = companyLicense; this.companyMemorandumOfAssociation = companyMemorandumOfAssociation; @@ -8043,6 +8302,7 @@ private Documents( this.companyTaxIdVerification = companyTaxIdVerification; this.extraParams = extraParams; this.proofOfRegistration = proofOfRegistration; + this.proofOfUltimateBeneficialOwnership = proofOfUltimateBeneficialOwnership; } public static Builder builder() { @@ -8066,6 +8326,8 @@ public static class Builder { private ProofOfRegistration proofOfRegistration; + private ProofOfUltimateBeneficialOwnership proofOfUltimateBeneficialOwnership; + /** Finalize and obtain parameter instance from this builder. */ public AccountCreateParams.Documents build() { return new AccountCreateParams.Documents( @@ -8076,7 +8338,8 @@ public AccountCreateParams.Documents build() { this.companyRegistrationVerification, this.companyTaxIdVerification, this.extraParams, - this.proofOfRegistration); + this.proofOfRegistration, + this.proofOfUltimateBeneficialOwnership); } /** @@ -8171,6 +8434,14 @@ public Builder setProofOfRegistration( this.proofOfRegistration = proofOfRegistration; return this; } + + /** One or more documents that demonstrate proof of ultimate beneficial ownership. */ + public Builder setProofOfUltimateBeneficialOwnership( + AccountCreateParams.Documents.ProofOfUltimateBeneficialOwnership + proofOfUltimateBeneficialOwnership) { + this.proofOfUltimateBeneficialOwnership = proofOfUltimateBeneficialOwnership; + return this; + } } @Getter @@ -8851,6 +9122,106 @@ public Builder addAllFile(List elements) { } } } + + @Getter + public static class ProofOfUltimateBeneficialOwnership { + /** + * 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 ProofOfUltimateBeneficialOwnership( + 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.ProofOfUltimateBeneficialOwnership build() { + return new AccountCreateParams.Documents.ProofOfUltimateBeneficialOwnership( + 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.ProofOfUltimateBeneficialOwnership#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.ProofOfUltimateBeneficialOwnership#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.ProofOfUltimateBeneficialOwnership#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.ProofOfUltimateBeneficialOwnership#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 diff --git a/src/main/java/com/stripe/param/AccountSessionCreateParams.java b/src/main/java/com/stripe/param/AccountSessionCreateParams.java index f6c4b13d9ab..72655f28adf 100644 --- a/src/main/java/com/stripe/param/AccountSessionCreateParams.java +++ b/src/main/java/com/stripe/param/AccountSessionCreateParams.java @@ -159,6 +159,22 @@ public static class Components { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Configuration for the financial account embedded component. */ + @SerializedName("financial_account") + FinancialAccount financialAccount; + + /** Configuration for the financial account transactions embedded component. */ + @SerializedName("financial_account_transactions") + FinancialAccountTransactions financialAccountTransactions; + + /** Configuration for the issuing card embedded component. */ + @SerializedName("issuing_card") + IssuingCard issuingCard; + + /** Configuration for the issuing cards list embedded component. */ + @SerializedName("issuing_cards_list") + IssuingCardsList issuingCardsList; + /** Configuration for the notification banner embedded component. */ @SerializedName("notification_banner") NotificationBanner notificationBanner; @@ -193,6 +209,10 @@ private Components( Balances balances, Documents documents, Map extraParams, + FinancialAccount financialAccount, + FinancialAccountTransactions financialAccountTransactions, + IssuingCard issuingCard, + IssuingCardsList issuingCardsList, NotificationBanner notificationBanner, PaymentDetails paymentDetails, Payments payments, @@ -205,6 +225,10 @@ private Components( this.balances = balances; this.documents = documents; this.extraParams = extraParams; + this.financialAccount = financialAccount; + this.financialAccountTransactions = financialAccountTransactions; + this.issuingCard = issuingCard; + this.issuingCardsList = issuingCardsList; this.notificationBanner = notificationBanner; this.paymentDetails = paymentDetails; this.payments = payments; @@ -229,6 +253,14 @@ public static class Builder { private Map extraParams; + private FinancialAccount financialAccount; + + private FinancialAccountTransactions financialAccountTransactions; + + private IssuingCard issuingCard; + + private IssuingCardsList issuingCardsList; + private NotificationBanner notificationBanner; private PaymentDetails paymentDetails; @@ -251,6 +283,10 @@ public AccountSessionCreateParams.Components build() { this.balances, this.documents, this.extraParams, + this.financialAccount, + this.financialAccountTransactions, + this.issuingCard, + this.issuingCardsList, this.notificationBanner, this.paymentDetails, this.payments, @@ -312,6 +348,34 @@ public Builder putAllExtraParam(Map map) { return this; } + /** 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. */ + public Builder setFinancialAccountTransactions( + AccountSessionCreateParams.Components.FinancialAccountTransactions + financialAccountTransactions) { + this.financialAccountTransactions = financialAccountTransactions; + return this; + } + + /** 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. */ + public Builder setIssuingCardsList( + AccountSessionCreateParams.Components.IssuingCardsList issuingCardsList) { + this.issuingCardsList = issuingCardsList; + return this; + } + /** Configuration for the notification banner embedded component. */ public Builder setNotificationBanner( AccountSessionCreateParams.Components.NotificationBanner notificationBanner) { @@ -1173,6 +1237,828 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + public static class FinancialAccount { + /** Required. Whether the embedded component is enabled. */ + @SerializedName("enabled") + Boolean enabled; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The list of features enabled in the embedded component. */ + @SerializedName("features") + Features features; + + private FinancialAccount( + Boolean enabled, Map extraParams, Features features) { + this.enabled = enabled; + this.extraParams = extraParams; + this.features = features; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean enabled; + + private Map extraParams; + + private Features features; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountSessionCreateParams.Components.FinancialAccount build() { + return new AccountSessionCreateParams.Components.FinancialAccount( + this.enabled, this.extraParams, this.features); + } + + /** Required. Whether the embedded component is enabled. */ + public Builder setEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountSessionCreateParams.Components.FinancialAccount#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 AccountSessionCreateParams.Components.FinancialAccount#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 list of features enabled in the embedded component. */ + public Builder setFeatures( + AccountSessionCreateParams.Components.FinancialAccount.Features features) { + this.features = features; + return this; + } + } + + @Getter + 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. + */ + @SerializedName("disable_stripe_user_authentication") + Boolean disableStripeUserAuthentication; + + /** Whether to allow external accounts to be linked for money transfer. */ + @SerializedName("external_account_collection") + Boolean externalAccountCollection; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Whether to allow sending money. */ + @SerializedName("send_money") + Boolean sendMoney; + + /** Whether to allow transferring balance. */ + @SerializedName("transfer_balance") + Boolean transferBalance; + + private Features( + Boolean disableStripeUserAuthentication, + Boolean externalAccountCollection, + Map extraParams, + Boolean sendMoney, + Boolean transferBalance) { + this.disableStripeUserAuthentication = disableStripeUserAuthentication; + this.externalAccountCollection = externalAccountCollection; + this.extraParams = extraParams; + this.sendMoney = sendMoney; + this.transferBalance = transferBalance; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean disableStripeUserAuthentication; + + private Boolean externalAccountCollection; + + private Map extraParams; + + private Boolean sendMoney; + + private Boolean transferBalance; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountSessionCreateParams.Components.FinancialAccount.Features build() { + return new AccountSessionCreateParams.Components.FinancialAccount.Features( + this.disableStripeUserAuthentication, + this.externalAccountCollection, + this.extraParams, + this.sendMoney, + this.transferBalance); + } + + /** + * 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. + */ + public Builder setDisableStripeUserAuthentication( + Boolean disableStripeUserAuthentication) { + this.disableStripeUserAuthentication = disableStripeUserAuthentication; + return this; + } + + /** Whether to allow external accounts to be linked for money transfer. */ + public Builder setExternalAccountCollection(Boolean externalAccountCollection) { + this.externalAccountCollection = externalAccountCollection; + 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 + * AccountSessionCreateParams.Components.FinancialAccount.Features#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 + * AccountSessionCreateParams.Components.FinancialAccount.Features#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Whether to allow sending money. */ + public Builder setSendMoney(Boolean sendMoney) { + this.sendMoney = sendMoney; + return this; + } + + /** Whether to allow transferring balance. */ + public Builder setTransferBalance(Boolean transferBalance) { + this.transferBalance = transferBalance; + return this; + } + } + } + } + + @Getter + public static class FinancialAccountTransactions { + /** Required. Whether the embedded component is enabled. */ + @SerializedName("enabled") + Boolean enabled; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The list of features enabled in the embedded component. */ + @SerializedName("features") + Features features; + + private FinancialAccountTransactions( + Boolean enabled, Map extraParams, Features features) { + this.enabled = enabled; + this.extraParams = extraParams; + this.features = features; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean enabled; + + private Map extraParams; + + private Features features; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountSessionCreateParams.Components.FinancialAccountTransactions build() { + return new AccountSessionCreateParams.Components.FinancialAccountTransactions( + this.enabled, this.extraParams, this.features); + } + + /** Required. Whether the embedded component is enabled. */ + public Builder setEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountSessionCreateParams.Components.FinancialAccountTransactions#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 + * AccountSessionCreateParams.Components.FinancialAccountTransactions#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 list of features enabled in the embedded component. */ + public Builder setFeatures( + AccountSessionCreateParams.Components.FinancialAccountTransactions.Features features) { + this.features = features; + return this; + } + } + + @Getter + public static class Features { + /** Whether to allow card spend dispute management features. */ + @SerializedName("card_spend_dispute_management") + Boolean cardSpendDisputeManagement; + + /** + * 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 Features(Boolean cardSpendDisputeManagement, Map extraParams) { + this.cardSpendDisputeManagement = cardSpendDisputeManagement; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean cardSpendDisputeManagement; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountSessionCreateParams.Components.FinancialAccountTransactions.Features + build() { + return new AccountSessionCreateParams.Components.FinancialAccountTransactions.Features( + this.cardSpendDisputeManagement, this.extraParams); + } + + /** Whether to allow card spend dispute management features. */ + public Builder setCardSpendDisputeManagement(Boolean cardSpendDisputeManagement) { + this.cardSpendDisputeManagement = cardSpendDisputeManagement; + 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 + * AccountSessionCreateParams.Components.FinancialAccountTransactions.Features#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 + * AccountSessionCreateParams.Components.FinancialAccountTransactions.Features#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 + public static class IssuingCard { + /** Required. Whether the embedded component is enabled. */ + @SerializedName("enabled") + Boolean enabled; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The list of features enabled in the embedded component. */ + @SerializedName("features") + Features features; + + private IssuingCard(Boolean enabled, Map extraParams, Features features) { + this.enabled = enabled; + this.extraParams = extraParams; + this.features = features; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean enabled; + + private Map extraParams; + + private Features features; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountSessionCreateParams.Components.IssuingCard build() { + return new AccountSessionCreateParams.Components.IssuingCard( + this.enabled, this.extraParams, this.features); + } + + /** Required. Whether the embedded component is enabled. */ + public Builder setEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountSessionCreateParams.Components.IssuingCard#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 AccountSessionCreateParams.Components.IssuingCard#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 list of features enabled in the embedded component. */ + public Builder setFeatures( + AccountSessionCreateParams.Components.IssuingCard.Features features) { + this.features = features; + return this; + } + } + + @Getter + public static class Features { + /** Whether to allow card management features. */ + @SerializedName("card_management") + Boolean cardManagement; + + /** Whether to allow card spend dispute management features. */ + @SerializedName("card_spend_dispute_management") + Boolean cardSpendDisputeManagement; + + /** Whether to allow cardholder management features. */ + @SerializedName("cardholder_management") + Boolean cardholderManagement; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Whether to allow spend control management features. */ + @SerializedName("spend_control_management") + Boolean spendControlManagement; + + private Features( + Boolean cardManagement, + Boolean cardSpendDisputeManagement, + Boolean cardholderManagement, + Map extraParams, + Boolean spendControlManagement) { + this.cardManagement = cardManagement; + this.cardSpendDisputeManagement = cardSpendDisputeManagement; + this.cardholderManagement = cardholderManagement; + this.extraParams = extraParams; + this.spendControlManagement = spendControlManagement; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean cardManagement; + + private Boolean cardSpendDisputeManagement; + + private Boolean cardholderManagement; + + private Map extraParams; + + private Boolean spendControlManagement; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountSessionCreateParams.Components.IssuingCard.Features build() { + return new AccountSessionCreateParams.Components.IssuingCard.Features( + this.cardManagement, + this.cardSpendDisputeManagement, + this.cardholderManagement, + this.extraParams, + this.spendControlManagement); + } + + /** Whether to allow card management features. */ + public Builder setCardManagement(Boolean cardManagement) { + this.cardManagement = cardManagement; + return this; + } + + /** Whether to allow card spend dispute management features. */ + public Builder setCardSpendDisputeManagement(Boolean cardSpendDisputeManagement) { + this.cardSpendDisputeManagement = cardSpendDisputeManagement; + return this; + } + + /** Whether to allow cardholder management features. */ + public Builder setCardholderManagement(Boolean cardholderManagement) { + this.cardholderManagement = cardholderManagement; + 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 AccountSessionCreateParams.Components.IssuingCard.Features#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 AccountSessionCreateParams.Components.IssuingCard.Features#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Whether to allow spend control management features. */ + public Builder setSpendControlManagement(Boolean spendControlManagement) { + this.spendControlManagement = spendControlManagement; + return this; + } + } + } + } + + @Getter + public static class IssuingCardsList { + /** Required. Whether the embedded component is enabled. */ + @SerializedName("enabled") + Boolean enabled; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The list of features enabled in the embedded component. */ + @SerializedName("features") + Features features; + + private IssuingCardsList( + Boolean enabled, Map extraParams, Features features) { + this.enabled = enabled; + this.extraParams = extraParams; + this.features = features; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean enabled; + + private Map extraParams; + + private Features features; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountSessionCreateParams.Components.IssuingCardsList build() { + return new AccountSessionCreateParams.Components.IssuingCardsList( + this.enabled, this.extraParams, this.features); + } + + /** Required. Whether the embedded component is enabled. */ + public Builder setEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountSessionCreateParams.Components.IssuingCardsList#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 AccountSessionCreateParams.Components.IssuingCardsList#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 list of features enabled in the embedded component. */ + public Builder setFeatures( + AccountSessionCreateParams.Components.IssuingCardsList.Features features) { + this.features = features; + return this; + } + } + + @Getter + public static class Features { + /** Whether to allow card management features. */ + @SerializedName("card_management") + Boolean cardManagement; + + /** Whether to allow card spend dispute management features. */ + @SerializedName("card_spend_dispute_management") + Boolean cardSpendDisputeManagement; + + /** Whether to allow cardholder management features. */ + @SerializedName("cardholder_management") + 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. + */ + @SerializedName("disable_stripe_user_authentication") + Boolean disableStripeUserAuthentication; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Whether to allow spend control management features. */ + @SerializedName("spend_control_management") + Boolean spendControlManagement; + + private Features( + Boolean cardManagement, + Boolean cardSpendDisputeManagement, + Boolean cardholderManagement, + Boolean disableStripeUserAuthentication, + Map extraParams, + Boolean spendControlManagement) { + this.cardManagement = cardManagement; + this.cardSpendDisputeManagement = cardSpendDisputeManagement; + this.cardholderManagement = cardholderManagement; + this.disableStripeUserAuthentication = disableStripeUserAuthentication; + this.extraParams = extraParams; + this.spendControlManagement = spendControlManagement; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean cardManagement; + + private Boolean cardSpendDisputeManagement; + + private Boolean cardholderManagement; + + private Boolean disableStripeUserAuthentication; + + private Map extraParams; + + private Boolean spendControlManagement; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountSessionCreateParams.Components.IssuingCardsList.Features build() { + return new AccountSessionCreateParams.Components.IssuingCardsList.Features( + this.cardManagement, + this.cardSpendDisputeManagement, + this.cardholderManagement, + this.disableStripeUserAuthentication, + this.extraParams, + this.spendControlManagement); + } + + /** Whether to allow card management features. */ + public Builder setCardManagement(Boolean cardManagement) { + this.cardManagement = cardManagement; + return this; + } + + /** Whether to allow card spend dispute management features. */ + public Builder setCardSpendDisputeManagement(Boolean cardSpendDisputeManagement) { + this.cardSpendDisputeManagement = cardSpendDisputeManagement; + return this; + } + + /** Whether to allow cardholder management features. */ + public Builder setCardholderManagement(Boolean cardholderManagement) { + this.cardholderManagement = cardholderManagement; + return this; + } + + /** + * 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. + */ + public Builder setDisableStripeUserAuthentication( + Boolean disableStripeUserAuthentication) { + this.disableStripeUserAuthentication = disableStripeUserAuthentication; + 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 + * AccountSessionCreateParams.Components.IssuingCardsList.Features#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 + * AccountSessionCreateParams.Components.IssuingCardsList.Features#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Whether to allow spend control management features. */ + public Builder setSpendControlManagement(Boolean spendControlManagement) { + this.spendControlManagement = spendControlManagement; + return this; + } + } + } + } + @Getter public static class NotificationBanner { /** Required. Whether the embedded component is enabled. */ diff --git a/src/main/java/com/stripe/param/AccountUpdateParams.java b/src/main/java/com/stripe/param/AccountUpdateParams.java index 699141df817..cb1037f6e91 100644 --- a/src/main/java/com/stripe/param/AccountUpdateParams.java +++ b/src/main/java/com/stripe/param/AccountUpdateParams.java @@ -1453,6 +1453,10 @@ public static class Capabilities { @SerializedName("p24_payments") P24Payments p24Payments; + /** The pay_by_bank_payments capability. */ + @SerializedName("pay_by_bank_payments") + PayByBankPayments payByBankPayments; + /** The payco_payments capability. */ @SerializedName("payco_payments") PaycoPayments paycoPayments; @@ -1559,6 +1563,7 @@ private Capabilities( NaverPayPayments naverPayPayments, OxxoPayments oxxoPayments, P24Payments p24Payments, + PayByBankPayments payByBankPayments, PaycoPayments paycoPayments, PaynowPayments paynowPayments, PromptpayPayments promptpayPayments, @@ -1613,6 +1618,7 @@ private Capabilities( this.naverPayPayments = naverPayPayments; this.oxxoPayments = oxxoPayments; this.p24Payments = p24Payments; + this.payByBankPayments = payByBankPayments; this.paycoPayments = paycoPayments; this.paynowPayments = paynowPayments; this.promptpayPayments = promptpayPayments; @@ -1711,6 +1717,8 @@ public static class Builder { private P24Payments p24Payments; + private PayByBankPayments payByBankPayments; + private PaycoPayments paycoPayments; private PaynowPayments paynowPayments; @@ -1785,6 +1793,7 @@ public AccountUpdateParams.Capabilities build() { this.naverPayPayments, this.oxxoPayments, this.p24Payments, + this.payByBankPayments, this.paycoPayments, this.paynowPayments, this.promptpayPayments, @@ -2072,6 +2081,13 @@ public Builder setP24Payments(AccountUpdateParams.Capabilities.P24Payments p24Pa return this; } + /** The pay_by_bank_payments capability. */ + public Builder setPayByBankPayments( + AccountUpdateParams.Capabilities.PayByBankPayments payByBankPayments) { + this.payByBankPayments = payByBankPayments; + return this; + } + /** The payco_payments capability. */ public Builder setPaycoPayments( AccountUpdateParams.Capabilities.PaycoPayments paycoPayments) { @@ -5028,6 +5044,85 @@ public Builder setRequested(Boolean requested) { } } + @Getter + public static class PayByBankPayments { + /** + * 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 PayByBankPayments(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.PayByBankPayments build() { + return new AccountUpdateParams.Capabilities.PayByBankPayments( + 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.PayByBankPayments#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.PayByBankPayments#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 public static class PaycoPayments { /** @@ -6393,6 +6488,13 @@ public static class Company { @SerializedName("directors_provided") Boolean directorsProvided; + /** + * This hash is used to attest that the directors information provided to Stripe is both current + * and correct. + */ + @SerializedName("directorship_declaration") + DirectorshipDeclaration directorshipDeclaration; + /** * Whether the company's executives have been provided. Set this Boolean to {@code true} after * creating all the company's executives with the @@ -6448,6 +6550,9 @@ public static class Company { @SerializedName("ownership_declaration") OwnershipDeclaration ownershipDeclaration; + @SerializedName("ownership_exemption_reason") + ApiRequestParams.EnumParam ownershipExemptionReason; + /** The company's phone number (used for verification). */ @SerializedName("phone") Object phone; @@ -6496,6 +6601,7 @@ private Company( AddressKana addressKana, AddressKanji addressKanji, Boolean directorsProvided, + DirectorshipDeclaration directorshipDeclaration, Boolean executivesProvided, Object exportLicenseId, Object exportPurposeCode, @@ -6505,6 +6611,7 @@ private Company( Object nameKanji, Boolean ownersProvided, OwnershipDeclaration ownershipDeclaration, + ApiRequestParams.EnumParam ownershipExemptionReason, Object phone, Object registrationNumber, ApiRequestParams.EnumParam structure, @@ -6516,6 +6623,7 @@ private Company( this.addressKana = addressKana; this.addressKanji = addressKanji; this.directorsProvided = directorsProvided; + this.directorshipDeclaration = directorshipDeclaration; this.executivesProvided = executivesProvided; this.exportLicenseId = exportLicenseId; this.exportPurposeCode = exportPurposeCode; @@ -6525,6 +6633,7 @@ private Company( this.nameKanji = nameKanji; this.ownersProvided = ownersProvided; this.ownershipDeclaration = ownershipDeclaration; + this.ownershipExemptionReason = ownershipExemptionReason; this.phone = phone; this.registrationNumber = registrationNumber; this.structure = structure; @@ -6547,6 +6656,8 @@ public static class Builder { private Boolean directorsProvided; + private DirectorshipDeclaration directorshipDeclaration; + private Boolean executivesProvided; private Object exportLicenseId; @@ -6565,6 +6676,8 @@ public static class Builder { private OwnershipDeclaration ownershipDeclaration; + private ApiRequestParams.EnumParam ownershipExemptionReason; + private Object phone; private Object registrationNumber; @@ -6586,6 +6699,7 @@ public AccountUpdateParams.Company build() { this.addressKana, this.addressKanji, this.directorsProvided, + this.directorshipDeclaration, this.executivesProvided, this.exportLicenseId, this.exportPurposeCode, @@ -6595,6 +6709,7 @@ public AccountUpdateParams.Company build() { this.nameKanji, this.ownersProvided, this.ownershipDeclaration, + this.ownershipExemptionReason, this.phone, this.registrationNumber, this.structure, @@ -6634,6 +6749,16 @@ public Builder setDirectorsProvided(Boolean directorsProvided) { return this; } + /** + * This hash is used to attest that the directors information provided to Stripe is both + * current and correct. + */ + public Builder setDirectorshipDeclaration( + AccountUpdateParams.Company.DirectorshipDeclaration directorshipDeclaration) { + this.directorshipDeclaration = directorshipDeclaration; + return this; + } + /** * Whether the company's executives have been provided. Set this Boolean to {@code true} after * creating all the company's executives with the @@ -6756,6 +6881,17 @@ public Builder setOwnershipDeclaration( return this; } + public Builder setOwnershipExemptionReason( + AccountUpdateParams.Company.OwnershipExemptionReason ownershipExemptionReason) { + this.ownershipExemptionReason = ownershipExemptionReason; + return this; + } + + public Builder setOwnershipExemptionReason(EmptyParam ownershipExemptionReason) { + this.ownershipExemptionReason = ownershipExemptionReason; + return this; + } + /** The company's phone number (used for verification). */ public Builder setPhone(String phone) { this.phone = phone; @@ -7489,6 +7625,124 @@ public Builder setTown(EmptyParam town) { } } + @Getter + public static class DirectorshipDeclaration { + /** The Unix timestamp marking when the directorship declaration attestation was made. */ + @SerializedName("date") + Long 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; + + /** The IP address from which the directorship declaration attestation was made. */ + @SerializedName("ip") + Object ip; + + /** + * The user agent of the browser from which the directorship declaration attestation was made. + */ + @SerializedName("user_agent") + Object userAgent; + + private DirectorshipDeclaration( + Long date, Map extraParams, Object ip, Object userAgent) { + this.date = date; + this.extraParams = extraParams; + this.ip = ip; + this.userAgent = userAgent; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long date; + + private Map extraParams; + + private Object ip; + + private Object userAgent; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Company.DirectorshipDeclaration build() { + return new AccountUpdateParams.Company.DirectorshipDeclaration( + this.date, this.extraParams, this.ip, this.userAgent); + } + + /** The Unix timestamp marking when the directorship declaration attestation was made. */ + public Builder setDate(Long 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 AccountUpdateParams.Company.DirectorshipDeclaration#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Company.DirectorshipDeclaration#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 IP address from which the directorship declaration attestation was made. */ + public Builder setIp(String ip) { + this.ip = ip; + return this; + } + + /** The IP address from which the directorship declaration attestation was made. */ + public Builder setIp(EmptyParam ip) { + this.ip = ip; + return this; + } + + /** + * The user agent of the browser from which the directorship declaration attestation was + * made. + */ + public Builder setUserAgent(String userAgent) { + this.userAgent = userAgent; + return this; + } + + /** + * The user agent of the browser from which the directorship declaration attestation was + * made. + */ + public Builder setUserAgent(EmptyParam userAgent) { + this.userAgent = userAgent; + return this; + } + } + } + @Getter public static class OwnershipDeclaration { /** The Unix timestamp marking when the beneficial owner attestation was made. */ @@ -7802,6 +8056,21 @@ public Builder setFront(EmptyParam front) { } } + public enum OwnershipExemptionReason implements ApiRequestParams.EnumParam { + @SerializedName("qualified_entity_exceeds_ownership_threshold") + QUALIFIED_ENTITY_EXCEEDS_OWNERSHIP_THRESHOLD("qualified_entity_exceeds_ownership_threshold"), + + @SerializedName("qualifies_as_financial_institution") + QUALIFIES_AS_FINANCIAL_INSTITUTION("qualifies_as_financial_institution"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + OwnershipExemptionReason(String value) { + this.value = value; + } + } + public enum Structure implements ApiRequestParams.EnumParam { @SerializedName("free_zone_establishment") FREE_ZONE_ESTABLISHMENT("free_zone_establishment"), @@ -7935,6 +8204,10 @@ public static class Documents { @SerializedName("proof_of_registration") ProofOfRegistration proofOfRegistration; + /** One or more documents that demonstrate proof of ultimate beneficial ownership. */ + @SerializedName("proof_of_ultimate_beneficial_ownership") + ProofOfUltimateBeneficialOwnership proofOfUltimateBeneficialOwnership; + private Documents( BankAccountOwnershipVerification bankAccountOwnershipVerification, CompanyLicense companyLicense, @@ -7943,7 +8216,8 @@ private Documents( CompanyRegistrationVerification companyRegistrationVerification, CompanyTaxIdVerification companyTaxIdVerification, Map extraParams, - ProofOfRegistration proofOfRegistration) { + ProofOfRegistration proofOfRegistration, + ProofOfUltimateBeneficialOwnership proofOfUltimateBeneficialOwnership) { this.bankAccountOwnershipVerification = bankAccountOwnershipVerification; this.companyLicense = companyLicense; this.companyMemorandumOfAssociation = companyMemorandumOfAssociation; @@ -7952,6 +8226,7 @@ private Documents( this.companyTaxIdVerification = companyTaxIdVerification; this.extraParams = extraParams; this.proofOfRegistration = proofOfRegistration; + this.proofOfUltimateBeneficialOwnership = proofOfUltimateBeneficialOwnership; } public static Builder builder() { @@ -7975,6 +8250,8 @@ public static class Builder { private ProofOfRegistration proofOfRegistration; + private ProofOfUltimateBeneficialOwnership proofOfUltimateBeneficialOwnership; + /** Finalize and obtain parameter instance from this builder. */ public AccountUpdateParams.Documents build() { return new AccountUpdateParams.Documents( @@ -7985,7 +8262,8 @@ public AccountUpdateParams.Documents build() { this.companyRegistrationVerification, this.companyTaxIdVerification, this.extraParams, - this.proofOfRegistration); + this.proofOfRegistration, + this.proofOfUltimateBeneficialOwnership); } /** @@ -8080,6 +8358,14 @@ public Builder setProofOfRegistration( this.proofOfRegistration = proofOfRegistration; return this; } + + /** One or more documents that demonstrate proof of ultimate beneficial ownership. */ + public Builder setProofOfUltimateBeneficialOwnership( + AccountUpdateParams.Documents.ProofOfUltimateBeneficialOwnership + proofOfUltimateBeneficialOwnership) { + this.proofOfUltimateBeneficialOwnership = proofOfUltimateBeneficialOwnership; + return this; + } } @Getter @@ -8760,6 +9046,106 @@ public Builder addAllFile(List elements) { } } } + + @Getter + public static class ProofOfUltimateBeneficialOwnership { + /** + * 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 ProofOfUltimateBeneficialOwnership( + 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.ProofOfUltimateBeneficialOwnership build() { + return new AccountUpdateParams.Documents.ProofOfUltimateBeneficialOwnership( + 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.ProofOfUltimateBeneficialOwnership#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.ProofOfUltimateBeneficialOwnership#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.ProofOfUltimateBeneficialOwnership#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.ProofOfUltimateBeneficialOwnership#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 diff --git a/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java b/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java index dde4c320cfc..ddf01208fa4 100644 --- a/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java +++ b/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java @@ -431,6 +431,13 @@ public static class PaymentMethodData { @SerializedName("p24") P24 p24; + /** + * If this is a {@code pay_by_bank} PaymentMethod, this hash contains details about the + * PayByBank payment method. + */ + @SerializedName("pay_by_bank") + PayByBank payByBank; + /** * If this is a {@code payco} PaymentMethod, this hash contains details about the PAYCO payment * method. @@ -577,6 +584,7 @@ private PaymentMethodData( NaverPay naverPay, Oxxo oxxo, P24 p24, + PayByBank payByBank, Payco payco, Paynow paynow, Paypal paypal, @@ -626,6 +634,7 @@ private PaymentMethodData( this.naverPay = naverPay; this.oxxo = oxxo; this.p24 = p24; + this.payByBank = payByBank; this.payco = payco; this.paynow = paynow; this.paypal = paypal; @@ -715,6 +724,8 @@ public static class Builder { private P24 p24; + private PayByBank payByBank; + private Payco payco; private Paynow paynow; @@ -783,6 +794,7 @@ public ConfirmationTokenCreateParams.PaymentMethodData build() { this.naverPay, this.oxxo, this.p24, + this.payByBank, this.payco, this.paynow, this.paypal, @@ -1149,6 +1161,16 @@ public Builder setP24(ConfirmationTokenCreateParams.PaymentMethodData.P24 p24) { return this; } + /** + * If this is a {@code pay_by_bank} PaymentMethod, this hash contains details about the + * PayByBank payment method. + */ + public Builder setPayByBank( + ConfirmationTokenCreateParams.PaymentMethodData.PayByBank payByBank) { + this.payByBank = payByBank; + return this; + } + /** * If this is a {@code payco} PaymentMethod, this hash contains details about the PAYCO * payment method. @@ -3934,6 +3956,63 @@ public enum Bank implements ApiRequestParams.EnumParam { } } + @Getter + public static class PayByBank { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private PayByBank(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public ConfirmationTokenCreateParams.PaymentMethodData.PayByBank build() { + return new ConfirmationTokenCreateParams.PaymentMethodData.PayByBank(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link ConfirmationTokenCreateParams.PaymentMethodData.PayByBank#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link ConfirmationTokenCreateParams.PaymentMethodData.PayByBank#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + @Getter public static class Payco { /** @@ -5088,6 +5167,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("p24") P24("p24"), + @SerializedName("pay_by_bank") + PAY_BY_BANK("pay_by_bank"), + @SerializedName("payco") PAYCO("payco"), diff --git a/src/main/java/com/stripe/param/CustomerListPaymentMethodsParams.java b/src/main/java/com/stripe/param/CustomerListPaymentMethodsParams.java index b7804ffe10e..d21006da69c 100644 --- a/src/main/java/com/stripe/param/CustomerListPaymentMethodsParams.java +++ b/src/main/java/com/stripe/param/CustomerListPaymentMethodsParams.java @@ -327,6 +327,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("p24") P24("p24"), + @SerializedName("pay_by_bank") + PAY_BY_BANK("pay_by_bank"), + @SerializedName("payco") PAYCO("payco"), diff --git a/src/main/java/com/stripe/param/CustomerPaymentMethodListParams.java b/src/main/java/com/stripe/param/CustomerPaymentMethodListParams.java index 9a34bd926fd..f2f4f392a01 100644 --- a/src/main/java/com/stripe/param/CustomerPaymentMethodListParams.java +++ b/src/main/java/com/stripe/param/CustomerPaymentMethodListParams.java @@ -327,6 +327,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("p24") P24("p24"), + @SerializedName("pay_by_bank") + PAY_BY_BANK("pay_by_bank"), + @SerializedName("payco") PAYCO("payco"), diff --git a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java index 7111a2a1cbc..d0f510d2cdc 100644 --- a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java @@ -1157,6 +1157,13 @@ public static class PaymentMethodData { @SerializedName("p24") P24 p24; + /** + * If this is a {@code pay_by_bank} PaymentMethod, this hash contains details about the + * PayByBank payment method. + */ + @SerializedName("pay_by_bank") + PayByBank payByBank; + /** * If this is a {@code payco} PaymentMethod, this hash contains details about the PAYCO payment * method. @@ -1303,6 +1310,7 @@ private PaymentMethodData( NaverPay naverPay, Oxxo oxxo, P24 p24, + PayByBank payByBank, Payco payco, Paynow paynow, Paypal paypal, @@ -1352,6 +1360,7 @@ private PaymentMethodData( this.naverPay = naverPay; this.oxxo = oxxo; this.p24 = p24; + this.payByBank = payByBank; this.payco = payco; this.paynow = paynow; this.paypal = paypal; @@ -1441,6 +1450,8 @@ public static class Builder { private P24 p24; + private PayByBank payByBank; + private Payco payco; private Paynow paynow; @@ -1509,6 +1520,7 @@ public PaymentIntentConfirmParams.PaymentMethodData build() { this.naverPay, this.oxxo, this.p24, + this.payByBank, this.payco, this.paynow, this.paypal, @@ -1873,6 +1885,16 @@ public Builder setP24(PaymentIntentConfirmParams.PaymentMethodData.P24 p24) { return this; } + /** + * If this is a {@code pay_by_bank} PaymentMethod, this hash contains details about the + * PayByBank payment method. + */ + public Builder setPayByBank( + PaymentIntentConfirmParams.PaymentMethodData.PayByBank payByBank) { + this.payByBank = payByBank; + return this; + } + /** * If this is a {@code payco} PaymentMethod, this hash contains details about the PAYCO * payment method. @@ -4647,6 +4669,63 @@ public enum Bank implements ApiRequestParams.EnumParam { } } + @Getter + public static class PayByBank { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private PayByBank(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodData.PayByBank build() { + return new PaymentIntentConfirmParams.PaymentMethodData.PayByBank(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.PayByBank#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.PayByBank#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + @Getter public static class Payco { /** @@ -5799,6 +5878,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("p24") P24("p24"), + @SerializedName("pay_by_bank") + PAY_BY_BANK("pay_by_bank"), + @SerializedName("payco") PAYCO("payco"), @@ -6075,6 +6157,13 @@ public static class PaymentMethodOptions { @SerializedName("p24") Object p24; + /** + * If this is a {@code pay_by_bank} PaymentMethod, this sub-hash contains details about the + * PayByBank payment method options. + */ + @SerializedName("pay_by_bank") + Object payByBank; + /** * If this is a {@code payco} PaymentMethod, this sub-hash contains details about the PAYCO * payment method options. @@ -6206,6 +6295,7 @@ private PaymentMethodOptions( Object naverPay, Object oxxo, Object p24, + Object payByBank, Object payco, Object paynow, Object paypal, @@ -6252,6 +6342,7 @@ private PaymentMethodOptions( this.naverPay = naverPay; this.oxxo = oxxo; this.p24 = p24; + this.payByBank = payByBank; this.payco = payco; this.paynow = paynow; this.paypal = paypal; @@ -6337,6 +6428,8 @@ public static class Builder { private Object p24; + private Object payByBank; + private Object payco; private Object paynow; @@ -6400,6 +6493,7 @@ public PaymentIntentConfirmParams.PaymentMethodOptions build() { this.naverPay, this.oxxo, this.p24, + this.payByBank, this.payco, this.paynow, this.paypal, @@ -7008,6 +7102,25 @@ public Builder setP24(EmptyParam p24) { return this; } + /** + * If this is a {@code pay_by_bank} PaymentMethod, this sub-hash contains details about the + * PayByBank payment method options. + */ + public Builder setPayByBank( + PaymentIntentConfirmParams.PaymentMethodOptions.PayByBank payByBank) { + this.payByBank = payByBank; + return this; + } + + /** + * If this is a {@code pay_by_bank} PaymentMethod, this sub-hash contains details about the + * PayByBank payment method options. + */ + public Builder setPayByBank(EmptyParam payByBank) { + this.payByBank = payByBank; + return this; + } + /** * If this is a {@code payco} PaymentMethod, this sub-hash contains details about the PAYCO * payment method options. @@ -15169,6 +15282,63 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { } } + @Getter + public static class PayByBank { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private PayByBank(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.PayByBank build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.PayByBank(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.PayByBank#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.PayByBank#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + @Getter public static class Payco { /** diff --git a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java index 8bc0b498523..ac7b1733d66 100644 --- a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java @@ -1683,6 +1683,13 @@ public static class PaymentMethodData { @SerializedName("p24") P24 p24; + /** + * If this is a {@code pay_by_bank} PaymentMethod, this hash contains details about the + * PayByBank payment method. + */ + @SerializedName("pay_by_bank") + PayByBank payByBank; + /** * If this is a {@code payco} PaymentMethod, this hash contains details about the PAYCO payment * method. @@ -1829,6 +1836,7 @@ private PaymentMethodData( NaverPay naverPay, Oxxo oxxo, P24 p24, + PayByBank payByBank, Payco payco, Paynow paynow, Paypal paypal, @@ -1878,6 +1886,7 @@ private PaymentMethodData( this.naverPay = naverPay; this.oxxo = oxxo; this.p24 = p24; + this.payByBank = payByBank; this.payco = payco; this.paynow = paynow; this.paypal = paypal; @@ -1967,6 +1976,8 @@ public static class Builder { private P24 p24; + private PayByBank payByBank; + private Payco payco; private Paynow paynow; @@ -2035,6 +2046,7 @@ public PaymentIntentCreateParams.PaymentMethodData build() { this.naverPay, this.oxxo, this.p24, + this.payByBank, this.payco, this.paynow, this.paypal, @@ -2395,6 +2407,15 @@ public Builder setP24(PaymentIntentCreateParams.PaymentMethodData.P24 p24) { return this; } + /** + * If this is a {@code pay_by_bank} PaymentMethod, this hash contains details about the + * PayByBank payment method. + */ + public Builder setPayByBank(PaymentIntentCreateParams.PaymentMethodData.PayByBank payByBank) { + this.payByBank = payByBank; + return this; + } + /** * If this is a {@code payco} PaymentMethod, this hash contains details about the PAYCO * payment method. @@ -5161,6 +5182,63 @@ public enum Bank implements ApiRequestParams.EnumParam { } } + @Getter + public static class PayByBank { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private PayByBank(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodData.PayByBank build() { + return new PaymentIntentCreateParams.PaymentMethodData.PayByBank(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.PayByBank#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.PayByBank#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + @Getter public static class Payco { /** @@ -6313,6 +6391,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("p24") P24("p24"), + @SerializedName("pay_by_bank") + PAY_BY_BANK("pay_by_bank"), + @SerializedName("payco") PAYCO("payco"), @@ -6589,6 +6670,13 @@ public static class PaymentMethodOptions { @SerializedName("p24") Object p24; + /** + * If this is a {@code pay_by_bank} PaymentMethod, this sub-hash contains details about the + * PayByBank payment method options. + */ + @SerializedName("pay_by_bank") + Object payByBank; + /** * If this is a {@code payco} PaymentMethod, this sub-hash contains details about the PAYCO * payment method options. @@ -6720,6 +6808,7 @@ private PaymentMethodOptions( Object naverPay, Object oxxo, Object p24, + Object payByBank, Object payco, Object paynow, Object paypal, @@ -6766,6 +6855,7 @@ private PaymentMethodOptions( this.naverPay = naverPay; this.oxxo = oxxo; this.p24 = p24; + this.payByBank = payByBank; this.payco = payco; this.paynow = paynow; this.paypal = paypal; @@ -6851,6 +6941,8 @@ public static class Builder { private Object p24; + private Object payByBank; + private Object payco; private Object paynow; @@ -6914,6 +7006,7 @@ public PaymentIntentCreateParams.PaymentMethodOptions build() { this.naverPay, this.oxxo, this.p24, + this.payByBank, this.payco, this.paynow, this.paypal, @@ -7520,6 +7613,25 @@ public Builder setP24(EmptyParam p24) { return this; } + /** + * If this is a {@code pay_by_bank} PaymentMethod, this sub-hash contains details about the + * PayByBank payment method options. + */ + public Builder setPayByBank( + PaymentIntentCreateParams.PaymentMethodOptions.PayByBank payByBank) { + this.payByBank = payByBank; + return this; + } + + /** + * If this is a {@code pay_by_bank} PaymentMethod, this sub-hash contains details about the + * PayByBank payment method options. + */ + public Builder setPayByBank(EmptyParam payByBank) { + this.payByBank = payByBank; + return this; + } + /** * If this is a {@code payco} PaymentMethod, this sub-hash contains details about the PAYCO * payment method options. @@ -15674,6 +15786,63 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { } } + @Getter + public static class PayByBank { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private PayByBank(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.PayByBank build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.PayByBank(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.PayByBank#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.PayByBank#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + @Getter public static class Payco { /** diff --git a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java index 5096403545f..53e143c2ac5 100644 --- a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java @@ -1034,6 +1034,13 @@ public static class PaymentMethodData { @SerializedName("p24") P24 p24; + /** + * If this is a {@code pay_by_bank} PaymentMethod, this hash contains details about the + * PayByBank payment method. + */ + @SerializedName("pay_by_bank") + PayByBank payByBank; + /** * If this is a {@code payco} PaymentMethod, this hash contains details about the PAYCO payment * method. @@ -1180,6 +1187,7 @@ private PaymentMethodData( NaverPay naverPay, Oxxo oxxo, P24 p24, + PayByBank payByBank, Payco payco, Paynow paynow, Paypal paypal, @@ -1229,6 +1237,7 @@ private PaymentMethodData( this.naverPay = naverPay; this.oxxo = oxxo; this.p24 = p24; + this.payByBank = payByBank; this.payco = payco; this.paynow = paynow; this.paypal = paypal; @@ -1318,6 +1327,8 @@ public static class Builder { private P24 p24; + private PayByBank payByBank; + private Payco payco; private Paynow paynow; @@ -1386,6 +1397,7 @@ public PaymentIntentUpdateParams.PaymentMethodData build() { this.naverPay, this.oxxo, this.p24, + this.payByBank, this.payco, this.paynow, this.paypal, @@ -1746,6 +1758,15 @@ public Builder setP24(PaymentIntentUpdateParams.PaymentMethodData.P24 p24) { return this; } + /** + * If this is a {@code pay_by_bank} PaymentMethod, this hash contains details about the + * PayByBank payment method. + */ + public Builder setPayByBank(PaymentIntentUpdateParams.PaymentMethodData.PayByBank payByBank) { + this.payByBank = payByBank; + return this; + } + /** * If this is a {@code payco} PaymentMethod, this hash contains details about the PAYCO * payment method. @@ -4602,6 +4623,63 @@ public enum Bank implements ApiRequestParams.EnumParam { } } + @Getter + public static class PayByBank { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private PayByBank(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodData.PayByBank build() { + return new PaymentIntentUpdateParams.PaymentMethodData.PayByBank(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.PayByBank#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.PayByBank#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + @Getter public static class Payco { /** @@ -5788,6 +5866,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("p24") P24("p24"), + @SerializedName("pay_by_bank") + PAY_BY_BANK("pay_by_bank"), + @SerializedName("payco") PAYCO("payco"), @@ -6064,6 +6145,13 @@ public static class PaymentMethodOptions { @SerializedName("p24") Object p24; + /** + * If this is a {@code pay_by_bank} PaymentMethod, this sub-hash contains details about the + * PayByBank payment method options. + */ + @SerializedName("pay_by_bank") + Object payByBank; + /** * If this is a {@code payco} PaymentMethod, this sub-hash contains details about the PAYCO * payment method options. @@ -6195,6 +6283,7 @@ private PaymentMethodOptions( Object naverPay, Object oxxo, Object p24, + Object payByBank, Object payco, Object paynow, Object paypal, @@ -6241,6 +6330,7 @@ private PaymentMethodOptions( this.naverPay = naverPay; this.oxxo = oxxo; this.p24 = p24; + this.payByBank = payByBank; this.payco = payco; this.paynow = paynow; this.paypal = paypal; @@ -6326,6 +6416,8 @@ public static class Builder { private Object p24; + private Object payByBank; + private Object payco; private Object paynow; @@ -6389,6 +6481,7 @@ public PaymentIntentUpdateParams.PaymentMethodOptions build() { this.naverPay, this.oxxo, this.p24, + this.payByBank, this.payco, this.paynow, this.paypal, @@ -6995,6 +7088,25 @@ public Builder setP24(EmptyParam p24) { return this; } + /** + * If this is a {@code pay_by_bank} PaymentMethod, this sub-hash contains details about the + * PayByBank payment method options. + */ + public Builder setPayByBank( + PaymentIntentUpdateParams.PaymentMethodOptions.PayByBank payByBank) { + this.payByBank = payByBank; + return this; + } + + /** + * If this is a {@code pay_by_bank} PaymentMethod, this sub-hash contains details about the + * PayByBank payment method options. + */ + public Builder setPayByBank(EmptyParam payByBank) { + this.payByBank = payByBank; + return this; + } + /** * If this is a {@code payco} PaymentMethod, this sub-hash contains details about the PAYCO * payment method options. @@ -15266,6 +15378,63 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { } } + @Getter + public static class PayByBank { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private PayByBank(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.PayByBank build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.PayByBank(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.PayByBank#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.PayByBank#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + @Getter public static class Payco { /** diff --git a/src/main/java/com/stripe/param/PaymentLinkCreateParams.java b/src/main/java/com/stripe/param/PaymentLinkCreateParams.java index bef1296d4fc..62c70d18ac7 100644 --- a/src/main/java/com/stripe/param/PaymentLinkCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentLinkCreateParams.java @@ -4671,6 +4671,9 @@ public enum AllowedCountry implements ApiRequestParams.EnumParam { @SerializedName("SC") SC("SC"), + @SerializedName("SD") + SD("SD"), + @SerializedName("SE") SE("SE"), @@ -5754,6 +5757,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("p24") P24("p24"), + @SerializedName("pay_by_bank") + PAY_BY_BANK("pay_by_bank"), + @SerializedName("paynow") PAYNOW("paynow"), diff --git a/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java b/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java index afdf79c15c1..9c5dcf09111 100644 --- a/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java @@ -123,6 +123,14 @@ public class PaymentLinkUpdateParams extends ApiRequestParams { @SerializedName("payment_method_types") Object paymentMethodTypes; + /** + * Controls phone number collection settings during checkout. + * + *

We recommend that you review your privacy policy and check with your legal contacts. + */ + @SerializedName("phone_number_collection") + PhoneNumberCollection phoneNumberCollection; + /** Settings that restrict the usage of a payment link. */ @SerializedName("restrictions") Object restrictions; @@ -169,6 +177,7 @@ private PaymentLinkUpdateParams( PaymentIntentData paymentIntentData, PaymentMethodCollection paymentMethodCollection, Object paymentMethodTypes, + PhoneNumberCollection phoneNumberCollection, Object restrictions, Object shippingAddressCollection, SubmitType submitType, @@ -191,6 +200,7 @@ private PaymentLinkUpdateParams( this.paymentIntentData = paymentIntentData; this.paymentMethodCollection = paymentMethodCollection; this.paymentMethodTypes = paymentMethodTypes; + this.phoneNumberCollection = phoneNumberCollection; this.restrictions = restrictions; this.shippingAddressCollection = shippingAddressCollection; this.submitType = submitType; @@ -237,6 +247,8 @@ public static class Builder { private Object paymentMethodTypes; + private PhoneNumberCollection phoneNumberCollection; + private Object restrictions; private Object shippingAddressCollection; @@ -267,6 +279,7 @@ public PaymentLinkUpdateParams build() { this.paymentIntentData, this.paymentMethodCollection, this.paymentMethodTypes, + this.phoneNumberCollection, this.restrictions, this.shippingAddressCollection, this.submitType, @@ -569,6 +582,17 @@ public Builder setPaymentMethodTypes( return this; } + /** + * Controls phone number collection settings during checkout. + * + *

We recommend that you review your privacy policy and check with your legal contacts. + */ + public Builder setPhoneNumberCollection( + PaymentLinkUpdateParams.PhoneNumberCollection phoneNumberCollection) { + this.phoneNumberCollection = phoneNumberCollection; + return this; + } + /** Settings that restrict the usage of a payment link. */ public Builder setRestrictions(PaymentLinkUpdateParams.Restrictions restrictions) { this.restrictions = restrictions; @@ -3511,6 +3535,75 @@ public Builder setTransferGroup(EmptyParam transferGroup) { } } + @Getter + public static class PhoneNumberCollection { + /** Required. Set to {@code true} to enable phone number collection. */ + @SerializedName("enabled") + Boolean enabled; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private PhoneNumberCollection(Boolean enabled, Map extraParams) { + this.enabled = enabled; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean enabled; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentLinkUpdateParams.PhoneNumberCollection build() { + return new PaymentLinkUpdateParams.PhoneNumberCollection(this.enabled, this.extraParams); + } + + /** Required. Set to {@code true} to enable phone number collection. */ + public Builder setEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentLinkUpdateParams.PhoneNumberCollection#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentLinkUpdateParams.PhoneNumberCollection#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 public static class Restrictions { /** @@ -4314,6 +4407,9 @@ public enum AllowedCountry implements ApiRequestParams.EnumParam { @SerializedName("SC") SC("SC"), + @SerializedName("SD") + SD("SD"), + @SerializedName("SE") SE("SE"), @@ -5261,6 +5357,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("p24") P24("p24"), + @SerializedName("pay_by_bank") + PAY_BY_BANK("pay_by_bank"), + @SerializedName("paynow") PAYNOW("paynow"), diff --git a/src/main/java/com/stripe/param/PaymentMethodConfigurationCreateParams.java b/src/main/java/com/stripe/param/PaymentMethodConfigurationCreateParams.java index 6f4ee1a3d7b..0c637367c02 100644 --- a/src/main/java/com/stripe/param/PaymentMethodConfigurationCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodConfigurationCreateParams.java @@ -309,6 +309,15 @@ public class PaymentMethodConfigurationCreateParams extends ApiRequestParams { @SerializedName("parent") String parent; + /** + * Pay by bank is a redirect payment method backed by bank transfers. A customer is redirected to + * their bank to authorize a bank transfer for a given amount. This removes a lot of the error + * risks inherent in waiting for the customer to initiate a transfer themselves, and is less + * expensive than card payments. + */ + @SerializedName("pay_by_bank") + PayByBank payByBank; + /** * PayNow is a Singapore-based payment method that allows customers to make a payment using their * preferred app from participating banks and participating non-bank financial institutions. Check @@ -440,6 +449,7 @@ private PaymentMethodConfigurationCreateParams( Oxxo oxxo, P24 p24, String parent, + PayByBank payByBank, Paynow paynow, Paypal paypal, Promptpay promptpay, @@ -486,6 +496,7 @@ private PaymentMethodConfigurationCreateParams( this.oxxo = oxxo; this.p24 = p24; this.parent = parent; + this.payByBank = payByBank; this.paynow = paynow; this.paypal = paypal; this.promptpay = promptpay; @@ -574,6 +585,8 @@ public static class Builder { private String parent; + private PayByBank payByBank; + private Paynow paynow; private Paypal paypal; @@ -634,6 +647,7 @@ public PaymentMethodConfigurationCreateParams build() { this.oxxo, this.p24, this.parent, + this.payByBank, this.paynow, this.paypal, this.promptpay, @@ -1055,6 +1069,17 @@ public Builder setParent(String parent) { return this; } + /** + * Pay by bank is a redirect payment method backed by bank transfers. A customer is redirected + * to their bank to authorize a bank transfer for a given amount. This removes a lot of the + * error risks inherent in waiting for the customer to initiate a transfer themselves, and is + * less expensive than card payments. + */ + public Builder setPayByBank(PaymentMethodConfigurationCreateParams.PayByBank payByBank) { + this.payByBank = payByBank; + return this; + } + /** * PayNow is a Singapore-based payment method that allows customers to make a payment using * their preferred app from participating banks and participating non-bank financial @@ -6248,6 +6273,170 @@ public enum Preference implements ApiRequestParams.EnumParam { } } + @Getter + public static class PayByBank { + /** Whether or not the payment method should be displayed. */ + @SerializedName("display_preference") + DisplayPreference displayPreference; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private PayByBank(DisplayPreference displayPreference, Map extraParams) { + this.displayPreference = displayPreference; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private DisplayPreference displayPreference; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentMethodConfigurationCreateParams.PayByBank build() { + return new PaymentMethodConfigurationCreateParams.PayByBank( + this.displayPreference, this.extraParams); + } + + /** Whether or not the payment method should be displayed. */ + public Builder setDisplayPreference( + PaymentMethodConfigurationCreateParams.PayByBank.DisplayPreference displayPreference) { + this.displayPreference = displayPreference; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentMethodConfigurationCreateParams.PayByBank#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentMethodConfigurationCreateParams.PayByBank#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + @Getter + public static class DisplayPreference { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The account's preference for whether or not to display this payment method. */ + @SerializedName("preference") + Preference preference; + + private DisplayPreference(Map extraParams, Preference preference) { + this.extraParams = extraParams; + this.preference = preference; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Preference preference; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentMethodConfigurationCreateParams.PayByBank.DisplayPreference build() { + return new PaymentMethodConfigurationCreateParams.PayByBank.DisplayPreference( + this.extraParams, this.preference); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentMethodConfigurationCreateParams.PayByBank.DisplayPreference#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentMethodConfigurationCreateParams.PayByBank.DisplayPreference#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The account's preference for whether or not to display this payment method. */ + public Builder setPreference( + PaymentMethodConfigurationCreateParams.PayByBank.DisplayPreference.Preference + preference) { + this.preference = preference; + return this; + } + } + + public enum Preference implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), + + @SerializedName("off") + OFF("off"), + + @SerializedName("on") + ON("on"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Preference(String value) { + this.value = value; + } + } + } + } + @Getter public static class Paynow { /** Whether or not the payment method should be displayed. */ diff --git a/src/main/java/com/stripe/param/PaymentMethodConfigurationUpdateParams.java b/src/main/java/com/stripe/param/PaymentMethodConfigurationUpdateParams.java index e023e3875fa..8b6204b6f4c 100644 --- a/src/main/java/com/stripe/param/PaymentMethodConfigurationUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodConfigurationUpdateParams.java @@ -310,6 +310,15 @@ public class PaymentMethodConfigurationUpdateParams extends ApiRequestParams { @SerializedName("p24") P24 p24; + /** + * Pay by bank is a redirect payment method backed by bank transfers. A customer is redirected to + * their bank to authorize a bank transfer for a given amount. This removes a lot of the error + * risks inherent in waiting for the customer to initiate a transfer themselves, and is less + * expensive than card payments. + */ + @SerializedName("pay_by_bank") + PayByBank payByBank; + /** * PayNow is a Singapore-based payment method that allows customers to make a payment using their * preferred app from participating banks and participating non-bank financial institutions. Check @@ -441,6 +450,7 @@ private PaymentMethodConfigurationUpdateParams( Object name, Oxxo oxxo, P24 p24, + PayByBank payByBank, Paynow paynow, Paypal paypal, Promptpay promptpay, @@ -487,6 +497,7 @@ private PaymentMethodConfigurationUpdateParams( this.name = name; this.oxxo = oxxo; this.p24 = p24; + this.payByBank = payByBank; this.paynow = paynow; this.paypal = paypal; this.promptpay = promptpay; @@ -575,6 +586,8 @@ public static class Builder { private P24 p24; + private PayByBank payByBank; + private Paynow paynow; private Paypal paypal; @@ -635,6 +648,7 @@ public PaymentMethodConfigurationUpdateParams build() { this.name, this.oxxo, this.p24, + this.payByBank, this.paynow, this.paypal, this.promptpay, @@ -1062,6 +1076,17 @@ public Builder setP24(PaymentMethodConfigurationUpdateParams.P24 p24) { return this; } + /** + * Pay by bank is a redirect payment method backed by bank transfers. A customer is redirected + * to their bank to authorize a bank transfer for a given amount. This removes a lot of the + * error risks inherent in waiting for the customer to initiate a transfer themselves, and is + * less expensive than card payments. + */ + public Builder setPayByBank(PaymentMethodConfigurationUpdateParams.PayByBank payByBank) { + this.payByBank = payByBank; + return this; + } + /** * PayNow is a Singapore-based payment method that allows customers to make a payment using * their preferred app from participating banks and participating non-bank financial @@ -6255,6 +6280,170 @@ public enum Preference implements ApiRequestParams.EnumParam { } } + @Getter + public static class PayByBank { + /** Whether or not the payment method should be displayed. */ + @SerializedName("display_preference") + DisplayPreference displayPreference; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private PayByBank(DisplayPreference displayPreference, Map extraParams) { + this.displayPreference = displayPreference; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private DisplayPreference displayPreference; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentMethodConfigurationUpdateParams.PayByBank build() { + return new PaymentMethodConfigurationUpdateParams.PayByBank( + this.displayPreference, this.extraParams); + } + + /** Whether or not the payment method should be displayed. */ + public Builder setDisplayPreference( + PaymentMethodConfigurationUpdateParams.PayByBank.DisplayPreference displayPreference) { + this.displayPreference = displayPreference; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentMethodConfigurationUpdateParams.PayByBank#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentMethodConfigurationUpdateParams.PayByBank#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + @Getter + public static class DisplayPreference { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The account's preference for whether or not to display this payment method. */ + @SerializedName("preference") + Preference preference; + + private DisplayPreference(Map extraParams, Preference preference) { + this.extraParams = extraParams; + this.preference = preference; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Preference preference; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentMethodConfigurationUpdateParams.PayByBank.DisplayPreference build() { + return new PaymentMethodConfigurationUpdateParams.PayByBank.DisplayPreference( + this.extraParams, this.preference); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentMethodConfigurationUpdateParams.PayByBank.DisplayPreference#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentMethodConfigurationUpdateParams.PayByBank.DisplayPreference#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The account's preference for whether or not to display this payment method. */ + public Builder setPreference( + PaymentMethodConfigurationUpdateParams.PayByBank.DisplayPreference.Preference + preference) { + this.preference = preference; + return this; + } + } + + public enum Preference implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), + + @SerializedName("off") + OFF("off"), + + @SerializedName("on") + ON("on"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Preference(String value) { + this.value = value; + } + } + } + } + @Getter public static class Paynow { /** Whether or not the payment method should be displayed. */ diff --git a/src/main/java/com/stripe/param/PaymentMethodCreateParams.java b/src/main/java/com/stripe/param/PaymentMethodCreateParams.java index 38e4a4a4eb9..08d01973b1d 100644 --- a/src/main/java/com/stripe/param/PaymentMethodCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodCreateParams.java @@ -265,6 +265,13 @@ public class PaymentMethodCreateParams extends ApiRequestParams { @SerializedName("p24") P24 p24; + /** + * If this is a {@code pay_by_bank} PaymentMethod, this hash contains details about the PayByBank + * payment method. + */ + @SerializedName("pay_by_bank") + PayByBank payByBank; + /** * If this is a {@code payco} PaymentMethod, this hash contains details about the PAYCO payment * method. @@ -417,6 +424,7 @@ private PaymentMethodCreateParams( NaverPay naverPay, Oxxo oxxo, P24 p24, + PayByBank payByBank, Payco payco, String paymentMethod, Paynow paynow, @@ -470,6 +478,7 @@ private PaymentMethodCreateParams( this.naverPay = naverPay; this.oxxo = oxxo; this.p24 = p24; + this.payByBank = payByBank; this.payco = payco; this.paymentMethod = paymentMethod; this.paynow = paynow; @@ -566,6 +575,8 @@ public static class Builder { private P24 p24; + private PayByBank payByBank; + private Payco payco; private String paymentMethod; @@ -639,6 +650,7 @@ public PaymentMethodCreateParams build() { this.naverPay, this.oxxo, this.p24, + this.payByBank, this.payco, this.paymentMethod, this.paynow, @@ -1049,6 +1061,15 @@ public Builder setP24(PaymentMethodCreateParams.P24 p24) { return this; } + /** + * If this is a {@code pay_by_bank} PaymentMethod, this hash contains details about the + * PayByBank payment method. + */ + public Builder setPayByBank(PaymentMethodCreateParams.PayByBank payByBank) { + this.payByBank = payByBank; + return this; + } + /** * If this is a {@code payco} PaymentMethod, this hash contains details about the PAYCO payment * method. @@ -3973,6 +3994,61 @@ public enum Bank implements ApiRequestParams.EnumParam { } } + @Getter + public static class PayByBank { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private PayByBank(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentMethodCreateParams.PayByBank build() { + return new PaymentMethodCreateParams.PayByBank(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentMethodCreateParams.PayByBank#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentMethodCreateParams.PayByBank#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + @Getter public static class Payco { /** @@ -5170,6 +5246,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("p24") P24("p24"), + @SerializedName("pay_by_bank") + PAY_BY_BANK("pay_by_bank"), + @SerializedName("payco") PAYCO("payco"), diff --git a/src/main/java/com/stripe/param/PaymentMethodListParams.java b/src/main/java/com/stripe/param/PaymentMethodListParams.java index a9d9225e035..1c217be6801 100644 --- a/src/main/java/com/stripe/param/PaymentMethodListParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodListParams.java @@ -298,6 +298,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("p24") P24("p24"), + @SerializedName("pay_by_bank") + PAY_BY_BANK("pay_by_bank"), + @SerializedName("payco") PAYCO("payco"), diff --git a/src/main/java/com/stripe/param/PaymentMethodUpdateParams.java b/src/main/java/com/stripe/param/PaymentMethodUpdateParams.java index 1045f38ae99..c55599e8d48 100644 --- a/src/main/java/com/stripe/param/PaymentMethodUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodUpdateParams.java @@ -68,6 +68,13 @@ public class PaymentMethodUpdateParams extends ApiRequestParams { @SerializedName("naver_pay") NaverPay naverPay; + /** + * If this is a {@code pay_by_bank} PaymentMethod, this hash contains details about the PayByBank + * payment method. + */ + @SerializedName("pay_by_bank") + PayByBank payByBank; + /** * If this is an {@code us_bank_account} PaymentMethod, this hash contains details about the US * bank account payment method. @@ -84,6 +91,7 @@ private PaymentMethodUpdateParams( Link link, Object metadata, NaverPay naverPay, + PayByBank payByBank, UsBankAccount usBankAccount) { this.allowRedisplay = allowRedisplay; this.billingDetails = billingDetails; @@ -93,6 +101,7 @@ private PaymentMethodUpdateParams( this.link = link; this.metadata = metadata; this.naverPay = naverPay; + this.payByBank = payByBank; this.usBankAccount = usBankAccount; } @@ -117,6 +126,8 @@ public static class Builder { private NaverPay naverPay; + private PayByBank payByBank; + private UsBankAccount usBankAccount; /** Finalize and obtain parameter instance from this builder. */ @@ -130,6 +141,7 @@ public PaymentMethodUpdateParams build() { this.link, this.metadata, this.naverPay, + this.payByBank, this.usBankAccount); } @@ -279,6 +291,15 @@ public Builder setNaverPay(PaymentMethodUpdateParams.NaverPay naverPay) { return this; } + /** + * If this is a {@code pay_by_bank} PaymentMethod, this hash contains details about the + * PayByBank payment method. + */ + public Builder setPayByBank(PaymentMethodUpdateParams.PayByBank payByBank) { + this.payByBank = payByBank; + return this; + } + /** * If this is an {@code us_bank_account} PaymentMethod, this hash contains details about the US * bank account payment method. @@ -962,6 +983,61 @@ public enum Funding implements ApiRequestParams.EnumParam { } } + @Getter + public static class PayByBank { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private PayByBank(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentMethodUpdateParams.PayByBank build() { + return new PaymentMethodUpdateParams.PayByBank(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentMethodUpdateParams.PayByBank#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentMethodUpdateParams.PayByBank#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + @Getter public static class UsBankAccount { /** Bank account holder type. */ diff --git a/src/main/java/com/stripe/param/SetupIntentConfirmParams.java b/src/main/java/com/stripe/param/SetupIntentConfirmParams.java index 22c575d76df..87e7357e1d2 100644 --- a/src/main/java/com/stripe/param/SetupIntentConfirmParams.java +++ b/src/main/java/com/stripe/param/SetupIntentConfirmParams.java @@ -857,6 +857,13 @@ public static class PaymentMethodData { @SerializedName("p24") P24 p24; + /** + * If this is a {@code pay_by_bank} PaymentMethod, this hash contains details about the + * PayByBank payment method. + */ + @SerializedName("pay_by_bank") + PayByBank payByBank; + /** * If this is a {@code payco} PaymentMethod, this hash contains details about the PAYCO payment * method. @@ -1003,6 +1010,7 @@ private PaymentMethodData( NaverPay naverPay, Oxxo oxxo, P24 p24, + PayByBank payByBank, Payco payco, Paynow paynow, Paypal paypal, @@ -1052,6 +1060,7 @@ private PaymentMethodData( this.naverPay = naverPay; this.oxxo = oxxo; this.p24 = p24; + this.payByBank = payByBank; this.payco = payco; this.paynow = paynow; this.paypal = paypal; @@ -1141,6 +1150,8 @@ public static class Builder { private P24 p24; + private PayByBank payByBank; + private Payco payco; private Paynow paynow; @@ -1209,6 +1220,7 @@ public SetupIntentConfirmParams.PaymentMethodData build() { this.naverPay, this.oxxo, this.p24, + this.payByBank, this.payco, this.paynow, this.paypal, @@ -1569,6 +1581,15 @@ public Builder setP24(SetupIntentConfirmParams.PaymentMethodData.P24 p24) { return this; } + /** + * If this is a {@code pay_by_bank} PaymentMethod, this hash contains details about the + * PayByBank payment method. + */ + public Builder setPayByBank(SetupIntentConfirmParams.PaymentMethodData.PayByBank payByBank) { + this.payByBank = payByBank; + return this; + } + /** * If this is a {@code payco} PaymentMethod, this hash contains details about the PAYCO * payment method. @@ -4335,6 +4356,63 @@ public enum Bank implements ApiRequestParams.EnumParam { } } + @Getter + public static class PayByBank { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private PayByBank(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public SetupIntentConfirmParams.PaymentMethodData.PayByBank build() { + return new SetupIntentConfirmParams.PaymentMethodData.PayByBank(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SetupIntentConfirmParams.PaymentMethodData.PayByBank#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SetupIntentConfirmParams.PaymentMethodData.PayByBank#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + @Getter public static class Payco { /** @@ -5487,6 +5565,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("p24") P24("p24"), + @SerializedName("pay_by_bank") + PAY_BY_BANK("pay_by_bank"), + @SerializedName("payco") PAYCO("payco"), diff --git a/src/main/java/com/stripe/param/SetupIntentCreateParams.java b/src/main/java/com/stripe/param/SetupIntentCreateParams.java index 09c2547ad5f..e63e6d37972 100644 --- a/src/main/java/com/stripe/param/SetupIntentCreateParams.java +++ b/src/main/java/com/stripe/param/SetupIntentCreateParams.java @@ -1322,6 +1322,13 @@ public static class PaymentMethodData { @SerializedName("p24") P24 p24; + /** + * If this is a {@code pay_by_bank} PaymentMethod, this hash contains details about the + * PayByBank payment method. + */ + @SerializedName("pay_by_bank") + PayByBank payByBank; + /** * If this is a {@code payco} PaymentMethod, this hash contains details about the PAYCO payment * method. @@ -1468,6 +1475,7 @@ private PaymentMethodData( NaverPay naverPay, Oxxo oxxo, P24 p24, + PayByBank payByBank, Payco payco, Paynow paynow, Paypal paypal, @@ -1517,6 +1525,7 @@ private PaymentMethodData( this.naverPay = naverPay; this.oxxo = oxxo; this.p24 = p24; + this.payByBank = payByBank; this.payco = payco; this.paynow = paynow; this.paypal = paypal; @@ -1606,6 +1615,8 @@ public static class Builder { private P24 p24; + private PayByBank payByBank; + private Payco payco; private Paynow paynow; @@ -1674,6 +1685,7 @@ public SetupIntentCreateParams.PaymentMethodData build() { this.naverPay, this.oxxo, this.p24, + this.payByBank, this.payco, this.paynow, this.paypal, @@ -2033,6 +2045,15 @@ public Builder setP24(SetupIntentCreateParams.PaymentMethodData.P24 p24) { return this; } + /** + * If this is a {@code pay_by_bank} PaymentMethod, this hash contains details about the + * PayByBank payment method. + */ + public Builder setPayByBank(SetupIntentCreateParams.PaymentMethodData.PayByBank payByBank) { + this.payByBank = payByBank; + return this; + } + /** * If this is a {@code payco} PaymentMethod, this hash contains details about the PAYCO * payment method. @@ -4798,6 +4819,63 @@ public enum Bank implements ApiRequestParams.EnumParam { } } + @Getter + public static class PayByBank { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private PayByBank(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public SetupIntentCreateParams.PaymentMethodData.PayByBank build() { + return new SetupIntentCreateParams.PaymentMethodData.PayByBank(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SetupIntentCreateParams.PaymentMethodData.PayByBank#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SetupIntentCreateParams.PaymentMethodData.PayByBank#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + @Getter public static class Payco { /** @@ -5950,6 +6028,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("p24") P24("p24"), + @SerializedName("pay_by_bank") + PAY_BY_BANK("pay_by_bank"), + @SerializedName("payco") PAYCO("payco"), diff --git a/src/main/java/com/stripe/param/SetupIntentUpdateParams.java b/src/main/java/com/stripe/param/SetupIntentUpdateParams.java index e233c2d66a6..6ee334f2294 100644 --- a/src/main/java/com/stripe/param/SetupIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/SetupIntentUpdateParams.java @@ -672,6 +672,13 @@ public static class PaymentMethodData { @SerializedName("p24") P24 p24; + /** + * If this is a {@code pay_by_bank} PaymentMethod, this hash contains details about the + * PayByBank payment method. + */ + @SerializedName("pay_by_bank") + PayByBank payByBank; + /** * If this is a {@code payco} PaymentMethod, this hash contains details about the PAYCO payment * method. @@ -818,6 +825,7 @@ private PaymentMethodData( NaverPay naverPay, Oxxo oxxo, P24 p24, + PayByBank payByBank, Payco payco, Paynow paynow, Paypal paypal, @@ -867,6 +875,7 @@ private PaymentMethodData( this.naverPay = naverPay; this.oxxo = oxxo; this.p24 = p24; + this.payByBank = payByBank; this.payco = payco; this.paynow = paynow; this.paypal = paypal; @@ -956,6 +965,8 @@ public static class Builder { private P24 p24; + private PayByBank payByBank; + private Payco payco; private Paynow paynow; @@ -1024,6 +1035,7 @@ public SetupIntentUpdateParams.PaymentMethodData build() { this.naverPay, this.oxxo, this.p24, + this.payByBank, this.payco, this.paynow, this.paypal, @@ -1383,6 +1395,15 @@ public Builder setP24(SetupIntentUpdateParams.PaymentMethodData.P24 p24) { return this; } + /** + * If this is a {@code pay_by_bank} PaymentMethod, this hash contains details about the + * PayByBank payment method. + */ + public Builder setPayByBank(SetupIntentUpdateParams.PaymentMethodData.PayByBank payByBank) { + this.payByBank = payByBank; + return this; + } + /** * If this is a {@code payco} PaymentMethod, this hash contains details about the PAYCO * payment method. @@ -4238,6 +4259,63 @@ public enum Bank implements ApiRequestParams.EnumParam { } } + @Getter + public static class PayByBank { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private PayByBank(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public SetupIntentUpdateParams.PaymentMethodData.PayByBank build() { + return new SetupIntentUpdateParams.PaymentMethodData.PayByBank(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SetupIntentUpdateParams.PaymentMethodData.PayByBank#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SetupIntentUpdateParams.PaymentMethodData.PayByBank#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + @Getter public static class Payco { /** @@ -5424,6 +5502,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("p24") P24("p24"), + @SerializedName("pay_by_bank") + PAY_BY_BANK("pay_by_bank"), + @SerializedName("payco") PAYCO("payco"), diff --git a/src/main/java/com/stripe/param/TokenCreateParams.java b/src/main/java/com/stripe/param/TokenCreateParams.java index a7ca783a21a..b87796f5750 100644 --- a/src/main/java/com/stripe/param/TokenCreateParams.java +++ b/src/main/java/com/stripe/param/TokenCreateParams.java @@ -388,6 +388,13 @@ public static class Company { @SerializedName("directors_provided") Boolean directorsProvided; + /** + * This hash is used to attest that the directors information provided to Stripe is both + * current and correct. + */ + @SerializedName("directorship_declaration") + DirectorshipDeclaration directorshipDeclaration; + /** * Whether the company's executives have been provided. Set this Boolean to {@code true} after * creating all the company's executives with the @@ -450,6 +457,9 @@ public static class Company { @SerializedName("ownership_declaration_shown_and_signed") Boolean ownershipDeclarationShownAndSigned; + @SerializedName("ownership_exemption_reason") + ApiRequestParams.EnumParam ownershipExemptionReason; + /** The company's phone number (used for verification). */ @SerializedName("phone") String phone; @@ -498,6 +508,7 @@ private Company( AddressKana addressKana, AddressKanji addressKanji, Boolean directorsProvided, + DirectorshipDeclaration directorshipDeclaration, Boolean executivesProvided, String exportLicenseId, String exportPurposeCode, @@ -508,6 +519,7 @@ private Company( Boolean ownersProvided, OwnershipDeclaration ownershipDeclaration, Boolean ownershipDeclarationShownAndSigned, + ApiRequestParams.EnumParam ownershipExemptionReason, String phone, String registrationNumber, ApiRequestParams.EnumParam structure, @@ -519,6 +531,7 @@ private Company( this.addressKana = addressKana; this.addressKanji = addressKanji; this.directorsProvided = directorsProvided; + this.directorshipDeclaration = directorshipDeclaration; this.executivesProvided = executivesProvided; this.exportLicenseId = exportLicenseId; this.exportPurposeCode = exportPurposeCode; @@ -529,6 +542,7 @@ private Company( this.ownersProvided = ownersProvided; this.ownershipDeclaration = ownershipDeclaration; this.ownershipDeclarationShownAndSigned = ownershipDeclarationShownAndSigned; + this.ownershipExemptionReason = ownershipExemptionReason; this.phone = phone; this.registrationNumber = registrationNumber; this.structure = structure; @@ -551,6 +565,8 @@ public static class Builder { private Boolean directorsProvided; + private DirectorshipDeclaration directorshipDeclaration; + private Boolean executivesProvided; private String exportLicenseId; @@ -571,6 +587,8 @@ public static class Builder { private Boolean ownershipDeclarationShownAndSigned; + private ApiRequestParams.EnumParam ownershipExemptionReason; + private String phone; private String registrationNumber; @@ -592,6 +610,7 @@ public TokenCreateParams.Account.Company build() { this.addressKana, this.addressKanji, this.directorsProvided, + this.directorshipDeclaration, this.executivesProvided, this.exportLicenseId, this.exportPurposeCode, @@ -602,6 +621,7 @@ public TokenCreateParams.Account.Company build() { this.ownersProvided, this.ownershipDeclaration, this.ownershipDeclarationShownAndSigned, + this.ownershipExemptionReason, this.phone, this.registrationNumber, this.structure, @@ -643,6 +663,16 @@ public Builder setDirectorsProvided(Boolean directorsProvided) { return this; } + /** + * This hash is used to attest that the directors information provided to Stripe is both + * current and correct. + */ + public Builder setDirectorshipDeclaration( + TokenCreateParams.Account.Company.DirectorshipDeclaration directorshipDeclaration) { + this.directorshipDeclaration = directorshipDeclaration; + return this; + } + /** * Whether the company's executives have been provided. Set this Boolean to {@code true} * after creating all the company's executives with extraParams; + + /** The IP address from which the directorship declaration attestation was made. */ + @SerializedName("ip") + String ip; + + /** + * The user agent of the browser from which the directorship declaration attestation was + * made. + */ + @SerializedName("user_agent") + String userAgent; + + private DirectorshipDeclaration( + Long date, Map extraParams, String ip, String userAgent) { + this.date = date; + this.extraParams = extraParams; + this.ip = ip; + this.userAgent = userAgent; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long date; + + private Map extraParams; + + private String ip; + + private String userAgent; + + /** Finalize and obtain parameter instance from this builder. */ + public TokenCreateParams.Account.Company.DirectorshipDeclaration build() { + return new TokenCreateParams.Account.Company.DirectorshipDeclaration( + this.date, this.extraParams, this.ip, this.userAgent); + } + + /** The Unix timestamp marking when the directorship declaration attestation was made. */ + public Builder setDate(Long 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 TokenCreateParams.Account.Company.DirectorshipDeclaration#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link TokenCreateParams.Account.Company.DirectorshipDeclaration#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 IP address from which the directorship declaration attestation was made. */ + public Builder setIp(String ip) { + this.ip = ip; + return this; + } + + /** + * The user agent of the browser from which the directorship declaration attestation was + * made. + */ + public Builder setUserAgent(String userAgent) { + this.userAgent = userAgent; + return this; + } + } + } + @Getter public static class OwnershipDeclaration { /** The Unix timestamp marking when the beneficial owner attestation was made. */ @@ -1596,6 +1742,22 @@ public Builder setFront(String front) { } } + public enum OwnershipExemptionReason implements ApiRequestParams.EnumParam { + @SerializedName("qualified_entity_exceeds_ownership_threshold") + QUALIFIED_ENTITY_EXCEEDS_OWNERSHIP_THRESHOLD( + "qualified_entity_exceeds_ownership_threshold"), + + @SerializedName("qualifies_as_financial_institution") + QUALIFIES_AS_FINANCIAL_INSTITUTION("qualifies_as_financial_institution"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + OwnershipExemptionReason(String value) { + this.value = value; + } + } + public enum Structure implements ApiRequestParams.EnumParam { @SerializedName("free_zone_establishment") FREE_ZONE_ESTABLISHMENT("free_zone_establishment"), diff --git a/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java b/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java index 0de2acbc37e..197e3f66946 100644 --- a/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java +++ b/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java @@ -598,7 +598,10 @@ public enum ApiVersion implements ApiRequestParams.EnumParam { VERSION_2024_11_20_ACACIA("2024-11-20.acacia"), @SerializedName("2024-12-18.acacia") - VERSION_2024_12_18_ACACIA("2024-12-18.acacia"); + VERSION_2024_12_18_ACACIA("2024-12-18.acacia"), + + @SerializedName("2025-01-27.acacia") + VERSION_2025_01_27_ACACIA("2025-01-27.acacia"); @Getter(onMethod_ = {@Override}) private final String value; diff --git a/src/main/java/com/stripe/param/billingportal/ConfigurationCreateParams.java b/src/main/java/com/stripe/param/billingportal/ConfigurationCreateParams.java index 4af57aa0ab1..64ec379f301 100644 --- a/src/main/java/com/stripe/param/billingportal/ConfigurationCreateParams.java +++ b/src/main/java/com/stripe/param/billingportal/ConfigurationCreateParams.java @@ -808,9 +808,9 @@ public static class SubscriptionCancel { /** * Whether to create prorations when canceling subscriptions. Possible values are {@code none} - * and {@code create_prorations}, which is only compatible with {@code mode=immediately}. No - * prorations are generated when canceling a subscription at the end of its natural billing - * period. + * and {@code create_prorations}, which is only compatible with {@code mode=immediately}. + * Passing {@code always_invoice} will result in an error. No prorations are generated when + * canceling a subscription at the end of its natural billing period. */ @SerializedName("proration_behavior") ProrationBehavior prorationBehavior; @@ -907,8 +907,8 @@ public Builder setMode(ConfigurationCreateParams.Features.SubscriptionCancel.Mod /** * Whether to create prorations when canceling subscriptions. Possible values are {@code * none} and {@code create_prorations}, which is only compatible with {@code - * mode=immediately}. No prorations are generated when canceling a subscription at the end - * of its natural billing period. + * mode=immediately}. Passing {@code always_invoice} will result in an error. No prorations + * are generated when canceling a subscription at the end of its natural billing period. */ public Builder setProrationBehavior( ConfigurationCreateParams.Features.SubscriptionCancel.ProrationBehavior diff --git a/src/main/java/com/stripe/param/billingportal/ConfigurationUpdateParams.java b/src/main/java/com/stripe/param/billingportal/ConfigurationUpdateParams.java index 537657ae92a..7988f616011 100644 --- a/src/main/java/com/stripe/param/billingportal/ConfigurationUpdateParams.java +++ b/src/main/java/com/stripe/param/billingportal/ConfigurationUpdateParams.java @@ -859,9 +859,9 @@ public static class SubscriptionCancel { /** * Whether to create prorations when canceling subscriptions. Possible values are {@code none} - * and {@code create_prorations}, which is only compatible with {@code mode=immediately}. No - * prorations are generated when canceling a subscription at the end of its natural billing - * period. + * and {@code create_prorations}, which is only compatible with {@code mode=immediately}. + * Passing {@code always_invoice} will result in an error. No prorations are generated when + * canceling a subscription at the end of its natural billing period. */ @SerializedName("proration_behavior") ProrationBehavior prorationBehavior; @@ -958,8 +958,8 @@ public Builder setMode(ConfigurationUpdateParams.Features.SubscriptionCancel.Mod /** * Whether to create prorations when canceling subscriptions. Possible values are {@code * none} and {@code create_prorations}, which is only compatible with {@code - * mode=immediately}. No prorations are generated when canceling a subscription at the end - * of its natural billing period. + * mode=immediately}. Passing {@code always_invoice} will result in an error. No prorations + * are generated when canceling a subscription at the end of its natural billing period. */ public Builder setProrationBehavior( ConfigurationUpdateParams.Features.SubscriptionCancel.ProrationBehavior diff --git a/src/main/java/com/stripe/param/checkout/SessionCreateParams.java b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java index 6e3600135f7..181e3f8ca0c 100644 --- a/src/main/java/com/stripe/param/checkout/SessionCreateParams.java +++ b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java @@ -5801,6 +5801,10 @@ public static class PaymentMethodOptions { @SerializedName("p24") P24 p24; + /** contains details about the Pay By Bank payment method options. */ + @SerializedName("pay_by_bank") + PayByBank payByBank; + /** contains details about the PAYCO payment method options. */ @SerializedName("payco") Payco payco; @@ -5874,6 +5878,7 @@ private PaymentMethodOptions( NaverPay naverPay, Oxxo oxxo, P24 p24, + PayByBank payByBank, Payco payco, Paynow paynow, Paypal paypal, @@ -5913,6 +5918,7 @@ private PaymentMethodOptions( this.naverPay = naverPay; this.oxxo = oxxo; this.p24 = p24; + this.payByBank = payByBank; this.payco = payco; this.paynow = paynow; this.paypal = paypal; @@ -5987,6 +5993,8 @@ public static class Builder { private P24 p24; + private PayByBank payByBank; + private Payco payco; private Paynow paynow; @@ -6040,6 +6048,7 @@ public SessionCreateParams.PaymentMethodOptions build() { this.naverPay, this.oxxo, this.p24, + this.payByBank, this.payco, this.paynow, this.paypal, @@ -6245,6 +6254,12 @@ public Builder setP24(SessionCreateParams.PaymentMethodOptions.P24 p24) { return this; } + /** contains details about the Pay By Bank payment method options. */ + public Builder setPayByBank(SessionCreateParams.PaymentMethodOptions.PayByBank payByBank) { + this.payByBank = payByBank; + return this; + } + /** contains details about the PAYCO payment method options. */ public Builder setPayco(SessionCreateParams.PaymentMethodOptions.Payco payco) { this.payco = payco; @@ -10962,6 +10977,63 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { } } + @Getter + public static class PayByBank { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private PayByBank(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionCreateParams.PaymentMethodOptions.PayByBank build() { + return new SessionCreateParams.PaymentMethodOptions.PayByBank(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionCreateParams.PaymentMethodOptions.PayByBank#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionCreateParams.PaymentMethodOptions.PayByBank#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + @Getter public static class Payco { /** Controls when the funds will be captured from the customer's account. */ @@ -12775,7 +12847,11 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @Getter public static class PhoneNumberCollection { - /** Required. Set to {@code true} to enable phone number collection. */ + /** + * Required. Set to {@code true} to enable phone number collection. + * + *

Can only be set in {@code payment} and {@code subscription} mode. + */ @SerializedName("enabled") Boolean enabled; @@ -12807,7 +12883,11 @@ public SessionCreateParams.PhoneNumberCollection build() { return new SessionCreateParams.PhoneNumberCollection(this.enabled, this.extraParams); } - /** Required. Set to {@code true} to enable phone number collection. */ + /** + * Required. Set to {@code true} to enable phone number collection. + * + *

Can only be set in {@code payment} and {@code subscription} mode. + */ public Builder setEnabled(Boolean enabled) { this.enabled = enabled; return this; @@ -13773,6 +13853,9 @@ public enum AllowedCountry implements ApiRequestParams.EnumParam { @SerializedName("SC") SC("SC"), + @SerializedName("SD") + SD("SD"), + @SerializedName("SE") SE("SE"), @@ -16079,6 +16162,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("p24") P24("p24"), + @SerializedName("pay_by_bank") + PAY_BY_BANK("pay_by_bank"), + @SerializedName("payco") PAYCO("payco"), diff --git a/src/main/java/com/stripe/param/financialconnections/TransactionListParams.java b/src/main/java/com/stripe/param/financialconnections/TransactionListParams.java index 09552e8ef6d..0c5e82c3d1e 100644 --- a/src/main/java/com/stripe/param/financialconnections/TransactionListParams.java +++ b/src/main/java/com/stripe/param/financialconnections/TransactionListParams.java @@ -12,7 +12,8 @@ @Getter public class TransactionListParams extends ApiRequestParams { /** - * Required. The ID of the Stripe account whose transactions will be retrieved. + * Required. The ID of the Financial Connections Account whose transactions will + * be retrieved. */ @SerializedName("account") String account; @@ -123,7 +124,8 @@ public TransactionListParams build() { } /** - * Required. The ID of the Stripe account whose transactions will be retrieved. + * Required. The ID of the Financial Connections Account whose transactions + * will be retrieved. */ public Builder setAccount(String account) { this.account = account; diff --git a/src/main/java/com/stripe/param/terminal/ConfigurationCreateParams.java b/src/main/java/com/stripe/param/terminal/ConfigurationCreateParams.java index 0483a98247f..01d0a43d259 100644 --- a/src/main/java/com/stripe/param/terminal/ConfigurationCreateParams.java +++ b/src/main/java/com/stripe/param/terminal/ConfigurationCreateParams.java @@ -578,6 +578,10 @@ public static class Tipping { @SerializedName("hkd") Hkd hkd; + /** Tipping configuration for JPY. */ + @SerializedName("jpy") + Jpy jpy; + /** Tipping configuration for MYR. */ @SerializedName("myr") Myr myr; @@ -616,6 +620,7 @@ private Tipping( Map extraParams, Gbp gbp, Hkd hkd, + Jpy jpy, Myr myr, Nok nok, Nzd nzd, @@ -632,6 +637,7 @@ private Tipping( this.extraParams = extraParams; this.gbp = gbp; this.hkd = hkd; + this.jpy = jpy; this.myr = myr; this.nok = nok; this.nzd = nzd; @@ -664,6 +670,8 @@ public static class Builder { private Hkd hkd; + private Jpy jpy; + private Myr myr; private Nok nok; @@ -690,6 +698,7 @@ public ConfigurationCreateParams.Tipping build() { this.extraParams, this.gbp, this.hkd, + this.jpy, this.myr, this.nok, this.nzd, @@ -773,6 +782,12 @@ public Builder setHkd(ConfigurationCreateParams.Tipping.Hkd hkd) { return this; } + /** Tipping configuration for JPY. */ + public Builder setJpy(ConfigurationCreateParams.Tipping.Jpy jpy) { + this.jpy = jpy; + return this; + } + /** Tipping configuration for MYR. */ public Builder setMyr(ConfigurationCreateParams.Tipping.Myr myr) { this.myr = myr; @@ -1992,6 +2007,153 @@ public Builder setSmartTipThreshold(Long smartTipThreshold) { } } + @Getter + public static class Jpy { + /** + * 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; + + /** Fixed amounts displayed when collecting a tip. */ + @SerializedName("fixed_amounts") + List fixedAmounts; + + /** Percentages displayed when collecting a tip. */ + @SerializedName("percentages") + List percentages; + + /** + * Below this amount, fixed amounts will be displayed; above it, percentages will be + * displayed. + */ + @SerializedName("smart_tip_threshold") + Long smartTipThreshold; + + private Jpy( + Map extraParams, + List fixedAmounts, + List percentages, + Long smartTipThreshold) { + this.extraParams = extraParams; + this.fixedAmounts = fixedAmounts; + this.percentages = percentages; + this.smartTipThreshold = smartTipThreshold; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List fixedAmounts; + + private List percentages; + + private Long smartTipThreshold; + + /** Finalize and obtain parameter instance from this builder. */ + public ConfigurationCreateParams.Tipping.Jpy build() { + return new ConfigurationCreateParams.Tipping.Jpy( + this.extraParams, this.fixedAmounts, this.percentages, this.smartTipThreshold); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link ConfigurationCreateParams.Tipping.Jpy#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link ConfigurationCreateParams.Tipping.Jpy#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 `fixedAmounts` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * ConfigurationCreateParams.Tipping.Jpy#fixedAmounts} for the field documentation. + */ + public Builder addFixedAmount(Long element) { + if (this.fixedAmounts == null) { + this.fixedAmounts = new ArrayList<>(); + } + this.fixedAmounts.add(element); + return this; + } + + /** + * Add all elements to `fixedAmounts` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * ConfigurationCreateParams.Tipping.Jpy#fixedAmounts} for the field documentation. + */ + public Builder addAllFixedAmount(List elements) { + if (this.fixedAmounts == null) { + this.fixedAmounts = new ArrayList<>(); + } + this.fixedAmounts.addAll(elements); + return this; + } + + /** + * Add an element to `percentages` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * ConfigurationCreateParams.Tipping.Jpy#percentages} for the field documentation. + */ + public Builder addPercentage(Long element) { + if (this.percentages == null) { + this.percentages = new ArrayList<>(); + } + this.percentages.add(element); + return this; + } + + /** + * Add all elements to `percentages` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * ConfigurationCreateParams.Tipping.Jpy#percentages} for the field documentation. + */ + public Builder addAllPercentage(List elements) { + if (this.percentages == null) { + this.percentages = new ArrayList<>(); + } + this.percentages.addAll(elements); + return this; + } + + /** + * Below this amount, fixed amounts will be displayed; above it, percentages will be + * displayed. + */ + public Builder setSmartTipThreshold(Long smartTipThreshold) { + this.smartTipThreshold = smartTipThreshold; + return this; + } + } + } + @Getter public static class Myr { /** diff --git a/src/main/java/com/stripe/param/terminal/ConfigurationUpdateParams.java b/src/main/java/com/stripe/param/terminal/ConfigurationUpdateParams.java index 14d6e837773..5064fad65fc 100644 --- a/src/main/java/com/stripe/param/terminal/ConfigurationUpdateParams.java +++ b/src/main/java/com/stripe/param/terminal/ConfigurationUpdateParams.java @@ -608,6 +608,10 @@ public static class Tipping { @SerializedName("hkd") Hkd hkd; + /** Tipping configuration for JPY. */ + @SerializedName("jpy") + Jpy jpy; + /** Tipping configuration for MYR. */ @SerializedName("myr") Myr myr; @@ -646,6 +650,7 @@ private Tipping( Map extraParams, Gbp gbp, Hkd hkd, + Jpy jpy, Myr myr, Nok nok, Nzd nzd, @@ -662,6 +667,7 @@ private Tipping( this.extraParams = extraParams; this.gbp = gbp; this.hkd = hkd; + this.jpy = jpy; this.myr = myr; this.nok = nok; this.nzd = nzd; @@ -694,6 +700,8 @@ public static class Builder { private Hkd hkd; + private Jpy jpy; + private Myr myr; private Nok nok; @@ -720,6 +728,7 @@ public ConfigurationUpdateParams.Tipping build() { this.extraParams, this.gbp, this.hkd, + this.jpy, this.myr, this.nok, this.nzd, @@ -803,6 +812,12 @@ public Builder setHkd(ConfigurationUpdateParams.Tipping.Hkd hkd) { return this; } + /** Tipping configuration for JPY. */ + public Builder setJpy(ConfigurationUpdateParams.Tipping.Jpy jpy) { + this.jpy = jpy; + return this; + } + /** Tipping configuration for MYR. */ public Builder setMyr(ConfigurationUpdateParams.Tipping.Myr myr) { this.myr = myr; @@ -2022,6 +2037,153 @@ public Builder setSmartTipThreshold(Long smartTipThreshold) { } } + @Getter + public static class Jpy { + /** + * 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; + + /** Fixed amounts displayed when collecting a tip. */ + @SerializedName("fixed_amounts") + List fixedAmounts; + + /** Percentages displayed when collecting a tip. */ + @SerializedName("percentages") + List percentages; + + /** + * Below this amount, fixed amounts will be displayed; above it, percentages will be + * displayed. + */ + @SerializedName("smart_tip_threshold") + Long smartTipThreshold; + + private Jpy( + Map extraParams, + List fixedAmounts, + List percentages, + Long smartTipThreshold) { + this.extraParams = extraParams; + this.fixedAmounts = fixedAmounts; + this.percentages = percentages; + this.smartTipThreshold = smartTipThreshold; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List fixedAmounts; + + private List percentages; + + private Long smartTipThreshold; + + /** Finalize and obtain parameter instance from this builder. */ + public ConfigurationUpdateParams.Tipping.Jpy build() { + return new ConfigurationUpdateParams.Tipping.Jpy( + this.extraParams, this.fixedAmounts, this.percentages, this.smartTipThreshold); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link ConfigurationUpdateParams.Tipping.Jpy#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link ConfigurationUpdateParams.Tipping.Jpy#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 `fixedAmounts` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * ConfigurationUpdateParams.Tipping.Jpy#fixedAmounts} for the field documentation. + */ + public Builder addFixedAmount(Long element) { + if (this.fixedAmounts == null) { + this.fixedAmounts = new ArrayList<>(); + } + this.fixedAmounts.add(element); + return this; + } + + /** + * Add all elements to `fixedAmounts` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * ConfigurationUpdateParams.Tipping.Jpy#fixedAmounts} for the field documentation. + */ + public Builder addAllFixedAmount(List elements) { + if (this.fixedAmounts == null) { + this.fixedAmounts = new ArrayList<>(); + } + this.fixedAmounts.addAll(elements); + return this; + } + + /** + * Add an element to `percentages` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * ConfigurationUpdateParams.Tipping.Jpy#percentages} for the field documentation. + */ + public Builder addPercentage(Long element) { + if (this.percentages == null) { + this.percentages = new ArrayList<>(); + } + this.percentages.add(element); + return this; + } + + /** + * Add all elements to `percentages` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * ConfigurationUpdateParams.Tipping.Jpy#percentages} for the field documentation. + */ + public Builder addAllPercentage(List elements) { + if (this.percentages == null) { + this.percentages = new ArrayList<>(); + } + this.percentages.addAll(elements); + return this; + } + + /** + * Below this amount, fixed amounts will be displayed; above it, percentages will be + * displayed. + */ + public Builder setSmartTipThreshold(Long smartTipThreshold) { + this.smartTipThreshold = smartTipThreshold; + return this; + } + } + } + @Getter public static class Myr { /** diff --git a/src/main/java/com/stripe/param/treasury/FinancialAccountCloseParams.java b/src/main/java/com/stripe/param/treasury/FinancialAccountCloseParams.java new file mode 100644 index 00000000000..4e233be85c2 --- /dev/null +++ b/src/main/java/com/stripe/param/treasury/FinancialAccountCloseParams.java @@ -0,0 +1,238 @@ +// File generated from our OpenAPI spec +package com.stripe.param.treasury; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import lombok.Getter; + +@Getter +public class FinancialAccountCloseParams extends ApiRequestParams { + /** Specifies which fields in the response should be expanded. */ + @SerializedName("expand") + List expand; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * A different bank account where funds can be deposited/debited in order to get the closing FA's + * balance to $0. + */ + @SerializedName("forwarding_settings") + ForwardingSettings forwardingSettings; + + private FinancialAccountCloseParams( + List expand, Map extraParams, ForwardingSettings forwardingSettings) { + this.expand = expand; + this.extraParams = extraParams; + this.forwardingSettings = forwardingSettings; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private List expand; + + private Map extraParams; + + private ForwardingSettings forwardingSettings; + + /** Finalize and obtain parameter instance from this builder. */ + public FinancialAccountCloseParams build() { + return new FinancialAccountCloseParams( + this.expand, this.extraParams, this.forwardingSettings); + } + + /** + * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * FinancialAccountCloseParams#expand} for the field documentation. + */ + public Builder addExpand(String element) { + if (this.expand == null) { + this.expand = new ArrayList<>(); + } + this.expand.add(element); + return this; + } + + /** + * Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * FinancialAccountCloseParams#expand} for the field documentation. + */ + public Builder addAllExpand(List elements) { + if (this.expand == null) { + this.expand = new ArrayList<>(); + } + this.expand.addAll(elements); + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * FinancialAccountCloseParams#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 FinancialAccountCloseParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * A different bank account where funds can be deposited/debited in order to get the closing + * FA's balance to $0. + */ + public Builder setForwardingSettings( + FinancialAccountCloseParams.ForwardingSettings forwardingSettings) { + this.forwardingSettings = forwardingSettings; + return this; + } + } + + @Getter + public static class ForwardingSettings { + /** + * 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 financial_account id. */ + @SerializedName("financial_account") + String financialAccount; + + /** The payment_method or bank account id. This needs to be a verified bank account. */ + @SerializedName("payment_method") + String paymentMethod; + + /** + * Required. The type of the bank account provided. This can be either + * "financial_account" or "payment_method" + */ + @SerializedName("type") + Type type; + + private ForwardingSettings( + Map extraParams, String financialAccount, String paymentMethod, Type type) { + this.extraParams = extraParams; + this.financialAccount = financialAccount; + this.paymentMethod = paymentMethod; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String financialAccount; + + private String paymentMethod; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public FinancialAccountCloseParams.ForwardingSettings build() { + return new FinancialAccountCloseParams.ForwardingSettings( + this.extraParams, this.financialAccount, this.paymentMethod, 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 + * FinancialAccountCloseParams.ForwardingSettings#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 FinancialAccountCloseParams.ForwardingSettings#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 financial_account id. */ + public Builder setFinancialAccount(String financialAccount) { + this.financialAccount = financialAccount; + return this; + } + + /** The payment_method or bank account id. This needs to be a verified bank account. */ + public Builder setPaymentMethod(String paymentMethod) { + this.paymentMethod = paymentMethod; + return this; + } + + /** + * Required. The type of the bank account provided. This can be either + * "financial_account" or "payment_method" + */ + public Builder setType(FinancialAccountCloseParams.ForwardingSettings.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("financial_account") + FINANCIAL_ACCOUNT("financial_account"), + + @SerializedName("payment_method") + PAYMENT_METHOD("payment_method"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } +} diff --git a/src/main/java/com/stripe/param/treasury/FinancialAccountCreateParams.java b/src/main/java/com/stripe/param/treasury/FinancialAccountCreateParams.java index 39a9c4d8876..08e76643f35 100644 --- a/src/main/java/com/stripe/param/treasury/FinancialAccountCreateParams.java +++ b/src/main/java/com/stripe/param/treasury/FinancialAccountCreateParams.java @@ -3,6 +3,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; +import com.stripe.param.common.EmptyParam; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -40,6 +41,10 @@ public class FinancialAccountCreateParams extends ApiRequestParams { @SerializedName("metadata") Map metadata; + /** The nickname for the FinancialAccount. */ + @SerializedName("nickname") + Object nickname; + /** The set of functionalities that the platform can restrict on the FinancialAccount. */ @SerializedName("platform_restrictions") PlatformRestrictions platformRestrictions; @@ -53,12 +58,14 @@ private FinancialAccountCreateParams( Map extraParams, Features features, Map metadata, + Object nickname, PlatformRestrictions platformRestrictions, List supportedCurrencies) { this.expand = expand; this.extraParams = extraParams; this.features = features; this.metadata = metadata; + this.nickname = nickname; this.platformRestrictions = platformRestrictions; this.supportedCurrencies = supportedCurrencies; } @@ -76,6 +83,8 @@ public static class Builder { private Map metadata; + private Object nickname; + private PlatformRestrictions platformRestrictions; private List supportedCurrencies; @@ -87,6 +96,7 @@ public FinancialAccountCreateParams build() { this.extraParams, this.features, this.metadata, + this.nickname, this.platformRestrictions, this.supportedCurrencies); } @@ -178,6 +188,18 @@ public Builder putAllMetadata(Map map) { return this; } + /** The nickname for the FinancialAccount. */ + public Builder setNickname(String nickname) { + this.nickname = nickname; + return this; + } + + /** The nickname for the FinancialAccount. */ + public Builder setNickname(EmptyParam nickname) { + this.nickname = nickname; + return this; + } + /** The set of functionalities that the platform can restrict on the FinancialAccount. */ public Builder setPlatformRestrictions( FinancialAccountCreateParams.PlatformRestrictions platformRestrictions) { diff --git a/src/main/java/com/stripe/param/treasury/FinancialAccountUpdateParams.java b/src/main/java/com/stripe/param/treasury/FinancialAccountUpdateParams.java index 07b4a040983..d0eb523258f 100644 --- a/src/main/java/com/stripe/param/treasury/FinancialAccountUpdateParams.java +++ b/src/main/java/com/stripe/param/treasury/FinancialAccountUpdateParams.java @@ -3,6 +3,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; +import com.stripe.param.common.EmptyParam; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -32,6 +33,13 @@ public class FinancialAccountUpdateParams extends ApiRequestParams { @SerializedName("features") Features features; + /** + * A different bank account where funds can be deposited/debited in order to get the closing FA's + * balance to $0. + */ + @SerializedName("forwarding_settings") + ForwardingSettings forwardingSettings; + /** * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a @@ -41,6 +49,10 @@ public class FinancialAccountUpdateParams extends ApiRequestParams { @SerializedName("metadata") Map metadata; + /** The nickname for the FinancialAccount. */ + @SerializedName("nickname") + Object nickname; + /** The set of functionalities that the platform can restrict on the FinancialAccount. */ @SerializedName("platform_restrictions") PlatformRestrictions platformRestrictions; @@ -49,12 +61,16 @@ private FinancialAccountUpdateParams( List expand, Map extraParams, Features features, + ForwardingSettings forwardingSettings, Map metadata, + Object nickname, PlatformRestrictions platformRestrictions) { this.expand = expand; this.extraParams = extraParams; this.features = features; + this.forwardingSettings = forwardingSettings; this.metadata = metadata; + this.nickname = nickname; this.platformRestrictions = platformRestrictions; } @@ -69,14 +85,24 @@ public static class Builder { private Features features; + private ForwardingSettings forwardingSettings; + private Map metadata; + private Object nickname; + private PlatformRestrictions platformRestrictions; /** Finalize and obtain parameter instance from this builder. */ public FinancialAccountUpdateParams build() { return new FinancialAccountUpdateParams( - this.expand, this.extraParams, this.features, this.metadata, this.platformRestrictions); + this.expand, + this.extraParams, + this.features, + this.forwardingSettings, + this.metadata, + this.nickname, + this.platformRestrictions); } /** @@ -141,6 +167,16 @@ public Builder setFeatures(FinancialAccountUpdateParams.Features features) { return this; } + /** + * A different bank account where funds can be deposited/debited in order to get the closing + * FA's balance to $0. + */ + public Builder setForwardingSettings( + FinancialAccountUpdateParams.ForwardingSettings forwardingSettings) { + this.forwardingSettings = forwardingSettings; + return this; + } + /** * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` call, * and subsequent calls add additional key/value pairs to the original map. See {@link @@ -167,6 +203,18 @@ public Builder putAllMetadata(Map map) { return this; } + /** The nickname for the FinancialAccount. */ + public Builder setNickname(String nickname) { + this.nickname = nickname; + return this; + } + + /** The nickname for the FinancialAccount. */ + public Builder setNickname(EmptyParam nickname) { + this.nickname = nickname; + return this; + } + /** The set of functionalities that the platform can restrict on the FinancialAccount. */ public Builder setPlatformRestrictions( FinancialAccountUpdateParams.PlatformRestrictions platformRestrictions) { @@ -1346,6 +1394,136 @@ public Builder setRequested(Boolean requested) { } } + @Getter + public static class ForwardingSettings { + /** + * 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 financial_account id. */ + @SerializedName("financial_account") + Object financialAccount; + + /** The payment_method or bank account id. This needs to be a verified bank account. */ + @SerializedName("payment_method") + Object paymentMethod; + + /** + * Required. The type of the bank account provided. This can be either + * "financial_account" or "payment_method" + */ + @SerializedName("type") + Type type; + + private ForwardingSettings( + Map extraParams, Object financialAccount, Object paymentMethod, Type type) { + this.extraParams = extraParams; + this.financialAccount = financialAccount; + this.paymentMethod = paymentMethod; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object financialAccount; + + private Object paymentMethod; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public FinancialAccountUpdateParams.ForwardingSettings build() { + return new FinancialAccountUpdateParams.ForwardingSettings( + this.extraParams, this.financialAccount, this.paymentMethod, 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 + * FinancialAccountUpdateParams.ForwardingSettings#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 FinancialAccountUpdateParams.ForwardingSettings#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 financial_account id. */ + public Builder setFinancialAccount(String financialAccount) { + this.financialAccount = financialAccount; + return this; + } + + /** The financial_account id. */ + public Builder setFinancialAccount(EmptyParam financialAccount) { + this.financialAccount = financialAccount; + return this; + } + + /** The payment_method or bank account id. This needs to be a verified bank account. */ + public Builder setPaymentMethod(String paymentMethod) { + this.paymentMethod = paymentMethod; + return this; + } + + /** The payment_method or bank account id. This needs to be a verified bank account. */ + public Builder setPaymentMethod(EmptyParam paymentMethod) { + this.paymentMethod = paymentMethod; + return this; + } + + /** + * Required. The type of the bank account provided. This can be either + * "financial_account" or "payment_method" + */ + public Builder setType(FinancialAccountUpdateParams.ForwardingSettings.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("financial_account") + FINANCIAL_ACCOUNT("financial_account"), + + @SerializedName("payment_method") + PAYMENT_METHOD("payment_method"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + @Getter public static class PlatformRestrictions { /** diff --git a/src/main/java/com/stripe/param/treasury/OutboundTransferCreateParams.java b/src/main/java/com/stripe/param/treasury/OutboundTransferCreateParams.java index a429dfc5e61..0c437bd2aec 100644 --- a/src/main/java/com/stripe/param/treasury/OutboundTransferCreateParams.java +++ b/src/main/java/com/stripe/param/treasury/OutboundTransferCreateParams.java @@ -32,6 +32,13 @@ public class OutboundTransferCreateParams extends ApiRequestParams { @SerializedName("destination_payment_method") String destinationPaymentMethod; + /** + * Hash used to generate the PaymentMethod to be used for this OutboundTransfer. Exclusive with + * {@code destination_payment_method}. + */ + @SerializedName("destination_payment_method_data") + DestinationPaymentMethodData destinationPaymentMethodData; + /** Hash describing payment method configuration details. */ @SerializedName("destination_payment_method_options") DestinationPaymentMethodOptions destinationPaymentMethodOptions; @@ -75,6 +82,7 @@ private OutboundTransferCreateParams( String currency, String description, String destinationPaymentMethod, + DestinationPaymentMethodData destinationPaymentMethodData, DestinationPaymentMethodOptions destinationPaymentMethodOptions, List expand, Map extraParams, @@ -85,6 +93,7 @@ private OutboundTransferCreateParams( this.currency = currency; this.description = description; this.destinationPaymentMethod = destinationPaymentMethod; + this.destinationPaymentMethodData = destinationPaymentMethodData; this.destinationPaymentMethodOptions = destinationPaymentMethodOptions; this.expand = expand; this.extraParams = extraParams; @@ -106,6 +115,8 @@ public static class Builder { private String destinationPaymentMethod; + private DestinationPaymentMethodData destinationPaymentMethodData; + private DestinationPaymentMethodOptions destinationPaymentMethodOptions; private List expand; @@ -125,6 +136,7 @@ public OutboundTransferCreateParams build() { this.currency, this.description, this.destinationPaymentMethod, + this.destinationPaymentMethodData, this.destinationPaymentMethodOptions, this.expand, this.extraParams, @@ -161,6 +173,16 @@ public Builder setDestinationPaymentMethod(String destinationPaymentMethod) { return this; } + /** + * Hash used to generate the PaymentMethod to be used for this OutboundTransfer. Exclusive with + * {@code destination_payment_method}. + */ + public Builder setDestinationPaymentMethodData( + OutboundTransferCreateParams.DestinationPaymentMethodData destinationPaymentMethodData) { + this.destinationPaymentMethodData = destinationPaymentMethodData; + return this; + } + /** Hash describing payment method configuration details. */ public Builder setDestinationPaymentMethodOptions( OutboundTransferCreateParams.DestinationPaymentMethodOptions @@ -264,6 +286,109 @@ public Builder setStatementDescriptor(String statementDescriptor) { } } + @Getter + public static class DestinationPaymentMethodData { + /** + * 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 if type is set to {@code financial_account}. The FinancialAccount ID to send funds + * to. + */ + @SerializedName("financial_account") + String financialAccount; + + /** Required. The type of the destination. */ + @SerializedName("type") + Type type; + + private DestinationPaymentMethodData( + Map extraParams, String financialAccount, Type type) { + this.extraParams = extraParams; + this.financialAccount = financialAccount; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String financialAccount; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public OutboundTransferCreateParams.DestinationPaymentMethodData build() { + return new OutboundTransferCreateParams.DestinationPaymentMethodData( + this.extraParams, this.financialAccount, 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 + * OutboundTransferCreateParams.DestinationPaymentMethodData#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 OutboundTransferCreateParams.DestinationPaymentMethodData#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 if type is set to {@code financial_account}. The FinancialAccount ID to send funds + * to. + */ + public Builder setFinancialAccount(String financialAccount) { + this.financialAccount = financialAccount; + return this; + } + + /** Required. The type of the destination. */ + public Builder setType(OutboundTransferCreateParams.DestinationPaymentMethodData.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("financial_account") + FINANCIAL_ACCOUNT("financial_account"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + @Getter public static class DestinationPaymentMethodOptions { /** diff --git a/src/main/java/com/stripe/param/treasury/ReceivedCreditListParams.java b/src/main/java/com/stripe/param/treasury/ReceivedCreditListParams.java index 3eee3863093..1ec6d016a2c 100644 --- a/src/main/java/com/stripe/param/treasury/ReceivedCreditListParams.java +++ b/src/main/java/com/stripe/param/treasury/ReceivedCreditListParams.java @@ -298,6 +298,9 @@ public enum SourceFlowType implements ApiRequestParams.EnumParam { @SerializedName("outbound_payment") OUTBOUND_PAYMENT("outbound_payment"), + @SerializedName("outbound_transfer") + OUTBOUND_TRANSFER("outbound_transfer"), + @SerializedName("payout") PAYOUT("payout"); diff --git a/src/main/java/com/stripe/service/treasury/FinancialAccountService.java b/src/main/java/com/stripe/service/treasury/FinancialAccountService.java index 8c037c6c570..64b227cf9b1 100644 --- a/src/main/java/com/stripe/service/treasury/FinancialAccountService.java +++ b/src/main/java/com/stripe/service/treasury/FinancialAccountService.java @@ -12,6 +12,7 @@ import com.stripe.net.BaseAddress; import com.stripe.net.RequestOptions; import com.stripe.net.StripeResponseGetter; +import com.stripe.param.treasury.FinancialAccountCloseParams; import com.stripe.param.treasury.FinancialAccountCreateParams; import com.stripe.param.treasury.FinancialAccountListParams; import com.stripe.param.treasury.FinancialAccountRetrieveParams; @@ -131,6 +132,48 @@ public FinancialAccount update( options); return this.request(request, FinancialAccount.class); } + /** + * Closes a FinancialAccount. A FinancialAccount can only be closed if it has a zero balance, has + * no pending InboundTransfers, and has canceled all attached Issuing cards. + */ + public FinancialAccount close(String financialAccount, FinancialAccountCloseParams params) + throws StripeException { + return close(financialAccount, params, (RequestOptions) null); + } + /** + * Closes a FinancialAccount. A FinancialAccount can only be closed if it has a zero balance, has + * no pending InboundTransfers, and has canceled all attached Issuing cards. + */ + public FinancialAccount close(String financialAccount, RequestOptions options) + throws StripeException { + return close(financialAccount, (FinancialAccountCloseParams) null, options); + } + /** + * Closes a FinancialAccount. A FinancialAccount can only be closed if it has a zero balance, has + * no pending InboundTransfers, and has canceled all attached Issuing cards. + */ + public FinancialAccount close(String financialAccount) throws StripeException { + return close(financialAccount, (FinancialAccountCloseParams) null, (RequestOptions) null); + } + /** + * Closes a FinancialAccount. A FinancialAccount can only be closed if it has a zero balance, has + * no pending InboundTransfers, and has canceled all attached Issuing cards. + */ + public FinancialAccount close( + String financialAccount, FinancialAccountCloseParams params, RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/treasury/financial_accounts/%s/close", ApiResource.urlEncodeId(financialAccount)); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, FinancialAccount.class); + } public com.stripe.service.treasury.FinancialAccountFeaturesService features() { return new com.stripe.service.treasury.FinancialAccountFeaturesService( diff --git a/src/test/java/com/stripe/functional/GeneratedExamples.java b/src/test/java/com/stripe/functional/GeneratedExamples.java index 1901347e306..9a7629fb569 100644 --- a/src/test/java/com/stripe/functional/GeneratedExamples.java +++ b/src/test/java/com/stripe/functional/GeneratedExamples.java @@ -11906,6 +11906,50 @@ public void testTerminalReadersProcessPaymentIntentPostServices() throws StripeE null); } + @Test + public void testTerminalReadersProcessSetupIntentPost() throws StripeException { + com.stripe.model.terminal.Reader resource = + com.stripe.model.terminal.Reader.retrieve("tmr_xxxxxxxxxxxxx"); + + com.stripe.param.terminal.ReaderProcessSetupIntentParams params = + com.stripe.param.terminal.ReaderProcessSetupIntentParams.builder() + .setSetupIntent("seti_xxxxxxxxxxxxx") + .setAllowRedisplay( + com.stripe.param.terminal.ReaderProcessSetupIntentParams.AllowRedisplay.ALWAYS) + .build(); + + com.stripe.model.terminal.Reader reader = resource.processSetupIntent(params); + assertNotNull(reader); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v1/terminal/readers/tmr_xxxxxxxxxxxxx/process_setup_intent", + params.toMap(), + null); + } + + @Test + public void testTerminalReadersProcessSetupIntentPostServices() throws StripeException { + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.terminal.ReaderProcessSetupIntentParams params = + com.stripe.param.terminal.ReaderProcessSetupIntentParams.builder() + .setSetupIntent("seti_xxxxxxxxxxxxx") + .setAllowRedisplay( + com.stripe.param.terminal.ReaderProcessSetupIntentParams.AllowRedisplay.ALWAYS) + .build(); + + com.stripe.model.terminal.Reader reader = + client.terminal().readers().processSetupIntent("tmr_xxxxxxxxxxxxx", params); + assertNotNull(reader); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v1/terminal/readers/tmr_xxxxxxxxxxxxx/process_setup_intent", + params.toMap(), + null); + } + @Test public void testTestHelpersCustomersFundCashBalancePost() throws StripeException { Customer resource = Customer.retrieve("cus_123");