diff --git a/CHANGELOG.md b/CHANGELOG.md index 20acd73c76f..1f299f63ece 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -49,6 +49,13 @@ * Remove support for `from_schedule` on `Quote.subscription_data` * Add support for `allow_redisplay` on `terminal.ReaderCollectPaymentMethodParams.collect_config` +## 27.1.1 - 2024-10-18 +* [#1901](https://github.com/stripe/stripe-java/pull/1901) update object tags for meter-related classes + + - fixes a bug where the `object` property of the `MeterEvent`, `MeterEventAdjustment`, and `MeterEventSession` didn't match the server. +* [#1898](https://github.com/stripe/stripe-java/pull/1898) Clean up examples +* [#1894](https://github.com/stripe/stripe-java/pull/1894) Fixed example for raw request in readme file + ## 27.1.0 - 2024-10-03 * [#1890](https://github.com/stripe/stripe-java/pull/1890) Update the class for `ThinEvent` to include `livemode` and `reason` * [#1891](https://github.com/stripe/stripe-java/pull/1891) Removed the class `RequestSigningAuthenticator` that was added in the previous release. Request Signing is not supported yet. diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 622f8076664..d18dc2e69a4 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1314 \ No newline at end of file +v1317 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/Account.java b/src/main/java/com/stripe/model/Account.java index 99ecd87625d..55816228d91 100644 --- a/src/main/java/com/stripe/model/Account.java +++ b/src/main/java/com/stripe/model/Account.java @@ -1049,6 +1049,23 @@ public static class Capabilities extends StripeObject { @SerializedName("grabpay_payments") String grabpayPayments; + /** + * The status of the Indonesia Bank Transfer payments capability of the account, or whether the + * account can directly process Indonesia Bank Transfer charges. + * + *

