From d5ef11211385918f432d72474836f8ff53146ed4 Mon Sep 17 00:00:00 2001 From: prathmesh-stripe <165320323+prathmesh-stripe@users.noreply.github.com> Date: Fri, 24 Jan 2025 21:26:52 -0500 Subject: [PATCH 01/45] Updated upload artifact ci action (#1941) --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2c03e032fa0..c8e4c0cf005 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -205,7 +205,7 @@ jobs: mv ../japi-compliance-checker/compat_reports/stripe-java/*/compat_report.html report.html - name: Upload report as artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: JAPI Compliance Report path: report.html 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 02/45] 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"); From dfafa652bc29c2154b79670acda4575516880895 Mon Sep 17 00:00:00 2001 From: Helen Ye Date: Mon, 27 Jan 2025 15:18:46 -0500 Subject: [PATCH 03/45] Bump version to 28.3.0 --- CHANGELOG.md | 32 ++++++++++++++++++++++++++++ README.md | 8 +++---- VERSION | 2 +- gradle.properties | 2 +- src/main/java/com/stripe/Stripe.java | 2 +- 5 files changed, 39 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fdf7af92311..c99a473a206 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,37 @@ # Changelog +## 28.3.0 - 2025-01-27 +* [#1936](https://github.com/stripe/stripe-java/pull/1936) Update generated code + * Add support for `close` method on resource `Treasury.FinancialAccount` + * Add support for `pay_by_bank_payments` on `Account.capabilities`, `AccountCreateParams.capabilities`, and `AccountUpdateParams.capabilities` + * Add support for `directorship_declaration` and `ownership_exemption_reason` on `Account.company`, `AccountCreateParams.company`, `AccountUpdateParams.company`, and `TokenCreateParams.account.company` + * Add support for `proof_of_ultimate_beneficial_ownership` on `AccountCreateParams.documents` and `AccountUpdateParams.documents` + * Add support for `financial_account` on `AccountSession.components`, `AccountSessionCreateParams.components`, and `Treasury.OutboundTransfer.destination_payment_method_details` + * Add support for `financial_account_transactions`, `issuing_card`, and `issuing_cards_list` on `AccountSession.components` and `AccountSessionCreateParams.components` + * Add support for `advice_code` on `Charge.outcome`, `Invoice.last_finalization_error`, `PaymentIntent.last_payment_error`, `SetupAttempt.setup_error`, `SetupIntent.last_setup_error`, and `StripeError` + * Add support for `pay_by_bank` on `Charge.payment_method_details`, `ConfirmationToken.payment_method_preview`, `ConfirmationTokenCreateParams.payment_method_data`, `PaymentIntent.payment_method_options`, `PaymentIntentConfirmParams.payment_method_data`, `PaymentIntentConfirmParams.payment_method_options`, `PaymentIntentCreateParams.payment_method_data`, `PaymentIntentCreateParams.payment_method_options`, `PaymentIntentUpdateParams.payment_method_data`, `PaymentIntentUpdateParams.payment_method_options`, `PaymentMethodConfigurationCreateParams`, `PaymentMethodConfigurationUpdateParams`, `PaymentMethodConfiguration`, `PaymentMethodCreateParams`, `PaymentMethodUpdateParams`, `PaymentMethod`, `SetupIntentConfirmParams.payment_method_data`, `SetupIntentCreateParams.payment_method_data`, `SetupIntentUpdateParams.payment_method_data`, and `checkout.SessionCreateParams.payment_method_options` + * Add support for `country` on `Charge.payment_method_details.paypal`, `ConfirmationToken.payment_method_preview.paypal`, and `PaymentMethod.paypal` + * Add support for new value `pay_by_bank` on enums `CustomerListPaymentMethodsParams.type`, `PaymentMethodCreateParams.type`, `PaymentMethodListParams.type`, and `checkout.SessionCreateParams.payment_method_types[]` + * Add support for new value `SD` on enums `PaymentLinkCreateParams.shipping_address_collection.allowed_countries[]`, `PaymentLinkUpdateParams.shipping_address_collection.allowed_countries[]`, and `checkout.SessionCreateParams.shipping_address_collection.allowed_countries[]` + * Add support for `discounts` on `Checkout.Session` + * Add support for new value `pay_by_bank` on enums `ConfirmationTokenCreateParams.payment_method_data.type`, `PaymentIntentConfirmParams.payment_method_data.type`, `PaymentIntentCreateParams.payment_method_data.type`, `PaymentIntentUpdateParams.payment_method_data.type`, `SetupIntentConfirmParams.payment_method_data.type`, `SetupIntentCreateParams.payment_method_data.type`, and `SetupIntentUpdateParams.payment_method_data.type` + * Add support for new value `pay_by_bank` on enums `PaymentLinkCreateParams.payment_method_types[]` and `PaymentLinkUpdateParams.payment_method_types[]` + * Add support for `phone_number_collection` on `PaymentLinkUpdateParams` + * Add support for `jpy` on `Terminal.Configuration.tipping`, `terminal.ConfigurationCreateParams.tipping`, and `terminal.ConfigurationUpdateParams.tipping` + * Add support for `nickname` on `Treasury.FinancialAccount`, `treasury.FinancialAccountCreateParams`, and `treasury.FinancialAccountUpdateParams` + * Add support for `forwarding_settings` on `treasury.FinancialAccountUpdateParams` + * Add support for `is_default` on `Treasury.FinancialAccount` + * Add support for `destination_payment_method_data` on `treasury.OutboundTransferCreateParams` + * Change type of `Treasury.OutboundTransfer.destination_payment_method_details.type` from `literal('us_bank_account')` to `enum('financial_account'|'us_bank_account')` + * Add support for new value `outbound_transfer` on enum `treasury.ReceivedCreditListParams.linked_flows.source_flow_type` + * Add support for `outbound_transfer` on `Treasury.ReceivedCredit.linked_flows.source_flow_details` + * Add support for new value `2025-01-27.acacia` on enum `WebhookEndpointCreateParams.api_version` +* [#1941](https://github.com/stripe/stripe-java/pull/1941) Updated upload artifact ci action +* [#1938](https://github.com/stripe/stripe-java/pull/1938) update justfile import & pin CI ubuntu +* [#1937](https://github.com/stripe/stripe-java/pull/1937) Added CONTRIBUTING.md file +* [#1934](https://github.com/stripe/stripe-java/pull/1934) add justfile tweak readme, remove coveralls +* [#1933](https://github.com/stripe/stripe-java/pull/1933) Added pull request template + ## 28.2.0 - 2024-12-18 * [#1931](https://github.com/stripe/stripe-java/pull/1931) This release changes the pinned API version to `2024-12-18.acacia`. * Add support for `network_advice_code` and `network_decline_code` on `Charge.outcome`, `Invoice.last_finalization_error`, `PaymentIntent.last_payment_error`, `SetupAttempt.setup_error`, `SetupIntent.last_setup_error`, and `StripeError` diff --git a/README.md b/README.md index adf3238be44..c8e31092939 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Stripe Java client library -[![Maven Central](https://img.shields.io/badge/maven--central-v28.2.0-blue)](https://mvnrepository.com/artifact/com.stripe/stripe-java) +[![Maven Central](https://img.shields.io/badge/maven--central-v28.3.0-blue)](https://mvnrepository.com/artifact/com.stripe/stripe-java) [![JavaDoc](http://img.shields.io/badge/javadoc-reference-blue.svg)](https://stripe.dev/stripe-java) [![Build Status](https://github.com/stripe/stripe-java/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/stripe/stripe-java/actions?query=branch%3Amaster) @@ -17,7 +17,7 @@ The official [Stripe][stripe] Java client library. Add this dependency to your project's build file: ```groovy -implementation "com.stripe:stripe-java:28.2.0" +implementation "com.stripe:stripe-java:28.3.0" ``` ### Maven users @@ -28,7 +28,7 @@ Add this dependency to your project's POM: com.stripe stripe-java - 28.2.0 + 28.3.0 ``` @@ -36,7 +36,7 @@ Add this dependency to your project's POM: You'll need to manually install the following JARs: -- [The Stripe JAR](https://search.maven.org/remotecontent?filepath=com/stripe/stripe-java/28.2.0/stripe-java-28.2.0.jar) +- [The Stripe JAR](https://search.maven.org/remotecontent?filepath=com/stripe/stripe-java/28.3.0/stripe-java-28.3.0.jar) - [Google Gson][gson] from . ### [ProGuard][proguard] diff --git a/VERSION b/VERSION index 55ee98da7a2..f2d2bcec292 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -28.2.0 +28.3.0 diff --git a/gradle.properties b/gradle.properties index 2dcb90b6b55..561a53e1d4e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ GROUP=com.stripe -VERSION_NAME=28.2.0 +VERSION_NAME=28.3.0 POM_URL=https://github.com/stripe/stripe-java POM_SCM_URL=git@github.com:stripe/stripe-java.git diff --git a/src/main/java/com/stripe/Stripe.java b/src/main/java/com/stripe/Stripe.java index c24ef61f842..16208d53dda 100644 --- a/src/main/java/com/stripe/Stripe.java +++ b/src/main/java/com/stripe/Stripe.java @@ -14,7 +14,7 @@ public abstract class Stripe { public static final String LIVE_API_BASE = "https://api.stripe.com"; public static final String UPLOAD_API_BASE = "https://files.stripe.com"; public static final String METER_EVENTS_API_BASE = "https://meter-events.stripe.com"; - public static final String VERSION = "28.2.0"; + public static final String VERSION = "28.3.0"; public static volatile String apiKey; public static volatile String clientId; From 7c991963d32de62c52b34d4ba4e5c344c70b438c Mon Sep 17 00:00:00 2001 From: David Brownman <109395161+xavdid-stripe@users.noreply.github.com> Date: Wed, 5 Feb 2025 11:49:33 -0800 Subject: [PATCH 04/45] Ensure `getRawJsonObject` returns data for constructed webhooks (#1946) * construct fake response during webhook parsing * formatting --- src/main/java/com/stripe/net/Webhook.java | 8 ++++++++ src/test/java/com/stripe/net/WebhookTest.java | 10 ++++++++++ 2 files changed, 18 insertions(+) diff --git a/src/main/java/com/stripe/net/Webhook.java b/src/main/java/com/stripe/net/Webhook.java index 7b5a34febf2..ea67ea34362 100644 --- a/src/main/java/com/stripe/net/Webhook.java +++ b/src/main/java/com/stripe/net/Webhook.java @@ -9,6 +9,7 @@ import java.security.NoSuchAlgorithmException; import java.time.Clock; import java.util.ArrayList; +import java.util.Collections; import java.util.List; import javax.crypto.Mac; import javax.crypto.spec.SecretKeySpec; @@ -72,6 +73,13 @@ public static Event constructEvent( StripeObject.deserializeStripeObject( payload, Event.class, ApiResource.getGlobalResponseGetter()); Signature.verifyHeader(payload, sigHeader, secret, tolerance, clock); + // StripeObjects source their raw JSON object from their last response, but constructed webhooks + // don't have that + // in order to make the raw object available on parsed events, we fake the response. + if (event.getLastResponse() == null) { + event.setLastResponse( + new StripeResponse(200, HttpHeaders.of(Collections.emptyMap()), payload)); + } return event; } diff --git a/src/test/java/com/stripe/net/WebhookTest.java b/src/test/java/com/stripe/net/WebhookTest.java index 175f0cd5feb..c6a9c89aa77 100644 --- a/src/test/java/com/stripe/net/WebhookTest.java +++ b/src/test/java/com/stripe/net/WebhookTest.java @@ -1,5 +1,6 @@ package com.stripe.net; +import static org.junit.Assert.assertNotNull; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -325,4 +326,13 @@ public void testStripeClientConstructEventWithTolerance() Mockito.verify(responseGetter).request(Mockito.any(), Mockito.any()); } + + @Test + public void testConstructEventWithRawJson() + throws StripeException, NoSuchAlgorithmException, InvalidKeyException { + + final Event event = Webhook.constructEvent(payload, generateSigHeader(), secret); + + assertNotNull(event.getRawJsonObject()); + } } From 5ff511343da875e9c75b2dd753154bb9d6ffb032 Mon Sep 17 00:00:00 2001 From: David Brownman Date: Fri, 7 Feb 2025 13:23:52 -0800 Subject: [PATCH 05/45] Bump version to 28.3.1 --- CHANGELOG.md | 3 +++ README.md | 8 ++++---- VERSION | 2 +- gradle.properties | 2 +- src/main/java/com/stripe/Stripe.java | 2 +- 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c99a473a206..8af0bf12bf7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +## 28.3.1 - 2025-02-07 +* [#1946](https://github.com/stripe/stripe-java/pull/1946) Ensure `getRawJsonObject` returns data for constructed webhooks + ## 28.3.0 - 2025-01-27 * [#1936](https://github.com/stripe/stripe-java/pull/1936) Update generated code * Add support for `close` method on resource `Treasury.FinancialAccount` diff --git a/README.md b/README.md index c8e31092939..c3effc0a211 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Stripe Java client library -[![Maven Central](https://img.shields.io/badge/maven--central-v28.3.0-blue)](https://mvnrepository.com/artifact/com.stripe/stripe-java) +[![Maven Central](https://img.shields.io/badge/maven--central-v28.3.1-blue)](https://mvnrepository.com/artifact/com.stripe/stripe-java) [![JavaDoc](http://img.shields.io/badge/javadoc-reference-blue.svg)](https://stripe.dev/stripe-java) [![Build Status](https://github.com/stripe/stripe-java/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/stripe/stripe-java/actions?query=branch%3Amaster) @@ -17,7 +17,7 @@ The official [Stripe][stripe] Java client library. Add this dependency to your project's build file: ```groovy -implementation "com.stripe:stripe-java:28.3.0" +implementation "com.stripe:stripe-java:28.3.1" ``` ### Maven users @@ -28,7 +28,7 @@ Add this dependency to your project's POM: com.stripe stripe-java - 28.3.0 + 28.3.1 ``` @@ -36,7 +36,7 @@ Add this dependency to your project's POM: You'll need to manually install the following JARs: -- [The Stripe JAR](https://search.maven.org/remotecontent?filepath=com/stripe/stripe-java/28.3.0/stripe-java-28.3.0.jar) +- [The Stripe JAR](https://search.maven.org/remotecontent?filepath=com/stripe/stripe-java/28.3.1/stripe-java-28.3.1.jar) - [Google Gson][gson] from . ### [ProGuard][proguard] diff --git a/VERSION b/VERSION index f2d2bcec292..e5ef00e6458 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -28.3.0 +28.3.1 diff --git a/gradle.properties b/gradle.properties index 561a53e1d4e..06b569e9169 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ GROUP=com.stripe -VERSION_NAME=28.3.0 +VERSION_NAME=28.3.1 POM_URL=https://github.com/stripe/stripe-java POM_SCM_URL=git@github.com:stripe/stripe-java.git diff --git a/src/main/java/com/stripe/Stripe.java b/src/main/java/com/stripe/Stripe.java index 16208d53dda..2c854f7dc3e 100644 --- a/src/main/java/com/stripe/Stripe.java +++ b/src/main/java/com/stripe/Stripe.java @@ -14,7 +14,7 @@ public abstract class Stripe { public static final String LIVE_API_BASE = "https://api.stripe.com"; public static final String UPLOAD_API_BASE = "https://files.stripe.com"; public static final String METER_EVENTS_API_BASE = "https://meter-events.stripe.com"; - public static final String VERSION = "28.3.0"; + public static final String VERSION = "28.3.1"; public static volatile String apiKey; public static volatile String clientId; From f3a2d0df04e45c481342e12b639047a5992fe105 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 10 Feb 2025 22:10:15 +0000 Subject: [PATCH 06/45] Update generated code for v1479 --- OPENAPI_VERSION | 2 +- .../com/stripe/model/billing/CreditGrant.java | 6 +++++ .../billing/CreditGrantCreateParams.java | 25 +++++++++++++++++-- 3 files changed, 30 insertions(+), 3 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 1c140afccda..00ad8bdb8b0 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1473 \ No newline at end of file +v1479 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/billing/CreditGrant.java b/src/main/java/com/stripe/model/billing/CreditGrant.java index 1fb08e47186..ba7d83050e3 100644 --- a/src/main/java/com/stripe/model/billing/CreditGrant.java +++ b/src/main/java/com/stripe/model/billing/CreditGrant.java @@ -105,6 +105,12 @@ public class CreditGrant extends ApiResource implements HasId, MetadataStore extraParams, Map metadata, - String name) { + String name, + Long priority) { this.amount = amount; this.applicabilityConfig = applicabilityConfig; this.category = category; @@ -85,6 +93,7 @@ private CreditGrantCreateParams( this.extraParams = extraParams; this.metadata = metadata; this.name = name; + this.priority = priority; } public static Builder builder() { @@ -112,6 +121,8 @@ public static class Builder { private String name; + private Long priority; + /** Finalize and obtain parameter instance from this builder. */ public CreditGrantCreateParams build() { return new CreditGrantCreateParams( @@ -124,7 +135,8 @@ public CreditGrantCreateParams build() { this.expiresAt, this.extraParams, this.metadata, - this.name); + this.name, + this.priority); } /** Required. Amount of this credit grant. */ @@ -252,6 +264,15 @@ public Builder setName(String name) { this.name = name; return this; } + + /** + * The desired priority for applying this credit grant. If not specified, it will be set to the + * default value of 50. The highest priority is 0 and the lowest is 100. + */ + public Builder setPriority(Long priority) { + this.priority = priority; + return this; + } } @Getter From d2a089136dfe49ba3f6acbc6eed2f41b4821e18d Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 11 Feb 2025 19:08:10 +0000 Subject: [PATCH 07/45] Update generated code for v1481 --- OPENAPI_VERSION | 2 +- src/main/java/com/stripe/model/Order.java | 16 ++ .../java/com/stripe/model/PaymentIntent.java | 40 ++++ .../com/stripe/model/checkout/Session.java | 40 ++++ .../com/stripe/param/OrderCreateParams.java | 49 ++++- .../com/stripe/param/OrderUpdateParams.java | 69 ++++++- .../param/PaymentIntentConfirmParams.java | 125 ++++++++++++- .../param/PaymentIntentCreateParams.java | 125 ++++++++++++- .../param/PaymentIntentUpdateParams.java | 175 +++++++++++++++++- .../param/checkout/SessionCreateParams.java | 124 ++++++++++++- 10 files changed, 736 insertions(+), 29 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 00ad8bdb8b0..75ad4e96a0f 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1479 \ No newline at end of file +v1481 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/Order.java b/src/main/java/com/stripe/model/Order.java index 0c834a2d40c..fe8fdac358a 100644 --- a/src/main/java/com/stripe/model/Order.java +++ b/src/main/java/com/stripe/model/Order.java @@ -928,6 +928,14 @@ public static class AcssDebit extends StripeObject { @SerializedName("setup_future_usage") String setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between + * 3 and 15 calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + /** * Bank account verification method. * @@ -1630,6 +1638,14 @@ public static class SepaDebit extends StripeObject { @SerializedName("setup_future_usage") String setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between + * 3 and 15 calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + /** * For more details about MandateOptions, please refer to the API Reference. diff --git a/src/main/java/com/stripe/model/PaymentIntent.java b/src/main/java/com/stripe/model/PaymentIntent.java index c99cbcd1d1f..eb9cca569d2 100644 --- a/src/main/java/com/stripe/model/PaymentIntent.java +++ b/src/main/java/com/stripe/model/PaymentIntent.java @@ -3233,6 +3233,14 @@ public static class AcssDebit extends StripeObject { @SerializedName("setup_future_usage") String setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + /** * Bank account verification method. * @@ -3494,6 +3502,14 @@ public static class AuBecsDebit extends StripeObject { */ @SerializedName("setup_future_usage") String setupFutureUsage; + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; } /** @@ -3531,6 +3547,14 @@ public static class BacsDebit extends StripeObject { @SerializedName("setup_future_usage") String setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + /** * For more details about MandateOptions, please refer to the API Reference. @@ -5401,6 +5425,14 @@ public static class SepaDebit extends StripeObject { @SerializedName("setup_future_usage") String setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + /** * For more details about MandateOptions, please refer to the API Reference. @@ -5610,6 +5642,14 @@ public static class UsBankAccount extends StripeObject { @SerializedName("setup_future_usage") String setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + /** * Bank account verification method. * diff --git a/src/main/java/com/stripe/model/checkout/Session.java b/src/main/java/com/stripe/model/checkout/Session.java index c33b1390bc9..c2b56165768 100644 --- a/src/main/java/com/stripe/model/checkout/Session.java +++ b/src/main/java/com/stripe/model/checkout/Session.java @@ -1869,6 +1869,14 @@ public static class AcssDebit extends StripeObject { @SerializedName("setup_future_usage") String setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + /** * Bank account verification method. * @@ -2084,6 +2092,14 @@ public static class AuBecsDebit extends StripeObject { */ @SerializedName("setup_future_usage") String setupFutureUsage; + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; } /** @@ -2121,6 +2137,14 @@ public static class BacsDebit extends StripeObject { @SerializedName("setup_future_usage") String setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + /** * For more details about MandateOptions, please refer to the API Reference. @@ -3315,6 +3339,14 @@ public static class SepaDebit extends StripeObject { @SerializedName("setup_future_usage") String setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + /** * For more details about MandateOptions, please refer to the API Reference. @@ -3417,6 +3449,14 @@ public static class UsBankAccount extends StripeObject { @SerializedName("setup_future_usage") String setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + /** * Bank account verification method. * diff --git a/src/main/java/com/stripe/param/OrderCreateParams.java b/src/main/java/com/stripe/param/OrderCreateParams.java index 490f57940a9..899df65fd81 100644 --- a/src/main/java/com/stripe/param/OrderCreateParams.java +++ b/src/main/java/com/stripe/param/OrderCreateParams.java @@ -2787,6 +2787,14 @@ public static class AcssDebit { @SerializedName("setup_future_usage") ApiRequestParams.EnumParam setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between + * 3 and 15 calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + /** Bank account verification method. */ @SerializedName("verification_method") VerificationMethod verificationMethod; @@ -2795,10 +2803,12 @@ private AcssDebit( Map extraParams, MandateOptions mandateOptions, ApiRequestParams.EnumParam setupFutureUsage, + String targetDate, VerificationMethod verificationMethod) { this.extraParams = extraParams; this.mandateOptions = mandateOptions; this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; this.verificationMethod = verificationMethod; } @@ -2813,6 +2823,8 @@ public static class Builder { private ApiRequestParams.EnumParam setupFutureUsage; + private String targetDate; + private VerificationMethod verificationMethod; /** Finalize and obtain parameter instance from this builder. */ @@ -2821,6 +2833,7 @@ public OrderCreateParams.Payment.Settings.PaymentMethodOptions.AcssDebit build() this.extraParams, this.mandateOptions, this.setupFutureUsage, + this.targetDate, this.verificationMethod); } @@ -2922,6 +2935,16 @@ public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { return this; } + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and + * between 3 and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } + /** Bank account verification method. */ public Builder setVerificationMethod( OrderCreateParams.Payment.Settings.PaymentMethodOptions.AcssDebit.VerificationMethod @@ -6326,13 +6349,23 @@ public static class SepaDebit { @SerializedName("setup_future_usage") ApiRequestParams.EnumParam setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between + * 3 and 15 calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + private SepaDebit( Map extraParams, MandateOptions mandateOptions, - ApiRequestParams.EnumParam setupFutureUsage) { + ApiRequestParams.EnumParam setupFutureUsage, + String targetDate) { this.extraParams = extraParams; this.mandateOptions = mandateOptions; this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; } public static Builder builder() { @@ -6346,10 +6379,12 @@ public static class Builder { private ApiRequestParams.EnumParam setupFutureUsage; + private String targetDate; + /** Finalize and obtain parameter instance from this builder. */ public OrderCreateParams.Payment.Settings.PaymentMethodOptions.SepaDebit build() { return new OrderCreateParams.Payment.Settings.PaymentMethodOptions.SepaDebit( - this.extraParams, this.mandateOptions, this.setupFutureUsage); + this.extraParams, this.mandateOptions, this.setupFutureUsage, this.targetDate); } /** @@ -6449,6 +6484,16 @@ public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { this.setupFutureUsage = setupFutureUsage; return this; } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and + * between 3 and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } } @Getter diff --git a/src/main/java/com/stripe/param/OrderUpdateParams.java b/src/main/java/com/stripe/param/OrderUpdateParams.java index d47037a42f8..65898e323b8 100644 --- a/src/main/java/com/stripe/param/OrderUpdateParams.java +++ b/src/main/java/com/stripe/param/OrderUpdateParams.java @@ -3234,6 +3234,14 @@ public static class AcssDebit { @SerializedName("setup_future_usage") ApiRequestParams.EnumParam setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between + * 3 and 15 calendar days from now. + */ + @SerializedName("target_date") + Object targetDate; + /** Bank account verification method. */ @SerializedName("verification_method") VerificationMethod verificationMethod; @@ -3242,10 +3250,12 @@ private AcssDebit( Map extraParams, MandateOptions mandateOptions, ApiRequestParams.EnumParam setupFutureUsage, + Object targetDate, VerificationMethod verificationMethod) { this.extraParams = extraParams; this.mandateOptions = mandateOptions; this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; this.verificationMethod = verificationMethod; } @@ -3260,6 +3270,8 @@ public static class Builder { private ApiRequestParams.EnumParam setupFutureUsage; + private Object targetDate; + private VerificationMethod verificationMethod; /** Finalize and obtain parameter instance from this builder. */ @@ -3268,6 +3280,7 @@ public OrderUpdateParams.Payment.Settings.PaymentMethodOptions.AcssDebit build() this.extraParams, this.mandateOptions, this.setupFutureUsage, + this.targetDate, this.verificationMethod); } @@ -3369,6 +3382,26 @@ public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { return this; } + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and + * between 3 and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and + * between 3 and 15 calendar days from now. + */ + public Builder setTargetDate(EmptyParam targetDate) { + this.targetDate = targetDate; + return this; + } + /** Bank account verification method. */ public Builder setVerificationMethod( OrderUpdateParams.Payment.Settings.PaymentMethodOptions.AcssDebit.VerificationMethod @@ -6862,13 +6895,23 @@ public static class SepaDebit { @SerializedName("setup_future_usage") ApiRequestParams.EnumParam setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between + * 3 and 15 calendar days from now. + */ + @SerializedName("target_date") + Object targetDate; + private SepaDebit( Map extraParams, MandateOptions mandateOptions, - ApiRequestParams.EnumParam setupFutureUsage) { + ApiRequestParams.EnumParam setupFutureUsage, + Object targetDate) { this.extraParams = extraParams; this.mandateOptions = mandateOptions; this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; } public static Builder builder() { @@ -6882,10 +6925,12 @@ public static class Builder { private ApiRequestParams.EnumParam setupFutureUsage; + private Object targetDate; + /** Finalize and obtain parameter instance from this builder. */ public OrderUpdateParams.Payment.Settings.PaymentMethodOptions.SepaDebit build() { return new OrderUpdateParams.Payment.Settings.PaymentMethodOptions.SepaDebit( - this.extraParams, this.mandateOptions, this.setupFutureUsage); + this.extraParams, this.mandateOptions, this.setupFutureUsage, this.targetDate); } /** @@ -6985,6 +7030,26 @@ public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { this.setupFutureUsage = setupFutureUsage; return this; } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and + * between 3 and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and + * between 3 and 15 calendar days from now. + */ + public Builder setTargetDate(EmptyParam targetDate) { + this.targetDate = targetDate; + return this; + } } @Getter diff --git a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java index a31d6087e7b..0225cfb07ee 100644 --- a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java @@ -12782,6 +12782,14 @@ public static class AcssDebit { @SerializedName("setup_future_usage") ApiRequestParams.EnumParam setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + /** Bank account verification method. */ @SerializedName("verification_method") VerificationMethod verificationMethod; @@ -12790,10 +12798,12 @@ private AcssDebit( Map extraParams, MandateOptions mandateOptions, ApiRequestParams.EnumParam setupFutureUsage, + String targetDate, VerificationMethod verificationMethod) { this.extraParams = extraParams; this.mandateOptions = mandateOptions; this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; this.verificationMethod = verificationMethod; } @@ -12808,6 +12818,8 @@ public static class Builder { private ApiRequestParams.EnumParam setupFutureUsage; + private String targetDate; + private VerificationMethod verificationMethod; /** Finalize and obtain parameter instance from this builder. */ @@ -12816,6 +12828,7 @@ public PaymentIntentConfirmParams.PaymentMethodOptions.AcssDebit build() { this.extraParams, this.mandateOptions, this.setupFutureUsage, + this.targetDate, this.verificationMethod); } @@ -12915,6 +12928,16 @@ public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { return this; } + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } + /** Bank account verification method. */ public Builder setVerificationMethod( PaymentIntentConfirmParams.PaymentMethodOptions.AcssDebit.VerificationMethod @@ -14102,10 +14125,21 @@ public static class AuBecsDebit { @SerializedName("setup_future_usage") ApiRequestParams.EnumParam setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + private AuBecsDebit( - Map extraParams, ApiRequestParams.EnumParam setupFutureUsage) { + Map extraParams, + ApiRequestParams.EnumParam setupFutureUsage, + String targetDate) { this.extraParams = extraParams; this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; } public static Builder builder() { @@ -14117,10 +14151,12 @@ public static class Builder { private ApiRequestParams.EnumParam setupFutureUsage; + private String targetDate; + /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentConfirmParams.PaymentMethodOptions.AuBecsDebit build() { return new PaymentIntentConfirmParams.PaymentMethodOptions.AuBecsDebit( - this.extraParams, this.setupFutureUsage); + this.extraParams, this.setupFutureUsage, this.targetDate); } /** @@ -14210,6 +14246,16 @@ public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { this.setupFutureUsage = setupFutureUsage; return this; } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } } public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @@ -14272,13 +14318,23 @@ public static class BacsDebit { @SerializedName("setup_future_usage") ApiRequestParams.EnumParam setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + private BacsDebit( Map extraParams, MandateOptions mandateOptions, - ApiRequestParams.EnumParam setupFutureUsage) { + ApiRequestParams.EnumParam setupFutureUsage, + String targetDate) { this.extraParams = extraParams; this.mandateOptions = mandateOptions; this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; } public static Builder builder() { @@ -14292,10 +14348,12 @@ public static class Builder { private ApiRequestParams.EnumParam setupFutureUsage; + private String targetDate; + /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentConfirmParams.PaymentMethodOptions.BacsDebit build() { return new PaymentIntentConfirmParams.PaymentMethodOptions.BacsDebit( - this.extraParams, this.mandateOptions, this.setupFutureUsage); + this.extraParams, this.mandateOptions, this.setupFutureUsage, this.targetDate); } /** @@ -14393,6 +14451,16 @@ public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { this.setupFutureUsage = setupFutureUsage; return this; } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } } @Getter @@ -23812,13 +23880,23 @@ public static class SepaDebit { @SerializedName("setup_future_usage") ApiRequestParams.EnumParam setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + private SepaDebit( Map extraParams, MandateOptions mandateOptions, - ApiRequestParams.EnumParam setupFutureUsage) { + ApiRequestParams.EnumParam setupFutureUsage, + String targetDate) { this.extraParams = extraParams; this.mandateOptions = mandateOptions; this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; } public static Builder builder() { @@ -23832,10 +23910,12 @@ public static class Builder { private ApiRequestParams.EnumParam setupFutureUsage; + private String targetDate; + /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentConfirmParams.PaymentMethodOptions.SepaDebit build() { return new PaymentIntentConfirmParams.PaymentMethodOptions.SepaDebit( - this.extraParams, this.mandateOptions, this.setupFutureUsage); + this.extraParams, this.mandateOptions, this.setupFutureUsage, this.targetDate); } /** @@ -23933,6 +24013,16 @@ public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { this.setupFutureUsage = setupFutureUsage; return this; } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } } @Getter @@ -24725,6 +24815,14 @@ public static class UsBankAccount { @SerializedName("setup_future_usage") ApiRequestParams.EnumParam setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + /** Bank account verification method. */ @SerializedName("verification_method") VerificationMethod verificationMethod; @@ -24736,6 +24834,7 @@ private UsBankAccount( Networks networks, ApiRequestParams.EnumParam preferredSettlementSpeed, ApiRequestParams.EnumParam setupFutureUsage, + String targetDate, VerificationMethod verificationMethod) { this.extraParams = extraParams; this.financialConnections = financialConnections; @@ -24743,6 +24842,7 @@ private UsBankAccount( this.networks = networks; this.preferredSettlementSpeed = preferredSettlementSpeed; this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; this.verificationMethod = verificationMethod; } @@ -24763,6 +24863,8 @@ public static class Builder { private ApiRequestParams.EnumParam setupFutureUsage; + private String targetDate; + private VerificationMethod verificationMethod; /** Finalize and obtain parameter instance from this builder. */ @@ -24774,6 +24876,7 @@ public PaymentIntentConfirmParams.PaymentMethodOptions.UsBankAccount build() { this.networks, this.preferredSettlementSpeed, this.setupFutureUsage, + this.targetDate, this.verificationMethod); } @@ -24904,6 +25007,16 @@ public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { return this; } + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } + /** Bank account verification method. */ public Builder setVerificationMethod( PaymentIntentConfirmParams.PaymentMethodOptions.UsBankAccount.VerificationMethod diff --git a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java index 8af494d8a35..63bd08dc256 100644 --- a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java @@ -13260,6 +13260,14 @@ public static class AcssDebit { @SerializedName("setup_future_usage") ApiRequestParams.EnumParam setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + /** Bank account verification method. */ @SerializedName("verification_method") VerificationMethod verificationMethod; @@ -13268,10 +13276,12 @@ private AcssDebit( Map extraParams, MandateOptions mandateOptions, ApiRequestParams.EnumParam setupFutureUsage, + String targetDate, VerificationMethod verificationMethod) { this.extraParams = extraParams; this.mandateOptions = mandateOptions; this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; this.verificationMethod = verificationMethod; } @@ -13286,6 +13296,8 @@ public static class Builder { private ApiRequestParams.EnumParam setupFutureUsage; + private String targetDate; + private VerificationMethod verificationMethod; /** Finalize and obtain parameter instance from this builder. */ @@ -13294,6 +13306,7 @@ public PaymentIntentCreateParams.PaymentMethodOptions.AcssDebit build() { this.extraParams, this.mandateOptions, this.setupFutureUsage, + this.targetDate, this.verificationMethod); } @@ -13393,6 +13406,16 @@ public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { return this; } + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } + /** Bank account verification method. */ public Builder setVerificationMethod( PaymentIntentCreateParams.PaymentMethodOptions.AcssDebit.VerificationMethod @@ -14580,10 +14603,21 @@ public static class AuBecsDebit { @SerializedName("setup_future_usage") ApiRequestParams.EnumParam setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + private AuBecsDebit( - Map extraParams, ApiRequestParams.EnumParam setupFutureUsage) { + Map extraParams, + ApiRequestParams.EnumParam setupFutureUsage, + String targetDate) { this.extraParams = extraParams; this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; } public static Builder builder() { @@ -14595,10 +14629,12 @@ public static class Builder { private ApiRequestParams.EnumParam setupFutureUsage; + private String targetDate; + /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentCreateParams.PaymentMethodOptions.AuBecsDebit build() { return new PaymentIntentCreateParams.PaymentMethodOptions.AuBecsDebit( - this.extraParams, this.setupFutureUsage); + this.extraParams, this.setupFutureUsage, this.targetDate); } /** @@ -14688,6 +14724,16 @@ public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { this.setupFutureUsage = setupFutureUsage; return this; } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } } public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @@ -14750,13 +14796,23 @@ public static class BacsDebit { @SerializedName("setup_future_usage") ApiRequestParams.EnumParam setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + private BacsDebit( Map extraParams, MandateOptions mandateOptions, - ApiRequestParams.EnumParam setupFutureUsage) { + ApiRequestParams.EnumParam setupFutureUsage, + String targetDate) { this.extraParams = extraParams; this.mandateOptions = mandateOptions; this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; } public static Builder builder() { @@ -14770,10 +14826,12 @@ public static class Builder { private ApiRequestParams.EnumParam setupFutureUsage; + private String targetDate; + /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentCreateParams.PaymentMethodOptions.BacsDebit build() { return new PaymentIntentCreateParams.PaymentMethodOptions.BacsDebit( - this.extraParams, this.mandateOptions, this.setupFutureUsage); + this.extraParams, this.mandateOptions, this.setupFutureUsage, this.targetDate); } /** @@ -14871,6 +14929,16 @@ public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { this.setupFutureUsage = setupFutureUsage; return this; } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } } @Getter @@ -24277,13 +24345,23 @@ public static class SepaDebit { @SerializedName("setup_future_usage") ApiRequestParams.EnumParam setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + private SepaDebit( Map extraParams, MandateOptions mandateOptions, - ApiRequestParams.EnumParam setupFutureUsage) { + ApiRequestParams.EnumParam setupFutureUsage, + String targetDate) { this.extraParams = extraParams; this.mandateOptions = mandateOptions; this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; } public static Builder builder() { @@ -24297,10 +24375,12 @@ public static class Builder { private ApiRequestParams.EnumParam setupFutureUsage; + private String targetDate; + /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentCreateParams.PaymentMethodOptions.SepaDebit build() { return new PaymentIntentCreateParams.PaymentMethodOptions.SepaDebit( - this.extraParams, this.mandateOptions, this.setupFutureUsage); + this.extraParams, this.mandateOptions, this.setupFutureUsage, this.targetDate); } /** @@ -24398,6 +24478,16 @@ public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { this.setupFutureUsage = setupFutureUsage; return this; } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } } @Getter @@ -25190,6 +25280,14 @@ public static class UsBankAccount { @SerializedName("setup_future_usage") ApiRequestParams.EnumParam setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + /** Bank account verification method. */ @SerializedName("verification_method") VerificationMethod verificationMethod; @@ -25201,6 +25299,7 @@ private UsBankAccount( Networks networks, ApiRequestParams.EnumParam preferredSettlementSpeed, ApiRequestParams.EnumParam setupFutureUsage, + String targetDate, VerificationMethod verificationMethod) { this.extraParams = extraParams; this.financialConnections = financialConnections; @@ -25208,6 +25307,7 @@ private UsBankAccount( this.networks = networks; this.preferredSettlementSpeed = preferredSettlementSpeed; this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; this.verificationMethod = verificationMethod; } @@ -25228,6 +25328,8 @@ public static class Builder { private ApiRequestParams.EnumParam setupFutureUsage; + private String targetDate; + private VerificationMethod verificationMethod; /** Finalize and obtain parameter instance from this builder. */ @@ -25239,6 +25341,7 @@ public PaymentIntentCreateParams.PaymentMethodOptions.UsBankAccount build() { this.networks, this.preferredSettlementSpeed, this.setupFutureUsage, + this.targetDate, this.verificationMethod); } @@ -25367,6 +25470,16 @@ public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { return this; } + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } + /** Bank account verification method. */ public Builder setVerificationMethod( PaymentIntentCreateParams.PaymentMethodOptions.UsBankAccount.VerificationMethod diff --git a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java index f1b24566627..2ecaac8833a 100644 --- a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java @@ -13462,6 +13462,14 @@ public static class AcssDebit { @SerializedName("setup_future_usage") ApiRequestParams.EnumParam setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + Object targetDate; + /** Bank account verification method. */ @SerializedName("verification_method") VerificationMethod verificationMethod; @@ -13470,10 +13478,12 @@ private AcssDebit( Map extraParams, MandateOptions mandateOptions, ApiRequestParams.EnumParam setupFutureUsage, + Object targetDate, VerificationMethod verificationMethod) { this.extraParams = extraParams; this.mandateOptions = mandateOptions; this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; this.verificationMethod = verificationMethod; } @@ -13488,6 +13498,8 @@ public static class Builder { private ApiRequestParams.EnumParam setupFutureUsage; + private Object targetDate; + private VerificationMethod verificationMethod; /** Finalize and obtain parameter instance from this builder. */ @@ -13496,6 +13508,7 @@ public PaymentIntentUpdateParams.PaymentMethodOptions.AcssDebit build() { this.extraParams, this.mandateOptions, this.setupFutureUsage, + this.targetDate, this.verificationMethod); } @@ -13595,6 +13608,26 @@ public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { return this; } + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(EmptyParam targetDate) { + this.targetDate = targetDate; + return this; + } + /** Bank account verification method. */ public Builder setVerificationMethod( PaymentIntentUpdateParams.PaymentMethodOptions.AcssDebit.VerificationMethod @@ -14809,10 +14842,21 @@ public static class AuBecsDebit { @SerializedName("setup_future_usage") ApiRequestParams.EnumParam setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + Object targetDate; + private AuBecsDebit( - Map extraParams, ApiRequestParams.EnumParam setupFutureUsage) { + Map extraParams, + ApiRequestParams.EnumParam setupFutureUsage, + Object targetDate) { this.extraParams = extraParams; this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; } public static Builder builder() { @@ -14824,10 +14868,12 @@ public static class Builder { private ApiRequestParams.EnumParam setupFutureUsage; + private Object targetDate; + /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentUpdateParams.PaymentMethodOptions.AuBecsDebit build() { return new PaymentIntentUpdateParams.PaymentMethodOptions.AuBecsDebit( - this.extraParams, this.setupFutureUsage); + this.extraParams, this.setupFutureUsage, this.targetDate); } /** @@ -14917,6 +14963,26 @@ public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { this.setupFutureUsage = setupFutureUsage; return this; } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(EmptyParam targetDate) { + this.targetDate = targetDate; + return this; + } } public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @@ -14979,13 +15045,23 @@ public static class BacsDebit { @SerializedName("setup_future_usage") ApiRequestParams.EnumParam setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + Object targetDate; + private BacsDebit( Map extraParams, MandateOptions mandateOptions, - ApiRequestParams.EnumParam setupFutureUsage) { + ApiRequestParams.EnumParam setupFutureUsage, + Object targetDate) { this.extraParams = extraParams; this.mandateOptions = mandateOptions; this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; } public static Builder builder() { @@ -14999,10 +15075,12 @@ public static class Builder { private ApiRequestParams.EnumParam setupFutureUsage; + private Object targetDate; + /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentUpdateParams.PaymentMethodOptions.BacsDebit build() { return new PaymentIntentUpdateParams.PaymentMethodOptions.BacsDebit( - this.extraParams, this.mandateOptions, this.setupFutureUsage); + this.extraParams, this.mandateOptions, this.setupFutureUsage, this.targetDate); } /** @@ -15100,6 +15178,26 @@ public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { this.setupFutureUsage = setupFutureUsage; return this; } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(EmptyParam targetDate) { + this.targetDate = targetDate; + return this; + } } @Getter @@ -24702,13 +24800,23 @@ public static class SepaDebit { @SerializedName("setup_future_usage") ApiRequestParams.EnumParam setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + Object targetDate; + private SepaDebit( Map extraParams, MandateOptions mandateOptions, - ApiRequestParams.EnumParam setupFutureUsage) { + ApiRequestParams.EnumParam setupFutureUsage, + Object targetDate) { this.extraParams = extraParams; this.mandateOptions = mandateOptions; this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; } public static Builder builder() { @@ -24722,10 +24830,12 @@ public static class Builder { private ApiRequestParams.EnumParam setupFutureUsage; + private Object targetDate; + /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentUpdateParams.PaymentMethodOptions.SepaDebit build() { return new PaymentIntentUpdateParams.PaymentMethodOptions.SepaDebit( - this.extraParams, this.mandateOptions, this.setupFutureUsage); + this.extraParams, this.mandateOptions, this.setupFutureUsage, this.targetDate); } /** @@ -24823,6 +24933,26 @@ public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { this.setupFutureUsage = setupFutureUsage; return this; } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(EmptyParam targetDate) { + this.targetDate = targetDate; + return this; + } } @Getter @@ -25615,6 +25745,14 @@ public static class UsBankAccount { @SerializedName("setup_future_usage") ApiRequestParams.EnumParam setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + Object targetDate; + /** Bank account verification method. */ @SerializedName("verification_method") VerificationMethod verificationMethod; @@ -25626,6 +25764,7 @@ private UsBankAccount( Networks networks, ApiRequestParams.EnumParam preferredSettlementSpeed, ApiRequestParams.EnumParam setupFutureUsage, + Object targetDate, VerificationMethod verificationMethod) { this.extraParams = extraParams; this.financialConnections = financialConnections; @@ -25633,6 +25772,7 @@ private UsBankAccount( this.networks = networks; this.preferredSettlementSpeed = preferredSettlementSpeed; this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; this.verificationMethod = verificationMethod; } @@ -25653,6 +25793,8 @@ public static class Builder { private ApiRequestParams.EnumParam setupFutureUsage; + private Object targetDate; + private VerificationMethod verificationMethod; /** Finalize and obtain parameter instance from this builder. */ @@ -25664,6 +25806,7 @@ public PaymentIntentUpdateParams.PaymentMethodOptions.UsBankAccount build() { this.networks, this.preferredSettlementSpeed, this.setupFutureUsage, + this.targetDate, this.verificationMethod); } @@ -25792,6 +25935,26 @@ public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { return this; } + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(EmptyParam targetDate) { + this.targetDate = targetDate; + return this; + } + /** Bank account verification method. */ public Builder setVerificationMethod( PaymentIntentUpdateParams.PaymentMethodOptions.UsBankAccount.VerificationMethod diff --git a/src/main/java/com/stripe/param/checkout/SessionCreateParams.java b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java index c673f4f7491..0ee9401133e 100644 --- a/src/main/java/com/stripe/param/checkout/SessionCreateParams.java +++ b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java @@ -6455,6 +6455,14 @@ public static class AcssDebit { @SerializedName("setup_future_usage") SetupFutureUsage setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + /** Verification method for the intent. */ @SerializedName("verification_method") VerificationMethod verificationMethod; @@ -6464,11 +6472,13 @@ private AcssDebit( Map extraParams, MandateOptions mandateOptions, SetupFutureUsage setupFutureUsage, + String targetDate, VerificationMethod verificationMethod) { this.currency = currency; this.extraParams = extraParams; this.mandateOptions = mandateOptions; this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; this.verificationMethod = verificationMethod; } @@ -6485,6 +6495,8 @@ public static class Builder { private SetupFutureUsage setupFutureUsage; + private String targetDate; + private VerificationMethod verificationMethod; /** Finalize and obtain parameter instance from this builder. */ @@ -6494,6 +6506,7 @@ public SessionCreateParams.PaymentMethodOptions.AcssDebit build() { this.extraParams, this.mandateOptions, this.setupFutureUsage, + this.targetDate, this.verificationMethod); } @@ -6569,6 +6582,16 @@ public Builder setSetupFutureUsage( return this; } + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } + /** Verification method for the intent. */ public Builder setVerificationMethod( SessionCreateParams.PaymentMethodOptions.AcssDebit.VerificationMethod @@ -7399,9 +7422,19 @@ public static class AuBecsDebit { @SerializedName("setup_future_usage") SetupFutureUsage setupFutureUsage; - private AuBecsDebit(Map extraParams, SetupFutureUsage setupFutureUsage) { + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + + private AuBecsDebit( + Map extraParams, SetupFutureUsage setupFutureUsage, String targetDate) { this.extraParams = extraParams; this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; } public static Builder builder() { @@ -7413,10 +7446,12 @@ public static class Builder { private SetupFutureUsage setupFutureUsage; + private String targetDate; + /** Finalize and obtain parameter instance from this builder. */ public SessionCreateParams.PaymentMethodOptions.AuBecsDebit build() { return new SessionCreateParams.PaymentMethodOptions.AuBecsDebit( - this.extraParams, this.setupFutureUsage); + this.extraParams, this.setupFutureUsage, this.targetDate); } /** @@ -7473,6 +7508,16 @@ public Builder setSetupFutureUsage( this.setupFutureUsage = setupFutureUsage; return this; } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } } public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @@ -7525,13 +7570,23 @@ public static class BacsDebit { @SerializedName("setup_future_usage") SetupFutureUsage setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + private BacsDebit( Map extraParams, MandateOptions mandateOptions, - SetupFutureUsage setupFutureUsage) { + SetupFutureUsage setupFutureUsage, + String targetDate) { this.extraParams = extraParams; this.mandateOptions = mandateOptions; this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; } public static Builder builder() { @@ -7545,10 +7600,12 @@ public static class Builder { private SetupFutureUsage setupFutureUsage; + private String targetDate; + /** Finalize and obtain parameter instance from this builder. */ public SessionCreateParams.PaymentMethodOptions.BacsDebit build() { return new SessionCreateParams.PaymentMethodOptions.BacsDebit( - this.extraParams, this.mandateOptions, this.setupFutureUsage); + this.extraParams, this.mandateOptions, this.setupFutureUsage, this.targetDate); } /** @@ -7611,6 +7668,16 @@ public Builder setSetupFutureUsage( this.setupFutureUsage = setupFutureUsage; return this; } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } } @Getter @@ -12658,13 +12725,23 @@ public static class SepaDebit { @SerializedName("setup_future_usage") SetupFutureUsage setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + private SepaDebit( Map extraParams, MandateOptions mandateOptions, - SetupFutureUsage setupFutureUsage) { + SetupFutureUsage setupFutureUsage, + String targetDate) { this.extraParams = extraParams; this.mandateOptions = mandateOptions; this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; } public static Builder builder() { @@ -12678,10 +12755,12 @@ public static class Builder { private SetupFutureUsage setupFutureUsage; + private String targetDate; + /** Finalize and obtain parameter instance from this builder. */ public SessionCreateParams.PaymentMethodOptions.SepaDebit build() { return new SessionCreateParams.PaymentMethodOptions.SepaDebit( - this.extraParams, this.mandateOptions, this.setupFutureUsage); + this.extraParams, this.mandateOptions, this.setupFutureUsage, this.targetDate); } /** @@ -12744,6 +12823,16 @@ public Builder setSetupFutureUsage( this.setupFutureUsage = setupFutureUsage; return this; } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } } @Getter @@ -13092,6 +13181,14 @@ public static class UsBankAccount { @SerializedName("setup_future_usage") SetupFutureUsage setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + /** Verification method for the intent. */ @SerializedName("verification_method") VerificationMethod verificationMethod; @@ -13100,10 +13197,12 @@ private UsBankAccount( Map extraParams, FinancialConnections financialConnections, SetupFutureUsage setupFutureUsage, + String targetDate, VerificationMethod verificationMethod) { this.extraParams = extraParams; this.financialConnections = financialConnections; this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; this.verificationMethod = verificationMethod; } @@ -13118,6 +13217,8 @@ public static class Builder { private SetupFutureUsage setupFutureUsage; + private String targetDate; + private VerificationMethod verificationMethod; /** Finalize and obtain parameter instance from this builder. */ @@ -13126,6 +13227,7 @@ public SessionCreateParams.PaymentMethodOptions.UsBankAccount build() { this.extraParams, this.financialConnections, this.setupFutureUsage, + this.targetDate, this.verificationMethod); } @@ -13192,6 +13294,16 @@ public Builder setSetupFutureUsage( return this; } + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } + /** Verification method for the intent. */ public Builder setVerificationMethod( SessionCreateParams.PaymentMethodOptions.UsBankAccount.VerificationMethod From efb30e0d57560fba690268c11b4f70add53c34a1 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 11 Feb 2025 20:42:54 +0000 Subject: [PATCH 08/45] Update generated code for v1483 --- OPENAPI_VERSION | 2 +- src/main/java/com/stripe/model/PaymentIntent.java | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 75ad4e96a0f..0dd08f61666 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1481 \ No newline at end of file +v1483 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/PaymentIntent.java b/src/main/java/com/stripe/model/PaymentIntent.java index eb9cca569d2..6174421b136 100644 --- a/src/main/java/com/stripe/model/PaymentIntent.java +++ b/src/main/java/com/stripe/model/PaymentIntent.java @@ -5886,13 +5886,12 @@ public static class CustomerNotification extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class TransferData extends StripeObject { /** - * Amount intended to be collected by this PaymentIntent. A positive integer representing how - * much to charge in the smallest - * currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal - * currency). The minimum amount is $0.50 US or equivalent in - * charge currency. The amount value supports up to eight digits (e.g., a value of 99999999 - * for a USD charge of $999,999.99). + * The amount transferred to the destination account. This transfer will occur automatically + * after the payment succeeds. If no amount is specified, by default the entire payment amount + * is transferred to the destination account. The amount must be less than or equal to the amount, + * and must be a positive integer representing how much to transfer in the smallest currency + * unit (e.g., 100 cents to charge $1.00). */ @SerializedName("amount") Long amount; From 42d346e658af796161690216ca7c9a4416682789 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 12 Feb 2025 19:01:04 +0000 Subject: [PATCH 09/45] Update generated code for v1485 --- OPENAPI_VERSION | 2 +- .../param/billing/CreditBalanceSummaryRetrieveParams.java | 8 ++++---- .../com/stripe/param/billing/CreditGrantCreateParams.java | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 0dd08f61666..1604d58c7de 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1483 \ No newline at end of file +v1485 \ No newline at end of file diff --git a/src/main/java/com/stripe/param/billing/CreditBalanceSummaryRetrieveParams.java b/src/main/java/com/stripe/param/billing/CreditBalanceSummaryRetrieveParams.java index ace1a0b40bf..c0c48b77389 100644 --- a/src/main/java/com/stripe/param/billing/CreditBalanceSummaryRetrieveParams.java +++ b/src/main/java/com/stripe/param/billing/CreditBalanceSummaryRetrieveParams.java @@ -236,8 +236,8 @@ public static class ApplicabilityScope { Map extraParams; /** - * Required. The price type that credit grants can apply to. We currently - * only support the {@code metered} price type. + * The price type that credit grants can apply to. We currently only support the {@code + * metered} price type. */ @SerializedName("price_type") PriceType priceType; @@ -304,8 +304,8 @@ public Builder putAllExtraParam(Map map) { } /** - * Required. The price type that credit grants can apply to. We currently - * only support the {@code metered} price type. + * The price type that credit grants can apply to. We currently only support the {@code + * metered} price type. */ public Builder setPriceType( CreditBalanceSummaryRetrieveParams.Filter.ApplicabilityScope.PriceType priceType) { diff --git a/src/main/java/com/stripe/param/billing/CreditGrantCreateParams.java b/src/main/java/com/stripe/param/billing/CreditGrantCreateParams.java index 62f18974ba0..fbb106ee36c 100644 --- a/src/main/java/com/stripe/param/billing/CreditGrantCreateParams.java +++ b/src/main/java/com/stripe/param/billing/CreditGrantCreateParams.java @@ -549,8 +549,8 @@ public static class Scope { Map extraParams; /** - * Required. The price type that credit grants can apply to. We currently - * only support the {@code metered} price type. + * The price type that credit grants can apply to. We currently only support the {@code + * metered} price type. */ @SerializedName("price_type") PriceType priceType; @@ -617,8 +617,8 @@ public Builder putAllExtraParam(Map map) { } /** - * Required. The price type that credit grants can apply to. We currently - * only support the {@code metered} price type. + * The price type that credit grants can apply to. We currently only support the {@code + * metered} price type. */ public Builder setPriceType( CreditGrantCreateParams.ApplicabilityConfig.Scope.PriceType priceType) { From 7c570a8a2c990a0cd9b7a7c2feba6c0c97b3f84c Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 12 Feb 2025 20:53:35 +0000 Subject: [PATCH 10/45] Update generated code for v1486 --- OPENAPI_VERSION | 2 +- .../param/billing/CreditGrantCreateParams.java | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 1604d58c7de..0234066a518 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1485 \ No newline at end of file +v1486 \ No newline at end of file diff --git a/src/main/java/com/stripe/param/billing/CreditGrantCreateParams.java b/src/main/java/com/stripe/param/billing/CreditGrantCreateParams.java index fbb106ee36c..c580a9f73f6 100644 --- a/src/main/java/com/stripe/param/billing/CreditGrantCreateParams.java +++ b/src/main/java/com/stripe/param/billing/CreditGrantCreateParams.java @@ -15,7 +15,11 @@ public class CreditGrantCreateParams extends ApiRequestParams { @SerializedName("amount") Amount amount; - /** Required. Configuration specifying what this credit grant applies to. */ + /** + * Required. Configuration specifying what this credit grant applies to. We + * currently only support {@code metered} prices that have a Billing Meter attached to them. + */ @SerializedName("applicability_config") ApplicabilityConfig applicabilityConfig; @@ -145,7 +149,11 @@ public Builder setAmount(CreditGrantCreateParams.Amount amount) { return this; } - /** Required. Configuration specifying what this credit grant applies to. */ + /** + * Required. Configuration specifying what this credit grant applies to. We + * currently only support {@code metered} prices that have a Billing Meter attached to them. + */ public Builder setApplicabilityConfig( CreditGrantCreateParams.ApplicabilityConfig applicabilityConfig) { this.applicabilityConfig = applicabilityConfig; From 4dc9d1e75dba2737d03e1ca155a47b6210038eaf Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 12 Feb 2025 21:49:59 +0000 Subject: [PATCH 11/45] Update generated code for v1487 --- OPENAPI_VERSION | 2 +- .../com/stripe/param/ProductCreateParams.java | 40 +++++++++++++++++++ 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 0234066a518..73182b6b379 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1486 \ No newline at end of file +v1487 \ No newline at end of file diff --git a/src/main/java/com/stripe/param/ProductCreateParams.java b/src/main/java/com/stripe/param/ProductCreateParams.java index 08c2561f376..30c6c8c808c 100644 --- a/src/main/java/com/stripe/param/ProductCreateParams.java +++ b/src/main/java/com/stripe/param/ProductCreateParams.java @@ -497,6 +497,15 @@ public static class DefaultPriceData { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** + * Set of key-value pairs that you can attach + * to an object. This can be useful for storing additional information about the object in a + * structured format. Individual keys can be unset by posting an empty value to them. All keys + * can be unset by posting an empty value to {@code metadata}. + */ + @SerializedName("metadata") + Map metadata; + /** The recurring components of a price such as {@code interval} and {@code interval_count}. */ @SerializedName("recurring") Recurring recurring; @@ -533,6 +542,7 @@ private DefaultPriceData( Map currencyOptions, CustomUnitAmount customUnitAmount, Map extraParams, + Map metadata, Recurring recurring, TaxBehavior taxBehavior, Long unitAmount, @@ -541,6 +551,7 @@ private DefaultPriceData( this.currencyOptions = currencyOptions; this.customUnitAmount = customUnitAmount; this.extraParams = extraParams; + this.metadata = metadata; this.recurring = recurring; this.taxBehavior = taxBehavior; this.unitAmount = unitAmount; @@ -560,6 +571,8 @@ public static class Builder { private Map extraParams; + private Map metadata; + private Recurring recurring; private TaxBehavior taxBehavior; @@ -575,6 +588,7 @@ public ProductCreateParams.DefaultPriceData build() { this.currencyOptions, this.customUnitAmount, this.extraParams, + this.metadata, this.recurring, this.taxBehavior, this.unitAmount, @@ -657,6 +671,32 @@ public Builder putAllExtraParam(Map map) { 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 + * ProductCreateParams.DefaultPriceData#metadata} for the field documentation. + */ + public Builder putMetadata(String key, String value) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `metadata` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link ProductCreateParams.DefaultPriceData#metadata} for the field documentation. + */ + public Builder putAllMetadata(Map map) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.putAll(map); + return this; + } + /** * The recurring components of a price such as {@code interval} and {@code interval_count}. */ From 67ec44807b4e3fdaa2da8cc2363cb591404ba204 Mon Sep 17 00:00:00 2001 From: David Brownman <109395161+xavdid-stripe@users.noreply.github.com> Date: Wed, 12 Feb 2025 16:55:18 -0800 Subject: [PATCH 12/45] add codeowners file (#1948) --- .github/CODEOWNERS | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .github/CODEOWNERS diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 00000000000..8844b15a886 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,2 @@ +# All files should be reviewed by a member of the SDKs team +* @stripe/api-library-reviewers From f696d5254dcb93ca9e55c62a812857ace1ccad23 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 13 Feb 2025 15:53:36 +0000 Subject: [PATCH 13/45] Update generated code for v1490 --- OPENAPI_VERSION | 2 +- src/main/java/com/stripe/ApiVersion.java | 2 +- .../java/com/stripe/param/WebhookEndpointCreateParams.java | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 5114a0390fd..a752d73210b 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1488 \ No newline at end of file +v1490 \ 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 40e6e8ec23f..df1ff179ecd 100644 --- a/src/main/java/com/stripe/ApiVersion.java +++ b/src/main/java/com/stripe/ApiVersion.java @@ -2,5 +2,5 @@ package com.stripe; final class ApiVersion { - public static final String CURRENT = "2025-01-27.acacia"; + public static final String CURRENT = "2025-02-24.acacia"; } diff --git a/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java b/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java index 2b49e140824..9530625637c 100644 --- a/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java +++ b/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java @@ -601,7 +601,10 @@ public enum ApiVersion implements ApiRequestParams.EnumParam { VERSION_2024_12_18_ACACIA("2024-12-18.acacia"), @SerializedName("2025-01-27.acacia") - VERSION_2025_01_27_ACACIA("2025-01-27.acacia"); + VERSION_2025_01_27_ACACIA("2025-01-27.acacia"), + + @SerializedName("2025-02-24.acacia") + VERSION_2025_02_24_ACACIA("2025-02-24.acacia"); @Getter(onMethod_ = {@Override}) private final String value; From 434a9417a30ae63e6e206e220e24dce5b6844c48 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 14 Feb 2025 23:53:40 +0000 Subject: [PATCH 14/45] Update generated code for v1495 --- OPENAPI_VERSION | 2 +- .../stripe/param/v2/core/EventListParams.java | 99 ++++++++++++++++++- .../stripe/service/v2/core/EventService.java | 8 ++ 3 files changed, 104 insertions(+), 5 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index a752d73210b..6043724bfe5 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1490 \ No newline at end of file +v1495 \ No newline at end of file diff --git a/src/main/java/com/stripe/param/v2/core/EventListParams.java b/src/main/java/com/stripe/param/v2/core/EventListParams.java index a5c9f901bd4..55ae39caac5 100644 --- a/src/main/java/com/stripe/param/v2/core/EventListParams.java +++ b/src/main/java/com/stripe/param/v2/core/EventListParams.java @@ -3,12 +3,37 @@ import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; +import java.time.Instant; import java.util.HashMap; import java.util.Map; import lombok.Getter; @Getter public class EventListParams extends ApiRequestParams { + /** Filter for events created after the specified timestamp. */ + @SerializedName("created_gt") + Instant createdGt; + + /** Filter for events created at or after the specified timestamp. */ + @SerializedName("created_gte") + Instant createdGte; + + /** Filter for events created before the specified timestamp. */ + @SerializedName("created_lt") + Instant createdLt; + + /** Filter for events created at or before the specified timestamp. */ + @SerializedName("created_lte") + Instant createdLte; + + /** + * Filter events based on whether they were successfully delivered to all subscribed event + * destinations. If false, events which are still pending or have failed all delivery attempts to + * a event destination will be returned. + */ + @SerializedName("delivery_success") + Boolean deliverySuccess; + /** * 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 @@ -22,7 +47,7 @@ public class EventListParams extends ApiRequestParams { @SerializedName("limit") Integer limit; - /** Required. Primary object ID used to retrieve related events. */ + /** Primary object ID used to retrieve related events. */ @SerializedName("object_id") String objectId; @@ -31,7 +56,20 @@ public class EventListParams extends ApiRequestParams { String page; private EventListParams( - Map extraParams, Integer limit, String objectId, String page) { + Instant createdGt, + Instant createdGte, + Instant createdLt, + Instant createdLte, + Boolean deliverySuccess, + Map extraParams, + Integer limit, + String objectId, + String page) { + this.createdGt = createdGt; + this.createdGte = createdGte; + this.createdLt = createdLt; + this.createdLte = createdLte; + this.deliverySuccess = deliverySuccess; this.extraParams = extraParams; this.limit = limit; this.objectId = objectId; @@ -43,6 +81,16 @@ public static Builder builder() { } public static class Builder { + private Instant createdGt; + + private Instant createdGte; + + private Instant createdLt; + + private Instant createdLte; + + private Boolean deliverySuccess; + private Map extraParams; private Integer limit; @@ -53,7 +101,50 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public EventListParams build() { - return new EventListParams(this.extraParams, this.limit, this.objectId, this.page); + return new EventListParams( + this.createdGt, + this.createdGte, + this.createdLt, + this.createdLte, + this.deliverySuccess, + this.extraParams, + this.limit, + this.objectId, + this.page); + } + + /** Filter for events created after the specified timestamp. */ + public Builder setCreatedGt(Instant createdGt) { + this.createdGt = createdGt; + return this; + } + + /** Filter for events created at or after the specified timestamp. */ + public Builder setCreatedGte(Instant createdGte) { + this.createdGte = createdGte; + return this; + } + + /** Filter for events created before the specified timestamp. */ + public Builder setCreatedLt(Instant createdLt) { + this.createdLt = createdLt; + return this; + } + + /** Filter for events created at or before the specified timestamp. */ + public Builder setCreatedLte(Instant createdLte) { + this.createdLte = createdLte; + return this; + } + + /** + * Filter events based on whether they were successfully delivered to all subscribed event + * destinations. If false, events which are still pending or have failed all delivery attempts + * to a event destination will be returned. + */ + public Builder setDeliverySuccess(Boolean deliverySuccess) { + this.deliverySuccess = deliverySuccess; + return this; } /** @@ -88,7 +179,7 @@ public Builder setLimit(Integer limit) { return this; } - /** Required. Primary object ID used to retrieve related events. */ + /** Primary object ID used to retrieve related events. */ public Builder setObjectId(String objectId) { this.objectId = objectId; return this; diff --git a/src/main/java/com/stripe/service/v2/core/EventService.java b/src/main/java/com/stripe/service/v2/core/EventService.java index 5732a916f2f..639ff05be6c 100644 --- a/src/main/java/com/stripe/service/v2/core/EventService.java +++ b/src/main/java/com/stripe/service/v2/core/EventService.java @@ -24,6 +24,14 @@ public StripeCollection list(EventListParams params) throws StripeExcepti return list(params, (RequestOptions) null); } /** List events, going back up to 30 days. */ + public StripeCollection list(RequestOptions options) throws StripeException { + return list((EventListParams) null, options); + } + /** List events, going back up to 30 days. */ + public StripeCollection list() throws StripeException { + return list((EventListParams) null, (RequestOptions) null); + } + /** List events, going back up to 30 days. */ public StripeCollection list(EventListParams params, RequestOptions options) throws StripeException { String path = "/v2/core/events"; From 2340d7ffb954fd228eeba8c4551bea0e0836cdba Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 19 Feb 2025 17:07:19 +0000 Subject: [PATCH 15/45] Update generated code for v1496 --- OPENAPI_VERSION | 2 +- .../com/stripe/model/terminal/Reader.java | 70 ++++++++++ .../ReaderSucceedInputCollectionParams.java | 131 ++++++++++++++++++ .../testhelpers/terminal/ReaderService.java | 41 ++++++ 4 files changed, 243 insertions(+), 1 deletion(-) create mode 100644 src/main/java/com/stripe/param/terminal/ReaderSucceedInputCollectionParams.java diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 6043724bfe5..c67d79cdf1f 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1495 \ No newline at end of file +v1496 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/terminal/Reader.java b/src/main/java/com/stripe/model/terminal/Reader.java index 18b19f8e5dd..c5cf9ef31d2 100644 --- a/src/main/java/com/stripe/model/terminal/Reader.java +++ b/src/main/java/com/stripe/model/terminal/Reader.java @@ -30,6 +30,7 @@ import com.stripe.param.terminal.ReaderRefundPaymentParams; import com.stripe.param.terminal.ReaderRetrieveParams; import com.stripe.param.terminal.ReaderSetReaderDisplayParams; +import com.stripe.param.terminal.ReaderSucceedInputCollectionParams; import com.stripe.param.terminal.ReaderUpdateParams; import java.util.List; import java.util.Map; @@ -1452,6 +1453,75 @@ public Reader presentPaymentMethod( options); return resource.getResponseGetter().request(request, Reader.class); } + + /** + * Succeeds an input collection on a simulated reader. Can be used to simulate collecting + * inputs. + */ + public Reader succeedInputCollection() throws StripeException { + return succeedInputCollection((Map) null, (RequestOptions) null); + } + + /** + * Succeeds an input collection on a simulated reader. Can be used to simulate collecting + * inputs. + */ + public Reader succeedInputCollection(RequestOptions options) throws StripeException { + return succeedInputCollection((Map) null, options); + } + + /** + * Succeeds an input collection on a simulated reader. Can be used to simulate collecting + * inputs. + */ + public Reader succeedInputCollection(Map params) throws StripeException { + return succeedInputCollection(params, (RequestOptions) null); + } + + /** + * Succeeds an input collection on a simulated reader. Can be used to simulate collecting + * inputs. + */ + public Reader succeedInputCollection(Map params, RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/test_helpers/terminal/readers/%s/succeed_input_collection", + ApiResource.urlEncodeId(this.resource.getId())); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options); + return resource.getResponseGetter().request(request, Reader.class); + } + + /** + * Succeeds an input collection on a simulated reader. Can be used to simulate collecting + * inputs. + */ + public Reader succeedInputCollection(ReaderSucceedInputCollectionParams params) + throws StripeException { + return succeedInputCollection(params, (RequestOptions) null); + } + + /** + * Succeeds an input collection on a simulated reader. Can be used to simulate collecting + * inputs. + */ + public Reader succeedInputCollection( + ReaderSucceedInputCollectionParams params, RequestOptions options) throws StripeException { + String path = + String.format( + "/v1/test_helpers/terminal/readers/%s/succeed_input_collection", + ApiResource.urlEncodeId(this.resource.getId())); + ApiResource.checkNullTypedParams(path, params); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return resource.getResponseGetter().request(request, Reader.class); + } } @Override diff --git a/src/main/java/com/stripe/param/terminal/ReaderSucceedInputCollectionParams.java b/src/main/java/com/stripe/param/terminal/ReaderSucceedInputCollectionParams.java new file mode 100644 index 00000000000..eca394e66a4 --- /dev/null +++ b/src/main/java/com/stripe/param/terminal/ReaderSucceedInputCollectionParams.java @@ -0,0 +1,131 @@ +// File generated from our OpenAPI spec +package com.stripe.param.terminal; + +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 ReaderSucceedInputCollectionParams 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; + + /** Skip behavior for input collection. */ + @SerializedName("skip_non_required_inputs") + SkipNonRequiredInputs skipNonRequiredInputs; + + private ReaderSucceedInputCollectionParams( + List expand, + Map extraParams, + SkipNonRequiredInputs skipNonRequiredInputs) { + this.expand = expand; + this.extraParams = extraParams; + this.skipNonRequiredInputs = skipNonRequiredInputs; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private List expand; + + private Map extraParams; + + private SkipNonRequiredInputs skipNonRequiredInputs; + + /** Finalize and obtain parameter instance from this builder. */ + public ReaderSucceedInputCollectionParams build() { + return new ReaderSucceedInputCollectionParams( + this.expand, this.extraParams, this.skipNonRequiredInputs); + } + + /** + * 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 + * ReaderSucceedInputCollectionParams#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 + * ReaderSucceedInputCollectionParams#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 + * ReaderSucceedInputCollectionParams#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 ReaderSucceedInputCollectionParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Skip behavior for input collection. */ + public Builder setSkipNonRequiredInputs( + ReaderSucceedInputCollectionParams.SkipNonRequiredInputs skipNonRequiredInputs) { + this.skipNonRequiredInputs = skipNonRequiredInputs; + return this; + } + } + + public enum SkipNonRequiredInputs implements ApiRequestParams.EnumParam { + @SerializedName("all") + ALL("all"), + + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SkipNonRequiredInputs(String value) { + this.value = value; + } + } +} diff --git a/src/main/java/com/stripe/service/testhelpers/terminal/ReaderService.java b/src/main/java/com/stripe/service/testhelpers/terminal/ReaderService.java index 840cd85b4af..612cc17f547 100644 --- a/src/main/java/com/stripe/service/testhelpers/terminal/ReaderService.java +++ b/src/main/java/com/stripe/service/testhelpers/terminal/ReaderService.java @@ -11,6 +11,7 @@ import com.stripe.net.RequestOptions; import com.stripe.net.StripeResponseGetter; import com.stripe.param.terminal.ReaderPresentPaymentMethodParams; +import com.stripe.param.terminal.ReaderSucceedInputCollectionParams; public final class ReaderService extends ApiService { public ReaderService(StripeResponseGetter responseGetter) { @@ -60,4 +61,44 @@ public Reader presentPaymentMethod( options); return this.request(request, Reader.class); } + /** + * Succeeds an input collection on a simulated reader. Can be used to simulate collecting inputs. + */ + public Reader succeedInputCollection(String reader, ReaderSucceedInputCollectionParams params) + throws StripeException { + return succeedInputCollection(reader, params, (RequestOptions) null); + } + /** + * Succeeds an input collection on a simulated reader. Can be used to simulate collecting inputs. + */ + public Reader succeedInputCollection(String reader, RequestOptions options) + throws StripeException { + return succeedInputCollection(reader, (ReaderSucceedInputCollectionParams) null, options); + } + /** + * Succeeds an input collection on a simulated reader. Can be used to simulate collecting inputs. + */ + public Reader succeedInputCollection(String reader) throws StripeException { + return succeedInputCollection( + reader, (ReaderSucceedInputCollectionParams) null, (RequestOptions) null); + } + /** + * Succeeds an input collection on a simulated reader. Can be used to simulate collecting inputs. + */ + public Reader succeedInputCollection( + String reader, ReaderSucceedInputCollectionParams params, RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/test_helpers/terminal/readers/%s/succeed_input_collection", + ApiResource.urlEncodeId(reader)); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, Reader.class); + } } From 21d07f4a1664e30be3b6c950e91d0918a97940c2 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 21 Feb 2025 15:20:46 +0000 Subject: [PATCH 16/45] Update generated code for v1501 --- OPENAPI_VERSION | 2 +- .../param/AccountPersonCreateParams.java | 24 +++---------- .../param/AccountPersonUpdateParams.java | 34 ++++++++----------- .../param/PersonCollectionCreateParams.java | 24 +++---------- .../com/stripe/param/PersonUpdateParams.java | 33 ++++++++---------- .../com/stripe/param/TokenCreateParams.java | 24 +++---------- 6 files changed, 41 insertions(+), 100 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index c67d79cdf1f..b8101af09d2 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1496 \ No newline at end of file +v1501 \ No newline at end of file diff --git a/src/main/java/com/stripe/param/AccountPersonCreateParams.java b/src/main/java/com/stripe/param/AccountPersonCreateParams.java index 13633627a67..e937acbd681 100644 --- a/src/main/java/com/stripe/param/AccountPersonCreateParams.java +++ b/src/main/java/com/stripe/param/AccountPersonCreateParams.java @@ -148,7 +148,7 @@ public class AccountPersonCreateParams extends ApiRequestParams { * any jurisdiction. */ @SerializedName("political_exposure") - PoliticalExposure politicalExposure; + String politicalExposure; /** The person's registered address. */ @SerializedName("registered_address") @@ -191,7 +191,7 @@ private AccountPersonCreateParams( String nationality, String personToken, String phone, - PoliticalExposure politicalExposure, + String politicalExposure, RegisteredAddress registeredAddress, Relationship relationship, String ssnLast4, @@ -280,7 +280,7 @@ public static class Builder { private String phone; - private PoliticalExposure politicalExposure; + private String politicalExposure; private RegisteredAddress registeredAddress; @@ -621,8 +621,7 @@ public Builder setPhone(String phone) { * related persons, declares that they hold or have held an important public job or function, in * any jurisdiction. */ - public Builder setPoliticalExposure( - AccountPersonCreateParams.PoliticalExposure politicalExposure) { + public Builder setPoliticalExposure(String politicalExposure) { this.politicalExposure = politicalExposure; return this; } @@ -2482,19 +2481,4 @@ public Builder setFront(String front) { } } } - - public enum PoliticalExposure implements ApiRequestParams.EnumParam { - @SerializedName("existing") - EXISTING("existing"), - - @SerializedName("none") - NONE("none"); - - @Getter(onMethod_ = {@Override}) - private final String value; - - PoliticalExposure(String value) { - this.value = value; - } - } } diff --git a/src/main/java/com/stripe/param/AccountPersonUpdateParams.java b/src/main/java/com/stripe/param/AccountPersonUpdateParams.java index a14396de8d6..bab641a2155 100644 --- a/src/main/java/com/stripe/param/AccountPersonUpdateParams.java +++ b/src/main/java/com/stripe/param/AccountPersonUpdateParams.java @@ -148,7 +148,7 @@ public class AccountPersonUpdateParams extends ApiRequestParams { * any jurisdiction. */ @SerializedName("political_exposure") - PoliticalExposure politicalExposure; + Object politicalExposure; /** The person's registered address. */ @SerializedName("registered_address") @@ -191,7 +191,7 @@ private AccountPersonUpdateParams( Object nationality, Object personToken, Object phone, - PoliticalExposure politicalExposure, + Object politicalExposure, RegisteredAddress registeredAddress, Relationship relationship, Object ssnLast4, @@ -280,7 +280,7 @@ public static class Builder { private Object phone; - private PoliticalExposure politicalExposure; + private Object politicalExposure; private RegisteredAddress registeredAddress; @@ -726,8 +726,17 @@ public Builder setPhone(EmptyParam phone) { * related persons, declares that they hold or have held an important public job or function, in * any jurisdiction. */ - public Builder setPoliticalExposure( - AccountPersonUpdateParams.PoliticalExposure politicalExposure) { + public Builder setPoliticalExposure(String politicalExposure) { + this.politicalExposure = politicalExposure; + return this; + } + + /** + * Indicates if the person or any of their representatives, family members, or other closely + * related persons, declares that they hold or have held an important public job or function, in + * any jurisdiction. + */ + public Builder setPoliticalExposure(EmptyParam politicalExposure) { this.politicalExposure = politicalExposure; return this; } @@ -2817,19 +2826,4 @@ public Builder setFront(EmptyParam front) { } } } - - public enum PoliticalExposure implements ApiRequestParams.EnumParam { - @SerializedName("existing") - EXISTING("existing"), - - @SerializedName("none") - NONE("none"); - - @Getter(onMethod_ = {@Override}) - private final String value; - - PoliticalExposure(String value) { - this.value = value; - } - } } diff --git a/src/main/java/com/stripe/param/PersonCollectionCreateParams.java b/src/main/java/com/stripe/param/PersonCollectionCreateParams.java index 03d262d3e1b..c056d733e01 100644 --- a/src/main/java/com/stripe/param/PersonCollectionCreateParams.java +++ b/src/main/java/com/stripe/param/PersonCollectionCreateParams.java @@ -148,7 +148,7 @@ public class PersonCollectionCreateParams extends ApiRequestParams { * any jurisdiction. */ @SerializedName("political_exposure") - PoliticalExposure politicalExposure; + String politicalExposure; /** The person's registered address. */ @SerializedName("registered_address") @@ -191,7 +191,7 @@ private PersonCollectionCreateParams( String nationality, String personToken, String phone, - PoliticalExposure politicalExposure, + String politicalExposure, RegisteredAddress registeredAddress, Relationship relationship, String ssnLast4, @@ -280,7 +280,7 @@ public static class Builder { private String phone; - private PoliticalExposure politicalExposure; + private String politicalExposure; private RegisteredAddress registeredAddress; @@ -621,8 +621,7 @@ public Builder setPhone(String phone) { * related persons, declares that they hold or have held an important public job or function, in * any jurisdiction. */ - public Builder setPoliticalExposure( - PersonCollectionCreateParams.PoliticalExposure politicalExposure) { + public Builder setPoliticalExposure(String politicalExposure) { this.politicalExposure = politicalExposure; return this; } @@ -2489,19 +2488,4 @@ public Builder setFront(String front) { } } } - - public enum PoliticalExposure implements ApiRequestParams.EnumParam { - @SerializedName("existing") - EXISTING("existing"), - - @SerializedName("none") - NONE("none"); - - @Getter(onMethod_ = {@Override}) - private final String value; - - PoliticalExposure(String value) { - this.value = value; - } - } } diff --git a/src/main/java/com/stripe/param/PersonUpdateParams.java b/src/main/java/com/stripe/param/PersonUpdateParams.java index 95fc9763307..dc4ed3975da 100644 --- a/src/main/java/com/stripe/param/PersonUpdateParams.java +++ b/src/main/java/com/stripe/param/PersonUpdateParams.java @@ -148,7 +148,7 @@ public class PersonUpdateParams extends ApiRequestParams { * any jurisdiction. */ @SerializedName("political_exposure") - PoliticalExposure politicalExposure; + Object politicalExposure; /** The person's registered address. */ @SerializedName("registered_address") @@ -191,7 +191,7 @@ private PersonUpdateParams( Object nationality, Object personToken, Object phone, - PoliticalExposure politicalExposure, + Object politicalExposure, RegisteredAddress registeredAddress, Relationship relationship, Object ssnLast4, @@ -280,7 +280,7 @@ public static class Builder { private Object phone; - private PoliticalExposure politicalExposure; + private Object politicalExposure; private RegisteredAddress registeredAddress; @@ -726,7 +726,17 @@ public Builder setPhone(EmptyParam phone) { * related persons, declares that they hold or have held an important public job or function, in * any jurisdiction. */ - public Builder setPoliticalExposure(PersonUpdateParams.PoliticalExposure politicalExposure) { + public Builder setPoliticalExposure(String politicalExposure) { + this.politicalExposure = politicalExposure; + return this; + } + + /** + * Indicates if the person or any of their representatives, family members, or other closely + * related persons, declares that they hold or have held an important public job or function, in + * any jurisdiction. + */ + public Builder setPoliticalExposure(EmptyParam politicalExposure) { this.politicalExposure = politicalExposure; return this; } @@ -2809,19 +2819,4 @@ public Builder setFront(EmptyParam front) { } } } - - public enum PoliticalExposure implements ApiRequestParams.EnumParam { - @SerializedName("existing") - EXISTING("existing"), - - @SerializedName("none") - NONE("none"); - - @Getter(onMethod_ = {@Override}) - private final String value; - - PoliticalExposure(String value) { - this.value = value; - } - } } diff --git a/src/main/java/com/stripe/param/TokenCreateParams.java b/src/main/java/com/stripe/param/TokenCreateParams.java index 51437598e9d..b87796f5750 100644 --- a/src/main/java/com/stripe/param/TokenCreateParams.java +++ b/src/main/java/com/stripe/param/TokenCreateParams.java @@ -4454,7 +4454,7 @@ public static class Person { * any jurisdiction. */ @SerializedName("political_exposure") - PoliticalExposure politicalExposure; + String politicalExposure; /** The person's registered address. */ @SerializedName("registered_address") @@ -4495,7 +4495,7 @@ private Person( Object metadata, String nationality, String phone, - PoliticalExposure politicalExposure, + String politicalExposure, RegisteredAddress registeredAddress, Relationship relationship, String ssnLast4, @@ -4578,7 +4578,7 @@ public static class Builder { private String phone; - private PoliticalExposure politicalExposure; + private String politicalExposure; private RegisteredAddress registeredAddress; @@ -4884,8 +4884,7 @@ public Builder setPhone(String phone) { * related persons, declares that they hold or have held an important public job or function, * in any jurisdiction. */ - public Builder setPoliticalExposure( - TokenCreateParams.Person.PoliticalExposure politicalExposure) { + public Builder setPoliticalExposure(String politicalExposure) { this.politicalExposure = politicalExposure; return this; } @@ -6772,21 +6771,6 @@ public Builder setFront(String front) { } } } - - public enum PoliticalExposure implements ApiRequestParams.EnumParam { - @SerializedName("existing") - EXISTING("existing"), - - @SerializedName("none") - NONE("none"); - - @Getter(onMethod_ = {@Override}) - private final String value; - - PoliticalExposure(String value) { - this.value = value; - } - } } @Getter From d0f12606f581e945ee1d5f49391302b0fc19790d Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 21 Feb 2025 18:58:05 +0000 Subject: [PATCH 17/45] Update generated code for v1502 --- OPENAPI_VERSION | 2 +- .../java/com/stripe/model/identity/VerificationSession.java | 2 +- .../param/identity/VerificationSessionCreateParams.java | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index b8101af09d2..4ffe7a94b26 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1501 \ No newline at end of file +v1502 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/identity/VerificationSession.java b/src/main/java/com/stripe/model/identity/VerificationSession.java index cd26557bff8..c38ef759f91 100644 --- a/src/main/java/com/stripe/model/identity/VerificationSession.java +++ b/src/main/java/com/stripe/model/identity/VerificationSession.java @@ -129,7 +129,7 @@ public class VerificationSession extends ApiResource @SerializedName("redaction") Redaction redaction; - /** Token referencing a Customer resource. */ + /** Customer ID. */ @SerializedName("related_customer") String relatedCustomer; diff --git a/src/main/java/com/stripe/param/identity/VerificationSessionCreateParams.java b/src/main/java/com/stripe/param/identity/VerificationSessionCreateParams.java index bf58632728a..e2f6d4c072c 100644 --- a/src/main/java/com/stripe/param/identity/VerificationSessionCreateParams.java +++ b/src/main/java/com/stripe/param/identity/VerificationSessionCreateParams.java @@ -49,7 +49,7 @@ public class VerificationSessionCreateParams extends ApiRequestParams { @SerializedName("provided_details") ProvidedDetails providedDetails; - /** Token referencing a Customer resource. */ + /** Customer ID. */ @SerializedName("related_customer") String relatedCustomer; @@ -235,7 +235,7 @@ public Builder setProvidedDetails( return this; } - /** Token referencing a Customer resource. */ + /** Customer ID. */ public Builder setRelatedCustomer(String relatedCustomer) { this.relatedCustomer = relatedCustomer; return this; From 011fce827460f6ca6b6fb6e38669666a92298be5 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2025 16:57:34 +0000 Subject: [PATCH 18/45] Update generated code for v1504 --- OPENAPI_VERSION | 2 +- src/main/java/com/stripe/model/TaxRate.java | 3 ++- src/main/java/com/stripe/model/tax/Calculation.java | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 4ffe7a94b26..aae3b627206 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1502 \ No newline at end of file +v1504 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/TaxRate.java b/src/main/java/com/stripe/model/TaxRate.java index f830d614dcf..88e2a3cde12 100644 --- a/src/main/java/com/stripe/model/TaxRate.java +++ b/src/main/java/com/stripe/model/TaxRate.java @@ -140,7 +140,8 @@ public class TaxRate extends ApiResource implements HasId, MetadataStoreOne of {@code flat_amount}, or {@code percentage}. */ diff --git a/src/main/java/com/stripe/model/tax/Calculation.java b/src/main/java/com/stripe/model/tax/Calculation.java index 13685e84a62..87cd518dd4e 100644 --- a/src/main/java/com/stripe/model/tax/Calculation.java +++ b/src/main/java/com/stripe/model/tax/Calculation.java @@ -646,7 +646,8 @@ public static class TaxRateDetails extends StripeObject { /** * Indicates the type of tax rate applied to the taxable amount. This value can be {@code - * null} when no tax applies to the location. + * null} when no tax applies to the location. This field is only present for TaxRates created + * by Stripe Tax. * *

One of {@code flat_amount}, or {@code percentage}. */ From 92e5e5d5dc6de3fb0f397ded01a6aeb78f79e6d0 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2025 17:12:45 +0000 Subject: [PATCH 19/45] Update generated code for v1505 --- OPENAPI_VERSION | 2 +- .../com/stripe/model/terminal/Reader.java | 52 ++++++++++ .../ReaderTimeoutInputCollectionParams.java | 98 +++++++++++++++++++ .../testhelpers/terminal/ReaderService.java | 33 +++++++ 4 files changed, 184 insertions(+), 1 deletion(-) create mode 100644 src/main/java/com/stripe/param/terminal/ReaderTimeoutInputCollectionParams.java diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index aae3b627206..ddf5ac54492 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1504 \ No newline at end of file +v1505 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/terminal/Reader.java b/src/main/java/com/stripe/model/terminal/Reader.java index c5cf9ef31d2..d56dcec8367 100644 --- a/src/main/java/com/stripe/model/terminal/Reader.java +++ b/src/main/java/com/stripe/model/terminal/Reader.java @@ -31,6 +31,7 @@ import com.stripe.param.terminal.ReaderRetrieveParams; import com.stripe.param.terminal.ReaderSetReaderDisplayParams; import com.stripe.param.terminal.ReaderSucceedInputCollectionParams; +import com.stripe.param.terminal.ReaderTimeoutInputCollectionParams; import com.stripe.param.terminal.ReaderUpdateParams; import java.util.List; import java.util.Map; @@ -1522,6 +1523,57 @@ public Reader succeedInputCollection( options); return resource.getResponseGetter().request(request, Reader.class); } + + /** Completes an input collection with a timeout error on a simulated reader. */ + public Reader timeoutInputCollection() throws StripeException { + return timeoutInputCollection((Map) null, (RequestOptions) null); + } + + /** Completes an input collection with a timeout error on a simulated reader. */ + public Reader timeoutInputCollection(RequestOptions options) throws StripeException { + return timeoutInputCollection((Map) null, options); + } + + /** Completes an input collection with a timeout error on a simulated reader. */ + public Reader timeoutInputCollection(Map params) throws StripeException { + return timeoutInputCollection(params, (RequestOptions) null); + } + + /** Completes an input collection with a timeout error on a simulated reader. */ + public Reader timeoutInputCollection(Map params, RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/test_helpers/terminal/readers/%s/timeout_input_collection", + ApiResource.urlEncodeId(this.resource.getId())); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options); + return resource.getResponseGetter().request(request, Reader.class); + } + + /** Completes an input collection with a timeout error on a simulated reader. */ + public Reader timeoutInputCollection(ReaderTimeoutInputCollectionParams params) + throws StripeException { + return timeoutInputCollection(params, (RequestOptions) null); + } + + /** Completes an input collection with a timeout error on a simulated reader. */ + public Reader timeoutInputCollection( + ReaderTimeoutInputCollectionParams params, RequestOptions options) throws StripeException { + String path = + String.format( + "/v1/test_helpers/terminal/readers/%s/timeout_input_collection", + ApiResource.urlEncodeId(this.resource.getId())); + ApiResource.checkNullTypedParams(path, params); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return resource.getResponseGetter().request(request, Reader.class); + } } @Override diff --git a/src/main/java/com/stripe/param/terminal/ReaderTimeoutInputCollectionParams.java b/src/main/java/com/stripe/param/terminal/ReaderTimeoutInputCollectionParams.java new file mode 100644 index 00000000000..f06f313eeaf --- /dev/null +++ b/src/main/java/com/stripe/param/terminal/ReaderTimeoutInputCollectionParams.java @@ -0,0 +1,98 @@ +// File generated from our OpenAPI spec +package com.stripe.param.terminal; + +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 ReaderTimeoutInputCollectionParams extends ApiRequestParams { + /** Specifies which fields in the response should be expanded. */ + @SerializedName("expand") + List expand; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private ReaderTimeoutInputCollectionParams(List expand, Map extraParams) { + this.expand = expand; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private List expand; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public ReaderTimeoutInputCollectionParams build() { + return new ReaderTimeoutInputCollectionParams(this.expand, this.extraParams); + } + + /** + * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * ReaderTimeoutInputCollectionParams#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 + * ReaderTimeoutInputCollectionParams#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 + * ReaderTimeoutInputCollectionParams#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 ReaderTimeoutInputCollectionParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } +} diff --git a/src/main/java/com/stripe/service/testhelpers/terminal/ReaderService.java b/src/main/java/com/stripe/service/testhelpers/terminal/ReaderService.java index 612cc17f547..d641e862f27 100644 --- a/src/main/java/com/stripe/service/testhelpers/terminal/ReaderService.java +++ b/src/main/java/com/stripe/service/testhelpers/terminal/ReaderService.java @@ -12,6 +12,7 @@ import com.stripe.net.StripeResponseGetter; import com.stripe.param.terminal.ReaderPresentPaymentMethodParams; import com.stripe.param.terminal.ReaderSucceedInputCollectionParams; +import com.stripe.param.terminal.ReaderTimeoutInputCollectionParams; public final class ReaderService extends ApiService { public ReaderService(StripeResponseGetter responseGetter) { @@ -101,4 +102,36 @@ public Reader succeedInputCollection( options); return this.request(request, Reader.class); } + /** Completes an input collection with a timeout error on a simulated reader. */ + public Reader timeoutInputCollection(String reader, ReaderTimeoutInputCollectionParams params) + throws StripeException { + return timeoutInputCollection(reader, params, (RequestOptions) null); + } + /** Completes an input collection with a timeout error on a simulated reader. */ + public Reader timeoutInputCollection(String reader, RequestOptions options) + throws StripeException { + return timeoutInputCollection(reader, (ReaderTimeoutInputCollectionParams) null, options); + } + /** Completes an input collection with a timeout error on a simulated reader. */ + public Reader timeoutInputCollection(String reader) throws StripeException { + return timeoutInputCollection( + reader, (ReaderTimeoutInputCollectionParams) null, (RequestOptions) null); + } + /** Completes an input collection with a timeout error on a simulated reader. */ + public Reader timeoutInputCollection( + String reader, ReaderTimeoutInputCollectionParams params, RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/test_helpers/terminal/readers/%s/timeout_input_collection", + ApiResource.urlEncodeId(reader)); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, Reader.class); + } } From b842f1f06f028c29ae26a72d8abf9b4d0f7e5a0d Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2025 19:28:47 +0000 Subject: [PATCH 20/45] Update generated code for v1505 --- .../stripe/param/v2/core/EventListParams.java | 99 +------------------ .../stripe/service/v2/core/EventService.java | 8 -- 2 files changed, 4 insertions(+), 103 deletions(-) diff --git a/src/main/java/com/stripe/param/v2/core/EventListParams.java b/src/main/java/com/stripe/param/v2/core/EventListParams.java index 55ae39caac5..a5c9f901bd4 100644 --- a/src/main/java/com/stripe/param/v2/core/EventListParams.java +++ b/src/main/java/com/stripe/param/v2/core/EventListParams.java @@ -3,37 +3,12 @@ import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; -import java.time.Instant; import java.util.HashMap; import java.util.Map; import lombok.Getter; @Getter public class EventListParams extends ApiRequestParams { - /** Filter for events created after the specified timestamp. */ - @SerializedName("created_gt") - Instant createdGt; - - /** Filter for events created at or after the specified timestamp. */ - @SerializedName("created_gte") - Instant createdGte; - - /** Filter for events created before the specified timestamp. */ - @SerializedName("created_lt") - Instant createdLt; - - /** Filter for events created at or before the specified timestamp. */ - @SerializedName("created_lte") - Instant createdLte; - - /** - * Filter events based on whether they were successfully delivered to all subscribed event - * destinations. If false, events which are still pending or have failed all delivery attempts to - * a event destination will be returned. - */ - @SerializedName("delivery_success") - Boolean deliverySuccess; - /** * 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 @@ -47,7 +22,7 @@ public class EventListParams extends ApiRequestParams { @SerializedName("limit") Integer limit; - /** Primary object ID used to retrieve related events. */ + /** Required. Primary object ID used to retrieve related events. */ @SerializedName("object_id") String objectId; @@ -56,20 +31,7 @@ public class EventListParams extends ApiRequestParams { String page; private EventListParams( - Instant createdGt, - Instant createdGte, - Instant createdLt, - Instant createdLte, - Boolean deliverySuccess, - Map extraParams, - Integer limit, - String objectId, - String page) { - this.createdGt = createdGt; - this.createdGte = createdGte; - this.createdLt = createdLt; - this.createdLte = createdLte; - this.deliverySuccess = deliverySuccess; + Map extraParams, Integer limit, String objectId, String page) { this.extraParams = extraParams; this.limit = limit; this.objectId = objectId; @@ -81,16 +43,6 @@ public static Builder builder() { } public static class Builder { - private Instant createdGt; - - private Instant createdGte; - - private Instant createdLt; - - private Instant createdLte; - - private Boolean deliverySuccess; - private Map extraParams; private Integer limit; @@ -101,50 +53,7 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public EventListParams build() { - return new EventListParams( - this.createdGt, - this.createdGte, - this.createdLt, - this.createdLte, - this.deliverySuccess, - this.extraParams, - this.limit, - this.objectId, - this.page); - } - - /** Filter for events created after the specified timestamp. */ - public Builder setCreatedGt(Instant createdGt) { - this.createdGt = createdGt; - return this; - } - - /** Filter for events created at or after the specified timestamp. */ - public Builder setCreatedGte(Instant createdGte) { - this.createdGte = createdGte; - return this; - } - - /** Filter for events created before the specified timestamp. */ - public Builder setCreatedLt(Instant createdLt) { - this.createdLt = createdLt; - return this; - } - - /** Filter for events created at or before the specified timestamp. */ - public Builder setCreatedLte(Instant createdLte) { - this.createdLte = createdLte; - return this; - } - - /** - * Filter events based on whether they were successfully delivered to all subscribed event - * destinations. If false, events which are still pending or have failed all delivery attempts - * to a event destination will be returned. - */ - public Builder setDeliverySuccess(Boolean deliverySuccess) { - this.deliverySuccess = deliverySuccess; - return this; + return new EventListParams(this.extraParams, this.limit, this.objectId, this.page); } /** @@ -179,7 +88,7 @@ public Builder setLimit(Integer limit) { return this; } - /** Primary object ID used to retrieve related events. */ + /** Required. Primary object ID used to retrieve related events. */ public Builder setObjectId(String objectId) { this.objectId = objectId; return this; diff --git a/src/main/java/com/stripe/service/v2/core/EventService.java b/src/main/java/com/stripe/service/v2/core/EventService.java index 639ff05be6c..5732a916f2f 100644 --- a/src/main/java/com/stripe/service/v2/core/EventService.java +++ b/src/main/java/com/stripe/service/v2/core/EventService.java @@ -24,14 +24,6 @@ public StripeCollection list(EventListParams params) throws StripeExcepti return list(params, (RequestOptions) null); } /** List events, going back up to 30 days. */ - public StripeCollection list(RequestOptions options) throws StripeException { - return list((EventListParams) null, options); - } - /** List events, going back up to 30 days. */ - public StripeCollection list() throws StripeException { - return list((EventListParams) null, (RequestOptions) null); - } - /** List events, going back up to 30 days. */ public StripeCollection list(EventListParams params, RequestOptions options) throws StripeException { String path = "/v2/core/events"; From 032d6727e32130ce5ef2c464bb1f2c1765ec1c43 Mon Sep 17 00:00:00 2001 From: "stripe-openapi[bot]" <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2025 22:31:30 +0000 Subject: [PATCH 21/45] Update generated code (#1943) * Update generated code for v1463 * Update generated code for v1494 * Update generated code for v1495 * Update generated code for v1501 * Update generated code for v1505 --------- Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Co-authored-by: prathmesh-stripe <165320323+prathmesh-stripe@users.noreply.github.com> --- CONTRIBUTING.md | 25 -- OPENAPI_VERSION | 2 +- src/main/java/com/stripe/ApiVersion.java | 2 +- src/main/java/com/stripe/model/Balance.java | 90 ++++- src/main/java/com/stripe/model/Charge.java | 30 +- .../com/stripe/model/ConfirmationToken.java | 21 +- .../java/com/stripe/model/CreditNote.java | 10 +- src/main/java/com/stripe/model/Invoice.java | 10 +- src/main/java/com/stripe/model/LineItem.java | 10 +- .../java/com/stripe/model/PaymentIntent.java | 53 ++- .../java/com/stripe/model/PaymentMethod.java | 21 +- src/main/java/com/stripe/model/Quote.java | 28 +- src/main/java/com/stripe/model/TaxRate.java | 13 +- .../com/stripe/model/billing/CreditGrant.java | 29 ++ .../model/billing/MeterEventSummary.java | 3 + .../com/stripe/model/checkout/Session.java | 97 ++++- .../com/stripe/model/tax/Calculation.java | 2 +- .../stripe/model/tax/CalculationLineItem.java | 4 +- .../com/stripe/model/tax/Transaction.java | 2 +- .../param/PaymentIntentConfirmParams.java | 125 +++++- .../param/PaymentIntentCreateParams.java | 125 +++++- .../param/PaymentIntentUpdateParams.java | 175 +++++++- .../com/stripe/param/ProductCreateParams.java | 40 ++ .../com/stripe/param/TaxRateCreateParams.java | 6 +- .../com/stripe/param/TaxRateUpdateParams.java | 10 +- .../param/WebhookEndpointCreateParams.java | 5 +- .../CreditBalanceSummaryRetrieveParams.java | 129 +++++- .../billing/CreditGrantCreateParams.java | 161 +++++++- .../param/checkout/SessionCreateParams.java | 272 ++++++++++++- .../param/checkout/SessionUpdateParams.java | 380 +++++++++++++++++- 30 files changed, 1693 insertions(+), 187 deletions(-) delete mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index 11efda67a0a..00000000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Contributing - -We welcome bug reports, feature requests, and code contributions in a pull request. - -For most pull requests, we request that you identify or create an associated issue that has the necessary context. We use these issues to reach agreement on an approach and save the PR author from having to redo work. Fixing typos or documentation issues likely do not need an issue; for any issue that introduces substantial code changes, changes the public interface, or if you aren't sure, please find or [create an issue](https://www.github.com/stripe/stripe-java/issues/new/choose). - -## Contributor License Agreement - -All contributors must sign the Contributor License Agreement (CLA) before we can accept their contribution. If you have not yet signed the agreement, you will be given an option to do so when you open a pull request. You can then sign by clicking on the badge in the comment from @CLAassistant. - -## Generated code - -This project has a combination of manually maintained code and code generated from our private code generator. If your contribution involves changes to generated code, please call this out in the issue or pull request as we will likely need to make a change to our code generator before accepting the contribution. - -To identify files with purely generated code, look for the comment `File generated from our OpenAPI spec.` at the start of the file. Generated blocks of code within hand-written files will be between comments that say `The beginning of the section generated from our OpenAPI spec` and `The end of the section generated from our OpenAPI spec`. - -## Compatibility with supported language and runtime versions - -This project supports [many different langauge and runtime versions](README.md#requirements) and we are unable to accept any contribution that does not work on _all_ supported versions. If, after discussing the approach in the associated issue, your change must use an API / feature that isn't available in all supported versions, please call this out explicitly in the issue or pull request so we can help figure out the best way forward. - -## Set up your dev environment - -Please refer to this project's [README.md](README.md#development) for instructions on how to set up your development environment. - diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 217ac84ad04..ddf5ac54492 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1455 \ No newline at end of file +v1505 \ 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 40e6e8ec23f..df1ff179ecd 100644 --- a/src/main/java/com/stripe/ApiVersion.java +++ b/src/main/java/com/stripe/ApiVersion.java @@ -2,5 +2,5 @@ package com.stripe; final class ApiVersion { - public static final String CURRENT = "2025-01-27.acacia"; + public static final String CURRENT = "2025-02-24.acacia"; } diff --git a/src/main/java/com/stripe/model/Balance.java b/src/main/java/com/stripe/model/Balance.java index deb715064ae..1e0c70549d6 100644 --- a/src/main/java/com/stripe/model/Balance.java +++ b/src/main/java/com/stripe/model/Balance.java @@ -166,15 +166,24 @@ public static class Available extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class SourceTypes extends StripeObject { - /** Amount for bank account. */ + /** + * Amount coming from legacy US ACH + * payments. + */ @SerializedName("bank_account") Long bankAccount; - /** Amount for card. */ + /** + * Amount coming from most payment methods, including cards as well as non-legacy bank debits. + */ @SerializedName("card") Long card; - /** Amount for FPX. */ + /** + * Amount coming from FPX, a Malaysian + * payment method. + */ @SerializedName("fpx") Long fpx; } @@ -211,15 +220,24 @@ public static class ConnectReserved extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class SourceTypes extends StripeObject { - /** Amount for bank account. */ + /** + * Amount coming from legacy US ACH + * payments. + */ @SerializedName("bank_account") Long bankAccount; - /** Amount for card. */ + /** + * Amount coming from most payment methods, including cards as well as non-legacy bank debits. + */ @SerializedName("card") Long card; - /** Amount for FPX. */ + /** + * Amount coming from FPX, a Malaysian + * payment method. + */ @SerializedName("fpx") Long fpx; } @@ -279,15 +297,24 @@ public static class NetAvailable extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class SourceTypes extends StripeObject { - /** Amount for bank account. */ + /** + * Amount coming from legacy US ACH + * payments. + */ @SerializedName("bank_account") Long bankAccount; - /** Amount for card. */ + /** + * Amount coming from most payment methods, including cards as well as non-legacy bank debits. + */ @SerializedName("card") Long card; - /** Amount for FPX. */ + /** + * Amount coming from FPX, a Malaysian + * payment method. + */ @SerializedName("fpx") Long fpx; } @@ -301,15 +328,24 @@ public static class SourceTypes extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class SourceTypes extends StripeObject { - /** Amount for bank account. */ + /** + * Amount coming from legacy US ACH + * payments. + */ @SerializedName("bank_account") Long bankAccount; - /** Amount for card. */ + /** + * Amount coming from most payment methods, including cards as well as non-legacy bank debits. + */ @SerializedName("card") Long card; - /** Amount for FPX. */ + /** + * Amount coming from FPX, a Malaysian + * payment method. + */ @SerializedName("fpx") Long fpx; } @@ -358,15 +394,24 @@ public static class Available extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class SourceTypes extends StripeObject { - /** Amount for bank account. */ + /** + * Amount coming from legacy US ACH + * payments. + */ @SerializedName("bank_account") Long bankAccount; - /** Amount for card. */ + /** + * Amount coming from most payment methods, including cards as well as non-legacy bank debits. + */ @SerializedName("card") Long card; - /** Amount for FPX. */ + /** + * Amount coming from FPX, a Malaysian + * payment method. + */ @SerializedName("fpx") Long fpx; } @@ -404,15 +449,24 @@ public static class Pending extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class SourceTypes extends StripeObject { - /** Amount for bank account. */ + /** + * Amount coming from legacy US ACH + * payments. + */ @SerializedName("bank_account") Long bankAccount; - /** Amount for card. */ + /** + * Amount coming from most payment methods, including cards as well as non-legacy bank debits. + */ @SerializedName("card") Long card; - /** Amount for FPX. */ + /** + * Amount coming from FPX, a Malaysian + * payment method. + */ @SerializedName("fpx") Long fpx; } diff --git a/src/main/java/com/stripe/model/Charge.java b/src/main/java/com/stripe/model/Charge.java index 8c8f3527f61..d8acaa6062f 100644 --- a/src/main/java/com/stripe/model/Charge.java +++ b/src/main/java/com/stripe/model/Charge.java @@ -1305,13 +1305,11 @@ public static class PaymentMethodDetails extends StripeObject { Twint twint; /** - * The type of transaction-specific details of the payment method used in the payment, one of - * {@code ach_credit_transfer}, {@code ach_debit}, {@code acss_debit}, {@code alipay}, {@code - * au_becs_debit}, {@code bancontact}, {@code card}, {@code card_present}, {@code eps}, {@code - * giropay}, {@code ideal}, {@code klarna}, {@code multibanco}, {@code p24}, {@code sepa_debit}, - * {@code sofort}, {@code stripe_account}, or {@code wechat}. An additional hash is included on - * {@code payment_method_details} with a name matching this value. It contains information - * specific to the payment method. + * The type of transaction-specific details of the payment method used in the payment. See PaymentMethod.type + * for the full list of possible types. An additional hash is included on {@code + * payment_method_details} with a name matching this value. It contains information specific to + * the payment method. */ @SerializedName("type") String type; @@ -1889,10 +1887,8 @@ public static class Card extends StripeObject { /** * This is used by the financial networks to identify a transaction. Visa calls this the * Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the - * Acquirer Reference Data. The first three digits of the Trace ID is the Financial Network - * Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent - * the date (MM/DD). This field will be available for successful Visa, Mastercard, or American - * Express transactions and always null for other card brands. + * Acquirer Reference Data. This value will be present if it is returned by the financial + * network in the authorization response, and null otherwise. */ @SerializedName("network_transaction_id") String networkTransactionId; @@ -2454,10 +2450,8 @@ public static class CardPresent extends StripeObject { /** * This is used by the financial networks to identify a transaction. Visa calls this the * Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the - * Acquirer Reference Data. The first three digits of the Trace ID is the Financial Network - * Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent - * the date (MM/DD). This field will be available for successful Visa, Mastercard, or American - * Express transactions and always null for other card brands. + * Acquirer Reference Data. This value will be present if it is returned by the financial + * network in the authorization response, and null otherwise. */ @SerializedName("network_transaction_id") String networkTransactionId; @@ -2917,10 +2911,8 @@ public static class InteracPresent extends StripeObject { /** * This is used by the financial networks to identify a transaction. Visa calls this the * Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the - * Acquirer Reference Data. The first three digits of the Trace ID is the Financial Network - * Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent - * the date (MM/DD). This field will be available for successful Visa, Mastercard, or American - * Express transactions and always null for other card brands. + * Acquirer Reference Data. This value will be present if it is returned by the financial + * network in the authorization response, and null otherwise. */ @SerializedName("network_transaction_id") String networkTransactionId; diff --git a/src/main/java/com/stripe/model/ConfirmationToken.java b/src/main/java/com/stripe/model/ConfirmationToken.java index b498b819d9e..592da3f2828 100644 --- a/src/main/java/com/stripe/model/ConfirmationToken.java +++ b/src/main/java/com/stripe/model/ConfirmationToken.java @@ -942,10 +942,8 @@ public static class CardPresent extends StripeObject { /** * This is used by the financial networks to identify a transaction. Visa calls this the * Transaction ID, Mastercard calls this the Trace ID, and American Express calls this - * the Acquirer Reference Data. The first three digits of the Trace ID is the Financial - * Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 - * digits represent the date (MM/DD). This field will be available for successful Visa, - * Mastercard, or American Express transactions and always null for other card brands. + * the Acquirer Reference Data. This value will be present if it is returned by the + * financial network in the authorization response, and null otherwise. */ @SerializedName("network_transaction_id") String networkTransactionId; @@ -1087,7 +1085,10 @@ public static class Wallet extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Networks extends StripeObject { - /** All available networks for the card. */ + /** + * All networks available for selection via payment_method_options.card.network. + */ @SerializedName("available") List available; @@ -1405,7 +1406,10 @@ public static class CardPresent extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Networks extends StripeObject { - /** All available networks for the card. */ + /** + * All networks available for selection via payment_method_options.card.network. + */ @SerializedName("available") List available; @@ -1682,7 +1686,10 @@ public static class InteracPresent extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Networks extends StripeObject { - /** All available networks for the card. */ + /** + * All networks available for selection via payment_method_options.card.network. + */ @SerializedName("available") List available; diff --git a/src/main/java/com/stripe/model/CreditNote.java b/src/main/java/com/stripe/model/CreditNote.java index 73213a64086..a4c582853f0 100644 --- a/src/main/java/com/stripe/model/CreditNote.java +++ b/src/main/java/com/stripe/model/CreditNote.java @@ -792,12 +792,12 @@ public static class Tax extends StripeObject { /** * Tax rates can be applied to invoices, subscriptions and Checkout - * Sessions to collect tax. + * href="https://stripe.com/invoicing/taxes/tax-rates">invoices, subscriptions and Checkout Sessions to + * collect tax. * - *

Related guide: Tax rates + *

Related guide: Tax rates */ @SerializedName("rate") TaxRate rate; diff --git a/src/main/java/com/stripe/model/Invoice.java b/src/main/java/com/stripe/model/Invoice.java index ff87a9cc2c5..51acbd73c90 100644 --- a/src/main/java/com/stripe/model/Invoice.java +++ b/src/main/java/com/stripe/model/Invoice.java @@ -2800,12 +2800,12 @@ public static class Tax extends StripeObject { /** * Tax rates can be applied to invoices, subscriptions and Checkout - * Sessions to collect tax. + * href="https://stripe.com/invoicing/taxes/tax-rates">invoices, subscriptions and Checkout Sessions to + * collect tax. * - *

Related guide: Tax rates + *

Related guide: Tax rates */ @SerializedName("rate") TaxRate rate; diff --git a/src/main/java/com/stripe/model/LineItem.java b/src/main/java/com/stripe/model/LineItem.java index 157e43601dc..101b583063b 100644 --- a/src/main/java/com/stripe/model/LineItem.java +++ b/src/main/java/com/stripe/model/LineItem.java @@ -110,12 +110,12 @@ public static class Tax extends StripeObject { /** * Tax rates can be applied to invoices, subscriptions and Checkout - * Sessions to collect tax. + * href="https://stripe.com/invoicing/taxes/tax-rates">invoices, subscriptions and Checkout Sessions to + * collect tax. * - *

Related guide: Tax rates + *

Related guide: Tax rates */ @SerializedName("rate") TaxRate rate; diff --git a/src/main/java/com/stripe/model/PaymentIntent.java b/src/main/java/com/stripe/model/PaymentIntent.java index bb4b2970ec9..f6c0a3f9dcb 100644 --- a/src/main/java/com/stripe/model/PaymentIntent.java +++ b/src/main/java/com/stripe/model/PaymentIntent.java @@ -2665,6 +2665,14 @@ public static class AcssDebit extends StripeObject { @SerializedName("setup_future_usage") String setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + /** * Bank account verification method. * @@ -2926,6 +2934,14 @@ public static class AuBecsDebit extends StripeObject { */ @SerializedName("setup_future_usage") String setupFutureUsage; + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; } /** @@ -2963,6 +2979,14 @@ public static class BacsDebit extends StripeObject { @SerializedName("setup_future_usage") String setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + /** * For more details about MandateOptions, please refer to the API Reference. @@ -4418,6 +4442,14 @@ public static class SepaDebit extends StripeObject { @SerializedName("setup_future_usage") String setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + /** * For more details about MandateOptions, please refer to the API Reference. @@ -4594,6 +4626,14 @@ public static class UsBankAccount extends StripeObject { @SerializedName("setup_future_usage") String setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + /** * Bank account verification method. * @@ -4806,13 +4846,12 @@ public static class CustomerNotification extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class TransferData extends StripeObject { /** - * Amount intended to be collected by this PaymentIntent. A positive integer representing how - * much to charge in the smallest - * currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal - * currency). The minimum amount is $0.50 US or equivalent in - * charge currency. The amount value supports up to eight digits (e.g., a value of 99999999 - * for a USD charge of $999,999.99). + * The amount transferred to the destination account. This transfer will occur automatically + * after the payment succeeds. If no amount is specified, by default the entire payment amount + * is transferred to the destination account. The amount must be less than or equal to the amount, + * and must be a positive integer representing how much to transfer in the smallest currency + * unit (e.g., 100 cents to charge $1.00). */ @SerializedName("amount") Long amount; diff --git a/src/main/java/com/stripe/model/PaymentMethod.java b/src/main/java/com/stripe/model/PaymentMethod.java index 93d71b74d35..ed67319179f 100644 --- a/src/main/java/com/stripe/model/PaymentMethod.java +++ b/src/main/java/com/stripe/model/PaymentMethod.java @@ -1172,10 +1172,8 @@ public static class CardPresent extends StripeObject { /** * This is used by the financial networks to identify a transaction. Visa calls this the * Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the - * Acquirer Reference Data. The first three digits of the Trace ID is the Financial - * Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits - * represent the date (MM/DD). This field will be available for successful Visa, - * Mastercard, or American Express transactions and always null for other card brands. + * Acquirer Reference Data. This value will be present if it is returned by the financial + * network in the authorization response, and null otherwise. */ @SerializedName("network_transaction_id") String networkTransactionId; @@ -1316,7 +1314,10 @@ public static class Wallet extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Networks extends StripeObject { - /** All available networks for the card. */ + /** + * All networks available for selection via payment_method_options.card.network. + */ @SerializedName("available") List available; @@ -1628,7 +1629,10 @@ public static class CardPresent extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Networks extends StripeObject { - /** All available networks for the card. */ + /** + * All networks available for selection via payment_method_options.card.network. + */ @SerializedName("available") List available; @@ -1904,7 +1908,10 @@ public static class InteracPresent extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Networks extends StripeObject { - /** All available networks for the card. */ + /** + * All networks available for selection via payment_method_options.card.network. + */ @SerializedName("available") List available; diff --git a/src/main/java/com/stripe/model/Quote.java b/src/main/java/com/stripe/model/Quote.java index abca8061b1f..b0f1f2130a4 100644 --- a/src/main/java/com/stripe/model/Quote.java +++ b/src/main/java/com/stripe/model/Quote.java @@ -1120,13 +1120,12 @@ public static class Tax extends StripeObject { /** * Tax rates can be applied to invoices, subscriptions and Checkout + * href="https://stripe.com/invoicing/taxes/tax-rates">invoices, subscriptions and Checkout * Sessions to collect tax. * - *

Related guide: Tax - * rates + *

Related guide: Tax rates */ @SerializedName("rate") TaxRate rate; @@ -1260,13 +1259,12 @@ public static class Tax extends StripeObject { /** * Tax rates can be applied to invoices, subscriptions and Checkout + * href="https://stripe.com/invoicing/taxes/tax-rates">invoices, subscriptions and Checkout * Sessions to collect tax. * - *

Related guide: Tax - * rates + *

Related guide: Tax rates */ @SerializedName("rate") TaxRate rate; @@ -1535,12 +1533,12 @@ public static class Tax extends StripeObject { /** * Tax rates can be applied to invoices, subscriptions and Checkout - * Sessions to collect tax. + * href="https://stripe.com/invoicing/taxes/tax-rates">invoices, subscriptions and Checkout Sessions to + * collect tax. * - *

Related guide: Tax rates + *

Related guide: Tax rates */ @SerializedName("rate") TaxRate rate; diff --git a/src/main/java/com/stripe/model/TaxRate.java b/src/main/java/com/stripe/model/TaxRate.java index 84195dd5852..f830d614dcf 100644 --- a/src/main/java/com/stripe/model/TaxRate.java +++ b/src/main/java/com/stripe/model/TaxRate.java @@ -20,13 +20,12 @@ import lombok.Setter; /** - * Tax rates can be applied to invoices, subscriptions and Checkout - * Sessions to collect tax. + * Tax rates can be applied to invoices, + * subscriptions and Checkout Sessions to collect + * tax. * - *

Related guide: Tax rates + *

Related guide: Tax rates */ @Getter @Setter @@ -149,7 +148,7 @@ public class TaxRate extends ApiResource implements HasId, MetadataStoreISO 3166-2 subdivision code, without + * ISO 3166-2 subdivision code, without * country prefix. For example, "NY" for New York, United States. */ @SerializedName("state") diff --git a/src/main/java/com/stripe/model/billing/CreditGrant.java b/src/main/java/com/stripe/model/billing/CreditGrant.java index a320d926d4d..ba7d83050e3 100644 --- a/src/main/java/com/stripe/model/billing/CreditGrant.java +++ b/src/main/java/com/stripe/model/billing/CreditGrant.java @@ -21,6 +21,7 @@ import com.stripe.param.billing.CreditGrantRetrieveParams; import com.stripe.param.billing.CreditGrantUpdateParams; import com.stripe.param.billing.CreditGrantVoidGrantParams; +import java.util.List; import java.util.Map; import lombok.EqualsAndHashCode; import lombok.Getter; @@ -104,6 +105,12 @@ public class CreditGrant extends ApiResource implements HasId, MetadataStoreBilling Meter attached to them. + */ + @SerializedName("prices") + List prices; + + /** + * For more details about Price, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Price extends StripeObject implements HasId { + /** Unique identifier for the object. */ + @Getter(onMethod_ = {@Override}) + @SerializedName("id") + String id; + } } } diff --git a/src/main/java/com/stripe/model/billing/MeterEventSummary.java b/src/main/java/com/stripe/model/billing/MeterEventSummary.java index 1aa369178a2..477fa928113 100644 --- a/src/main/java/com/stripe/model/billing/MeterEventSummary.java +++ b/src/main/java/com/stripe/model/billing/MeterEventSummary.java @@ -20,6 +20,9 @@ * A billing meter event summary represents an aggregated view of a customer's billing meter events * within a specified timeframe. It indicates how much usage was accrued by a customer for that * period. + * + *

Note: Meters events are aggregated asynchronously so the meter event summaries provide an + * eventually consistent view of the reported usage. */ @Getter @Setter diff --git a/src/main/java/com/stripe/model/checkout/Session.java b/src/main/java/com/stripe/model/checkout/Session.java index 929fc6b4d12..0229078f496 100644 --- a/src/main/java/com/stripe/model/checkout/Session.java +++ b/src/main/java/com/stripe/model/checkout/Session.java @@ -113,6 +113,10 @@ public class Session extends ApiResource implements HasId, MetadataStoreAPI Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class CollectedInformation extends StripeObject { + /** Shipping information for this Checkout Session. */ + @SerializedName("shipping_details") + ShippingDetails shippingDetails; + } + /** * For more details about Consent, please refer to the API * Reference. @@ -1782,6 +1799,14 @@ public static class AcssDebit extends StripeObject { @SerializedName("setup_future_usage") String setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + /** * Bank account verification method. * @@ -1997,6 +2022,14 @@ public static class AuBecsDebit extends StripeObject { */ @SerializedName("setup_future_usage") String setupFutureUsage; + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; } /** @@ -2034,6 +2067,14 @@ public static class BacsDebit extends StripeObject { @SerializedName("setup_future_usage") String setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + /** * For more details about MandateOptions, please refer to the API Reference. @@ -2190,6 +2231,9 @@ public static class Card extends StripeObject { @SerializedName("request_three_d_secure") String requestThreeDSecure; + @SerializedName("restrictions") + Restrictions restrictions; + /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -2246,6 +2290,22 @@ public static class Installments extends StripeObject { @SerializedName("enabled") Boolean enabled; } + + /** + * For more details about Restrictions, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Restrictions extends StripeObject { + /** + * Specify the card brands to block in the Checkout Session. If a customer enters or selects + * a card belonging to a blocked brand, they can't complete the Session. + */ + @SerializedName("brands_blocked") + List brandsBlocked; + } } /** @@ -3090,6 +3150,14 @@ public static class SepaDebit extends StripeObject { @SerializedName("setup_future_usage") String setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + /** * For more details about MandateOptions, please refer to the API Reference. @@ -3192,6 +3260,14 @@ public static class UsBankAccount extends StripeObject { @SerializedName("setup_future_usage") String setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + /** * Bank account verification method. * @@ -3376,12 +3452,12 @@ public static class Tax extends StripeObject { /** * Tax rates can be applied to invoices, subscriptions and Checkout - * Sessions to collect tax. + * href="https://stripe.com/invoicing/taxes/tax-rates">invoices, subscriptions and Checkout Sessions to + * collect tax. * - *

Related guide: Tax rates + *

Related guide: Tax rates */ @SerializedName("rate") TaxRate rate; @@ -3543,12 +3619,12 @@ public static class Tax extends StripeObject { /** * Tax rates can be applied to invoices, subscriptions and Checkout - * Sessions to collect tax. + * href="https://stripe.com/invoicing/taxes/tax-rates">invoices, subscriptions and Checkout Sessions to + * collect tax. * - *

Related guide: Tax rates + *

Related guide: Tax rates */ @SerializedName("rate") TaxRate rate; @@ -3579,6 +3655,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { trySetResponseGetter(adaptivePricing, responseGetter); trySetResponseGetter(afterExpiration, responseGetter); trySetResponseGetter(automaticTax, responseGetter); + trySetResponseGetter(collectedInformation, responseGetter); trySetResponseGetter(consent, responseGetter); trySetResponseGetter(consentCollection, responseGetter); trySetResponseGetter(currencyConversion, responseGetter); diff --git a/src/main/java/com/stripe/model/tax/Calculation.java b/src/main/java/com/stripe/model/tax/Calculation.java index f3ca9f71d69..13685e84a62 100644 --- a/src/main/java/com/stripe/model/tax/Calculation.java +++ b/src/main/java/com/stripe/model/tax/Calculation.java @@ -531,7 +531,7 @@ public static class Jurisdiction extends StripeObject { String level; /** - * ISO 3166-2 subdivision code, + * ISO 3166-2 subdivision code, * without country prefix. For example, "NY" for New York, United States. */ @SerializedName("state") diff --git a/src/main/java/com/stripe/model/tax/CalculationLineItem.java b/src/main/java/com/stripe/model/tax/CalculationLineItem.java index 041f16d431a..cd2fe05f733 100644 --- a/src/main/java/com/stripe/model/tax/CalculationLineItem.java +++ b/src/main/java/com/stripe/model/tax/CalculationLineItem.java @@ -165,8 +165,8 @@ public static class Jurisdiction extends StripeObject { String level; /** - * ISO 3166-2 subdivision code, - * without country prefix. For example, "NY" for New York, United States. + * ISO 3166-2 subdivision code, without + * country prefix. For example, "NY" for New York, United States. */ @SerializedName("state") String state; diff --git a/src/main/java/com/stripe/model/tax/Transaction.java b/src/main/java/com/stripe/model/tax/Transaction.java index a3f2bf91d66..469a5972b0c 100644 --- a/src/main/java/com/stripe/model/tax/Transaction.java +++ b/src/main/java/com/stripe/model/tax/Transaction.java @@ -592,7 +592,7 @@ public static class Jurisdiction extends StripeObject { String level; /** - * ISO 3166-2 subdivision code, + * ISO 3166-2 subdivision code, * without country prefix. For example, "NY" for New York, United States. */ @SerializedName("state") diff --git a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java index d0f510d2cdc..e64121b9f69 100644 --- a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java @@ -7421,6 +7421,14 @@ public static class AcssDebit { @SerializedName("setup_future_usage") ApiRequestParams.EnumParam setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + /** Bank account verification method. */ @SerializedName("verification_method") VerificationMethod verificationMethod; @@ -7429,10 +7437,12 @@ private AcssDebit( Map extraParams, MandateOptions mandateOptions, ApiRequestParams.EnumParam setupFutureUsage, + String targetDate, VerificationMethod verificationMethod) { this.extraParams = extraParams; this.mandateOptions = mandateOptions; this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; this.verificationMethod = verificationMethod; } @@ -7447,6 +7457,8 @@ public static class Builder { private ApiRequestParams.EnumParam setupFutureUsage; + private String targetDate; + private VerificationMethod verificationMethod; /** Finalize and obtain parameter instance from this builder. */ @@ -7455,6 +7467,7 @@ public PaymentIntentConfirmParams.PaymentMethodOptions.AcssDebit build() { this.extraParams, this.mandateOptions, this.setupFutureUsage, + this.targetDate, this.verificationMethod); } @@ -7554,6 +7567,16 @@ public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { return this; } + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } + /** Bank account verification method. */ public Builder setVerificationMethod( PaymentIntentConfirmParams.PaymentMethodOptions.AcssDebit.VerificationMethod @@ -8741,10 +8764,21 @@ public static class AuBecsDebit { @SerializedName("setup_future_usage") ApiRequestParams.EnumParam setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + private AuBecsDebit( - Map extraParams, ApiRequestParams.EnumParam setupFutureUsage) { + Map extraParams, + ApiRequestParams.EnumParam setupFutureUsage, + String targetDate) { this.extraParams = extraParams; this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; } public static Builder builder() { @@ -8756,10 +8790,12 @@ public static class Builder { private ApiRequestParams.EnumParam setupFutureUsage; + private String targetDate; + /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentConfirmParams.PaymentMethodOptions.AuBecsDebit build() { return new PaymentIntentConfirmParams.PaymentMethodOptions.AuBecsDebit( - this.extraParams, this.setupFutureUsage); + this.extraParams, this.setupFutureUsage, this.targetDate); } /** @@ -8849,6 +8885,16 @@ public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { this.setupFutureUsage = setupFutureUsage; return this; } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } } public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @@ -8911,13 +8957,23 @@ public static class BacsDebit { @SerializedName("setup_future_usage") ApiRequestParams.EnumParam setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + private BacsDebit( Map extraParams, MandateOptions mandateOptions, - ApiRequestParams.EnumParam setupFutureUsage) { + ApiRequestParams.EnumParam setupFutureUsage, + String targetDate) { this.extraParams = extraParams; this.mandateOptions = mandateOptions; this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; } public static Builder builder() { @@ -8931,10 +8987,12 @@ public static class Builder { private ApiRequestParams.EnumParam setupFutureUsage; + private String targetDate; + /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentConfirmParams.PaymentMethodOptions.BacsDebit build() { return new PaymentIntentConfirmParams.PaymentMethodOptions.BacsDebit( - this.extraParams, this.mandateOptions, this.setupFutureUsage); + this.extraParams, this.mandateOptions, this.setupFutureUsage, this.targetDate); } /** @@ -9032,6 +9090,16 @@ public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { this.setupFutureUsage = setupFutureUsage; return this; } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } } @Getter @@ -16594,13 +16662,23 @@ public static class SepaDebit { @SerializedName("setup_future_usage") ApiRequestParams.EnumParam setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + private SepaDebit( Map extraParams, MandateOptions mandateOptions, - ApiRequestParams.EnumParam setupFutureUsage) { + ApiRequestParams.EnumParam setupFutureUsage, + String targetDate) { this.extraParams = extraParams; this.mandateOptions = mandateOptions; this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; } public static Builder builder() { @@ -16614,10 +16692,12 @@ public static class Builder { private ApiRequestParams.EnumParam setupFutureUsage; + private String targetDate; + /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentConfirmParams.PaymentMethodOptions.SepaDebit build() { return new PaymentIntentConfirmParams.PaymentMethodOptions.SepaDebit( - this.extraParams, this.mandateOptions, this.setupFutureUsage); + this.extraParams, this.mandateOptions, this.setupFutureUsage, this.targetDate); } /** @@ -16715,6 +16795,16 @@ public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { this.setupFutureUsage = setupFutureUsage; return this; } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } } @Getter @@ -17377,6 +17467,14 @@ public static class UsBankAccount { @SerializedName("setup_future_usage") ApiRequestParams.EnumParam setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + /** Bank account verification method. */ @SerializedName("verification_method") VerificationMethod verificationMethod; @@ -17388,6 +17486,7 @@ private UsBankAccount( Networks networks, ApiRequestParams.EnumParam preferredSettlementSpeed, ApiRequestParams.EnumParam setupFutureUsage, + String targetDate, VerificationMethod verificationMethod) { this.extraParams = extraParams; this.financialConnections = financialConnections; @@ -17395,6 +17494,7 @@ private UsBankAccount( this.networks = networks; this.preferredSettlementSpeed = preferredSettlementSpeed; this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; this.verificationMethod = verificationMethod; } @@ -17415,6 +17515,8 @@ public static class Builder { private ApiRequestParams.EnumParam setupFutureUsage; + private String targetDate; + private VerificationMethod verificationMethod; /** Finalize and obtain parameter instance from this builder. */ @@ -17426,6 +17528,7 @@ public PaymentIntentConfirmParams.PaymentMethodOptions.UsBankAccount build() { this.networks, this.preferredSettlementSpeed, this.setupFutureUsage, + this.targetDate, this.verificationMethod); } @@ -17556,6 +17659,16 @@ public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { return this; } + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } + /** Bank account verification method. */ public Builder setVerificationMethod( PaymentIntentConfirmParams.PaymentMethodOptions.UsBankAccount.VerificationMethod diff --git a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java index ac7b1733d66..1fa64de201d 100644 --- a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java @@ -7932,6 +7932,14 @@ public static class AcssDebit { @SerializedName("setup_future_usage") ApiRequestParams.EnumParam setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + /** Bank account verification method. */ @SerializedName("verification_method") VerificationMethod verificationMethod; @@ -7940,10 +7948,12 @@ private AcssDebit( Map extraParams, MandateOptions mandateOptions, ApiRequestParams.EnumParam setupFutureUsage, + String targetDate, VerificationMethod verificationMethod) { this.extraParams = extraParams; this.mandateOptions = mandateOptions; this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; this.verificationMethod = verificationMethod; } @@ -7958,6 +7968,8 @@ public static class Builder { private ApiRequestParams.EnumParam setupFutureUsage; + private String targetDate; + private VerificationMethod verificationMethod; /** Finalize and obtain parameter instance from this builder. */ @@ -7966,6 +7978,7 @@ public PaymentIntentCreateParams.PaymentMethodOptions.AcssDebit build() { this.extraParams, this.mandateOptions, this.setupFutureUsage, + this.targetDate, this.verificationMethod); } @@ -8065,6 +8078,16 @@ public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { return this; } + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } + /** Bank account verification method. */ public Builder setVerificationMethod( PaymentIntentCreateParams.PaymentMethodOptions.AcssDebit.VerificationMethod @@ -9252,10 +9275,21 @@ public static class AuBecsDebit { @SerializedName("setup_future_usage") ApiRequestParams.EnumParam setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + private AuBecsDebit( - Map extraParams, ApiRequestParams.EnumParam setupFutureUsage) { + Map extraParams, + ApiRequestParams.EnumParam setupFutureUsage, + String targetDate) { this.extraParams = extraParams; this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; } public static Builder builder() { @@ -9267,10 +9301,12 @@ public static class Builder { private ApiRequestParams.EnumParam setupFutureUsage; + private String targetDate; + /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentCreateParams.PaymentMethodOptions.AuBecsDebit build() { return new PaymentIntentCreateParams.PaymentMethodOptions.AuBecsDebit( - this.extraParams, this.setupFutureUsage); + this.extraParams, this.setupFutureUsage, this.targetDate); } /** @@ -9360,6 +9396,16 @@ public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { this.setupFutureUsage = setupFutureUsage; return this; } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } } public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @@ -9422,13 +9468,23 @@ public static class BacsDebit { @SerializedName("setup_future_usage") ApiRequestParams.EnumParam setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + private BacsDebit( Map extraParams, MandateOptions mandateOptions, - ApiRequestParams.EnumParam setupFutureUsage) { + ApiRequestParams.EnumParam setupFutureUsage, + String targetDate) { this.extraParams = extraParams; this.mandateOptions = mandateOptions; this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; } public static Builder builder() { @@ -9442,10 +9498,12 @@ public static class Builder { private ApiRequestParams.EnumParam setupFutureUsage; + private String targetDate; + /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentCreateParams.PaymentMethodOptions.BacsDebit build() { return new PaymentIntentCreateParams.PaymentMethodOptions.BacsDebit( - this.extraParams, this.mandateOptions, this.setupFutureUsage); + this.extraParams, this.mandateOptions, this.setupFutureUsage, this.targetDate); } /** @@ -9543,6 +9601,16 @@ public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { this.setupFutureUsage = setupFutureUsage; return this; } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } } @Getter @@ -17095,13 +17163,23 @@ public static class SepaDebit { @SerializedName("setup_future_usage") ApiRequestParams.EnumParam setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + private SepaDebit( Map extraParams, MandateOptions mandateOptions, - ApiRequestParams.EnumParam setupFutureUsage) { + ApiRequestParams.EnumParam setupFutureUsage, + String targetDate) { this.extraParams = extraParams; this.mandateOptions = mandateOptions; this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; } public static Builder builder() { @@ -17115,10 +17193,12 @@ public static class Builder { private ApiRequestParams.EnumParam setupFutureUsage; + private String targetDate; + /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentCreateParams.PaymentMethodOptions.SepaDebit build() { return new PaymentIntentCreateParams.PaymentMethodOptions.SepaDebit( - this.extraParams, this.mandateOptions, this.setupFutureUsage); + this.extraParams, this.mandateOptions, this.setupFutureUsage, this.targetDate); } /** @@ -17216,6 +17296,16 @@ public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { this.setupFutureUsage = setupFutureUsage; return this; } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } } @Getter @@ -17878,6 +17968,14 @@ public static class UsBankAccount { @SerializedName("setup_future_usage") ApiRequestParams.EnumParam setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + /** Bank account verification method. */ @SerializedName("verification_method") VerificationMethod verificationMethod; @@ -17889,6 +17987,7 @@ private UsBankAccount( Networks networks, ApiRequestParams.EnumParam preferredSettlementSpeed, ApiRequestParams.EnumParam setupFutureUsage, + String targetDate, VerificationMethod verificationMethod) { this.extraParams = extraParams; this.financialConnections = financialConnections; @@ -17896,6 +17995,7 @@ private UsBankAccount( this.networks = networks; this.preferredSettlementSpeed = preferredSettlementSpeed; this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; this.verificationMethod = verificationMethod; } @@ -17916,6 +18016,8 @@ public static class Builder { private ApiRequestParams.EnumParam setupFutureUsage; + private String targetDate; + private VerificationMethod verificationMethod; /** Finalize and obtain parameter instance from this builder. */ @@ -17927,6 +18029,7 @@ public PaymentIntentCreateParams.PaymentMethodOptions.UsBankAccount build() { this.networks, this.preferredSettlementSpeed, this.setupFutureUsage, + this.targetDate, this.verificationMethod); } @@ -18055,6 +18158,16 @@ public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { return this; } + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } + /** Bank account verification method. */ public Builder setVerificationMethod( PaymentIntentCreateParams.PaymentMethodOptions.UsBankAccount.VerificationMethod diff --git a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java index 53e143c2ac5..4cb3d854bc8 100644 --- a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java @@ -7407,6 +7407,14 @@ public static class AcssDebit { @SerializedName("setup_future_usage") ApiRequestParams.EnumParam setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + Object targetDate; + /** Bank account verification method. */ @SerializedName("verification_method") VerificationMethod verificationMethod; @@ -7415,10 +7423,12 @@ private AcssDebit( Map extraParams, MandateOptions mandateOptions, ApiRequestParams.EnumParam setupFutureUsage, + Object targetDate, VerificationMethod verificationMethod) { this.extraParams = extraParams; this.mandateOptions = mandateOptions; this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; this.verificationMethod = verificationMethod; } @@ -7433,6 +7443,8 @@ public static class Builder { private ApiRequestParams.EnumParam setupFutureUsage; + private Object targetDate; + private VerificationMethod verificationMethod; /** Finalize and obtain parameter instance from this builder. */ @@ -7441,6 +7453,7 @@ public PaymentIntentUpdateParams.PaymentMethodOptions.AcssDebit build() { this.extraParams, this.mandateOptions, this.setupFutureUsage, + this.targetDate, this.verificationMethod); } @@ -7540,6 +7553,26 @@ public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { return this; } + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(EmptyParam targetDate) { + this.targetDate = targetDate; + return this; + } + /** Bank account verification method. */ public Builder setVerificationMethod( PaymentIntentUpdateParams.PaymentMethodOptions.AcssDebit.VerificationMethod @@ -8754,10 +8787,21 @@ public static class AuBecsDebit { @SerializedName("setup_future_usage") ApiRequestParams.EnumParam setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + Object targetDate; + private AuBecsDebit( - Map extraParams, ApiRequestParams.EnumParam setupFutureUsage) { + Map extraParams, + ApiRequestParams.EnumParam setupFutureUsage, + Object targetDate) { this.extraParams = extraParams; this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; } public static Builder builder() { @@ -8769,10 +8813,12 @@ public static class Builder { private ApiRequestParams.EnumParam setupFutureUsage; + private Object targetDate; + /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentUpdateParams.PaymentMethodOptions.AuBecsDebit build() { return new PaymentIntentUpdateParams.PaymentMethodOptions.AuBecsDebit( - this.extraParams, this.setupFutureUsage); + this.extraParams, this.setupFutureUsage, this.targetDate); } /** @@ -8862,6 +8908,26 @@ public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { this.setupFutureUsage = setupFutureUsage; return this; } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(EmptyParam targetDate) { + this.targetDate = targetDate; + return this; + } } public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @@ -8924,13 +8990,23 @@ public static class BacsDebit { @SerializedName("setup_future_usage") ApiRequestParams.EnumParam setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + Object targetDate; + private BacsDebit( Map extraParams, MandateOptions mandateOptions, - ApiRequestParams.EnumParam setupFutureUsage) { + ApiRequestParams.EnumParam setupFutureUsage, + Object targetDate) { this.extraParams = extraParams; this.mandateOptions = mandateOptions; this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; } public static Builder builder() { @@ -8944,10 +9020,12 @@ public static class Builder { private ApiRequestParams.EnumParam setupFutureUsage; + private Object targetDate; + /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentUpdateParams.PaymentMethodOptions.BacsDebit build() { return new PaymentIntentUpdateParams.PaymentMethodOptions.BacsDebit( - this.extraParams, this.mandateOptions, this.setupFutureUsage); + this.extraParams, this.mandateOptions, this.setupFutureUsage, this.targetDate); } /** @@ -9045,6 +9123,26 @@ public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { this.setupFutureUsage = setupFutureUsage; return this; } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(EmptyParam targetDate) { + this.targetDate = targetDate; + return this; + } } @Getter @@ -16705,13 +16803,23 @@ public static class SepaDebit { @SerializedName("setup_future_usage") ApiRequestParams.EnumParam setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + Object targetDate; + private SepaDebit( Map extraParams, MandateOptions mandateOptions, - ApiRequestParams.EnumParam setupFutureUsage) { + ApiRequestParams.EnumParam setupFutureUsage, + Object targetDate) { this.extraParams = extraParams; this.mandateOptions = mandateOptions; this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; } public static Builder builder() { @@ -16725,10 +16833,12 @@ public static class Builder { private ApiRequestParams.EnumParam setupFutureUsage; + private Object targetDate; + /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentUpdateParams.PaymentMethodOptions.SepaDebit build() { return new PaymentIntentUpdateParams.PaymentMethodOptions.SepaDebit( - this.extraParams, this.mandateOptions, this.setupFutureUsage); + this.extraParams, this.mandateOptions, this.setupFutureUsage, this.targetDate); } /** @@ -16826,6 +16936,26 @@ public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { this.setupFutureUsage = setupFutureUsage; return this; } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(EmptyParam targetDate) { + this.targetDate = targetDate; + return this; + } } @Getter @@ -17488,6 +17618,14 @@ public static class UsBankAccount { @SerializedName("setup_future_usage") ApiRequestParams.EnumParam setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + Object targetDate; + /** Bank account verification method. */ @SerializedName("verification_method") VerificationMethod verificationMethod; @@ -17499,6 +17637,7 @@ private UsBankAccount( Networks networks, ApiRequestParams.EnumParam preferredSettlementSpeed, ApiRequestParams.EnumParam setupFutureUsage, + Object targetDate, VerificationMethod verificationMethod) { this.extraParams = extraParams; this.financialConnections = financialConnections; @@ -17506,6 +17645,7 @@ private UsBankAccount( this.networks = networks; this.preferredSettlementSpeed = preferredSettlementSpeed; this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; this.verificationMethod = verificationMethod; } @@ -17526,6 +17666,8 @@ public static class Builder { private ApiRequestParams.EnumParam setupFutureUsage; + private Object targetDate; + private VerificationMethod verificationMethod; /** Finalize and obtain parameter instance from this builder. */ @@ -17537,6 +17679,7 @@ public PaymentIntentUpdateParams.PaymentMethodOptions.UsBankAccount build() { this.networks, this.preferredSettlementSpeed, this.setupFutureUsage, + this.targetDate, this.verificationMethod); } @@ -17665,6 +17808,26 @@ public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { return this; } + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(EmptyParam targetDate) { + this.targetDate = targetDate; + return this; + } + /** Bank account verification method. */ public Builder setVerificationMethod( PaymentIntentUpdateParams.PaymentMethodOptions.UsBankAccount.VerificationMethod diff --git a/src/main/java/com/stripe/param/ProductCreateParams.java b/src/main/java/com/stripe/param/ProductCreateParams.java index 6ab9a8a8b8f..a4fae5622df 100644 --- a/src/main/java/com/stripe/param/ProductCreateParams.java +++ b/src/main/java/com/stripe/param/ProductCreateParams.java @@ -482,6 +482,15 @@ public static class DefaultPriceData { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** + * Set of key-value pairs that you can attach + * to an object. This can be useful for storing additional information about the object in a + * structured format. Individual keys can be unset by posting an empty value to them. All keys + * can be unset by posting an empty value to {@code metadata}. + */ + @SerializedName("metadata") + Map metadata; + /** The recurring components of a price such as {@code interval} and {@code interval_count}. */ @SerializedName("recurring") Recurring recurring; @@ -518,6 +527,7 @@ private DefaultPriceData( Map currencyOptions, CustomUnitAmount customUnitAmount, Map extraParams, + Map metadata, Recurring recurring, TaxBehavior taxBehavior, Long unitAmount, @@ -526,6 +536,7 @@ private DefaultPriceData( this.currencyOptions = currencyOptions; this.customUnitAmount = customUnitAmount; this.extraParams = extraParams; + this.metadata = metadata; this.recurring = recurring; this.taxBehavior = taxBehavior; this.unitAmount = unitAmount; @@ -545,6 +556,8 @@ public static class Builder { private Map extraParams; + private Map metadata; + private Recurring recurring; private TaxBehavior taxBehavior; @@ -560,6 +573,7 @@ public ProductCreateParams.DefaultPriceData build() { this.currencyOptions, this.customUnitAmount, this.extraParams, + this.metadata, this.recurring, this.taxBehavior, this.unitAmount, @@ -642,6 +656,32 @@ public Builder putAllExtraParam(Map map) { 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 + * ProductCreateParams.DefaultPriceData#metadata} for the field documentation. + */ + public Builder putMetadata(String key, String value) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `metadata` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link ProductCreateParams.DefaultPriceData#metadata} for the field documentation. + */ + public Builder putAllMetadata(Map map) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.putAll(map); + return this; + } + /** * The recurring components of a price such as {@code interval} and {@code interval_count}. */ diff --git a/src/main/java/com/stripe/param/TaxRateCreateParams.java b/src/main/java/com/stripe/param/TaxRateCreateParams.java index a3df1a13942..7bc582c3e31 100644 --- a/src/main/java/com/stripe/param/TaxRateCreateParams.java +++ b/src/main/java/com/stripe/param/TaxRateCreateParams.java @@ -76,7 +76,7 @@ public class TaxRateCreateParams extends ApiRequestParams { BigDecimal percentage; /** - * ISO 3166-2 subdivision code, without + * ISO 3166-2 subdivision code, without * country prefix. For example, "NY" for New York, United States. */ @SerializedName("state") @@ -295,8 +295,8 @@ public Builder setPercentage(BigDecimal percentage) { } /** - * ISO 3166-2 subdivision code, - * without country prefix. For example, "NY" for New York, United States. + * ISO 3166-2 subdivision code, without + * country prefix. For example, "NY" for New York, United States. */ public Builder setState(String state) { this.state = state; diff --git a/src/main/java/com/stripe/param/TaxRateUpdateParams.java b/src/main/java/com/stripe/param/TaxRateUpdateParams.java index 7e24c42954b..0d9f3f5e9a2 100644 --- a/src/main/java/com/stripe/param/TaxRateUpdateParams.java +++ b/src/main/java/com/stripe/param/TaxRateUpdateParams.java @@ -68,7 +68,7 @@ public class TaxRateUpdateParams extends ApiRequestParams { Object metadata; /** - * ISO 3166-2 subdivision code, without + * ISO 3166-2 subdivision code, without * country prefix. For example, "NY" for New York, United States. */ @SerializedName("state") @@ -320,8 +320,8 @@ public Builder setMetadata(Map metadata) { } /** - * ISO 3166-2 subdivision code, - * without country prefix. For example, "NY" for New York, United States. + * ISO 3166-2 subdivision code, without + * country prefix. For example, "NY" for New York, United States. */ public Builder setState(String state) { this.state = state; @@ -329,8 +329,8 @@ public Builder setState(String state) { } /** - * ISO 3166-2 subdivision code, - * without country prefix. For example, "NY" for New York, United States. + * ISO 3166-2 subdivision code, without + * country prefix. For example, "NY" for New York, United States. */ public Builder setState(EmptyParam state) { this.state = state; diff --git a/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java b/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java index 197e3f66946..d5811711606 100644 --- a/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java +++ b/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java @@ -601,7 +601,10 @@ public enum ApiVersion implements ApiRequestParams.EnumParam { VERSION_2024_12_18_ACACIA("2024-12-18.acacia"), @SerializedName("2025-01-27.acacia") - VERSION_2025_01_27_ACACIA("2025-01-27.acacia"); + VERSION_2025_01_27_ACACIA("2025-01-27.acacia"), + + @SerializedName("2025-02-24.acacia") + VERSION_2025_02_24_ACACIA("2025-02-24.acacia"); @Getter(onMethod_ = {@Override}) private final String value; diff --git a/src/main/java/com/stripe/param/billing/CreditBalanceSummaryRetrieveParams.java b/src/main/java/com/stripe/param/billing/CreditBalanceSummaryRetrieveParams.java index cbef780ed3c..c0c48b77389 100644 --- a/src/main/java/com/stripe/param/billing/CreditBalanceSummaryRetrieveParams.java +++ b/src/main/java/com/stripe/param/billing/CreditBalanceSummaryRetrieveParams.java @@ -236,15 +236,26 @@ public static class ApplicabilityScope { Map extraParams; /** - * Required. The price type that credit grants can apply to. We currently - * only support the {@code metered} price type. + * The price type that credit grants can apply to. We currently only support the {@code + * metered} price type. */ @SerializedName("price_type") PriceType priceType; - private ApplicabilityScope(Map extraParams, PriceType priceType) { + /** + * A list of prices that the credit grant can apply to. We currently only support the {@code + * metered} prices. + */ + @SerializedName("prices") + List prices; + + private ApplicabilityScope( + Map extraParams, + PriceType priceType, + List prices) { this.extraParams = extraParams; this.priceType = priceType; + this.prices = prices; } public static Builder builder() { @@ -256,10 +267,12 @@ public static class Builder { private PriceType priceType; + private List prices; + /** Finalize and obtain parameter instance from this builder. */ public CreditBalanceSummaryRetrieveParams.Filter.ApplicabilityScope build() { return new CreditBalanceSummaryRetrieveParams.Filter.ApplicabilityScope( - this.extraParams, this.priceType); + this.extraParams, this.priceType, this.prices); } /** @@ -291,14 +304,118 @@ public Builder putAllExtraParam(Map map) { } /** - * Required. The price type that credit grants can apply to. We currently - * only support the {@code metered} price type. + * The price type that credit grants can apply to. We currently only support the {@code + * metered} price type. */ public Builder setPriceType( CreditBalanceSummaryRetrieveParams.Filter.ApplicabilityScope.PriceType priceType) { this.priceType = priceType; return this; } + + /** + * Add an element to `prices` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * CreditBalanceSummaryRetrieveParams.Filter.ApplicabilityScope#prices} for the field + * documentation. + */ + public Builder addPrice( + CreditBalanceSummaryRetrieveParams.Filter.ApplicabilityScope.Price element) { + if (this.prices == null) { + this.prices = new ArrayList<>(); + } + this.prices.add(element); + return this; + } + + /** + * Add all elements to `prices` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * CreditBalanceSummaryRetrieveParams.Filter.ApplicabilityScope#prices} for the field + * documentation. + */ + public Builder addAllPrice( + List elements) { + if (this.prices == null) { + this.prices = new ArrayList<>(); + } + this.prices.addAll(elements); + return this; + } + } + + @Getter + public static class Price { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. The price ID this credit grant should apply to. */ + @SerializedName("id") + String id; + + private Price(Map extraParams, String id) { + this.extraParams = extraParams; + this.id = id; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String id; + + /** Finalize and obtain parameter instance from this builder. */ + public CreditBalanceSummaryRetrieveParams.Filter.ApplicabilityScope.Price build() { + return new CreditBalanceSummaryRetrieveParams.Filter.ApplicabilityScope.Price( + this.extraParams, this.id); + } + + /** + * 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 + * CreditBalanceSummaryRetrieveParams.Filter.ApplicabilityScope.Price#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 + * CreditBalanceSummaryRetrieveParams.Filter.ApplicabilityScope.Price#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Required. The price ID this credit grant should apply to. */ + public Builder setId(String id) { + this.id = id; + return this; + } + } } public enum PriceType implements ApiRequestParams.EnumParam { diff --git a/src/main/java/com/stripe/param/billing/CreditGrantCreateParams.java b/src/main/java/com/stripe/param/billing/CreditGrantCreateParams.java index c5ab4882949..c580a9f73f6 100644 --- a/src/main/java/com/stripe/param/billing/CreditGrantCreateParams.java +++ b/src/main/java/com/stripe/param/billing/CreditGrantCreateParams.java @@ -15,7 +15,11 @@ public class CreditGrantCreateParams extends ApiRequestParams { @SerializedName("amount") Amount amount; - /** Required. Configuration specifying what this credit grant applies to. */ + /** + * Required. Configuration specifying what this credit grant applies to. We + * currently only support {@code metered} prices that have a Billing Meter attached to them. + */ @SerializedName("applicability_config") ApplicabilityConfig applicabilityConfig; @@ -64,6 +68,13 @@ public class CreditGrantCreateParams extends ApiRequestParams { @SerializedName("name") String name; + /** + * The desired priority for applying this credit grant. If not specified, it will be set to the + * default value of 50. The highest priority is 0 and the lowest is 100. + */ + @SerializedName("priority") + Long priority; + private CreditGrantCreateParams( Amount amount, ApplicabilityConfig applicabilityConfig, @@ -74,7 +85,8 @@ private CreditGrantCreateParams( Long expiresAt, Map extraParams, Map metadata, - String name) { + String name, + Long priority) { this.amount = amount; this.applicabilityConfig = applicabilityConfig; this.category = category; @@ -85,6 +97,7 @@ private CreditGrantCreateParams( this.extraParams = extraParams; this.metadata = metadata; this.name = name; + this.priority = priority; } public static Builder builder() { @@ -112,6 +125,8 @@ public static class Builder { private String name; + private Long priority; + /** Finalize and obtain parameter instance from this builder. */ public CreditGrantCreateParams build() { return new CreditGrantCreateParams( @@ -124,7 +139,8 @@ public CreditGrantCreateParams build() { this.expiresAt, this.extraParams, this.metadata, - this.name); + this.name, + this.priority); } /** Required. Amount of this credit grant. */ @@ -133,7 +149,11 @@ public Builder setAmount(CreditGrantCreateParams.Amount amount) { return this; } - /** Required. Configuration specifying what this credit grant applies to. */ + /** + * Required. Configuration specifying what this credit grant applies to. We + * currently only support {@code metered} prices that have a Billing Meter attached to them. + */ public Builder setApplicabilityConfig( CreditGrantCreateParams.ApplicabilityConfig applicabilityConfig) { this.applicabilityConfig = applicabilityConfig; @@ -252,6 +272,15 @@ public Builder setName(String name) { this.name = name; return this; } + + /** + * The desired priority for applying this credit grant. If not specified, it will be set to the + * default value of 50. The highest priority is 0 and the lowest is 100. + */ + public Builder setPriority(Long priority) { + this.priority = priority; + return this; + } } @Getter @@ -528,15 +557,26 @@ public static class Scope { Map extraParams; /** - * Required. The price type that credit grants can apply to. We currently - * only support the {@code metered} price type. + * The price type that credit grants can apply to. We currently only support the {@code + * metered} price type. */ @SerializedName("price_type") PriceType priceType; - private Scope(Map extraParams, PriceType priceType) { + /** + * A list of prices that the credit grant can apply to. We currently only support the {@code + * metered} prices. + */ + @SerializedName("prices") + List prices; + + private Scope( + Map extraParams, + PriceType priceType, + List prices) { this.extraParams = extraParams; this.priceType = priceType; + this.prices = prices; } public static Builder builder() { @@ -548,10 +588,12 @@ public static class Builder { private PriceType priceType; + private List prices; + /** Finalize and obtain parameter instance from this builder. */ public CreditGrantCreateParams.ApplicabilityConfig.Scope build() { return new CreditGrantCreateParams.ApplicabilityConfig.Scope( - this.extraParams, this.priceType); + this.extraParams, this.priceType, this.prices); } /** @@ -583,14 +625,113 @@ public Builder putAllExtraParam(Map map) { } /** - * Required. The price type that credit grants can apply to. We currently - * only support the {@code metered} price type. + * The price type that credit grants can apply to. We currently only support the {@code + * metered} price type. */ public Builder setPriceType( CreditGrantCreateParams.ApplicabilityConfig.Scope.PriceType priceType) { this.priceType = priceType; return this; } + + /** + * Add an element to `prices` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * CreditGrantCreateParams.ApplicabilityConfig.Scope#prices} for the field documentation. + */ + public Builder addPrice(CreditGrantCreateParams.ApplicabilityConfig.Scope.Price element) { + if (this.prices == null) { + this.prices = new ArrayList<>(); + } + this.prices.add(element); + return this; + } + + /** + * Add all elements to `prices` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * CreditGrantCreateParams.ApplicabilityConfig.Scope#prices} for the field documentation. + */ + public Builder addAllPrice( + List elements) { + if (this.prices == null) { + this.prices = new ArrayList<>(); + } + this.prices.addAll(elements); + return this; + } + } + + @Getter + public static class Price { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. The price ID this credit grant should apply to. */ + @SerializedName("id") + String id; + + private Price(Map extraParams, String id) { + this.extraParams = extraParams; + this.id = id; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String id; + + /** Finalize and obtain parameter instance from this builder. */ + public CreditGrantCreateParams.ApplicabilityConfig.Scope.Price build() { + return new CreditGrantCreateParams.ApplicabilityConfig.Scope.Price( + this.extraParams, this.id); + } + + /** + * 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 CreditGrantCreateParams.ApplicabilityConfig.Scope.Price#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 CreditGrantCreateParams.ApplicabilityConfig.Scope.Price#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Required. The price ID this credit grant should apply to. */ + public Builder setId(String id) { + this.id = id; + return this; + } + } } public enum PriceType implements ApiRequestParams.EnumParam { diff --git a/src/main/java/com/stripe/param/checkout/SessionCreateParams.java b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java index 181e3f8ca0c..cce77f2ba84 100644 --- a/src/main/java/com/stripe/param/checkout/SessionCreateParams.java +++ b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java @@ -6373,6 +6373,14 @@ public static class AcssDebit { @SerializedName("setup_future_usage") SetupFutureUsage setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + /** Verification method for the intent. */ @SerializedName("verification_method") VerificationMethod verificationMethod; @@ -6382,11 +6390,13 @@ private AcssDebit( Map extraParams, MandateOptions mandateOptions, SetupFutureUsage setupFutureUsage, + String targetDate, VerificationMethod verificationMethod) { this.currency = currency; this.extraParams = extraParams; this.mandateOptions = mandateOptions; this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; this.verificationMethod = verificationMethod; } @@ -6403,6 +6413,8 @@ public static class Builder { private SetupFutureUsage setupFutureUsage; + private String targetDate; + private VerificationMethod verificationMethod; /** Finalize and obtain parameter instance from this builder. */ @@ -6412,6 +6424,7 @@ public SessionCreateParams.PaymentMethodOptions.AcssDebit build() { this.extraParams, this.mandateOptions, this.setupFutureUsage, + this.targetDate, this.verificationMethod); } @@ -6487,6 +6500,16 @@ public Builder setSetupFutureUsage( return this; } + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } + /** Verification method for the intent. */ public Builder setVerificationMethod( SessionCreateParams.PaymentMethodOptions.AcssDebit.VerificationMethod @@ -7317,9 +7340,19 @@ public static class AuBecsDebit { @SerializedName("setup_future_usage") SetupFutureUsage setupFutureUsage; - private AuBecsDebit(Map extraParams, SetupFutureUsage setupFutureUsage) { + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + + private AuBecsDebit( + Map extraParams, SetupFutureUsage setupFutureUsage, String targetDate) { this.extraParams = extraParams; this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; } public static Builder builder() { @@ -7331,10 +7364,12 @@ public static class Builder { private SetupFutureUsage setupFutureUsage; + private String targetDate; + /** Finalize and obtain parameter instance from this builder. */ public SessionCreateParams.PaymentMethodOptions.AuBecsDebit build() { return new SessionCreateParams.PaymentMethodOptions.AuBecsDebit( - this.extraParams, this.setupFutureUsage); + this.extraParams, this.setupFutureUsage, this.targetDate); } /** @@ -7391,6 +7426,16 @@ public Builder setSetupFutureUsage( this.setupFutureUsage = setupFutureUsage; return this; } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } } public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @@ -7443,13 +7488,23 @@ public static class BacsDebit { @SerializedName("setup_future_usage") SetupFutureUsage setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + private BacsDebit( Map extraParams, MandateOptions mandateOptions, - SetupFutureUsage setupFutureUsage) { + SetupFutureUsage setupFutureUsage, + String targetDate) { this.extraParams = extraParams; this.mandateOptions = mandateOptions; this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; } public static Builder builder() { @@ -7463,10 +7518,12 @@ public static class Builder { private SetupFutureUsage setupFutureUsage; + private String targetDate; + /** Finalize and obtain parameter instance from this builder. */ public SessionCreateParams.PaymentMethodOptions.BacsDebit build() { return new SessionCreateParams.PaymentMethodOptions.BacsDebit( - this.extraParams, this.mandateOptions, this.setupFutureUsage); + this.extraParams, this.mandateOptions, this.setupFutureUsage, this.targetDate); } /** @@ -7529,6 +7586,16 @@ public Builder setSetupFutureUsage( this.setupFutureUsage = setupFutureUsage; return this; } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } } @Getter @@ -7972,6 +8039,13 @@ public static class Card { @SerializedName("request_three_d_secure") RequestThreeDSecure requestThreeDSecure; + /** + * Restrictions to apply to the card payment method. For example, you can block specific card + * brands. + */ + @SerializedName("restrictions") + Restrictions restrictions; + /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -8022,6 +8096,7 @@ private Card( RequestMulticapture requestMulticapture, RequestOvercapture requestOvercapture, RequestThreeDSecure requestThreeDSecure, + Restrictions restrictions, SetupFutureUsage setupFutureUsage, String statementDescriptorSuffixKana, String statementDescriptorSuffixKanji) { @@ -8032,6 +8107,7 @@ private Card( this.requestMulticapture = requestMulticapture; this.requestOvercapture = requestOvercapture; this.requestThreeDSecure = requestThreeDSecure; + this.restrictions = restrictions; this.setupFutureUsage = setupFutureUsage; this.statementDescriptorSuffixKana = statementDescriptorSuffixKana; this.statementDescriptorSuffixKanji = statementDescriptorSuffixKanji; @@ -8056,6 +8132,8 @@ public static class Builder { private RequestThreeDSecure requestThreeDSecure; + private Restrictions restrictions; + private SetupFutureUsage setupFutureUsage; private String statementDescriptorSuffixKana; @@ -8072,6 +8150,7 @@ public SessionCreateParams.PaymentMethodOptions.Card build() { this.requestMulticapture, this.requestOvercapture, this.requestThreeDSecure, + this.restrictions, this.setupFutureUsage, this.statementDescriptorSuffixKana, this.statementDescriptorSuffixKanji); @@ -8172,6 +8251,16 @@ public Builder setRequestThreeDSecure( return this; } + /** + * Restrictions to apply to the card payment method. For example, you can block specific + * card brands. + */ + public Builder setRestrictions( + SessionCreateParams.PaymentMethodOptions.Card.Restrictions restrictions) { + this.restrictions = restrictions; + return this; + } + /** * Indicates that you intend to make future payments with this PaymentIntent's payment * method. @@ -8301,6 +8390,132 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + public static class Restrictions { + /** + * Specify the card brands to block in the Checkout Session. If a customer enters or selects + * a card belonging to a blocked brand, they can't complete the Session. + */ + @SerializedName("brands_blocked") + List + brandsBlocked; + + /** + * 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 Restrictions( + List + brandsBlocked, + Map extraParams) { + this.brandsBlocked = brandsBlocked; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private List + brandsBlocked; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionCreateParams.PaymentMethodOptions.Card.Restrictions build() { + return new SessionCreateParams.PaymentMethodOptions.Card.Restrictions( + this.brandsBlocked, this.extraParams); + } + + /** + * Add an element to `brandsBlocked` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link SessionCreateParams.PaymentMethodOptions.Card.Restrictions#brandsBlocked} + * for the field documentation. + */ + public Builder addBrandsBlocked( + SessionCreateParams.PaymentMethodOptions.Card.Restrictions.BrandsBlocked element) { + if (this.brandsBlocked == null) { + this.brandsBlocked = new ArrayList<>(); + } + this.brandsBlocked.add(element); + return this; + } + + /** + * Add all elements to `brandsBlocked` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link SessionCreateParams.PaymentMethodOptions.Card.Restrictions#brandsBlocked} + * for the field documentation. + */ + public Builder addAllBrandsBlocked( + List + elements) { + if (this.brandsBlocked == null) { + this.brandsBlocked = new ArrayList<>(); + } + this.brandsBlocked.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 SessionCreateParams.PaymentMethodOptions.Card.Restrictions#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.Card.Restrictions#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + public enum BrandsBlocked implements ApiRequestParams.EnumParam { + @SerializedName("american_express") + AMERICAN_EXPRESS("american_express"), + + @SerializedName("discover_global_network") + DISCOVER_GLOBAL_NETWORK("discover_global_network"), + + @SerializedName("mastercard") + MASTERCARD("mastercard"), + + @SerializedName("visa") + VISA("visa"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + BrandsBlocked(String value) { + this.value = value; + } + } + } + public enum RequestExtendedAuthorization implements ApiRequestParams.EnumParam { @SerializedName("if_available") IF_AVAILABLE("if_available"), @@ -11893,13 +12108,23 @@ public static class SepaDebit { @SerializedName("setup_future_usage") SetupFutureUsage setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + private SepaDebit( Map extraParams, MandateOptions mandateOptions, - SetupFutureUsage setupFutureUsage) { + SetupFutureUsage setupFutureUsage, + String targetDate) { this.extraParams = extraParams; this.mandateOptions = mandateOptions; this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; } public static Builder builder() { @@ -11913,10 +12138,12 @@ public static class Builder { private SetupFutureUsage setupFutureUsage; + private String targetDate; + /** Finalize and obtain parameter instance from this builder. */ public SessionCreateParams.PaymentMethodOptions.SepaDebit build() { return new SessionCreateParams.PaymentMethodOptions.SepaDebit( - this.extraParams, this.mandateOptions, this.setupFutureUsage); + this.extraParams, this.mandateOptions, this.setupFutureUsage, this.targetDate); } /** @@ -11979,6 +12206,16 @@ public Builder setSetupFutureUsage( this.setupFutureUsage = setupFutureUsage; return this; } + + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } } @Getter @@ -12327,6 +12564,14 @@ public static class UsBankAccount { @SerializedName("setup_future_usage") SetupFutureUsage setupFutureUsage; + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The date + * must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 + * calendar days from now. + */ + @SerializedName("target_date") + String targetDate; + /** Verification method for the intent. */ @SerializedName("verification_method") VerificationMethod verificationMethod; @@ -12335,10 +12580,12 @@ private UsBankAccount( Map extraParams, FinancialConnections financialConnections, SetupFutureUsage setupFutureUsage, + String targetDate, VerificationMethod verificationMethod) { this.extraParams = extraParams; this.financialConnections = financialConnections; this.setupFutureUsage = setupFutureUsage; + this.targetDate = targetDate; this.verificationMethod = verificationMethod; } @@ -12353,6 +12600,8 @@ public static class Builder { private SetupFutureUsage setupFutureUsage; + private String targetDate; + private VerificationMethod verificationMethod; /** Finalize and obtain parameter instance from this builder. */ @@ -12361,6 +12610,7 @@ public SessionCreateParams.PaymentMethodOptions.UsBankAccount build() { this.extraParams, this.financialConnections, this.setupFutureUsage, + this.targetDate, this.verificationMethod); } @@ -12427,6 +12677,16 @@ public Builder setSetupFutureUsage( return this; } + /** + * Controls when Stripe will attempt to debit the funds from the customer's account. The + * date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + * and 15 calendar days from now. + */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } + /** Verification method for the intent. */ public Builder setVerificationMethod( SessionCreateParams.PaymentMethodOptions.UsBankAccount.VerificationMethod diff --git a/src/main/java/com/stripe/param/checkout/SessionUpdateParams.java b/src/main/java/com/stripe/param/checkout/SessionUpdateParams.java index 192847b41b9..e5a238e3554 100644 --- a/src/main/java/com/stripe/param/checkout/SessionUpdateParams.java +++ b/src/main/java/com/stripe/param/checkout/SessionUpdateParams.java @@ -12,6 +12,10 @@ @Getter public class SessionUpdateParams extends ApiRequestParams { + /** Information about the customer collected within the Checkout Session. */ + @SerializedName("collected_information") + CollectedInformation collectedInformation; + /** Specifies which fields in the response should be expanded. */ @SerializedName("expand") List expand; @@ -35,7 +39,11 @@ public class SessionUpdateParams extends ApiRequestParams { Object metadata; private SessionUpdateParams( - List expand, Map extraParams, Object metadata) { + CollectedInformation collectedInformation, + List expand, + Map extraParams, + Object metadata) { + this.collectedInformation = collectedInformation; this.expand = expand; this.extraParams = extraParams; this.metadata = metadata; @@ -46,6 +54,8 @@ public static Builder builder() { } public static class Builder { + private CollectedInformation collectedInformation; + private List expand; private Map extraParams; @@ -54,7 +64,15 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public SessionUpdateParams build() { - return new SessionUpdateParams(this.expand, this.extraParams, this.metadata); + return new SessionUpdateParams( + this.collectedInformation, this.expand, this.extraParams, this.metadata); + } + + /** Information about the customer collected within the Checkout Session. */ + public Builder setCollectedInformation( + SessionUpdateParams.CollectedInformation collectedInformation) { + this.collectedInformation = collectedInformation; + return this; } /** @@ -159,4 +177,362 @@ public Builder setMetadata(Map metadata) { return this; } } + + @Getter + public static class CollectedInformation { + /** + * 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 shipping details to apply to this Session. */ + @SerializedName("shipping_details") + ShippingDetails shippingDetails; + + private CollectedInformation(Map extraParams, ShippingDetails shippingDetails) { + this.extraParams = extraParams; + this.shippingDetails = shippingDetails; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private ShippingDetails shippingDetails; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionUpdateParams.CollectedInformation build() { + return new SessionUpdateParams.CollectedInformation(this.extraParams, this.shippingDetails); + } + + /** + * 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 + * SessionUpdateParams.CollectedInformation#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 SessionUpdateParams.CollectedInformation#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 shipping details to apply to this Session. */ + public Builder setShippingDetails( + SessionUpdateParams.CollectedInformation.ShippingDetails shippingDetails) { + this.shippingDetails = shippingDetails; + return this; + } + } + + @Getter + public static class ShippingDetails { + /** Required. The address of the customer */ + @SerializedName("address") + Address address; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. The name of customer */ + @SerializedName("name") + Object name; + + private ShippingDetails(Address address, Map extraParams, Object name) { + this.address = address; + this.extraParams = extraParams; + this.name = name; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Address address; + + private Map extraParams; + + private Object name; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionUpdateParams.CollectedInformation.ShippingDetails build() { + return new SessionUpdateParams.CollectedInformation.ShippingDetails( + this.address, this.extraParams, this.name); + } + + /** Required. The address of the customer */ + public Builder setAddress( + SessionUpdateParams.CollectedInformation.ShippingDetails.Address address) { + this.address = address; + 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 SessionUpdateParams.CollectedInformation.ShippingDetails#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 SessionUpdateParams.CollectedInformation.ShippingDetails#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Required. The name of customer */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** Required. The name of customer */ + public Builder setName(EmptyParam name) { + this.name = name; + return this; + } + } + + @Getter + public static class Address { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + Object city; + + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + @SerializedName("country") + Object country; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + @SerializedName("line1") + Object line1; + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + @SerializedName("line2") + Object line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + Object postalCode; + + /** State, county, province, or region. */ + @SerializedName("state") + Object state; + + private Address( + Object city, + Object country, + Map extraParams, + Object line1, + Object line2, + Object postalCode, + Object state) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object city; + + private Object country; + + private Map extraParams; + + private Object line1; + + private Object line2; + + private Object postalCode; + + private Object state; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionUpdateParams.CollectedInformation.ShippingDetails.Address build() { + return new SessionUpdateParams.CollectedInformation.ShippingDetails.Address( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state); + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(EmptyParam city) { + this.city = city; + return this; + } + + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(EmptyParam country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * SessionUpdateParams.CollectedInformation.ShippingDetails.Address#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 + * SessionUpdateParams.CollectedInformation.ShippingDetails.Address#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. Address line 1 (e.g., street, PO Box, or company name). */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + public Builder setLine1(EmptyParam line1) { + this.line1 = line1; + return this; + } + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + public Builder setLine2(EmptyParam line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(EmptyParam state) { + this.state = state; + return this; + } + } + } + } + } } From 1cf6c5b2e64027f0a9847b512b97a0f990913f54 Mon Sep 17 00:00:00 2001 From: Prathmesh Ranaut Date: Mon, 24 Feb 2025 17:34:09 -0500 Subject: [PATCH 22/45] Bump version to 28.4.0 --- CHANGELOG.md | 13 +++++++++++++ README.md | 8 ++++---- VERSION | 2 +- gradle.properties | 2 +- src/main/java/com/stripe/Stripe.java | 2 +- 5 files changed, 20 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8af0bf12bf7..787c6b211cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## 28.4.0 - 2025-02-24 +* [#1943](https://github.com/stripe/stripe-java/pull/1943) Update generated code + * Add support for `prices` on `Billing.CreditGrant.applicability_config.scope`, `billing.CreditBalanceSummaryRetrieveParams.filter.applicability_scope`, and `billing.CreditGrantCreateParams.applicability_config.scope` + * Change `billing.CreditBalanceSummaryRetrieveParams.filter.applicability_scope.price_type` and `billing.CreditGrantCreateParams.applicability_config.scope.price_type` to be optional + * Add support for `priority` on `Billing.CreditGrant` and `billing.CreditGrantCreateParams` + * Add support for `target_date` on `Checkout.Session.payment_method_options.acss_debit`, `Checkout.Session.payment_method_options.au_becs_debit`, `Checkout.Session.payment_method_options.bacs_debit`, `Checkout.Session.payment_method_options.sepa_debit`, `Checkout.Session.payment_method_options.us_bank_account`, `PaymentIntent.payment_method_options.acss_debit`, `PaymentIntent.payment_method_options.au_becs_debit`, `PaymentIntent.payment_method_options.bacs_debit`, `PaymentIntent.payment_method_options.sepa_debit`, `PaymentIntent.payment_method_options.us_bank_account`, `PaymentIntentConfirmParams.payment_method_options.acss_debit`, `PaymentIntentConfirmParams.payment_method_options.au_becs_debit`, `PaymentIntentConfirmParams.payment_method_options.bacs_debit`, `PaymentIntentConfirmParams.payment_method_options.sepa_debit`, `PaymentIntentConfirmParams.payment_method_options.us_bank_account`, `PaymentIntentCreateParams.payment_method_options.acss_debit`, `PaymentIntentCreateParams.payment_method_options.au_becs_debit`, `PaymentIntentCreateParams.payment_method_options.bacs_debit`, `PaymentIntentCreateParams.payment_method_options.sepa_debit`, `PaymentIntentCreateParams.payment_method_options.us_bank_account`, `PaymentIntentUpdateParams.payment_method_options.acss_debit`, `PaymentIntentUpdateParams.payment_method_options.au_becs_debit`, `PaymentIntentUpdateParams.payment_method_options.bacs_debit`, `PaymentIntentUpdateParams.payment_method_options.sepa_debit`, `PaymentIntentUpdateParams.payment_method_options.us_bank_account`, `checkout.SessionCreateParams.payment_method_options.acss_debit`, `checkout.SessionCreateParams.payment_method_options.au_becs_debit`, `checkout.SessionCreateParams.payment_method_options.bacs_debit`, `checkout.SessionCreateParams.payment_method_options.sepa_debit`, and `checkout.SessionCreateParams.payment_method_options.us_bank_account` + * Add support for `restrictions` on `Checkout.Session.payment_method_options.card` and `checkout.SessionCreateParams.payment_method_options.card` + * Add support for `collected_information` on `Checkout.Session` and `checkout.SessionUpdateParams` + * Add support for `metadata` on `ProductCreateParams.default_price_data` + * Change type of `TokenCreateParams.person.political_exposure` from `string` to `enum('existing'|'none')` + * Add support for new value `2025-02-24.acacia` on enum `WebhookEndpointCreateParams.api_version` +* [#1948](https://github.com/stripe/stripe-java/pull/1948) add codeowners file + ## 28.3.1 - 2025-02-07 * [#1946](https://github.com/stripe/stripe-java/pull/1946) Ensure `getRawJsonObject` returns data for constructed webhooks diff --git a/README.md b/README.md index c3effc0a211..e763829786f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Stripe Java client library -[![Maven Central](https://img.shields.io/badge/maven--central-v28.3.1-blue)](https://mvnrepository.com/artifact/com.stripe/stripe-java) +[![Maven Central](https://img.shields.io/badge/maven--central-v28.4.0-blue)](https://mvnrepository.com/artifact/com.stripe/stripe-java) [![JavaDoc](http://img.shields.io/badge/javadoc-reference-blue.svg)](https://stripe.dev/stripe-java) [![Build Status](https://github.com/stripe/stripe-java/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/stripe/stripe-java/actions?query=branch%3Amaster) @@ -17,7 +17,7 @@ The official [Stripe][stripe] Java client library. Add this dependency to your project's build file: ```groovy -implementation "com.stripe:stripe-java:28.3.1" +implementation "com.stripe:stripe-java:28.4.0" ``` ### Maven users @@ -28,7 +28,7 @@ Add this dependency to your project's POM: com.stripe stripe-java - 28.3.1 + 28.4.0 ``` @@ -36,7 +36,7 @@ Add this dependency to your project's POM: You'll need to manually install the following JARs: -- [The Stripe JAR](https://search.maven.org/remotecontent?filepath=com/stripe/stripe-java/28.3.1/stripe-java-28.3.1.jar) +- [The Stripe JAR](https://search.maven.org/remotecontent?filepath=com/stripe/stripe-java/28.4.0/stripe-java-28.4.0.jar) - [Google Gson][gson] from . ### [ProGuard][proguard] diff --git a/VERSION b/VERSION index e5ef00e6458..01e76feaa66 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -28.3.1 +28.4.0 diff --git a/gradle.properties b/gradle.properties index 06b569e9169..675b84982f8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ GROUP=com.stripe -VERSION_NAME=28.3.1 +VERSION_NAME=28.4.0 POM_URL=https://github.com/stripe/stripe-java POM_SCM_URL=git@github.com:stripe/stripe-java.git diff --git a/src/main/java/com/stripe/Stripe.java b/src/main/java/com/stripe/Stripe.java index 2c854f7dc3e..3ec550b9af3 100644 --- a/src/main/java/com/stripe/Stripe.java +++ b/src/main/java/com/stripe/Stripe.java @@ -14,7 +14,7 @@ public abstract class Stripe { public static final String LIVE_API_BASE = "https://api.stripe.com"; public static final String UPLOAD_API_BASE = "https://files.stripe.com"; public static final String METER_EVENTS_API_BASE = "https://meter-events.stripe.com"; - public static final String VERSION = "28.3.1"; + public static final String VERSION = "28.4.0"; public static volatile String apiKey; public static volatile String clientId; From 6f3e5de4c2445a3373d363a2227f024ff7f46274 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 25 Feb 2025 17:32:13 +0000 Subject: [PATCH 23/45] Update generated code for v1508 --- OPENAPI_VERSION | 2 +- src/main/java/com/stripe/ApiVersion.java | 2 +- .../com/stripe/param/WebhookEndpointCreateParams.java | 8 +++++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index f1a1303d6d0..a05efb76272 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1506 \ No newline at end of file +v1508 \ 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 df1ff179ecd..91aac7ecd53 100644 --- a/src/main/java/com/stripe/ApiVersion.java +++ b/src/main/java/com/stripe/ApiVersion.java @@ -2,5 +2,5 @@ package com.stripe; final class ApiVersion { - public static final String CURRENT = "2025-02-24.acacia"; + public static final String CURRENT = "2025-03-31.basil"; } diff --git a/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java b/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java index 9530625637c..29ad1b70767 100644 --- a/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java +++ b/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java @@ -604,7 +604,13 @@ public enum ApiVersion implements ApiRequestParams.EnumParam { VERSION_2025_01_27_ACACIA("2025-01-27.acacia"), @SerializedName("2025-02-24.acacia") - VERSION_2025_02_24_ACACIA("2025-02-24.acacia"); + VERSION_2025_02_24_ACACIA("2025-02-24.acacia"), + + @SerializedName("2025-03-01.dashboard") + VERSION_2025_03_01_DASHBOARD("2025-03-01.dashboard"), + + @SerializedName("2025-03-31.basil") + VERSION_2025_03_31_BASIL("2025-03-31.basil"); @Getter(onMethod_ = {@Override}) private final String value; From a116ea13a217a099930701c62fac6ec881bf6253 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 26 Feb 2025 03:27:31 +0000 Subject: [PATCH 24/45] Update generated code for v1510 --- OPENAPI_VERSION | 2 +- src/main/java/com/stripe/model/PaymentAttemptRecord.java | 6 +----- src/main/java/com/stripe/model/PaymentRecord.java | 6 +----- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index a05efb76272..7cb5d95b3e1 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1508 \ No newline at end of file +v1510 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/PaymentAttemptRecord.java b/src/main/java/com/stripe/model/PaymentAttemptRecord.java index f27ea13df45..f28958a20d0 100644 --- a/src/main/java/com/stripe/model/PaymentAttemptRecord.java +++ b/src/main/java/com/stripe/model/PaymentAttemptRecord.java @@ -316,11 +316,7 @@ public static class PaymentMethodDetails extends StripeObject { @SerializedName("payment_method") String paymentMethod; - /** - * The type of Payment Method used for this payment attempt. - * - *

One of {@code card}, or {@code custom}. - */ + /** The type of Payment Method used for this payment attempt. */ @SerializedName("type") String type; diff --git a/src/main/java/com/stripe/model/PaymentRecord.java b/src/main/java/com/stripe/model/PaymentRecord.java index d4382de587f..5e285b0e8d7 100644 --- a/src/main/java/com/stripe/model/PaymentRecord.java +++ b/src/main/java/com/stripe/model/PaymentRecord.java @@ -524,11 +524,7 @@ public static class PaymentMethodDetails extends StripeObject { @SerializedName("payment_method") String paymentMethod; - /** - * The type of Payment Method used for this payment attempt. - * - *

One of {@code card}, or {@code custom}. - */ + /** The type of Payment Method used for this payment attempt. */ @SerializedName("type") String type; From 7aefae8f9e43b2dc7b03697295eb55c8a1092cbf Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 27 Feb 2025 00:04:21 +0000 Subject: [PATCH 25/45] Update generated code for v1511 --- OPENAPI_VERSION | 2 +- .../stripe/model/PaymentAttemptRecord.java | 2255 ++++++++++++++++- .../java/com/stripe/model/PaymentRecord.java | 2254 +++++++++++++++- .../com/stripe/model/issuing/Settlement.java | 8 + .../stripe/model/terminal/Configuration.java | 102 + .../com/stripe/model/terminal/Reader.java | 54 +- .../terminal/ConfigurationCreateParams.java | 513 +++- .../terminal/ConfigurationUpdateParams.java | 585 ++++- .../ReaderSucceedInputCollectionParams.java | 4 +- .../testhelpers/terminal/ReaderService.java | 32 +- 10 files changed, 5732 insertions(+), 77 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 7cb5d95b3e1..fabdcb1ee08 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1510 \ No newline at end of file +v1511 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/PaymentAttemptRecord.java b/src/main/java/com/stripe/model/PaymentAttemptRecord.java index f28958a20d0..272e65f4453 100644 --- a/src/main/java/com/stripe/model/PaymentAttemptRecord.java +++ b/src/main/java/com/stripe/model/PaymentAttemptRecord.java @@ -11,6 +11,7 @@ import com.stripe.net.StripeResponseGetter; import com.stripe.param.PaymentAttemptRecordListParams; import com.stripe.param.PaymentAttemptRecordRetrieveParams; +import java.util.List; import java.util.Map; import lombok.EqualsAndHashCode; import lombok.Getter; @@ -296,14 +297,59 @@ public static class CustomerDetails extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class PaymentMethodDetails extends StripeObject { + @SerializedName("ach_credit_transfer") + AchCreditTransfer achCreditTransfer; + + @SerializedName("ach_debit") + AchDebit achDebit; + + @SerializedName("acss_debit") + AcssDebit acssDebit; + + @SerializedName("affirm") + Affirm affirm; + + @SerializedName("afterpay_clearpay") + AfterpayClearpay afterpayClearpay; + + @SerializedName("alipay") + Alipay alipay; + + @SerializedName("alma") + Alma alma; + + @SerializedName("amazon_pay") + AmazonPay amazonPay; + + @SerializedName("au_becs_debit") + AuBecsDebit auBecsDebit; + + @SerializedName("bacs_debit") + BacsDebit bacsDebit; + + @SerializedName("bancontact") + Bancontact bancontact; + /** The billing details associated with the method of payment. */ @SerializedName("billing_details") BillingDetails billingDetails; + @SerializedName("blik") + Blik blik; + + @SerializedName("boleto") + Boleto boleto; + /** Details of the card used for this payment attempt. */ @SerializedName("card") Card card; + @SerializedName("card_present") + CardPresent cardPresent; + + @SerializedName("cashapp") + Cashapp cashapp; + /** * Custom Payment Methods represent Payment Method types not modeled directly in the Stripe API. * This resource consists of details about the custom payment method used for this payment @@ -312,14 +358,547 @@ public static class PaymentMethodDetails extends StripeObject { @SerializedName("custom") Custom custom; + @SerializedName("customer_balance") + CustomerBalance customerBalance; + + @SerializedName("eps") + Eps eps; + + @SerializedName("fpx") + Fpx fpx; + + @SerializedName("giropay") + Giropay giropay; + + @SerializedName("gopay") + Gopay gopay; + + @SerializedName("grabpay") + Grabpay grabpay; + + @SerializedName("id_bank_transfer") + IdBankTransfer idBankTransfer; + + @SerializedName("ideal") + Ideal ideal; + + @SerializedName("interac_present") + InteracPresent interacPresent; + + @SerializedName("kakao_pay") + KakaoPay kakaoPay; + + @SerializedName("klarna") + Klarna klarna; + + @SerializedName("konbini") + Konbini konbini; + + @SerializedName("kr_card") + KrCard krCard; + + @SerializedName("link") + Link link; + + @SerializedName("mb_way") + MbWay mbWay; + + @SerializedName("mobilepay") + Mobilepay mobilepay; + + @SerializedName("multibanco") + Multibanco multibanco; + + @SerializedName("naver_pay") + NaverPay naverPay; + + @SerializedName("oxxo") + Oxxo oxxo; + + @SerializedName("p24") + P24 p24; + + @SerializedName("pay_by_bank") + PayByBank payByBank; + + @SerializedName("payco") + Payco payco; + /** ID of the Stripe PaymentMethod used to make this payment. */ @SerializedName("payment_method") String paymentMethod; - /** The type of Payment Method used for this payment attempt. */ + @SerializedName("paynow") + Paynow paynow; + + @SerializedName("paypal") + Paypal paypal; + + @SerializedName("payto") + Payto payto; + + @SerializedName("pix") + Pix pix; + + @SerializedName("promptpay") + Promptpay promptpay; + + @SerializedName("qris") + Qris qris; + + @SerializedName("rechnung") + Rechnung rechnung; + + @SerializedName("revolut_pay") + RevolutPay revolutPay; + + @SerializedName("samsung_pay") + SamsungPay samsungPay; + + @SerializedName("sepa_credit_transfer") + SepaCreditTransfer sepaCreditTransfer; + + @SerializedName("sepa_debit") + SepaDebit sepaDebit; + + @SerializedName("shopeepay") + Shopeepay shopeepay; + + @SerializedName("sofort") + Sofort sofort; + + @SerializedName("stripe_account") + StripeAccount stripeAccount; + + @SerializedName("swish") + Swish swish; + + @SerializedName("twint") + Twint twint; + + /** + * The type of transaction-specific details of the payment method used in the payment. See PaymentMethod.type + * for the full list of possible types. An additional hash is included on {@code + * payment_method_details} with a name matching this value. It contains information specific to + * the payment method. + */ @SerializedName("type") String type; + @SerializedName("us_bank_account") + UsBankAccount usBankAccount; + + @SerializedName("wechat") + Wechat wechat; + + @SerializedName("wechat_pay") + WechatPay wechatPay; + + @SerializedName("zip") + Zip zip; + + /** + * For more details about AchCreditTransfer, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AchCreditTransfer extends StripeObject { + /** Account number to transfer funds to. */ + @SerializedName("account_number") + String accountNumber; + + /** Name of the bank associated with the routing number. */ + @SerializedName("bank_name") + String bankName; + + /** Routing transit number for the bank account to transfer funds to. */ + @SerializedName("routing_number") + String routingNumber; + + /** SWIFT code of the bank associated with the routing number. */ + @SerializedName("swift_code") + String swiftCode; + } + + /** + * For more details about AchDebit, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AchDebit extends StripeObject { + /** + * Type of entity that holds the account. This can be either {@code individual} or {@code + * company}. + * + *

One of {@code company}, or {@code individual}. + */ + @SerializedName("account_holder_type") + String accountHolderType; + + /** Name of the bank associated with the bank account. */ + @SerializedName("bank_name") + String bankName; + + /** Two-letter ISO code representing the country the bank account is located in. */ + @SerializedName("country") + String country; + + /** + * Uniquely identifies this particular bank account. You can use this attribute to check + * whether two bank accounts are the same. + */ + @SerializedName("fingerprint") + String fingerprint; + + /** Last four digits of the bank account number. */ + @SerializedName("last4") + String last4; + + /** Routing transit number of the bank account. */ + @SerializedName("routing_number") + String routingNumber; + } + + /** + * For more details about AcssDebit, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AcssDebit extends StripeObject { + /** Name of the bank associated with the bank account. */ + @SerializedName("bank_name") + String bankName; + + /** + * Uniquely identifies this particular bank account. You can use this attribute to check + * whether two bank accounts are the same. + */ + @SerializedName("fingerprint") + String fingerprint; + + /** Institution number of the bank account. */ + @SerializedName("institution_number") + String institutionNumber; + + /** Last four digits of the bank account number. */ + @SerializedName("last4") + String last4; + + /** ID of the mandate used to make this payment. */ + @SerializedName("mandate") + String mandate; + + /** Transit number of the bank account. */ + @SerializedName("transit_number") + String transitNumber; + } + + /** + * For more details about Affirm, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Affirm extends StripeObject { + /** The Affirm transaction ID associated with this payment. */ + @SerializedName("transaction_id") + String transactionId; + } + + /** + * For more details about AfterpayClearpay, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AfterpayClearpay extends StripeObject { + /** The Afterpay order ID associated with this payment intent. */ + @SerializedName("order_id") + String orderId; + + /** Order identifier shown to the merchant in Afterpay’s online portal. */ + @SerializedName("reference") + String reference; + } + + /** + * For more details about Alipay, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Alipay extends StripeObject { + /** + * Uniquely identifies this particular Alipay account. You can use this attribute to check + * whether two Alipay accounts are the same. + */ + @SerializedName("buyer_id") + String buyerId; + + /** + * Uniquely identifies this particular Alipay account. You can use this attribute to check + * whether two Alipay accounts are the same. + */ + @SerializedName("fingerprint") + String fingerprint; + + /** Transaction ID of this particular Alipay transaction. */ + @SerializedName("transaction_id") + String transactionId; + } + + /** + * For more details about Alma, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Alma extends StripeObject {} + + /** + * For more details about AmazonPay, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AmazonPay extends StripeObject { + @SerializedName("funding") + Funding funding; + + /** + * For more details about Funding, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Funding extends StripeObject { + @SerializedName("card") + Card card; + + /** + * funding type of the underlying payment method. + * + *

Equal to {@code card}. + */ + @SerializedName("type") + String type; + + /** + * For more details about Card, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Card extends StripeObject { + /** + * Card brand. Can be {@code amex}, {@code diners}, {@code discover}, {@code eftpos_au}, + * {@code jcb}, {@code link}, {@code mastercard}, {@code unionpay}, {@code visa}, or + * {@code unknown}. + */ + @SerializedName("brand") + String brand; + + /** + * The product code that + * identifies the specific program or product associated with a card. (For internal use + * only and not typically available in standard API requests.) + */ + @SerializedName("brand_product") + String brandProduct; + + /** + * Two-letter ISO code representing the country of the card. You could use this attribute + * to get a sense of the international breakdown of cards you've collected. + */ + @SerializedName("country") + String country; + + /** Two-digit number representing the card's expiration month. */ + @SerializedName("exp_month") + Long expMonth; + + /** Four-digit number representing the card's expiration year. */ + @SerializedName("exp_year") + Long expYear; + + /** + * Card funding type. Can be {@code credit}, {@code debit}, {@code prepaid}, or {@code + * unknown}. + */ + @SerializedName("funding") + String funding; + + /** The last four digits of the card. */ + @SerializedName("last4") + String last4; + } + } + } + + /** + * For more details about AuBecsDebit, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AuBecsDebit extends StripeObject { + /** Bank-State-Branch number of the bank account. */ + @SerializedName("bsb_number") + String bsbNumber; + + /** + * Uniquely identifies this particular bank account. You can use this attribute to check + * whether two bank accounts are the same. + */ + @SerializedName("fingerprint") + String fingerprint; + + /** Last four digits of the bank account number. */ + @SerializedName("last4") + String last4; + + /** ID of the mandate used to make this payment. */ + @SerializedName("mandate") + String mandate; + } + + /** + * For more details about BacsDebit, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class BacsDebit extends StripeObject { + /** + * Uniquely identifies this particular bank account. You can use this attribute to check + * whether two bank accounts are the same. + */ + @SerializedName("fingerprint") + String fingerprint; + + /** Last four digits of the bank account number. */ + @SerializedName("last4") + String last4; + + /** ID of the mandate used to make this payment. */ + @SerializedName("mandate") + String mandate; + + /** Sort code of the bank account. (e.g., {@code 10-20-30}) */ + @SerializedName("sort_code") + String sortCode; + } + + /** + * For more details about Bancontact, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Bancontact extends StripeObject { + /** Bank code of bank associated with the bank account. */ + @SerializedName("bank_code") + String bankCode; + + /** Name of the bank associated with the bank account. */ + @SerializedName("bank_name") + String bankName; + + /** Bank Identifier Code of the bank associated with the bank account. */ + @SerializedName("bic") + String bic; + + /** The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ + @SerializedName("generated_sepa_debit") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField generatedSepaDebit; + + /** The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ + @SerializedName("generated_sepa_debit_mandate") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField generatedSepaDebitMandate; + + /** Last four characters of the IBAN. */ + @SerializedName("iban_last4") + String ibanLast4; + + /** + * Preferred language of the Bancontact authorization page that the customer is redirected to. + * Can be one of {@code en}, {@code de}, {@code fr}, or {@code nl} + */ + @SerializedName("preferred_language") + String preferredLanguage; + + /** + * Owner's verified full name. Values are verified or provided by Bancontact directly (if + * supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + @SerializedName("verified_name") + String verifiedName; + + /** Get ID of expandable {@code generatedSepaDebit} object. */ + public String getGeneratedSepaDebit() { + return (this.generatedSepaDebit != null) ? this.generatedSepaDebit.getId() : null; + } + + public void setGeneratedSepaDebit(String id) { + this.generatedSepaDebit = ApiResource.setExpandableFieldId(id, this.generatedSepaDebit); + } + + /** Get expanded {@code generatedSepaDebit}. */ + public PaymentMethod getGeneratedSepaDebitObject() { + return (this.generatedSepaDebit != null) ? this.generatedSepaDebit.getExpanded() : null; + } + + public void setGeneratedSepaDebitObject(PaymentMethod expandableObject) { + this.generatedSepaDebit = + new ExpandableField(expandableObject.getId(), expandableObject); + } + + /** Get ID of expandable {@code generatedSepaDebitMandate} object. */ + public String getGeneratedSepaDebitMandate() { + return (this.generatedSepaDebitMandate != null) + ? this.generatedSepaDebitMandate.getId() + : null; + } + + public void setGeneratedSepaDebitMandate(String id) { + this.generatedSepaDebitMandate = + ApiResource.setExpandableFieldId(id, this.generatedSepaDebitMandate); + } + + /** Get expanded {@code generatedSepaDebitMandate}. */ + public Mandate getGeneratedSepaDebitMandateObject() { + return (this.generatedSepaDebitMandate != null) + ? this.generatedSepaDebitMandate.getExpanded() + : null; + } + + public void setGeneratedSepaDebitMandateObject(Mandate expandableObject) { + this.generatedSepaDebitMandate = + new ExpandableField(expandableObject.getId(), expandableObject); + } + } + /** Billing details used by the customer for this payment. */ @Getter @Setter @@ -327,7 +906,7 @@ public static class PaymentMethodDetails extends StripeObject { public static class BillingDetails extends StripeObject { /** A representation of a physical address. */ @SerializedName("address") - Address address; + com.stripe.model.PaymentAttemptRecord.PaymentMethodDetails.BillingDetails.Address address; /** The billing email associated with the method of payment. */ @SerializedName("email") @@ -375,6 +954,35 @@ public static class Address extends StripeObject { } } + /** + * For more details about Blik, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Blik extends StripeObject { + /** A unique and immutable identifier assigned by BLIK to every buyer. */ + @SerializedName("buyer_id") + String buyerId; + } + + /** + * For more details about Boleto, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Boleto extends StripeObject { + /** + * The tax ID of the customer (CPF for individuals consumers or CNPJ for businesses + * consumers). + */ + @SerializedName("tax_id") + String taxId; + } + /** Details of the card used for this payment attempt. */ @Getter @Setter @@ -523,24 +1131,1647 @@ public static class ThreeDSecure extends StripeObject { } /** - * Custom Payment Methods represent Payment Method types not modeled directly in the Stripe API. - * This resource consists of details about the custom payment method used for this payment - * attempt. + * For more details about CardPresent, please refer to the API Reference. */ @Getter @Setter @EqualsAndHashCode(callSuper = false) - public static class Custom extends StripeObject { + public static class CardPresent extends StripeObject { + /** The authorized amount. */ + @SerializedName("amount_authorized") + Long amountAuthorized; + /** - * Display name for the custom (user-defined) payment method type used to make this payment. + * Card brand. Can be {@code amex}, {@code diners}, {@code discover}, {@code eftpos_au}, + * {@code jcb}, {@code link}, {@code mastercard}, {@code unionpay}, {@code visa}, or {@code + * unknown}. */ - @SerializedName("display_name") - String displayName; + @SerializedName("brand") + String brand; - /** The custom payment method type associated with this payment. */ - @SerializedName("type") + /** + * The product code that identifies + * the specific program or product associated with a card. + */ + @SerializedName("brand_product") + String brandProduct; + + /** + * When using manual capture, a future timestamp after which the charge will be automatically + * refunded if uncaptured. + */ + @SerializedName("capture_before") + Long captureBefore; + + /** + * The cardholder name as read from the card, in ISO 7813 format. May include + * alphanumeric characters, special characters and first/last name separator ({@code /}). In + * some cases, the cardholder name may not be available depending on how the issuer has + * configured the card. Cardholder name is typically not available on swipe or contactless + * payments, such as those made with Apple Pay and Google Pay. + */ + @SerializedName("cardholder_name") + String cardholderName; + + /** + * Two-letter ISO code representing the country of the card. You could use this attribute to + * get a sense of the international breakdown of cards you've collected. + */ + @SerializedName("country") + String country; + + /** + * A high-level description of the type of cards issued in this range. (For internal use only + * and not typically available in standard API requests.) + */ + @SerializedName("description") + String description; + + /** Authorization response cryptogram. */ + @SerializedName("emv_auth_data") + String emvAuthData; + + /** Two-digit number representing the card's expiration month. */ + @SerializedName("exp_month") + Long expMonth; + + /** Four-digit number representing the card's expiration year. */ + @SerializedName("exp_year") + Long expYear; + + /** + * Uniquely identifies this particular card number. You can use this attribute to check + * whether two customers who’ve signed up with you are using the same card number, for + * example. For payment methods that tokenize card information (Apple Pay, Google Pay), the + * tokenized number might be provided instead of the underlying card number. + * + *

As of May 1, 2021, card fingerprint in India for Connect changed to allow two + * fingerprints for the same card---one for India and one for the rest of the world. + */ + @SerializedName("fingerprint") + String fingerprint; + + /** + * Card funding type. Can be {@code credit}, {@code debit}, {@code prepaid}, or {@code + * unknown}. + */ + @SerializedName("funding") + String funding; + + /** + * ID of a card PaymentMethod generated from the card_present PaymentMethod that may be + * attached to a Customer for future transactions. Only present if it was possible to generate + * a card PaymentMethod. + */ + @SerializedName("generated_card") + String generatedCard; + + /** + * Issuer identification number of the card. (For internal use only and not typically + * available in standard API requests.) + */ + @SerializedName("iin") + String iin; + + /** + * Whether this PaymentIntent is + * eligible for incremental authorizations. Request support using request_incremental_authorization_support. + */ + @SerializedName("incremental_authorization_supported") + Boolean incrementalAuthorizationSupported; + + /** + * The name of the card's issuing bank. (For internal use only and not typically available in + * standard API requests.) + */ + @SerializedName("issuer") + String issuer; + + /** The last four digits of the card. */ + @SerializedName("last4") + String last4; + + /** + * Identifies which network this charge was processed on. Can be {@code amex}, {@code + * cartes_bancaires}, {@code diners}, {@code discover}, {@code eftpos_au}, {@code interac}, + * {@code jcb}, {@code link}, {@code mastercard}, {@code unionpay}, {@code visa}, or {@code + * unknown}. + */ + @SerializedName("network") + String network; + + /** + * This is used by the financial networks to identify a transaction. Visa calls this the + * Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the + * Acquirer Reference Data. This value will be present if it is returned by the financial + * network in the authorization response, and null otherwise. + */ + @SerializedName("network_transaction_id") + String networkTransactionId; + + /** Details about payments collected offline. */ + @SerializedName("offline") + Offline offline; + + /** Defines whether the authorized amount can be over-captured or not. */ + @SerializedName("overcapture_supported") + Boolean overcaptureSupported; + + /** EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. */ + @SerializedName("preferred_locales") + List preferredLocales; + + /** + * How card details were read in this transaction. + * + *

One of {@code contact_emv}, {@code contactless_emv}, {@code contactless_magstripe_mode}, + * {@code magnetic_stripe_fallback}, or {@code magnetic_stripe_track2}. + */ + @SerializedName("read_method") + String readMethod; + + /** + * A collection of fields required to be displayed on receipts. Only required for EMV + * transactions. + */ + @SerializedName("receipt") + Receipt receipt; + + @SerializedName("wallet") + Wallet wallet; + + /** + * For more details about Offline, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Offline extends StripeObject { + /** Time at which the payment was collected while offline. */ + @SerializedName("stored_at") + Long storedAt; + + /** + * The method used to process this payment method offline. Only deferred is allowed. + * + *

Equal to {@code deferred}. + */ + @SerializedName("type") + String type; + } + + /** + * For more details about Receipt, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Receipt extends StripeObject { + /** + * The type of account being debited or credited + * + *

One of {@code checking}, {@code credit}, {@code prepaid}, or {@code unknown}. + */ + @SerializedName("account_type") + String accountType; + + /** EMV tag 9F26, cryptogram generated by the integrated circuit chip. */ + @SerializedName("application_cryptogram") + String applicationCryptogram; + + /** Mnenomic of the Application Identifier. */ + @SerializedName("application_preferred_name") + String applicationPreferredName; + + /** Identifier for this transaction. */ + @SerializedName("authorization_code") + String authorizationCode; + + /** EMV tag 8A. A code returned by the card issuer. */ + @SerializedName("authorization_response_code") + String authorizationResponseCode; + + /** + * Describes the method used by the cardholder to verify ownership of the card. One of the + * following: {@code approval}, {@code failure}, {@code none}, {@code offline_pin}, {@code + * offline_pin_and_signature}, {@code online_pin}, or {@code signature}. + */ + @SerializedName("cardholder_verification_method") + String cardholderVerificationMethod; + + /** + * EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. + */ + @SerializedName("dedicated_file_name") + String dedicatedFileName; + + /** The outcome of a series of EMV functions performed by the card reader. */ + @SerializedName("terminal_verification_results") + String terminalVerificationResults; + + /** An indication of various EMV functions performed during the transaction. */ + @SerializedName("transaction_status_information") + String transactionStatusInformation; + } + + /** + * For more details about Wallet, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Wallet extends StripeObject { + /** + * The type of mobile wallet, one of {@code apple_pay}, {@code google_pay}, {@code + * samsung_pay}, or {@code unknown}. + */ + @SerializedName("type") + String type; + } + } + + /** + * For more details about Cashapp, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Cashapp extends StripeObject { + /** A unique and immutable identifier assigned by Cash App to every buyer. */ + @SerializedName("buyer_id") + String buyerId; + + /** A public identifier for buyers using Cash App. */ + @SerializedName("cashtag") + String cashtag; + } + + /** + * Custom Payment Methods represent Payment Method types not modeled directly in the Stripe API. + * This resource consists of details about the custom payment method used for this payment + * attempt. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Custom extends StripeObject { + /** + * Display name for the custom (user-defined) payment method type used to make this payment. + */ + @SerializedName("display_name") + String displayName; + + /** The custom payment method type associated with this payment. */ + @SerializedName("type") String type; } + + /** + * For more details about CustomerBalance, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class CustomerBalance extends StripeObject {} + + /** + * For more details about Eps, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Eps extends StripeObject { + /** + * The customer's bank. Should be one of {@code arzte_und_apotheker_bank}, {@code + * austrian_anadi_bank_ag}, {@code bank_austria}, {@code bankhaus_carl_spangler}, {@code + * bankhaus_schelhammer_und_schattera_ag}, {@code bawag_psk_ag}, {@code bks_bank_ag}, {@code + * brull_kallmus_bank_ag}, {@code btv_vier_lander_bank}, {@code capital_bank_grawe_gruppe_ag}, + * {@code deutsche_bank_ag}, {@code dolomitenbank}, {@code easybank_ag}, {@code + * erste_bank_und_sparkassen}, {@code hypo_alpeadriabank_international_ag}, {@code + * hypo_noe_lb_fur_niederosterreich_u_wien}, {@code hypo_oberosterreich_salzburg_steiermark}, + * {@code hypo_tirol_bank_ag}, {@code hypo_vorarlberg_bank_ag}, {@code + * hypo_bank_burgenland_aktiengesellschaft}, {@code marchfelder_bank}, {@code oberbank_ag}, + * {@code raiffeisen_bankengruppe_osterreich}, {@code schoellerbank_ag}, {@code + * sparda_bank_wien}, {@code volksbank_gruppe}, {@code volkskreditbank_ag}, or {@code + * vr_bank_braunau}. + */ + @SerializedName("bank") + String bank; + + /** + * Owner's verified full name. Values are verified or provided by EPS directly (if supported) + * at the time of authorization or settlement. They cannot be set or mutated. EPS rarely + * provides this information so the attribute is usually empty. + */ + @SerializedName("verified_name") + String verifiedName; + } + + /** + * For more details about Fpx, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Fpx extends StripeObject { + /** Account holder type, if provided. Can be one of {@code individual} or {@code company}. */ + @SerializedName("account_holder_type") + String accountHolderType; + + /** + * The customer's bank. Can be one of {@code affin_bank}, {@code agrobank}, {@code + * alliance_bank}, {@code ambank}, {@code bank_islam}, {@code bank_muamalat}, {@code + * bank_rakyat}, {@code bsn}, {@code cimb}, {@code hong_leong_bank}, {@code hsbc}, {@code + * kfh}, {@code maybank2u}, {@code ocbc}, {@code public_bank}, {@code rhb}, {@code + * standard_chartered}, {@code uob}, {@code deutsche_bank}, {@code maybank2e}, {@code + * pb_enterprise}, or {@code bank_of_china}. + */ + @SerializedName("bank") + String bank; + + /** Unique transaction id generated by FPX for every request from the merchant. */ + @SerializedName("transaction_id") + String transactionId; + } + + /** + * For more details about Giropay, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Giropay extends StripeObject { + /** Bank code of bank associated with the bank account. */ + @SerializedName("bank_code") + String bankCode; + + /** Name of the bank associated with the bank account. */ + @SerializedName("bank_name") + String bankName; + + /** Bank Identifier Code of the bank associated with the bank account. */ + @SerializedName("bic") + String bic; + + /** + * Owner's verified full name. Values are verified or provided by Giropay directly (if + * supported) at the time of authorization or settlement. They cannot be set or mutated. + * Giropay rarely provides this information so the attribute is usually empty. + */ + @SerializedName("verified_name") + String verifiedName; + } + + /** + * For more details about Gopay, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Gopay extends StripeObject {} + + /** + * For more details about Grabpay, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Grabpay extends StripeObject { + /** Unique transaction id generated by GrabPay. */ + @SerializedName("transaction_id") + String transactionId; + } + + /** + * For more details about IdBankTransfer, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class IdBankTransfer extends StripeObject { + /** Account number of the bank account to transfer funds to. */ + @SerializedName("account_number") + String accountNumber; + + /** + * Bank where the account is located. + * + *

One of {@code bca}, {@code bni}, {@code bri}, {@code cimb}, or {@code permata}. + */ + @SerializedName("bank") + String bank; + + /** Local bank code of the bank. */ + @SerializedName("bank_code") + String bankCode; + + /** Name of the bank associated with the bank account. */ + @SerializedName("bank_name") + String bankName; + + /** + * Merchant name and billing details name, for the customer to check for the correct merchant + * when performing the bank transfer. + */ + @SerializedName("display_name") + String displayName; + } + + /** + * For more details about Ideal, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Ideal extends StripeObject { + /** + * The customer's bank. Can be one of {@code abn_amro}, {@code asn_bank}, {@code bunq}, {@code + * handelsbanken}, {@code ing}, {@code knab}, {@code moneyou}, {@code n26}, {@code nn}, {@code + * rabobank}, {@code regiobank}, {@code revolut}, {@code sns_bank}, {@code triodos_bank}, + * {@code van_lanschot}, or {@code yoursafe}. + */ + @SerializedName("bank") + String bank; + + /** + * The Bank Identifier Code of the customer's bank. + * + *

One of {@code ABNANL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code BUNQNL2A}, {@code + * FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code KNABNL2H}, {@code MOYONL21}, {@code + * NNBANL2G}, {@code NTSBDEB1}, {@code RABONL2U}, {@code RBRBNL21}, {@code REVOIE23}, {@code + * REVOLT21}, {@code SNSBNL2A}, or {@code TRIONL2U}. + */ + @SerializedName("bic") + String bic; + + /** The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ + @SerializedName("generated_sepa_debit") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField generatedSepaDebit; + + /** The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ + @SerializedName("generated_sepa_debit_mandate") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField generatedSepaDebitMandate; + + /** Last four characters of the IBAN. */ + @SerializedName("iban_last4") + String ibanLast4; + + /** + * Owner's verified full name. Values are verified or provided by iDEAL directly (if + * supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + @SerializedName("verified_name") + String verifiedName; + + /** Get ID of expandable {@code generatedSepaDebit} object. */ + public String getGeneratedSepaDebit() { + return (this.generatedSepaDebit != null) ? this.generatedSepaDebit.getId() : null; + } + + public void setGeneratedSepaDebit(String id) { + this.generatedSepaDebit = ApiResource.setExpandableFieldId(id, this.generatedSepaDebit); + } + + /** Get expanded {@code generatedSepaDebit}. */ + public PaymentMethod getGeneratedSepaDebitObject() { + return (this.generatedSepaDebit != null) ? this.generatedSepaDebit.getExpanded() : null; + } + + public void setGeneratedSepaDebitObject(PaymentMethod expandableObject) { + this.generatedSepaDebit = + new ExpandableField(expandableObject.getId(), expandableObject); + } + + /** Get ID of expandable {@code generatedSepaDebitMandate} object. */ + public String getGeneratedSepaDebitMandate() { + return (this.generatedSepaDebitMandate != null) + ? this.generatedSepaDebitMandate.getId() + : null; + } + + public void setGeneratedSepaDebitMandate(String id) { + this.generatedSepaDebitMandate = + ApiResource.setExpandableFieldId(id, this.generatedSepaDebitMandate); + } + + /** Get expanded {@code generatedSepaDebitMandate}. */ + public Mandate getGeneratedSepaDebitMandateObject() { + return (this.generatedSepaDebitMandate != null) + ? this.generatedSepaDebitMandate.getExpanded() + : null; + } + + public void setGeneratedSepaDebitMandateObject(Mandate expandableObject) { + this.generatedSepaDebitMandate = + new ExpandableField(expandableObject.getId(), expandableObject); + } + } + + /** + * For more details about InteracPresent, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class InteracPresent extends StripeObject { + /** Card brand. Can be {@code interac}, {@code mastercard} or {@code visa}. */ + @SerializedName("brand") + String brand; + + /** + * The cardholder name as read from the card, in ISO 7813 format. May include + * alphanumeric characters, special characters and first/last name separator ({@code /}). In + * some cases, the cardholder name may not be available depending on how the issuer has + * configured the card. Cardholder name is typically not available on swipe or contactless + * payments, such as those made with Apple Pay and Google Pay. + */ + @SerializedName("cardholder_name") + String cardholderName; + + /** + * Two-letter ISO code representing the country of the card. You could use this attribute to + * get a sense of the international breakdown of cards you've collected. + */ + @SerializedName("country") + String country; + + /** + * A high-level description of the type of cards issued in this range. (For internal use only + * and not typically available in standard API requests.) + */ + @SerializedName("description") + String description; + + /** Authorization response cryptogram. */ + @SerializedName("emv_auth_data") + String emvAuthData; + + /** Two-digit number representing the card's expiration month. */ + @SerializedName("exp_month") + Long expMonth; + + /** Four-digit number representing the card's expiration year. */ + @SerializedName("exp_year") + Long expYear; + + /** + * Uniquely identifies this particular card number. You can use this attribute to check + * whether two customers who’ve signed up with you are using the same card number, for + * example. For payment methods that tokenize card information (Apple Pay, Google Pay), the + * tokenized number might be provided instead of the underlying card number. + * + *

As of May 1, 2021, card fingerprint in India for Connect changed to allow two + * fingerprints for the same card---one for India and one for the rest of the world. + */ + @SerializedName("fingerprint") + String fingerprint; + + /** + * Card funding type. Can be {@code credit}, {@code debit}, {@code prepaid}, or {@code + * unknown}. + */ + @SerializedName("funding") + String funding; + + /** + * ID of a card PaymentMethod generated from the card_present PaymentMethod that may be + * attached to a Customer for future transactions. Only present if it was possible to generate + * a card PaymentMethod. + */ + @SerializedName("generated_card") + String generatedCard; + + /** + * Issuer identification number of the card. (For internal use only and not typically + * available in standard API requests.) + */ + @SerializedName("iin") + String iin; + + /** + * The name of the card's issuing bank. (For internal use only and not typically available in + * standard API requests.) + */ + @SerializedName("issuer") + String issuer; + + /** The last four digits of the card. */ + @SerializedName("last4") + String last4; + + /** + * Identifies which network this charge was processed on. Can be {@code amex}, {@code + * cartes_bancaires}, {@code diners}, {@code discover}, {@code eftpos_au}, {@code interac}, + * {@code jcb}, {@code link}, {@code mastercard}, {@code unionpay}, {@code visa}, or {@code + * unknown}. + */ + @SerializedName("network") + String network; + + /** + * This is used by the financial networks to identify a transaction. Visa calls this the + * Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the + * Acquirer Reference Data. This value will be present if it is returned by the financial + * network in the authorization response, and null otherwise. + */ + @SerializedName("network_transaction_id") + String networkTransactionId; + + /** EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. */ + @SerializedName("preferred_locales") + List preferredLocales; + + /** + * How card details were read in this transaction. + * + *

One of {@code contact_emv}, {@code contactless_emv}, {@code contactless_magstripe_mode}, + * {@code magnetic_stripe_fallback}, or {@code magnetic_stripe_track2}. + */ + @SerializedName("read_method") + String readMethod; + + /** + * A collection of fields required to be displayed on receipts. Only required for EMV + * transactions. + */ + @SerializedName("receipt") + Receipt receipt; + + /** + * For more details about Receipt, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Receipt extends StripeObject { + /** + * The type of account being debited or credited + * + *

One of {@code checking}, {@code savings}, or {@code unknown}. + */ + @SerializedName("account_type") + String accountType; + + /** EMV tag 9F26, cryptogram generated by the integrated circuit chip. */ + @SerializedName("application_cryptogram") + String applicationCryptogram; + + /** Mnenomic of the Application Identifier. */ + @SerializedName("application_preferred_name") + String applicationPreferredName; + + /** Identifier for this transaction. */ + @SerializedName("authorization_code") + String authorizationCode; + + /** EMV tag 8A. A code returned by the card issuer. */ + @SerializedName("authorization_response_code") + String authorizationResponseCode; + + /** + * Describes the method used by the cardholder to verify ownership of the card. One of the + * following: {@code approval}, {@code failure}, {@code none}, {@code offline_pin}, {@code + * offline_pin_and_signature}, {@code online_pin}, or {@code signature}. + */ + @SerializedName("cardholder_verification_method") + String cardholderVerificationMethod; + + /** + * EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. + */ + @SerializedName("dedicated_file_name") + String dedicatedFileName; + + /** The outcome of a series of EMV functions performed by the card reader. */ + @SerializedName("terminal_verification_results") + String terminalVerificationResults; + + /** An indication of various EMV functions performed during the transaction. */ + @SerializedName("transaction_status_information") + String transactionStatusInformation; + } + } + + /** + * For more details about KakaoPay, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class KakaoPay extends StripeObject { + /** A unique identifier for the buyer as determined by the local payment processor. */ + @SerializedName("buyer_id") + String buyerId; + } + + /** + * For more details about Klarna, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Klarna extends StripeObject { + /** The payer details for this transaction. */ + @SerializedName("payer_details") + PayerDetails payerDetails; + + /** + * The Klarna payment method used for this transaction. Can be one of {@code pay_later}, + * {@code pay_now}, {@code pay_with_financing}, or {@code pay_in_installments} + */ + @SerializedName("payment_method_category") + String paymentMethodCategory; + + /** + * Preferred language of the Klarna authorization page that the customer is redirected to. Can + * be one of {@code de-AT}, {@code en-AT}, {@code nl-BE}, {@code fr-BE}, {@code en-BE}, {@code + * de-DE}, {@code en-DE}, {@code da-DK}, {@code en-DK}, {@code es-ES}, {@code en-ES}, {@code + * fi-FI}, {@code sv-FI}, {@code en-FI}, {@code en-GB}, {@code en-IE}, {@code it-IT}, {@code + * en-IT}, {@code nl-NL}, {@code en-NL}, {@code nb-NO}, {@code en-NO}, {@code sv-SE}, {@code + * en-SE}, {@code en-US}, {@code es-US}, {@code fr-FR}, {@code en-FR}, {@code cs-CZ}, {@code + * en-CZ}, {@code ro-RO}, {@code en-RO}, {@code el-GR}, {@code en-GR}, {@code en-AU}, {@code + * en-NZ}, {@code en-CA}, {@code fr-CA}, {@code pl-PL}, {@code en-PL}, {@code pt-PT}, {@code + * en-PT}, {@code de-CH}, {@code fr-CH}, {@code it-CH}, or {@code en-CH} + */ + @SerializedName("preferred_locale") + String preferredLocale; + + /** + * For more details about PayerDetails, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class PayerDetails extends StripeObject { + /** The payer's address. */ + @SerializedName("address") + com.stripe.model.PaymentAttemptRecord.PaymentMethodDetails.Klarna.PayerDetails.Address + address; + + /** + * For more details about Address, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Address extends StripeObject { + /** The payer address country. */ + @SerializedName("country") + String country; + } + } + } + + /** + * For more details about Konbini, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Konbini extends StripeObject { + /** + * If the payment succeeded, this contains the details of the convenience store where the + * payment was completed. + */ + @SerializedName("store") + Store store; + + /** + * For more details about Store, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Store extends StripeObject { + /** + * The name of the convenience store chain where the payment was completed. + * + *

One of {@code familymart}, {@code lawson}, {@code ministop}, or {@code seicomart}. + */ + @SerializedName("chain") + String chain; + } + } + + /** + * For more details about KrCard, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class KrCard extends StripeObject { + /** + * The local credit or debit card brand. + * + *

One of {@code bc}, {@code citi}, {@code hana}, {@code hyundai}, {@code jeju}, {@code + * jeonbuk}, {@code kakaobank}, {@code kbank}, {@code kdbbank}, {@code kookmin}, {@code + * kwangju}, {@code lotte}, {@code mg}, {@code nh}, {@code post}, {@code samsung}, {@code + * savingsbank}, {@code shinhan}, {@code shinhyup}, {@code suhyup}, {@code tossbank}, or + * {@code woori}. + */ + @SerializedName("brand") + String brand; + + /** A unique identifier for the buyer as determined by the local payment processor. */ + @SerializedName("buyer_id") + String buyerId; + + /** The last four digits of the card. This may not be present for American Express cards. */ + @SerializedName("last4") + String last4; + } + + /** + * For more details about Link, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Link extends StripeObject { + /** + * Two-letter ISO code representing the funding source country beneath the Link payment. You + * could use this attribute to get a sense of international fees. + */ + @SerializedName("country") + String country; + } + + /** + * For more details about MbWay, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class MbWay extends StripeObject {} + + /** + * For more details about Mobilepay, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Mobilepay extends StripeObject { + /** Internal card details. */ + @SerializedName("card") + Card card; + + /** + * For more details about Card, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Card extends StripeObject { + /** Brand of the card used in the transaction. */ + @SerializedName("brand") + String brand; + + /** Two-letter ISO code representing the country of the card. */ + @SerializedName("country") + String country; + + /** Two digit number representing the card's expiration month. */ + @SerializedName("exp_month") + Long expMonth; + + /** Two digit number representing the card's expiration year. */ + @SerializedName("exp_year") + Long expYear; + + /** The last 4 digits of the card. */ + @SerializedName("last4") + String last4; + } + } + + /** + * For more details about Multibanco, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Multibanco extends StripeObject { + /** Entity number associated with this Multibanco payment. */ + @SerializedName("entity") + String entity; + + /** Reference number associated with this Multibanco payment. */ + @SerializedName("reference") + String reference; + } + + /** + * For more details about NaverPay, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class NaverPay extends StripeObject { + /** A unique identifier for the buyer as determined by the local payment processor. */ + @SerializedName("buyer_id") + String buyerId; + } + + /** + * For more details about Oxxo, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Oxxo extends StripeObject { + /** OXXO reference number. */ + @SerializedName("number") + String number; + } + + /** + * For more details about P24, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class P24 extends StripeObject { + /** + * The customer's bank. Can be one of {@code ing}, {@code citi_handlowy}, {@code + * tmobile_usbugi_bankowe}, {@code plus_bank}, {@code etransfer_pocztowy24}, {@code + * banki_spbdzielcze}, {@code bank_nowy_bfg_sa}, {@code getin_bank}, {@code velobank}, {@code + * blik}, {@code noble_pay}, {@code ideabank}, {@code envelobank}, {@code + * santander_przelew24}, {@code nest_przelew}, {@code mbank_mtransfer}, {@code inteligo}, + * {@code pbac_z_ipko}, {@code bnp_paribas}, {@code credit_agricole}, {@code toyota_bank}, + * {@code bank_pekao_sa}, {@code volkswagen_bank}, {@code bank_millennium}, {@code + * alior_bank}, or {@code boz}. + */ + @SerializedName("bank") + String bank; + + /** Unique reference for this Przelewy24 payment. */ + @SerializedName("reference") + String reference; + + /** + * Owner's verified full name. Values are verified or provided by Przelewy24 directly (if + * supported) at the time of authorization or settlement. They cannot be set or mutated. + * Przelewy24 rarely provides this information so the attribute is usually empty. + */ + @SerializedName("verified_name") + 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. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Payco extends StripeObject { + /** A unique identifier for the buyer as determined by the local payment processor. */ + @SerializedName("buyer_id") + String buyerId; + } + + /** + * For more details about Paynow, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Paynow extends StripeObject { + /** Reference number associated with this PayNow payment. */ + @SerializedName("reference") + String reference; + } + + /** + * For more details about Paypal, please refer to the API + * Reference. + */ + @Getter + @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. + */ + @SerializedName("payer_email") + String payerEmail; + + /** PayPal account PayerID. This identifier uniquely identifies the PayPal customer. */ + @SerializedName("payer_id") + String payerId; + + /** + * Owner's full name. Values provided by PayPal directly (if supported) at the time of + * authorization or settlement. They cannot be set or mutated. + */ + @SerializedName("payer_name") + String payerName; + + /** + * The level of protection offered as defined by PayPal Seller Protection for Merchants, for + * this transaction. + */ + @SerializedName("seller_protection") + SellerProtection sellerProtection; + + /** + * The shipping address for the customer, as supplied by the merchant at the point of payment + * execution. This shipping address will not be updated if the merchant updates the shipping + * address on the PaymentIntent after the PaymentIntent was successfully confirmed. + */ + @SerializedName("shipping") + com.stripe.model.Address shipping; + + /** A unique ID generated by PayPal for this transaction. */ + @SerializedName("transaction_id") + String transactionId; + + /** + * The shipping address for the customer, as supplied by the merchant at the point of payment + * execution. This shipping address will not be updated if the merchant updates the shipping + * address on the PaymentIntent after the PaymentIntent was successfully confirmed. + */ + @SerializedName("verified_address") + com.stripe.model.Address verifiedAddress; + + /** + * Owner's verified email. Values are verified or provided by PayPal directly (if supported) + * at the time of authorization or settlement. They cannot be set or mutated. + */ + @SerializedName("verified_email") + String verifiedEmail; + + /** + * Owner's verified full name. Values are verified or provided by PayPal directly (if + * supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + @SerializedName("verified_name") + String verifiedName; + + /** + * For more details about SellerProtection, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class SellerProtection extends StripeObject { + /** An array of conditions that are covered for the transaction, if applicable. */ + @SerializedName("dispute_categories") + List disputeCategories; + + /** + * Indicates whether the transaction is eligible for PayPal's seller protection. + * + *

One of {@code eligible}, {@code not_eligible}, or {@code partially_eligible}. + */ + @SerializedName("status") + String status; + } + } + + /** + * For more details about Payto, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Payto extends StripeObject { + /** Bank-State-Branch number of the bank account. */ + @SerializedName("bsb_number") + String bsbNumber; + + /** Last four digits of the bank account number. */ + @SerializedName("last4") + String last4; + + /** ID of the mandate used to make this payment. */ + @SerializedName("mandate") + String mandate; + + /** The PayID alias for the bank account. */ + @SerializedName("pay_id") + String payId; + } + + /** + * For more details about Pix, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Pix extends StripeObject { + /** Unique transaction id generated by BCB. */ + @SerializedName("bank_transaction_id") + String bankTransactionId; + } + + /** + * For more details about Promptpay, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Promptpay extends StripeObject { + /** Bill reference generated by PromptPay. */ + @SerializedName("reference") + String reference; + } + + /** + * For more details about Qris, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Qris extends StripeObject {} + + /** + * For more details about Rechnung, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Rechnung extends StripeObject {} + + /** + * For more details about RevolutPay, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class RevolutPay extends StripeObject { + @SerializedName("funding") + Funding funding; + + /** + * For more details about Funding, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Funding extends StripeObject { + @SerializedName("card") + Card card; + + /** + * funding type of the underlying payment method. + * + *

Equal to {@code card}. + */ + @SerializedName("type") + String type; + + /** + * For more details about Card, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Card extends StripeObject { + /** + * Card brand. Can be {@code amex}, {@code diners}, {@code discover}, {@code eftpos_au}, + * {@code jcb}, {@code link}, {@code mastercard}, {@code unionpay}, {@code visa}, or + * {@code unknown}. + */ + @SerializedName("brand") + String brand; + + /** + * The product code that + * identifies the specific program or product associated with a card. (For internal use + * only and not typically available in standard API requests.) + */ + @SerializedName("brand_product") + String brandProduct; + + /** + * Two-letter ISO code representing the country of the card. You could use this attribute + * to get a sense of the international breakdown of cards you've collected. + */ + @SerializedName("country") + String country; + + /** Two-digit number representing the card's expiration month. */ + @SerializedName("exp_month") + Long expMonth; + + /** Four-digit number representing the card's expiration year. */ + @SerializedName("exp_year") + Long expYear; + + /** + * Card funding type. Can be {@code credit}, {@code debit}, {@code prepaid}, or {@code + * unknown}. + */ + @SerializedName("funding") + String funding; + + /** The last four digits of the card. */ + @SerializedName("last4") + String last4; + } + } + } + + /** + * For more details about SamsungPay, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class SamsungPay extends StripeObject { + /** A unique identifier for the buyer as determined by the local payment processor. */ + @SerializedName("buyer_id") + String buyerId; + } + + /** + * For more details about SepaCreditTransfer, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class SepaCreditTransfer extends StripeObject { + /** Name of the bank associated with the bank account. */ + @SerializedName("bank_name") + String bankName; + + /** Bank Identifier Code of the bank associated with the bank account. */ + @SerializedName("bic") + String bic; + + /** IBAN of the bank account to transfer funds to. */ + @SerializedName("iban") + String iban; + } + + /** + * For more details about SepaDebit, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class SepaDebit extends StripeObject { + /** Bank code of bank associated with the bank account. */ + @SerializedName("bank_code") + String bankCode; + + /** Branch code of bank associated with the bank account. */ + @SerializedName("branch_code") + String branchCode; + + /** Two-letter ISO code representing the country the bank account is located in. */ + @SerializedName("country") + String country; + + /** + * Uniquely identifies this particular bank account. You can use this attribute to check + * whether two bank accounts are the same. + */ + @SerializedName("fingerprint") + String fingerprint; + + /** Last four characters of the IBAN. */ + @SerializedName("last4") + String last4; + + /** + * Find the ID of the mandate used for this payment under the payment_method_details.sepa_debit.mandate + * property on the Charge. Use this mandate ID to retrieve the Mandate. + */ + @SerializedName("mandate") + String mandate; + } + + /** + * For more details about Shopeepay, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Shopeepay extends StripeObject {} + + /** + * For more details about Sofort, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Sofort extends StripeObject { + /** Bank code of bank associated with the bank account. */ + @SerializedName("bank_code") + String bankCode; + + /** Name of the bank associated with the bank account. */ + @SerializedName("bank_name") + String bankName; + + /** Bank Identifier Code of the bank associated with the bank account. */ + @SerializedName("bic") + String bic; + + /** Two-letter ISO code representing the country the bank account is located in. */ + @SerializedName("country") + String country; + + /** The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ + @SerializedName("generated_sepa_debit") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField generatedSepaDebit; + + /** The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ + @SerializedName("generated_sepa_debit_mandate") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField generatedSepaDebitMandate; + + /** Last four characters of the IBAN. */ + @SerializedName("iban_last4") + String ibanLast4; + + /** + * Preferred language of the SOFORT authorization page that the customer is redirected to. Can + * be one of {@code de}, {@code en}, {@code es}, {@code fr}, {@code it}, {@code nl}, or {@code + * pl} + */ + @SerializedName("preferred_language") + String preferredLanguage; + + /** + * Owner's verified full name. Values are verified or provided by SOFORT directly (if + * supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + @SerializedName("verified_name") + String verifiedName; + + /** Get ID of expandable {@code generatedSepaDebit} object. */ + public String getGeneratedSepaDebit() { + return (this.generatedSepaDebit != null) ? this.generatedSepaDebit.getId() : null; + } + + public void setGeneratedSepaDebit(String id) { + this.generatedSepaDebit = ApiResource.setExpandableFieldId(id, this.generatedSepaDebit); + } + + /** Get expanded {@code generatedSepaDebit}. */ + public PaymentMethod getGeneratedSepaDebitObject() { + return (this.generatedSepaDebit != null) ? this.generatedSepaDebit.getExpanded() : null; + } + + public void setGeneratedSepaDebitObject(PaymentMethod expandableObject) { + this.generatedSepaDebit = + new ExpandableField(expandableObject.getId(), expandableObject); + } + + /** Get ID of expandable {@code generatedSepaDebitMandate} object. */ + public String getGeneratedSepaDebitMandate() { + return (this.generatedSepaDebitMandate != null) + ? this.generatedSepaDebitMandate.getId() + : null; + } + + public void setGeneratedSepaDebitMandate(String id) { + this.generatedSepaDebitMandate = + ApiResource.setExpandableFieldId(id, this.generatedSepaDebitMandate); + } + + /** Get expanded {@code generatedSepaDebitMandate}. */ + public Mandate getGeneratedSepaDebitMandateObject() { + return (this.generatedSepaDebitMandate != null) + ? this.generatedSepaDebitMandate.getExpanded() + : null; + } + + public void setGeneratedSepaDebitMandateObject(Mandate expandableObject) { + this.generatedSepaDebitMandate = + new ExpandableField(expandableObject.getId(), expandableObject); + } + } + + /** + * For more details about StripeAccount, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StripeAccount extends StripeObject {} + + /** + * For more details about Swish, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Swish extends StripeObject { + /** + * Uniquely identifies the payer's Swish account. You can use this attribute to check whether + * two Swish transactions were paid for by the same payer + */ + @SerializedName("fingerprint") + String fingerprint; + + /** Payer bank reference number for the payment. */ + @SerializedName("payment_reference") + String paymentReference; + + /** The last four digits of the Swish account phone number. */ + @SerializedName("verified_phone_last4") + String verifiedPhoneLast4; + } + + /** + * For more details about Twint, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Twint extends StripeObject {} + + /** + * For more details about UsBankAccount, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class UsBankAccount extends StripeObject { + /** + * Account holder type: individual or company. + * + *

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

One of {@code checking}, or {@code savings}. + */ + @SerializedName("account_type") + String accountType; + + /** Name of the bank associated with the bank account. */ + @SerializedName("bank_name") + String bankName; + + /** + * Uniquely identifies this particular bank account. You can use this attribute to check + * whether two bank accounts are the same. + */ + @SerializedName("fingerprint") + String fingerprint; + + /** Last four digits of the bank account number. */ + @SerializedName("last4") + String last4; + + /** ID of the mandate used to make this payment. */ + @SerializedName("mandate") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField mandate; + + /** Reference number to locate ACH payments with customer's bank. */ + @SerializedName("payment_reference") + String paymentReference; + + /** Routing number of the bank account. */ + @SerializedName("routing_number") + String routingNumber; + + /** Get ID of expandable {@code mandate} object. */ + public String getMandate() { + return (this.mandate != null) ? this.mandate.getId() : null; + } + + public void setMandate(String id) { + this.mandate = ApiResource.setExpandableFieldId(id, this.mandate); + } + + /** Get expanded {@code mandate}. */ + public Mandate getMandateObject() { + return (this.mandate != null) ? this.mandate.getExpanded() : null; + } + + public void setMandateObject(Mandate expandableObject) { + this.mandate = new ExpandableField(expandableObject.getId(), expandableObject); + } + } + + /** + * For more details about Wechat, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Wechat extends StripeObject {} + + /** + * For more details about WechatPay, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class WechatPay extends StripeObject { + /** + * Uniquely identifies this particular WeChat Pay account. You can use this attribute to check + * whether two WeChat accounts are the same. + */ + @SerializedName("fingerprint") + String fingerprint; + + /** Transaction ID of this particular WeChat Pay transaction. */ + @SerializedName("transaction_id") + String transactionId; + } + + /** + * For more details about Zip, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Zip extends StripeObject {} } /** The customer's shipping information associated with this payment. */ @@ -550,7 +2781,7 @@ public static class Custom extends StripeObject { public static class ShippingDetails extends StripeObject { /** A representation of a physical address. */ @SerializedName("address") - Address address; + com.stripe.model.PaymentAttemptRecord.ShippingDetails.Address address; /** The shipping recipient's name. */ @SerializedName("name") diff --git a/src/main/java/com/stripe/model/PaymentRecord.java b/src/main/java/com/stripe/model/PaymentRecord.java index 5e285b0e8d7..05bb5ea6a07 100644 --- a/src/main/java/com/stripe/model/PaymentRecord.java +++ b/src/main/java/com/stripe/model/PaymentRecord.java @@ -15,6 +15,7 @@ import com.stripe.param.PaymentRecordReportPaymentAttemptParams; import com.stripe.param.PaymentRecordReportPaymentParams; import com.stripe.param.PaymentRecordRetrieveParams; +import java.util.List; import java.util.Map; import lombok.EqualsAndHashCode; import lombok.Getter; @@ -504,14 +505,59 @@ public static class CustomerDetails extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class PaymentMethodDetails extends StripeObject { + @SerializedName("ach_credit_transfer") + AchCreditTransfer achCreditTransfer; + + @SerializedName("ach_debit") + AchDebit achDebit; + + @SerializedName("acss_debit") + AcssDebit acssDebit; + + @SerializedName("affirm") + Affirm affirm; + + @SerializedName("afterpay_clearpay") + AfterpayClearpay afterpayClearpay; + + @SerializedName("alipay") + Alipay alipay; + + @SerializedName("alma") + Alma alma; + + @SerializedName("amazon_pay") + AmazonPay amazonPay; + + @SerializedName("au_becs_debit") + AuBecsDebit auBecsDebit; + + @SerializedName("bacs_debit") + BacsDebit bacsDebit; + + @SerializedName("bancontact") + Bancontact bancontact; + /** The billing details associated with the method of payment. */ @SerializedName("billing_details") BillingDetails billingDetails; + @SerializedName("blik") + Blik blik; + + @SerializedName("boleto") + Boleto boleto; + /** Details of the card used for this payment attempt. */ @SerializedName("card") Card card; + @SerializedName("card_present") + CardPresent cardPresent; + + @SerializedName("cashapp") + Cashapp cashapp; + /** * Custom Payment Methods represent Payment Method types not modeled directly in the Stripe API. * This resource consists of details about the custom payment method used for this payment @@ -520,14 +566,547 @@ public static class PaymentMethodDetails extends StripeObject { @SerializedName("custom") Custom custom; + @SerializedName("customer_balance") + CustomerBalance customerBalance; + + @SerializedName("eps") + Eps eps; + + @SerializedName("fpx") + Fpx fpx; + + @SerializedName("giropay") + Giropay giropay; + + @SerializedName("gopay") + Gopay gopay; + + @SerializedName("grabpay") + Grabpay grabpay; + + @SerializedName("id_bank_transfer") + IdBankTransfer idBankTransfer; + + @SerializedName("ideal") + Ideal ideal; + + @SerializedName("interac_present") + InteracPresent interacPresent; + + @SerializedName("kakao_pay") + KakaoPay kakaoPay; + + @SerializedName("klarna") + Klarna klarna; + + @SerializedName("konbini") + Konbini konbini; + + @SerializedName("kr_card") + KrCard krCard; + + @SerializedName("link") + Link link; + + @SerializedName("mb_way") + MbWay mbWay; + + @SerializedName("mobilepay") + Mobilepay mobilepay; + + @SerializedName("multibanco") + Multibanco multibanco; + + @SerializedName("naver_pay") + NaverPay naverPay; + + @SerializedName("oxxo") + Oxxo oxxo; + + @SerializedName("p24") + P24 p24; + + @SerializedName("pay_by_bank") + PayByBank payByBank; + + @SerializedName("payco") + Payco payco; + /** ID of the Stripe PaymentMethod used to make this payment. */ @SerializedName("payment_method") String paymentMethod; - /** The type of Payment Method used for this payment attempt. */ + @SerializedName("paynow") + Paynow paynow; + + @SerializedName("paypal") + Paypal paypal; + + @SerializedName("payto") + Payto payto; + + @SerializedName("pix") + Pix pix; + + @SerializedName("promptpay") + Promptpay promptpay; + + @SerializedName("qris") + Qris qris; + + @SerializedName("rechnung") + Rechnung rechnung; + + @SerializedName("revolut_pay") + RevolutPay revolutPay; + + @SerializedName("samsung_pay") + SamsungPay samsungPay; + + @SerializedName("sepa_credit_transfer") + SepaCreditTransfer sepaCreditTransfer; + + @SerializedName("sepa_debit") + SepaDebit sepaDebit; + + @SerializedName("shopeepay") + Shopeepay shopeepay; + + @SerializedName("sofort") + Sofort sofort; + + @SerializedName("stripe_account") + StripeAccount stripeAccount; + + @SerializedName("swish") + Swish swish; + + @SerializedName("twint") + Twint twint; + + /** + * The type of transaction-specific details of the payment method used in the payment. See PaymentMethod.type + * for the full list of possible types. An additional hash is included on {@code + * payment_method_details} with a name matching this value. It contains information specific to + * the payment method. + */ @SerializedName("type") String type; + @SerializedName("us_bank_account") + UsBankAccount usBankAccount; + + @SerializedName("wechat") + Wechat wechat; + + @SerializedName("wechat_pay") + WechatPay wechatPay; + + @SerializedName("zip") + Zip zip; + + /** + * For more details about AchCreditTransfer, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AchCreditTransfer extends StripeObject { + /** Account number to transfer funds to. */ + @SerializedName("account_number") + String accountNumber; + + /** Name of the bank associated with the routing number. */ + @SerializedName("bank_name") + String bankName; + + /** Routing transit number for the bank account to transfer funds to. */ + @SerializedName("routing_number") + String routingNumber; + + /** SWIFT code of the bank associated with the routing number. */ + @SerializedName("swift_code") + String swiftCode; + } + + /** + * For more details about AchDebit, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AchDebit extends StripeObject { + /** + * Type of entity that holds the account. This can be either {@code individual} or {@code + * company}. + * + *

One of {@code company}, or {@code individual}. + */ + @SerializedName("account_holder_type") + String accountHolderType; + + /** Name of the bank associated with the bank account. */ + @SerializedName("bank_name") + String bankName; + + /** Two-letter ISO code representing the country the bank account is located in. */ + @SerializedName("country") + String country; + + /** + * Uniquely identifies this particular bank account. You can use this attribute to check + * whether two bank accounts are the same. + */ + @SerializedName("fingerprint") + String fingerprint; + + /** Last four digits of the bank account number. */ + @SerializedName("last4") + String last4; + + /** Routing transit number of the bank account. */ + @SerializedName("routing_number") + String routingNumber; + } + + /** + * For more details about AcssDebit, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AcssDebit extends StripeObject { + /** Name of the bank associated with the bank account. */ + @SerializedName("bank_name") + String bankName; + + /** + * Uniquely identifies this particular bank account. You can use this attribute to check + * whether two bank accounts are the same. + */ + @SerializedName("fingerprint") + String fingerprint; + + /** Institution number of the bank account. */ + @SerializedName("institution_number") + String institutionNumber; + + /** Last four digits of the bank account number. */ + @SerializedName("last4") + String last4; + + /** ID of the mandate used to make this payment. */ + @SerializedName("mandate") + String mandate; + + /** Transit number of the bank account. */ + @SerializedName("transit_number") + String transitNumber; + } + + /** + * For more details about Affirm, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Affirm extends StripeObject { + /** The Affirm transaction ID associated with this payment. */ + @SerializedName("transaction_id") + String transactionId; + } + + /** + * For more details about AfterpayClearpay, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AfterpayClearpay extends StripeObject { + /** The Afterpay order ID associated with this payment intent. */ + @SerializedName("order_id") + String orderId; + + /** Order identifier shown to the merchant in Afterpay’s online portal. */ + @SerializedName("reference") + String reference; + } + + /** + * For more details about Alipay, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Alipay extends StripeObject { + /** + * Uniquely identifies this particular Alipay account. You can use this attribute to check + * whether two Alipay accounts are the same. + */ + @SerializedName("buyer_id") + String buyerId; + + /** + * Uniquely identifies this particular Alipay account. You can use this attribute to check + * whether two Alipay accounts are the same. + */ + @SerializedName("fingerprint") + String fingerprint; + + /** Transaction ID of this particular Alipay transaction. */ + @SerializedName("transaction_id") + String transactionId; + } + + /** + * For more details about Alma, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Alma extends StripeObject {} + + /** + * For more details about AmazonPay, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AmazonPay extends StripeObject { + @SerializedName("funding") + Funding funding; + + /** + * For more details about Funding, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Funding extends StripeObject { + @SerializedName("card") + Card card; + + /** + * funding type of the underlying payment method. + * + *

Equal to {@code card}. + */ + @SerializedName("type") + String type; + + /** + * For more details about Card, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Card extends StripeObject { + /** + * Card brand. Can be {@code amex}, {@code diners}, {@code discover}, {@code eftpos_au}, + * {@code jcb}, {@code link}, {@code mastercard}, {@code unionpay}, {@code visa}, or + * {@code unknown}. + */ + @SerializedName("brand") + String brand; + + /** + * The product code that + * identifies the specific program or product associated with a card. (For internal use + * only and not typically available in standard API requests.) + */ + @SerializedName("brand_product") + String brandProduct; + + /** + * Two-letter ISO code representing the country of the card. You could use this attribute + * to get a sense of the international breakdown of cards you've collected. + */ + @SerializedName("country") + String country; + + /** Two-digit number representing the card's expiration month. */ + @SerializedName("exp_month") + Long expMonth; + + /** Four-digit number representing the card's expiration year. */ + @SerializedName("exp_year") + Long expYear; + + /** + * Card funding type. Can be {@code credit}, {@code debit}, {@code prepaid}, or {@code + * unknown}. + */ + @SerializedName("funding") + String funding; + + /** The last four digits of the card. */ + @SerializedName("last4") + String last4; + } + } + } + + /** + * For more details about AuBecsDebit, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AuBecsDebit extends StripeObject { + /** Bank-State-Branch number of the bank account. */ + @SerializedName("bsb_number") + String bsbNumber; + + /** + * Uniquely identifies this particular bank account. You can use this attribute to check + * whether two bank accounts are the same. + */ + @SerializedName("fingerprint") + String fingerprint; + + /** Last four digits of the bank account number. */ + @SerializedName("last4") + String last4; + + /** ID of the mandate used to make this payment. */ + @SerializedName("mandate") + String mandate; + } + + /** + * For more details about BacsDebit, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class BacsDebit extends StripeObject { + /** + * Uniquely identifies this particular bank account. You can use this attribute to check + * whether two bank accounts are the same. + */ + @SerializedName("fingerprint") + String fingerprint; + + /** Last four digits of the bank account number. */ + @SerializedName("last4") + String last4; + + /** ID of the mandate used to make this payment. */ + @SerializedName("mandate") + String mandate; + + /** Sort code of the bank account. (e.g., {@code 10-20-30}) */ + @SerializedName("sort_code") + String sortCode; + } + + /** + * For more details about Bancontact, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Bancontact extends StripeObject { + /** Bank code of bank associated with the bank account. */ + @SerializedName("bank_code") + String bankCode; + + /** Name of the bank associated with the bank account. */ + @SerializedName("bank_name") + String bankName; + + /** Bank Identifier Code of the bank associated with the bank account. */ + @SerializedName("bic") + String bic; + + /** The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ + @SerializedName("generated_sepa_debit") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField generatedSepaDebit; + + /** The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ + @SerializedName("generated_sepa_debit_mandate") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField generatedSepaDebitMandate; + + /** Last four characters of the IBAN. */ + @SerializedName("iban_last4") + String ibanLast4; + + /** + * Preferred language of the Bancontact authorization page that the customer is redirected to. + * Can be one of {@code en}, {@code de}, {@code fr}, or {@code nl} + */ + @SerializedName("preferred_language") + String preferredLanguage; + + /** + * Owner's verified full name. Values are verified or provided by Bancontact directly (if + * supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + @SerializedName("verified_name") + String verifiedName; + + /** Get ID of expandable {@code generatedSepaDebit} object. */ + public String getGeneratedSepaDebit() { + return (this.generatedSepaDebit != null) ? this.generatedSepaDebit.getId() : null; + } + + public void setGeneratedSepaDebit(String id) { + this.generatedSepaDebit = ApiResource.setExpandableFieldId(id, this.generatedSepaDebit); + } + + /** Get expanded {@code generatedSepaDebit}. */ + public PaymentMethod getGeneratedSepaDebitObject() { + return (this.generatedSepaDebit != null) ? this.generatedSepaDebit.getExpanded() : null; + } + + public void setGeneratedSepaDebitObject(PaymentMethod expandableObject) { + this.generatedSepaDebit = + new ExpandableField(expandableObject.getId(), expandableObject); + } + + /** Get ID of expandable {@code generatedSepaDebitMandate} object. */ + public String getGeneratedSepaDebitMandate() { + return (this.generatedSepaDebitMandate != null) + ? this.generatedSepaDebitMandate.getId() + : null; + } + + public void setGeneratedSepaDebitMandate(String id) { + this.generatedSepaDebitMandate = + ApiResource.setExpandableFieldId(id, this.generatedSepaDebitMandate); + } + + /** Get expanded {@code generatedSepaDebitMandate}. */ + public Mandate getGeneratedSepaDebitMandateObject() { + return (this.generatedSepaDebitMandate != null) + ? this.generatedSepaDebitMandate.getExpanded() + : null; + } + + public void setGeneratedSepaDebitMandateObject(Mandate expandableObject) { + this.generatedSepaDebitMandate = + new ExpandableField(expandableObject.getId(), expandableObject); + } + } + /** Billing details used by the customer for this payment. */ @Getter @Setter @@ -535,7 +1114,7 @@ public static class PaymentMethodDetails extends StripeObject { public static class BillingDetails extends StripeObject { /** A representation of a physical address. */ @SerializedName("address") - Address address; + com.stripe.model.PaymentRecord.PaymentMethodDetails.BillingDetails.Address address; /** The billing email associated with the method of payment. */ @SerializedName("email") @@ -583,6 +1162,35 @@ public static class Address extends StripeObject { } } + /** + * For more details about Blik, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Blik extends StripeObject { + /** A unique and immutable identifier assigned by BLIK to every buyer. */ + @SerializedName("buyer_id") + String buyerId; + } + + /** + * For more details about Boleto, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Boleto extends StripeObject { + /** + * The tax ID of the customer (CPF for individuals consumers or CNPJ for businesses + * consumers). + */ + @SerializedName("tax_id") + String taxId; + } + /** Details of the card used for this payment attempt. */ @Getter @Setter @@ -731,24 +1339,1646 @@ public static class ThreeDSecure extends StripeObject { } /** - * Custom Payment Methods represent Payment Method types not modeled directly in the Stripe API. - * This resource consists of details about the custom payment method used for this payment - * attempt. + * For more details about CardPresent, please refer to the API Reference. */ @Getter @Setter @EqualsAndHashCode(callSuper = false) - public static class Custom extends StripeObject { + public static class CardPresent extends StripeObject { + /** The authorized amount. */ + @SerializedName("amount_authorized") + Long amountAuthorized; + /** - * Display name for the custom (user-defined) payment method type used to make this payment. + * Card brand. Can be {@code amex}, {@code diners}, {@code discover}, {@code eftpos_au}, + * {@code jcb}, {@code link}, {@code mastercard}, {@code unionpay}, {@code visa}, or {@code + * unknown}. */ - @SerializedName("display_name") - String displayName; + @SerializedName("brand") + String brand; - /** The custom payment method type associated with this payment. */ - @SerializedName("type") + /** + * The product code that identifies + * the specific program or product associated with a card. + */ + @SerializedName("brand_product") + String brandProduct; + + /** + * When using manual capture, a future timestamp after which the charge will be automatically + * refunded if uncaptured. + */ + @SerializedName("capture_before") + Long captureBefore; + + /** + * The cardholder name as read from the card, in ISO 7813 format. May include + * alphanumeric characters, special characters and first/last name separator ({@code /}). In + * some cases, the cardholder name may not be available depending on how the issuer has + * configured the card. Cardholder name is typically not available on swipe or contactless + * payments, such as those made with Apple Pay and Google Pay. + */ + @SerializedName("cardholder_name") + String cardholderName; + + /** + * Two-letter ISO code representing the country of the card. You could use this attribute to + * get a sense of the international breakdown of cards you've collected. + */ + @SerializedName("country") + String country; + + /** + * A high-level description of the type of cards issued in this range. (For internal use only + * and not typically available in standard API requests.) + */ + @SerializedName("description") + String description; + + /** Authorization response cryptogram. */ + @SerializedName("emv_auth_data") + String emvAuthData; + + /** Two-digit number representing the card's expiration month. */ + @SerializedName("exp_month") + Long expMonth; + + /** Four-digit number representing the card's expiration year. */ + @SerializedName("exp_year") + Long expYear; + + /** + * Uniquely identifies this particular card number. You can use this attribute to check + * whether two customers who’ve signed up with you are using the same card number, for + * example. For payment methods that tokenize card information (Apple Pay, Google Pay), the + * tokenized number might be provided instead of the underlying card number. + * + *

As of May 1, 2021, card fingerprint in India for Connect changed to allow two + * fingerprints for the same card---one for India and one for the rest of the world. + */ + @SerializedName("fingerprint") + String fingerprint; + + /** + * Card funding type. Can be {@code credit}, {@code debit}, {@code prepaid}, or {@code + * unknown}. + */ + @SerializedName("funding") + String funding; + + /** + * ID of a card PaymentMethod generated from the card_present PaymentMethod that may be + * attached to a Customer for future transactions. Only present if it was possible to generate + * a card PaymentMethod. + */ + @SerializedName("generated_card") + String generatedCard; + + /** + * Issuer identification number of the card. (For internal use only and not typically + * available in standard API requests.) + */ + @SerializedName("iin") + String iin; + + /** + * Whether this PaymentIntent is + * eligible for incremental authorizations. Request support using request_incremental_authorization_support. + */ + @SerializedName("incremental_authorization_supported") + Boolean incrementalAuthorizationSupported; + + /** + * The name of the card's issuing bank. (For internal use only and not typically available in + * standard API requests.) + */ + @SerializedName("issuer") + String issuer; + + /** The last four digits of the card. */ + @SerializedName("last4") + String last4; + + /** + * Identifies which network this charge was processed on. Can be {@code amex}, {@code + * cartes_bancaires}, {@code diners}, {@code discover}, {@code eftpos_au}, {@code interac}, + * {@code jcb}, {@code link}, {@code mastercard}, {@code unionpay}, {@code visa}, or {@code + * unknown}. + */ + @SerializedName("network") + String network; + + /** + * This is used by the financial networks to identify a transaction. Visa calls this the + * Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the + * Acquirer Reference Data. This value will be present if it is returned by the financial + * network in the authorization response, and null otherwise. + */ + @SerializedName("network_transaction_id") + String networkTransactionId; + + /** Details about payments collected offline. */ + @SerializedName("offline") + Offline offline; + + /** Defines whether the authorized amount can be over-captured or not. */ + @SerializedName("overcapture_supported") + Boolean overcaptureSupported; + + /** EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. */ + @SerializedName("preferred_locales") + List preferredLocales; + + /** + * How card details were read in this transaction. + * + *

One of {@code contact_emv}, {@code contactless_emv}, {@code contactless_magstripe_mode}, + * {@code magnetic_stripe_fallback}, or {@code magnetic_stripe_track2}. + */ + @SerializedName("read_method") + String readMethod; + + /** + * A collection of fields required to be displayed on receipts. Only required for EMV + * transactions. + */ + @SerializedName("receipt") + Receipt receipt; + + @SerializedName("wallet") + Wallet wallet; + + /** + * For more details about Offline, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Offline extends StripeObject { + /** Time at which the payment was collected while offline. */ + @SerializedName("stored_at") + Long storedAt; + + /** + * The method used to process this payment method offline. Only deferred is allowed. + * + *

Equal to {@code deferred}. + */ + @SerializedName("type") + String type; + } + + /** + * For more details about Receipt, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Receipt extends StripeObject { + /** + * The type of account being debited or credited + * + *

One of {@code checking}, {@code credit}, {@code prepaid}, or {@code unknown}. + */ + @SerializedName("account_type") + String accountType; + + /** EMV tag 9F26, cryptogram generated by the integrated circuit chip. */ + @SerializedName("application_cryptogram") + String applicationCryptogram; + + /** Mnenomic of the Application Identifier. */ + @SerializedName("application_preferred_name") + String applicationPreferredName; + + /** Identifier for this transaction. */ + @SerializedName("authorization_code") + String authorizationCode; + + /** EMV tag 8A. A code returned by the card issuer. */ + @SerializedName("authorization_response_code") + String authorizationResponseCode; + + /** + * Describes the method used by the cardholder to verify ownership of the card. One of the + * following: {@code approval}, {@code failure}, {@code none}, {@code offline_pin}, {@code + * offline_pin_and_signature}, {@code online_pin}, or {@code signature}. + */ + @SerializedName("cardholder_verification_method") + String cardholderVerificationMethod; + + /** + * EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. + */ + @SerializedName("dedicated_file_name") + String dedicatedFileName; + + /** The outcome of a series of EMV functions performed by the card reader. */ + @SerializedName("terminal_verification_results") + String terminalVerificationResults; + + /** An indication of various EMV functions performed during the transaction. */ + @SerializedName("transaction_status_information") + String transactionStatusInformation; + } + + /** + * For more details about Wallet, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Wallet extends StripeObject { + /** + * The type of mobile wallet, one of {@code apple_pay}, {@code google_pay}, {@code + * samsung_pay}, or {@code unknown}. + */ + @SerializedName("type") + String type; + } + } + + /** + * For more details about Cashapp, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Cashapp extends StripeObject { + /** A unique and immutable identifier assigned by Cash App to every buyer. */ + @SerializedName("buyer_id") + String buyerId; + + /** A public identifier for buyers using Cash App. */ + @SerializedName("cashtag") + String cashtag; + } + + /** + * Custom Payment Methods represent Payment Method types not modeled directly in the Stripe API. + * This resource consists of details about the custom payment method used for this payment + * attempt. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Custom extends StripeObject { + /** + * Display name for the custom (user-defined) payment method type used to make this payment. + */ + @SerializedName("display_name") + String displayName; + + /** The custom payment method type associated with this payment. */ + @SerializedName("type") String type; } + + /** + * For more details about CustomerBalance, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class CustomerBalance extends StripeObject {} + + /** + * For more details about Eps, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Eps extends StripeObject { + /** + * The customer's bank. Should be one of {@code arzte_und_apotheker_bank}, {@code + * austrian_anadi_bank_ag}, {@code bank_austria}, {@code bankhaus_carl_spangler}, {@code + * bankhaus_schelhammer_und_schattera_ag}, {@code bawag_psk_ag}, {@code bks_bank_ag}, {@code + * brull_kallmus_bank_ag}, {@code btv_vier_lander_bank}, {@code capital_bank_grawe_gruppe_ag}, + * {@code deutsche_bank_ag}, {@code dolomitenbank}, {@code easybank_ag}, {@code + * erste_bank_und_sparkassen}, {@code hypo_alpeadriabank_international_ag}, {@code + * hypo_noe_lb_fur_niederosterreich_u_wien}, {@code hypo_oberosterreich_salzburg_steiermark}, + * {@code hypo_tirol_bank_ag}, {@code hypo_vorarlberg_bank_ag}, {@code + * hypo_bank_burgenland_aktiengesellschaft}, {@code marchfelder_bank}, {@code oberbank_ag}, + * {@code raiffeisen_bankengruppe_osterreich}, {@code schoellerbank_ag}, {@code + * sparda_bank_wien}, {@code volksbank_gruppe}, {@code volkskreditbank_ag}, or {@code + * vr_bank_braunau}. + */ + @SerializedName("bank") + String bank; + + /** + * Owner's verified full name. Values are verified or provided by EPS directly (if supported) + * at the time of authorization or settlement. They cannot be set or mutated. EPS rarely + * provides this information so the attribute is usually empty. + */ + @SerializedName("verified_name") + String verifiedName; + } + + /** + * For more details about Fpx, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Fpx extends StripeObject { + /** Account holder type, if provided. Can be one of {@code individual} or {@code company}. */ + @SerializedName("account_holder_type") + String accountHolderType; + + /** + * The customer's bank. Can be one of {@code affin_bank}, {@code agrobank}, {@code + * alliance_bank}, {@code ambank}, {@code bank_islam}, {@code bank_muamalat}, {@code + * bank_rakyat}, {@code bsn}, {@code cimb}, {@code hong_leong_bank}, {@code hsbc}, {@code + * kfh}, {@code maybank2u}, {@code ocbc}, {@code public_bank}, {@code rhb}, {@code + * standard_chartered}, {@code uob}, {@code deutsche_bank}, {@code maybank2e}, {@code + * pb_enterprise}, or {@code bank_of_china}. + */ + @SerializedName("bank") + String bank; + + /** Unique transaction id generated by FPX for every request from the merchant. */ + @SerializedName("transaction_id") + String transactionId; + } + + /** + * For more details about Giropay, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Giropay extends StripeObject { + /** Bank code of bank associated with the bank account. */ + @SerializedName("bank_code") + String bankCode; + + /** Name of the bank associated with the bank account. */ + @SerializedName("bank_name") + String bankName; + + /** Bank Identifier Code of the bank associated with the bank account. */ + @SerializedName("bic") + String bic; + + /** + * Owner's verified full name. Values are verified or provided by Giropay directly (if + * supported) at the time of authorization or settlement. They cannot be set or mutated. + * Giropay rarely provides this information so the attribute is usually empty. + */ + @SerializedName("verified_name") + String verifiedName; + } + + /** + * For more details about Gopay, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Gopay extends StripeObject {} + + /** + * For more details about Grabpay, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Grabpay extends StripeObject { + /** Unique transaction id generated by GrabPay. */ + @SerializedName("transaction_id") + String transactionId; + } + + /** + * For more details about IdBankTransfer, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class IdBankTransfer extends StripeObject { + /** Account number of the bank account to transfer funds to. */ + @SerializedName("account_number") + String accountNumber; + + /** + * Bank where the account is located. + * + *

One of {@code bca}, {@code bni}, {@code bri}, {@code cimb}, or {@code permata}. + */ + @SerializedName("bank") + String bank; + + /** Local bank code of the bank. */ + @SerializedName("bank_code") + String bankCode; + + /** Name of the bank associated with the bank account. */ + @SerializedName("bank_name") + String bankName; + + /** + * Merchant name and billing details name, for the customer to check for the correct merchant + * when performing the bank transfer. + */ + @SerializedName("display_name") + String displayName; + } + + /** + * For more details about Ideal, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Ideal extends StripeObject { + /** + * The customer's bank. Can be one of {@code abn_amro}, {@code asn_bank}, {@code bunq}, {@code + * handelsbanken}, {@code ing}, {@code knab}, {@code moneyou}, {@code n26}, {@code nn}, {@code + * rabobank}, {@code regiobank}, {@code revolut}, {@code sns_bank}, {@code triodos_bank}, + * {@code van_lanschot}, or {@code yoursafe}. + */ + @SerializedName("bank") + String bank; + + /** + * The Bank Identifier Code of the customer's bank. + * + *

One of {@code ABNANL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code BUNQNL2A}, {@code + * FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code KNABNL2H}, {@code MOYONL21}, {@code + * NNBANL2G}, {@code NTSBDEB1}, {@code RABONL2U}, {@code RBRBNL21}, {@code REVOIE23}, {@code + * REVOLT21}, {@code SNSBNL2A}, or {@code TRIONL2U}. + */ + @SerializedName("bic") + String bic; + + /** The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ + @SerializedName("generated_sepa_debit") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField generatedSepaDebit; + + /** The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ + @SerializedName("generated_sepa_debit_mandate") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField generatedSepaDebitMandate; + + /** Last four characters of the IBAN. */ + @SerializedName("iban_last4") + String ibanLast4; + + /** + * Owner's verified full name. Values are verified or provided by iDEAL directly (if + * supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + @SerializedName("verified_name") + String verifiedName; + + /** Get ID of expandable {@code generatedSepaDebit} object. */ + public String getGeneratedSepaDebit() { + return (this.generatedSepaDebit != null) ? this.generatedSepaDebit.getId() : null; + } + + public void setGeneratedSepaDebit(String id) { + this.generatedSepaDebit = ApiResource.setExpandableFieldId(id, this.generatedSepaDebit); + } + + /** Get expanded {@code generatedSepaDebit}. */ + public PaymentMethod getGeneratedSepaDebitObject() { + return (this.generatedSepaDebit != null) ? this.generatedSepaDebit.getExpanded() : null; + } + + public void setGeneratedSepaDebitObject(PaymentMethod expandableObject) { + this.generatedSepaDebit = + new ExpandableField(expandableObject.getId(), expandableObject); + } + + /** Get ID of expandable {@code generatedSepaDebitMandate} object. */ + public String getGeneratedSepaDebitMandate() { + return (this.generatedSepaDebitMandate != null) + ? this.generatedSepaDebitMandate.getId() + : null; + } + + public void setGeneratedSepaDebitMandate(String id) { + this.generatedSepaDebitMandate = + ApiResource.setExpandableFieldId(id, this.generatedSepaDebitMandate); + } + + /** Get expanded {@code generatedSepaDebitMandate}. */ + public Mandate getGeneratedSepaDebitMandateObject() { + return (this.generatedSepaDebitMandate != null) + ? this.generatedSepaDebitMandate.getExpanded() + : null; + } + + public void setGeneratedSepaDebitMandateObject(Mandate expandableObject) { + this.generatedSepaDebitMandate = + new ExpandableField(expandableObject.getId(), expandableObject); + } + } + + /** + * For more details about InteracPresent, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class InteracPresent extends StripeObject { + /** Card brand. Can be {@code interac}, {@code mastercard} or {@code visa}. */ + @SerializedName("brand") + String brand; + + /** + * The cardholder name as read from the card, in ISO 7813 format. May include + * alphanumeric characters, special characters and first/last name separator ({@code /}). In + * some cases, the cardholder name may not be available depending on how the issuer has + * configured the card. Cardholder name is typically not available on swipe or contactless + * payments, such as those made with Apple Pay and Google Pay. + */ + @SerializedName("cardholder_name") + String cardholderName; + + /** + * Two-letter ISO code representing the country of the card. You could use this attribute to + * get a sense of the international breakdown of cards you've collected. + */ + @SerializedName("country") + String country; + + /** + * A high-level description of the type of cards issued in this range. (For internal use only + * and not typically available in standard API requests.) + */ + @SerializedName("description") + String description; + + /** Authorization response cryptogram. */ + @SerializedName("emv_auth_data") + String emvAuthData; + + /** Two-digit number representing the card's expiration month. */ + @SerializedName("exp_month") + Long expMonth; + + /** Four-digit number representing the card's expiration year. */ + @SerializedName("exp_year") + Long expYear; + + /** + * Uniquely identifies this particular card number. You can use this attribute to check + * whether two customers who’ve signed up with you are using the same card number, for + * example. For payment methods that tokenize card information (Apple Pay, Google Pay), the + * tokenized number might be provided instead of the underlying card number. + * + *

As of May 1, 2021, card fingerprint in India for Connect changed to allow two + * fingerprints for the same card---one for India and one for the rest of the world. + */ + @SerializedName("fingerprint") + String fingerprint; + + /** + * Card funding type. Can be {@code credit}, {@code debit}, {@code prepaid}, or {@code + * unknown}. + */ + @SerializedName("funding") + String funding; + + /** + * ID of a card PaymentMethod generated from the card_present PaymentMethod that may be + * attached to a Customer for future transactions. Only present if it was possible to generate + * a card PaymentMethod. + */ + @SerializedName("generated_card") + String generatedCard; + + /** + * Issuer identification number of the card. (For internal use only and not typically + * available in standard API requests.) + */ + @SerializedName("iin") + String iin; + + /** + * The name of the card's issuing bank. (For internal use only and not typically available in + * standard API requests.) + */ + @SerializedName("issuer") + String issuer; + + /** The last four digits of the card. */ + @SerializedName("last4") + String last4; + + /** + * Identifies which network this charge was processed on. Can be {@code amex}, {@code + * cartes_bancaires}, {@code diners}, {@code discover}, {@code eftpos_au}, {@code interac}, + * {@code jcb}, {@code link}, {@code mastercard}, {@code unionpay}, {@code visa}, or {@code + * unknown}. + */ + @SerializedName("network") + String network; + + /** + * This is used by the financial networks to identify a transaction. Visa calls this the + * Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the + * Acquirer Reference Data. This value will be present if it is returned by the financial + * network in the authorization response, and null otherwise. + */ + @SerializedName("network_transaction_id") + String networkTransactionId; + + /** EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. */ + @SerializedName("preferred_locales") + List preferredLocales; + + /** + * How card details were read in this transaction. + * + *

One of {@code contact_emv}, {@code contactless_emv}, {@code contactless_magstripe_mode}, + * {@code magnetic_stripe_fallback}, or {@code magnetic_stripe_track2}. + */ + @SerializedName("read_method") + String readMethod; + + /** + * A collection of fields required to be displayed on receipts. Only required for EMV + * transactions. + */ + @SerializedName("receipt") + Receipt receipt; + + /** + * For more details about Receipt, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Receipt extends StripeObject { + /** + * The type of account being debited or credited + * + *

One of {@code checking}, {@code savings}, or {@code unknown}. + */ + @SerializedName("account_type") + String accountType; + + /** EMV tag 9F26, cryptogram generated by the integrated circuit chip. */ + @SerializedName("application_cryptogram") + String applicationCryptogram; + + /** Mnenomic of the Application Identifier. */ + @SerializedName("application_preferred_name") + String applicationPreferredName; + + /** Identifier for this transaction. */ + @SerializedName("authorization_code") + String authorizationCode; + + /** EMV tag 8A. A code returned by the card issuer. */ + @SerializedName("authorization_response_code") + String authorizationResponseCode; + + /** + * Describes the method used by the cardholder to verify ownership of the card. One of the + * following: {@code approval}, {@code failure}, {@code none}, {@code offline_pin}, {@code + * offline_pin_and_signature}, {@code online_pin}, or {@code signature}. + */ + @SerializedName("cardholder_verification_method") + String cardholderVerificationMethod; + + /** + * EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. + */ + @SerializedName("dedicated_file_name") + String dedicatedFileName; + + /** The outcome of a series of EMV functions performed by the card reader. */ + @SerializedName("terminal_verification_results") + String terminalVerificationResults; + + /** An indication of various EMV functions performed during the transaction. */ + @SerializedName("transaction_status_information") + String transactionStatusInformation; + } + } + + /** + * For more details about KakaoPay, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class KakaoPay extends StripeObject { + /** A unique identifier for the buyer as determined by the local payment processor. */ + @SerializedName("buyer_id") + String buyerId; + } + + /** + * For more details about Klarna, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Klarna extends StripeObject { + /** The payer details for this transaction. */ + @SerializedName("payer_details") + PayerDetails payerDetails; + + /** + * The Klarna payment method used for this transaction. Can be one of {@code pay_later}, + * {@code pay_now}, {@code pay_with_financing}, or {@code pay_in_installments} + */ + @SerializedName("payment_method_category") + String paymentMethodCategory; + + /** + * Preferred language of the Klarna authorization page that the customer is redirected to. Can + * be one of {@code de-AT}, {@code en-AT}, {@code nl-BE}, {@code fr-BE}, {@code en-BE}, {@code + * de-DE}, {@code en-DE}, {@code da-DK}, {@code en-DK}, {@code es-ES}, {@code en-ES}, {@code + * fi-FI}, {@code sv-FI}, {@code en-FI}, {@code en-GB}, {@code en-IE}, {@code it-IT}, {@code + * en-IT}, {@code nl-NL}, {@code en-NL}, {@code nb-NO}, {@code en-NO}, {@code sv-SE}, {@code + * en-SE}, {@code en-US}, {@code es-US}, {@code fr-FR}, {@code en-FR}, {@code cs-CZ}, {@code + * en-CZ}, {@code ro-RO}, {@code en-RO}, {@code el-GR}, {@code en-GR}, {@code en-AU}, {@code + * en-NZ}, {@code en-CA}, {@code fr-CA}, {@code pl-PL}, {@code en-PL}, {@code pt-PT}, {@code + * en-PT}, {@code de-CH}, {@code fr-CH}, {@code it-CH}, or {@code en-CH} + */ + @SerializedName("preferred_locale") + String preferredLocale; + + /** + * For more details about PayerDetails, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class PayerDetails extends StripeObject { + /** The payer's address. */ + @SerializedName("address") + com.stripe.model.PaymentRecord.PaymentMethodDetails.Klarna.PayerDetails.Address address; + + /** + * For more details about Address, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Address extends StripeObject { + /** The payer address country. */ + @SerializedName("country") + String country; + } + } + } + + /** + * For more details about Konbini, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Konbini extends StripeObject { + /** + * If the payment succeeded, this contains the details of the convenience store where the + * payment was completed. + */ + @SerializedName("store") + Store store; + + /** + * For more details about Store, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Store extends StripeObject { + /** + * The name of the convenience store chain where the payment was completed. + * + *

One of {@code familymart}, {@code lawson}, {@code ministop}, or {@code seicomart}. + */ + @SerializedName("chain") + String chain; + } + } + + /** + * For more details about KrCard, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class KrCard extends StripeObject { + /** + * The local credit or debit card brand. + * + *

One of {@code bc}, {@code citi}, {@code hana}, {@code hyundai}, {@code jeju}, {@code + * jeonbuk}, {@code kakaobank}, {@code kbank}, {@code kdbbank}, {@code kookmin}, {@code + * kwangju}, {@code lotte}, {@code mg}, {@code nh}, {@code post}, {@code samsung}, {@code + * savingsbank}, {@code shinhan}, {@code shinhyup}, {@code suhyup}, {@code tossbank}, or + * {@code woori}. + */ + @SerializedName("brand") + String brand; + + /** A unique identifier for the buyer as determined by the local payment processor. */ + @SerializedName("buyer_id") + String buyerId; + + /** The last four digits of the card. This may not be present for American Express cards. */ + @SerializedName("last4") + String last4; + } + + /** + * For more details about Link, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Link extends StripeObject { + /** + * Two-letter ISO code representing the funding source country beneath the Link payment. You + * could use this attribute to get a sense of international fees. + */ + @SerializedName("country") + String country; + } + + /** + * For more details about MbWay, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class MbWay extends StripeObject {} + + /** + * For more details about Mobilepay, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Mobilepay extends StripeObject { + /** Internal card details. */ + @SerializedName("card") + Card card; + + /** + * For more details about Card, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Card extends StripeObject { + /** Brand of the card used in the transaction. */ + @SerializedName("brand") + String brand; + + /** Two-letter ISO code representing the country of the card. */ + @SerializedName("country") + String country; + + /** Two digit number representing the card's expiration month. */ + @SerializedName("exp_month") + Long expMonth; + + /** Two digit number representing the card's expiration year. */ + @SerializedName("exp_year") + Long expYear; + + /** The last 4 digits of the card. */ + @SerializedName("last4") + String last4; + } + } + + /** + * For more details about Multibanco, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Multibanco extends StripeObject { + /** Entity number associated with this Multibanco payment. */ + @SerializedName("entity") + String entity; + + /** Reference number associated with this Multibanco payment. */ + @SerializedName("reference") + String reference; + } + + /** + * For more details about NaverPay, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class NaverPay extends StripeObject { + /** A unique identifier for the buyer as determined by the local payment processor. */ + @SerializedName("buyer_id") + String buyerId; + } + + /** + * For more details about Oxxo, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Oxxo extends StripeObject { + /** OXXO reference number. */ + @SerializedName("number") + String number; + } + + /** + * For more details about P24, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class P24 extends StripeObject { + /** + * The customer's bank. Can be one of {@code ing}, {@code citi_handlowy}, {@code + * tmobile_usbugi_bankowe}, {@code plus_bank}, {@code etransfer_pocztowy24}, {@code + * banki_spbdzielcze}, {@code bank_nowy_bfg_sa}, {@code getin_bank}, {@code velobank}, {@code + * blik}, {@code noble_pay}, {@code ideabank}, {@code envelobank}, {@code + * santander_przelew24}, {@code nest_przelew}, {@code mbank_mtransfer}, {@code inteligo}, + * {@code pbac_z_ipko}, {@code bnp_paribas}, {@code credit_agricole}, {@code toyota_bank}, + * {@code bank_pekao_sa}, {@code volkswagen_bank}, {@code bank_millennium}, {@code + * alior_bank}, or {@code boz}. + */ + @SerializedName("bank") + String bank; + + /** Unique reference for this Przelewy24 payment. */ + @SerializedName("reference") + String reference; + + /** + * Owner's verified full name. Values are verified or provided by Przelewy24 directly (if + * supported) at the time of authorization or settlement. They cannot be set or mutated. + * Przelewy24 rarely provides this information so the attribute is usually empty. + */ + @SerializedName("verified_name") + 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. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Payco extends StripeObject { + /** A unique identifier for the buyer as determined by the local payment processor. */ + @SerializedName("buyer_id") + String buyerId; + } + + /** + * For more details about Paynow, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Paynow extends StripeObject { + /** Reference number associated with this PayNow payment. */ + @SerializedName("reference") + String reference; + } + + /** + * For more details about Paypal, please refer to the API + * Reference. + */ + @Getter + @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. + */ + @SerializedName("payer_email") + String payerEmail; + + /** PayPal account PayerID. This identifier uniquely identifies the PayPal customer. */ + @SerializedName("payer_id") + String payerId; + + /** + * Owner's full name. Values provided by PayPal directly (if supported) at the time of + * authorization or settlement. They cannot be set or mutated. + */ + @SerializedName("payer_name") + String payerName; + + /** + * The level of protection offered as defined by PayPal Seller Protection for Merchants, for + * this transaction. + */ + @SerializedName("seller_protection") + SellerProtection sellerProtection; + + /** + * The shipping address for the customer, as supplied by the merchant at the point of payment + * execution. This shipping address will not be updated if the merchant updates the shipping + * address on the PaymentIntent after the PaymentIntent was successfully confirmed. + */ + @SerializedName("shipping") + com.stripe.model.Address shipping; + + /** A unique ID generated by PayPal for this transaction. */ + @SerializedName("transaction_id") + String transactionId; + + /** + * The shipping address for the customer, as supplied by the merchant at the point of payment + * execution. This shipping address will not be updated if the merchant updates the shipping + * address on the PaymentIntent after the PaymentIntent was successfully confirmed. + */ + @SerializedName("verified_address") + com.stripe.model.Address verifiedAddress; + + /** + * Owner's verified email. Values are verified or provided by PayPal directly (if supported) + * at the time of authorization or settlement. They cannot be set or mutated. + */ + @SerializedName("verified_email") + String verifiedEmail; + + /** + * Owner's verified full name. Values are verified or provided by PayPal directly (if + * supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + @SerializedName("verified_name") + String verifiedName; + + /** + * For more details about SellerProtection, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class SellerProtection extends StripeObject { + /** An array of conditions that are covered for the transaction, if applicable. */ + @SerializedName("dispute_categories") + List disputeCategories; + + /** + * Indicates whether the transaction is eligible for PayPal's seller protection. + * + *

One of {@code eligible}, {@code not_eligible}, or {@code partially_eligible}. + */ + @SerializedName("status") + String status; + } + } + + /** + * For more details about Payto, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Payto extends StripeObject { + /** Bank-State-Branch number of the bank account. */ + @SerializedName("bsb_number") + String bsbNumber; + + /** Last four digits of the bank account number. */ + @SerializedName("last4") + String last4; + + /** ID of the mandate used to make this payment. */ + @SerializedName("mandate") + String mandate; + + /** The PayID alias for the bank account. */ + @SerializedName("pay_id") + String payId; + } + + /** + * For more details about Pix, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Pix extends StripeObject { + /** Unique transaction id generated by BCB. */ + @SerializedName("bank_transaction_id") + String bankTransactionId; + } + + /** + * For more details about Promptpay, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Promptpay extends StripeObject { + /** Bill reference generated by PromptPay. */ + @SerializedName("reference") + String reference; + } + + /** + * For more details about Qris, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Qris extends StripeObject {} + + /** + * For more details about Rechnung, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Rechnung extends StripeObject {} + + /** + * For more details about RevolutPay, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class RevolutPay extends StripeObject { + @SerializedName("funding") + Funding funding; + + /** + * For more details about Funding, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Funding extends StripeObject { + @SerializedName("card") + Card card; + + /** + * funding type of the underlying payment method. + * + *

Equal to {@code card}. + */ + @SerializedName("type") + String type; + + /** + * For more details about Card, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Card extends StripeObject { + /** + * Card brand. Can be {@code amex}, {@code diners}, {@code discover}, {@code eftpos_au}, + * {@code jcb}, {@code link}, {@code mastercard}, {@code unionpay}, {@code visa}, or + * {@code unknown}. + */ + @SerializedName("brand") + String brand; + + /** + * The product code that + * identifies the specific program or product associated with a card. (For internal use + * only and not typically available in standard API requests.) + */ + @SerializedName("brand_product") + String brandProduct; + + /** + * Two-letter ISO code representing the country of the card. You could use this attribute + * to get a sense of the international breakdown of cards you've collected. + */ + @SerializedName("country") + String country; + + /** Two-digit number representing the card's expiration month. */ + @SerializedName("exp_month") + Long expMonth; + + /** Four-digit number representing the card's expiration year. */ + @SerializedName("exp_year") + Long expYear; + + /** + * Card funding type. Can be {@code credit}, {@code debit}, {@code prepaid}, or {@code + * unknown}. + */ + @SerializedName("funding") + String funding; + + /** The last four digits of the card. */ + @SerializedName("last4") + String last4; + } + } + } + + /** + * For more details about SamsungPay, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class SamsungPay extends StripeObject { + /** A unique identifier for the buyer as determined by the local payment processor. */ + @SerializedName("buyer_id") + String buyerId; + } + + /** + * For more details about SepaCreditTransfer, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class SepaCreditTransfer extends StripeObject { + /** Name of the bank associated with the bank account. */ + @SerializedName("bank_name") + String bankName; + + /** Bank Identifier Code of the bank associated with the bank account. */ + @SerializedName("bic") + String bic; + + /** IBAN of the bank account to transfer funds to. */ + @SerializedName("iban") + String iban; + } + + /** + * For more details about SepaDebit, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class SepaDebit extends StripeObject { + /** Bank code of bank associated with the bank account. */ + @SerializedName("bank_code") + String bankCode; + + /** Branch code of bank associated with the bank account. */ + @SerializedName("branch_code") + String branchCode; + + /** Two-letter ISO code representing the country the bank account is located in. */ + @SerializedName("country") + String country; + + /** + * Uniquely identifies this particular bank account. You can use this attribute to check + * whether two bank accounts are the same. + */ + @SerializedName("fingerprint") + String fingerprint; + + /** Last four characters of the IBAN. */ + @SerializedName("last4") + String last4; + + /** + * Find the ID of the mandate used for this payment under the payment_method_details.sepa_debit.mandate + * property on the Charge. Use this mandate ID to retrieve the Mandate. + */ + @SerializedName("mandate") + String mandate; + } + + /** + * For more details about Shopeepay, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Shopeepay extends StripeObject {} + + /** + * For more details about Sofort, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Sofort extends StripeObject { + /** Bank code of bank associated with the bank account. */ + @SerializedName("bank_code") + String bankCode; + + /** Name of the bank associated with the bank account. */ + @SerializedName("bank_name") + String bankName; + + /** Bank Identifier Code of the bank associated with the bank account. */ + @SerializedName("bic") + String bic; + + /** Two-letter ISO code representing the country the bank account is located in. */ + @SerializedName("country") + String country; + + /** The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ + @SerializedName("generated_sepa_debit") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField generatedSepaDebit; + + /** The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ + @SerializedName("generated_sepa_debit_mandate") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField generatedSepaDebitMandate; + + /** Last four characters of the IBAN. */ + @SerializedName("iban_last4") + String ibanLast4; + + /** + * Preferred language of the SOFORT authorization page that the customer is redirected to. Can + * be one of {@code de}, {@code en}, {@code es}, {@code fr}, {@code it}, {@code nl}, or {@code + * pl} + */ + @SerializedName("preferred_language") + String preferredLanguage; + + /** + * Owner's verified full name. Values are verified or provided by SOFORT directly (if + * supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + @SerializedName("verified_name") + String verifiedName; + + /** Get ID of expandable {@code generatedSepaDebit} object. */ + public String getGeneratedSepaDebit() { + return (this.generatedSepaDebit != null) ? this.generatedSepaDebit.getId() : null; + } + + public void setGeneratedSepaDebit(String id) { + this.generatedSepaDebit = ApiResource.setExpandableFieldId(id, this.generatedSepaDebit); + } + + /** Get expanded {@code generatedSepaDebit}. */ + public PaymentMethod getGeneratedSepaDebitObject() { + return (this.generatedSepaDebit != null) ? this.generatedSepaDebit.getExpanded() : null; + } + + public void setGeneratedSepaDebitObject(PaymentMethod expandableObject) { + this.generatedSepaDebit = + new ExpandableField(expandableObject.getId(), expandableObject); + } + + /** Get ID of expandable {@code generatedSepaDebitMandate} object. */ + public String getGeneratedSepaDebitMandate() { + return (this.generatedSepaDebitMandate != null) + ? this.generatedSepaDebitMandate.getId() + : null; + } + + public void setGeneratedSepaDebitMandate(String id) { + this.generatedSepaDebitMandate = + ApiResource.setExpandableFieldId(id, this.generatedSepaDebitMandate); + } + + /** Get expanded {@code generatedSepaDebitMandate}. */ + public Mandate getGeneratedSepaDebitMandateObject() { + return (this.generatedSepaDebitMandate != null) + ? this.generatedSepaDebitMandate.getExpanded() + : null; + } + + public void setGeneratedSepaDebitMandateObject(Mandate expandableObject) { + this.generatedSepaDebitMandate = + new ExpandableField(expandableObject.getId(), expandableObject); + } + } + + /** + * For more details about StripeAccount, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StripeAccount extends StripeObject {} + + /** + * For more details about Swish, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Swish extends StripeObject { + /** + * Uniquely identifies the payer's Swish account. You can use this attribute to check whether + * two Swish transactions were paid for by the same payer + */ + @SerializedName("fingerprint") + String fingerprint; + + /** Payer bank reference number for the payment. */ + @SerializedName("payment_reference") + String paymentReference; + + /** The last four digits of the Swish account phone number. */ + @SerializedName("verified_phone_last4") + String verifiedPhoneLast4; + } + + /** + * For more details about Twint, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Twint extends StripeObject {} + + /** + * For more details about UsBankAccount, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class UsBankAccount extends StripeObject { + /** + * Account holder type: individual or company. + * + *

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

One of {@code checking}, or {@code savings}. + */ + @SerializedName("account_type") + String accountType; + + /** Name of the bank associated with the bank account. */ + @SerializedName("bank_name") + String bankName; + + /** + * Uniquely identifies this particular bank account. You can use this attribute to check + * whether two bank accounts are the same. + */ + @SerializedName("fingerprint") + String fingerprint; + + /** Last four digits of the bank account number. */ + @SerializedName("last4") + String last4; + + /** ID of the mandate used to make this payment. */ + @SerializedName("mandate") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField mandate; + + /** Reference number to locate ACH payments with customer's bank. */ + @SerializedName("payment_reference") + String paymentReference; + + /** Routing number of the bank account. */ + @SerializedName("routing_number") + String routingNumber; + + /** Get ID of expandable {@code mandate} object. */ + public String getMandate() { + return (this.mandate != null) ? this.mandate.getId() : null; + } + + public void setMandate(String id) { + this.mandate = ApiResource.setExpandableFieldId(id, this.mandate); + } + + /** Get expanded {@code mandate}. */ + public Mandate getMandateObject() { + return (this.mandate != null) ? this.mandate.getExpanded() : null; + } + + public void setMandateObject(Mandate expandableObject) { + this.mandate = new ExpandableField(expandableObject.getId(), expandableObject); + } + } + + /** + * For more details about Wechat, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Wechat extends StripeObject {} + + /** + * For more details about WechatPay, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class WechatPay extends StripeObject { + /** + * Uniquely identifies this particular WeChat Pay account. You can use this attribute to check + * whether two WeChat accounts are the same. + */ + @SerializedName("fingerprint") + String fingerprint; + + /** Transaction ID of this particular WeChat Pay transaction. */ + @SerializedName("transaction_id") + String transactionId; + } + + /** + * For more details about Zip, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Zip extends StripeObject {} } /** The customer's shipping information associated with this payment. */ @@ -758,7 +2988,7 @@ public static class Custom extends StripeObject { public static class ShippingDetails extends StripeObject { /** A representation of a physical address. */ @SerializedName("address") - Address address; + com.stripe.model.PaymentRecord.ShippingDetails.Address address; /** The shipping recipient's name. */ @SerializedName("name") diff --git a/src/main/java/com/stripe/model/issuing/Settlement.java b/src/main/java/com/stripe/model/issuing/Settlement.java index c68a27a4187..2c7495cddc4 100644 --- a/src/main/java/com/stripe/model/issuing/Settlement.java +++ b/src/main/java/com/stripe/model/issuing/Settlement.java @@ -85,6 +85,14 @@ public class Settlement extends StripeObject implements HasId { @SerializedName("object") String object; + /** The total amount of any additional ad-hoc fees accessed by the card network. */ + @SerializedName("other_fees_amount") + Long otherFeesAmount; + + /** The total number of additional ad-hoc fees accessed by the card network. */ + @SerializedName("other_fees_count") + Long otherFeesCount; + /** One of {@code international} or {@code uk_national_net}. */ @SerializedName("settlement_service") String settlementService; diff --git a/src/main/java/com/stripe/model/terminal/Configuration.java b/src/main/java/com/stripe/model/terminal/Configuration.java index d390315727d..2fa27e2b7b5 100644 --- a/src/main/java/com/stripe/model/terminal/Configuration.java +++ b/src/main/java/com/stripe/model/terminal/Configuration.java @@ -78,6 +78,9 @@ public class Configuration extends ApiResource implements HasId { @SerializedName("verifone_p400") VerifoneP400 verifoneP400; + @SerializedName("wifi") + Wifi wifi; + /** Creates a new {@code Configuration} object. */ public static Configuration create(Map params) throws StripeException { return create(params, (RequestOptions) null); @@ -823,6 +826,104 @@ public void setSplashscreenObject(File expandableObject) { } } + /** + * For more details about Wifi, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Wifi extends StripeObject { + @SerializedName("enterprise_eap_peap") + EnterpriseEapPeap enterpriseEapPeap; + + @SerializedName("enterprise_eap_tls") + EnterpriseEapTls enterpriseEapTls; + + @SerializedName("personal_psk") + PersonalPsk personalPsk; + + /** + * Security type of the WiFi network. The hash with the corresponding name contains the + * credentials for this security type. + * + *

One of {@code enterprise_eap_peap}, {@code enterprise_eap_tls}, or {@code personal_psk}. + */ + @SerializedName("type") + String type; + + /** + * For more details about EnterpriseEapPeap, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class EnterpriseEapPeap extends StripeObject { + /** A File ID representing a PEM file containing the server certificate. */ + @SerializedName("ca_certificate_file") + String caCertificateFile; + + /** Password for connecting to the WiFi network. */ + @SerializedName("password") + String password; + + /** Name of the WiFi network. */ + @SerializedName("ssid") + String ssid; + + /** Username for connecting to the WiFi network. */ + @SerializedName("username") + String username; + } + + /** + * For more details about EnterpriseEapTls, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class EnterpriseEapTls extends StripeObject { + /** A File ID representing a PEM file containing the server certificate. */ + @SerializedName("ca_certificate_file") + String caCertificateFile; + + /** A File ID representing a PEM file containing the client certificate. */ + @SerializedName("client_certificate_file") + String clientCertificateFile; + + /** A File ID representing a PEM file containing the client RSA private key. */ + @SerializedName("private_key_file") + String privateKeyFile; + + /** Password for the private key file. */ + @SerializedName("private_key_file_password") + String privateKeyFilePassword; + + /** Name of the WiFi network. */ + @SerializedName("ssid") + String ssid; + } + + /** + * For more details about PersonalPsk, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class PersonalPsk extends StripeObject { + /** Password for connecting to the WiFi network. */ + @SerializedName("password") + String password; + + /** Name of the WiFi network. */ + @SerializedName("ssid") + String ssid; + } + } + @Override public void setResponseGetter(StripeResponseGetter responseGetter) { super.setResponseGetter(responseGetter); @@ -832,5 +933,6 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { trySetResponseGetter(stripeS700, responseGetter); trySetResponseGetter(tipping, responseGetter); trySetResponseGetter(verifoneP400, responseGetter); + trySetResponseGetter(wifi, responseGetter); } } diff --git a/src/main/java/com/stripe/model/terminal/Reader.java b/src/main/java/com/stripe/model/terminal/Reader.java index d56dcec8367..f043f458f2a 100644 --- a/src/main/java/com/stripe/model/terminal/Reader.java +++ b/src/main/java/com/stripe/model/terminal/Reader.java @@ -1455,34 +1455,22 @@ public Reader presentPaymentMethod( return resource.getResponseGetter().request(request, Reader.class); } - /** - * Succeeds an input collection on a simulated reader. Can be used to simulate collecting - * inputs. - */ + /** Use this endpoint to trigger a successful input collection on a simulated reader. */ public Reader succeedInputCollection() throws StripeException { return succeedInputCollection((Map) null, (RequestOptions) null); } - /** - * Succeeds an input collection on a simulated reader. Can be used to simulate collecting - * inputs. - */ + /** Use this endpoint to trigger a successful input collection on a simulated reader. */ public Reader succeedInputCollection(RequestOptions options) throws StripeException { return succeedInputCollection((Map) null, options); } - /** - * Succeeds an input collection on a simulated reader. Can be used to simulate collecting - * inputs. - */ + /** Use this endpoint to trigger a successful input collection on a simulated reader. */ public Reader succeedInputCollection(Map params) throws StripeException { return succeedInputCollection(params, (RequestOptions) null); } - /** - * Succeeds an input collection on a simulated reader. Can be used to simulate collecting - * inputs. - */ + /** Use this endpoint to trigger a successful input collection on a simulated reader. */ public Reader succeedInputCollection(Map params, RequestOptions options) throws StripeException { String path = @@ -1494,19 +1482,13 @@ public Reader succeedInputCollection(Map params, RequestOptions return resource.getResponseGetter().request(request, Reader.class); } - /** - * Succeeds an input collection on a simulated reader. Can be used to simulate collecting - * inputs. - */ + /** Use this endpoint to trigger a successful input collection on a simulated reader. */ public Reader succeedInputCollection(ReaderSucceedInputCollectionParams params) throws StripeException { return succeedInputCollection(params, (RequestOptions) null); } - /** - * Succeeds an input collection on a simulated reader. Can be used to simulate collecting - * inputs. - */ + /** Use this endpoint to trigger a successful input collection on a simulated reader. */ public Reader succeedInputCollection( ReaderSucceedInputCollectionParams params, RequestOptions options) throws StripeException { String path = @@ -1524,22 +1506,30 @@ public Reader succeedInputCollection( return resource.getResponseGetter().request(request, Reader.class); } - /** Completes an input collection with a timeout error on a simulated reader. */ + /** + * Use this endpoint to complete an input collection with a timeout error on a simulated reader. + */ public Reader timeoutInputCollection() throws StripeException { return timeoutInputCollection((Map) null, (RequestOptions) null); } - /** Completes an input collection with a timeout error on a simulated reader. */ + /** + * Use this endpoint to complete an input collection with a timeout error on a simulated reader. + */ public Reader timeoutInputCollection(RequestOptions options) throws StripeException { return timeoutInputCollection((Map) null, options); } - /** Completes an input collection with a timeout error on a simulated reader. */ + /** + * Use this endpoint to complete an input collection with a timeout error on a simulated reader. + */ public Reader timeoutInputCollection(Map params) throws StripeException { return timeoutInputCollection(params, (RequestOptions) null); } - /** Completes an input collection with a timeout error on a simulated reader. */ + /** + * Use this endpoint to complete an input collection with a timeout error on a simulated reader. + */ public Reader timeoutInputCollection(Map params, RequestOptions options) throws StripeException { String path = @@ -1551,13 +1541,17 @@ public Reader timeoutInputCollection(Map params, RequestOptions return resource.getResponseGetter().request(request, Reader.class); } - /** Completes an input collection with a timeout error on a simulated reader. */ + /** + * Use this endpoint to complete an input collection with a timeout error on a simulated reader. + */ public Reader timeoutInputCollection(ReaderTimeoutInputCollectionParams params) throws StripeException { return timeoutInputCollection(params, (RequestOptions) null); } - /** Completes an input collection with a timeout error on a simulated reader. */ + /** + * Use this endpoint to complete an input collection with a timeout error on a simulated reader. + */ public Reader timeoutInputCollection( ReaderTimeoutInputCollectionParams params, RequestOptions options) throws StripeException { String path = diff --git a/src/main/java/com/stripe/param/terminal/ConfigurationCreateParams.java b/src/main/java/com/stripe/param/terminal/ConfigurationCreateParams.java index 01d0a43d259..697e5622762 100644 --- a/src/main/java/com/stripe/param/terminal/ConfigurationCreateParams.java +++ b/src/main/java/com/stripe/param/terminal/ConfigurationCreateParams.java @@ -53,6 +53,10 @@ public class ConfigurationCreateParams extends ApiRequestParams { @SerializedName("verifone_p400") VerifoneP400 verifoneP400; + /** Configurations for connecting to a WiFi network. */ + @SerializedName("wifi") + Object wifi; + private ConfigurationCreateParams( BbposWiseposE bbposWiseposE, List expand, @@ -62,7 +66,8 @@ private ConfigurationCreateParams( RebootWindow rebootWindow, StripeS700 stripeS700, Object tipping, - VerifoneP400 verifoneP400) { + VerifoneP400 verifoneP400, + Object wifi) { this.bbposWiseposE = bbposWiseposE; this.expand = expand; this.extraParams = extraParams; @@ -72,6 +77,7 @@ private ConfigurationCreateParams( this.stripeS700 = stripeS700; this.tipping = tipping; this.verifoneP400 = verifoneP400; + this.wifi = wifi; } public static Builder builder() { @@ -97,6 +103,8 @@ public static class Builder { private VerifoneP400 verifoneP400; + private Object wifi; + /** Finalize and obtain parameter instance from this builder. */ public ConfigurationCreateParams build() { return new ConfigurationCreateParams( @@ -108,7 +116,8 @@ public ConfigurationCreateParams build() { this.rebootWindow, this.stripeS700, this.tipping, - this.verifoneP400); + this.verifoneP400, + this.wifi); } /** An object containing device type specific settings for BBPOS WisePOS E readers. */ @@ -216,6 +225,18 @@ public Builder setVerifoneP400(ConfigurationCreateParams.VerifoneP400 verifoneP4 this.verifoneP400 = verifoneP400; return this; } + + /** Configurations for connecting to a WiFi network. */ + public Builder setWifi(ConfigurationCreateParams.Wifi wifi) { + this.wifi = wifi; + return this; + } + + /** Configurations for connecting to a WiFi network. */ + public Builder setWifi(EmptyParam wifi) { + this.wifi = wifi; + return this; + } } @Getter @@ -3257,4 +3278,492 @@ public Builder setSplashscreen(EmptyParam splashscreen) { } } } + + @Getter + public static class Wifi { + /** Credentials for a WPA-Enterprise WiFi network using the EAP-PEAP authentication method. */ + @SerializedName("enterprise_eap_peap") + EnterpriseEapPeap enterpriseEapPeap; + + /** Credentials for a WPA-Enterprise WiFi network using the EAP-TLS authentication method. */ + @SerializedName("enterprise_eap_tls") + EnterpriseEapTls enterpriseEapTls; + + /** + * 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; + + /** Credentials for a WPA-Personal WiFi network. */ + @SerializedName("personal_psk") + PersonalPsk personalPsk; + + /** + * Required. Security type of the WiFi network. Fill out the hash with the + * corresponding name to provide the set of credentials for this security type. + */ + @SerializedName("type") + Type type; + + private Wifi( + EnterpriseEapPeap enterpriseEapPeap, + EnterpriseEapTls enterpriseEapTls, + Map extraParams, + PersonalPsk personalPsk, + Type type) { + this.enterpriseEapPeap = enterpriseEapPeap; + this.enterpriseEapTls = enterpriseEapTls; + this.extraParams = extraParams; + this.personalPsk = personalPsk; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private EnterpriseEapPeap enterpriseEapPeap; + + private EnterpriseEapTls enterpriseEapTls; + + private Map extraParams; + + private PersonalPsk personalPsk; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public ConfigurationCreateParams.Wifi build() { + return new ConfigurationCreateParams.Wifi( + this.enterpriseEapPeap, + this.enterpriseEapTls, + this.extraParams, + this.personalPsk, + this.type); + } + + /** Credentials for a WPA-Enterprise WiFi network using the EAP-PEAP authentication method. */ + public Builder setEnterpriseEapPeap( + ConfigurationCreateParams.Wifi.EnterpriseEapPeap enterpriseEapPeap) { + this.enterpriseEapPeap = enterpriseEapPeap; + return this; + } + + /** Credentials for a WPA-Enterprise WiFi network using the EAP-TLS authentication method. */ + public Builder setEnterpriseEapTls( + ConfigurationCreateParams.Wifi.EnterpriseEapTls enterpriseEapTls) { + this.enterpriseEapTls = enterpriseEapTls; + 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 + * ConfigurationCreateParams.Wifi#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.Wifi#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Credentials for a WPA-Personal WiFi network. */ + public Builder setPersonalPsk(ConfigurationCreateParams.Wifi.PersonalPsk personalPsk) { + this.personalPsk = personalPsk; + return this; + } + + /** + * Required. Security type of the WiFi network. Fill out the hash with the + * corresponding name to provide the set of credentials for this security type. + */ + public Builder setType(ConfigurationCreateParams.Wifi.Type type) { + this.type = type; + return this; + } + } + + @Getter + public static class EnterpriseEapPeap { + /** A File ID representing a PEM file containing the server certificate. */ + @SerializedName("ca_certificate_file") + String caCertificateFile; + + /** + * 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. Password for connecting to the WiFi network */ + @SerializedName("password") + String password; + + /** Required. Name of the WiFi network */ + @SerializedName("ssid") + String ssid; + + /** Required. Username for connecting to the WiFi network */ + @SerializedName("username") + String username; + + private EnterpriseEapPeap( + String caCertificateFile, + Map extraParams, + String password, + String ssid, + String username) { + this.caCertificateFile = caCertificateFile; + this.extraParams = extraParams; + this.password = password; + this.ssid = ssid; + this.username = username; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String caCertificateFile; + + private Map extraParams; + + private String password; + + private String ssid; + + private String username; + + /** Finalize and obtain parameter instance from this builder. */ + public ConfigurationCreateParams.Wifi.EnterpriseEapPeap build() { + return new ConfigurationCreateParams.Wifi.EnterpriseEapPeap( + this.caCertificateFile, this.extraParams, this.password, this.ssid, this.username); + } + + /** A File ID representing a PEM file containing the server certificate. */ + public Builder setCaCertificateFile(String caCertificateFile) { + this.caCertificateFile = caCertificateFile; + 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 ConfigurationCreateParams.Wifi.EnterpriseEapPeap#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.Wifi.EnterpriseEapPeap#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. Password for connecting to the WiFi network */ + public Builder setPassword(String password) { + this.password = password; + return this; + } + + /** Required. Name of the WiFi network */ + public Builder setSsid(String ssid) { + this.ssid = ssid; + return this; + } + + /** Required. Username for connecting to the WiFi network */ + public Builder setUsername(String username) { + this.username = username; + return this; + } + } + } + + @Getter + public static class EnterpriseEapTls { + /** A File ID representing a PEM file containing the server certificate. */ + @SerializedName("ca_certificate_file") + String caCertificateFile; + + /** + * Required. A File ID representing a PEM file containing the client + * certificate + */ + @SerializedName("client_certificate_file") + String clientCertificateFile; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. A File ID representing a PEM file containing the client RSA + * private key + */ + @SerializedName("private_key_file") + String privateKeyFile; + + /** Password for the private key file. */ + @SerializedName("private_key_file_password") + String privateKeyFilePassword; + + /** Required. Name of the WiFi network */ + @SerializedName("ssid") + String ssid; + + private EnterpriseEapTls( + String caCertificateFile, + String clientCertificateFile, + Map extraParams, + String privateKeyFile, + String privateKeyFilePassword, + String ssid) { + this.caCertificateFile = caCertificateFile; + this.clientCertificateFile = clientCertificateFile; + this.extraParams = extraParams; + this.privateKeyFile = privateKeyFile; + this.privateKeyFilePassword = privateKeyFilePassword; + this.ssid = ssid; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String caCertificateFile; + + private String clientCertificateFile; + + private Map extraParams; + + private String privateKeyFile; + + private String privateKeyFilePassword; + + private String ssid; + + /** Finalize and obtain parameter instance from this builder. */ + public ConfigurationCreateParams.Wifi.EnterpriseEapTls build() { + return new ConfigurationCreateParams.Wifi.EnterpriseEapTls( + this.caCertificateFile, + this.clientCertificateFile, + this.extraParams, + this.privateKeyFile, + this.privateKeyFilePassword, + this.ssid); + } + + /** A File ID representing a PEM file containing the server certificate. */ + public Builder setCaCertificateFile(String caCertificateFile) { + this.caCertificateFile = caCertificateFile; + return this; + } + + /** + * Required. A File ID representing a PEM file containing the client + * certificate + */ + public Builder setClientCertificateFile(String clientCertificateFile) { + this.clientCertificateFile = clientCertificateFile; + 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 ConfigurationCreateParams.Wifi.EnterpriseEapTls#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.Wifi.EnterpriseEapTls#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. A File ID representing a PEM file containing the client RSA + * private key + */ + public Builder setPrivateKeyFile(String privateKeyFile) { + this.privateKeyFile = privateKeyFile; + return this; + } + + /** Password for the private key file. */ + public Builder setPrivateKeyFilePassword(String privateKeyFilePassword) { + this.privateKeyFilePassword = privateKeyFilePassword; + return this; + } + + /** Required. Name of the WiFi network */ + public Builder setSsid(String ssid) { + this.ssid = ssid; + return this; + } + } + } + + @Getter + public static class PersonalPsk { + /** + * 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. Password for connecting to the WiFi network */ + @SerializedName("password") + String password; + + /** Required. Name of the WiFi network */ + @SerializedName("ssid") + String ssid; + + private PersonalPsk(Map extraParams, String password, String ssid) { + this.extraParams = extraParams; + this.password = password; + this.ssid = ssid; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String password; + + private String ssid; + + /** Finalize and obtain parameter instance from this builder. */ + public ConfigurationCreateParams.Wifi.PersonalPsk build() { + return new ConfigurationCreateParams.Wifi.PersonalPsk( + this.extraParams, this.password, this.ssid); + } + + /** + * 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.Wifi.PersonalPsk#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.Wifi.PersonalPsk#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. Password for connecting to the WiFi network */ + public Builder setPassword(String password) { + this.password = password; + return this; + } + + /** Required. Name of the WiFi network */ + public Builder setSsid(String ssid) { + this.ssid = ssid; + return this; + } + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("enterprise_eap_peap") + ENTERPRISE_EAP_PEAP("enterprise_eap_peap"), + + @SerializedName("enterprise_eap_tls") + ENTERPRISE_EAP_TLS("enterprise_eap_tls"), + + @SerializedName("personal_psk") + PERSONAL_PSK("personal_psk"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } } diff --git a/src/main/java/com/stripe/param/terminal/ConfigurationUpdateParams.java b/src/main/java/com/stripe/param/terminal/ConfigurationUpdateParams.java index 5064fad65fc..100decd1ac2 100644 --- a/src/main/java/com/stripe/param/terminal/ConfigurationUpdateParams.java +++ b/src/main/java/com/stripe/param/terminal/ConfigurationUpdateParams.java @@ -53,6 +53,10 @@ public class ConfigurationUpdateParams extends ApiRequestParams { @SerializedName("verifone_p400") Object verifoneP400; + /** Configurations for connecting to a WiFi network. */ + @SerializedName("wifi") + Object wifi; + private ConfigurationUpdateParams( Object bbposWiseposE, List expand, @@ -62,7 +66,8 @@ private ConfigurationUpdateParams( Object rebootWindow, Object stripeS700, Object tipping, - Object verifoneP400) { + Object verifoneP400, + Object wifi) { this.bbposWiseposE = bbposWiseposE; this.expand = expand; this.extraParams = extraParams; @@ -72,6 +77,7 @@ private ConfigurationUpdateParams( this.stripeS700 = stripeS700; this.tipping = tipping; this.verifoneP400 = verifoneP400; + this.wifi = wifi; } public static Builder builder() { @@ -97,6 +103,8 @@ public static class Builder { private Object verifoneP400; + private Object wifi; + /** Finalize and obtain parameter instance from this builder. */ public ConfigurationUpdateParams build() { return new ConfigurationUpdateParams( @@ -108,7 +116,8 @@ public ConfigurationUpdateParams build() { this.rebootWindow, this.stripeS700, this.tipping, - this.verifoneP400); + this.verifoneP400, + this.wifi); } /** An object containing device type specific settings for BBPOS WisePOS E readers. */ @@ -246,6 +255,18 @@ public Builder setVerifoneP400(EmptyParam verifoneP400) { this.verifoneP400 = verifoneP400; return this; } + + /** Configurations for connecting to a WiFi network. */ + public Builder setWifi(ConfigurationUpdateParams.Wifi wifi) { + this.wifi = wifi; + return this; + } + + /** Configurations for connecting to a WiFi network. */ + public Builder setWifi(EmptyParam wifi) { + this.wifi = wifi; + return this; + } } @Getter @@ -3287,4 +3308,564 @@ public Builder setSplashscreen(EmptyParam splashscreen) { } } } + + @Getter + public static class Wifi { + /** Credentials for a WPA-Enterprise WiFi network using the EAP-PEAP authentication method. */ + @SerializedName("enterprise_eap_peap") + EnterpriseEapPeap enterpriseEapPeap; + + /** Credentials for a WPA-Enterprise WiFi network using the EAP-TLS authentication method. */ + @SerializedName("enterprise_eap_tls") + EnterpriseEapTls enterpriseEapTls; + + /** + * 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; + + /** Credentials for a WPA-Personal WiFi network. */ + @SerializedName("personal_psk") + PersonalPsk personalPsk; + + /** + * Required. Security type of the WiFi network. Fill out the hash with the + * corresponding name to provide the set of credentials for this security type. + */ + @SerializedName("type") + Type type; + + private Wifi( + EnterpriseEapPeap enterpriseEapPeap, + EnterpriseEapTls enterpriseEapTls, + Map extraParams, + PersonalPsk personalPsk, + Type type) { + this.enterpriseEapPeap = enterpriseEapPeap; + this.enterpriseEapTls = enterpriseEapTls; + this.extraParams = extraParams; + this.personalPsk = personalPsk; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private EnterpriseEapPeap enterpriseEapPeap; + + private EnterpriseEapTls enterpriseEapTls; + + private Map extraParams; + + private PersonalPsk personalPsk; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public ConfigurationUpdateParams.Wifi build() { + return new ConfigurationUpdateParams.Wifi( + this.enterpriseEapPeap, + this.enterpriseEapTls, + this.extraParams, + this.personalPsk, + this.type); + } + + /** Credentials for a WPA-Enterprise WiFi network using the EAP-PEAP authentication method. */ + public Builder setEnterpriseEapPeap( + ConfigurationUpdateParams.Wifi.EnterpriseEapPeap enterpriseEapPeap) { + this.enterpriseEapPeap = enterpriseEapPeap; + return this; + } + + /** Credentials for a WPA-Enterprise WiFi network using the EAP-TLS authentication method. */ + public Builder setEnterpriseEapTls( + ConfigurationUpdateParams.Wifi.EnterpriseEapTls enterpriseEapTls) { + this.enterpriseEapTls = enterpriseEapTls; + 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 + * ConfigurationUpdateParams.Wifi#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.Wifi#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Credentials for a WPA-Personal WiFi network. */ + public Builder setPersonalPsk(ConfigurationUpdateParams.Wifi.PersonalPsk personalPsk) { + this.personalPsk = personalPsk; + return this; + } + + /** + * Required. Security type of the WiFi network. Fill out the hash with the + * corresponding name to provide the set of credentials for this security type. + */ + public Builder setType(ConfigurationUpdateParams.Wifi.Type type) { + this.type = type; + return this; + } + } + + @Getter + public static class EnterpriseEapPeap { + /** A File ID representing a PEM file containing the server certificate. */ + @SerializedName("ca_certificate_file") + Object caCertificateFile; + + /** + * 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. Password for connecting to the WiFi network */ + @SerializedName("password") + Object password; + + /** Required. Name of the WiFi network */ + @SerializedName("ssid") + Object ssid; + + /** Required. Username for connecting to the WiFi network */ + @SerializedName("username") + Object username; + + private EnterpriseEapPeap( + Object caCertificateFile, + Map extraParams, + Object password, + Object ssid, + Object username) { + this.caCertificateFile = caCertificateFile; + this.extraParams = extraParams; + this.password = password; + this.ssid = ssid; + this.username = username; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object caCertificateFile; + + private Map extraParams; + + private Object password; + + private Object ssid; + + private Object username; + + /** Finalize and obtain parameter instance from this builder. */ + public ConfigurationUpdateParams.Wifi.EnterpriseEapPeap build() { + return new ConfigurationUpdateParams.Wifi.EnterpriseEapPeap( + this.caCertificateFile, this.extraParams, this.password, this.ssid, this.username); + } + + /** A File ID representing a PEM file containing the server certificate. */ + public Builder setCaCertificateFile(String caCertificateFile) { + this.caCertificateFile = caCertificateFile; + return this; + } + + /** A File ID representing a PEM file containing the server certificate. */ + public Builder setCaCertificateFile(EmptyParam caCertificateFile) { + this.caCertificateFile = caCertificateFile; + 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 ConfigurationUpdateParams.Wifi.EnterpriseEapPeap#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.Wifi.EnterpriseEapPeap#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. Password for connecting to the WiFi network */ + public Builder setPassword(String password) { + this.password = password; + return this; + } + + /** Required. Password for connecting to the WiFi network */ + public Builder setPassword(EmptyParam password) { + this.password = password; + return this; + } + + /** Required. Name of the WiFi network */ + public Builder setSsid(String ssid) { + this.ssid = ssid; + return this; + } + + /** Required. Name of the WiFi network */ + public Builder setSsid(EmptyParam ssid) { + this.ssid = ssid; + return this; + } + + /** Required. Username for connecting to the WiFi network */ + public Builder setUsername(String username) { + this.username = username; + return this; + } + + /** Required. Username for connecting to the WiFi network */ + public Builder setUsername(EmptyParam username) { + this.username = username; + return this; + } + } + } + + @Getter + public static class EnterpriseEapTls { + /** A File ID representing a PEM file containing the server certificate. */ + @SerializedName("ca_certificate_file") + Object caCertificateFile; + + /** + * Required. A File ID representing a PEM file containing the client + * certificate + */ + @SerializedName("client_certificate_file") + Object clientCertificateFile; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. A File ID representing a PEM file containing the client RSA + * private key + */ + @SerializedName("private_key_file") + Object privateKeyFile; + + /** Password for the private key file. */ + @SerializedName("private_key_file_password") + Object privateKeyFilePassword; + + /** Required. Name of the WiFi network */ + @SerializedName("ssid") + Object ssid; + + private EnterpriseEapTls( + Object caCertificateFile, + Object clientCertificateFile, + Map extraParams, + Object privateKeyFile, + Object privateKeyFilePassword, + Object ssid) { + this.caCertificateFile = caCertificateFile; + this.clientCertificateFile = clientCertificateFile; + this.extraParams = extraParams; + this.privateKeyFile = privateKeyFile; + this.privateKeyFilePassword = privateKeyFilePassword; + this.ssid = ssid; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object caCertificateFile; + + private Object clientCertificateFile; + + private Map extraParams; + + private Object privateKeyFile; + + private Object privateKeyFilePassword; + + private Object ssid; + + /** Finalize and obtain parameter instance from this builder. */ + public ConfigurationUpdateParams.Wifi.EnterpriseEapTls build() { + return new ConfigurationUpdateParams.Wifi.EnterpriseEapTls( + this.caCertificateFile, + this.clientCertificateFile, + this.extraParams, + this.privateKeyFile, + this.privateKeyFilePassword, + this.ssid); + } + + /** A File ID representing a PEM file containing the server certificate. */ + public Builder setCaCertificateFile(String caCertificateFile) { + this.caCertificateFile = caCertificateFile; + return this; + } + + /** A File ID representing a PEM file containing the server certificate. */ + public Builder setCaCertificateFile(EmptyParam caCertificateFile) { + this.caCertificateFile = caCertificateFile; + return this; + } + + /** + * Required. A File ID representing a PEM file containing the client + * certificate + */ + public Builder setClientCertificateFile(String clientCertificateFile) { + this.clientCertificateFile = clientCertificateFile; + return this; + } + + /** + * Required. A File ID representing a PEM file containing the client + * certificate + */ + public Builder setClientCertificateFile(EmptyParam clientCertificateFile) { + this.clientCertificateFile = clientCertificateFile; + 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 ConfigurationUpdateParams.Wifi.EnterpriseEapTls#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.Wifi.EnterpriseEapTls#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. A File ID representing a PEM file containing the client RSA + * private key + */ + public Builder setPrivateKeyFile(String privateKeyFile) { + this.privateKeyFile = privateKeyFile; + return this; + } + + /** + * Required. A File ID representing a PEM file containing the client RSA + * private key + */ + public Builder setPrivateKeyFile(EmptyParam privateKeyFile) { + this.privateKeyFile = privateKeyFile; + return this; + } + + /** Password for the private key file. */ + public Builder setPrivateKeyFilePassword(String privateKeyFilePassword) { + this.privateKeyFilePassword = privateKeyFilePassword; + return this; + } + + /** Password for the private key file. */ + public Builder setPrivateKeyFilePassword(EmptyParam privateKeyFilePassword) { + this.privateKeyFilePassword = privateKeyFilePassword; + return this; + } + + /** Required. Name of the WiFi network */ + public Builder setSsid(String ssid) { + this.ssid = ssid; + return this; + } + + /** Required. Name of the WiFi network */ + public Builder setSsid(EmptyParam ssid) { + this.ssid = ssid; + return this; + } + } + } + + @Getter + public static class PersonalPsk { + /** + * 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. Password for connecting to the WiFi network */ + @SerializedName("password") + Object password; + + /** Required. Name of the WiFi network */ + @SerializedName("ssid") + Object ssid; + + private PersonalPsk(Map extraParams, Object password, Object ssid) { + this.extraParams = extraParams; + this.password = password; + this.ssid = ssid; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object password; + + private Object ssid; + + /** Finalize and obtain parameter instance from this builder. */ + public ConfigurationUpdateParams.Wifi.PersonalPsk build() { + return new ConfigurationUpdateParams.Wifi.PersonalPsk( + this.extraParams, this.password, this.ssid); + } + + /** + * 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.Wifi.PersonalPsk#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.Wifi.PersonalPsk#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. Password for connecting to the WiFi network */ + public Builder setPassword(String password) { + this.password = password; + return this; + } + + /** Required. Password for connecting to the WiFi network */ + public Builder setPassword(EmptyParam password) { + this.password = password; + return this; + } + + /** Required. Name of the WiFi network */ + public Builder setSsid(String ssid) { + this.ssid = ssid; + return this; + } + + /** Required. Name of the WiFi network */ + public Builder setSsid(EmptyParam ssid) { + this.ssid = ssid; + return this; + } + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("enterprise_eap_peap") + ENTERPRISE_EAP_PEAP("enterprise_eap_peap"), + + @SerializedName("enterprise_eap_tls") + ENTERPRISE_EAP_TLS("enterprise_eap_tls"), + + @SerializedName("personal_psk") + PERSONAL_PSK("personal_psk"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } } diff --git a/src/main/java/com/stripe/param/terminal/ReaderSucceedInputCollectionParams.java b/src/main/java/com/stripe/param/terminal/ReaderSucceedInputCollectionParams.java index eca394e66a4..7bae5fe8af1 100644 --- a/src/main/java/com/stripe/param/terminal/ReaderSucceedInputCollectionParams.java +++ b/src/main/java/com/stripe/param/terminal/ReaderSucceedInputCollectionParams.java @@ -24,7 +24,7 @@ public class ReaderSucceedInputCollectionParams extends ApiRequestParams { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Skip behavior for input collection. */ + /** This parameter defines the skip behavior for input collection. */ @SerializedName("skip_non_required_inputs") SkipNonRequiredInputs skipNonRequiredInputs; @@ -106,7 +106,7 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Skip behavior for input collection. */ + /** This parameter defines the skip behavior for input collection. */ public Builder setSkipNonRequiredInputs( ReaderSucceedInputCollectionParams.SkipNonRequiredInputs skipNonRequiredInputs) { this.skipNonRequiredInputs = skipNonRequiredInputs; diff --git a/src/main/java/com/stripe/service/testhelpers/terminal/ReaderService.java b/src/main/java/com/stripe/service/testhelpers/terminal/ReaderService.java index d641e862f27..b1d03f3bf25 100644 --- a/src/main/java/com/stripe/service/testhelpers/terminal/ReaderService.java +++ b/src/main/java/com/stripe/service/testhelpers/terminal/ReaderService.java @@ -62,30 +62,22 @@ public Reader presentPaymentMethod( options); return this.request(request, Reader.class); } - /** - * Succeeds an input collection on a simulated reader. Can be used to simulate collecting inputs. - */ + /** Use this endpoint to trigger a successful input collection on a simulated reader. */ public Reader succeedInputCollection(String reader, ReaderSucceedInputCollectionParams params) throws StripeException { return succeedInputCollection(reader, params, (RequestOptions) null); } - /** - * Succeeds an input collection on a simulated reader. Can be used to simulate collecting inputs. - */ + /** Use this endpoint to trigger a successful input collection on a simulated reader. */ public Reader succeedInputCollection(String reader, RequestOptions options) throws StripeException { return succeedInputCollection(reader, (ReaderSucceedInputCollectionParams) null, options); } - /** - * Succeeds an input collection on a simulated reader. Can be used to simulate collecting inputs. - */ + /** Use this endpoint to trigger a successful input collection on a simulated reader. */ public Reader succeedInputCollection(String reader) throws StripeException { return succeedInputCollection( reader, (ReaderSucceedInputCollectionParams) null, (RequestOptions) null); } - /** - * Succeeds an input collection on a simulated reader. Can be used to simulate collecting inputs. - */ + /** Use this endpoint to trigger a successful input collection on a simulated reader. */ public Reader succeedInputCollection( String reader, ReaderSucceedInputCollectionParams params, RequestOptions options) throws StripeException { @@ -102,22 +94,30 @@ public Reader succeedInputCollection( options); return this.request(request, Reader.class); } - /** Completes an input collection with a timeout error on a simulated reader. */ + /** + * Use this endpoint to complete an input collection with a timeout error on a simulated reader. + */ public Reader timeoutInputCollection(String reader, ReaderTimeoutInputCollectionParams params) throws StripeException { return timeoutInputCollection(reader, params, (RequestOptions) null); } - /** Completes an input collection with a timeout error on a simulated reader. */ + /** + * Use this endpoint to complete an input collection with a timeout error on a simulated reader. + */ public Reader timeoutInputCollection(String reader, RequestOptions options) throws StripeException { return timeoutInputCollection(reader, (ReaderTimeoutInputCollectionParams) null, options); } - /** Completes an input collection with a timeout error on a simulated reader. */ + /** + * Use this endpoint to complete an input collection with a timeout error on a simulated reader. + */ public Reader timeoutInputCollection(String reader) throws StripeException { return timeoutInputCollection( reader, (ReaderTimeoutInputCollectionParams) null, (RequestOptions) null); } - /** Completes an input collection with a timeout error on a simulated reader. */ + /** + * Use this endpoint to complete an input collection with a timeout error on a simulated reader. + */ public Reader timeoutInputCollection( String reader, ReaderTimeoutInputCollectionParams params, RequestOptions options) throws StripeException { From e0d19dd19dfe47a7b601580f3bdc1e43231b9dfc Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 27 Feb 2025 00:31:20 +0000 Subject: [PATCH 26/45] Update generated code for v1512 --- OPENAPI_VERSION | 2 +- src/main/java/com/stripe/param/OrderCreateParams.java | 4 ++-- src/main/java/com/stripe/param/OrderUpdateParams.java | 4 ++-- .../java/com/stripe/param/PaymentIntentConfirmParams.java | 4 ++-- src/main/java/com/stripe/param/PaymentIntentCreateParams.java | 4 ++-- src/main/java/com/stripe/param/PaymentIntentUpdateParams.java | 4 ++-- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index fabdcb1ee08..8b186acfb7f 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1511 \ No newline at end of file +v1512 \ No newline at end of file diff --git a/src/main/java/com/stripe/param/OrderCreateParams.java b/src/main/java/com/stripe/param/OrderCreateParams.java index 899df65fd81..9f12205bb93 100644 --- a/src/main/java/com/stripe/param/OrderCreateParams.java +++ b/src/main/java/com/stripe/param/OrderCreateParams.java @@ -6835,7 +6835,7 @@ public static class WechatPay { @SerializedName("app_id") String appId; - /** Required. The client type that the end customer will pay from */ + /** The client type that the end customer will pay from. */ @SerializedName("client") Client client; @@ -6914,7 +6914,7 @@ public Builder setAppId(String appId) { return this; } - /** Required. The client type that the end customer will pay from */ + /** The client type that the end customer will pay from. */ public Builder setClient( OrderCreateParams.Payment.Settings.PaymentMethodOptions.WechatPay.Client client) { this.client = client; diff --git a/src/main/java/com/stripe/param/OrderUpdateParams.java b/src/main/java/com/stripe/param/OrderUpdateParams.java index 65898e323b8..9048d6b4a8b 100644 --- a/src/main/java/com/stripe/param/OrderUpdateParams.java +++ b/src/main/java/com/stripe/param/OrderUpdateParams.java @@ -7391,7 +7391,7 @@ public static class WechatPay { @SerializedName("app_id") Object appId; - /** Required. The client type that the end customer will pay from */ + /** The client type that the end customer will pay from. */ @SerializedName("client") Client client; @@ -7478,7 +7478,7 @@ public Builder setAppId(EmptyParam appId) { return this; } - /** Required. The client type that the end customer will pay from */ + /** The client type that the end customer will pay from. */ public Builder setClient( OrderUpdateParams.Payment.Settings.PaymentMethodOptions.WechatPay.Client client) { this.client = client; diff --git a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java index 0225cfb07ee..f43b580d2e5 100644 --- a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java @@ -25831,7 +25831,7 @@ public static class WechatPay { @SerializedName("app_id") String appId; - /** Required. The client type that the end customer will pay from */ + /** The client type that the end customer will pay from. */ @SerializedName("client") Client client; @@ -25906,7 +25906,7 @@ public Builder setAppId(String appId) { return this; } - /** Required. The client type that the end customer will pay from */ + /** The client type that the end customer will pay from. */ public Builder setClient( PaymentIntentConfirmParams.PaymentMethodOptions.WechatPay.Client client) { this.client = client; diff --git a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java index 63bd08dc256..ccac07c5fd7 100644 --- a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java @@ -26294,7 +26294,7 @@ public static class WechatPay { @SerializedName("app_id") String appId; - /** Required. The client type that the end customer will pay from */ + /** The client type that the end customer will pay from. */ @SerializedName("client") Client client; @@ -26369,7 +26369,7 @@ public Builder setAppId(String appId) { return this; } - /** Required. The client type that the end customer will pay from */ + /** The client type that the end customer will pay from. */ public Builder setClient( PaymentIntentCreateParams.PaymentMethodOptions.WechatPay.Client client) { this.client = client; diff --git a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java index 2ecaac8833a..8f8d700e4c7 100644 --- a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java @@ -26784,7 +26784,7 @@ public static class WechatPay { @SerializedName("app_id") Object appId; - /** Required. The client type that the end customer will pay from */ + /** The client type that the end customer will pay from. */ @SerializedName("client") Client client; @@ -26865,7 +26865,7 @@ public Builder setAppId(EmptyParam appId) { return this; } - /** Required. The client type that the end customer will pay from */ + /** The client type that the end customer will pay from. */ public Builder setClient( PaymentIntentUpdateParams.PaymentMethodOptions.WechatPay.Client client) { this.client = client; From 9572223027a26aca1c1c4be3bc3b02dc37c07b7e Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 27 Feb 2025 21:10:51 +0000 Subject: [PATCH 27/45] Update generated code for v1515 --- OPENAPI_VERSION | 2 +- src/main/java/com/stripe/model/billing/CreditGrant.java | 6 ++++-- .../param/billing/CreditBalanceSummaryRetrieveParams.java | 6 +++--- .../com/stripe/param/billing/CreditGrantCreateParams.java | 6 +++--- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 8b186acfb7f..2e20054bc3f 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1512 \ No newline at end of file +v1515 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/billing/CreditGrant.java b/src/main/java/com/stripe/model/billing/CreditGrant.java index ba7d83050e3..061b7e31d77 100644 --- a/src/main/java/com/stripe/model/billing/CreditGrant.java +++ b/src/main/java/com/stripe/model/billing/CreditGrant.java @@ -460,7 +460,8 @@ public static class Scope extends StripeObject { /** * The price type that credit grants can apply to. We currently only support the {@code * metered} price type. This refers to prices that have a Billing Meter attached to them. + * href="https://docs.stripe.com/api/billing/meter">Billing Meter attached to them. Cannot + * be used in combination with {@code prices}. * *

Equal to {@code metered}. */ @@ -470,7 +471,8 @@ public static class Scope extends StripeObject { /** * The prices that credit grants can apply to. We currently only support {@code metered} * prices. This refers to prices that have a Billing Meter attached to them. + * href="https://docs.stripe.com/api/billing/meter">Billing Meter attached to them. Cannot + * be used in combination with {@code price_type}. */ @SerializedName("prices") List prices; diff --git a/src/main/java/com/stripe/param/billing/CreditBalanceSummaryRetrieveParams.java b/src/main/java/com/stripe/param/billing/CreditBalanceSummaryRetrieveParams.java index c0c48b77389..12742288b72 100644 --- a/src/main/java/com/stripe/param/billing/CreditBalanceSummaryRetrieveParams.java +++ b/src/main/java/com/stripe/param/billing/CreditBalanceSummaryRetrieveParams.java @@ -237,14 +237,14 @@ public static class ApplicabilityScope { /** * The price type that credit grants can apply to. We currently only support the {@code - * metered} price type. + * metered} price type. Cannot be used in combination with {@code prices}. */ @SerializedName("price_type") PriceType priceType; /** * A list of prices that the credit grant can apply to. We currently only support the {@code - * metered} prices. + * metered} prices. Cannot be used in combination with {@code price_type}. */ @SerializedName("prices") List prices; @@ -305,7 +305,7 @@ public Builder putAllExtraParam(Map map) { /** * The price type that credit grants can apply to. We currently only support the {@code - * metered} price type. + * metered} price type. Cannot be used in combination with {@code prices}. */ public Builder setPriceType( CreditBalanceSummaryRetrieveParams.Filter.ApplicabilityScope.PriceType priceType) { diff --git a/src/main/java/com/stripe/param/billing/CreditGrantCreateParams.java b/src/main/java/com/stripe/param/billing/CreditGrantCreateParams.java index c580a9f73f6..3570d0796ff 100644 --- a/src/main/java/com/stripe/param/billing/CreditGrantCreateParams.java +++ b/src/main/java/com/stripe/param/billing/CreditGrantCreateParams.java @@ -558,14 +558,14 @@ public static class Scope { /** * The price type that credit grants can apply to. We currently only support the {@code - * metered} price type. + * metered} price type. Cannot be used in combination with {@code prices}. */ @SerializedName("price_type") PriceType priceType; /** * A list of prices that the credit grant can apply to. We currently only support the {@code - * metered} prices. + * metered} prices. Cannot be used in combination with {@code price_type}. */ @SerializedName("prices") List prices; @@ -626,7 +626,7 @@ public Builder putAllExtraParam(Map map) { /** * The price type that credit grants can apply to. We currently only support the {@code - * metered} price type. + * metered} price type. Cannot be used in combination with {@code prices}. */ public Builder setPriceType( CreditGrantCreateParams.ApplicabilityConfig.Scope.PriceType priceType) { From 275ebb6fb30c21440f669a634037be9793dc275b Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 27 Feb 2025 22:52:00 +0000 Subject: [PATCH 28/45] Update generated code for v1516 --- OPENAPI_VERSION | 2 +- src/main/java/com/stripe/model/BankAccount.java | 9 ++++++++- src/main/java/com/stripe/model/Card.java | 16 +++++----------- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 2e20054bc3f..8ee3c4a78ab 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1515 \ No newline at end of file +v1516 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/BankAccount.java b/src/main/java/com/stripe/model/BankAccount.java index a6bd812c960..b5aaa2ba1b7 100644 --- a/src/main/java/com/stripe/model/BankAccount.java +++ b/src/main/java/com/stripe/model/BankAccount.java @@ -34,7 +34,14 @@ @EqualsAndHashCode(callSuper = false) public class BankAccount extends ApiResource implements MetadataStore, ExternalAccount, PaymentSource { - /** The ID of the account that the bank account is associated with. */ + /** + * The account this bank account belongs to. Only applicable on Accounts (not customers or + * recipients) This property is only available when returned as an External Account where + * controller.is_controller + * is {@code true}. + */ @SerializedName("account") @Getter(lombok.AccessLevel.NONE) @Setter(lombok.AccessLevel.NONE) diff --git a/src/main/java/com/stripe/model/Card.java b/src/main/java/com/stripe/model/Card.java index 37e6626e20b..73d13c620cb 100644 --- a/src/main/java/com/stripe/model/Card.java +++ b/src/main/java/com/stripe/model/Card.java @@ -28,13 +28,6 @@ @EqualsAndHashCode(callSuper = false) public class Card extends ApiResource implements MetadataStore, ExternalAccount, PaymentSource { - /** - * The account this card belongs to. This attribute will not be in the card object if the card - * belongs to a customer or recipient instead. This property is only available for accounts where - * controller.requirement_collection - * is {@code application}, which includes Custom accounts. - */ @SerializedName("account") @Getter(lombok.AccessLevel.NONE) @Setter(lombok.AccessLevel.NONE) @@ -123,10 +116,11 @@ public class Card extends ApiResource * Three-letter ISO code for * currency in lowercase. Must be a supported * currency. Only applicable on accounts (not customers or recipients). The card can be used - * as a transfer destination for funds in this currency. This property is only available for - * accounts where controller.requirement_collection - * is {@code application}, which includes Custom accounts. + * as a transfer destination for funds in this currency. This property is only available when + * returned as an External + * Account where controller.is_controller + * is {@code true}. */ @SerializedName("currency") String currency; From 4aecbe7a540fc11909fd004244001a6bebb26af5 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 27 Feb 2025 23:53:11 +0000 Subject: [PATCH 29/45] Update generated code for v1517 --- OPENAPI_VERSION | 2 +- src/main/java/com/stripe/model/StripeError.java | 17 +++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 8ee3c4a78ab..76f413ea6c3 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1516 \ No newline at end of file +v1517 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/StripeError.java b/src/main/java/com/stripe/model/StripeError.java index 03c74acfb4c..b8d42ce85f1 100644 --- a/src/main/java/com/stripe/model/StripeError.java +++ b/src/main/java/com/stripe/model/StripeError.java @@ -94,14 +94,15 @@ public class StripeError extends StripeObject { * {@code secret_key_required}, {@code sensitive_data_access_expired}, {@code * sepa_unsupported_account}, {@code setup_attempt_failed}, {@code * setup_intent_authentication_failure}, {@code setup_intent_invalid_parameter}, {@code - * setup_intent_mandate_invalid}, {@code setup_intent_setup_attempt_expired}, {@code - * setup_intent_unexpected_state}, {@code shipping_address_invalid}, {@code - * shipping_calculation_failed}, {@code sku_inactive}, {@code state_unsupported}, {@code - * status_transition_invalid}, {@code stripe_tax_inactive}, {@code tax_id_invalid}, {@code - * taxes_calculation_failed}, {@code terminal_location_country_unsupported}, {@code - * terminal_reader_busy}, {@code terminal_reader_collected_data_invalid}, {@code - * terminal_reader_hardware_fault}, {@code terminal_reader_invalid_location_for_activation}, - * {@code terminal_reader_invalid_location_for_payment}, {@code terminal_reader_offline}, {@code + * setup_intent_mandate_invalid}, {@code setup_intent_mobile_wallet_unsupported}, {@code + * setup_intent_setup_attempt_expired}, {@code setup_intent_unexpected_state}, {@code + * shipping_address_invalid}, {@code shipping_calculation_failed}, {@code sku_inactive}, {@code + * state_unsupported}, {@code status_transition_invalid}, {@code stripe_tax_inactive}, {@code + * tax_id_invalid}, {@code taxes_calculation_failed}, {@code + * terminal_location_country_unsupported}, {@code terminal_reader_busy}, {@code + * terminal_reader_collected_data_invalid}, {@code terminal_reader_hardware_fault}, {@code + * terminal_reader_invalid_location_for_activation}, {@code + * terminal_reader_invalid_location_for_payment}, {@code terminal_reader_offline}, {@code * terminal_reader_timeout}, {@code testmode_charges_only}, {@code tls_version_unsupported}, * {@code token_already_used}, {@code token_card_network_invalid}, {@code token_in_use}, {@code * transfer_source_balance_parameters_mismatch}, {@code transfers_not_allowed}, or {@code From ac8b8688a9504f34513b56de02f0ab9e92ea3607 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 28 Feb 2025 16:48:32 +0000 Subject: [PATCH 30/45] Update generated code for v1518 --- OPENAPI_VERSION | 2 +- .../com/stripe/model/issuing/Settlement.java | 20 +++++++++---------- .../param/checkout/SessionCreateParams.java | 6 ++++-- 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 76f413ea6c3..dcf158c1c30 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1517 \ No newline at end of file +v1518 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/issuing/Settlement.java b/src/main/java/com/stripe/model/issuing/Settlement.java index 2c7495cddc4..4a2e236d914 100644 --- a/src/main/java/com/stripe/model/issuing/Settlement.java +++ b/src/main/java/com/stripe/model/issuing/Settlement.java @@ -43,8 +43,8 @@ public class Settlement extends StripeObject implements HasId { String id; /** The total interchange received as reimbursement for the transactions. */ - @SerializedName("interchange_fees") - Long interchangeFees; + @SerializedName("interchange_fees_amount") + Long interchangeFeesAmount; /** * Has the value {@code true} if the object exists in live mode or the value {@code false} if the @@ -62,16 +62,16 @@ public class Settlement extends StripeObject implements HasId { Map metadata; /** The total net amount required to settle with the network. */ - @SerializedName("net_total") - Long netTotal; + @SerializedName("net_total_amount") + Long netTotalAmount; /** The card network for this settlement report. One of ["visa", "maestro"] */ @SerializedName("network") String network; /** The total amount of fees owed to the network. */ - @SerializedName("network_fees") - Long networkFees; + @SerializedName("network_fees_amount") + Long networkFeesAmount; /** The Settlement Identification Number assigned by the network. */ @SerializedName("network_settlement_identifier") @@ -105,11 +105,11 @@ public class Settlement extends StripeObject implements HasId { @SerializedName("status") String status; + /** The total transaction amount reflected in this settlement. */ + @SerializedName("transaction_amount") + Long transactionAmount; + /** The total number of transactions reflected in this settlement. */ @SerializedName("transaction_count") Long transactionCount; - - /** The total transaction amount reflected in this settlement. */ - @SerializedName("transaction_volume") - Long transactionVolume; } diff --git a/src/main/java/com/stripe/param/checkout/SessionCreateParams.java b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java index 0ee9401133e..948274c137f 100644 --- a/src/main/java/com/stripe/param/checkout/SessionCreateParams.java +++ b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java @@ -328,7 +328,8 @@ public class SessionCreateParams extends ApiRequestParams { /** * Describes the type of transaction being performed by Checkout in order to customize relevant * text on the page, such as the submit button. {@code submit_type} can only be specified on - * Checkout Sessions in {@code payment} mode. If blank or {@code auto}, {@code pay} is used. + * Checkout Sessions in {@code payment} or {@code subscription} mode. If blank or {@code auto}, + * {@code pay} is used. */ @SerializedName("submit_type") SubmitType submitType; @@ -1104,7 +1105,8 @@ public Builder addAllShippingOption(List ele /** * Describes the type of transaction being performed by Checkout in order to customize relevant * text on the page, such as the submit button. {@code submit_type} can only be specified on - * Checkout Sessions in {@code payment} mode. If blank or {@code auto}, {@code pay} is used. + * Checkout Sessions in {@code payment} or {@code subscription} mode. If blank or {@code auto}, + * {@code pay} is used. */ public Builder setSubmitType(SessionCreateParams.SubmitType submitType) { this.submitType = submitType; From 999ae3638eda9a683d84c0575f56f48d2da0395f Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 28 Feb 2025 19:54:03 +0000 Subject: [PATCH 31/45] Update generated code for v1520 --- OPENAPI_VERSION | 2 +- .../com/stripe/model/PaymentMethodDomain.java | 60 +++++------ .../PaymentMethodDomainCreateParams.java | 4 +- .../param/PaymentMethodDomainListParams.java | 4 +- .../PaymentMethodDomainUpdateParams.java | 4 +- .../stripe/param/v2/core/EventListParams.java | 99 ++++++++++++++++++- .../service/PaymentMethodDomainService.java | 40 ++++---- .../stripe/service/v2/core/EventService.java | 8 ++ 8 files changed, 160 insertions(+), 61 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index dcf158c1c30..caaaa3cf0ca 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1518 \ No newline at end of file +v1520 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/PaymentMethodDomain.java b/src/main/java/com/stripe/model/PaymentMethodDomain.java index 47232987254..10dd18da5b7 100644 --- a/src/main/java/com/stripe/model/PaymentMethodDomain.java +++ b/src/main/java/com/stripe/model/PaymentMethodDomain.java @@ -236,13 +236,13 @@ public PaymentMethodDomain update(PaymentMethodDomainUpdateParams params, Reques } /** - * Some payment methods such as Apple Pay require additional steps to verify a domain. If the - * requirements weren’t satisfied when the domain was created, the payment method will be inactive - * on the domain. The payment method doesn’t appear in Elements for this domain until it is - * active. + * Some payment methods might require additional steps to register a domain. If the requirements + * weren’t satisfied when the domain was created, the payment method will be inactive on the + * domain. The payment method doesn’t appear in Elements or Embedded Checkout for this domain + * until it is active. * *

To activate a payment method on an existing payment method domain, complete the required - * validation steps specific to the payment method, and then validate the payment method domain + * registration steps specific to the payment method, and then validate the payment method domain * with this endpoint. * *

Related guides: To activate a payment method on an existing payment method domain, complete the required - * validation steps specific to the payment method, and then validate the payment method domain + * registration steps specific to the payment method, and then validate the payment method domain * with this endpoint. * *

Related guides: To activate a payment method on an existing payment method domain, complete the required - * validation steps specific to the payment method, and then validate the payment method domain + * registration steps specific to the payment method, and then validate the payment method domain * with this endpoint. * *

Related guides: params) throws StripeExc } /** - * Some payment methods such as Apple Pay require additional steps to verify a domain. If the - * requirements weren’t satisfied when the domain was created, the payment method will be inactive - * on the domain. The payment method doesn’t appear in Elements for this domain until it is - * active. + * Some payment methods might require additional steps to register a domain. If the requirements + * weren’t satisfied when the domain was created, the payment method will be inactive on the + * domain. The payment method doesn’t appear in Elements or Embedded Checkout for this domain + * until it is active. * *

To activate a payment method on an existing payment method domain, complete the required - * validation steps specific to the payment method, and then validate the payment method domain + * registration steps specific to the payment method, and then validate the payment method domain * with this endpoint. * *

Related guides: params, RequestOptions o } /** - * Some payment methods such as Apple Pay require additional steps to verify a domain. If the - * requirements weren’t satisfied when the domain was created, the payment method will be inactive - * on the domain. The payment method doesn’t appear in Elements for this domain until it is - * active. + * Some payment methods might require additional steps to register a domain. If the requirements + * weren’t satisfied when the domain was created, the payment method will be inactive on the + * domain. The payment method doesn’t appear in Elements or Embedded Checkout for this domain + * until it is active. * *

To activate a payment method on an existing payment method domain, complete the required - * validation steps specific to the payment method, and then validate the payment method domain + * registration steps specific to the payment method, and then validate the payment method domain * with this endpoint. * *

Related guides: To activate a payment method on an existing payment method domain, complete the required - * validation steps specific to the payment method, and then validate the payment method domain + * registration steps specific to the payment method, and then validate the payment method domain * with this endpoint. * *

Related guides: Required. Primary object ID used to retrieve related events. */ + /** Primary object ID used to retrieve related events. */ @SerializedName("object_id") String objectId; @@ -31,7 +56,20 @@ public class EventListParams extends ApiRequestParams { String page; private EventListParams( - Map extraParams, Integer limit, String objectId, String page) { + Instant createdGt, + Instant createdGte, + Instant createdLt, + Instant createdLte, + Boolean deliverySuccess, + Map extraParams, + Integer limit, + String objectId, + String page) { + this.createdGt = createdGt; + this.createdGte = createdGte; + this.createdLt = createdLt; + this.createdLte = createdLte; + this.deliverySuccess = deliverySuccess; this.extraParams = extraParams; this.limit = limit; this.objectId = objectId; @@ -43,6 +81,16 @@ public static Builder builder() { } public static class Builder { + private Instant createdGt; + + private Instant createdGte; + + private Instant createdLt; + + private Instant createdLte; + + private Boolean deliverySuccess; + private Map extraParams; private Integer limit; @@ -53,7 +101,50 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public EventListParams build() { - return new EventListParams(this.extraParams, this.limit, this.objectId, this.page); + return new EventListParams( + this.createdGt, + this.createdGte, + this.createdLt, + this.createdLte, + this.deliverySuccess, + this.extraParams, + this.limit, + this.objectId, + this.page); + } + + /** Filter for events created after the specified timestamp. */ + public Builder setCreatedGt(Instant createdGt) { + this.createdGt = createdGt; + return this; + } + + /** Filter for events created at or after the specified timestamp. */ + public Builder setCreatedGte(Instant createdGte) { + this.createdGte = createdGte; + return this; + } + + /** Filter for events created before the specified timestamp. */ + public Builder setCreatedLt(Instant createdLt) { + this.createdLt = createdLt; + return this; + } + + /** Filter for events created at or before the specified timestamp. */ + public Builder setCreatedLte(Instant createdLte) { + this.createdLte = createdLte; + return this; + } + + /** + * Filter events based on whether they were successfully delivered to all subscribed event + * destinations. If false, events which are still pending or have failed all delivery attempts + * to a event destination will be returned. + */ + public Builder setDeliverySuccess(Boolean deliverySuccess) { + this.deliverySuccess = deliverySuccess; + return this; } /** @@ -88,7 +179,7 @@ public Builder setLimit(Integer limit) { return this; } - /** Required. Primary object ID used to retrieve related events. */ + /** Primary object ID used to retrieve related events. */ public Builder setObjectId(String objectId) { this.objectId = objectId; return this; diff --git a/src/main/java/com/stripe/service/PaymentMethodDomainService.java b/src/main/java/com/stripe/service/PaymentMethodDomainService.java index d749f74c53f..650c6397549 100644 --- a/src/main/java/com/stripe/service/PaymentMethodDomainService.java +++ b/src/main/java/com/stripe/service/PaymentMethodDomainService.java @@ -130,13 +130,13 @@ public PaymentMethodDomain update( return this.request(request, PaymentMethodDomain.class); } /** - * Some payment methods such as Apple Pay require additional steps to verify a domain. If the - * requirements weren’t satisfied when the domain was created, the payment method will be inactive - * on the domain. The payment method doesn’t appear in Elements for this domain until it is - * active. + * Some payment methods might require additional steps to register a domain. If the requirements + * weren’t satisfied when the domain was created, the payment method will be inactive on the + * domain. The payment method doesn’t appear in Elements or Embedded Checkout for this domain + * until it is active. * *

To activate a payment method on an existing payment method domain, complete the required - * validation steps specific to the payment method, and then validate the payment method domain + * registration steps specific to the payment method, and then validate the payment method domain * with this endpoint. * *

Related guides: To activate a payment method on an existing payment method domain, complete the required - * validation steps specific to the payment method, and then validate the payment method domain + * registration steps specific to the payment method, and then validate the payment method domain * with this endpoint. * *

Related guides: To activate a payment method on an existing payment method domain, complete the required - * validation steps specific to the payment method, and then validate the payment method domain + * registration steps specific to the payment method, and then validate the payment method domain * with this endpoint. * *

Related guides: To activate a payment method on an existing payment method domain, complete the required - * validation steps specific to the payment method, and then validate the payment method domain + * registration steps specific to the payment method, and then validate the payment method domain * with this endpoint. * *

Related guides: list(EventListParams params) throws StripeExcepti return list(params, (RequestOptions) null); } /** List events, going back up to 30 days. */ + public StripeCollection list(RequestOptions options) throws StripeException { + return list((EventListParams) null, options); + } + /** List events, going back up to 30 days. */ + public StripeCollection list() throws StripeException { + return list((EventListParams) null, (RequestOptions) null); + } + /** List events, going back up to 30 days. */ public StripeCollection list(EventListParams params, RequestOptions options) throws StripeException { String path = "/v2/core/events"; From 2e783648fe57349be6ef65c83294f8e9492f286f Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 28 Feb 2025 23:12:46 +0000 Subject: [PATCH 32/45] Update generated code for v1521 --- OPENAPI_VERSION | 2 +- .../stripe/model/treasury/FinancialAccount.java | 16 ++++++++-------- .../treasury/FinancialAccountService.java | 8 ++++---- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index caaaa3cf0ca..e4a28d8b843 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1520 \ No newline at end of file +v1521 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/treasury/FinancialAccount.java b/src/main/java/com/stripe/model/treasury/FinancialAccount.java index 52c94b0ac50..e16eb9eecb7 100644 --- a/src/main/java/com/stripe/model/treasury/FinancialAccount.java +++ b/src/main/java/com/stripe/model/treasury/FinancialAccount.java @@ -207,16 +207,16 @@ public FinancialAccount close(FinancialAccountCloseParams params, RequestOptions } /** - * Creates a new FinancialAccount. For now, each connected account can only have one - * FinancialAccount. + * Creates a new FinancialAccount. Each connected account can have up to three FinancialAccounts + * by default. */ public static FinancialAccount create(Map params) throws StripeException { return create(params, (RequestOptions) null); } /** - * Creates a new FinancialAccount. For now, each connected account can only have one - * FinancialAccount. + * Creates a new FinancialAccount. Each connected account can have up to three FinancialAccounts + * by default. */ public static FinancialAccount create(Map params, RequestOptions options) throws StripeException { @@ -227,8 +227,8 @@ public static FinancialAccount create(Map params, RequestOptions } /** - * Creates a new FinancialAccount. For now, each connected account can only have one - * FinancialAccount. + * Creates a new FinancialAccount. Each connected account can have up to three FinancialAccounts + * by default. */ public static FinancialAccount create(FinancialAccountCreateParams params) throws StripeException { @@ -236,8 +236,8 @@ public static FinancialAccount create(FinancialAccountCreateParams params) } /** - * Creates a new FinancialAccount. For now, each connected account can only have one - * FinancialAccount. + * Creates a new FinancialAccount. Each connected account can have up to three FinancialAccounts + * by default. */ public static FinancialAccount create(FinancialAccountCreateParams params, RequestOptions options) throws StripeException { diff --git a/src/main/java/com/stripe/service/treasury/FinancialAccountService.java b/src/main/java/com/stripe/service/treasury/FinancialAccountService.java index 64b227cf9b1..abbc6573c51 100644 --- a/src/main/java/com/stripe/service/treasury/FinancialAccountService.java +++ b/src/main/java/com/stripe/service/treasury/FinancialAccountService.java @@ -50,15 +50,15 @@ public StripeCollection list( return this.request(request, new TypeToken>() {}.getType()); } /** - * Creates a new FinancialAccount. For now, each connected account can only have one - * FinancialAccount. + * Creates a new FinancialAccount. Each connected account can have up to three FinancialAccounts + * by default. */ public FinancialAccount create(FinancialAccountCreateParams params) throws StripeException { return create(params, (RequestOptions) null); } /** - * Creates a new FinancialAccount. For now, each connected account can only have one - * FinancialAccount. + * Creates a new FinancialAccount. Each connected account can have up to three FinancialAccounts + * by default. */ public FinancialAccount create(FinancialAccountCreateParams params, RequestOptions options) throws StripeException { From ceef062312bbbb41887553716fd9bf51989e44d5 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 3 Mar 2025 22:18:27 +0000 Subject: [PATCH 33/45] Update generated code for v1523 --- OPENAPI_VERSION | 2 +- src/main/java/com/stripe/model/Subscription.java | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index e4a28d8b843..41ae5917f49 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1521 \ No newline at end of file +v1523 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/Subscription.java b/src/main/java/com/stripe/model/Subscription.java index eb96a5e2fb1..9faf8463571 100644 --- a/src/main/java/com/stripe/model/Subscription.java +++ b/src/main/java/com/stripe/model/Subscription.java @@ -260,7 +260,9 @@ public class Subscription extends ApiResource implements HasId, MetadataStoreConnect documentation for + * details. */ @SerializedName("on_behalf_of") @Getter(lombok.AccessLevel.NONE) From 046392dd4f8bd4a7a729683f53c07cee7d5871b7 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 4 Mar 2025 18:54:30 +0000 Subject: [PATCH 34/45] Update generated code for v1525 --- OPENAPI_VERSION | 2 +- .../com/stripe/model/CustomerBalanceTransaction.java | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 41ae5917f49..0e69d4d5901 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1523 \ No newline at end of file +v1525 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/CustomerBalanceTransaction.java b/src/main/java/com/stripe/model/CustomerBalanceTransaction.java index 41222e8a02d..ca07b45787e 100644 --- a/src/main/java/com/stripe/model/CustomerBalanceTransaction.java +++ b/src/main/java/com/stripe/model/CustomerBalanceTransaction.java @@ -111,13 +111,17 @@ public class CustomerBalanceTransaction extends ApiResource /** * Transaction type: {@code adjustment}, {@code applied_to_invoice}, {@code credit_note}, {@code * initial}, {@code invoice_overpaid}, {@code invoice_too_large}, {@code invoice_too_small}, - * {@code unspent_receiver_credit}, or {@code unapplied_from_invoice}. See the Customer Balance page to * learn more about transaction types. * - *

One of {@code adjustment}, {@code applied_to_invoice}, {@code credit_note}, {@code initial}, - * {@code invoice_overpaid}, {@code invoice_too_large}, {@code invoice_too_small}, {@code - * migration}, {@code unapplied_from_invoice}, or {@code unspent_receiver_credit}. + *

One of {@code adjustment}, {@code applied_to_invoice}, {@code + * checkout_session_subscription_payment}, {@code checkout_session_subscription_payment_canceled}, + * {@code credit_note}, {@code initial}, {@code invoice_overpaid}, {@code invoice_too_large}, + * {@code invoice_too_small}, {@code migration}, {@code unapplied_from_invoice}, or {@code + * unspent_receiver_credit}. */ @SerializedName("type") String type; From 9ae1c08b7175851e1fbd79ee26de12e8fa301d33 Mon Sep 17 00:00:00 2001 From: jar-stripe Date: Tue, 4 Mar 2025 14:36:52 -0800 Subject: [PATCH 35/45] Fix publish-docs token permissions (#1951) --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c8e4c0cf005..fff31d40222 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -139,6 +139,8 @@ jobs: endsWith(github.actor, '-stripe') needs: [build, test] runs-on: "ubuntu-24.04" + permissions: + contents: write steps: - uses: actions/checkout@master - name: Setup Java From b2aedf81184d4f69cbfd889dd03dfde7944a0a48 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 5 Mar 2025 15:56:58 +0000 Subject: [PATCH 36/45] Update generated code for v1527 --- OPENAPI_VERSION | 2 +- src/main/java/com/stripe/model/checkout/Session.java | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 94c5860508f..79d315ec957 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1526 \ No newline at end of file +v1527 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/checkout/Session.java b/src/main/java/com/stripe/model/checkout/Session.java index dcd3fb4aed0..dc260f0eac6 100644 --- a/src/main/java/com/stripe/model/checkout/Session.java +++ b/src/main/java/com/stripe/model/checkout/Session.java @@ -382,10 +382,6 @@ public class Session extends ApiResource implements HasId, MetadataStore shippingOptions; @@ -978,7 +974,7 @@ public static class CollectedInformation extends StripeObject { /** Shipping information for this Checkout Session. */ @SerializedName("shipping_details") - com.stripe.model.checkout.Session.CollectedInformation.ShippingDetails shippingDetails; + ShippingDetails shippingDetails; /** Customer’s tax ids for this Checkout Session. */ @SerializedName("tax_ids") @@ -3957,7 +3953,6 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { trySetResponseGetter(setupIntent, responseGetter); trySetResponseGetter(shippingAddressCollection, responseGetter); trySetResponseGetter(shippingCost, responseGetter); - trySetResponseGetter(shippingDetails, responseGetter); trySetResponseGetter(subscription, responseGetter); trySetResponseGetter(taxIdCollection, responseGetter); trySetResponseGetter(totalDetails, responseGetter); From 17cae531d722daf3a5bfcecdcbee4a9c9da7a7c5 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 5 Mar 2025 16:28:03 +0000 Subject: [PATCH 37/45] Update generated code for v1528 --- OPENAPI_VERSION | 2 +- src/main/java/com/stripe/model/checkout/Session.java | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 79d315ec957..644914f6844 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1527 \ No newline at end of file +v1528 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/checkout/Session.java b/src/main/java/com/stripe/model/checkout/Session.java index dc260f0eac6..dcd3fb4aed0 100644 --- a/src/main/java/com/stripe/model/checkout/Session.java +++ b/src/main/java/com/stripe/model/checkout/Session.java @@ -382,6 +382,10 @@ public class Session extends ApiResource implements HasId, MetadataStore shippingOptions; @@ -974,7 +978,7 @@ public static class CollectedInformation extends StripeObject { /** Shipping information for this Checkout Session. */ @SerializedName("shipping_details") - ShippingDetails shippingDetails; + com.stripe.model.checkout.Session.CollectedInformation.ShippingDetails shippingDetails; /** Customer’s tax ids for this Checkout Session. */ @SerializedName("tax_ids") @@ -3953,6 +3957,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { trySetResponseGetter(setupIntent, responseGetter); trySetResponseGetter(shippingAddressCollection, responseGetter); trySetResponseGetter(shippingCost, responseGetter); + trySetResponseGetter(shippingDetails, responseGetter); trySetResponseGetter(subscription, responseGetter); trySetResponseGetter(taxIdCollection, responseGetter); trySetResponseGetter(totalDetails, responseGetter); From da70c0d6c7224c3f1570b01938cb78a702be3c35 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 5 Mar 2025 21:48:55 +0000 Subject: [PATCH 38/45] Update generated code for v1529 --- OPENAPI_VERSION | 2 +- src/main/java/com/stripe/model/PaymentAttemptRecord.java | 8 ++++++++ .../stripe/param/PaymentRecordReportPaymentParams.java | 8 ++++---- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 644914f6844..87013bbac5f 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1528 \ No newline at end of file +v1529 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/PaymentAttemptRecord.java b/src/main/java/com/stripe/model/PaymentAttemptRecord.java index 272e65f4453..b1962123b5b 100644 --- a/src/main/java/com/stripe/model/PaymentAttemptRecord.java +++ b/src/main/java/com/stripe/model/PaymentAttemptRecord.java @@ -106,6 +106,14 @@ public class PaymentAttemptRecord extends ApiResource implements HasId { @SerializedName("payment_reference") String paymentReference; + /** + * Indicates who reported the payment. + * + *

One of {@code self}, or {@code stripe}. + */ + @SerializedName("reported_by") + String reportedBy; + /** Shipping information for this payment. */ @SerializedName("shipping_details") ShippingDetails shippingDetails; diff --git a/src/main/java/com/stripe/param/PaymentRecordReportPaymentParams.java b/src/main/java/com/stripe/param/PaymentRecordReportPaymentParams.java index 2798d2bc67c..b1b4fea4255 100644 --- a/src/main/java/com/stripe/param/PaymentRecordReportPaymentParams.java +++ b/src/main/java/com/stripe/param/PaymentRecordReportPaymentParams.java @@ -73,8 +73,8 @@ public class PaymentRecordReportPaymentParams extends ApiRequestParams { PaymentMethodDetails paymentMethodDetails; /** - * Required. An opaque string for manual reconciliation of this payment, for - * example a check number or a payment processor ID. + * An opaque string for manual reconciliation of this payment, for example a check number or a + * payment processor ID. */ @SerializedName("payment_reference") String paymentReference; @@ -306,8 +306,8 @@ public Builder setPaymentMethodDetails( } /** - * Required. An opaque string for manual reconciliation of this payment, for - * example a check number or a payment processor ID. + * An opaque string for manual reconciliation of this payment, for example a check number or a + * payment processor ID. */ public Builder setPaymentReference(String paymentReference) { this.paymentReference = paymentReference; From b810e015290d26f300b6e579b39360a9c4c415f8 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 7 Mar 2025 01:06:58 +0000 Subject: [PATCH 39/45] Update generated code for v1532 --- OPENAPI_VERSION | 2 +- .../com/stripe/model/checkout/Session.java | 60 +++++++++---------- .../service/checkout/SessionService.java | 48 +++++++-------- 3 files changed, 55 insertions(+), 55 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 87013bbac5f..009014c2d73 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1529 \ No newline at end of file +v1532 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/checkout/Session.java b/src/main/java/com/stripe/model/checkout/Session.java index dcd3fb4aed0..33f51b42699 100644 --- a/src/main/java/com/stripe/model/checkout/Session.java +++ b/src/main/java/com/stripe/model/checkout/Session.java @@ -553,12 +553,12 @@ public void setSubscriptionObject(Subscription expandableObject) { new ExpandableField(expandableObject.getId(), expandableObject); } - /** Creates a Session object. */ + /** Creates a Checkout Session object. */ public static Session create(Map params) throws StripeException { return create(params, (RequestOptions) null); } - /** Creates a Session object. */ + /** Creates a Checkout Session object. */ public static Session create(Map params, RequestOptions options) throws StripeException { String path = "/v1/checkout/sessions"; @@ -567,12 +567,12 @@ public static Session create(Map params, RequestOptions options) return getGlobalResponseGetter().request(request, Session.class); } - /** Creates a Session object. */ + /** Creates a Checkout Session object. */ public static Session create(SessionCreateParams params) throws StripeException { return create(params, (RequestOptions) null); } - /** Creates a Session object. */ + /** Creates a Checkout Session object. */ public static Session create(SessionCreateParams params, RequestOptions options) throws StripeException { String path = "/v1/checkout/sessions"; @@ -588,40 +588,40 @@ public static Session create(SessionCreateParams params, RequestOptions options) } /** - * A Session can be expired when it is in one of these statuses: {@code open} + * A Checkout Session can be expired when it is in one of these statuses: {@code open} * - *

After it expires, a customer can’t complete a Session and customers loading the Session see - * a message saying the Session is expired. + *

After it expires, a customer can’t complete a Checkout Session and customers loading the + * Checkout Session see a message saying the Checkout Session is expired. */ public Session expire() throws StripeException { return expire((Map) null, (RequestOptions) null); } /** - * A Session can be expired when it is in one of these statuses: {@code open} + * A Checkout Session can be expired when it is in one of these statuses: {@code open} * - *

After it expires, a customer can’t complete a Session and customers loading the Session see - * a message saying the Session is expired. + *

After it expires, a customer can’t complete a Checkout Session and customers loading the + * Checkout Session see a message saying the Checkout Session is expired. */ public Session expire(RequestOptions options) throws StripeException { return expire((Map) null, options); } /** - * A Session can be expired when it is in one of these statuses: {@code open} + * A Checkout Session can be expired when it is in one of these statuses: {@code open} * - *

After it expires, a customer can’t complete a Session and customers loading the Session see - * a message saying the Session is expired. + *

After it expires, a customer can’t complete a Checkout Session and customers loading the + * Checkout Session see a message saying the Checkout Session is expired. */ public Session expire(Map params) throws StripeException { return expire(params, (RequestOptions) null); } /** - * A Session can be expired when it is in one of these statuses: {@code open} + * A Checkout Session can be expired when it is in one of these statuses: {@code open} * - *

After it expires, a customer can’t complete a Session and customers loading the Session see - * a message saying the Session is expired. + *

After it expires, a customer can’t complete a Checkout Session and customers loading the + * Checkout Session see a message saying the Checkout Session is expired. */ public Session expire(Map params, RequestOptions options) throws StripeException { String path = @@ -632,20 +632,20 @@ public Session expire(Map params, RequestOptions options) throws } /** - * A Session can be expired when it is in one of these statuses: {@code open} + * A Checkout Session can be expired when it is in one of these statuses: {@code open} * - *

After it expires, a customer can’t complete a Session and customers loading the Session see - * a message saying the Session is expired. + *

After it expires, a customer can’t complete a Checkout Session and customers loading the + * Checkout Session see a message saying the Checkout Session is expired. */ public Session expire(SessionExpireParams params) throws StripeException { return expire(params, (RequestOptions) null); } /** - * A Session can be expired when it is in one of these statuses: {@code open} + * A Checkout Session can be expired when it is in one of these statuses: {@code open} * - *

After it expires, a customer can’t complete a Session and customers loading the Session see - * a message saying the Session is expired. + *

After it expires, a customer can’t complete a Checkout Session and customers loading the + * Checkout Session see a message saying the Checkout Session is expired. */ public Session expire(SessionExpireParams params, RequestOptions options) throws StripeException { String path = @@ -757,17 +757,17 @@ public LineItemCollection listLineItems(SessionListLineItemsParams params, Reque return getResponseGetter().request(request, LineItemCollection.class); } - /** Retrieves a Session object. */ + /** Retrieves a Checkout Session object. */ public static Session retrieve(String session) throws StripeException { return retrieve(session, (Map) null, (RequestOptions) null); } - /** Retrieves a Session object. */ + /** Retrieves a Checkout Session object. */ public static Session retrieve(String session, RequestOptions options) throws StripeException { return retrieve(session, (Map) null, options); } - /** Retrieves a Session object. */ + /** Retrieves a Checkout Session object. */ public static Session retrieve(String session, Map params, RequestOptions options) throws StripeException { String path = String.format("/v1/checkout/sessions/%s", ApiResource.urlEncodeId(session)); @@ -776,7 +776,7 @@ public static Session retrieve(String session, Map params, Reque return getGlobalResponseGetter().request(request, Session.class); } - /** Retrieves a Session object. */ + /** Retrieves a Checkout Session object. */ public static Session retrieve( String session, SessionRetrieveParams params, RequestOptions options) throws StripeException { String path = String.format("/v1/checkout/sessions/%s", ApiResource.urlEncodeId(session)); @@ -791,13 +791,13 @@ public static Session retrieve( return getGlobalResponseGetter().request(request, Session.class); } - /** Updates a Session object. */ + /** Updates a Checkout Session object. */ @Override public Session update(Map params) throws StripeException { return update(params, (RequestOptions) null); } - /** Updates a Session object. */ + /** Updates a Checkout Session object. */ @Override public Session update(Map params, RequestOptions options) throws StripeException { String path = String.format("/v1/checkout/sessions/%s", ApiResource.urlEncodeId(this.getId())); @@ -806,12 +806,12 @@ public Session update(Map params, RequestOptions options) throws return getResponseGetter().request(request, Session.class); } - /** Updates a Session object. */ + /** Updates a Checkout Session object. */ public Session update(SessionUpdateParams params) throws StripeException { return update(params, (RequestOptions) null); } - /** Updates a Session object. */ + /** Updates a Checkout Session object. */ public Session update(SessionUpdateParams params, RequestOptions options) throws StripeException { String path = String.format("/v1/checkout/sessions/%s", ApiResource.urlEncodeId(this.getId())); ApiResource.checkNullTypedParams(path, params); diff --git a/src/main/java/com/stripe/service/checkout/SessionService.java b/src/main/java/com/stripe/service/checkout/SessionService.java index 9cb491709da..7f2c6bdba03 100644 --- a/src/main/java/com/stripe/service/checkout/SessionService.java +++ b/src/main/java/com/stripe/service/checkout/SessionService.java @@ -48,19 +48,19 @@ public StripeCollection list(SessionListParams params, RequestOptions o options); return this.request(request, new TypeToken>() {}.getType()); } - /** Creates a Session object. */ + /** Creates a Checkout Session object. */ public Session create(SessionCreateParams params) throws StripeException { return create(params, (RequestOptions) null); } - /** Creates a Session object. */ + /** Creates a Checkout Session object. */ public Session create(RequestOptions options) throws StripeException { return create((SessionCreateParams) null, options); } - /** Creates a Session object. */ + /** Creates a Checkout Session object. */ public Session create() throws StripeException { return create((SessionCreateParams) null, (RequestOptions) null); } - /** Creates a Session object. */ + /** Creates a Checkout Session object. */ public Session create(SessionCreateParams params, RequestOptions options) throws StripeException { String path = "/v1/checkout/sessions"; ApiRequest request = @@ -72,19 +72,19 @@ public Session create(SessionCreateParams params, RequestOptions options) throws options); return this.request(request, Session.class); } - /** Retrieves a Session object. */ + /** Retrieves a Checkout Session object. */ public Session retrieve(String session, SessionRetrieveParams params) throws StripeException { return retrieve(session, params, (RequestOptions) null); } - /** Retrieves a Session object. */ + /** Retrieves a Checkout Session object. */ public Session retrieve(String session, RequestOptions options) throws StripeException { return retrieve(session, (SessionRetrieveParams) null, options); } - /** Retrieves a Session object. */ + /** Retrieves a Checkout Session object. */ public Session retrieve(String session) throws StripeException { return retrieve(session, (SessionRetrieveParams) null, (RequestOptions) null); } - /** Retrieves a Session object. */ + /** Retrieves a Checkout Session object. */ public Session retrieve(String session, SessionRetrieveParams params, RequestOptions options) throws StripeException { String path = String.format("/v1/checkout/sessions/%s", ApiResource.urlEncodeId(session)); @@ -97,19 +97,19 @@ public Session retrieve(String session, SessionRetrieveParams params, RequestOpt options); return this.request(request, Session.class); } - /** Updates a Session object. */ + /** Updates a Checkout Session object. */ public Session update(String session, SessionUpdateParams params) throws StripeException { return update(session, params, (RequestOptions) null); } - /** Updates a Session object. */ + /** Updates a Checkout Session object. */ public Session update(String session, RequestOptions options) throws StripeException { return update(session, (SessionUpdateParams) null, options); } - /** Updates a Session object. */ + /** Updates a Checkout Session object. */ public Session update(String session) throws StripeException { return update(session, (SessionUpdateParams) null, (RequestOptions) null); } - /** Updates a Session object. */ + /** Updates a Checkout Session object. */ public Session update(String session, SessionUpdateParams params, RequestOptions options) throws StripeException { String path = String.format("/v1/checkout/sessions/%s", ApiResource.urlEncodeId(session)); @@ -123,37 +123,37 @@ public Session update(String session, SessionUpdateParams params, RequestOptions return this.request(request, Session.class); } /** - * A Session can be expired when it is in one of these statuses: {@code open} + * A Checkout Session can be expired when it is in one of these statuses: {@code open} * - *

After it expires, a customer can’t complete a Session and customers loading the Session see - * a message saying the Session is expired. + *

After it expires, a customer can’t complete a Checkout Session and customers loading the + * Checkout Session see a message saying the Checkout Session is expired. */ public Session expire(String session, SessionExpireParams params) throws StripeException { return expire(session, params, (RequestOptions) null); } /** - * A Session can be expired when it is in one of these statuses: {@code open} + * A Checkout Session can be expired when it is in one of these statuses: {@code open} * - *

After it expires, a customer can’t complete a Session and customers loading the Session see - * a message saying the Session is expired. + *

After it expires, a customer can’t complete a Checkout Session and customers loading the + * Checkout Session see a message saying the Checkout Session is expired. */ public Session expire(String session, RequestOptions options) throws StripeException { return expire(session, (SessionExpireParams) null, options); } /** - * A Session can be expired when it is in one of these statuses: {@code open} + * A Checkout Session can be expired when it is in one of these statuses: {@code open} * - *

After it expires, a customer can’t complete a Session and customers loading the Session see - * a message saying the Session is expired. + *

After it expires, a customer can’t complete a Checkout Session and customers loading the + * Checkout Session see a message saying the Checkout Session is expired. */ public Session expire(String session) throws StripeException { return expire(session, (SessionExpireParams) null, (RequestOptions) null); } /** - * A Session can be expired when it is in one of these statuses: {@code open} + * A Checkout Session can be expired when it is in one of these statuses: {@code open} * - *

After it expires, a customer can’t complete a Session and customers loading the Session see - * a message saying the Session is expired. + *

After it expires, a customer can’t complete a Checkout Session and customers loading the + * Checkout Session see a message saying the Checkout Session is expired. */ public Session expire(String session, SessionExpireParams params, RequestOptions options) throws StripeException { From 85b1081a3224d9afbb6ee80583ea2634495c7f39 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 7 Mar 2025 01:19:28 +0000 Subject: [PATCH 40/45] Update generated code for v1533 --- OPENAPI_VERSION | 2 +- .../java/com/stripe/model/Subscription.java | 3 ++- .../param/SubscriptionCreateParams.java | 21 ------------------- .../param/SubscriptionUpdateParams.java | 21 ------------------- 4 files changed, 3 insertions(+), 44 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 009014c2d73..98cb1213b46 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1532 \ No newline at end of file +v1533 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/Subscription.java b/src/main/java/com/stripe/model/Subscription.java index 9faf8463571..430981286bb 100644 --- a/src/main/java/com/stripe/model/Subscription.java +++ b/src/main/java/com/stripe/model/Subscription.java @@ -78,7 +78,8 @@ public class Subscription extends ApiResource implements HasId, MetadataStore Date: Fri, 7 Mar 2025 14:07:53 +0000 Subject: [PATCH 41/45] Update generated code for v1534 --- OPENAPI_VERSION | 2 +- src/main/java/com/stripe/model/ApplicationFee.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 98cb1213b46..3c82d4fff55 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1533 \ No newline at end of file +v1534 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/ApplicationFee.java b/src/main/java/com/stripe/model/ApplicationFee.java index 827a1e345c1..bac7b223119 100644 --- a/src/main/java/com/stripe/model/ApplicationFee.java +++ b/src/main/java/com/stripe/model/ApplicationFee.java @@ -319,7 +319,7 @@ public static class FeeSource extends StripeObject { String payout; /** - * Type of object that created the application fee, either {@code charge} or {@code payout}. + * Type of object that created the application fee. * *

One of {@code charge}, or {@code payout}. */ From 314c1fc71022b7cbfec46f43561a6d9180183a4b Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 7 Mar 2025 18:37:02 +0000 Subject: [PATCH 42/45] Update generated code for v1535 --- OPENAPI_VERSION | 2 +- .../issuing/DisputeSettlementDetail.java | 29 +++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 3c82d4fff55..2cbada7abb8 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1534 \ No newline at end of file +v1535 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/issuing/DisputeSettlementDetail.java b/src/main/java/com/stripe/model/issuing/DisputeSettlementDetail.java index a686dc04e29..e4a07cdf8c4 100644 --- a/src/main/java/com/stripe/model/issuing/DisputeSettlementDetail.java +++ b/src/main/java/com/stripe/model/issuing/DisputeSettlementDetail.java @@ -4,11 +4,13 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; import com.stripe.model.HasId; +import com.stripe.model.StripeObject; import com.stripe.net.ApiRequest; import com.stripe.net.ApiRequestParams; import com.stripe.net.ApiResource; import com.stripe.net.BaseAddress; import com.stripe.net.RequestOptions; +import com.stripe.net.StripeResponseGetter; import com.stripe.param.issuing.DisputeSettlementDetailListParams; import com.stripe.param.issuing.DisputeSettlementDetailRetrieveParams; import java.util.Map; @@ -80,6 +82,10 @@ public class DisputeSettlementDetail extends ApiResource implements HasId { @SerializedName("network") String network; + /** Details about the transaction, such as processing dates, set by the card network. */ + @SerializedName("network_data") + NetworkData networkData; + /** * String representing the object's type. Objects of the same type share the same value. * @@ -185,4 +191,27 @@ public static DisputeSettlementDetail retrieve( options); return getGlobalResponseGetter().request(request, DisputeSettlementDetail.class); } + + /** + * For more details about NetworkData, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class NetworkData extends StripeObject { + /** + * The date the transaction was processed by the card network. This can be different from the + * date the seller recorded the transaction depending on when the acquirer submits the + * transaction to the network. + */ + @SerializedName("processing_date") + String processingDate; + } + + @Override + public void setResponseGetter(StripeResponseGetter responseGetter) { + super.setResponseGetter(responseGetter); + trySetResponseGetter(networkData, responseGetter); + } } From 1d9d837651350564806f6026f423e43f35325cde Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 7 Mar 2025 21:02:17 +0000 Subject: [PATCH 43/45] Update generated code for v1536 --- OPENAPI_VERSION | 2 +- src/main/java/com/stripe/model/checkout/Session.java | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 2cbada7abb8..f2790682173 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1535 \ No newline at end of file +v1536 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/checkout/Session.java b/src/main/java/com/stripe/model/checkout/Session.java index 33f51b42699..7a02d18022b 100644 --- a/src/main/java/com/stripe/model/checkout/Session.java +++ b/src/main/java/com/stripe/model/checkout/Session.java @@ -382,10 +382,6 @@ public class Session extends ApiResource implements HasId, MetadataStore shippingOptions; @@ -978,7 +974,7 @@ public static class CollectedInformation extends StripeObject { /** Shipping information for this Checkout Session. */ @SerializedName("shipping_details") - com.stripe.model.checkout.Session.CollectedInformation.ShippingDetails shippingDetails; + ShippingDetails shippingDetails; /** Customer’s tax ids for this Checkout Session. */ @SerializedName("tax_ids") @@ -3957,7 +3953,6 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { trySetResponseGetter(setupIntent, responseGetter); trySetResponseGetter(shippingAddressCollection, responseGetter); trySetResponseGetter(shippingCost, responseGetter); - trySetResponseGetter(shippingDetails, responseGetter); trySetResponseGetter(subscription, responseGetter); trySetResponseGetter(taxIdCollection, responseGetter); trySetResponseGetter(totalDetails, responseGetter); From 817dc0c9f9b51dfe7d8f68cec238d105079e066e Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 7 Mar 2025 23:36:34 +0000 Subject: [PATCH 44/45] Update generated code for v1538 --- OPENAPI_VERSION | 2 +- src/main/java/com/stripe/model/QuotePreviewInvoice.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index f2790682173..5ae91bffb76 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1536 \ No newline at end of file +v1538 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/QuotePreviewInvoice.java b/src/main/java/com/stripe/model/QuotePreviewInvoice.java index 4882f4d149a..82ff6880994 100644 --- a/src/main/java/com/stripe/model/QuotePreviewInvoice.java +++ b/src/main/java/com/stripe/model/QuotePreviewInvoice.java @@ -531,6 +531,7 @@ public class QuotePreviewInvoice extends ApiResource implements HasId { @SerializedName("status_transitions") StatusTransitions statusTransitions; + /** The subscription that this invoice was prepared for, if any. */ @SerializedName("subscription") @Getter(lombok.AccessLevel.NONE) @Setter(lombok.AccessLevel.NONE) From ceb3bbb92a8ce7c4af898a5ea760372e732d754f Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Sat, 8 Mar 2025 00:53:37 +0000 Subject: [PATCH 45/45] Update generated code for v1540 --- OPENAPI_VERSION | 2 +- src/main/java/com/stripe/model/InvoiceItem.java | 13 ------------- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 5ae91bffb76..348e8d08625 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1538 \ No newline at end of file +v1540 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/InvoiceItem.java b/src/main/java/com/stripe/model/InvoiceItem.java index 258e84f68a3..178801ff1bc 100644 --- a/src/main/java/com/stripe/model/InvoiceItem.java +++ b/src/main/java/com/stripe/model/InvoiceItem.java @@ -133,17 +133,6 @@ public class InvoiceItem extends ApiResource implements HasId, MetadataStore