One of {@code active}, {@code inactive}, or {@code pending}. + */ + @SerializedName("id_bank_transfer_payments") + String idBankTransferPayments; + + /** + * The status of Bank BCA onboarding of the account. + * + *

One of {@code active}, {@code inactive}, or {@code pending}. + */ + @SerializedName("id_bank_transfer_payments_bca") + String idBankTransferPaymentsBca; + /** * The status of the iDEAL payments capability of the account, or whether the account can * directly process iDEAL charges. @@ -2312,6 +2329,9 @@ public static class Settings extends StripeObject { @SerializedName("bacs_debit_payments") BacsDebitPayments bacsDebitPayments; + @SerializedName("bank_bca_onboarding") + BankBcaOnboarding bankBcaOnboarding; + @SerializedName("branding") Branding branding; @@ -2373,6 +2393,23 @@ public static class BacsDebitPayments extends StripeObject { String serviceUserNumber; } + /** + * For more details about BankBcaOnboarding, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class BankBcaOnboarding extends StripeObject { + /** Bank BCA business account holder name. */ + @SerializedName("account_holder_name") + String accountHolderName; + + /** Bank BCA business account number. */ + @SerializedName("business_account_number") + String businessAccountNumber; + } + /** * For more details about Branding, 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 71a09978cbc..3b04c751c3d 100644 --- a/src/main/java/com/stripe/model/Charge.java +++ b/src/main/java/com/stripe/model/Charge.java @@ -1205,6 +1205,9 @@ public static class PaymentMethodDetails extends StripeObject { @SerializedName("grabpay") Grabpay grabpay; + @SerializedName("id_bank_transfer") + IdBankTransfer idBankTransfer; + @SerializedName("ideal") Ideal ideal; @@ -2647,6 +2650,42 @@ public static class Grabpay extends StripeObject { 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. diff --git a/src/main/java/com/stripe/model/ConfirmationToken.java b/src/main/java/com/stripe/model/ConfirmationToken.java index 262d01fe461..1480b899a9d 100644 --- a/src/main/java/com/stripe/model/ConfirmationToken.java +++ b/src/main/java/com/stripe/model/ConfirmationToken.java @@ -307,6 +307,9 @@ public static class PaymentMethodPreview extends StripeObject { @SerializedName("grabpay") Grabpay grabpay; + @SerializedName("id_bank_transfer") + IdBankTransfer idBankTransfer; + @SerializedName("ideal") Ideal ideal; @@ -400,13 +403,13 @@ public static class PaymentMethodPreview extends StripeObject { * {@code alma}, {@code amazon_pay}, {@code au_becs_debit}, {@code bacs_debit}, {@code * bancontact}, {@code blik}, {@code boleto}, {@code card}, {@code card_present}, {@code * cashapp}, {@code customer_balance}, {@code eps}, {@code fpx}, {@code giropay}, {@code gopay}, - * {@code grabpay}, {@code ideal}, {@code interac_present}, {@code kakao_pay}, {@code klarna}, - * {@code konbini}, {@code kr_card}, {@code link}, {@code mb_way}, {@code mobilepay}, {@code - * multibanco}, {@code naver_pay}, {@code oxxo}, {@code p24}, {@code payco}, {@code paynow}, - * {@code paypal}, {@code payto}, {@code pix}, {@code promptpay}, {@code qris}, {@code - * rechnung}, {@code revolut_pay}, {@code samsung_pay}, {@code sepa_debit}, {@code shopeepay}, - * {@code sofort}, {@code swish}, {@code twint}, {@code us_bank_account}, {@code wechat_pay}, or - * {@code zip}. + * {@code grabpay}, {@code id_bank_transfer}, {@code ideal}, {@code interac_present}, {@code + * kakao_pay}, {@code klarna}, {@code konbini}, {@code kr_card}, {@code link}, {@code mb_way}, + * {@code mobilepay}, {@code multibanco}, {@code naver_pay}, {@code oxxo}, {@code p24}, {@code + * payco}, {@code paynow}, {@code paypal}, {@code payto}, {@code pix}, {@code promptpay}, {@code + * qris}, {@code rechnung}, {@code revolut_pay}, {@code samsung_pay}, {@code sepa_debit}, {@code + * shopeepay}, {@code sofort}, {@code swish}, {@code twint}, {@code us_bank_account}, {@code + * wechat_pay}, or {@code zip}. */ @SerializedName("type") String type; @@ -1560,6 +1563,27 @@ public static class Gopay extends StripeObject {} @EqualsAndHashCode(callSuper = false) public static class Grabpay extends StripeObject {} + /** + * For more details about IdBankTransfer, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class IdBankTransfer extends StripeObject { + @SerializedName("bank") + String bank; + + @SerializedName("bank_code") + String bankCode; + + @SerializedName("bank_name") + String bankName; + + @SerializedName("display_name") + String displayName; + } + /** * For more details about Ideal, please refer to the API * Reference. diff --git a/src/main/java/com/stripe/model/Event.java b/src/main/java/com/stripe/model/Event.java index c703e4989c2..1c3db39375f 100644 --- a/src/main/java/com/stripe/model/Event.java +++ b/src/main/java/com/stripe/model/Event.java @@ -177,8 +177,9 @@ public class Event extends ApiResource implements HasId { * issuing_personalization_design.deactivated}, {@code issuing_personalization_design.rejected}, * {@code issuing_personalization_design.updated}, {@code issuing_settlement.created}, {@code * issuing_settlement.updated}, {@code issuing_token.created}, {@code issuing_token.updated}, - * {@code issuing_transaction.created}, {@code issuing_transaction.updated}, {@code - * mandate.updated}, {@code payment_intent.amount_capturable_updated}, {@code + * {@code issuing_transaction.created}, {@code + * issuing_transaction.purchase_details_receipt_updated}, {@code issuing_transaction.updated}, + * {@code mandate.updated}, {@code payment_intent.amount_capturable_updated}, {@code * payment_intent.canceled}, {@code payment_intent.created}, {@code * payment_intent.partially_funded}, {@code payment_intent.payment_failed}, {@code * payment_intent.processing}, {@code payment_intent.requires_action}, {@code diff --git a/src/main/java/com/stripe/model/Invoice.java b/src/main/java/com/stripe/model/Invoice.java index 7c40cc8a437..59f2cddd01f 100644 --- a/src/main/java/com/stripe/model/Invoice.java +++ b/src/main/java/com/stripe/model/Invoice.java @@ -2769,6 +2769,13 @@ public static class PaymentMethodOptions extends StripeObject { @SerializedName("customer_balance") CustomerBalance customerBalance; + /** + * If paying by {@code id_bank_transfer}, this sub-hash contains details about the Indonesia + * bank transfer payment method options to pass to the invoice’s PaymentIntent. + */ + @SerializedName("id_bank_transfer") + IdBankTransfer idBankTransfer; + /** * If paying by {@code konbini}, this sub-hash contains details about the Konbini payment * method options to pass to the invoice’s PaymentIntent. @@ -2944,6 +2951,15 @@ public static class EuBankTransfer extends StripeObject { } } + /** + * For more details about IdBankTransfer, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class IdBankTransfer extends StripeObject {} + /** * For more details about Konbini, 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 48d462b7fb2..2d228b0a2cd 100644 --- a/src/main/java/com/stripe/model/PaymentIntent.java +++ b/src/main/java/com/stripe/model/PaymentIntent.java @@ -19,6 +19,7 @@ import com.stripe.param.PaymentIntentListParams; import com.stripe.param.PaymentIntentRetrieveParams; import com.stripe.param.PaymentIntentSearchParams; +import com.stripe.param.PaymentIntentTriggerActionParams; import com.stripe.param.PaymentIntentUpdateParams; import com.stripe.param.PaymentIntentVerifyMicrodepositsParams; import java.util.List; @@ -1486,6 +1487,47 @@ public static PaymentIntentSearchResult search( return getGlobalResponseGetter().request(request, PaymentIntentSearchResult.class); } + /** Trigger an external action on a PaymentIntent. */ + public static PaymentIntent triggerAction(String intent, Map params) + throws StripeException { + return triggerAction(intent, params, (RequestOptions) null); + } + + /** Trigger an external action on a PaymentIntent. */ + public static PaymentIntent triggerAction( + String intent, Map params, RequestOptions options) throws StripeException { + String path = + String.format( + "/v1/test/payment_intents/%s/trigger_action", ApiResource.urlEncodeId(intent)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options); + return getGlobalResponseGetter().request(request, PaymentIntent.class); + } + + /** Trigger an external action on a PaymentIntent. */ + public static PaymentIntent triggerAction(String intent, PaymentIntentTriggerActionParams params) + throws StripeException { + return triggerAction(intent, params, (RequestOptions) null); + } + + /** Trigger an external action on a PaymentIntent. */ + public static PaymentIntent triggerAction( + String intent, PaymentIntentTriggerActionParams params, RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/test/payment_intents/%s/trigger_action", ApiResource.urlEncodeId(intent)); + ApiResource.checkNullTypedParams(path, params); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return getGlobalResponseGetter().request(request, PaymentIntent.class); + } + /** * Updates properties on a PaymentIntent object without confirming. * @@ -2997,6 +3039,9 @@ public static class PaymentMethodOptions extends StripeObject { @SerializedName("grabpay") Grabpay grabpay; + @SerializedName("id_bank_transfer") + IdBankTransfer idBankTransfer; + @SerializedName("ideal") Ideal ideal; @@ -4246,6 +4291,53 @@ public static class Grabpay extends StripeObject { String setupFutureUsage; } + /** + * For more details about IdBankTransfer, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class IdBankTransfer extends StripeObject { + /** + * The UNIX timestamp until which the virtual bank account is valid. Permitted range is from + * now till 2678400 seconds (31 days) from now. + */ + @SerializedName("expires_after") + Long expiresAfter; + + /** + * The UNIX timestamp until which the virtual bank account is valid. Permitted range is from + * now until 30 days from now. If unset, it defaults to 1 days from now. + */ + @SerializedName("expires_at") + Long expiresAt; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

Equal to {@code none}. + */ + @SerializedName("setup_future_usage") + String setupFutureUsage; + } + /** * For more details about Ideal, 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 e435f8dc12e..4782c3741da 100644 --- a/src/main/java/com/stripe/model/PaymentMethod.java +++ b/src/main/java/com/stripe/model/PaymentMethod.java @@ -125,6 +125,9 @@ public class PaymentMethod extends ApiResource implements HasId, MetadataStore

API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class IdBankTransfer extends StripeObject { + @SerializedName("bank") + String bank; + + @SerializedName("bank_code") + String bankCode; + + @SerializedName("bank_name") + String bankName; + + @SerializedName("display_name") + String displayName; + } + /** * For more details about Ideal, please refer to the API * Reference. @@ -2563,6 +2588,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { trySetResponseGetter(giropay, responseGetter); trySetResponseGetter(gopay, responseGetter); trySetResponseGetter(grabpay, responseGetter); + trySetResponseGetter(idBankTransfer, responseGetter); trySetResponseGetter(ideal, responseGetter); trySetResponseGetter(interacPresent, responseGetter); trySetResponseGetter(kakaoPay, responseGetter); diff --git a/src/main/java/com/stripe/model/PaymentMethodConfiguration.java b/src/main/java/com/stripe/model/PaymentMethodConfiguration.java index 3ac631dc81c..933e20f218d 100644 --- a/src/main/java/com/stripe/model/PaymentMethodConfiguration.java +++ b/src/main/java/com/stripe/model/PaymentMethodConfiguration.java @@ -128,6 +128,9 @@ public class PaymentMethodConfiguration extends ApiResource implements HasId { @SerializedName("id") String id; + @SerializedName("id_bank_transfer") + IdBankTransfer idBankTransfer; + @SerializedName("ideal") Ideal ideal; @@ -1443,6 +1446,57 @@ public static class DisplayPreference extends StripeObject { } } + /** + * For more details about IdBankTransfer, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class IdBankTransfer 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 Ideal, please refer to the API * Reference. @@ -2538,6 +2592,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { trySetResponseGetter(giropay, responseGetter); trySetResponseGetter(googlePay, responseGetter); trySetResponseGetter(grabpay, responseGetter); + trySetResponseGetter(idBankTransfer, responseGetter); trySetResponseGetter(ideal, responseGetter); trySetResponseGetter(jcb, responseGetter); trySetResponseGetter(klarna, responseGetter); diff --git a/src/main/java/com/stripe/model/QuotePreviewInvoice.java b/src/main/java/com/stripe/model/QuotePreviewInvoice.java index 4ef6259db5b..910deee65c5 100644 --- a/src/main/java/com/stripe/model/QuotePreviewInvoice.java +++ b/src/main/java/com/stripe/model/QuotePreviewInvoice.java @@ -1285,6 +1285,13 @@ public static class PaymentMethodOptions extends StripeObject { @SerializedName("customer_balance") CustomerBalance customerBalance; + /** + * If paying by {@code id_bank_transfer}, this sub-hash contains details about the Indonesia + * bank transfer payment method options to pass to the invoice’s PaymentIntent. + */ + @SerializedName("id_bank_transfer") + IdBankTransfer idBankTransfer; + /** * If paying by {@code konbini}, this sub-hash contains details about the Konbini payment * method options to pass to the invoice’s PaymentIntent. @@ -1460,6 +1467,15 @@ public static class EuBankTransfer extends StripeObject { } } + /** + * For more details about IdBankTransfer, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class IdBankTransfer extends StripeObject {} + /** * For more details about Konbini, please refer to the API Reference. diff --git a/src/main/java/com/stripe/model/Refund.java b/src/main/java/com/stripe/model/Refund.java index abc20824101..63522d50a56 100644 --- a/src/main/java/com/stripe/model/Refund.java +++ b/src/main/java/com/stripe/model/Refund.java @@ -631,6 +631,9 @@ public static class DestinationDetails extends StripeObject { @SerializedName("grabpay") Grabpay grabpay; + @SerializedName("id_bank_transfer") + IdBankTransfer idBankTransfer; + @SerializedName("jp_bank_transfer") JpBankTransfer jpBankTransfer; @@ -895,6 +898,26 @@ public static class Giropay extends StripeObject {} @EqualsAndHashCode(callSuper = false) public static class Grabpay extends StripeObject {} + /** + * For more details about IdBankTransfer, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class IdBankTransfer extends StripeObject { + /** The reference assigned to the refund. */ + @SerializedName("reference") + String reference; + + /** + * Status of the reference on the refund. This can be {@code pending}, {@code available} or + * {@code unavailable}. + */ + @SerializedName("reference_status") + String referenceStatus; + } + /** * For more details about JpBankTransfer, please refer to the API Reference. diff --git a/src/main/java/com/stripe/model/SetupAttempt.java b/src/main/java/com/stripe/model/SetupAttempt.java index f4ab64eaae9..253acfb9e02 100644 --- a/src/main/java/com/stripe/model/SetupAttempt.java +++ b/src/main/java/com/stripe/model/SetupAttempt.java @@ -295,6 +295,9 @@ public static class PaymentMethodDetails extends StripeObject { @SerializedName("cashapp") Cashapp cashapp; + @SerializedName("id_bank_transfer") + IdBankTransfer idBankTransfer; + @SerializedName("ideal") Ideal ideal; @@ -773,6 +776,38 @@ public static class Offline extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class Cashapp extends StripeObject {} + /** + * For more details about IdBankTransfer, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class IdBankTransfer extends StripeObject { + /** + * 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. diff --git a/src/main/java/com/stripe/model/Subscription.java b/src/main/java/com/stripe/model/Subscription.java index 2befa46889b..22fbea87369 100644 --- a/src/main/java/com/stripe/model/Subscription.java +++ b/src/main/java/com/stripe/model/Subscription.java @@ -1658,6 +1658,13 @@ public static class PaymentMethodOptions extends StripeObject { @SerializedName("customer_balance") CustomerBalance customerBalance; + /** + * This sub-hash contains details about the Indonesia bank transfer payment method options to + * pass to invoices created by the subscription. + */ + @SerializedName("id_bank_transfer") + IdBankTransfer idBankTransfer; + /** * This sub-hash contains details about the Konbini payment method options to pass to invoices * created by the subscription. @@ -1855,6 +1862,15 @@ public static class EuBankTransfer extends StripeObject { } } + /** + * For more details about IdBankTransfer, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class IdBankTransfer extends StripeObject {} + /** * For more details about Konbini, please refer to the API Reference. diff --git a/src/main/java/com/stripe/param/AccountCreateParams.java b/src/main/java/com/stripe/param/AccountCreateParams.java index 1aa55056048..9e4a62b04f4 100644 --- a/src/main/java/com/stripe/param/AccountCreateParams.java +++ b/src/main/java/com/stripe/param/AccountCreateParams.java @@ -1318,6 +1318,14 @@ public static class Capabilities { @SerializedName("grabpay_payments") GrabpayPayments grabpayPayments; + /** The id_bank_transfer_payments capability. */ + @SerializedName("id_bank_transfer_payments") + IdBankTransferPayments idBankTransferPayments; + + /** The id_bank_transfer_payments_bca capability. */ + @SerializedName("id_bank_transfer_payments_bca") + IdBankTransferPaymentsBca idBankTransferPaymentsBca; + /** The ideal_payments capability. */ @SerializedName("ideal_payments") IdealPayments idealPayments; @@ -1509,6 +1517,8 @@ private Capabilities( GiropayPayments giropayPayments, GopayPayments gopayPayments, GrabpayPayments grabpayPayments, + IdBankTransferPayments idBankTransferPayments, + IdBankTransferPaymentsBca idBankTransferPaymentsBca, IdealPayments idealPayments, IndiaInternationalPayments indiaInternationalPayments, JcbPayments jcbPayments, @@ -1573,6 +1583,8 @@ private Capabilities( this.giropayPayments = giropayPayments; this.gopayPayments = gopayPayments; this.grabpayPayments = grabpayPayments; + this.idBankTransferPayments = idBankTransferPayments; + this.idBankTransferPaymentsBca = idBankTransferPaymentsBca; this.idealPayments = idealPayments; this.indiaInternationalPayments = indiaInternationalPayments; this.jcbPayments = jcbPayments; @@ -1666,6 +1678,10 @@ public static class Builder { private GrabpayPayments grabpayPayments; + private IdBankTransferPayments idBankTransferPayments; + + private IdBankTransferPaymentsBca idBankTransferPaymentsBca; + private IdealPayments idealPayments; private IndiaInternationalPayments indiaInternationalPayments; @@ -1775,6 +1791,8 @@ public AccountCreateParams.Capabilities build() { this.giropayPayments, this.gopayPayments, this.grabpayPayments, + this.idBankTransferPayments, + this.idBankTransferPaymentsBca, this.idealPayments, this.indiaInternationalPayments, this.jcbPayments, @@ -1986,6 +2004,20 @@ public Builder setGrabpayPayments( return this; } + /** The id_bank_transfer_payments capability. */ + public Builder setIdBankTransferPayments( + AccountCreateParams.Capabilities.IdBankTransferPayments idBankTransferPayments) { + this.idBankTransferPayments = idBankTransferPayments; + return this; + } + + /** The id_bank_transfer_payments_bca capability. */ + public Builder setIdBankTransferPaymentsBca( + AccountCreateParams.Capabilities.IdBankTransferPaymentsBca idBankTransferPaymentsBca) { + this.idBankTransferPaymentsBca = idBankTransferPaymentsBca; + return this; + } + /** The ideal_payments capability. */ public Builder setIdealPayments( AccountCreateParams.Capabilities.IdealPayments idealPayments) { @@ -3929,6 +3961,164 @@ public Builder setRequested(Boolean requested) { } } + @Getter + public static class IdBankTransferPayments { + /** + * Map of extra parameters 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 IdBankTransferPayments(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.IdBankTransferPayments build() { + return new AccountCreateParams.Capabilities.IdBankTransferPayments( + 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.IdBankTransferPayments#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.IdBankTransferPayments#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 IdBankTransferPaymentsBca { + /** + * Map of extra parameters 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 IdBankTransferPaymentsBca(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.IdBankTransferPaymentsBca build() { + return new AccountCreateParams.Capabilities.IdBankTransferPaymentsBca( + 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.IdBankTransferPaymentsBca#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.IdBankTransferPaymentsBca#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 IdealPayments { /** @@ -12154,6 +12344,10 @@ public static class Settings { @SerializedName("bacs_debit_payments") BacsDebitPayments bacsDebitPayments; + /** Settings specific to bank BCA onboarding for Indonesia bank transfers payments method. */ + @SerializedName("bank_bca_onboarding") + BankBcaOnboarding bankBcaOnboarding; + /** * Settings used to apply the account's branding to email receipts, invoices, Checkout, and * other products. @@ -12200,6 +12394,7 @@ public static class Settings { private Settings( BacsDebitPayments bacsDebitPayments, + BankBcaOnboarding bankBcaOnboarding, Branding branding, Capital capital, CardIssuing cardIssuing, @@ -12210,6 +12405,7 @@ private Settings( TaxForms taxForms, Treasury treasury) { this.bacsDebitPayments = bacsDebitPayments; + this.bankBcaOnboarding = bankBcaOnboarding; this.branding = branding; this.capital = capital; this.cardIssuing = cardIssuing; @@ -12228,6 +12424,8 @@ public static Builder builder() { public static class Builder { private BacsDebitPayments bacsDebitPayments; + private BankBcaOnboarding bankBcaOnboarding; + private Branding branding; private Capital capital; @@ -12250,6 +12448,7 @@ public static class Builder { public AccountCreateParams.Settings build() { return new AccountCreateParams.Settings( this.bacsDebitPayments, + this.bankBcaOnboarding, this.branding, this.capital, this.cardIssuing, @@ -12268,6 +12467,13 @@ public Builder setBacsDebitPayments( return this; } + /** Settings specific to bank BCA onboarding for Indonesia bank transfers payments method. */ + public Builder setBankBcaOnboarding( + AccountCreateParams.Settings.BankBcaOnboarding bankBcaOnboarding) { + this.bankBcaOnboarding = bankBcaOnboarding; + return this; + } + /** * Settings used to apply the account's branding to email receipts, invoices, Checkout, and * other products. @@ -12433,6 +12639,91 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + public static class BankBcaOnboarding { + /** Bank BCA business account holder name. */ + @SerializedName("account_holder_name") + String accountHolderName; + + /** Bank BCA business account number. */ + @SerializedName("business_account_number") + String businessAccountNumber; + + /** + * Map of extra parameters 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 BankBcaOnboarding( + String accountHolderName, String businessAccountNumber, Map extraParams) { + this.accountHolderName = accountHolderName; + this.businessAccountNumber = businessAccountNumber; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String accountHolderName; + + private String businessAccountNumber; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Settings.BankBcaOnboarding build() { + return new AccountCreateParams.Settings.BankBcaOnboarding( + this.accountHolderName, this.businessAccountNumber, this.extraParams); + } + + /** Bank BCA business account holder name. */ + public Builder setAccountHolderName(String accountHolderName) { + this.accountHolderName = accountHolderName; + return this; + } + + /** Bank BCA business account number. */ + public Builder setBusinessAccountNumber(String businessAccountNumber) { + this.businessAccountNumber = businessAccountNumber; + 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.Settings.BankBcaOnboarding#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.Settings.BankBcaOnboarding#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 Branding { /** diff --git a/src/main/java/com/stripe/param/AccountUpdateParams.java b/src/main/java/com/stripe/param/AccountUpdateParams.java index 0cdd4256b79..c5a1ebccc07 100644 --- a/src/main/java/com/stripe/param/AccountUpdateParams.java +++ b/src/main/java/com/stripe/param/AccountUpdateParams.java @@ -1416,6 +1416,14 @@ public static class Capabilities { @SerializedName("grabpay_payments") GrabpayPayments grabpayPayments; + /** The id_bank_transfer_payments capability. */ + @SerializedName("id_bank_transfer_payments") + IdBankTransferPayments idBankTransferPayments; + + /** The id_bank_transfer_payments_bca capability. */ + @SerializedName("id_bank_transfer_payments_bca") + IdBankTransferPaymentsBca idBankTransferPaymentsBca; + /** The ideal_payments capability. */ @SerializedName("ideal_payments") IdealPayments idealPayments; @@ -1607,6 +1615,8 @@ private Capabilities( GiropayPayments giropayPayments, GopayPayments gopayPayments, GrabpayPayments grabpayPayments, + IdBankTransferPayments idBankTransferPayments, + IdBankTransferPaymentsBca idBankTransferPaymentsBca, IdealPayments idealPayments, IndiaInternationalPayments indiaInternationalPayments, JcbPayments jcbPayments, @@ -1671,6 +1681,8 @@ private Capabilities( this.giropayPayments = giropayPayments; this.gopayPayments = gopayPayments; this.grabpayPayments = grabpayPayments; + this.idBankTransferPayments = idBankTransferPayments; + this.idBankTransferPaymentsBca = idBankTransferPaymentsBca; this.idealPayments = idealPayments; this.indiaInternationalPayments = indiaInternationalPayments; this.jcbPayments = jcbPayments; @@ -1764,6 +1776,10 @@ public static class Builder { private GrabpayPayments grabpayPayments; + private IdBankTransferPayments idBankTransferPayments; + + private IdBankTransferPaymentsBca idBankTransferPaymentsBca; + private IdealPayments idealPayments; private IndiaInternationalPayments indiaInternationalPayments; @@ -1873,6 +1889,8 @@ public AccountUpdateParams.Capabilities build() { this.giropayPayments, this.gopayPayments, this.grabpayPayments, + this.idBankTransferPayments, + this.idBankTransferPaymentsBca, this.idealPayments, this.indiaInternationalPayments, this.jcbPayments, @@ -2084,6 +2102,20 @@ public Builder setGrabpayPayments( return this; } + /** The id_bank_transfer_payments capability. */ + public Builder setIdBankTransferPayments( + AccountUpdateParams.Capabilities.IdBankTransferPayments idBankTransferPayments) { + this.idBankTransferPayments = idBankTransferPayments; + return this; + } + + /** The id_bank_transfer_payments_bca capability. */ + public Builder setIdBankTransferPaymentsBca( + AccountUpdateParams.Capabilities.IdBankTransferPaymentsBca idBankTransferPaymentsBca) { + this.idBankTransferPaymentsBca = idBankTransferPaymentsBca; + return this; + } + /** The ideal_payments capability. */ public Builder setIdealPayments( AccountUpdateParams.Capabilities.IdealPayments idealPayments) { @@ -4027,6 +4059,164 @@ public Builder setRequested(Boolean requested) { } } + @Getter + public static class IdBankTransferPayments { + /** + * Map of extra parameters 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 IdBankTransferPayments(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.IdBankTransferPayments build() { + return new AccountUpdateParams.Capabilities.IdBankTransferPayments( + 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.IdBankTransferPayments#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.IdBankTransferPayments#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 IdBankTransferPaymentsBca { + /** + * Map of extra parameters 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 IdBankTransferPaymentsBca(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.IdBankTransferPaymentsBca build() { + return new AccountUpdateParams.Capabilities.IdBankTransferPaymentsBca( + 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.IdBankTransferPaymentsBca#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.IdBankTransferPaymentsBca#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 IdealPayments { /** @@ -12136,6 +12326,10 @@ public static class Settings { @SerializedName("bacs_debit_payments") BacsDebitPayments bacsDebitPayments; + /** Settings specific to bank BCA onboarding for Indonesia bank transfers payments method. */ + @SerializedName("bank_bca_onboarding") + BankBcaOnboarding bankBcaOnboarding; + /** * Settings used to apply the account's branding to email receipts, invoices, Checkout, and * other products. @@ -12186,6 +12380,7 @@ public static class Settings { private Settings( BacsDebitPayments bacsDebitPayments, + BankBcaOnboarding bankBcaOnboarding, Branding branding, Capital capital, CardIssuing cardIssuing, @@ -12197,6 +12392,7 @@ private Settings( TaxForms taxForms, Treasury treasury) { this.bacsDebitPayments = bacsDebitPayments; + this.bankBcaOnboarding = bankBcaOnboarding; this.branding = branding; this.capital = capital; this.cardIssuing = cardIssuing; @@ -12216,6 +12412,8 @@ public static Builder builder() { public static class Builder { private BacsDebitPayments bacsDebitPayments; + private BankBcaOnboarding bankBcaOnboarding; + private Branding branding; private Capital capital; @@ -12240,6 +12438,7 @@ public static class Builder { public AccountUpdateParams.Settings build() { return new AccountUpdateParams.Settings( this.bacsDebitPayments, + this.bankBcaOnboarding, this.branding, this.capital, this.cardIssuing, @@ -12259,6 +12458,13 @@ public Builder setBacsDebitPayments( return this; } + /** Settings specific to bank BCA onboarding for Indonesia bank transfers payments method. */ + public Builder setBankBcaOnboarding( + AccountUpdateParams.Settings.BankBcaOnboarding bankBcaOnboarding) { + this.bankBcaOnboarding = bankBcaOnboarding; + return this; + } + /** * Settings used to apply the account's branding to email receipts, invoices, Checkout, and * other products. @@ -12444,6 +12650,103 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + public static class BankBcaOnboarding { + /** Bank BCA business account holder name. */ + @SerializedName("account_holder_name") + Object accountHolderName; + + /** Bank BCA business account number. */ + @SerializedName("business_account_number") + Object businessAccountNumber; + + /** + * Map of extra parameters 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 BankBcaOnboarding( + Object accountHolderName, Object businessAccountNumber, Map extraParams) { + this.accountHolderName = accountHolderName; + this.businessAccountNumber = businessAccountNumber; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object accountHolderName; + + private Object businessAccountNumber; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Settings.BankBcaOnboarding build() { + return new AccountUpdateParams.Settings.BankBcaOnboarding( + this.accountHolderName, this.businessAccountNumber, this.extraParams); + } + + /** Bank BCA business account holder name. */ + public Builder setAccountHolderName(String accountHolderName) { + this.accountHolderName = accountHolderName; + return this; + } + + /** Bank BCA business account holder name. */ + public Builder setAccountHolderName(EmptyParam accountHolderName) { + this.accountHolderName = accountHolderName; + return this; + } + + /** Bank BCA business account number. */ + public Builder setBusinessAccountNumber(String businessAccountNumber) { + this.businessAccountNumber = businessAccountNumber; + return this; + } + + /** Bank BCA business account number. */ + public Builder setBusinessAccountNumber(EmptyParam businessAccountNumber) { + this.businessAccountNumber = businessAccountNumber; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Settings.BankBcaOnboarding#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Settings.BankBcaOnboarding#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 Branding { /** diff --git a/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java b/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java index 30ce4029126..317c3e28cb5 100644 --- a/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java +++ b/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java @@ -344,6 +344,13 @@ public static class PaymentMethodData { @SerializedName("grabpay") Grabpay grabpay; + /** + * If this is an {@code IdBankTransfer} PaymentMethod, this hash contains details about the + * IdBankTransfer payment method. + */ + @SerializedName("id_bank_transfer") + IdBankTransfer idBankTransfer; + /** * If this is an {@code ideal} PaymentMethod, this hash contains details about the iDEAL payment * method. @@ -606,6 +613,7 @@ private PaymentMethodData( Giropay giropay, Gopay gopay, Grabpay grabpay, + IdBankTransfer idBankTransfer, Ideal ideal, InteracPresent interacPresent, KakaoPay kakaoPay, @@ -661,6 +669,7 @@ private PaymentMethodData( this.giropay = giropay; this.gopay = gopay; this.grabpay = grabpay; + this.idBankTransfer = idBankTransfer; this.ideal = ideal; this.interacPresent = interacPresent; this.kakaoPay = kakaoPay; @@ -744,6 +753,8 @@ public static class Builder { private Grabpay grabpay; + private IdBankTransfer idBankTransfer; + private Ideal ideal; private InteracPresent interacPresent; @@ -836,6 +847,7 @@ public ConfirmationTokenCreateParams.PaymentMethodData build() { this.giropay, this.gopay, this.grabpay, + this.idBankTransfer, this.ideal, this.interacPresent, this.kakaoPay, @@ -1089,6 +1101,16 @@ public Builder setGrabpay(ConfirmationTokenCreateParams.PaymentMethodData.Grabpa return this; } + /** + * If this is an {@code IdBankTransfer} PaymentMethod, this hash contains details about the + * IdBankTransfer payment method. + */ + public Builder setIdBankTransfer( + ConfirmationTokenCreateParams.PaymentMethodData.IdBankTransfer idBankTransfer) { + this.idBankTransfer = idBankTransfer; + return this; + } + /** * If this is an {@code ideal} PaymentMethod, this hash contains details about the iDEAL * payment method. @@ -3105,6 +3127,104 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + public static class IdBankTransfer { + /** Bank where the account is held. */ + @SerializedName("bank") + Bank bank; + + /** + * Map of extra parameters 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 IdBankTransfer(Bank bank, Map extraParams) { + this.bank = bank; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Bank bank; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public ConfirmationTokenCreateParams.PaymentMethodData.IdBankTransfer build() { + return new ConfirmationTokenCreateParams.PaymentMethodData.IdBankTransfer( + this.bank, this.extraParams); + } + + /** Bank where the account is held. */ + public Builder setBank( + ConfirmationTokenCreateParams.PaymentMethodData.IdBankTransfer.Bank bank) { + this.bank = bank; + 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 + * ConfirmationTokenCreateParams.PaymentMethodData.IdBankTransfer#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.IdBankTransfer#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 Bank implements ApiRequestParams.EnumParam { + @SerializedName("bca") + BCA("bca"), + + @SerializedName("bni") + BNI("bni"), + + @SerializedName("bri") + BRI("bri"), + + @SerializedName("cimb") + CIMB("cimb"), + + @SerializedName("permata") + PERMATA("permata"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Bank(String value) { + this.value = value; + } + } + } + @Getter public static class Ideal { /** @@ -5682,6 +5802,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("grabpay") GRABPAY("grabpay"), + @SerializedName("id_bank_transfer") + ID_BANK_TRANSFER("id_bank_transfer"), + @SerializedName("ideal") IDEAL("ideal"), diff --git a/src/main/java/com/stripe/param/CustomerListPaymentMethodsParams.java b/src/main/java/com/stripe/param/CustomerListPaymentMethodsParams.java index b2e9ce0d5b9..dbafb882f67 100644 --- a/src/main/java/com/stripe/param/CustomerListPaymentMethodsParams.java +++ b/src/main/java/com/stripe/param/CustomerListPaymentMethodsParams.java @@ -297,6 +297,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("grabpay") GRABPAY("grabpay"), + @SerializedName("id_bank_transfer") + ID_BANK_TRANSFER("id_bank_transfer"), + @SerializedName("ideal") IDEAL("ideal"), diff --git a/src/main/java/com/stripe/param/CustomerPaymentMethodListParams.java b/src/main/java/com/stripe/param/CustomerPaymentMethodListParams.java index 8380493b5c0..751062b2841 100644 --- a/src/main/java/com/stripe/param/CustomerPaymentMethodListParams.java +++ b/src/main/java/com/stripe/param/CustomerPaymentMethodListParams.java @@ -297,6 +297,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("grabpay") GRABPAY("grabpay"), + @SerializedName("id_bank_transfer") + ID_BANK_TRANSFER("id_bank_transfer"), + @SerializedName("ideal") IDEAL("ideal"), diff --git a/src/main/java/com/stripe/param/InvoiceCreateParams.java b/src/main/java/com/stripe/param/InvoiceCreateParams.java index fef1c9b6e28..1621e624e06 100644 --- a/src/main/java/com/stripe/param/InvoiceCreateParams.java +++ b/src/main/java/com/stripe/param/InvoiceCreateParams.java @@ -2164,6 +2164,13 @@ public static class PaymentMethodOptions { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** + * If paying by {@code id_bank_transfer}, this sub-hash contains details about the Indonesia + * bank transfer payment method options to pass to the invoice’s PaymentIntent. + */ + @SerializedName("id_bank_transfer") + Object idBankTransfer; + /** * If paying by {@code konbini}, this sub-hash contains details about the Konbini payment * method options to pass to the invoice’s PaymentIntent. @@ -2191,6 +2198,7 @@ private PaymentMethodOptions( Object card, Object customerBalance, Map extraParams, + Object idBankTransfer, Object konbini, Object sepaDebit, Object usBankAccount) { @@ -2199,6 +2207,7 @@ private PaymentMethodOptions( this.card = card; this.customerBalance = customerBalance; this.extraParams = extraParams; + this.idBankTransfer = idBankTransfer; this.konbini = konbini; this.sepaDebit = sepaDebit; this.usBankAccount = usBankAccount; @@ -2219,6 +2228,8 @@ public static class Builder { private Map extraParams; + private Object idBankTransfer; + private Object konbini; private Object sepaDebit; @@ -2233,6 +2244,7 @@ public InvoiceCreateParams.PaymentSettings.PaymentMethodOptions build() { this.card, this.customerBalance, this.extraParams, + this.idBankTransfer, this.konbini, this.sepaDebit, this.usBankAccount); @@ -2342,6 +2354,26 @@ public Builder putAllExtraParam(Map map) { return this; } + /** + * If paying by {@code id_bank_transfer}, this sub-hash contains details about the Indonesia + * bank transfer payment method options to pass to the invoice’s PaymentIntent. + */ + public Builder setIdBankTransfer( + InvoiceCreateParams.PaymentSettings.PaymentMethodOptions.IdBankTransfer + idBankTransfer) { + this.idBankTransfer = idBankTransfer; + return this; + } + + /** + * If paying by {@code id_bank_transfer}, this sub-hash contains details about the Indonesia + * bank transfer payment method options to pass to the invoice’s PaymentIntent. + */ + public Builder setIdBankTransfer(EmptyParam idBankTransfer) { + this.idBankTransfer = idBankTransfer; + return this; + } + /** * If paying by {@code konbini}, this sub-hash contains details about the Konbini payment * method options to pass to the invoice’s PaymentIntent. @@ -3386,6 +3418,67 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + public static class IdBankTransfer { + /** + * Map of extra parameters 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 IdBankTransfer(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 InvoiceCreateParams.PaymentSettings.PaymentMethodOptions.IdBankTransfer build() { + return new InvoiceCreateParams.PaymentSettings.PaymentMethodOptions.IdBankTransfer( + 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 + * InvoiceCreateParams.PaymentSettings.PaymentMethodOptions.IdBankTransfer#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 + * InvoiceCreateParams.PaymentSettings.PaymentMethodOptions.IdBankTransfer#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 Konbini { /** @@ -4060,6 +4153,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("grabpay") GRABPAY("grabpay"), + @SerializedName("id_bank_transfer") + ID_BANK_TRANSFER("id_bank_transfer"), + @SerializedName("ideal") IDEAL("ideal"), diff --git a/src/main/java/com/stripe/param/InvoiceUpdateParams.java b/src/main/java/com/stripe/param/InvoiceUpdateParams.java index cb1f87c3d93..600c952a117 100644 --- a/src/main/java/com/stripe/param/InvoiceUpdateParams.java +++ b/src/main/java/com/stripe/param/InvoiceUpdateParams.java @@ -2172,6 +2172,13 @@ public static class PaymentMethodOptions { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** + * If paying by {@code id_bank_transfer}, this sub-hash contains details about the Indonesia + * bank transfer payment method options to pass to the invoice’s PaymentIntent. + */ + @SerializedName("id_bank_transfer") + Object idBankTransfer; + /** * If paying by {@code konbini}, this sub-hash contains details about the Konbini payment * method options to pass to the invoice’s PaymentIntent. @@ -2199,6 +2206,7 @@ private PaymentMethodOptions( Object card, Object customerBalance, Map extraParams, + Object idBankTransfer, Object konbini, Object sepaDebit, Object usBankAccount) { @@ -2207,6 +2215,7 @@ private PaymentMethodOptions( this.card = card; this.customerBalance = customerBalance; this.extraParams = extraParams; + this.idBankTransfer = idBankTransfer; this.konbini = konbini; this.sepaDebit = sepaDebit; this.usBankAccount = usBankAccount; @@ -2227,6 +2236,8 @@ public static class Builder { private Map extraParams; + private Object idBankTransfer; + private Object konbini; private Object sepaDebit; @@ -2241,6 +2252,7 @@ public InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions build() { this.card, this.customerBalance, this.extraParams, + this.idBankTransfer, this.konbini, this.sepaDebit, this.usBankAccount); @@ -2350,6 +2362,26 @@ public Builder putAllExtraParam(Map map) { return this; } + /** + * If paying by {@code id_bank_transfer}, this sub-hash contains details about the Indonesia + * bank transfer payment method options to pass to the invoice’s PaymentIntent. + */ + public Builder setIdBankTransfer( + InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.IdBankTransfer + idBankTransfer) { + this.idBankTransfer = idBankTransfer; + return this; + } + + /** + * If paying by {@code id_bank_transfer}, this sub-hash contains details about the Indonesia + * bank transfer payment method options to pass to the invoice’s PaymentIntent. + */ + public Builder setIdBankTransfer(EmptyParam idBankTransfer) { + this.idBankTransfer = idBankTransfer; + return this; + } + /** * If paying by {@code konbini}, this sub-hash contains details about the Konbini payment * method options to pass to the invoice’s PaymentIntent. @@ -3423,6 +3455,67 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + public static class IdBankTransfer { + /** + * Map of extra parameters 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 IdBankTransfer(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 InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.IdBankTransfer build() { + return new InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.IdBankTransfer( + 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 + * InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.IdBankTransfer#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 + * InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.IdBankTransfer#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 Konbini { /** @@ -4103,6 +4196,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("grabpay") GRABPAY("grabpay"), + @SerializedName("id_bank_transfer") + ID_BANK_TRANSFER("id_bank_transfer"), + @SerializedName("ideal") IDEAL("ideal"), diff --git a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java index 509a3d54468..f42753c7d4e 100644 --- a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java @@ -5458,6 +5458,13 @@ public static class PaymentMethodData { @SerializedName("grabpay") Grabpay grabpay; + /** + * If this is an {@code IdBankTransfer} PaymentMethod, this hash contains details about the + * IdBankTransfer payment method. + */ + @SerializedName("id_bank_transfer") + IdBankTransfer idBankTransfer; + /** * If this is an {@code ideal} PaymentMethod, this hash contains details about the iDEAL payment * method. @@ -5720,6 +5727,7 @@ private PaymentMethodData( Giropay giropay, Gopay gopay, Grabpay grabpay, + IdBankTransfer idBankTransfer, Ideal ideal, InteracPresent interacPresent, KakaoPay kakaoPay, @@ -5775,6 +5783,7 @@ private PaymentMethodData( this.giropay = giropay; this.gopay = gopay; this.grabpay = grabpay; + this.idBankTransfer = idBankTransfer; this.ideal = ideal; this.interacPresent = interacPresent; this.kakaoPay = kakaoPay; @@ -5858,6 +5867,8 @@ public static class Builder { private Grabpay grabpay; + private IdBankTransfer idBankTransfer; + private Ideal ideal; private InteracPresent interacPresent; @@ -5950,6 +5961,7 @@ public PaymentIntentConfirmParams.PaymentMethodData build() { this.giropay, this.gopay, this.grabpay, + this.idBankTransfer, this.ideal, this.interacPresent, this.kakaoPay, @@ -6203,6 +6215,16 @@ public Builder setGrabpay(PaymentIntentConfirmParams.PaymentMethodData.Grabpay g return this; } + /** + * If this is an {@code IdBankTransfer} PaymentMethod, this hash contains details about the + * IdBankTransfer payment method. + */ + public Builder setIdBankTransfer( + PaymentIntentConfirmParams.PaymentMethodData.IdBankTransfer idBankTransfer) { + this.idBankTransfer = idBankTransfer; + return this; + } + /** * If this is an {@code ideal} PaymentMethod, this hash contains details about the iDEAL * payment method. @@ -8209,6 +8231,102 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + public static class IdBankTransfer { + /** Bank where the account is held. */ + @SerializedName("bank") + Bank bank; + + /** + * Map of extra parameters 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 IdBankTransfer(Bank bank, Map extraParams) { + this.bank = bank; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Bank bank; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodData.IdBankTransfer build() { + return new PaymentIntentConfirmParams.PaymentMethodData.IdBankTransfer( + this.bank, this.extraParams); + } + + /** Bank where the account is held. */ + public Builder setBank( + PaymentIntentConfirmParams.PaymentMethodData.IdBankTransfer.Bank bank) { + this.bank = bank; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.IdBankTransfer#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.IdBankTransfer#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 Bank implements ApiRequestParams.EnumParam { + @SerializedName("bca") + BCA("bca"), + + @SerializedName("bni") + BNI("bni"), + + @SerializedName("bri") + BRI("bri"), + + @SerializedName("cimb") + CIMB("cimb"), + + @SerializedName("permata") + PERMATA("permata"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Bank(String value) { + this.value = value; + } + } + } + @Getter public static class Ideal { /** @@ -10778,6 +10896,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("grabpay") GRABPAY("grabpay"), + @SerializedName("id_bank_transfer") + ID_BANK_TRANSFER("id_bank_transfer"), + @SerializedName("ideal") IDEAL("ideal"), @@ -11025,6 +11146,13 @@ public static class PaymentMethodOptions { @SerializedName("grabpay") Object grabpay; + /** + * If this is a {@code id_bank_transfer} PaymentMethod, this sub-hash contains details about the + * Indonesia Bank Transfer payment method options. + */ + @SerializedName("id_bank_transfer") + Object idBankTransfer; + /** * If this is a {@code ideal} PaymentMethod, this sub-hash contains details about the Ideal * payment method options. @@ -11264,6 +11392,7 @@ private PaymentMethodOptions( Object giropay, Object gopay, Object grabpay, + Object idBankTransfer, Object ideal, Object interacPresent, Object kakaoPay, @@ -11316,6 +11445,7 @@ private PaymentMethodOptions( this.giropay = giropay; this.gopay = gopay; this.grabpay = grabpay; + this.idBankTransfer = idBankTransfer; this.ideal = ideal; this.interacPresent = interacPresent; this.kakaoPay = kakaoPay; @@ -11396,6 +11526,8 @@ public static class Builder { private Object grabpay; + private Object idBankTransfer; + private Object ideal; private Object interacPresent; @@ -11482,6 +11614,7 @@ public PaymentIntentConfirmParams.PaymentMethodOptions build() { this.giropay, this.gopay, this.grabpay, + this.idBankTransfer, this.ideal, this.interacPresent, this.kakaoPay, @@ -11904,6 +12037,25 @@ public Builder setGrabpay(EmptyParam grabpay) { return this; } + /** + * If this is a {@code id_bank_transfer} PaymentMethod, this sub-hash contains details about + * the Indonesia Bank Transfer payment method options. + */ + public Builder setIdBankTransfer( + PaymentIntentConfirmParams.PaymentMethodOptions.IdBankTransfer idBankTransfer) { + this.idBankTransfer = idBankTransfer; + return this; + } + + /** + * If this is a {@code id_bank_transfer} PaymentMethod, this sub-hash contains details about + * the Indonesia Bank Transfer payment method options. + */ + public Builder setIdBankTransfer(EmptyParam idBankTransfer) { + this.idBankTransfer = idBankTransfer; + return this; + } + /** * If this is a {@code ideal} PaymentMethod, this sub-hash contains details about the Ideal * payment method options. @@ -18552,6 +18704,180 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { } } + @Getter + public static class IdBankTransfer { + /** + * The UNIX timestamp until which the virtual bank account is valid. Permitted range is from 5 + * minutes from now until 31 days from now. If unset, it defaults to 3 days from now. + */ + @SerializedName("expires_after") + Long expiresAfter; + + /** + * The UNIX timestamp until which the virtual bank account is valid. Permitted range is from + * now until 30 days from now. If unset, it defaults to 1 days from now. + */ + @SerializedName("expires_at") + Long expiresAt; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a + * publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + @SerializedName("setup_future_usage") + SetupFutureUsage setupFutureUsage; + + private IdBankTransfer( + Long expiresAfter, + Long expiresAt, + Map extraParams, + SetupFutureUsage setupFutureUsage) { + this.expiresAfter = expiresAfter; + this.expiresAt = expiresAt; + this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long expiresAfter; + + private Long expiresAt; + + private Map extraParams; + + private SetupFutureUsage setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.IdBankTransfer build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.IdBankTransfer( + this.expiresAfter, this.expiresAt, this.extraParams, this.setupFutureUsage); + } + + /** + * The UNIX timestamp until which the virtual bank account is valid. Permitted range is from + * 5 minutes from now until 31 days from now. If unset, it defaults to 3 days from now. + */ + public Builder setExpiresAfter(Long expiresAfter) { + this.expiresAfter = expiresAfter; + return this; + } + + /** + * The UNIX timestamp until which the virtual bank account is valid. Permitted range is from + * now until 30 days from now. If unset, it defaults to 1 days from now. + */ + public Builder setExpiresAt(Long expiresAt) { + this.expiresAt = expiresAt; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.IdBankTransfer#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.IdBankTransfer#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentConfirmParams.PaymentMethodOptions.IdBankTransfer.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + @Getter public static class Ideal { /** diff --git a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java index a48cb0a7405..a1b5decf810 100644 --- a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java @@ -5948,6 +5948,13 @@ public static class PaymentMethodData { @SerializedName("grabpay") Grabpay grabpay; + /** + * If this is an {@code IdBankTransfer} PaymentMethod, this hash contains details about the + * IdBankTransfer payment method. + */ + @SerializedName("id_bank_transfer") + IdBankTransfer idBankTransfer; + /** * If this is an {@code ideal} PaymentMethod, this hash contains details about the iDEAL payment * method. @@ -6210,6 +6217,7 @@ private PaymentMethodData( Giropay giropay, Gopay gopay, Grabpay grabpay, + IdBankTransfer idBankTransfer, Ideal ideal, InteracPresent interacPresent, KakaoPay kakaoPay, @@ -6265,6 +6273,7 @@ private PaymentMethodData( this.giropay = giropay; this.gopay = gopay; this.grabpay = grabpay; + this.idBankTransfer = idBankTransfer; this.ideal = ideal; this.interacPresent = interacPresent; this.kakaoPay = kakaoPay; @@ -6348,6 +6357,8 @@ public static class Builder { private Grabpay grabpay; + private IdBankTransfer idBankTransfer; + private Ideal ideal; private InteracPresent interacPresent; @@ -6440,6 +6451,7 @@ public PaymentIntentCreateParams.PaymentMethodData build() { this.giropay, this.gopay, this.grabpay, + this.idBankTransfer, this.ideal, this.interacPresent, this.kakaoPay, @@ -6690,6 +6702,16 @@ public Builder setGrabpay(PaymentIntentCreateParams.PaymentMethodData.Grabpay gr return this; } + /** + * If this is an {@code IdBankTransfer} PaymentMethod, this hash contains details about the + * IdBankTransfer payment method. + */ + public Builder setIdBankTransfer( + PaymentIntentCreateParams.PaymentMethodData.IdBankTransfer idBankTransfer) { + this.idBankTransfer = idBankTransfer; + return this; + } + /** * If this is an {@code ideal} PaymentMethod, this hash contains details about the iDEAL * payment method. @@ -8688,6 +8710,102 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + public static class IdBankTransfer { + /** Bank where the account is held. */ + @SerializedName("bank") + Bank bank; + + /** + * Map of extra parameters 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 IdBankTransfer(Bank bank, Map extraParams) { + this.bank = bank; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Bank bank; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodData.IdBankTransfer build() { + return new PaymentIntentCreateParams.PaymentMethodData.IdBankTransfer( + this.bank, this.extraParams); + } + + /** Bank where the account is held. */ + public Builder setBank( + PaymentIntentCreateParams.PaymentMethodData.IdBankTransfer.Bank bank) { + this.bank = bank; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.IdBankTransfer#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.IdBankTransfer#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 Bank implements ApiRequestParams.EnumParam { + @SerializedName("bca") + BCA("bca"), + + @SerializedName("bni") + BNI("bni"), + + @SerializedName("bri") + BRI("bri"), + + @SerializedName("cimb") + CIMB("cimb"), + + @SerializedName("permata") + PERMATA("permata"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Bank(String value) { + this.value = value; + } + } + } + @Getter public static class Ideal { /** @@ -11255,6 +11373,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("grabpay") GRABPAY("grabpay"), + @SerializedName("id_bank_transfer") + ID_BANK_TRANSFER("id_bank_transfer"), + @SerializedName("ideal") IDEAL("ideal"), @@ -11502,6 +11623,13 @@ public static class PaymentMethodOptions { @SerializedName("grabpay") Object grabpay; + /** + * If this is a {@code id_bank_transfer} PaymentMethod, this sub-hash contains details about the + * Indonesia Bank Transfer payment method options. + */ + @SerializedName("id_bank_transfer") + Object idBankTransfer; + /** * If this is a {@code ideal} PaymentMethod, this sub-hash contains details about the Ideal * payment method options. @@ -11741,6 +11869,7 @@ private PaymentMethodOptions( Object giropay, Object gopay, Object grabpay, + Object idBankTransfer, Object ideal, Object interacPresent, Object kakaoPay, @@ -11793,6 +11922,7 @@ private PaymentMethodOptions( this.giropay = giropay; this.gopay = gopay; this.grabpay = grabpay; + this.idBankTransfer = idBankTransfer; this.ideal = ideal; this.interacPresent = interacPresent; this.kakaoPay = kakaoPay; @@ -11873,6 +12003,8 @@ public static class Builder { private Object grabpay; + private Object idBankTransfer; + private Object ideal; private Object interacPresent; @@ -11959,6 +12091,7 @@ public PaymentIntentCreateParams.PaymentMethodOptions build() { this.giropay, this.gopay, this.grabpay, + this.idBankTransfer, this.ideal, this.interacPresent, this.kakaoPay, @@ -12381,6 +12514,25 @@ public Builder setGrabpay(EmptyParam grabpay) { return this; } + /** + * If this is a {@code id_bank_transfer} PaymentMethod, this sub-hash contains details about + * the Indonesia Bank Transfer payment method options. + */ + public Builder setIdBankTransfer( + PaymentIntentCreateParams.PaymentMethodOptions.IdBankTransfer idBankTransfer) { + this.idBankTransfer = idBankTransfer; + return this; + } + + /** + * If this is a {@code id_bank_transfer} PaymentMethod, this sub-hash contains details about + * the Indonesia Bank Transfer payment method options. + */ + public Builder setIdBankTransfer(EmptyParam idBankTransfer) { + this.idBankTransfer = idBankTransfer; + return this; + } + /** * If this is a {@code ideal} PaymentMethod, this sub-hash contains details about the Ideal * payment method options. @@ -19021,6 +19173,180 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { } } + @Getter + public static class IdBankTransfer { + /** + * The UNIX timestamp until which the virtual bank account is valid. Permitted range is from 5 + * minutes from now until 31 days from now. If unset, it defaults to 3 days from now. + */ + @SerializedName("expires_after") + Long expiresAfter; + + /** + * The UNIX timestamp until which the virtual bank account is valid. Permitted range is from + * now until 30 days from now. If unset, it defaults to 1 days from now. + */ + @SerializedName("expires_at") + Long expiresAt; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a + * publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + @SerializedName("setup_future_usage") + SetupFutureUsage setupFutureUsage; + + private IdBankTransfer( + Long expiresAfter, + Long expiresAt, + Map extraParams, + SetupFutureUsage setupFutureUsage) { + this.expiresAfter = expiresAfter; + this.expiresAt = expiresAt; + this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long expiresAfter; + + private Long expiresAt; + + private Map extraParams; + + private SetupFutureUsage setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.IdBankTransfer build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.IdBankTransfer( + this.expiresAfter, this.expiresAt, this.extraParams, this.setupFutureUsage); + } + + /** + * The UNIX timestamp until which the virtual bank account is valid. Permitted range is from + * 5 minutes from now until 31 days from now. If unset, it defaults to 3 days from now. + */ + public Builder setExpiresAfter(Long expiresAfter) { + this.expiresAfter = expiresAfter; + return this; + } + + /** + * The UNIX timestamp until which the virtual bank account is valid. Permitted range is from + * now until 30 days from now. If unset, it defaults to 1 days from now. + */ + public Builder setExpiresAt(Long expiresAt) { + this.expiresAt = expiresAt; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.IdBankTransfer#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.IdBankTransfer#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentCreateParams.PaymentMethodOptions.IdBankTransfer.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + @Getter public static class Ideal { /** diff --git a/src/main/java/com/stripe/param/PaymentIntentTriggerActionParams.java b/src/main/java/com/stripe/param/PaymentIntentTriggerActionParams.java new file mode 100644 index 00000000000..b3b0228c601 --- /dev/null +++ b/src/main/java/com/stripe/param/PaymentIntentTriggerActionParams.java @@ -0,0 +1,225 @@ +// File generated from our OpenAPI spec +package com.stripe.param; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import lombok.Getter; + +@Getter +public class PaymentIntentTriggerActionParams 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; + + /** True to simulate success, false to simulate failure. */ + @SerializedName("scan_qr_code") + ScanQrCode scanQrCode; + + /** Required. The type of action to be simulated. */ + @SerializedName("type") + Type type; + + private PaymentIntentTriggerActionParams( + List expand, Map extraParams, ScanQrCode scanQrCode, Type type) { + this.expand = expand; + this.extraParams = extraParams; + this.scanQrCode = scanQrCode; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private List expand; + + private Map extraParams; + + private ScanQrCode scanQrCode; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentTriggerActionParams build() { + return new PaymentIntentTriggerActionParams( + this.expand, this.extraParams, this.scanQrCode, this.type); + } + + /** + * 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 + * PaymentIntentTriggerActionParams#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 + * PaymentIntentTriggerActionParams#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 + * PaymentIntentTriggerActionParams#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 PaymentIntentTriggerActionParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** True to simulate success, false to simulate failure. */ + public Builder setScanQrCode(PaymentIntentTriggerActionParams.ScanQrCode scanQrCode) { + this.scanQrCode = scanQrCode; + return this; + } + + /** Required. The type of action to be simulated. */ + public Builder setType(PaymentIntentTriggerActionParams.Type type) { + this.type = type; + return this; + } + } + + @Getter + public static class ScanQrCode { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Whether the QR Code scan's payment should succeed or fail. */ + @SerializedName("result") + Result result; + + private ScanQrCode(Map extraParams, Result result) { + this.extraParams = extraParams; + this.result = result; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Result result; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentTriggerActionParams.ScanQrCode build() { + return new PaymentIntentTriggerActionParams.ScanQrCode(this.extraParams, this.result); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentIntentTriggerActionParams.ScanQrCode#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 PaymentIntentTriggerActionParams.ScanQrCode#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Whether the QR Code scan's payment should succeed or fail. */ + public Builder setResult(PaymentIntentTriggerActionParams.ScanQrCode.Result result) { + this.result = result; + return this; + } + } + + public enum Result implements ApiRequestParams.EnumParam { + @SerializedName("failure") + FAILURE("failure"), + + @SerializedName("success") + SUCCESS("success"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Result(String value) { + this.value = value; + } + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("expire") + EXPIRE("expire"), + + @SerializedName("fund") + FUND("fund"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } +} diff --git a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java index ef7991de1f9..d8e37fb2d12 100644 --- a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java @@ -6004,6 +6004,13 @@ public static class PaymentMethodData { @SerializedName("grabpay") Grabpay grabpay; + /** + * If this is an {@code IdBankTransfer} PaymentMethod, this hash contains details about the + * IdBankTransfer payment method. + */ + @SerializedName("id_bank_transfer") + IdBankTransfer idBankTransfer; + /** * If this is an {@code ideal} PaymentMethod, this hash contains details about the iDEAL payment * method. @@ -6266,6 +6273,7 @@ private PaymentMethodData( Giropay giropay, Gopay gopay, Grabpay grabpay, + IdBankTransfer idBankTransfer, Ideal ideal, InteracPresent interacPresent, KakaoPay kakaoPay, @@ -6321,6 +6329,7 @@ private PaymentMethodData( this.giropay = giropay; this.gopay = gopay; this.grabpay = grabpay; + this.idBankTransfer = idBankTransfer; this.ideal = ideal; this.interacPresent = interacPresent; this.kakaoPay = kakaoPay; @@ -6404,6 +6413,8 @@ public static class Builder { private Grabpay grabpay; + private IdBankTransfer idBankTransfer; + private Ideal ideal; private InteracPresent interacPresent; @@ -6496,6 +6507,7 @@ public PaymentIntentUpdateParams.PaymentMethodData build() { this.giropay, this.gopay, this.grabpay, + this.idBankTransfer, this.ideal, this.interacPresent, this.kakaoPay, @@ -6746,6 +6758,16 @@ public Builder setGrabpay(PaymentIntentUpdateParams.PaymentMethodData.Grabpay gr return this; } + /** + * If this is an {@code IdBankTransfer} PaymentMethod, this hash contains details about the + * IdBankTransfer payment method. + */ + public Builder setIdBankTransfer( + PaymentIntentUpdateParams.PaymentMethodData.IdBankTransfer idBankTransfer) { + this.idBankTransfer = idBankTransfer; + return this; + } + /** * If this is an {@code ideal} PaymentMethod, this hash contains details about the iDEAL * payment method. @@ -8834,6 +8856,102 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + public static class IdBankTransfer { + /** Bank where the account is held. */ + @SerializedName("bank") + Bank bank; + + /** + * Map of extra parameters 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 IdBankTransfer(Bank bank, Map extraParams) { + this.bank = bank; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Bank bank; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodData.IdBankTransfer build() { + return new PaymentIntentUpdateParams.PaymentMethodData.IdBankTransfer( + this.bank, this.extraParams); + } + + /** Bank where the account is held. */ + public Builder setBank( + PaymentIntentUpdateParams.PaymentMethodData.IdBankTransfer.Bank bank) { + this.bank = bank; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.IdBankTransfer#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.IdBankTransfer#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 Bank implements ApiRequestParams.EnumParam { + @SerializedName("bca") + BCA("bca"), + + @SerializedName("bni") + BNI("bni"), + + @SerializedName("bri") + BRI("bri"), + + @SerializedName("cimb") + CIMB("cimb"), + + @SerializedName("permata") + PERMATA("permata"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Bank(String value) { + this.value = value; + } + } + } + @Getter public static class Ideal { /** @@ -11453,6 +11571,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("grabpay") GRABPAY("grabpay"), + @SerializedName("id_bank_transfer") + ID_BANK_TRANSFER("id_bank_transfer"), + @SerializedName("ideal") IDEAL("ideal"), @@ -11700,6 +11821,13 @@ public static class PaymentMethodOptions { @SerializedName("grabpay") Object grabpay; + /** + * If this is a {@code id_bank_transfer} PaymentMethod, this sub-hash contains details about the + * Indonesia Bank Transfer payment method options. + */ + @SerializedName("id_bank_transfer") + Object idBankTransfer; + /** * If this is a {@code ideal} PaymentMethod, this sub-hash contains details about the Ideal * payment method options. @@ -11939,6 +12067,7 @@ private PaymentMethodOptions( Object giropay, Object gopay, Object grabpay, + Object idBankTransfer, Object ideal, Object interacPresent, Object kakaoPay, @@ -11991,6 +12120,7 @@ private PaymentMethodOptions( this.giropay = giropay; this.gopay = gopay; this.grabpay = grabpay; + this.idBankTransfer = idBankTransfer; this.ideal = ideal; this.interacPresent = interacPresent; this.kakaoPay = kakaoPay; @@ -12071,6 +12201,8 @@ public static class Builder { private Object grabpay; + private Object idBankTransfer; + private Object ideal; private Object interacPresent; @@ -12157,6 +12289,7 @@ public PaymentIntentUpdateParams.PaymentMethodOptions build() { this.giropay, this.gopay, this.grabpay, + this.idBankTransfer, this.ideal, this.interacPresent, this.kakaoPay, @@ -12579,6 +12712,25 @@ public Builder setGrabpay(EmptyParam grabpay) { return this; } + /** + * If this is a {@code id_bank_transfer} PaymentMethod, this sub-hash contains details about + * the Indonesia Bank Transfer payment method options. + */ + public Builder setIdBankTransfer( + PaymentIntentUpdateParams.PaymentMethodOptions.IdBankTransfer idBankTransfer) { + this.idBankTransfer = idBankTransfer; + return this; + } + + /** + * If this is a {@code id_bank_transfer} PaymentMethod, this sub-hash contains details about + * the Indonesia Bank Transfer payment method options. + */ + public Builder setIdBankTransfer(EmptyParam idBankTransfer) { + this.idBankTransfer = idBankTransfer; + return this; + } + /** * If this is a {@code ideal} PaymentMethod, this sub-hash contains details about the Ideal * payment method options. @@ -19374,6 +19526,180 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { } } + @Getter + public static class IdBankTransfer { + /** + * The UNIX timestamp until which the virtual bank account is valid. Permitted range is from 5 + * minutes from now until 31 days from now. If unset, it defaults to 3 days from now. + */ + @SerializedName("expires_after") + Long expiresAfter; + + /** + * The UNIX timestamp until which the virtual bank account is valid. Permitted range is from + * now until 30 days from now. If unset, it defaults to 1 days from now. + */ + @SerializedName("expires_at") + Long expiresAt; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using a + * publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + @SerializedName("setup_future_usage") + SetupFutureUsage setupFutureUsage; + + private IdBankTransfer( + Long expiresAfter, + Long expiresAt, + Map extraParams, + SetupFutureUsage setupFutureUsage) { + this.expiresAfter = expiresAfter; + this.expiresAt = expiresAt; + this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long expiresAfter; + + private Long expiresAt; + + private Map extraParams; + + private SetupFutureUsage setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.IdBankTransfer build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.IdBankTransfer( + this.expiresAfter, this.expiresAt, this.extraParams, this.setupFutureUsage); + } + + /** + * The UNIX timestamp until which the virtual bank account is valid. Permitted range is from + * 5 minutes from now until 31 days from now. If unset, it defaults to 3 days from now. + */ + public Builder setExpiresAfter(Long expiresAfter) { + this.expiresAfter = expiresAfter; + return this; + } + + /** + * The UNIX timestamp until which the virtual bank account is valid. Permitted range is from + * now until 30 days from now. If unset, it defaults to 1 days from now. + */ + public Builder setExpiresAt(Long expiresAt) { + this.expiresAt = expiresAt; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.IdBankTransfer#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.IdBankTransfer#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

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

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

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

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentUpdateParams.PaymentMethodOptions.IdBankTransfer.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + @Getter public static class Ideal { /** diff --git a/src/main/java/com/stripe/param/PaymentMethodConfigurationCreateParams.java b/src/main/java/com/stripe/param/PaymentMethodConfigurationCreateParams.java index 3e90431aa6b..4ff704568bf 100644 --- a/src/main/java/com/stripe/param/PaymentMethodConfigurationCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodConfigurationCreateParams.java @@ -217,6 +217,13 @@ public class PaymentMethodConfigurationCreateParams extends ApiRequestParams { @SerializedName("grabpay") Grabpay grabpay; + /** + * Stripe users in Indonesia can receive bank transfers from customers in Indonesia. Bank + * transfers are a popular B2C and B2B payment method in Indonesia. + */ + @SerializedName("id_bank_transfer") + IdBankTransfer idBankTransfer; + /** * iDEAL is a Netherlands-based payment method that allows customers to complete transactions * online using their bank credentials. All major Dutch banks are members of Currence, the scheme @@ -438,6 +445,7 @@ private PaymentMethodConfigurationCreateParams( Giropay giropay, GooglePay googlePay, Grabpay grabpay, + IdBankTransfer idBankTransfer, Ideal ideal, Jcb jcb, Klarna klarna, @@ -485,6 +493,7 @@ private PaymentMethodConfigurationCreateParams( this.giropay = giropay; this.googlePay = googlePay; this.grabpay = grabpay; + this.idBankTransfer = idBankTransfer; this.ideal = ideal; this.jcb = jcb; this.klarna = klarna; @@ -563,6 +572,8 @@ public static class Builder { private Grabpay grabpay; + private IdBankTransfer idBankTransfer; + private Ideal ideal; private Jcb jcb; @@ -636,6 +647,7 @@ public PaymentMethodConfigurationCreateParams build() { this.giropay, this.googlePay, this.grabpay, + this.idBankTransfer, this.ideal, this.jcb, this.klarna, @@ -954,6 +966,16 @@ public Builder setGrabpay(PaymentMethodConfigurationCreateParams.Grabpay grabpay return this; } + /** + * Stripe users in Indonesia can receive bank transfers from customers in Indonesia. Bank + * transfers are a popular B2C and B2B payment method in Indonesia. + */ + public Builder setIdBankTransfer( + PaymentMethodConfigurationCreateParams.IdBankTransfer idBankTransfer) { + this.idBankTransfer = idBankTransfer; + return this; + } + /** * iDEAL is a Netherlands-based payment method that allows customers to complete transactions * online using their bank credentials. All major Dutch banks are members of Currence, the @@ -4807,6 +4829,172 @@ public enum Preference implements ApiRequestParams.EnumParam { } } + @Getter + public static class IdBankTransfer { + /** 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 IdBankTransfer(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.IdBankTransfer build() { + return new PaymentMethodConfigurationCreateParams.IdBankTransfer( + this.displayPreference, this.extraParams); + } + + /** Whether or not the payment method should be displayed. */ + public Builder setDisplayPreference( + PaymentMethodConfigurationCreateParams.IdBankTransfer.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.IdBankTransfer#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.IdBankTransfer#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.IdBankTransfer.DisplayPreference build() { + return new PaymentMethodConfigurationCreateParams.IdBankTransfer.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.IdBankTransfer.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.IdBankTransfer.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.IdBankTransfer.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 Ideal { /** 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 2690d098cf1..e60130d922f 100644 --- a/src/main/java/com/stripe/param/PaymentMethodConfigurationUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodConfigurationUpdateParams.java @@ -222,6 +222,13 @@ public class PaymentMethodConfigurationUpdateParams extends ApiRequestParams { @SerializedName("grabpay") Grabpay grabpay; + /** + * Stripe users in Indonesia can receive bank transfers from customers in Indonesia. Bank + * transfers are a popular B2C and B2B payment method in Indonesia. + */ + @SerializedName("id_bank_transfer") + IdBankTransfer idBankTransfer; + /** * iDEAL is a Netherlands-based payment method that allows customers to complete transactions * online using their bank credentials. All major Dutch banks are members of Currence, the scheme @@ -440,6 +447,7 @@ private PaymentMethodConfigurationUpdateParams( Giropay giropay, GooglePay googlePay, Grabpay grabpay, + IdBankTransfer idBankTransfer, Ideal ideal, Jcb jcb, Klarna klarna, @@ -487,6 +495,7 @@ private PaymentMethodConfigurationUpdateParams( this.giropay = giropay; this.googlePay = googlePay; this.grabpay = grabpay; + this.idBankTransfer = idBankTransfer; this.ideal = ideal; this.jcb = jcb; this.klarna = klarna; @@ -566,6 +575,8 @@ public static class Builder { private Grabpay grabpay; + private IdBankTransfer idBankTransfer; + private Ideal ideal; private Jcb jcb; @@ -638,6 +649,7 @@ public PaymentMethodConfigurationUpdateParams build() { this.giropay, this.googlePay, this.grabpay, + this.idBankTransfer, this.ideal, this.jcb, this.klarna, @@ -961,6 +973,16 @@ public Builder setGrabpay(PaymentMethodConfigurationUpdateParams.Grabpay grabpay return this; } + /** + * Stripe users in Indonesia can receive bank transfers from customers in Indonesia. Bank + * transfers are a popular B2C and B2B payment method in Indonesia. + */ + public Builder setIdBankTransfer( + PaymentMethodConfigurationUpdateParams.IdBankTransfer idBankTransfer) { + this.idBankTransfer = idBankTransfer; + return this; + } + /** * iDEAL is a Netherlands-based payment method that allows customers to complete transactions * online using their bank credentials. All major Dutch banks are members of Currence, the @@ -4814,6 +4836,172 @@ public enum Preference implements ApiRequestParams.EnumParam { } } + @Getter + public static class IdBankTransfer { + /** 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 IdBankTransfer(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.IdBankTransfer build() { + return new PaymentMethodConfigurationUpdateParams.IdBankTransfer( + this.displayPreference, this.extraParams); + } + + /** Whether or not the payment method should be displayed. */ + public Builder setDisplayPreference( + PaymentMethodConfigurationUpdateParams.IdBankTransfer.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.IdBankTransfer#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.IdBankTransfer#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.IdBankTransfer.DisplayPreference build() { + return new PaymentMethodConfigurationUpdateParams.IdBankTransfer.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.IdBankTransfer.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.IdBankTransfer.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.IdBankTransfer.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 Ideal { /** 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 0c47febbfdf..e02979eebec 100644 --- a/src/main/java/com/stripe/param/PaymentMethodCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodCreateParams.java @@ -178,6 +178,13 @@ public class PaymentMethodCreateParams extends ApiRequestParams { @SerializedName("grabpay") Grabpay grabpay; + /** + * If this is an {@code IdBankTransfer} PaymentMethod, this hash contains details about the + * IdBankTransfer payment method. + */ + @SerializedName("id_bank_transfer") + IdBankTransfer idBankTransfer; + /** * If this is an {@code ideal} PaymentMethod, this hash contains details about the iDEAL payment * method. @@ -445,6 +452,7 @@ private PaymentMethodCreateParams( Giropay giropay, Gopay gopay, Grabpay grabpay, + IdBankTransfer idBankTransfer, Ideal ideal, InteracPresent interacPresent, KakaoPay kakaoPay, @@ -504,6 +512,7 @@ private PaymentMethodCreateParams( this.giropay = giropay; this.gopay = gopay; this.grabpay = grabpay; + this.idBankTransfer = idBankTransfer; this.ideal = ideal; this.interacPresent = interacPresent; this.kakaoPay = kakaoPay; @@ -594,6 +603,8 @@ public static class Builder { private Grabpay grabpay; + private IdBankTransfer idBankTransfer; + private Ideal ideal; private InteracPresent interacPresent; @@ -691,6 +702,7 @@ public PaymentMethodCreateParams build() { this.giropay, this.gopay, this.grabpay, + this.idBankTransfer, this.ideal, this.interacPresent, this.kakaoPay, @@ -993,6 +1005,15 @@ public Builder setGrabpay(PaymentMethodCreateParams.Grabpay grabpay) { return this; } + /** + * If this is an {@code IdBankTransfer} PaymentMethod, this hash contains details about the + * IdBankTransfer payment method. + */ + public Builder setIdBankTransfer(PaymentMethodCreateParams.IdBankTransfer idBankTransfer) { + this.idBankTransfer = idBankTransfer; + return this; + } + /** * If this is an {@code ideal} PaymentMethod, this hash contains details about the iDEAL payment * method. @@ -3170,6 +3191,99 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + public static class IdBankTransfer { + /** Bank where the account is held. */ + @SerializedName("bank") + Bank bank; + + /** + * Map of extra parameters 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 IdBankTransfer(Bank bank, Map extraParams) { + this.bank = bank; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Bank bank; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentMethodCreateParams.IdBankTransfer build() { + return new PaymentMethodCreateParams.IdBankTransfer(this.bank, this.extraParams); + } + + /** Bank where the account is held. */ + public Builder setBank(PaymentMethodCreateParams.IdBankTransfer.Bank bank) { + this.bank = bank; + 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 + * PaymentMethodCreateParams.IdBankTransfer#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.IdBankTransfer#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 Bank implements ApiRequestParams.EnumParam { + @SerializedName("bca") + BCA("bca"), + + @SerializedName("bni") + BNI("bni"), + + @SerializedName("bri") + BRI("bri"), + + @SerializedName("cimb") + CIMB("cimb"), + + @SerializedName("permata") + PERMATA("permata"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Bank(String value) { + this.value = value; + } + } + } + @Getter public static class Ideal { /** @@ -5744,6 +5858,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("grabpay") GRABPAY("grabpay"), + @SerializedName("id_bank_transfer") + ID_BANK_TRANSFER("id_bank_transfer"), + @SerializedName("ideal") IDEAL("ideal"), diff --git a/src/main/java/com/stripe/param/PaymentMethodListParams.java b/src/main/java/com/stripe/param/PaymentMethodListParams.java index 8128f6e7c89..e939f1c03a1 100644 --- a/src/main/java/com/stripe/param/PaymentMethodListParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodListParams.java @@ -268,6 +268,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("grabpay") GRABPAY("grabpay"), + @SerializedName("id_bank_transfer") + ID_BANK_TRANSFER("id_bank_transfer"), + @SerializedName("ideal") IDEAL("ideal"), diff --git a/src/main/java/com/stripe/param/SetupIntentConfirmParams.java b/src/main/java/com/stripe/param/SetupIntentConfirmParams.java index 4bfbcdd1d19..d301f9418aa 100644 --- a/src/main/java/com/stripe/param/SetupIntentConfirmParams.java +++ b/src/main/java/com/stripe/param/SetupIntentConfirmParams.java @@ -770,6 +770,13 @@ public static class PaymentMethodData { @SerializedName("grabpay") Grabpay grabpay; + /** + * If this is an {@code IdBankTransfer} PaymentMethod, this hash contains details about the + * IdBankTransfer payment method. + */ + @SerializedName("id_bank_transfer") + IdBankTransfer idBankTransfer; + /** * If this is an {@code ideal} PaymentMethod, this hash contains details about the iDEAL payment * method. @@ -1032,6 +1039,7 @@ private PaymentMethodData( Giropay giropay, Gopay gopay, Grabpay grabpay, + IdBankTransfer idBankTransfer, Ideal ideal, InteracPresent interacPresent, KakaoPay kakaoPay, @@ -1087,6 +1095,7 @@ private PaymentMethodData( this.giropay = giropay; this.gopay = gopay; this.grabpay = grabpay; + this.idBankTransfer = idBankTransfer; this.ideal = ideal; this.interacPresent = interacPresent; this.kakaoPay = kakaoPay; @@ -1170,6 +1179,8 @@ public static class Builder { private Grabpay grabpay; + private IdBankTransfer idBankTransfer; + private Ideal ideal; private InteracPresent interacPresent; @@ -1262,6 +1273,7 @@ public SetupIntentConfirmParams.PaymentMethodData build() { this.giropay, this.gopay, this.grabpay, + this.idBankTransfer, this.ideal, this.interacPresent, this.kakaoPay, @@ -1512,6 +1524,16 @@ public Builder setGrabpay(SetupIntentConfirmParams.PaymentMethodData.Grabpay gra return this; } + /** + * If this is an {@code IdBankTransfer} PaymentMethod, this hash contains details about the + * IdBankTransfer payment method. + */ + public Builder setIdBankTransfer( + SetupIntentConfirmParams.PaymentMethodData.IdBankTransfer idBankTransfer) { + this.idBankTransfer = idBankTransfer; + return this; + } + /** * If this is an {@code ideal} PaymentMethod, this hash contains details about the iDEAL * payment method. @@ -3510,6 +3532,102 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + public static class IdBankTransfer { + /** Bank where the account is held. */ + @SerializedName("bank") + Bank bank; + + /** + * Map of extra parameters 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 IdBankTransfer(Bank bank, Map extraParams) { + this.bank = bank; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Bank bank; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public SetupIntentConfirmParams.PaymentMethodData.IdBankTransfer build() { + return new SetupIntentConfirmParams.PaymentMethodData.IdBankTransfer( + this.bank, this.extraParams); + } + + /** Bank where the account is held. */ + public Builder setBank( + SetupIntentConfirmParams.PaymentMethodData.IdBankTransfer.Bank bank) { + this.bank = bank; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SetupIntentConfirmParams.PaymentMethodData.IdBankTransfer#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.IdBankTransfer#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 Bank implements ApiRequestParams.EnumParam { + @SerializedName("bca") + BCA("bca"), + + @SerializedName("bni") + BNI("bni"), + + @SerializedName("bri") + BRI("bri"), + + @SerializedName("cimb") + CIMB("cimb"), + + @SerializedName("permata") + PERMATA("permata"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Bank(String value) { + this.value = value; + } + } + } + @Getter public static class Ideal { /** @@ -6077,6 +6195,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("grabpay") GRABPAY("grabpay"), + @SerializedName("id_bank_transfer") + ID_BANK_TRANSFER("id_bank_transfer"), + @SerializedName("ideal") IDEAL("ideal"), diff --git a/src/main/java/com/stripe/param/SetupIntentCreateParams.java b/src/main/java/com/stripe/param/SetupIntentCreateParams.java index a5a43a4e3b3..3815f378563 100644 --- a/src/main/java/com/stripe/param/SetupIntentCreateParams.java +++ b/src/main/java/com/stripe/param/SetupIntentCreateParams.java @@ -1228,6 +1228,13 @@ public static class PaymentMethodData { @SerializedName("grabpay") Grabpay grabpay; + /** + * If this is an {@code IdBankTransfer} PaymentMethod, this hash contains details about the + * IdBankTransfer payment method. + */ + @SerializedName("id_bank_transfer") + IdBankTransfer idBankTransfer; + /** * If this is an {@code ideal} PaymentMethod, this hash contains details about the iDEAL payment * method. @@ -1490,6 +1497,7 @@ private PaymentMethodData( Giropay giropay, Gopay gopay, Grabpay grabpay, + IdBankTransfer idBankTransfer, Ideal ideal, InteracPresent interacPresent, KakaoPay kakaoPay, @@ -1545,6 +1553,7 @@ private PaymentMethodData( this.giropay = giropay; this.gopay = gopay; this.grabpay = grabpay; + this.idBankTransfer = idBankTransfer; this.ideal = ideal; this.interacPresent = interacPresent; this.kakaoPay = kakaoPay; @@ -1628,6 +1637,8 @@ public static class Builder { private Grabpay grabpay; + private IdBankTransfer idBankTransfer; + private Ideal ideal; private InteracPresent interacPresent; @@ -1720,6 +1731,7 @@ public SetupIntentCreateParams.PaymentMethodData build() { this.giropay, this.gopay, this.grabpay, + this.idBankTransfer, this.ideal, this.interacPresent, this.kakaoPay, @@ -1970,6 +1982,16 @@ public Builder setGrabpay(SetupIntentCreateParams.PaymentMethodData.Grabpay grab return this; } + /** + * If this is an {@code IdBankTransfer} PaymentMethod, this hash contains details about the + * IdBankTransfer payment method. + */ + public Builder setIdBankTransfer( + SetupIntentCreateParams.PaymentMethodData.IdBankTransfer idBankTransfer) { + this.idBankTransfer = idBankTransfer; + return this; + } + /** * If this is an {@code ideal} PaymentMethod, this hash contains details about the iDEAL * payment method. @@ -3966,6 +3988,101 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + public static class IdBankTransfer { + /** Bank where the account is held. */ + @SerializedName("bank") + Bank bank; + + /** + * Map of extra parameters 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 IdBankTransfer(Bank bank, Map extraParams) { + this.bank = bank; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Bank bank; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public SetupIntentCreateParams.PaymentMethodData.IdBankTransfer build() { + return new SetupIntentCreateParams.PaymentMethodData.IdBankTransfer( + this.bank, this.extraParams); + } + + /** Bank where the account is held. */ + public Builder setBank(SetupIntentCreateParams.PaymentMethodData.IdBankTransfer.Bank bank) { + this.bank = bank; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SetupIntentCreateParams.PaymentMethodData.IdBankTransfer#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.IdBankTransfer#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 Bank implements ApiRequestParams.EnumParam { + @SerializedName("bca") + BCA("bca"), + + @SerializedName("bni") + BNI("bni"), + + @SerializedName("bri") + BRI("bri"), + + @SerializedName("cimb") + CIMB("cimb"), + + @SerializedName("permata") + PERMATA("permata"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Bank(String value) { + this.value = value; + } + } + } + @Getter public static class Ideal { /** @@ -6532,6 +6649,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("grabpay") GRABPAY("grabpay"), + @SerializedName("id_bank_transfer") + ID_BANK_TRANSFER("id_bank_transfer"), + @SerializedName("ideal") IDEAL("ideal"), diff --git a/src/main/java/com/stripe/param/SetupIntentUpdateParams.java b/src/main/java/com/stripe/param/SetupIntentUpdateParams.java index a5cdcd52cad..477d4402bbc 100644 --- a/src/main/java/com/stripe/param/SetupIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/SetupIntentUpdateParams.java @@ -575,6 +575,13 @@ public static class PaymentMethodData { @SerializedName("grabpay") Grabpay grabpay; + /** + * If this is an {@code IdBankTransfer} PaymentMethod, this hash contains details about the + * IdBankTransfer payment method. + */ + @SerializedName("id_bank_transfer") + IdBankTransfer idBankTransfer; + /** * If this is an {@code ideal} PaymentMethod, this hash contains details about the iDEAL payment * method. @@ -837,6 +844,7 @@ private PaymentMethodData( Giropay giropay, Gopay gopay, Grabpay grabpay, + IdBankTransfer idBankTransfer, Ideal ideal, InteracPresent interacPresent, KakaoPay kakaoPay, @@ -892,6 +900,7 @@ private PaymentMethodData( this.giropay = giropay; this.gopay = gopay; this.grabpay = grabpay; + this.idBankTransfer = idBankTransfer; this.ideal = ideal; this.interacPresent = interacPresent; this.kakaoPay = kakaoPay; @@ -975,6 +984,8 @@ public static class Builder { private Grabpay grabpay; + private IdBankTransfer idBankTransfer; + private Ideal ideal; private InteracPresent interacPresent; @@ -1067,6 +1078,7 @@ public SetupIntentUpdateParams.PaymentMethodData build() { this.giropay, this.gopay, this.grabpay, + this.idBankTransfer, this.ideal, this.interacPresent, this.kakaoPay, @@ -1317,6 +1329,16 @@ public Builder setGrabpay(SetupIntentUpdateParams.PaymentMethodData.Grabpay grab return this; } + /** + * If this is an {@code IdBankTransfer} PaymentMethod, this hash contains details about the + * IdBankTransfer payment method. + */ + public Builder setIdBankTransfer( + SetupIntentUpdateParams.PaymentMethodData.IdBankTransfer idBankTransfer) { + this.idBankTransfer = idBankTransfer; + return this; + } + /** * If this is an {@code ideal} PaymentMethod, this hash contains details about the iDEAL * payment method. @@ -3403,6 +3425,101 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + public static class IdBankTransfer { + /** Bank where the account is held. */ + @SerializedName("bank") + Bank bank; + + /** + * Map of extra parameters 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 IdBankTransfer(Bank bank, Map extraParams) { + this.bank = bank; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Bank bank; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public SetupIntentUpdateParams.PaymentMethodData.IdBankTransfer build() { + return new SetupIntentUpdateParams.PaymentMethodData.IdBankTransfer( + this.bank, this.extraParams); + } + + /** Bank where the account is held. */ + public Builder setBank(SetupIntentUpdateParams.PaymentMethodData.IdBankTransfer.Bank bank) { + this.bank = bank; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SetupIntentUpdateParams.PaymentMethodData.IdBankTransfer#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.IdBankTransfer#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 Bank implements ApiRequestParams.EnumParam { + @SerializedName("bca") + BCA("bca"), + + @SerializedName("bni") + BNI("bni"), + + @SerializedName("bri") + BRI("bri"), + + @SerializedName("cimb") + CIMB("cimb"), + + @SerializedName("permata") + PERMATA("permata"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Bank(String value) { + this.value = value; + } + } + } + @Getter public static class Ideal { /** @@ -6021,6 +6138,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("grabpay") GRABPAY("grabpay"), + @SerializedName("id_bank_transfer") + ID_BANK_TRANSFER("id_bank_transfer"), + @SerializedName("ideal") IDEAL("ideal"), diff --git a/src/main/java/com/stripe/param/SubscriptionCreateParams.java b/src/main/java/com/stripe/param/SubscriptionCreateParams.java index 1cee6ea29c0..9ade2e89a4f 100644 --- a/src/main/java/com/stripe/param/SubscriptionCreateParams.java +++ b/src/main/java/com/stripe/param/SubscriptionCreateParams.java @@ -4335,6 +4335,13 @@ public static class PaymentMethodOptions { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** + * This sub-hash contains details about the Indonesia bank transfer payment method options to + * pass to the invoice’s PaymentIntent. + */ + @SerializedName("id_bank_transfer") + Object idBankTransfer; + /** * This sub-hash contains details about the Konbini payment method options to pass to the * invoice’s PaymentIntent. @@ -4362,6 +4369,7 @@ private PaymentMethodOptions( Object card, Object customerBalance, Map extraParams, + Object idBankTransfer, Object konbini, Object sepaDebit, Object usBankAccount) { @@ -4370,6 +4378,7 @@ private PaymentMethodOptions( this.card = card; this.customerBalance = customerBalance; this.extraParams = extraParams; + this.idBankTransfer = idBankTransfer; this.konbini = konbini; this.sepaDebit = sepaDebit; this.usBankAccount = usBankAccount; @@ -4390,6 +4399,8 @@ public static class Builder { private Map extraParams; + private Object idBankTransfer; + private Object konbini; private Object sepaDebit; @@ -4404,6 +4415,7 @@ public SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions build() { this.card, this.customerBalance, this.extraParams, + this.idBankTransfer, this.konbini, this.sepaDebit, this.usBankAccount); @@ -4516,6 +4528,26 @@ public Builder putAllExtraParam(Map map) { return this; } + /** + * This sub-hash contains details about the Indonesia bank transfer payment method options + * to pass to the invoice’s PaymentIntent. + */ + public Builder setIdBankTransfer( + SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions.IdBankTransfer + idBankTransfer) { + this.idBankTransfer = idBankTransfer; + return this; + } + + /** + * This sub-hash contains details about the Indonesia bank transfer payment method options + * to pass to the invoice’s PaymentIntent. + */ + public Builder setIdBankTransfer(EmptyParam idBankTransfer) { + this.idBankTransfer = idBankTransfer; + return this; + } + /** * This sub-hash contains details about the Konbini payment method options to pass to the * invoice’s PaymentIntent. @@ -5508,6 +5540,68 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + public static class IdBankTransfer { + /** + * Map of extra parameters 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 IdBankTransfer(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 SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions.IdBankTransfer + build() { + return new SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions.IdBankTransfer( + 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 + * SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions.IdBankTransfer#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions.IdBankTransfer#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 Konbini { /** @@ -6183,6 +6277,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("grabpay") GRABPAY("grabpay"), + @SerializedName("id_bank_transfer") + ID_BANK_TRANSFER("id_bank_transfer"), + @SerializedName("ideal") IDEAL("ideal"), diff --git a/src/main/java/com/stripe/param/SubscriptionUpdateParams.java b/src/main/java/com/stripe/param/SubscriptionUpdateParams.java index 2a63ea2c85a..b88711ac451 100644 --- a/src/main/java/com/stripe/param/SubscriptionUpdateParams.java +++ b/src/main/java/com/stripe/param/SubscriptionUpdateParams.java @@ -4582,6 +4582,13 @@ public static class PaymentMethodOptions { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** + * This sub-hash contains details about the Indonesia bank transfer payment method options to + * pass to the invoice’s PaymentIntent. + */ + @SerializedName("id_bank_transfer") + Object idBankTransfer; + /** * This sub-hash contains details about the Konbini payment method options to pass to the * invoice’s PaymentIntent. @@ -4609,6 +4616,7 @@ private PaymentMethodOptions( Object card, Object customerBalance, Map extraParams, + Object idBankTransfer, Object konbini, Object sepaDebit, Object usBankAccount) { @@ -4617,6 +4625,7 @@ private PaymentMethodOptions( this.card = card; this.customerBalance = customerBalance; this.extraParams = extraParams; + this.idBankTransfer = idBankTransfer; this.konbini = konbini; this.sepaDebit = sepaDebit; this.usBankAccount = usBankAccount; @@ -4637,6 +4646,8 @@ public static class Builder { private Map extraParams; + private Object idBankTransfer; + private Object konbini; private Object sepaDebit; @@ -4651,6 +4662,7 @@ public SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions build() { this.card, this.customerBalance, this.extraParams, + this.idBankTransfer, this.konbini, this.sepaDebit, this.usBankAccount); @@ -4763,6 +4775,26 @@ public Builder putAllExtraParam(Map map) { return this; } + /** + * This sub-hash contains details about the Indonesia bank transfer payment method options + * to pass to the invoice’s PaymentIntent. + */ + public Builder setIdBankTransfer( + SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions.IdBankTransfer + idBankTransfer) { + this.idBankTransfer = idBankTransfer; + return this; + } + + /** + * This sub-hash contains details about the Indonesia bank transfer payment method options + * to pass to the invoice’s PaymentIntent. + */ + public Builder setIdBankTransfer(EmptyParam idBankTransfer) { + this.idBankTransfer = idBankTransfer; + return this; + } + /** * This sub-hash contains details about the Konbini payment method options to pass to the * invoice’s PaymentIntent. @@ -5793,6 +5825,68 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + public static class IdBankTransfer { + /** + * Map of extra parameters 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 IdBankTransfer(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 SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions.IdBankTransfer + build() { + return new SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions.IdBankTransfer( + 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 + * SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions.IdBankTransfer#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 + * SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions.IdBankTransfer#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 Konbini { /** @@ -6474,6 +6568,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("grabpay") GRABPAY("grabpay"), + @SerializedName("id_bank_transfer") + ID_BANK_TRANSFER("id_bank_transfer"), + @SerializedName("ideal") IDEAL("ideal"), diff --git a/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java b/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java index abba6170280..add817bf246 100644 --- a/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java +++ b/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java @@ -1037,6 +1037,10 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam { @SerializedName("issuing_transaction.created") ISSUING_TRANSACTION__CREATED("issuing_transaction.created"), + @SerializedName("issuing_transaction.purchase_details_receipt_updated") + ISSUING_TRANSACTION__PURCHASE_DETAILS_RECEIPT_UPDATED( + "issuing_transaction.purchase_details_receipt_updated"), + @SerializedName("issuing_transaction.updated") ISSUING_TRANSACTION__UPDATED("issuing_transaction.updated"), diff --git a/src/main/java/com/stripe/param/WebhookEndpointUpdateParams.java b/src/main/java/com/stripe/param/WebhookEndpointUpdateParams.java index 6285266856b..e0fe0fc1663 100644 --- a/src/main/java/com/stripe/param/WebhookEndpointUpdateParams.java +++ b/src/main/java/com/stripe/param/WebhookEndpointUpdateParams.java @@ -698,6 +698,10 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam { @SerializedName("issuing_transaction.created") ISSUING_TRANSACTION__CREATED("issuing_transaction.created"), + @SerializedName("issuing_transaction.purchase_details_receipt_updated") + ISSUING_TRANSACTION__PURCHASE_DETAILS_RECEIPT_UPDATED( + "issuing_transaction.purchase_details_receipt_updated"), + @SerializedName("issuing_transaction.updated") ISSUING_TRANSACTION__UPDATED("issuing_transaction.updated"), diff --git a/src/main/java/com/stripe/service/PaymentIntentService.java b/src/main/java/com/stripe/service/PaymentIntentService.java index 3a0d356a0fd..13b502f916d 100644 --- a/src/main/java/com/stripe/service/PaymentIntentService.java +++ b/src/main/java/com/stripe/service/PaymentIntentService.java @@ -23,6 +23,7 @@ import com.stripe.param.PaymentIntentListParams; import com.stripe.param.PaymentIntentRetrieveParams; import com.stripe.param.PaymentIntentSearchParams; +import com.stripe.param.PaymentIntentTriggerActionParams; import com.stripe.param.PaymentIntentUpdateParams; import com.stripe.param.PaymentIntentVerifyMicrodepositsParams; @@ -697,4 +698,25 @@ public PaymentIntent verifyMicrodeposits( options); return this.request(request, PaymentIntent.class); } + /** Trigger an external action on a PaymentIntent. */ + public PaymentIntent triggerAction(String intent, PaymentIntentTriggerActionParams params) + throws StripeException { + return triggerAction(intent, params, (RequestOptions) null); + } + /** Trigger an external action on a PaymentIntent. */ + public PaymentIntent triggerAction( + String intent, PaymentIntentTriggerActionParams params, RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/test/payment_intents/%s/trigger_action", ApiResource.urlEncodeId(intent)); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, PaymentIntent.class); + } }