diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f299f63ece..f53629d506a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,39 @@ # Changelog +## 28.0.0 - 2024-10-29 +* [#1896](https://github.com/stripe/stripe-java/pull/1896) This release changes the pinned API version to `2024-10-28.acacia`. + * Add support for new resource `V2.EventDestinations` + * Add support for `create`, `retrieve`, `update`, `list`, `delete`, `disable`, `enable` and `ping` methods on resource `V2.EventDestinations` + * Add support for `submit_card` test helper method on resource `Issuing.Card` + * Add support for `groups` on `AccountCreateParams`, `AccountUpdateParams`, and `Account` + * Add support for `alma_payments`, `kakao_pay_payments`, `kr_card_payments`, `naver_pay_payments`, `payco_payments`, and `samsung_pay_payments` on `Account.capabilities`, `AccountCreateParams.capabilities`, and `AccountUpdateParams.capabilities` + * Add support for `disable_stripe_user_authentication` on `AccountSession.components.account_management.features`, `AccountSession.components.account_onboarding.features`, `AccountSession.components.balances.features`, `AccountSession.components.notification_banner.features`, `AccountSession.components.payouts.features`, `AccountSessionCreateParams.components.account_management.features`, `AccountSessionCreateParams.components.account_onboarding.features`, `AccountSessionCreateParams.components.balances.features`, `AccountSessionCreateParams.components.notification_banner.features`, and `AccountSessionCreateParams.components.payouts.features` + * Add support for `schedule_at_period_end` on `BillingPortal.Configuration.features.subscription_update`, `billingportal.ConfigurationCreateParams.features.subscription_update`, and `billingportal.ConfigurationUpdateParams.features.subscription_update` + * Change `billingportal.ConfigurationCreateParams.business_profile` to be optional + * Add support for `alma` on `Charge.payment_method_details`, `ConfirmationToken.payment_method_preview`, `ConfirmationTokenCreateParams.payment_method_data`, `PaymentIntent.payment_method_options`, `PaymentIntentConfirmParams.payment_method_data`, `PaymentIntentConfirmParams.payment_method_options`, `PaymentIntentCreateParams.payment_method_data`, `PaymentIntentCreateParams.payment_method_options`, `PaymentIntentUpdateParams.payment_method_data`, `PaymentIntentUpdateParams.payment_method_options`, `PaymentMethodConfigurationCreateParams`, `PaymentMethodConfigurationUpdateParams`, `PaymentMethodConfiguration`, `PaymentMethodCreateParams`, `PaymentMethod`, `Refund.destination_details`, `SetupIntentConfirmParams.payment_method_data`, `SetupIntentCreateParams.payment_method_data`, and `SetupIntentUpdateParams.payment_method_data` + * Add support for `kakao_pay` and `kr_card` on `Charge.payment_method_details`, `Checkout.Session.payment_method_options`, `ConfirmationToken.payment_method_preview`, `ConfirmationTokenCreateParams.payment_method_data`, `Mandate.payment_method_details`, `PaymentIntent.payment_method_options`, `PaymentIntentConfirmParams.payment_method_data`, `PaymentIntentConfirmParams.payment_method_options`, `PaymentIntentCreateParams.payment_method_data`, `PaymentIntentCreateParams.payment_method_options`, `PaymentIntentUpdateParams.payment_method_data`, `PaymentIntentUpdateParams.payment_method_options`, `PaymentMethodCreateParams`, `PaymentMethod`, `SetupAttempt.payment_method_details`, `SetupIntentConfirmParams.payment_method_data`, `SetupIntentCreateParams.payment_method_data`, `SetupIntentUpdateParams.payment_method_data`, and `checkout.SessionCreateParams.payment_method_options` + * Add support for `naver_pay` on `Charge.payment_method_details`, `Checkout.Session.payment_method_options`, `ConfirmationToken.payment_method_preview`, `ConfirmationTokenCreateParams.payment_method_data`, `PaymentIntent.payment_method_options`, `PaymentIntentConfirmParams.payment_method_data`, `PaymentIntentConfirmParams.payment_method_options`, `PaymentIntentCreateParams.payment_method_data`, `PaymentIntentCreateParams.payment_method_options`, `PaymentIntentUpdateParams.payment_method_data`, `PaymentIntentUpdateParams.payment_method_options`, `PaymentMethodCreateParams`, `PaymentMethodUpdateParams`, `PaymentMethod`, `SetupIntentConfirmParams.payment_method_data`, `SetupIntentCreateParams.payment_method_data`, `SetupIntentUpdateParams.payment_method_data`, and `checkout.SessionCreateParams.payment_method_options` + * Add support for `payco` and `samsung_pay` on `Charge.payment_method_details`, `Checkout.Session.payment_method_options`, `ConfirmationToken.payment_method_preview`, `ConfirmationTokenCreateParams.payment_method_data`, `PaymentIntent.payment_method_options`, `PaymentIntentConfirmParams.payment_method_data`, `PaymentIntentConfirmParams.payment_method_options`, `PaymentIntentCreateParams.payment_method_data`, `PaymentIntentCreateParams.payment_method_options`, `PaymentIntentUpdateParams.payment_method_data`, `PaymentIntentUpdateParams.payment_method_options`, `PaymentMethodCreateParams`, `PaymentMethod`, `SetupIntentConfirmParams.payment_method_data`, `SetupIntentCreateParams.payment_method_data`, `SetupIntentUpdateParams.payment_method_data`, and `checkout.SessionCreateParams.payment_method_options` + * Add support for new values `alma`, `kakao_pay`, `kr_card`, `naver_pay`, `payco`, and `samsung_pay` on enums `CustomerListPaymentMethodsParams.type`, `PaymentMethodCreateParams.type`, `PaymentMethodListParams.type`, and `checkout.SessionCreateParams.payment_method_types[]` + * Add support for new values `alma`, `kakao_pay`, `kr_card`, `naver_pay`, `payco`, and `samsung_pay` on enums `ConfirmationTokenCreateParams.payment_method_data.type`, `PaymentIntentConfirmParams.payment_method_data.type`, `PaymentIntentCreateParams.payment_method_data.type`, `PaymentIntentUpdateParams.payment_method_data.type`, `SetupIntentConfirmParams.payment_method_data.type`, `SetupIntentCreateParams.payment_method_data.type`, and `SetupIntentUpdateParams.payment_method_data.type` + * Add support for new value `auto` on enum `CustomerUpdateParams.tax.validate_location` + * Add support for new values `by_tin`, `ma_vat`, `md_vat`, `tz_vat`, `uz_tin`, and `uz_vat` on enums `CustomerCreateParams.tax_id_data[].type`, `InvoiceCreatePreviewParams.customer_details.tax_ids[].type`, `InvoiceUpcomingLinesParams.customer_details.tax_ids[].type`, `InvoiceUpcomingParams.customer_details.tax_ids[].type`, `TaxIdCreateParams.type`, and `tax.CalculationCreateParams.customer_details.tax_ids[].type` + * Add support for `enhanced_evidence` on `Dispute.evidence` and `DisputeUpdateParams.evidence` + * Add support for `enhanced_eligibility_types` on `Dispute` + * Add support for `enhanced_eligibility` on `Dispute.evidence_details` + * Add support for `metadata` on `Forwarding.Request` and `forwarding.RequestCreateParams` + * Add support for `automatically_finalizes_at` on `InvoiceCreateParams` and `InvoiceUpdateParams` + * Add support for new values `jp_credit_transfer`, `kakao_pay`, `kr_card`, `naver_pay`, and `payco` on enums `InvoiceCreateParams.payment_settings.payment_method_types[]`, `InvoiceUpdateParams.payment_settings.payment_method_types[]`, `SubscriptionCreateParams.payment_settings.payment_method_types[]`, and `SubscriptionUpdateParams.payment_settings.payment_method_types[]` + * Add support for new value `retail_delivery_fee` on enums `InvoiceAddLinesParams.lines[].tax_amounts[].tax_rate_data.tax_type`, `InvoiceUpdateLinesParams.lines[].tax_amounts[].tax_rate_data.tax_type`, `TaxRateCreateParams.tax_type`, and `TaxRateUpdateParams.tax_type` + * Add support for new value `alma` on enums `PaymentLinkCreateParams.payment_method_types[]` and `PaymentLinkUpdateParams.payment_method_types[]` + * Add support for `amazon_pay` on `PaymentMethodDomain` + * Add support for `flat_amount` and `rate_type` on `Tax.Calculation.tax_breakdown[].tax_rate_details` and `TaxRate` + * Add support for `by`, `cr`, `ec`, `ma`, `md`, `rs`, `ru`, `tz`, and `uz` on `Tax.Registration.country_options` and `tax.RegistrationCreateParams.country_options` + * Add support for new value `state_retail_delivery_fee` on enum `tax.RegistrationCreateParams.country_options.us.type` + * Add support for `pln` on `Terminal.Configuration.tipping`, `terminal.ConfigurationCreateParams.tipping`, and `terminal.ConfigurationUpdateParams.tipping` + * Add support for new values `issuing_transaction.purchase_details_receipt_updated` and `refund.failed` on enums `WebhookEndpointCreateParams.enabled_events[]` and `WebhookEndpointUpdateParams.enabled_events[]` + * Add support for new value `2024-10-28.acacia` on enum `WebhookEndpointCreateParams.api_version` + ## 27.2.0-beta.3 - 2024-10-18 * [#1897](https://github.com/stripe/stripe-java/pull/1897) Update generated code for beta * Add support for `alma_payments`, `gopay_payments`, `kakao_pay_payments`, `kr_card_payments`, `naver_pay_payments`, `payco_payments`, `qris_payments`, `samsung_pay_payments`, `shopeepay_payments`, `treasury_evolve`, `treasury_fifth_third`, and `treasury_goldman_sachs` on `Account.capabilities`, `AccountCreateParams.capabilities`, and `AccountUpdateParams.capabilities` @@ -49,9 +83,17 @@ * Remove support for `from_schedule` on `Quote.subscription_data` * Add support for `allow_redisplay` on `terminal.ReaderCollectPaymentMethodParams.collect_config` +## 27.1.2 - 2024-10-29 +* [#1912](https://github.com/stripe/stripe-java/pull/1912) add `tolerance` argument to `parseThinEvent` + - The default `tolerance` value is still what most users will want, but this fixes an oversight where it wasn't possible to set `tolerance` at all when parsing thin events +* [#1911](https://github.com/stripe/stripe-java/pull/1911) Fixes bug [#1899](https://github.com/stripe/stripe-java/issues/1899) + - Fixes the bug introduced in v27 where StripeException#getUserMessage on v1 API errors would return null instead of the error message. +* [#1906](https://github.com/stripe/stripe-java/pull/1906) Update webhook API version validation + - Update webhook event processing to accept events from any API version within the supported major release + ## 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 diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 622f8076664..c626f7dd819 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1314 \ No newline at end of file +v1319 \ No newline at end of file diff --git a/src/main/java/com/stripe/ApiVersion.java b/src/main/java/com/stripe/ApiVersion.java index f10ace355e9..631e13a482b 100644 --- a/src/main/java/com/stripe/ApiVersion.java +++ b/src/main/java/com/stripe/ApiVersion.java @@ -2,5 +2,5 @@ package com.stripe; final class ApiVersion { - public static final String CURRENT = "2024-09-30.acacia"; + public static final String CURRENT = "2024-10-28.acacia"; } diff --git a/src/main/java/com/stripe/StripeClient.java b/src/main/java/com/stripe/StripeClient.java index 71098cb594f..e0245c7c44b 100644 --- a/src/main/java/com/stripe/StripeClient.java +++ b/src/main/java/com/stripe/StripeClient.java @@ -54,7 +54,25 @@ protected StripeResponseGetter getResponseGetter() { */ public ThinEvent parseThinEvent(String payload, String sigHeader, String secret) throws SignatureVerificationException { - Signature.verifyHeader(payload, sigHeader, secret, Webhook.DEFAULT_TOLERANCE); + return parseThinEvent(payload, sigHeader, secret, Webhook.DEFAULT_TOLERANCE); + } + + /** + * Returns an StripeEvent instance using the provided JSON payload. Throws a JsonSyntaxException + * if the payload is not valid JSON, and a SignatureVerificationException if the signature + * verification fails for any reason. + * + * @param payload the payload sent by Stripe. + * @param sigHeader the contents of the signature header sent by Stripe. + * @param secret secret used to generate the signature. + * @param tolerance number of seconds that the event's timestamp can differ from the system time. + * Passing `0` will disable the time check entirely and is **strongly discouraged**. + * @return the StripeEvent instance + * @throws SignatureVerificationException if the verification fails. + */ + public ThinEvent parseThinEvent(String payload, String sigHeader, String secret, long tolerance) + throws SignatureVerificationException { + Signature.verifyHeader(payload, sigHeader, secret, tolerance); return ApiResource.GSON.fromJson(payload, ThinEvent.class); } diff --git a/src/main/java/com/stripe/exception/StripeException.java b/src/main/java/com/stripe/exception/StripeException.java index 09479171da9..ba7bf85ff83 100644 --- a/src/main/java/com/stripe/exception/StripeException.java +++ b/src/main/java/com/stripe/exception/StripeException.java @@ -2,6 +2,7 @@ import com.google.gson.JsonObject; import com.stripe.model.StripeError; +import com.stripe.net.ApiMode; import com.stripe.net.StripeResponseGetter; import lombok.Getter; @@ -14,10 +15,19 @@ public abstract class StripeException extends Exception { // implement Serializable transient StripeError stripeError; + // This field and its getter are used internally and may change in a non-major version + // of the SDK + ApiMode stripeErrorApiMode; + public void setStripeError(StripeError err) { stripeError = err; + stripeErrorApiMode = ApiMode.V1; } + public void setStripeV2Error(StripeError err) { + stripeError = err; + stripeErrorApiMode = ApiMode.V2; + } /** * Returns the error code of the response that triggered this exception. For {@link ApiException} * the error code will be equal to {@link StripeError#getCode()}. @@ -68,7 +78,8 @@ public String getMessage() { if (requestId != null) { additionalInfo += "; request-id: " + requestId; } - if (this.getUserMessage() != null) { + // a separate user message is only available on v2 errors + if (stripeErrorApiMode == ApiMode.V2 && this.getUserMessage() != null) { additionalInfo += "; user-message: " + this.getUserMessage(); } return super.getMessage() + additionalInfo; @@ -81,7 +92,12 @@ public String getMessage() { */ public String getUserMessage() { if (this.getStripeError() != null) { - return this.getStripeError().getUserMessage(); + switch (stripeErrorApiMode) { + case V1: + return this.getStripeError().getMessage(); + case V2: + return this.getStripeError().getUserMessage(); + } } return null; } 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/LoginLink.java b/src/main/java/com/stripe/model/LoginLink.java index 86cfc632446..88afa9e40a1 100644 --- a/src/main/java/com/stripe/model/LoginLink.java +++ b/src/main/java/com/stripe/model/LoginLink.java @@ -41,7 +41,7 @@ public class LoginLink extends ApiResource { String url; /** - * Creates a single-use login link for a connected account to access the Express Dashboard. + * Creates a login link for a connected account to access the Express Dashboard. * *

You can only create login links for accounts that use the Express Dashboard and are connected to @@ -52,7 +52,7 @@ public static LoginLink createOnAccount(String account) throws StripeException { } /** - * Creates a single-use login link for a connected account to access the Express Dashboard. + * Creates a login link for a connected account to access the Express Dashboard. * *

You can only create login links for accounts that use the Express Dashboard and are connected to @@ -64,7 +64,7 @@ public static LoginLink createOnAccount(String account, RequestOptions options) } /** - * Creates a single-use login link for a connected account to access the Express Dashboard. + * Creates a login link for a connected account to access the Express Dashboard. * *

You can only create login links for accounts that use the Express Dashboard and are connected to @@ -76,7 +76,7 @@ public static LoginLink createOnAccount(String account, Map para } /** - * Creates a single-use login link for a connected account to access the Express Dashboard. + * Creates a login link for a connected account to access the Express Dashboard. * *

You can only create login links for accounts that use the Express Dashboard and are connected to @@ -91,7 +91,7 @@ public static LoginLink createOnAccount( } /** - * Creates a single-use login link for a connected account to access the Express Dashboard. + * Creates a login link for a connected account to access the Express Dashboard. * *

You can only create login links for accounts that use the Express Dashboard and are connected to @@ -103,7 +103,7 @@ public static LoginLink createOnAccount(String account, LoginLinkCreateOnAccount } /** - * Creates a single-use login link for a connected account to access the Express Dashboard. + * Creates a login link for a connected account to access the Express Dashboard. * *

You can only create login links for accounts that use the Express Dashboard and are connected to 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..4c258050a60 100644 --- a/src/main/java/com/stripe/model/PaymentMethodConfiguration.java +++ b/src/main/java/com/stripe/model/PaymentMethodConfiguration.java @@ -120,6 +120,9 @@ public class PaymentMethodConfiguration extends ApiResource implements HasId { @SerializedName("google_pay") GooglePay googlePay; + @SerializedName("gopay") + Gopay gopay; + @SerializedName("grabpay") Grabpay grabpay; @@ -128,6 +131,9 @@ public class PaymentMethodConfiguration extends ApiResource implements HasId { @SerializedName("id") String id; + @SerializedName("id_bank_transfer") + IdBankTransfer idBankTransfer; + @SerializedName("ideal") Ideal ideal; @@ -194,12 +200,18 @@ public class PaymentMethodConfiguration extends ApiResource implements HasId { @SerializedName("promptpay") Promptpay promptpay; + @SerializedName("qris") + Qris qris; + @SerializedName("revolut_pay") RevolutPay revolutPay; @SerializedName("sepa_debit") SepaDebit sepaDebit; + @SerializedName("shopeepay") + Shopeepay shopeepay; + @SerializedName("sofort") Sofort sofort; @@ -1392,6 +1404,57 @@ public static class DisplayPreference extends StripeObject { } } + /** + * For more details about Gopay, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Gopay 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 Grabpay, please refer to the API * Reference. @@ -1443,6 +1506,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. @@ -2106,6 +2220,57 @@ public static class DisplayPreference extends StripeObject { } } + /** + * For more details about Qris, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Qris 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 RevolutPay, please refer to the API Reference. @@ -2208,6 +2373,57 @@ public static class DisplayPreference extends StripeObject { } } + /** + * For more details about Shopeepay, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Shopeepay 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 Sofort, please refer to the API * Reference. @@ -2537,7 +2753,9 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { trySetResponseGetter(fpx, responseGetter); trySetResponseGetter(giropay, responseGetter); trySetResponseGetter(googlePay, responseGetter); + trySetResponseGetter(gopay, responseGetter); trySetResponseGetter(grabpay, responseGetter); + trySetResponseGetter(idBankTransfer, responseGetter); trySetResponseGetter(ideal, responseGetter); trySetResponseGetter(jcb, responseGetter); trySetResponseGetter(klarna, responseGetter); @@ -2551,8 +2769,10 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { trySetResponseGetter(paypal, responseGetter); trySetResponseGetter(payto, responseGetter); trySetResponseGetter(promptpay, responseGetter); + trySetResponseGetter(qris, responseGetter); trySetResponseGetter(revolutPay, responseGetter); trySetResponseGetter(sepaDebit, responseGetter); + trySetResponseGetter(shopeepay, responseGetter); trySetResponseGetter(sofort, responseGetter); trySetResponseGetter(swish, responseGetter); trySetResponseGetter(twint, 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..63a55cb7bd7 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. @@ -1116,7 +1139,6 @@ public static class Zip extends StripeObject {} @Setter @EqualsAndHashCode(callSuper = false) public static class NextAction extends StripeObject { - /** Contains the refund details. */ @SerializedName("display_details") DisplayDetails displayDetails; 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/StripeError.java b/src/main/java/com/stripe/model/StripeError.java index bce4a7b9111..2cbbd68fa97 100644 --- a/src/main/java/com/stripe/model/StripeError.java +++ b/src/main/java/com/stripe/model/StripeError.java @@ -78,23 +78,22 @@ public class StripeError extends StripeObject { * payment_method_provider_decline}, {@code payment_method_provider_timeout}, {@code * payment_method_unactivated}, {@code payment_method_unexpected_state}, {@code * payment_method_unsupported_type}, {@code payout_reconciliation_not_ready}, {@code - * payout_statement_descriptor_profanity}, {@code payouts_limit_exceeded}, {@code - * payouts_not_allowed}, {@code platform_account_required}, {@code platform_api_key_expired}, - * {@code postal_code_invalid}, {@code processing_error}, {@code product_inactive}, {@code - * progressive_onboarding_limit_exceeded}, {@code rate_limit}, {@code refer_to_customer}, {@code - * refund_disputed_payment}, {@code resource_already_exists}, {@code resource_missing}, {@code - * return_intent_already_processed}, {@code routing_number_invalid}, {@code secret_key_required}, - * {@code sensitive_data_access_expired}, {@code sepa_unsupported_account}, {@code - * setup_attempt_failed}, {@code setup_intent_authentication_failure}, {@code - * setup_intent_invalid_parameter}, {@code setup_intent_mandate_invalid}, {@code - * setup_intent_setup_attempt_expired}, {@code setup_intent_unexpected_state}, {@code - * shipping_address_invalid}, {@code shipping_calculation_failed}, {@code sku_inactive}, {@code - * state_unsupported}, {@code status_transition_invalid}, {@code stripe_tax_inactive}, {@code - * tax_id_invalid}, {@code taxes_calculation_failed}, {@code - * terminal_location_country_unsupported}, {@code terminal_reader_busy}, {@code - * terminal_reader_collected_data_invalid}, {@code terminal_reader_hardware_fault}, {@code - * terminal_reader_invalid_location_for_activation}, {@code - * terminal_reader_invalid_location_for_payment}, {@code terminal_reader_offline}, {@code + * payouts_limit_exceeded}, {@code payouts_not_allowed}, {@code platform_account_required}, {@code + * platform_api_key_expired}, {@code postal_code_invalid}, {@code processing_error}, {@code + * product_inactive}, {@code progressive_onboarding_limit_exceeded}, {@code rate_limit}, {@code + * refer_to_customer}, {@code refund_disputed_payment}, {@code resource_already_exists}, {@code + * resource_missing}, {@code return_intent_already_processed}, {@code routing_number_invalid}, + * {@code secret_key_required}, {@code sensitive_data_access_expired}, {@code + * sepa_unsupported_account}, {@code setup_attempt_failed}, {@code + * setup_intent_authentication_failure}, {@code setup_intent_invalid_parameter}, {@code + * setup_intent_mandate_invalid}, {@code setup_intent_setup_attempt_expired}, {@code + * setup_intent_unexpected_state}, {@code shipping_address_invalid}, {@code + * shipping_calculation_failed}, {@code sku_inactive}, {@code state_unsupported}, {@code + * status_transition_invalid}, {@code stripe_tax_inactive}, {@code tax_id_invalid}, {@code + * taxes_calculation_failed}, {@code terminal_location_country_unsupported}, {@code + * terminal_reader_busy}, {@code terminal_reader_collected_data_invalid}, {@code + * terminal_reader_hardware_fault}, {@code terminal_reader_invalid_location_for_activation}, + * {@code terminal_reader_invalid_location_for_payment}, {@code terminal_reader_offline}, {@code * terminal_reader_timeout}, {@code testmode_charges_only}, {@code tls_version_unsupported}, * {@code token_already_used}, {@code token_card_network_invalid}, {@code token_in_use}, {@code * transfer_source_balance_parameters_mismatch}, {@code transfers_not_allowed}, or {@code 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/model/checkout/Session.java b/src/main/java/com/stripe/model/checkout/Session.java index 0467159659c..8ad2831402f 100644 --- a/src/main/java/com/stripe/model/checkout/Session.java +++ b/src/main/java/com/stripe/model/checkout/Session.java @@ -1674,12 +1674,18 @@ public static class PaymentMethodOptions extends StripeObject { @SerializedName("ideal") Ideal ideal; + @SerializedName("kakao_pay") + KakaoPay kakaoPay; + @SerializedName("klarna") Klarna klarna; @SerializedName("konbini") Konbini konbini; + @SerializedName("kr_card") + KrCard krCard; + @SerializedName("link") Link link; @@ -1689,12 +1695,18 @@ public static class PaymentMethodOptions extends StripeObject { @SerializedName("multibanco") Multibanco multibanco; + @SerializedName("naver_pay") + NaverPay naverPay; + @SerializedName("oxxo") Oxxo oxxo; @SerializedName("p24") P24 p24; + @SerializedName("payco") + Payco payco; + @SerializedName("paynow") Paynow paynow; @@ -1710,6 +1722,9 @@ public static class PaymentMethodOptions extends StripeObject { @SerializedName("revolut_pay") RevolutPay revolutPay; + @SerializedName("samsung_pay") + SamsungPay samsungPay; + @SerializedName("sepa_debit") SepaDebit sepaDebit; @@ -2468,6 +2483,47 @@ public static class Ideal extends StripeObject { String setupFutureUsage; } + /** + * For more details about KakaoPay, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class KakaoPay extends StripeObject { + /** + * Controls when the funds will be captured from the customer's account. + * + *

Equal to {@code manual}. + */ + @SerializedName("capture_method") + String captureMethod; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

One of {@code none}, or {@code off_session}. + */ + @SerializedName("setup_future_usage") + String setupFutureUsage; + } + /** * For more details about Klarna, please refer to the API * Reference. @@ -2543,6 +2599,47 @@ public static class Konbini extends StripeObject { String setupFutureUsage; } + /** + * For more details about KrCard, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class KrCard extends StripeObject { + /** + * Controls when the funds will be captured from the customer's account. + * + *

Equal to {@code manual}. + */ + @SerializedName("capture_method") + String captureMethod; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

One of {@code none}, or {@code off_session}. + */ + @SerializedName("setup_future_usage") + String setupFutureUsage; + } + /** * For more details about Link, please refer to the API * Reference. @@ -2642,6 +2739,23 @@ public static class Multibanco extends StripeObject { String setupFutureUsage; } + /** + * For more details about NaverPay, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class NaverPay extends StripeObject { + /** + * Controls when the funds will be captured from the customer's account. + * + *

Equal to {@code manual}. + */ + @SerializedName("capture_method") + String captureMethod; + } + /** * For more details about Oxxo, please refer to the API * Reference. @@ -2716,6 +2830,23 @@ public static class P24 extends StripeObject { String setupFutureUsage; } + /** + * For more details about Payco, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Payco extends StripeObject { + /** + * Controls when the funds will be captured from the customer's account. + * + *

Equal to {@code manual}. + */ + @SerializedName("capture_method") + String captureMethod; + } + /** * For more details about Paynow, please refer to the API * Reference. @@ -2958,6 +3089,23 @@ public static class RevolutPay extends StripeObject { String setupFutureUsage; } + /** + * For more details about SamsungPay, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class SamsungPay extends StripeObject { + /** + * Controls when the funds will be captured from the customer's account. + * + *

Equal to {@code manual}. + */ + @SerializedName("capture_method") + String captureMethod; + } + /** * For more details about SepaDebit, please refer to the API Reference. diff --git a/src/main/java/com/stripe/model/v2/EventDataClassLookup.java b/src/main/java/com/stripe/model/v2/EventDataClassLookup.java index f923a73e930..0fbd37bac5a 100644 --- a/src/main/java/com/stripe/model/v2/EventDataClassLookup.java +++ b/src/main/java/com/stripe/model/v2/EventDataClassLookup.java @@ -26,6 +26,7 @@ public final class EventDataClassLookup { "v2.billing.meter_event_session", com.stripe.model.v2.billing.MeterEventSession.class); classLookup.put("v2.core.event", com.stripe.model.v2.Event.class); + classLookup.put("v2.core.event_destination", com.stripe.model.v2.EventDestination.class); eventClassLookup.put( "v1.billing.meter.error_report_triggered", diff --git a/src/main/java/com/stripe/model/v2/EventDestination.java b/src/main/java/com/stripe/model/v2/EventDestination.java new file mode 100644 index 00000000000..401cf4666c0 --- /dev/null +++ b/src/main/java/com/stripe/model/v2/EventDestination.java @@ -0,0 +1,178 @@ +// File generated from our OpenAPI spec +package com.stripe.model.v2; + +import com.google.gson.annotations.SerializedName; +import com.stripe.model.HasId; +import com.stripe.model.StripeObject; +import java.time.Instant; +import java.util.List; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.Setter; + +@Getter +@Setter +@EqualsAndHashCode(callSuper = false) +public class EventDestination extends StripeObject implements HasId { + /** Amazon EventBridge configuration. */ + @SerializedName("amazon_eventbridge") + AmazonEventbridge amazonEventbridge; + + /** Time at which the object was created. */ + @SerializedName("created") + Instant created; + + /** An optional description of what the event destination is used for. */ + @SerializedName("description") + String description; + + /** The list of events to enable for this endpoint. */ + @SerializedName("enabled_events") + List enabledEvents; + + /** + * Payload type of events being subscribed to. + * + *

One of {@code snapshot}, or {@code thin}. + */ + @SerializedName("event_payload") + String eventPayload; + + /** Where events should be routed from. */ + @SerializedName("events_from") + List eventsFrom; + + /** Unique identifier for the object. */ + @Getter(onMethod_ = {@Override}) + @SerializedName("id") + String id; + + /** + * Has the value {@code true} if the object exists in live mode or the value {@code false} if the + * object exists in test mode. + */ + @SerializedName("livemode") + Boolean livemode; + + /** Metadata. */ + @SerializedName("metadata") + Map metadata; + + /** Event destination name. */ + @SerializedName("name") + String name; + + /** + * String representing the object's type. Objects of the same type share the same value of the + * object field. + * + *

Equal to {@code v2.core.event_destination}. + */ + @SerializedName("object") + String object; + + /** If using the snapshot event payload, the API version events are rendered as. */ + @SerializedName("snapshot_api_version") + String snapshotApiVersion; + + /** + * Status. It can be set to either enabled or disabled. + * + *

One of {@code disabled}, or {@code enabled}. + */ + @SerializedName("status") + String status; + + /** Additional information about event destination status. */ + @SerializedName("status_details") + StatusDetails statusDetails; + + /** + * Event destination type. + * + *

One of {@code amazon_eventbridge}, or {@code webhook_endpoint}. + */ + @SerializedName("type") + String type; + + /** Time at which the object was last updated. */ + @SerializedName("updated") + Instant updated; + + /** Webhook endpoint configuration. */ + @SerializedName("webhook_endpoint") + WebhookEndpoint webhookEndpoint; + + /** + * For more details about AmazonEventbridge, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AmazonEventbridge extends StripeObject { + /** The AWS account ID. */ + @SerializedName("aws_account_id") + String awsAccountId; + + /** The ARN of the AWS event source. */ + @SerializedName("aws_event_source_arn") + String awsEventSourceArn; + + /** + * The state of the AWS event source. + * + *

One of {@code active}, {@code deleted}, {@code pending}, or {@code unknown}. + */ + @SerializedName("aws_event_source_status") + String awsEventSourceStatus; + } + + /** + * For more details about StatusDetails, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetails extends StripeObject { + /** Details about why the event destination has been disabled. */ + @SerializedName("disabled") + Disabled disabled; + + /** + * For more details about Disabled, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Disabled extends StripeObject { + /** + * Reason event destination has been disabled. + * + *

One of {@code no_aws_event_source_exists}, or {@code user}. + */ + @SerializedName("reason") + String reason; + } + } + + /** + * For more details about WebhookEndpoint, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class WebhookEndpoint extends StripeObject { + /** The signing secret of the webhook endpoint, only includable on creation. */ + @SerializedName("signing_secret") + String signingSecret; + + /** The URL of the webhook endpoint, includable. */ + @SerializedName("url") + String url; + } +} diff --git a/src/main/java/com/stripe/net/HttpClient.java b/src/main/java/com/stripe/net/HttpClient.java index ccfb1ba610f..f012b688298 100644 --- a/src/main/java/com/stripe/net/HttpClient.java +++ b/src/main/java/com/stripe/net/HttpClient.java @@ -138,8 +138,10 @@ public StripeResponseStream requestStreamWithRetries(StripeRequest request) * * @return a string containing the value of the {@code User-Agent} header */ - protected static String buildUserAgentString() { - String userAgent = String.format("Stripe/v1 JavaBindings/%s", Stripe.VERSION); + protected static String buildUserAgentString(StripeRequest request) { + String apiMode = request.apiMode() == ApiMode.V2 ? "v2" : "v1"; + + String userAgent = String.format("Stripe/%s JavaBindings/%s", apiMode, Stripe.VERSION); if (Stripe.getAppInfo() != null) { userAgent += " " + formatAppInfo(Stripe.getAppInfo()); diff --git a/src/main/java/com/stripe/net/HttpURLConnectionClient.java b/src/main/java/com/stripe/net/HttpURLConnectionClient.java index 6b3120ae21b..8287b67d71d 100644 --- a/src/main/java/com/stripe/net/HttpURLConnectionClient.java +++ b/src/main/java/com/stripe/net/HttpURLConnectionClient.java @@ -83,7 +83,7 @@ public StripeResponse request(StripeRequest request) throws ApiConnectionExcepti static HttpHeaders getHeaders(StripeRequest request) { Map> userAgentHeadersMap = new HashMap<>(); - userAgentHeadersMap.put("User-Agent", Arrays.asList(buildUserAgentString())); + userAgentHeadersMap.put("User-Agent", Arrays.asList(buildUserAgentString(request))); userAgentHeadersMap.put( "X-Stripe-Client-User-Agent", Arrays.asList(buildXStripeClientUserAgentString())); diff --git a/src/main/java/com/stripe/net/LiveStripeResponseGetter.java b/src/main/java/com/stripe/net/LiveStripeResponseGetter.java index 0f1cb13fbe8..91d9d8f4860 100644 --- a/src/main/java/com/stripe/net/LiveStripeResponseGetter.java +++ b/src/main/java/com/stripe/net/LiveStripeResponseGetter.java @@ -408,7 +408,7 @@ private void handleV2ApiError(StripeResponse response) throws StripeException { error.setLastResponse(response); exception = new ApiException(error.getMessage(), response.requestId(), code, response.code(), null); - exception.setStripeError(error); + exception.setStripeV2Error(error); throw exception; } diff --git a/src/main/java/com/stripe/net/StripeRequest.java b/src/main/java/com/stripe/net/StripeRequest.java index 4afd391f9c6..9be3bd09afd 100644 --- a/src/main/java/com/stripe/net/StripeRequest.java +++ b/src/main/java/com/stripe/net/StripeRequest.java @@ -45,6 +45,9 @@ public class StripeRequest { /** The special modifiers of the request. */ RequestOptions options; + /** The version of the API (ApiMode.V1 or ApiMode.V2) */ + ApiMode apiMode; + /** * Initializes a new instance of the {@link StripeRequest} class. * @@ -70,6 +73,7 @@ private StripeRequest( this.method = method; this.url = buildURL(method, url, params, apiMode); this.headers = buildHeaders(method, this.options, this.content, apiMode); + this.apiMode = apiMode; } catch (IOException e) { throw new ApiConnectionException( String.format( @@ -106,6 +110,7 @@ private StripeRequest( this.url = buildURL(method, url, params, apiMode); this.content = buildContent(method, params, apiMode); this.headers = buildHeaders(method, this.options, this.content, apiMode); + this.apiMode = apiMode; } catch (IOException e) { throw new ApiConnectionException( String.format( @@ -209,7 +214,8 @@ public StripeRequest withAdditionalHeader(String name, String value) { this.content, this.headers.withAdditionalHeader(name, value), this.params, - this.options); + this.options, + this.apiMode); } private static URL buildURL( 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/AccountSessionCreateParams.java b/src/main/java/com/stripe/param/AccountSessionCreateParams.java index 0e4965e21c2..c9a44d41c4d 100644 --- a/src/main/java/com/stripe/param/AccountSessionCreateParams.java +++ b/src/main/java/com/stripe/param/AccountSessionCreateParams.java @@ -224,6 +224,7 @@ public static class Components { @SerializedName("payouts_list") PayoutsList payoutsList; + /** Configuration for the recipients component. */ @SerializedName("recipients") Recipients recipients; @@ -538,6 +539,7 @@ public Builder setPayoutsList(AccountSessionCreateParams.Components.PayoutsList return this; } + /** Configuration for the recipients component. */ public Builder setRecipients(AccountSessionCreateParams.Components.Recipients recipients) { this.recipients = recipients; return this; @@ -2369,6 +2371,7 @@ public static class FinancialAccount { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** The list of features enabled in the embedded component. */ @SerializedName("features") Features features; @@ -2430,6 +2433,7 @@ public Builder putAllExtraParam(Map map) { return this; } + /** The list of features enabled in the embedded component. */ public Builder setFeatures( AccountSessionCreateParams.Components.FinancialAccount.Features features) { this.features = features; @@ -4321,7 +4325,6 @@ public static class Recipients { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** The list of features enabled in the embedded component. */ @SerializedName("features") Features features; @@ -4382,7 +4385,6 @@ public Builder putAllExtraParam(Map map) { return this; } - /** The list of features enabled in the embedded component. */ public Builder setFeatures( AccountSessionCreateParams.Components.Recipients.Features features) { this.features = features; @@ -4402,8 +4404,13 @@ public static class Features { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Features(Map extraParams) { + /** Whether to allow sending money. */ + @SerializedName("send_money") + Boolean sendMoney; + + private Features(Map extraParams, Boolean sendMoney) { this.extraParams = extraParams; + this.sendMoney = sendMoney; } public static Builder builder() { @@ -4413,9 +4420,12 @@ public static Builder builder() { public static class Builder { private Map extraParams; + private Boolean sendMoney; + /** Finalize and obtain parameter instance from this builder. */ public AccountSessionCreateParams.Components.Recipients.Features build() { - return new AccountSessionCreateParams.Components.Recipients.Features(this.extraParams); + return new AccountSessionCreateParams.Components.Recipients.Features( + this.extraParams, this.sendMoney); } /** @@ -4445,6 +4455,12 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } + + /** Whether to allow sending money. */ + public Builder setSendMoney(Boolean sendMoney) { + this.sendMoney = sendMoney; + return this; + } } } } 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..328cc7ff037 100644 --- a/src/main/java/com/stripe/param/InvoiceCreateParams.java +++ b/src/main/java/com/stripe/param/InvoiceCreateParams.java @@ -46,6 +46,13 @@ public class InvoiceCreateParams extends ApiRequestParams { @SerializedName("automatic_tax") AutomaticTax automaticTax; + /** + * The time when this invoice should be scheduled to finalize. The invoice will be finalized at + * this time if it is still in draft state. + */ + @SerializedName("automatically_finalizes_at") + Long automaticallyFinalizesAt; + /** * Either {@code charge_automatically}, or {@code send_invoice}. When charging automatically, * Stripe will attempt to pay this invoice using the default source attached to the customer. When @@ -254,6 +261,7 @@ private InvoiceCreateParams( Long applicationFeeAmount, Boolean autoAdvance, AutomaticTax automaticTax, + Long automaticallyFinalizesAt, CollectionMethod collectionMethod, String currency, Object customFields, @@ -288,6 +296,7 @@ private InvoiceCreateParams( this.applicationFeeAmount = applicationFeeAmount; this.autoAdvance = autoAdvance; this.automaticTax = automaticTax; + this.automaticallyFinalizesAt = automaticallyFinalizesAt; this.collectionMethod = collectionMethod; this.currency = currency; this.customFields = customFields; @@ -334,6 +343,8 @@ public static class Builder { private AutomaticTax automaticTax; + private Long automaticallyFinalizesAt; + private CollectionMethod collectionMethod; private String currency; @@ -400,6 +411,7 @@ public InvoiceCreateParams build() { this.applicationFeeAmount, this.autoAdvance, this.automaticTax, + this.automaticallyFinalizesAt, this.collectionMethod, this.currency, this.customFields, @@ -550,6 +562,15 @@ public Builder setAutomaticTax(InvoiceCreateParams.AutomaticTax automaticTax) { return this; } + /** + * The time when this invoice should be scheduled to finalize. The invoice will be finalized at + * this time if it is still in draft state. + */ + public Builder setAutomaticallyFinalizesAt(Long automaticallyFinalizesAt) { + this.automaticallyFinalizesAt = automaticallyFinalizesAt; + return this; + } + /** * Either {@code charge_automatically}, or {@code send_invoice}. When charging automatically, * Stripe will attempt to pay this invoice using the default source attached to the customer. @@ -2164,6 +2185,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 +2219,7 @@ private PaymentMethodOptions( Object card, Object customerBalance, Map extraParams, + Object idBankTransfer, Object konbini, Object sepaDebit, Object usBankAccount) { @@ -2199,6 +2228,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 +2249,8 @@ public static class Builder { private Map extraParams; + private Object idBankTransfer; + private Object konbini; private Object sepaDebit; @@ -2233,6 +2265,7 @@ public InvoiceCreateParams.PaymentSettings.PaymentMethodOptions build() { this.card, this.customerBalance, this.extraParams, + this.idBankTransfer, this.konbini, this.sepaDebit, this.usBankAccount); @@ -2342,6 +2375,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 +3439,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 +4174,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..206ddcaef79 100644 --- a/src/main/java/com/stripe/param/InvoiceUpdateParams.java +++ b/src/main/java/com/stripe/param/InvoiceUpdateParams.java @@ -45,6 +45,14 @@ public class InvoiceUpdateParams extends ApiRequestParams { @SerializedName("automatic_tax") AutomaticTax automaticTax; + /** + * The time when this invoice should be scheduled to finalize. The invoice will be finalized at + * this time if it is still in draft state. To turn off automatic finalization, set {@code + * auto_advance} to false. + */ + @SerializedName("automatically_finalizes_at") + Long automaticallyFinalizesAt; + /** * Either {@code charge_automatically} or {@code send_invoice}. This field can be updated only on * {@code draft} invoices. @@ -226,6 +234,7 @@ private InvoiceUpdateParams( Long applicationFeeAmount, Boolean autoAdvance, AutomaticTax automaticTax, + Long automaticallyFinalizesAt, CollectionMethod collectionMethod, Object customFields, Long daysUntilDue, @@ -255,6 +264,7 @@ private InvoiceUpdateParams( this.applicationFeeAmount = applicationFeeAmount; this.autoAdvance = autoAdvance; this.automaticTax = automaticTax; + this.automaticallyFinalizesAt = automaticallyFinalizesAt; this.collectionMethod = collectionMethod; this.customFields = customFields; this.daysUntilDue = daysUntilDue; @@ -296,6 +306,8 @@ public static class Builder { private AutomaticTax automaticTax; + private Long automaticallyFinalizesAt; + private CollectionMethod collectionMethod; private Object customFields; @@ -352,6 +364,7 @@ public InvoiceUpdateParams build() { this.applicationFeeAmount, this.autoAdvance, this.automaticTax, + this.automaticallyFinalizesAt, this.collectionMethod, this.customFields, this.daysUntilDue, @@ -496,6 +509,16 @@ public Builder setAutomaticTax(InvoiceUpdateParams.AutomaticTax automaticTax) { return this; } + /** + * The time when this invoice should be scheduled to finalize. The invoice will be finalized at + * this time if it is still in draft state. To turn off automatic finalization, set {@code + * auto_advance} to false. + */ + public Builder setAutomaticallyFinalizesAt(Long automaticallyFinalizesAt) { + this.automaticallyFinalizesAt = automaticallyFinalizesAt; + return this; + } + /** * Either {@code charge_automatically} or {@code send_invoice}. This field can be updated only * on {@code draft} invoices. @@ -2172,6 +2195,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 +2229,7 @@ private PaymentMethodOptions( Object card, Object customerBalance, Map extraParams, + Object idBankTransfer, Object konbini, Object sepaDebit, Object usBankAccount) { @@ -2207,6 +2238,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 +2259,8 @@ public static class Builder { private Map extraParams; + private Object idBankTransfer; + private Object konbini; private Object sepaDebit; @@ -2241,6 +2275,7 @@ public InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions build() { this.card, this.customerBalance, this.extraParams, + this.idBankTransfer, this.konbini, this.sepaDebit, this.usBankAccount); @@ -2350,6 +2385,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 +3478,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 +4219,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..2949f95db6a 100644 --- a/src/main/java/com/stripe/param/PaymentMethodConfigurationCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodConfigurationCreateParams.java @@ -208,6 +208,16 @@ public class PaymentMethodConfigurationCreateParams extends ApiRequestParams { @SerializedName("google_pay") GooglePay googlePay; + /** + * GoPay is a single use + * digital wallet payment method popular in Indonesia. When paying with GoPay, customers + * authenticate and approve payments using the Gojek app. Desktop checkout is performed by + * scanning a QR code. When checking out on mobile, customers are redirected to the Gojek app to + * confirm payment. + */ + @SerializedName("gopay") + Gopay gopay; + /** * GrabPay is a payment method developed by Grab. GrabPay is a digital wallet - @@ -217,6 +227,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 @@ -342,6 +359,14 @@ public class PaymentMethodConfigurationCreateParams extends ApiRequestParams { @SerializedName("promptpay") Promptpay promptpay; + /** + * QRIS is a real-time payment method + * popular in Indonesia. When paying with QRIS, customers authenticate and approve payments by + * scanning a QR code in their preferred digital wallet app. + */ + @SerializedName("qris") + Qris qris; + /** * Revolut Pay, developed by Revolut, a global finance app, is a digital wallet payment method. * Revolut Pay uses the customer’s stored balance or cards to fund the payment, and offers the @@ -360,6 +385,16 @@ public class PaymentMethodConfigurationCreateParams extends ApiRequestParams { @SerializedName("sepa_debit") SepaDebit sepaDebit; + /** + * ShopeePay is a single use + * digital wallet payment method popular in Indonesia. When paying with GoPay, customers + * authenticate and approve payments using the Shopee app. Desktop checkout is performed by + * scanning a QR code. When checking out on mobile, customers are redirected to the Shopee app to + * confirm payment. + */ + @SerializedName("shopeepay") + Shopeepay shopeepay; + /** * Stripe users in Europe and the United States can use the Payment Intents API—a single @@ -437,7 +472,9 @@ private PaymentMethodConfigurationCreateParams( Fpx fpx, Giropay giropay, GooglePay googlePay, + Gopay gopay, Grabpay grabpay, + IdBankTransfer idBankTransfer, Ideal ideal, Jcb jcb, Klarna klarna, @@ -453,8 +490,10 @@ private PaymentMethodConfigurationCreateParams( Paypal paypal, Payto payto, Promptpay promptpay, + Qris qris, RevolutPay revolutPay, SepaDebit sepaDebit, + Shopeepay shopeepay, Sofort sofort, Swish swish, Twint twint, @@ -484,7 +523,9 @@ private PaymentMethodConfigurationCreateParams( this.fpx = fpx; this.giropay = giropay; this.googlePay = googlePay; + this.gopay = gopay; this.grabpay = grabpay; + this.idBankTransfer = idBankTransfer; this.ideal = ideal; this.jcb = jcb; this.klarna = klarna; @@ -500,8 +541,10 @@ private PaymentMethodConfigurationCreateParams( this.paypal = paypal; this.payto = payto; this.promptpay = promptpay; + this.qris = qris; this.revolutPay = revolutPay; this.sepaDebit = sepaDebit; + this.shopeepay = shopeepay; this.sofort = sofort; this.swish = swish; this.twint = twint; @@ -561,8 +604,12 @@ public static class Builder { private GooglePay googlePay; + private Gopay gopay; + private Grabpay grabpay; + private IdBankTransfer idBankTransfer; + private Ideal ideal; private Jcb jcb; @@ -593,10 +640,14 @@ public static class Builder { private Promptpay promptpay; + private Qris qris; + private RevolutPay revolutPay; private SepaDebit sepaDebit; + private Shopeepay shopeepay; + private Sofort sofort; private Swish swish; @@ -635,7 +686,9 @@ public PaymentMethodConfigurationCreateParams build() { this.fpx, this.giropay, this.googlePay, + this.gopay, this.grabpay, + this.idBankTransfer, this.ideal, this.jcb, this.klarna, @@ -651,8 +704,10 @@ public PaymentMethodConfigurationCreateParams build() { this.paypal, this.payto, this.promptpay, + this.qris, this.revolutPay, this.sepaDebit, + this.shopeepay, this.sofort, this.swish, this.twint, @@ -943,6 +998,18 @@ public Builder setGooglePay(PaymentMethodConfigurationCreateParams.GooglePay goo return this; } + /** + * GoPay is a single use + * digital wallet payment method popular in Indonesia. When paying with GoPay, customers + * authenticate and approve payments using the Gojek app. Desktop checkout is performed by + * scanning a QR code. When checking out on mobile, customers are redirected to the Gojek app to + * confirm payment. + */ + public Builder setGopay(PaymentMethodConfigurationCreateParams.Gopay gopay) { + this.gopay = gopay; + return this; + } + /** * GrabPay is a payment method developed by Grab. GrabPay is a digital wallet - @@ -954,6 +1021,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 @@ -1111,6 +1188,16 @@ public Builder setPromptpay(PaymentMethodConfigurationCreateParams.Promptpay pro return this; } + /** + * QRIS is a real-time payment method + * popular in Indonesia. When paying with QRIS, customers authenticate and approve payments by + * scanning a QR code in their preferred digital wallet app. + */ + public Builder setQris(PaymentMethodConfigurationCreateParams.Qris qris) { + this.qris = qris; + return this; + } + /** * Revolut Pay, developed by Revolut, a global finance app, is a digital wallet payment method. * Revolut Pay uses the customer’s stored balance or cards to fund the payment, and offers the @@ -1133,6 +1220,18 @@ public Builder setSepaDebit(PaymentMethodConfigurationCreateParams.SepaDebit sep return this; } + /** + * ShopeePay is a single + * use digital wallet payment method popular in Indonesia. When paying with GoPay, customers + * authenticate and approve payments using the Shopee app. Desktop checkout is performed by + * scanning a QR code. When checking out on mobile, customers are redirected to the Shopee app + * to confirm payment. + */ + public Builder setShopeepay(PaymentMethodConfigurationCreateParams.Shopeepay shopeepay) { + this.shopeepay = shopeepay; + return this; + } + /** * Stripe users in Europe and the United States can use the Payment Intents API—a single @@ -4644,7 +4743,7 @@ public enum Preference implements ApiRequestParams.EnumParam { } @Getter - public static class Grabpay { + public static class Gopay { /** Whether or not the payment method should be displayed. */ @SerializedName("display_preference") DisplayPreference displayPreference; @@ -4658,7 +4757,7 @@ public static class Grabpay { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Grabpay(DisplayPreference displayPreference, Map extraParams) { + private Gopay(DisplayPreference displayPreference, Map extraParams) { this.displayPreference = displayPreference; this.extraParams = extraParams; } @@ -4673,14 +4772,14 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationCreateParams.Grabpay build() { - return new PaymentMethodConfigurationCreateParams.Grabpay( + public PaymentMethodConfigurationCreateParams.Gopay build() { + return new PaymentMethodConfigurationCreateParams.Gopay( this.displayPreference, this.extraParams); } /** Whether or not the payment method should be displayed. */ public Builder setDisplayPreference( - PaymentMethodConfigurationCreateParams.Grabpay.DisplayPreference displayPreference) { + PaymentMethodConfigurationCreateParams.Gopay.DisplayPreference displayPreference) { this.displayPreference = displayPreference; return this; } @@ -4688,7 +4787,7 @@ public Builder setDisplayPreference( /** * 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.Grabpay#extraParams} for the field documentation. + * PaymentMethodConfigurationCreateParams.Gopay#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -4701,7 +4800,7 @@ public Builder putExtraParam(String key, Object value) { /** * 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.Grabpay#extraParams} for the field + * See {@link PaymentMethodConfigurationCreateParams.Gopay#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -4743,8 +4842,8 @@ public static class Builder { private Preference preference; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationCreateParams.Grabpay.DisplayPreference build() { - return new PaymentMethodConfigurationCreateParams.Grabpay.DisplayPreference( + public PaymentMethodConfigurationCreateParams.Gopay.DisplayPreference build() { + return new PaymentMethodConfigurationCreateParams.Gopay.DisplayPreference( this.extraParams, this.preference); } @@ -4752,8 +4851,8 @@ public PaymentMethodConfigurationCreateParams.Grabpay.DisplayPreference build() * 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.Grabpay.DisplayPreference#extraParams} for the - * field documentation. + * PaymentMethodConfigurationCreateParams.Gopay.DisplayPreference#extraParams} for the field + * documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -4767,8 +4866,8 @@ public Builder putExtraParam(String key, Object value) { * 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.Grabpay.DisplayPreference#extraParams} for the - * field documentation. + * PaymentMethodConfigurationCreateParams.Gopay.DisplayPreference#extraParams} for the field + * documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -4780,8 +4879,7 @@ public Builder putAllExtraParam(Map map) { /** The account's preference for whether or not to display this payment method. */ public Builder setPreference( - PaymentMethodConfigurationCreateParams.Grabpay.DisplayPreference.Preference - preference) { + PaymentMethodConfigurationCreateParams.Gopay.DisplayPreference.Preference preference) { this.preference = preference; return this; } @@ -4808,7 +4906,7 @@ public enum Preference implements ApiRequestParams.EnumParam { } @Getter - public static class Ideal { + public static class Grabpay { /** Whether or not the payment method should be displayed. */ @SerializedName("display_preference") DisplayPreference displayPreference; @@ -4822,7 +4920,7 @@ public static class Ideal { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Ideal(DisplayPreference displayPreference, Map extraParams) { + private Grabpay(DisplayPreference displayPreference, Map extraParams) { this.displayPreference = displayPreference; this.extraParams = extraParams; } @@ -4837,14 +4935,14 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationCreateParams.Ideal build() { - return new PaymentMethodConfigurationCreateParams.Ideal( + public PaymentMethodConfigurationCreateParams.Grabpay build() { + return new PaymentMethodConfigurationCreateParams.Grabpay( this.displayPreference, this.extraParams); } /** Whether or not the payment method should be displayed. */ public Builder setDisplayPreference( - PaymentMethodConfigurationCreateParams.Ideal.DisplayPreference displayPreference) { + PaymentMethodConfigurationCreateParams.Grabpay.DisplayPreference displayPreference) { this.displayPreference = displayPreference; return this; } @@ -4852,7 +4950,7 @@ public Builder setDisplayPreference( /** * 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.Ideal#extraParams} for the field documentation. + * PaymentMethodConfigurationCreateParams.Grabpay#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -4865,7 +4963,7 @@ public Builder putExtraParam(String key, Object value) { /** * 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.Ideal#extraParams} for the field + * See {@link PaymentMethodConfigurationCreateParams.Grabpay#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -4907,8 +5005,8 @@ public static class Builder { private Preference preference; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationCreateParams.Ideal.DisplayPreference build() { - return new PaymentMethodConfigurationCreateParams.Ideal.DisplayPreference( + public PaymentMethodConfigurationCreateParams.Grabpay.DisplayPreference build() { + return new PaymentMethodConfigurationCreateParams.Grabpay.DisplayPreference( this.extraParams, this.preference); } @@ -4916,8 +5014,8 @@ public PaymentMethodConfigurationCreateParams.Ideal.DisplayPreference build() { * 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.Ideal.DisplayPreference#extraParams} for the field - * documentation. + * PaymentMethodConfigurationCreateParams.Grabpay.DisplayPreference#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -4931,8 +5029,8 @@ public Builder putExtraParam(String key, Object value) { * 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.Ideal.DisplayPreference#extraParams} for the field - * documentation. + * PaymentMethodConfigurationCreateParams.Grabpay.DisplayPreference#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -4944,7 +5042,8 @@ public Builder putAllExtraParam(Map map) { /** The account's preference for whether or not to display this payment method. */ public Builder setPreference( - PaymentMethodConfigurationCreateParams.Ideal.DisplayPreference.Preference preference) { + PaymentMethodConfigurationCreateParams.Grabpay.DisplayPreference.Preference + preference) { this.preference = preference; return this; } @@ -4971,7 +5070,7 @@ public enum Preference implements ApiRequestParams.EnumParam { } @Getter - public static class Jcb { + public static class IdBankTransfer { /** Whether or not the payment method should be displayed. */ @SerializedName("display_preference") DisplayPreference displayPreference; @@ -4985,7 +5084,7 @@ public static class Jcb { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Jcb(DisplayPreference displayPreference, Map extraParams) { + private IdBankTransfer(DisplayPreference displayPreference, Map extraParams) { this.displayPreference = displayPreference; this.extraParams = extraParams; } @@ -5000,14 +5099,15 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationCreateParams.Jcb build() { - return new PaymentMethodConfigurationCreateParams.Jcb( + 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.Jcb.DisplayPreference displayPreference) { + PaymentMethodConfigurationCreateParams.IdBankTransfer.DisplayPreference + displayPreference) { this.displayPreference = displayPreference; return this; } @@ -5015,7 +5115,8 @@ public Builder setDisplayPreference( /** * 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.Jcb#extraParams} for the field documentation. + * PaymentMethodConfigurationCreateParams.IdBankTransfer#extraParams} for the field + * documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -5028,7 +5129,7 @@ public Builder putExtraParam(String key, Object value) { /** * 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.Jcb#extraParams} for the field + * See {@link PaymentMethodConfigurationCreateParams.IdBankTransfer#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -5070,16 +5171,17 @@ public static class Builder { private Preference preference; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationCreateParams.Jcb.DisplayPreference build() { - return new PaymentMethodConfigurationCreateParams.Jcb.DisplayPreference( + 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.Jcb.DisplayPreference#extraParams} - * for the field documentation. + * map. See {@link + * PaymentMethodConfigurationCreateParams.IdBankTransfer.DisplayPreference#extraParams} for + * the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -5092,8 +5194,9 @@ public Builder putExtraParam(String key, Object value) { /** * 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.Jcb.DisplayPreference#extraParams} - * for the field documentation. + * map. See {@link + * PaymentMethodConfigurationCreateParams.IdBankTransfer.DisplayPreference#extraParams} for + * the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -5105,7 +5208,8 @@ public Builder putAllExtraParam(Map map) { /** The account's preference for whether or not to display this payment method. */ public Builder setPreference( - PaymentMethodConfigurationCreateParams.Jcb.DisplayPreference.Preference preference) { + PaymentMethodConfigurationCreateParams.IdBankTransfer.DisplayPreference.Preference + preference) { this.preference = preference; return this; } @@ -5132,7 +5236,7 @@ public enum Preference implements ApiRequestParams.EnumParam { } @Getter - public static class Klarna { + public static class Ideal { /** Whether or not the payment method should be displayed. */ @SerializedName("display_preference") DisplayPreference displayPreference; @@ -5146,7 +5250,7 @@ public static class Klarna { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Klarna(DisplayPreference displayPreference, Map extraParams) { + private Ideal(DisplayPreference displayPreference, Map extraParams) { this.displayPreference = displayPreference; this.extraParams = extraParams; } @@ -5161,14 +5265,14 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationCreateParams.Klarna build() { - return new PaymentMethodConfigurationCreateParams.Klarna( + public PaymentMethodConfigurationCreateParams.Ideal build() { + return new PaymentMethodConfigurationCreateParams.Ideal( this.displayPreference, this.extraParams); } /** Whether or not the payment method should be displayed. */ public Builder setDisplayPreference( - PaymentMethodConfigurationCreateParams.Klarna.DisplayPreference displayPreference) { + PaymentMethodConfigurationCreateParams.Ideal.DisplayPreference displayPreference) { this.displayPreference = displayPreference; return this; } @@ -5176,7 +5280,7 @@ public Builder setDisplayPreference( /** * 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.Klarna#extraParams} for the field documentation. + * PaymentMethodConfigurationCreateParams.Ideal#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -5189,7 +5293,7 @@ public Builder putExtraParam(String key, Object value) { /** * 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.Klarna#extraParams} for the field + * See {@link PaymentMethodConfigurationCreateParams.Ideal#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -5231,8 +5335,8 @@ public static class Builder { private Preference preference; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationCreateParams.Klarna.DisplayPreference build() { - return new PaymentMethodConfigurationCreateParams.Klarna.DisplayPreference( + public PaymentMethodConfigurationCreateParams.Ideal.DisplayPreference build() { + return new PaymentMethodConfigurationCreateParams.Ideal.DisplayPreference( this.extraParams, this.preference); } @@ -5240,8 +5344,8 @@ public PaymentMethodConfigurationCreateParams.Klarna.DisplayPreference build() { * 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.Klarna.DisplayPreference#extraParams} for the - * field documentation. + * PaymentMethodConfigurationCreateParams.Ideal.DisplayPreference#extraParams} for the field + * documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -5255,8 +5359,8 @@ public Builder putExtraParam(String key, Object value) { * 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.Klarna.DisplayPreference#extraParams} for the - * field documentation. + * PaymentMethodConfigurationCreateParams.Ideal.DisplayPreference#extraParams} for the field + * documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -5268,7 +5372,7 @@ public Builder putAllExtraParam(Map map) { /** The account's preference for whether or not to display this payment method. */ public Builder setPreference( - PaymentMethodConfigurationCreateParams.Klarna.DisplayPreference.Preference preference) { + PaymentMethodConfigurationCreateParams.Ideal.DisplayPreference.Preference preference) { this.preference = preference; return this; } @@ -5295,7 +5399,7 @@ public enum Preference implements ApiRequestParams.EnumParam { } @Getter - public static class Konbini { + public static class Jcb { /** Whether or not the payment method should be displayed. */ @SerializedName("display_preference") DisplayPreference displayPreference; @@ -5309,7 +5413,7 @@ public static class Konbini { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Konbini(DisplayPreference displayPreference, Map extraParams) { + private Jcb(DisplayPreference displayPreference, Map extraParams) { this.displayPreference = displayPreference; this.extraParams = extraParams; } @@ -5324,14 +5428,14 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationCreateParams.Konbini build() { - return new PaymentMethodConfigurationCreateParams.Konbini( + public PaymentMethodConfigurationCreateParams.Jcb build() { + return new PaymentMethodConfigurationCreateParams.Jcb( this.displayPreference, this.extraParams); } /** Whether or not the payment method should be displayed. */ public Builder setDisplayPreference( - PaymentMethodConfigurationCreateParams.Konbini.DisplayPreference displayPreference) { + PaymentMethodConfigurationCreateParams.Jcb.DisplayPreference displayPreference) { this.displayPreference = displayPreference; return this; } @@ -5339,7 +5443,7 @@ public Builder setDisplayPreference( /** * 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.Konbini#extraParams} for the field documentation. + * PaymentMethodConfigurationCreateParams.Jcb#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -5352,7 +5456,7 @@ public Builder putExtraParam(String key, Object value) { /** * 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.Konbini#extraParams} for the field + * See {@link PaymentMethodConfigurationCreateParams.Jcb#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -5394,17 +5498,16 @@ public static class Builder { private Preference preference; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationCreateParams.Konbini.DisplayPreference build() { - return new PaymentMethodConfigurationCreateParams.Konbini.DisplayPreference( + public PaymentMethodConfigurationCreateParams.Jcb.DisplayPreference build() { + return new PaymentMethodConfigurationCreateParams.Jcb.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.Konbini.DisplayPreference#extraParams} for the - * field documentation. + * map. See {@link PaymentMethodConfigurationCreateParams.Jcb.DisplayPreference#extraParams} + * for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -5417,9 +5520,8 @@ public Builder putExtraParam(String key, Object value) { /** * 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.Konbini.DisplayPreference#extraParams} for the - * field documentation. + * map. See {@link PaymentMethodConfigurationCreateParams.Jcb.DisplayPreference#extraParams} + * for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -5431,8 +5533,7 @@ public Builder putAllExtraParam(Map map) { /** The account's preference for whether or not to display this payment method. */ public Builder setPreference( - PaymentMethodConfigurationCreateParams.Konbini.DisplayPreference.Preference - preference) { + PaymentMethodConfigurationCreateParams.Jcb.DisplayPreference.Preference preference) { this.preference = preference; return this; } @@ -5459,7 +5560,7 @@ public enum Preference implements ApiRequestParams.EnumParam { } @Getter - public static class Link { + public static class Klarna { /** Whether or not the payment method should be displayed. */ @SerializedName("display_preference") DisplayPreference displayPreference; @@ -5473,7 +5574,7 @@ public static class Link { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Link(DisplayPreference displayPreference, Map extraParams) { + private Klarna(DisplayPreference displayPreference, Map extraParams) { this.displayPreference = displayPreference; this.extraParams = extraParams; } @@ -5488,14 +5589,14 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationCreateParams.Link build() { - return new PaymentMethodConfigurationCreateParams.Link( + public PaymentMethodConfigurationCreateParams.Klarna build() { + return new PaymentMethodConfigurationCreateParams.Klarna( this.displayPreference, this.extraParams); } /** Whether or not the payment method should be displayed. */ public Builder setDisplayPreference( - PaymentMethodConfigurationCreateParams.Link.DisplayPreference displayPreference) { + PaymentMethodConfigurationCreateParams.Klarna.DisplayPreference displayPreference) { this.displayPreference = displayPreference; return this; } @@ -5503,7 +5604,7 @@ public Builder setDisplayPreference( /** * 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.Link#extraParams} for the field documentation. + * PaymentMethodConfigurationCreateParams.Klarna#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -5516,7 +5617,7 @@ public Builder putExtraParam(String key, Object value) { /** * 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.Link#extraParams} for the field + * See {@link PaymentMethodConfigurationCreateParams.Klarna#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -5558,8 +5659,8 @@ public static class Builder { private Preference preference; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationCreateParams.Link.DisplayPreference build() { - return new PaymentMethodConfigurationCreateParams.Link.DisplayPreference( + public PaymentMethodConfigurationCreateParams.Klarna.DisplayPreference build() { + return new PaymentMethodConfigurationCreateParams.Klarna.DisplayPreference( this.extraParams, this.preference); } @@ -5567,8 +5668,8 @@ public PaymentMethodConfigurationCreateParams.Link.DisplayPreference build() { * 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.Link.DisplayPreference#extraParams} for the field - * documentation. + * PaymentMethodConfigurationCreateParams.Klarna.DisplayPreference#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -5582,8 +5683,8 @@ public Builder putExtraParam(String key, Object value) { * 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.Link.DisplayPreference#extraParams} for the field - * documentation. + * PaymentMethodConfigurationCreateParams.Klarna.DisplayPreference#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -5595,7 +5696,7 @@ public Builder putAllExtraParam(Map map) { /** The account's preference for whether or not to display this payment method. */ public Builder setPreference( - PaymentMethodConfigurationCreateParams.Link.DisplayPreference.Preference preference) { + PaymentMethodConfigurationCreateParams.Klarna.DisplayPreference.Preference preference) { this.preference = preference; return this; } @@ -5622,7 +5723,7 @@ public enum Preference implements ApiRequestParams.EnumParam { } @Getter - public static class Mobilepay { + public static class Konbini { /** Whether or not the payment method should be displayed. */ @SerializedName("display_preference") DisplayPreference displayPreference; @@ -5636,7 +5737,7 @@ public static class Mobilepay { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Mobilepay(DisplayPreference displayPreference, Map extraParams) { + private Konbini(DisplayPreference displayPreference, Map extraParams) { this.displayPreference = displayPreference; this.extraParams = extraParams; } @@ -5651,14 +5752,14 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationCreateParams.Mobilepay build() { - return new PaymentMethodConfigurationCreateParams.Mobilepay( + public PaymentMethodConfigurationCreateParams.Konbini build() { + return new PaymentMethodConfigurationCreateParams.Konbini( this.displayPreference, this.extraParams); } /** Whether or not the payment method should be displayed. */ public Builder setDisplayPreference( - PaymentMethodConfigurationCreateParams.Mobilepay.DisplayPreference displayPreference) { + PaymentMethodConfigurationCreateParams.Konbini.DisplayPreference displayPreference) { this.displayPreference = displayPreference; return this; } @@ -5666,7 +5767,7 @@ public Builder setDisplayPreference( /** * 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.Mobilepay#extraParams} for the field documentation. + * PaymentMethodConfigurationCreateParams.Konbini#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -5679,7 +5780,7 @@ public Builder putExtraParam(String key, Object value) { /** * 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.Mobilepay#extraParams} for the field + * See {@link PaymentMethodConfigurationCreateParams.Konbini#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -5721,8 +5822,8 @@ public static class Builder { private Preference preference; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationCreateParams.Mobilepay.DisplayPreference build() { - return new PaymentMethodConfigurationCreateParams.Mobilepay.DisplayPreference( + public PaymentMethodConfigurationCreateParams.Konbini.DisplayPreference build() { + return new PaymentMethodConfigurationCreateParams.Konbini.DisplayPreference( this.extraParams, this.preference); } @@ -5730,7 +5831,7 @@ public PaymentMethodConfigurationCreateParams.Mobilepay.DisplayPreference build( * 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.Mobilepay.DisplayPreference#extraParams} for the + * PaymentMethodConfigurationCreateParams.Konbini.DisplayPreference#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -5745,7 +5846,7 @@ public Builder putExtraParam(String key, Object value) { * 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.Mobilepay.DisplayPreference#extraParams} for the + * PaymentMethodConfigurationCreateParams.Konbini.DisplayPreference#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -5758,7 +5859,7 @@ public Builder putAllExtraParam(Map map) { /** The account's preference for whether or not to display this payment method. */ public Builder setPreference( - PaymentMethodConfigurationCreateParams.Mobilepay.DisplayPreference.Preference + PaymentMethodConfigurationCreateParams.Konbini.DisplayPreference.Preference preference) { this.preference = preference; return this; @@ -5786,7 +5887,7 @@ public enum Preference implements ApiRequestParams.EnumParam { } @Getter - public static class Multibanco { + public static class Link { /** Whether or not the payment method should be displayed. */ @SerializedName("display_preference") DisplayPreference displayPreference; @@ -5800,7 +5901,7 @@ public static class Multibanco { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Multibanco(DisplayPreference displayPreference, Map extraParams) { + private Link(DisplayPreference displayPreference, Map extraParams) { this.displayPreference = displayPreference; this.extraParams = extraParams; } @@ -5815,14 +5916,14 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationCreateParams.Multibanco build() { - return new PaymentMethodConfigurationCreateParams.Multibanco( + public PaymentMethodConfigurationCreateParams.Link build() { + return new PaymentMethodConfigurationCreateParams.Link( this.displayPreference, this.extraParams); } /** Whether or not the payment method should be displayed. */ public Builder setDisplayPreference( - PaymentMethodConfigurationCreateParams.Multibanco.DisplayPreference displayPreference) { + PaymentMethodConfigurationCreateParams.Link.DisplayPreference displayPreference) { this.displayPreference = displayPreference; return this; } @@ -5830,7 +5931,7 @@ public Builder setDisplayPreference( /** * 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.Multibanco#extraParams} for the field documentation. + * PaymentMethodConfigurationCreateParams.Link#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -5843,7 +5944,7 @@ public Builder putExtraParam(String key, Object value) { /** * 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.Multibanco#extraParams} for the field + * See {@link PaymentMethodConfigurationCreateParams.Link#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -5885,8 +5986,8 @@ public static class Builder { private Preference preference; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationCreateParams.Multibanco.DisplayPreference build() { - return new PaymentMethodConfigurationCreateParams.Multibanco.DisplayPreference( + public PaymentMethodConfigurationCreateParams.Link.DisplayPreference build() { + return new PaymentMethodConfigurationCreateParams.Link.DisplayPreference( this.extraParams, this.preference); } @@ -5894,8 +5995,8 @@ public PaymentMethodConfigurationCreateParams.Multibanco.DisplayPreference build * 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.Multibanco.DisplayPreference#extraParams} for the - * field documentation. + * PaymentMethodConfigurationCreateParams.Link.DisplayPreference#extraParams} for the field + * documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -5909,8 +6010,8 @@ public Builder putExtraParam(String key, Object value) { * 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.Multibanco.DisplayPreference#extraParams} for the - * field documentation. + * PaymentMethodConfigurationCreateParams.Link.DisplayPreference#extraParams} for the field + * documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -5922,8 +6023,7 @@ public Builder putAllExtraParam(Map map) { /** The account's preference for whether or not to display this payment method. */ public Builder setPreference( - PaymentMethodConfigurationCreateParams.Multibanco.DisplayPreference.Preference - preference) { + PaymentMethodConfigurationCreateParams.Link.DisplayPreference.Preference preference) { this.preference = preference; return this; } @@ -5950,7 +6050,7 @@ public enum Preference implements ApiRequestParams.EnumParam { } @Getter - public static class Oxxo { + public static class Mobilepay { /** Whether or not the payment method should be displayed. */ @SerializedName("display_preference") DisplayPreference displayPreference; @@ -5964,7 +6064,7 @@ public static class Oxxo { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Oxxo(DisplayPreference displayPreference, Map extraParams) { + private Mobilepay(DisplayPreference displayPreference, Map extraParams) { this.displayPreference = displayPreference; this.extraParams = extraParams; } @@ -5979,14 +6079,14 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationCreateParams.Oxxo build() { - return new PaymentMethodConfigurationCreateParams.Oxxo( + public PaymentMethodConfigurationCreateParams.Mobilepay build() { + return new PaymentMethodConfigurationCreateParams.Mobilepay( this.displayPreference, this.extraParams); } /** Whether or not the payment method should be displayed. */ public Builder setDisplayPreference( - PaymentMethodConfigurationCreateParams.Oxxo.DisplayPreference displayPreference) { + PaymentMethodConfigurationCreateParams.Mobilepay.DisplayPreference displayPreference) { this.displayPreference = displayPreference; return this; } @@ -5994,7 +6094,7 @@ public Builder setDisplayPreference( /** * 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.Oxxo#extraParams} for the field documentation. + * PaymentMethodConfigurationCreateParams.Mobilepay#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -6007,7 +6107,659 @@ public Builder putExtraParam(String key, Object value) { /** * 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.Oxxo#extraParams} for the field + * See {@link PaymentMethodConfigurationCreateParams.Mobilepay#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.Mobilepay.DisplayPreference build() { + return new PaymentMethodConfigurationCreateParams.Mobilepay.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.Mobilepay.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.Mobilepay.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.Mobilepay.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 Multibanco { + /** 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 Multibanco(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.Multibanco build() { + return new PaymentMethodConfigurationCreateParams.Multibanco( + this.displayPreference, this.extraParams); + } + + /** Whether or not the payment method should be displayed. */ + public Builder setDisplayPreference( + PaymentMethodConfigurationCreateParams.Multibanco.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.Multibanco#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.Multibanco#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.Multibanco.DisplayPreference build() { + return new PaymentMethodConfigurationCreateParams.Multibanco.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.Multibanco.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.Multibanco.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.Multibanco.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 Oxxo { + /** 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 Oxxo(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.Oxxo build() { + return new PaymentMethodConfigurationCreateParams.Oxxo( + this.displayPreference, this.extraParams); + } + + /** Whether or not the payment method should be displayed. */ + public Builder setDisplayPreference( + PaymentMethodConfigurationCreateParams.Oxxo.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.Oxxo#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.Oxxo#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.Oxxo.DisplayPreference build() { + return new PaymentMethodConfigurationCreateParams.Oxxo.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.Oxxo.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.Oxxo.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.Oxxo.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 P24 { + /** 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 P24(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.P24 build() { + return new PaymentMethodConfigurationCreateParams.P24( + this.displayPreference, this.extraParams); + } + + /** Whether or not the payment method should be displayed. */ + public Builder setDisplayPreference( + PaymentMethodConfigurationCreateParams.P24.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.P24#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.P24#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.P24.DisplayPreference build() { + return new PaymentMethodConfigurationCreateParams.P24.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.P24.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.P24.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.P24.DisplayPreference.Preference preference) { + this.preference = preference; + return this; + } + } + + public enum Preference implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), + + @SerializedName("off") + OFF("off"), + + @SerializedName("on") + ON("on"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Preference(String value) { + this.value = value; + } + } + } + } + + @Getter + public static class Paynow { + /** Whether or not the payment method should be displayed. */ + @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 Paynow(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.Paynow build() { + return new PaymentMethodConfigurationCreateParams.Paynow( + this.displayPreference, this.extraParams); + } + + /** Whether or not the payment method should be displayed. */ + public Builder setDisplayPreference( + PaymentMethodConfigurationCreateParams.Paynow.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.Paynow#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.Paynow#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -6049,8 +6801,8 @@ public static class Builder { private Preference preference; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationCreateParams.Oxxo.DisplayPreference build() { - return new PaymentMethodConfigurationCreateParams.Oxxo.DisplayPreference( + public PaymentMethodConfigurationCreateParams.Paynow.DisplayPreference build() { + return new PaymentMethodConfigurationCreateParams.Paynow.DisplayPreference( this.extraParams, this.preference); } @@ -6058,8 +6810,8 @@ public PaymentMethodConfigurationCreateParams.Oxxo.DisplayPreference build() { * 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.Oxxo.DisplayPreference#extraParams} for the field - * documentation. + * PaymentMethodConfigurationCreateParams.Paynow.DisplayPreference#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -6073,8 +6825,8 @@ public Builder putExtraParam(String key, Object value) { * 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.Oxxo.DisplayPreference#extraParams} for the field - * documentation. + * PaymentMethodConfigurationCreateParams.Paynow.DisplayPreference#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -6086,7 +6838,7 @@ public Builder putAllExtraParam(Map map) { /** The account's preference for whether or not to display this payment method. */ public Builder setPreference( - PaymentMethodConfigurationCreateParams.Oxxo.DisplayPreference.Preference preference) { + PaymentMethodConfigurationCreateParams.Paynow.DisplayPreference.Preference preference) { this.preference = preference; return this; } @@ -6113,7 +6865,7 @@ public enum Preference implements ApiRequestParams.EnumParam { } @Getter - public static class P24 { + public static class Paypal { /** Whether or not the payment method should be displayed. */ @SerializedName("display_preference") DisplayPreference displayPreference; @@ -6127,7 +6879,7 @@ public static class P24 { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private P24(DisplayPreference displayPreference, Map extraParams) { + private Paypal(DisplayPreference displayPreference, Map extraParams) { this.displayPreference = displayPreference; this.extraParams = extraParams; } @@ -6142,14 +6894,14 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationCreateParams.P24 build() { - return new PaymentMethodConfigurationCreateParams.P24( + public PaymentMethodConfigurationCreateParams.Paypal build() { + return new PaymentMethodConfigurationCreateParams.Paypal( this.displayPreference, this.extraParams); } /** Whether or not the payment method should be displayed. */ public Builder setDisplayPreference( - PaymentMethodConfigurationCreateParams.P24.DisplayPreference displayPreference) { + PaymentMethodConfigurationCreateParams.Paypal.DisplayPreference displayPreference) { this.displayPreference = displayPreference; return this; } @@ -6157,7 +6909,7 @@ public Builder setDisplayPreference( /** * 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.P24#extraParams} for the field documentation. + * PaymentMethodConfigurationCreateParams.Paypal#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -6170,7 +6922,7 @@ public Builder putExtraParam(String key, Object value) { /** * 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.P24#extraParams} for the field + * See {@link PaymentMethodConfigurationCreateParams.Paypal#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -6212,16 +6964,17 @@ public static class Builder { private Preference preference; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationCreateParams.P24.DisplayPreference build() { - return new PaymentMethodConfigurationCreateParams.P24.DisplayPreference( + public PaymentMethodConfigurationCreateParams.Paypal.DisplayPreference build() { + return new PaymentMethodConfigurationCreateParams.Paypal.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.P24.DisplayPreference#extraParams} - * for the field documentation. + * map. See {@link + * PaymentMethodConfigurationCreateParams.Paypal.DisplayPreference#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -6234,8 +6987,9 @@ public Builder putExtraParam(String key, Object value) { /** * 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.P24.DisplayPreference#extraParams} - * for the field documentation. + * map. See {@link + * PaymentMethodConfigurationCreateParams.Paypal.DisplayPreference#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -6247,7 +7001,7 @@ public Builder putAllExtraParam(Map map) { /** The account's preference for whether or not to display this payment method. */ public Builder setPreference( - PaymentMethodConfigurationCreateParams.P24.DisplayPreference.Preference preference) { + PaymentMethodConfigurationCreateParams.Paypal.DisplayPreference.Preference preference) { this.preference = preference; return this; } @@ -6274,7 +7028,7 @@ public enum Preference implements ApiRequestParams.EnumParam { } @Getter - public static class Paynow { + public static class Payto { /** Whether or not the payment method should be displayed. */ @SerializedName("display_preference") DisplayPreference displayPreference; @@ -6288,7 +7042,7 @@ public static class Paynow { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Paynow(DisplayPreference displayPreference, Map extraParams) { + private Payto(DisplayPreference displayPreference, Map extraParams) { this.displayPreference = displayPreference; this.extraParams = extraParams; } @@ -6303,14 +7057,14 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationCreateParams.Paynow build() { - return new PaymentMethodConfigurationCreateParams.Paynow( + public PaymentMethodConfigurationCreateParams.Payto build() { + return new PaymentMethodConfigurationCreateParams.Payto( this.displayPreference, this.extraParams); } /** Whether or not the payment method should be displayed. */ public Builder setDisplayPreference( - PaymentMethodConfigurationCreateParams.Paynow.DisplayPreference displayPreference) { + PaymentMethodConfigurationCreateParams.Payto.DisplayPreference displayPreference) { this.displayPreference = displayPreference; return this; } @@ -6318,7 +7072,7 @@ public Builder setDisplayPreference( /** * 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.Paynow#extraParams} for the field documentation. + * PaymentMethodConfigurationCreateParams.Payto#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -6331,7 +7085,7 @@ public Builder putExtraParam(String key, Object value) { /** * 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.Paynow#extraParams} for the field + * See {@link PaymentMethodConfigurationCreateParams.Payto#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -6373,8 +7127,8 @@ public static class Builder { private Preference preference; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationCreateParams.Paynow.DisplayPreference build() { - return new PaymentMethodConfigurationCreateParams.Paynow.DisplayPreference( + public PaymentMethodConfigurationCreateParams.Payto.DisplayPreference build() { + return new PaymentMethodConfigurationCreateParams.Payto.DisplayPreference( this.extraParams, this.preference); } @@ -6382,8 +7136,8 @@ public PaymentMethodConfigurationCreateParams.Paynow.DisplayPreference build() { * 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.Paynow.DisplayPreference#extraParams} for the - * field documentation. + * PaymentMethodConfigurationCreateParams.Payto.DisplayPreference#extraParams} for the field + * documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -6397,8 +7151,8 @@ public Builder putExtraParam(String key, Object value) { * 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.Paynow.DisplayPreference#extraParams} for the - * field documentation. + * PaymentMethodConfigurationCreateParams.Payto.DisplayPreference#extraParams} for the field + * documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -6410,7 +7164,7 @@ public Builder putAllExtraParam(Map map) { /** The account's preference for whether or not to display this payment method. */ public Builder setPreference( - PaymentMethodConfigurationCreateParams.Paynow.DisplayPreference.Preference preference) { + PaymentMethodConfigurationCreateParams.Payto.DisplayPreference.Preference preference) { this.preference = preference; return this; } @@ -6437,7 +7191,7 @@ public enum Preference implements ApiRequestParams.EnumParam { } @Getter - public static class Paypal { + public static class Promptpay { /** Whether or not the payment method should be displayed. */ @SerializedName("display_preference") DisplayPreference displayPreference; @@ -6451,7 +7205,7 @@ public static class Paypal { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Paypal(DisplayPreference displayPreference, Map extraParams) { + private Promptpay(DisplayPreference displayPreference, Map extraParams) { this.displayPreference = displayPreference; this.extraParams = extraParams; } @@ -6466,14 +7220,14 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationCreateParams.Paypal build() { - return new PaymentMethodConfigurationCreateParams.Paypal( + public PaymentMethodConfigurationCreateParams.Promptpay build() { + return new PaymentMethodConfigurationCreateParams.Promptpay( this.displayPreference, this.extraParams); } /** Whether or not the payment method should be displayed. */ public Builder setDisplayPreference( - PaymentMethodConfigurationCreateParams.Paypal.DisplayPreference displayPreference) { + PaymentMethodConfigurationCreateParams.Promptpay.DisplayPreference displayPreference) { this.displayPreference = displayPreference; return this; } @@ -6481,7 +7235,7 @@ public Builder setDisplayPreference( /** * 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.Paypal#extraParams} for the field documentation. + * PaymentMethodConfigurationCreateParams.Promptpay#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -6494,7 +7248,7 @@ public Builder putExtraParam(String key, Object value) { /** * 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.Paypal#extraParams} for the field + * See {@link PaymentMethodConfigurationCreateParams.Promptpay#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -6536,8 +7290,8 @@ public static class Builder { private Preference preference; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationCreateParams.Paypal.DisplayPreference build() { - return new PaymentMethodConfigurationCreateParams.Paypal.DisplayPreference( + public PaymentMethodConfigurationCreateParams.Promptpay.DisplayPreference build() { + return new PaymentMethodConfigurationCreateParams.Promptpay.DisplayPreference( this.extraParams, this.preference); } @@ -6545,7 +7299,7 @@ public PaymentMethodConfigurationCreateParams.Paypal.DisplayPreference build() { * 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.Paypal.DisplayPreference#extraParams} for the + * PaymentMethodConfigurationCreateParams.Promptpay.DisplayPreference#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -6560,7 +7314,7 @@ public Builder putExtraParam(String key, Object value) { * 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.Paypal.DisplayPreference#extraParams} for the + * PaymentMethodConfigurationCreateParams.Promptpay.DisplayPreference#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -6573,7 +7327,8 @@ public Builder putAllExtraParam(Map map) { /** The account's preference for whether or not to display this payment method. */ public Builder setPreference( - PaymentMethodConfigurationCreateParams.Paypal.DisplayPreference.Preference preference) { + PaymentMethodConfigurationCreateParams.Promptpay.DisplayPreference.Preference + preference) { this.preference = preference; return this; } @@ -6600,7 +7355,7 @@ public enum Preference implements ApiRequestParams.EnumParam { } @Getter - public static class Payto { + public static class Qris { /** Whether or not the payment method should be displayed. */ @SerializedName("display_preference") DisplayPreference displayPreference; @@ -6614,7 +7369,7 @@ public static class Payto { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Payto(DisplayPreference displayPreference, Map extraParams) { + private Qris(DisplayPreference displayPreference, Map extraParams) { this.displayPreference = displayPreference; this.extraParams = extraParams; } @@ -6629,14 +7384,14 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationCreateParams.Payto build() { - return new PaymentMethodConfigurationCreateParams.Payto( + public PaymentMethodConfigurationCreateParams.Qris build() { + return new PaymentMethodConfigurationCreateParams.Qris( this.displayPreference, this.extraParams); } /** Whether or not the payment method should be displayed. */ public Builder setDisplayPreference( - PaymentMethodConfigurationCreateParams.Payto.DisplayPreference displayPreference) { + PaymentMethodConfigurationCreateParams.Qris.DisplayPreference displayPreference) { this.displayPreference = displayPreference; return this; } @@ -6644,7 +7399,7 @@ public Builder setDisplayPreference( /** * 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.Payto#extraParams} for the field documentation. + * PaymentMethodConfigurationCreateParams.Qris#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -6657,7 +7412,7 @@ public Builder putExtraParam(String key, Object value) { /** * 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.Payto#extraParams} for the field + * See {@link PaymentMethodConfigurationCreateParams.Qris#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -6699,8 +7454,8 @@ public static class Builder { private Preference preference; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationCreateParams.Payto.DisplayPreference build() { - return new PaymentMethodConfigurationCreateParams.Payto.DisplayPreference( + public PaymentMethodConfigurationCreateParams.Qris.DisplayPreference build() { + return new PaymentMethodConfigurationCreateParams.Qris.DisplayPreference( this.extraParams, this.preference); } @@ -6708,7 +7463,7 @@ public PaymentMethodConfigurationCreateParams.Payto.DisplayPreference build() { * 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.Payto.DisplayPreference#extraParams} for the field + * PaymentMethodConfigurationCreateParams.Qris.DisplayPreference#extraParams} for the field * documentation. */ public Builder putExtraParam(String key, Object value) { @@ -6723,7 +7478,7 @@ public Builder putExtraParam(String key, Object value) { * 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.Payto.DisplayPreference#extraParams} for the field + * PaymentMethodConfigurationCreateParams.Qris.DisplayPreference#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -6736,7 +7491,7 @@ public Builder putAllExtraParam(Map map) { /** The account's preference for whether or not to display this payment method. */ public Builder setPreference( - PaymentMethodConfigurationCreateParams.Payto.DisplayPreference.Preference preference) { + PaymentMethodConfigurationCreateParams.Qris.DisplayPreference.Preference preference) { this.preference = preference; return this; } @@ -6763,7 +7518,7 @@ public enum Preference implements ApiRequestParams.EnumParam { } @Getter - public static class Promptpay { + public static class RevolutPay { /** Whether or not the payment method should be displayed. */ @SerializedName("display_preference") DisplayPreference displayPreference; @@ -6777,7 +7532,7 @@ public static class Promptpay { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Promptpay(DisplayPreference displayPreference, Map extraParams) { + private RevolutPay(DisplayPreference displayPreference, Map extraParams) { this.displayPreference = displayPreference; this.extraParams = extraParams; } @@ -6792,14 +7547,14 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationCreateParams.Promptpay build() { - return new PaymentMethodConfigurationCreateParams.Promptpay( + public PaymentMethodConfigurationCreateParams.RevolutPay build() { + return new PaymentMethodConfigurationCreateParams.RevolutPay( this.displayPreference, this.extraParams); } /** Whether or not the payment method should be displayed. */ public Builder setDisplayPreference( - PaymentMethodConfigurationCreateParams.Promptpay.DisplayPreference displayPreference) { + PaymentMethodConfigurationCreateParams.RevolutPay.DisplayPreference displayPreference) { this.displayPreference = displayPreference; return this; } @@ -6807,7 +7562,7 @@ public Builder setDisplayPreference( /** * 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.Promptpay#extraParams} for the field documentation. + * PaymentMethodConfigurationCreateParams.RevolutPay#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -6820,7 +7575,7 @@ public Builder putExtraParam(String key, Object value) { /** * 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.Promptpay#extraParams} for the field + * See {@link PaymentMethodConfigurationCreateParams.RevolutPay#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -6862,8 +7617,8 @@ public static class Builder { private Preference preference; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationCreateParams.Promptpay.DisplayPreference build() { - return new PaymentMethodConfigurationCreateParams.Promptpay.DisplayPreference( + public PaymentMethodConfigurationCreateParams.RevolutPay.DisplayPreference build() { + return new PaymentMethodConfigurationCreateParams.RevolutPay.DisplayPreference( this.extraParams, this.preference); } @@ -6871,7 +7626,7 @@ public PaymentMethodConfigurationCreateParams.Promptpay.DisplayPreference build( * 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.Promptpay.DisplayPreference#extraParams} for the + * PaymentMethodConfigurationCreateParams.RevolutPay.DisplayPreference#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -6886,7 +7641,7 @@ public Builder putExtraParam(String key, Object value) { * 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.Promptpay.DisplayPreference#extraParams} for the + * PaymentMethodConfigurationCreateParams.RevolutPay.DisplayPreference#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -6899,7 +7654,7 @@ public Builder putAllExtraParam(Map map) { /** The account's preference for whether or not to display this payment method. */ public Builder setPreference( - PaymentMethodConfigurationCreateParams.Promptpay.DisplayPreference.Preference + PaymentMethodConfigurationCreateParams.RevolutPay.DisplayPreference.Preference preference) { this.preference = preference; return this; @@ -6927,7 +7682,7 @@ public enum Preference implements ApiRequestParams.EnumParam { } @Getter - public static class RevolutPay { + public static class SepaDebit { /** Whether or not the payment method should be displayed. */ @SerializedName("display_preference") DisplayPreference displayPreference; @@ -6941,7 +7696,7 @@ public static class RevolutPay { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private RevolutPay(DisplayPreference displayPreference, Map extraParams) { + private SepaDebit(DisplayPreference displayPreference, Map extraParams) { this.displayPreference = displayPreference; this.extraParams = extraParams; } @@ -6956,14 +7711,14 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationCreateParams.RevolutPay build() { - return new PaymentMethodConfigurationCreateParams.RevolutPay( + public PaymentMethodConfigurationCreateParams.SepaDebit build() { + return new PaymentMethodConfigurationCreateParams.SepaDebit( this.displayPreference, this.extraParams); } /** Whether or not the payment method should be displayed. */ public Builder setDisplayPreference( - PaymentMethodConfigurationCreateParams.RevolutPay.DisplayPreference displayPreference) { + PaymentMethodConfigurationCreateParams.SepaDebit.DisplayPreference displayPreference) { this.displayPreference = displayPreference; return this; } @@ -6971,7 +7726,7 @@ public Builder setDisplayPreference( /** * 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.RevolutPay#extraParams} for the field documentation. + * PaymentMethodConfigurationCreateParams.SepaDebit#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -6984,7 +7739,7 @@ public Builder putExtraParam(String key, Object value) { /** * 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.RevolutPay#extraParams} for the field + * See {@link PaymentMethodConfigurationCreateParams.SepaDebit#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -7026,8 +7781,8 @@ public static class Builder { private Preference preference; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationCreateParams.RevolutPay.DisplayPreference build() { - return new PaymentMethodConfigurationCreateParams.RevolutPay.DisplayPreference( + public PaymentMethodConfigurationCreateParams.SepaDebit.DisplayPreference build() { + return new PaymentMethodConfigurationCreateParams.SepaDebit.DisplayPreference( this.extraParams, this.preference); } @@ -7035,7 +7790,7 @@ public PaymentMethodConfigurationCreateParams.RevolutPay.DisplayPreference build * 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.RevolutPay.DisplayPreference#extraParams} for the + * PaymentMethodConfigurationCreateParams.SepaDebit.DisplayPreference#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -7050,7 +7805,7 @@ public Builder putExtraParam(String key, Object value) { * 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.RevolutPay.DisplayPreference#extraParams} for the + * PaymentMethodConfigurationCreateParams.SepaDebit.DisplayPreference#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -7063,7 +7818,7 @@ public Builder putAllExtraParam(Map map) { /** The account's preference for whether or not to display this payment method. */ public Builder setPreference( - PaymentMethodConfigurationCreateParams.RevolutPay.DisplayPreference.Preference + PaymentMethodConfigurationCreateParams.SepaDebit.DisplayPreference.Preference preference) { this.preference = preference; return this; @@ -7091,7 +7846,7 @@ public enum Preference implements ApiRequestParams.EnumParam { } @Getter - public static class SepaDebit { + public static class Shopeepay { /** Whether or not the payment method should be displayed. */ @SerializedName("display_preference") DisplayPreference displayPreference; @@ -7105,7 +7860,7 @@ public static class SepaDebit { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private SepaDebit(DisplayPreference displayPreference, Map extraParams) { + private Shopeepay(DisplayPreference displayPreference, Map extraParams) { this.displayPreference = displayPreference; this.extraParams = extraParams; } @@ -7120,14 +7875,14 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationCreateParams.SepaDebit build() { - return new PaymentMethodConfigurationCreateParams.SepaDebit( + public PaymentMethodConfigurationCreateParams.Shopeepay build() { + return new PaymentMethodConfigurationCreateParams.Shopeepay( this.displayPreference, this.extraParams); } /** Whether or not the payment method should be displayed. */ public Builder setDisplayPreference( - PaymentMethodConfigurationCreateParams.SepaDebit.DisplayPreference displayPreference) { + PaymentMethodConfigurationCreateParams.Shopeepay.DisplayPreference displayPreference) { this.displayPreference = displayPreference; return this; } @@ -7135,7 +7890,7 @@ public Builder setDisplayPreference( /** * 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.SepaDebit#extraParams} for the field documentation. + * PaymentMethodConfigurationCreateParams.Shopeepay#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -7148,7 +7903,7 @@ public Builder putExtraParam(String key, Object value) { /** * 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.SepaDebit#extraParams} for the field + * See {@link PaymentMethodConfigurationCreateParams.Shopeepay#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -7190,8 +7945,8 @@ public static class Builder { private Preference preference; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationCreateParams.SepaDebit.DisplayPreference build() { - return new PaymentMethodConfigurationCreateParams.SepaDebit.DisplayPreference( + public PaymentMethodConfigurationCreateParams.Shopeepay.DisplayPreference build() { + return new PaymentMethodConfigurationCreateParams.Shopeepay.DisplayPreference( this.extraParams, this.preference); } @@ -7199,7 +7954,7 @@ public PaymentMethodConfigurationCreateParams.SepaDebit.DisplayPreference build( * 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.SepaDebit.DisplayPreference#extraParams} for the + * PaymentMethodConfigurationCreateParams.Shopeepay.DisplayPreference#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -7214,7 +7969,7 @@ public Builder putExtraParam(String key, Object value) { * 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.SepaDebit.DisplayPreference#extraParams} for the + * PaymentMethodConfigurationCreateParams.Shopeepay.DisplayPreference#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -7227,7 +7982,7 @@ public Builder putAllExtraParam(Map map) { /** The account's preference for whether or not to display this payment method. */ public Builder setPreference( - PaymentMethodConfigurationCreateParams.SepaDebit.DisplayPreference.Preference + PaymentMethodConfigurationCreateParams.Shopeepay.DisplayPreference.Preference preference) { this.preference = preference; return this; diff --git a/src/main/java/com/stripe/param/PaymentMethodConfigurationUpdateParams.java b/src/main/java/com/stripe/param/PaymentMethodConfigurationUpdateParams.java index 2690d098cf1..5185222ed33 100644 --- a/src/main/java/com/stripe/param/PaymentMethodConfigurationUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodConfigurationUpdateParams.java @@ -213,6 +213,16 @@ public class PaymentMethodConfigurationUpdateParams extends ApiRequestParams { @SerializedName("google_pay") GooglePay googlePay; + /** + * GoPay is a single use + * digital wallet payment method popular in Indonesia. When paying with GoPay, customers + * authenticate and approve payments using the Gojek app. Desktop checkout is performed by + * scanning a QR code. When checking out on mobile, customers are redirected to the Gojek app to + * confirm payment. + */ + @SerializedName("gopay") + Gopay gopay; + /** * GrabPay is a payment method developed by Grab. GrabPay is a digital wallet - @@ -222,6 +232,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 @@ -343,6 +360,14 @@ public class PaymentMethodConfigurationUpdateParams extends ApiRequestParams { @SerializedName("promptpay") Promptpay promptpay; + /** + * QRIS is a real-time payment method + * popular in Indonesia. When paying with QRIS, customers authenticate and approve payments by + * scanning a QR code in their preferred digital wallet app. + */ + @SerializedName("qris") + Qris qris; + /** * Revolut Pay, developed by Revolut, a global finance app, is a digital wallet payment method. * Revolut Pay uses the customer’s stored balance or cards to fund the payment, and offers the @@ -361,6 +386,16 @@ public class PaymentMethodConfigurationUpdateParams extends ApiRequestParams { @SerializedName("sepa_debit") SepaDebit sepaDebit; + /** + * ShopeePay is a single use + * digital wallet payment method popular in Indonesia. When paying with GoPay, customers + * authenticate and approve payments using the Shopee app. Desktop checkout is performed by + * scanning a QR code. When checking out on mobile, customers are redirected to the Shopee app to + * confirm payment. + */ + @SerializedName("shopeepay") + Shopeepay shopeepay; + /** * Stripe users in Europe and the United States can use the Payment Intents API—a single @@ -439,7 +474,9 @@ private PaymentMethodConfigurationUpdateParams( Fpx fpx, Giropay giropay, GooglePay googlePay, + Gopay gopay, Grabpay grabpay, + IdBankTransfer idBankTransfer, Ideal ideal, Jcb jcb, Klarna klarna, @@ -454,8 +491,10 @@ private PaymentMethodConfigurationUpdateParams( Paypal paypal, Payto payto, Promptpay promptpay, + Qris qris, RevolutPay revolutPay, SepaDebit sepaDebit, + Shopeepay shopeepay, Sofort sofort, Swish swish, Twint twint, @@ -486,7 +525,9 @@ private PaymentMethodConfigurationUpdateParams( this.fpx = fpx; this.giropay = giropay; this.googlePay = googlePay; + this.gopay = gopay; this.grabpay = grabpay; + this.idBankTransfer = idBankTransfer; this.ideal = ideal; this.jcb = jcb; this.klarna = klarna; @@ -501,8 +542,10 @@ private PaymentMethodConfigurationUpdateParams( this.paypal = paypal; this.payto = payto; this.promptpay = promptpay; + this.qris = qris; this.revolutPay = revolutPay; this.sepaDebit = sepaDebit; + this.shopeepay = shopeepay; this.sofort = sofort; this.swish = swish; this.twint = twint; @@ -564,8 +607,12 @@ public static class Builder { private GooglePay googlePay; + private Gopay gopay; + private Grabpay grabpay; + private IdBankTransfer idBankTransfer; + private Ideal ideal; private Jcb jcb; @@ -594,10 +641,14 @@ public static class Builder { private Promptpay promptpay; + private Qris qris; + private RevolutPay revolutPay; private SepaDebit sepaDebit; + private Shopeepay shopeepay; + private Sofort sofort; private Swish swish; @@ -637,7 +688,9 @@ public PaymentMethodConfigurationUpdateParams build() { this.fpx, this.giropay, this.googlePay, + this.gopay, this.grabpay, + this.idBankTransfer, this.ideal, this.jcb, this.klarna, @@ -652,8 +705,10 @@ public PaymentMethodConfigurationUpdateParams build() { this.paypal, this.payto, this.promptpay, + this.qris, this.revolutPay, this.sepaDebit, + this.shopeepay, this.sofort, this.swish, this.twint, @@ -950,6 +1005,18 @@ public Builder setGooglePay(PaymentMethodConfigurationUpdateParams.GooglePay goo return this; } + /** + * GoPay is a single use + * digital wallet payment method popular in Indonesia. When paying with GoPay, customers + * authenticate and approve payments using the Gojek app. Desktop checkout is performed by + * scanning a QR code. When checking out on mobile, customers are redirected to the Gojek app to + * confirm payment. + */ + public Builder setGopay(PaymentMethodConfigurationUpdateParams.Gopay gopay) { + this.gopay = gopay; + return this; + } + /** * GrabPay is a payment method developed by Grab. GrabPay is a digital wallet - @@ -961,6 +1028,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 @@ -1118,6 +1195,16 @@ public Builder setPromptpay(PaymentMethodConfigurationUpdateParams.Promptpay pro return this; } + /** + * QRIS is a real-time payment method + * popular in Indonesia. When paying with QRIS, customers authenticate and approve payments by + * scanning a QR code in their preferred digital wallet app. + */ + public Builder setQris(PaymentMethodConfigurationUpdateParams.Qris qris) { + this.qris = qris; + return this; + } + /** * Revolut Pay, developed by Revolut, a global finance app, is a digital wallet payment method. * Revolut Pay uses the customer’s stored balance or cards to fund the payment, and offers the @@ -1140,6 +1227,18 @@ public Builder setSepaDebit(PaymentMethodConfigurationUpdateParams.SepaDebit sep return this; } + /** + * ShopeePay is a single + * use digital wallet payment method popular in Indonesia. When paying with GoPay, customers + * authenticate and approve payments using the Shopee app. Desktop checkout is performed by + * scanning a QR code. When checking out on mobile, customers are redirected to the Shopee app + * to confirm payment. + */ + public Builder setShopeepay(PaymentMethodConfigurationUpdateParams.Shopeepay shopeepay) { + this.shopeepay = shopeepay; + return this; + } + /** * Stripe users in Europe and the United States can use the Payment Intents API—a single @@ -4651,7 +4750,7 @@ public enum Preference implements ApiRequestParams.EnumParam { } @Getter - public static class Grabpay { + public static class Gopay { /** Whether or not the payment method should be displayed. */ @SerializedName("display_preference") DisplayPreference displayPreference; @@ -4665,7 +4764,7 @@ public static class Grabpay { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Grabpay(DisplayPreference displayPreference, Map extraParams) { + private Gopay(DisplayPreference displayPreference, Map extraParams) { this.displayPreference = displayPreference; this.extraParams = extraParams; } @@ -4680,14 +4779,14 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationUpdateParams.Grabpay build() { - return new PaymentMethodConfigurationUpdateParams.Grabpay( + public PaymentMethodConfigurationUpdateParams.Gopay build() { + return new PaymentMethodConfigurationUpdateParams.Gopay( this.displayPreference, this.extraParams); } /** Whether or not the payment method should be displayed. */ public Builder setDisplayPreference( - PaymentMethodConfigurationUpdateParams.Grabpay.DisplayPreference displayPreference) { + PaymentMethodConfigurationUpdateParams.Gopay.DisplayPreference displayPreference) { this.displayPreference = displayPreference; return this; } @@ -4695,7 +4794,7 @@ public Builder setDisplayPreference( /** * 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.Grabpay#extraParams} for the field documentation. + * PaymentMethodConfigurationUpdateParams.Gopay#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -4708,7 +4807,7 @@ public Builder putExtraParam(String key, Object value) { /** * 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.Grabpay#extraParams} for the field + * See {@link PaymentMethodConfigurationUpdateParams.Gopay#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -4750,8 +4849,8 @@ public static class Builder { private Preference preference; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationUpdateParams.Grabpay.DisplayPreference build() { - return new PaymentMethodConfigurationUpdateParams.Grabpay.DisplayPreference( + public PaymentMethodConfigurationUpdateParams.Gopay.DisplayPreference build() { + return new PaymentMethodConfigurationUpdateParams.Gopay.DisplayPreference( this.extraParams, this.preference); } @@ -4759,8 +4858,8 @@ public PaymentMethodConfigurationUpdateParams.Grabpay.DisplayPreference build() * 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.Grabpay.DisplayPreference#extraParams} for the - * field documentation. + * PaymentMethodConfigurationUpdateParams.Gopay.DisplayPreference#extraParams} for the field + * documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -4774,8 +4873,8 @@ public Builder putExtraParam(String key, Object value) { * 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.Grabpay.DisplayPreference#extraParams} for the - * field documentation. + * PaymentMethodConfigurationUpdateParams.Gopay.DisplayPreference#extraParams} for the field + * documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -4787,8 +4886,7 @@ public Builder putAllExtraParam(Map map) { /** The account's preference for whether or not to display this payment method. */ public Builder setPreference( - PaymentMethodConfigurationUpdateParams.Grabpay.DisplayPreference.Preference - preference) { + PaymentMethodConfigurationUpdateParams.Gopay.DisplayPreference.Preference preference) { this.preference = preference; return this; } @@ -4815,7 +4913,7 @@ public enum Preference implements ApiRequestParams.EnumParam { } @Getter - public static class Ideal { + public static class Grabpay { /** Whether or not the payment method should be displayed. */ @SerializedName("display_preference") DisplayPreference displayPreference; @@ -4829,7 +4927,7 @@ public static class Ideal { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Ideal(DisplayPreference displayPreference, Map extraParams) { + private Grabpay(DisplayPreference displayPreference, Map extraParams) { this.displayPreference = displayPreference; this.extraParams = extraParams; } @@ -4844,14 +4942,14 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationUpdateParams.Ideal build() { - return new PaymentMethodConfigurationUpdateParams.Ideal( + public PaymentMethodConfigurationUpdateParams.Grabpay build() { + return new PaymentMethodConfigurationUpdateParams.Grabpay( this.displayPreference, this.extraParams); } /** Whether or not the payment method should be displayed. */ public Builder setDisplayPreference( - PaymentMethodConfigurationUpdateParams.Ideal.DisplayPreference displayPreference) { + PaymentMethodConfigurationUpdateParams.Grabpay.DisplayPreference displayPreference) { this.displayPreference = displayPreference; return this; } @@ -4859,7 +4957,7 @@ public Builder setDisplayPreference( /** * 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.Ideal#extraParams} for the field documentation. + * PaymentMethodConfigurationUpdateParams.Grabpay#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -4872,7 +4970,7 @@ public Builder putExtraParam(String key, Object value) { /** * 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.Ideal#extraParams} for the field + * See {@link PaymentMethodConfigurationUpdateParams.Grabpay#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -4914,8 +5012,8 @@ public static class Builder { private Preference preference; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationUpdateParams.Ideal.DisplayPreference build() { - return new PaymentMethodConfigurationUpdateParams.Ideal.DisplayPreference( + public PaymentMethodConfigurationUpdateParams.Grabpay.DisplayPreference build() { + return new PaymentMethodConfigurationUpdateParams.Grabpay.DisplayPreference( this.extraParams, this.preference); } @@ -4923,8 +5021,8 @@ public PaymentMethodConfigurationUpdateParams.Ideal.DisplayPreference build() { * 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.Ideal.DisplayPreference#extraParams} for the field - * documentation. + * PaymentMethodConfigurationUpdateParams.Grabpay.DisplayPreference#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -4938,8 +5036,8 @@ public Builder putExtraParam(String key, Object value) { * 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.Ideal.DisplayPreference#extraParams} for the field - * documentation. + * PaymentMethodConfigurationUpdateParams.Grabpay.DisplayPreference#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -4951,7 +5049,8 @@ public Builder putAllExtraParam(Map map) { /** The account's preference for whether or not to display this payment method. */ public Builder setPreference( - PaymentMethodConfigurationUpdateParams.Ideal.DisplayPreference.Preference preference) { + PaymentMethodConfigurationUpdateParams.Grabpay.DisplayPreference.Preference + preference) { this.preference = preference; return this; } @@ -4978,7 +5077,7 @@ public enum Preference implements ApiRequestParams.EnumParam { } @Getter - public static class Jcb { + public static class IdBankTransfer { /** Whether or not the payment method should be displayed. */ @SerializedName("display_preference") DisplayPreference displayPreference; @@ -4992,7 +5091,7 @@ public static class Jcb { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Jcb(DisplayPreference displayPreference, Map extraParams) { + private IdBankTransfer(DisplayPreference displayPreference, Map extraParams) { this.displayPreference = displayPreference; this.extraParams = extraParams; } @@ -5007,14 +5106,15 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationUpdateParams.Jcb build() { - return new PaymentMethodConfigurationUpdateParams.Jcb( + 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.Jcb.DisplayPreference displayPreference) { + PaymentMethodConfigurationUpdateParams.IdBankTransfer.DisplayPreference + displayPreference) { this.displayPreference = displayPreference; return this; } @@ -5022,7 +5122,8 @@ public Builder setDisplayPreference( /** * 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.Jcb#extraParams} for the field documentation. + * PaymentMethodConfigurationUpdateParams.IdBankTransfer#extraParams} for the field + * documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -5035,7 +5136,7 @@ public Builder putExtraParam(String key, Object value) { /** * 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.Jcb#extraParams} for the field + * See {@link PaymentMethodConfigurationUpdateParams.IdBankTransfer#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -5077,16 +5178,17 @@ public static class Builder { private Preference preference; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationUpdateParams.Jcb.DisplayPreference build() { - return new PaymentMethodConfigurationUpdateParams.Jcb.DisplayPreference( + 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.Jcb.DisplayPreference#extraParams} - * for the field documentation. + * map. See {@link + * PaymentMethodConfigurationUpdateParams.IdBankTransfer.DisplayPreference#extraParams} for + * the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -5099,8 +5201,9 @@ public Builder putExtraParam(String key, Object value) { /** * 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.Jcb.DisplayPreference#extraParams} - * for the field documentation. + * map. See {@link + * PaymentMethodConfigurationUpdateParams.IdBankTransfer.DisplayPreference#extraParams} for + * the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -5112,7 +5215,8 @@ public Builder putAllExtraParam(Map map) { /** The account's preference for whether or not to display this payment method. */ public Builder setPreference( - PaymentMethodConfigurationUpdateParams.Jcb.DisplayPreference.Preference preference) { + PaymentMethodConfigurationUpdateParams.IdBankTransfer.DisplayPreference.Preference + preference) { this.preference = preference; return this; } @@ -5139,7 +5243,7 @@ public enum Preference implements ApiRequestParams.EnumParam { } @Getter - public static class Klarna { + public static class Ideal { /** Whether or not the payment method should be displayed. */ @SerializedName("display_preference") DisplayPreference displayPreference; @@ -5153,7 +5257,7 @@ public static class Klarna { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Klarna(DisplayPreference displayPreference, Map extraParams) { + private Ideal(DisplayPreference displayPreference, Map extraParams) { this.displayPreference = displayPreference; this.extraParams = extraParams; } @@ -5168,14 +5272,14 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationUpdateParams.Klarna build() { - return new PaymentMethodConfigurationUpdateParams.Klarna( + public PaymentMethodConfigurationUpdateParams.Ideal build() { + return new PaymentMethodConfigurationUpdateParams.Ideal( this.displayPreference, this.extraParams); } /** Whether or not the payment method should be displayed. */ public Builder setDisplayPreference( - PaymentMethodConfigurationUpdateParams.Klarna.DisplayPreference displayPreference) { + PaymentMethodConfigurationUpdateParams.Ideal.DisplayPreference displayPreference) { this.displayPreference = displayPreference; return this; } @@ -5183,7 +5287,7 @@ public Builder setDisplayPreference( /** * 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.Klarna#extraParams} for the field documentation. + * PaymentMethodConfigurationUpdateParams.Ideal#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -5196,7 +5300,7 @@ public Builder putExtraParam(String key, Object value) { /** * 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.Klarna#extraParams} for the field + * See {@link PaymentMethodConfigurationUpdateParams.Ideal#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -5238,8 +5342,8 @@ public static class Builder { private Preference preference; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationUpdateParams.Klarna.DisplayPreference build() { - return new PaymentMethodConfigurationUpdateParams.Klarna.DisplayPreference( + public PaymentMethodConfigurationUpdateParams.Ideal.DisplayPreference build() { + return new PaymentMethodConfigurationUpdateParams.Ideal.DisplayPreference( this.extraParams, this.preference); } @@ -5247,8 +5351,8 @@ public PaymentMethodConfigurationUpdateParams.Klarna.DisplayPreference build() { * 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.Klarna.DisplayPreference#extraParams} for the - * field documentation. + * PaymentMethodConfigurationUpdateParams.Ideal.DisplayPreference#extraParams} for the field + * documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -5262,8 +5366,8 @@ public Builder putExtraParam(String key, Object value) { * 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.Klarna.DisplayPreference#extraParams} for the - * field documentation. + * PaymentMethodConfigurationUpdateParams.Ideal.DisplayPreference#extraParams} for the field + * documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -5275,7 +5379,7 @@ public Builder putAllExtraParam(Map map) { /** The account's preference for whether or not to display this payment method. */ public Builder setPreference( - PaymentMethodConfigurationUpdateParams.Klarna.DisplayPreference.Preference preference) { + PaymentMethodConfigurationUpdateParams.Ideal.DisplayPreference.Preference preference) { this.preference = preference; return this; } @@ -5302,7 +5406,7 @@ public enum Preference implements ApiRequestParams.EnumParam { } @Getter - public static class Konbini { + public static class Jcb { /** Whether or not the payment method should be displayed. */ @SerializedName("display_preference") DisplayPreference displayPreference; @@ -5316,7 +5420,7 @@ public static class Konbini { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Konbini(DisplayPreference displayPreference, Map extraParams) { + private Jcb(DisplayPreference displayPreference, Map extraParams) { this.displayPreference = displayPreference; this.extraParams = extraParams; } @@ -5331,14 +5435,14 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationUpdateParams.Konbini build() { - return new PaymentMethodConfigurationUpdateParams.Konbini( + public PaymentMethodConfigurationUpdateParams.Jcb build() { + return new PaymentMethodConfigurationUpdateParams.Jcb( this.displayPreference, this.extraParams); } /** Whether or not the payment method should be displayed. */ public Builder setDisplayPreference( - PaymentMethodConfigurationUpdateParams.Konbini.DisplayPreference displayPreference) { + PaymentMethodConfigurationUpdateParams.Jcb.DisplayPreference displayPreference) { this.displayPreference = displayPreference; return this; } @@ -5346,7 +5450,7 @@ public Builder setDisplayPreference( /** * 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.Konbini#extraParams} for the field documentation. + * PaymentMethodConfigurationUpdateParams.Jcb#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -5359,7 +5463,7 @@ public Builder putExtraParam(String key, Object value) { /** * 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.Konbini#extraParams} for the field + * See {@link PaymentMethodConfigurationUpdateParams.Jcb#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -5401,17 +5505,16 @@ public static class Builder { private Preference preference; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationUpdateParams.Konbini.DisplayPreference build() { - return new PaymentMethodConfigurationUpdateParams.Konbini.DisplayPreference( + public PaymentMethodConfigurationUpdateParams.Jcb.DisplayPreference build() { + return new PaymentMethodConfigurationUpdateParams.Jcb.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.Konbini.DisplayPreference#extraParams} for the - * field documentation. + * map. See {@link PaymentMethodConfigurationUpdateParams.Jcb.DisplayPreference#extraParams} + * for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -5424,9 +5527,8 @@ public Builder putExtraParam(String key, Object value) { /** * 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.Konbini.DisplayPreference#extraParams} for the - * field documentation. + * map. See {@link PaymentMethodConfigurationUpdateParams.Jcb.DisplayPreference#extraParams} + * for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -5438,8 +5540,7 @@ public Builder putAllExtraParam(Map map) { /** The account's preference for whether or not to display this payment method. */ public Builder setPreference( - PaymentMethodConfigurationUpdateParams.Konbini.DisplayPreference.Preference - preference) { + PaymentMethodConfigurationUpdateParams.Jcb.DisplayPreference.Preference preference) { this.preference = preference; return this; } @@ -5466,7 +5567,7 @@ public enum Preference implements ApiRequestParams.EnumParam { } @Getter - public static class Link { + public static class Klarna { /** Whether or not the payment method should be displayed. */ @SerializedName("display_preference") DisplayPreference displayPreference; @@ -5480,7 +5581,7 @@ public static class Link { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Link(DisplayPreference displayPreference, Map extraParams) { + private Klarna(DisplayPreference displayPreference, Map extraParams) { this.displayPreference = displayPreference; this.extraParams = extraParams; } @@ -5495,14 +5596,14 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationUpdateParams.Link build() { - return new PaymentMethodConfigurationUpdateParams.Link( + public PaymentMethodConfigurationUpdateParams.Klarna build() { + return new PaymentMethodConfigurationUpdateParams.Klarna( this.displayPreference, this.extraParams); } /** Whether or not the payment method should be displayed. */ public Builder setDisplayPreference( - PaymentMethodConfigurationUpdateParams.Link.DisplayPreference displayPreference) { + PaymentMethodConfigurationUpdateParams.Klarna.DisplayPreference displayPreference) { this.displayPreference = displayPreference; return this; } @@ -5510,7 +5611,7 @@ public Builder setDisplayPreference( /** * 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.Link#extraParams} for the field documentation. + * PaymentMethodConfigurationUpdateParams.Klarna#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -5523,7 +5624,7 @@ public Builder putExtraParam(String key, Object value) { /** * 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.Link#extraParams} for the field + * See {@link PaymentMethodConfigurationUpdateParams.Klarna#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -5565,8 +5666,8 @@ public static class Builder { private Preference preference; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationUpdateParams.Link.DisplayPreference build() { - return new PaymentMethodConfigurationUpdateParams.Link.DisplayPreference( + public PaymentMethodConfigurationUpdateParams.Klarna.DisplayPreference build() { + return new PaymentMethodConfigurationUpdateParams.Klarna.DisplayPreference( this.extraParams, this.preference); } @@ -5574,8 +5675,8 @@ public PaymentMethodConfigurationUpdateParams.Link.DisplayPreference build() { * 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.Link.DisplayPreference#extraParams} for the field - * documentation. + * PaymentMethodConfigurationUpdateParams.Klarna.DisplayPreference#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -5589,8 +5690,8 @@ public Builder putExtraParam(String key, Object value) { * 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.Link.DisplayPreference#extraParams} for the field - * documentation. + * PaymentMethodConfigurationUpdateParams.Klarna.DisplayPreference#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -5602,7 +5703,7 @@ public Builder putAllExtraParam(Map map) { /** The account's preference for whether or not to display this payment method. */ public Builder setPreference( - PaymentMethodConfigurationUpdateParams.Link.DisplayPreference.Preference preference) { + PaymentMethodConfigurationUpdateParams.Klarna.DisplayPreference.Preference preference) { this.preference = preference; return this; } @@ -5629,7 +5730,7 @@ public enum Preference implements ApiRequestParams.EnumParam { } @Getter - public static class Mobilepay { + public static class Konbini { /** Whether or not the payment method should be displayed. */ @SerializedName("display_preference") DisplayPreference displayPreference; @@ -5643,7 +5744,7 @@ public static class Mobilepay { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Mobilepay(DisplayPreference displayPreference, Map extraParams) { + private Konbini(DisplayPreference displayPreference, Map extraParams) { this.displayPreference = displayPreference; this.extraParams = extraParams; } @@ -5658,14 +5759,14 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationUpdateParams.Mobilepay build() { - return new PaymentMethodConfigurationUpdateParams.Mobilepay( + public PaymentMethodConfigurationUpdateParams.Konbini build() { + return new PaymentMethodConfigurationUpdateParams.Konbini( this.displayPreference, this.extraParams); } /** Whether or not the payment method should be displayed. */ public Builder setDisplayPreference( - PaymentMethodConfigurationUpdateParams.Mobilepay.DisplayPreference displayPreference) { + PaymentMethodConfigurationUpdateParams.Konbini.DisplayPreference displayPreference) { this.displayPreference = displayPreference; return this; } @@ -5673,7 +5774,7 @@ public Builder setDisplayPreference( /** * 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.Mobilepay#extraParams} for the field documentation. + * PaymentMethodConfigurationUpdateParams.Konbini#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -5686,7 +5787,7 @@ public Builder putExtraParam(String key, Object value) { /** * 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.Mobilepay#extraParams} for the field + * See {@link PaymentMethodConfigurationUpdateParams.Konbini#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -5728,8 +5829,8 @@ public static class Builder { private Preference preference; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationUpdateParams.Mobilepay.DisplayPreference build() { - return new PaymentMethodConfigurationUpdateParams.Mobilepay.DisplayPreference( + public PaymentMethodConfigurationUpdateParams.Konbini.DisplayPreference build() { + return new PaymentMethodConfigurationUpdateParams.Konbini.DisplayPreference( this.extraParams, this.preference); } @@ -5737,7 +5838,7 @@ public PaymentMethodConfigurationUpdateParams.Mobilepay.DisplayPreference build( * 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.Mobilepay.DisplayPreference#extraParams} for the + * PaymentMethodConfigurationUpdateParams.Konbini.DisplayPreference#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -5752,7 +5853,7 @@ public Builder putExtraParam(String key, Object value) { * 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.Mobilepay.DisplayPreference#extraParams} for the + * PaymentMethodConfigurationUpdateParams.Konbini.DisplayPreference#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -5765,7 +5866,7 @@ public Builder putAllExtraParam(Map map) { /** The account's preference for whether or not to display this payment method. */ public Builder setPreference( - PaymentMethodConfigurationUpdateParams.Mobilepay.DisplayPreference.Preference + PaymentMethodConfigurationUpdateParams.Konbini.DisplayPreference.Preference preference) { this.preference = preference; return this; @@ -5793,7 +5894,7 @@ public enum Preference implements ApiRequestParams.EnumParam { } @Getter - public static class Multibanco { + public static class Link { /** Whether or not the payment method should be displayed. */ @SerializedName("display_preference") DisplayPreference displayPreference; @@ -5807,7 +5908,7 @@ public static class Multibanco { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Multibanco(DisplayPreference displayPreference, Map extraParams) { + private Link(DisplayPreference displayPreference, Map extraParams) { this.displayPreference = displayPreference; this.extraParams = extraParams; } @@ -5822,14 +5923,14 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationUpdateParams.Multibanco build() { - return new PaymentMethodConfigurationUpdateParams.Multibanco( + public PaymentMethodConfigurationUpdateParams.Link build() { + return new PaymentMethodConfigurationUpdateParams.Link( this.displayPreference, this.extraParams); } /** Whether or not the payment method should be displayed. */ public Builder setDisplayPreference( - PaymentMethodConfigurationUpdateParams.Multibanco.DisplayPreference displayPreference) { + PaymentMethodConfigurationUpdateParams.Link.DisplayPreference displayPreference) { this.displayPreference = displayPreference; return this; } @@ -5837,7 +5938,7 @@ public Builder setDisplayPreference( /** * 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.Multibanco#extraParams} for the field documentation. + * PaymentMethodConfigurationUpdateParams.Link#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -5850,7 +5951,7 @@ public Builder putExtraParam(String key, Object value) { /** * 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.Multibanco#extraParams} for the field + * See {@link PaymentMethodConfigurationUpdateParams.Link#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -5892,8 +5993,8 @@ public static class Builder { private Preference preference; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationUpdateParams.Multibanco.DisplayPreference build() { - return new PaymentMethodConfigurationUpdateParams.Multibanco.DisplayPreference( + public PaymentMethodConfigurationUpdateParams.Link.DisplayPreference build() { + return new PaymentMethodConfigurationUpdateParams.Link.DisplayPreference( this.extraParams, this.preference); } @@ -5901,8 +6002,8 @@ public PaymentMethodConfigurationUpdateParams.Multibanco.DisplayPreference build * 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.Multibanco.DisplayPreference#extraParams} for the - * field documentation. + * PaymentMethodConfigurationUpdateParams.Link.DisplayPreference#extraParams} for the field + * documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -5916,8 +6017,8 @@ public Builder putExtraParam(String key, Object value) { * 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.Multibanco.DisplayPreference#extraParams} for the - * field documentation. + * PaymentMethodConfigurationUpdateParams.Link.DisplayPreference#extraParams} for the field + * documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -5929,8 +6030,7 @@ public Builder putAllExtraParam(Map map) { /** The account's preference for whether or not to display this payment method. */ public Builder setPreference( - PaymentMethodConfigurationUpdateParams.Multibanco.DisplayPreference.Preference - preference) { + PaymentMethodConfigurationUpdateParams.Link.DisplayPreference.Preference preference) { this.preference = preference; return this; } @@ -5957,7 +6057,7 @@ public enum Preference implements ApiRequestParams.EnumParam { } @Getter - public static class Oxxo { + public static class Mobilepay { /** Whether or not the payment method should be displayed. */ @SerializedName("display_preference") DisplayPreference displayPreference; @@ -5971,7 +6071,7 @@ public static class Oxxo { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Oxxo(DisplayPreference displayPreference, Map extraParams) { + private Mobilepay(DisplayPreference displayPreference, Map extraParams) { this.displayPreference = displayPreference; this.extraParams = extraParams; } @@ -5986,14 +6086,14 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationUpdateParams.Oxxo build() { - return new PaymentMethodConfigurationUpdateParams.Oxxo( + public PaymentMethodConfigurationUpdateParams.Mobilepay build() { + return new PaymentMethodConfigurationUpdateParams.Mobilepay( this.displayPreference, this.extraParams); } /** Whether or not the payment method should be displayed. */ public Builder setDisplayPreference( - PaymentMethodConfigurationUpdateParams.Oxxo.DisplayPreference displayPreference) { + PaymentMethodConfigurationUpdateParams.Mobilepay.DisplayPreference displayPreference) { this.displayPreference = displayPreference; return this; } @@ -6001,7 +6101,7 @@ public Builder setDisplayPreference( /** * 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.Oxxo#extraParams} for the field documentation. + * PaymentMethodConfigurationUpdateParams.Mobilepay#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -6014,7 +6114,659 @@ public Builder putExtraParam(String key, Object value) { /** * 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.Oxxo#extraParams} for the field + * See {@link PaymentMethodConfigurationUpdateParams.Mobilepay#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.Mobilepay.DisplayPreference build() { + return new PaymentMethodConfigurationUpdateParams.Mobilepay.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.Mobilepay.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.Mobilepay.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.Mobilepay.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 Multibanco { + /** 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 Multibanco(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.Multibanco build() { + return new PaymentMethodConfigurationUpdateParams.Multibanco( + this.displayPreference, this.extraParams); + } + + /** Whether or not the payment method should be displayed. */ + public Builder setDisplayPreference( + PaymentMethodConfigurationUpdateParams.Multibanco.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.Multibanco#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.Multibanco#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.Multibanco.DisplayPreference build() { + return new PaymentMethodConfigurationUpdateParams.Multibanco.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.Multibanco.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.Multibanco.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.Multibanco.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 Oxxo { + /** 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 Oxxo(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.Oxxo build() { + return new PaymentMethodConfigurationUpdateParams.Oxxo( + this.displayPreference, this.extraParams); + } + + /** Whether or not the payment method should be displayed. */ + public Builder setDisplayPreference( + PaymentMethodConfigurationUpdateParams.Oxxo.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.Oxxo#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.Oxxo#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.Oxxo.DisplayPreference build() { + return new PaymentMethodConfigurationUpdateParams.Oxxo.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.Oxxo.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.Oxxo.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.Oxxo.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 P24 { + /** 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 P24(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.P24 build() { + return new PaymentMethodConfigurationUpdateParams.P24( + this.displayPreference, this.extraParams); + } + + /** Whether or not the payment method should be displayed. */ + public Builder setDisplayPreference( + PaymentMethodConfigurationUpdateParams.P24.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.P24#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.P24#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.P24.DisplayPreference build() { + return new PaymentMethodConfigurationUpdateParams.P24.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.P24.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.P24.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.P24.DisplayPreference.Preference preference) { + this.preference = preference; + return this; + } + } + + public enum Preference implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), + + @SerializedName("off") + OFF("off"), + + @SerializedName("on") + ON("on"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Preference(String value) { + this.value = value; + } + } + } + } + + @Getter + public static class Paynow { + /** Whether or not the payment method should be displayed. */ + @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 Paynow(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.Paynow build() { + return new PaymentMethodConfigurationUpdateParams.Paynow( + this.displayPreference, this.extraParams); + } + + /** Whether or not the payment method should be displayed. */ + public Builder setDisplayPreference( + PaymentMethodConfigurationUpdateParams.Paynow.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.Paynow#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.Paynow#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -6056,8 +6808,8 @@ public static class Builder { private Preference preference; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationUpdateParams.Oxxo.DisplayPreference build() { - return new PaymentMethodConfigurationUpdateParams.Oxxo.DisplayPreference( + public PaymentMethodConfigurationUpdateParams.Paynow.DisplayPreference build() { + return new PaymentMethodConfigurationUpdateParams.Paynow.DisplayPreference( this.extraParams, this.preference); } @@ -6065,8 +6817,8 @@ public PaymentMethodConfigurationUpdateParams.Oxxo.DisplayPreference build() { * 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.Oxxo.DisplayPreference#extraParams} for the field - * documentation. + * PaymentMethodConfigurationUpdateParams.Paynow.DisplayPreference#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -6080,8 +6832,8 @@ public Builder putExtraParam(String key, Object value) { * 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.Oxxo.DisplayPreference#extraParams} for the field - * documentation. + * PaymentMethodConfigurationUpdateParams.Paynow.DisplayPreference#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -6093,7 +6845,7 @@ public Builder putAllExtraParam(Map map) { /** The account's preference for whether or not to display this payment method. */ public Builder setPreference( - PaymentMethodConfigurationUpdateParams.Oxxo.DisplayPreference.Preference preference) { + PaymentMethodConfigurationUpdateParams.Paynow.DisplayPreference.Preference preference) { this.preference = preference; return this; } @@ -6120,7 +6872,7 @@ public enum Preference implements ApiRequestParams.EnumParam { } @Getter - public static class P24 { + public static class Paypal { /** Whether or not the payment method should be displayed. */ @SerializedName("display_preference") DisplayPreference displayPreference; @@ -6134,7 +6886,7 @@ public static class P24 { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private P24(DisplayPreference displayPreference, Map extraParams) { + private Paypal(DisplayPreference displayPreference, Map extraParams) { this.displayPreference = displayPreference; this.extraParams = extraParams; } @@ -6149,14 +6901,14 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationUpdateParams.P24 build() { - return new PaymentMethodConfigurationUpdateParams.P24( + public PaymentMethodConfigurationUpdateParams.Paypal build() { + return new PaymentMethodConfigurationUpdateParams.Paypal( this.displayPreference, this.extraParams); } /** Whether or not the payment method should be displayed. */ public Builder setDisplayPreference( - PaymentMethodConfigurationUpdateParams.P24.DisplayPreference displayPreference) { + PaymentMethodConfigurationUpdateParams.Paypal.DisplayPreference displayPreference) { this.displayPreference = displayPreference; return this; } @@ -6164,7 +6916,7 @@ public Builder setDisplayPreference( /** * 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.P24#extraParams} for the field documentation. + * PaymentMethodConfigurationUpdateParams.Paypal#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -6177,7 +6929,7 @@ public Builder putExtraParam(String key, Object value) { /** * 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.P24#extraParams} for the field + * See {@link PaymentMethodConfigurationUpdateParams.Paypal#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -6219,16 +6971,17 @@ public static class Builder { private Preference preference; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationUpdateParams.P24.DisplayPreference build() { - return new PaymentMethodConfigurationUpdateParams.P24.DisplayPreference( + public PaymentMethodConfigurationUpdateParams.Paypal.DisplayPreference build() { + return new PaymentMethodConfigurationUpdateParams.Paypal.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.P24.DisplayPreference#extraParams} - * for the field documentation. + * map. See {@link + * PaymentMethodConfigurationUpdateParams.Paypal.DisplayPreference#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -6241,8 +6994,9 @@ public Builder putExtraParam(String key, Object value) { /** * 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.P24.DisplayPreference#extraParams} - * for the field documentation. + * map. See {@link + * PaymentMethodConfigurationUpdateParams.Paypal.DisplayPreference#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -6254,7 +7008,7 @@ public Builder putAllExtraParam(Map map) { /** The account's preference for whether or not to display this payment method. */ public Builder setPreference( - PaymentMethodConfigurationUpdateParams.P24.DisplayPreference.Preference preference) { + PaymentMethodConfigurationUpdateParams.Paypal.DisplayPreference.Preference preference) { this.preference = preference; return this; } @@ -6281,7 +7035,7 @@ public enum Preference implements ApiRequestParams.EnumParam { } @Getter - public static class Paynow { + public static class Payto { /** Whether or not the payment method should be displayed. */ @SerializedName("display_preference") DisplayPreference displayPreference; @@ -6295,7 +7049,7 @@ public static class Paynow { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Paynow(DisplayPreference displayPreference, Map extraParams) { + private Payto(DisplayPreference displayPreference, Map extraParams) { this.displayPreference = displayPreference; this.extraParams = extraParams; } @@ -6310,14 +7064,14 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationUpdateParams.Paynow build() { - return new PaymentMethodConfigurationUpdateParams.Paynow( + public PaymentMethodConfigurationUpdateParams.Payto build() { + return new PaymentMethodConfigurationUpdateParams.Payto( this.displayPreference, this.extraParams); } /** Whether or not the payment method should be displayed. */ public Builder setDisplayPreference( - PaymentMethodConfigurationUpdateParams.Paynow.DisplayPreference displayPreference) { + PaymentMethodConfigurationUpdateParams.Payto.DisplayPreference displayPreference) { this.displayPreference = displayPreference; return this; } @@ -6325,7 +7079,7 @@ public Builder setDisplayPreference( /** * 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.Paynow#extraParams} for the field documentation. + * PaymentMethodConfigurationUpdateParams.Payto#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -6338,7 +7092,7 @@ public Builder putExtraParam(String key, Object value) { /** * 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.Paynow#extraParams} for the field + * See {@link PaymentMethodConfigurationUpdateParams.Payto#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -6380,8 +7134,8 @@ public static class Builder { private Preference preference; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationUpdateParams.Paynow.DisplayPreference build() { - return new PaymentMethodConfigurationUpdateParams.Paynow.DisplayPreference( + public PaymentMethodConfigurationUpdateParams.Payto.DisplayPreference build() { + return new PaymentMethodConfigurationUpdateParams.Payto.DisplayPreference( this.extraParams, this.preference); } @@ -6389,8 +7143,8 @@ public PaymentMethodConfigurationUpdateParams.Paynow.DisplayPreference build() { * 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.Paynow.DisplayPreference#extraParams} for the - * field documentation. + * PaymentMethodConfigurationUpdateParams.Payto.DisplayPreference#extraParams} for the field + * documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -6404,8 +7158,8 @@ public Builder putExtraParam(String key, Object value) { * 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.Paynow.DisplayPreference#extraParams} for the - * field documentation. + * PaymentMethodConfigurationUpdateParams.Payto.DisplayPreference#extraParams} for the field + * documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -6417,7 +7171,7 @@ public Builder putAllExtraParam(Map map) { /** The account's preference for whether or not to display this payment method. */ public Builder setPreference( - PaymentMethodConfigurationUpdateParams.Paynow.DisplayPreference.Preference preference) { + PaymentMethodConfigurationUpdateParams.Payto.DisplayPreference.Preference preference) { this.preference = preference; return this; } @@ -6444,7 +7198,7 @@ public enum Preference implements ApiRequestParams.EnumParam { } @Getter - public static class Paypal { + public static class Promptpay { /** Whether or not the payment method should be displayed. */ @SerializedName("display_preference") DisplayPreference displayPreference; @@ -6458,7 +7212,7 @@ public static class Paypal { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Paypal(DisplayPreference displayPreference, Map extraParams) { + private Promptpay(DisplayPreference displayPreference, Map extraParams) { this.displayPreference = displayPreference; this.extraParams = extraParams; } @@ -6473,14 +7227,14 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationUpdateParams.Paypal build() { - return new PaymentMethodConfigurationUpdateParams.Paypal( + public PaymentMethodConfigurationUpdateParams.Promptpay build() { + return new PaymentMethodConfigurationUpdateParams.Promptpay( this.displayPreference, this.extraParams); } /** Whether or not the payment method should be displayed. */ public Builder setDisplayPreference( - PaymentMethodConfigurationUpdateParams.Paypal.DisplayPreference displayPreference) { + PaymentMethodConfigurationUpdateParams.Promptpay.DisplayPreference displayPreference) { this.displayPreference = displayPreference; return this; } @@ -6488,7 +7242,7 @@ public Builder setDisplayPreference( /** * 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.Paypal#extraParams} for the field documentation. + * PaymentMethodConfigurationUpdateParams.Promptpay#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -6501,7 +7255,7 @@ public Builder putExtraParam(String key, Object value) { /** * 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.Paypal#extraParams} for the field + * See {@link PaymentMethodConfigurationUpdateParams.Promptpay#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -6543,8 +7297,8 @@ public static class Builder { private Preference preference; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationUpdateParams.Paypal.DisplayPreference build() { - return new PaymentMethodConfigurationUpdateParams.Paypal.DisplayPreference( + public PaymentMethodConfigurationUpdateParams.Promptpay.DisplayPreference build() { + return new PaymentMethodConfigurationUpdateParams.Promptpay.DisplayPreference( this.extraParams, this.preference); } @@ -6552,7 +7306,7 @@ public PaymentMethodConfigurationUpdateParams.Paypal.DisplayPreference build() { * 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.Paypal.DisplayPreference#extraParams} for the + * PaymentMethodConfigurationUpdateParams.Promptpay.DisplayPreference#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -6567,7 +7321,7 @@ public Builder putExtraParam(String key, Object value) { * 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.Paypal.DisplayPreference#extraParams} for the + * PaymentMethodConfigurationUpdateParams.Promptpay.DisplayPreference#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -6580,7 +7334,8 @@ public Builder putAllExtraParam(Map map) { /** The account's preference for whether or not to display this payment method. */ public Builder setPreference( - PaymentMethodConfigurationUpdateParams.Paypal.DisplayPreference.Preference preference) { + PaymentMethodConfigurationUpdateParams.Promptpay.DisplayPreference.Preference + preference) { this.preference = preference; return this; } @@ -6607,7 +7362,7 @@ public enum Preference implements ApiRequestParams.EnumParam { } @Getter - public static class Payto { + public static class Qris { /** Whether or not the payment method should be displayed. */ @SerializedName("display_preference") DisplayPreference displayPreference; @@ -6621,7 +7376,7 @@ public static class Payto { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Payto(DisplayPreference displayPreference, Map extraParams) { + private Qris(DisplayPreference displayPreference, Map extraParams) { this.displayPreference = displayPreference; this.extraParams = extraParams; } @@ -6636,14 +7391,14 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationUpdateParams.Payto build() { - return new PaymentMethodConfigurationUpdateParams.Payto( + public PaymentMethodConfigurationUpdateParams.Qris build() { + return new PaymentMethodConfigurationUpdateParams.Qris( this.displayPreference, this.extraParams); } /** Whether or not the payment method should be displayed. */ public Builder setDisplayPreference( - PaymentMethodConfigurationUpdateParams.Payto.DisplayPreference displayPreference) { + PaymentMethodConfigurationUpdateParams.Qris.DisplayPreference displayPreference) { this.displayPreference = displayPreference; return this; } @@ -6651,7 +7406,7 @@ public Builder setDisplayPreference( /** * 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.Payto#extraParams} for the field documentation. + * PaymentMethodConfigurationUpdateParams.Qris#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -6664,7 +7419,7 @@ public Builder putExtraParam(String key, Object value) { /** * 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.Payto#extraParams} for the field + * See {@link PaymentMethodConfigurationUpdateParams.Qris#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -6706,8 +7461,8 @@ public static class Builder { private Preference preference; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationUpdateParams.Payto.DisplayPreference build() { - return new PaymentMethodConfigurationUpdateParams.Payto.DisplayPreference( + public PaymentMethodConfigurationUpdateParams.Qris.DisplayPreference build() { + return new PaymentMethodConfigurationUpdateParams.Qris.DisplayPreference( this.extraParams, this.preference); } @@ -6715,7 +7470,7 @@ public PaymentMethodConfigurationUpdateParams.Payto.DisplayPreference build() { * 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.Payto.DisplayPreference#extraParams} for the field + * PaymentMethodConfigurationUpdateParams.Qris.DisplayPreference#extraParams} for the field * documentation. */ public Builder putExtraParam(String key, Object value) { @@ -6730,7 +7485,7 @@ public Builder putExtraParam(String key, Object value) { * 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.Payto.DisplayPreference#extraParams} for the field + * PaymentMethodConfigurationUpdateParams.Qris.DisplayPreference#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -6743,7 +7498,7 @@ public Builder putAllExtraParam(Map map) { /** The account's preference for whether or not to display this payment method. */ public Builder setPreference( - PaymentMethodConfigurationUpdateParams.Payto.DisplayPreference.Preference preference) { + PaymentMethodConfigurationUpdateParams.Qris.DisplayPreference.Preference preference) { this.preference = preference; return this; } @@ -6770,7 +7525,7 @@ public enum Preference implements ApiRequestParams.EnumParam { } @Getter - public static class Promptpay { + public static class RevolutPay { /** Whether or not the payment method should be displayed. */ @SerializedName("display_preference") DisplayPreference displayPreference; @@ -6784,7 +7539,7 @@ public static class Promptpay { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Promptpay(DisplayPreference displayPreference, Map extraParams) { + private RevolutPay(DisplayPreference displayPreference, Map extraParams) { this.displayPreference = displayPreference; this.extraParams = extraParams; } @@ -6799,14 +7554,14 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationUpdateParams.Promptpay build() { - return new PaymentMethodConfigurationUpdateParams.Promptpay( + public PaymentMethodConfigurationUpdateParams.RevolutPay build() { + return new PaymentMethodConfigurationUpdateParams.RevolutPay( this.displayPreference, this.extraParams); } /** Whether or not the payment method should be displayed. */ public Builder setDisplayPreference( - PaymentMethodConfigurationUpdateParams.Promptpay.DisplayPreference displayPreference) { + PaymentMethodConfigurationUpdateParams.RevolutPay.DisplayPreference displayPreference) { this.displayPreference = displayPreference; return this; } @@ -6814,7 +7569,7 @@ public Builder setDisplayPreference( /** * 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.Promptpay#extraParams} for the field documentation. + * PaymentMethodConfigurationUpdateParams.RevolutPay#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -6827,7 +7582,7 @@ public Builder putExtraParam(String key, Object value) { /** * 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.Promptpay#extraParams} for the field + * See {@link PaymentMethodConfigurationUpdateParams.RevolutPay#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -6869,8 +7624,8 @@ public static class Builder { private Preference preference; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationUpdateParams.Promptpay.DisplayPreference build() { - return new PaymentMethodConfigurationUpdateParams.Promptpay.DisplayPreference( + public PaymentMethodConfigurationUpdateParams.RevolutPay.DisplayPreference build() { + return new PaymentMethodConfigurationUpdateParams.RevolutPay.DisplayPreference( this.extraParams, this.preference); } @@ -6878,7 +7633,7 @@ public PaymentMethodConfigurationUpdateParams.Promptpay.DisplayPreference build( * 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.Promptpay.DisplayPreference#extraParams} for the + * PaymentMethodConfigurationUpdateParams.RevolutPay.DisplayPreference#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -6893,7 +7648,7 @@ public Builder putExtraParam(String key, Object value) { * 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.Promptpay.DisplayPreference#extraParams} for the + * PaymentMethodConfigurationUpdateParams.RevolutPay.DisplayPreference#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -6906,7 +7661,7 @@ public Builder putAllExtraParam(Map map) { /** The account's preference for whether or not to display this payment method. */ public Builder setPreference( - PaymentMethodConfigurationUpdateParams.Promptpay.DisplayPreference.Preference + PaymentMethodConfigurationUpdateParams.RevolutPay.DisplayPreference.Preference preference) { this.preference = preference; return this; @@ -6934,7 +7689,7 @@ public enum Preference implements ApiRequestParams.EnumParam { } @Getter - public static class RevolutPay { + public static class SepaDebit { /** Whether or not the payment method should be displayed. */ @SerializedName("display_preference") DisplayPreference displayPreference; @@ -6948,7 +7703,7 @@ public static class RevolutPay { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private RevolutPay(DisplayPreference displayPreference, Map extraParams) { + private SepaDebit(DisplayPreference displayPreference, Map extraParams) { this.displayPreference = displayPreference; this.extraParams = extraParams; } @@ -6963,14 +7718,14 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationUpdateParams.RevolutPay build() { - return new PaymentMethodConfigurationUpdateParams.RevolutPay( + public PaymentMethodConfigurationUpdateParams.SepaDebit build() { + return new PaymentMethodConfigurationUpdateParams.SepaDebit( this.displayPreference, this.extraParams); } /** Whether or not the payment method should be displayed. */ public Builder setDisplayPreference( - PaymentMethodConfigurationUpdateParams.RevolutPay.DisplayPreference displayPreference) { + PaymentMethodConfigurationUpdateParams.SepaDebit.DisplayPreference displayPreference) { this.displayPreference = displayPreference; return this; } @@ -6978,7 +7733,7 @@ public Builder setDisplayPreference( /** * 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.RevolutPay#extraParams} for the field documentation. + * PaymentMethodConfigurationUpdateParams.SepaDebit#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -6991,7 +7746,7 @@ public Builder putExtraParam(String key, Object value) { /** * 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.RevolutPay#extraParams} for the field + * See {@link PaymentMethodConfigurationUpdateParams.SepaDebit#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -7033,8 +7788,8 @@ public static class Builder { private Preference preference; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationUpdateParams.RevolutPay.DisplayPreference build() { - return new PaymentMethodConfigurationUpdateParams.RevolutPay.DisplayPreference( + public PaymentMethodConfigurationUpdateParams.SepaDebit.DisplayPreference build() { + return new PaymentMethodConfigurationUpdateParams.SepaDebit.DisplayPreference( this.extraParams, this.preference); } @@ -7042,7 +7797,7 @@ public PaymentMethodConfigurationUpdateParams.RevolutPay.DisplayPreference build * 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.RevolutPay.DisplayPreference#extraParams} for the + * PaymentMethodConfigurationUpdateParams.SepaDebit.DisplayPreference#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -7057,7 +7812,7 @@ public Builder putExtraParam(String key, Object value) { * 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.RevolutPay.DisplayPreference#extraParams} for the + * PaymentMethodConfigurationUpdateParams.SepaDebit.DisplayPreference#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -7070,7 +7825,7 @@ public Builder putAllExtraParam(Map map) { /** The account's preference for whether or not to display this payment method. */ public Builder setPreference( - PaymentMethodConfigurationUpdateParams.RevolutPay.DisplayPreference.Preference + PaymentMethodConfigurationUpdateParams.SepaDebit.DisplayPreference.Preference preference) { this.preference = preference; return this; @@ -7098,7 +7853,7 @@ public enum Preference implements ApiRequestParams.EnumParam { } @Getter - public static class SepaDebit { + public static class Shopeepay { /** Whether or not the payment method should be displayed. */ @SerializedName("display_preference") DisplayPreference displayPreference; @@ -7112,7 +7867,7 @@ public static class SepaDebit { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private SepaDebit(DisplayPreference displayPreference, Map extraParams) { + private Shopeepay(DisplayPreference displayPreference, Map extraParams) { this.displayPreference = displayPreference; this.extraParams = extraParams; } @@ -7127,14 +7882,14 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationUpdateParams.SepaDebit build() { - return new PaymentMethodConfigurationUpdateParams.SepaDebit( + public PaymentMethodConfigurationUpdateParams.Shopeepay build() { + return new PaymentMethodConfigurationUpdateParams.Shopeepay( this.displayPreference, this.extraParams); } /** Whether or not the payment method should be displayed. */ public Builder setDisplayPreference( - PaymentMethodConfigurationUpdateParams.SepaDebit.DisplayPreference displayPreference) { + PaymentMethodConfigurationUpdateParams.Shopeepay.DisplayPreference displayPreference) { this.displayPreference = displayPreference; return this; } @@ -7142,7 +7897,7 @@ public Builder setDisplayPreference( /** * 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.SepaDebit#extraParams} for the field documentation. + * PaymentMethodConfigurationUpdateParams.Shopeepay#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -7155,7 +7910,7 @@ public Builder putExtraParam(String key, Object value) { /** * 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.SepaDebit#extraParams} for the field + * See {@link PaymentMethodConfigurationUpdateParams.Shopeepay#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -7197,8 +7952,8 @@ public static class Builder { private Preference preference; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationUpdateParams.SepaDebit.DisplayPreference build() { - return new PaymentMethodConfigurationUpdateParams.SepaDebit.DisplayPreference( + public PaymentMethodConfigurationUpdateParams.Shopeepay.DisplayPreference build() { + return new PaymentMethodConfigurationUpdateParams.Shopeepay.DisplayPreference( this.extraParams, this.preference); } @@ -7206,7 +7961,7 @@ public PaymentMethodConfigurationUpdateParams.SepaDebit.DisplayPreference build( * 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.SepaDebit.DisplayPreference#extraParams} for the + * PaymentMethodConfigurationUpdateParams.Shopeepay.DisplayPreference#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -7221,7 +7976,7 @@ public Builder putExtraParam(String key, Object value) { * 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.SepaDebit.DisplayPreference#extraParams} for the + * PaymentMethodConfigurationUpdateParams.Shopeepay.DisplayPreference#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -7234,7 +7989,7 @@ public Builder putAllExtraParam(Map map) { /** The account's preference for whether or not to display this payment method. */ public Builder setPreference( - PaymentMethodConfigurationUpdateParams.SepaDebit.DisplayPreference.Preference + PaymentMethodConfigurationUpdateParams.Shopeepay.DisplayPreference.Preference preference) { this.preference = preference; return this; 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..13062521c7f 100644 --- a/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java +++ b/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java @@ -589,7 +589,10 @@ public enum ApiVersion implements ApiRequestParams.EnumParam { VERSION_2024_06_20("2024-06-20"), @SerializedName("2024-09-30.acacia") - VERSION_2024_09_30_ACACIA("2024-09-30.acacia"); + VERSION_2024_09_30_ACACIA("2024-09-30.acacia"), + + @SerializedName("2024-10-28.acacia") + VERSION_2024_10_28_ACACIA("2024-10-28.acacia"); @Getter(onMethod_ = {@Override}) private final String value; @@ -1037,6 +1040,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/param/checkout/SessionCreateParams.java b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java index b9f44f74204..2b5b9621ca8 100644 --- a/src/main/java/com/stripe/param/checkout/SessionCreateParams.java +++ b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java @@ -5675,6 +5675,10 @@ public static class PaymentMethodOptions { @SerializedName("ideal") Ideal ideal; + /** contains details about the Kakao Pay payment method options. */ + @SerializedName("kakao_pay") + KakaoPay kakaoPay; + /** contains details about the Klarna payment method options. */ @SerializedName("klarna") Klarna klarna; @@ -5683,6 +5687,10 @@ public static class PaymentMethodOptions { @SerializedName("konbini") Konbini konbini; + /** contains details about the Korean card payment method options. */ + @SerializedName("kr_card") + KrCard krCard; + /** contains details about the Link payment method options. */ @SerializedName("link") Link link; @@ -5695,6 +5703,10 @@ public static class PaymentMethodOptions { @SerializedName("multibanco") Multibanco multibanco; + /** contains details about the Kakao Pay payment method options. */ + @SerializedName("naver_pay") + NaverPay naverPay; + /** contains details about the OXXO payment method options. */ @SerializedName("oxxo") Oxxo oxxo; @@ -5703,6 +5715,10 @@ public static class PaymentMethodOptions { @SerializedName("p24") P24 p24; + /** contains details about the PAYCO payment method options. */ + @SerializedName("payco") + Payco payco; + /** contains details about the PayNow payment method options. */ @SerializedName("paynow") Paynow paynow; @@ -5723,6 +5739,10 @@ public static class PaymentMethodOptions { @SerializedName("revolut_pay") RevolutPay revolutPay; + /** contains details about the Samsung Pay payment method options. */ + @SerializedName("samsung_pay") + SamsungPay samsungPay; + /** contains details about the Sepa Debit payment method options. */ @SerializedName("sepa_debit") SepaDebit sepaDebit; @@ -5762,18 +5782,23 @@ private PaymentMethodOptions( Giropay giropay, Grabpay grabpay, Ideal ideal, + KakaoPay kakaoPay, Klarna klarna, Konbini konbini, + KrCard krCard, Link link, Mobilepay mobilepay, Multibanco multibanco, + NaverPay naverPay, Oxxo oxxo, P24 p24, + Payco payco, Paynow paynow, Paypal paypal, Payto payto, Pix pix, RevolutPay revolutPay, + SamsungPay samsungPay, SepaDebit sepaDebit, Sofort sofort, Swish swish, @@ -5797,18 +5822,23 @@ private PaymentMethodOptions( this.giropay = giropay; this.grabpay = grabpay; this.ideal = ideal; + this.kakaoPay = kakaoPay; this.klarna = klarna; this.konbini = konbini; + this.krCard = krCard; this.link = link; this.mobilepay = mobilepay; this.multibanco = multibanco; + this.naverPay = naverPay; this.oxxo = oxxo; this.p24 = p24; + this.payco = payco; this.paynow = paynow; this.paypal = paypal; this.payto = payto; this.pix = pix; this.revolutPay = revolutPay; + this.samsungPay = samsungPay; this.sepaDebit = sepaDebit; this.sofort = sofort; this.swish = swish; @@ -5857,20 +5887,28 @@ public static class Builder { private Ideal ideal; + private KakaoPay kakaoPay; + private Klarna klarna; private Konbini konbini; + private KrCard krCard; + private Link link; private Mobilepay mobilepay; private Multibanco multibanco; + private NaverPay naverPay; + private Oxxo oxxo; private P24 p24; + private Payco payco; + private Paynow paynow; private Paypal paypal; @@ -5881,6 +5919,8 @@ public static class Builder { private RevolutPay revolutPay; + private SamsungPay samsungPay; + private SepaDebit sepaDebit; private Sofort sofort; @@ -5912,18 +5952,23 @@ public SessionCreateParams.PaymentMethodOptions build() { this.giropay, this.grabpay, this.ideal, + this.kakaoPay, this.klarna, this.konbini, + this.krCard, this.link, this.mobilepay, this.multibanco, + this.naverPay, this.oxxo, this.p24, + this.payco, this.paynow, this.paypal, this.payto, this.pix, this.revolutPay, + this.samsungPay, this.sepaDebit, this.sofort, this.swish, @@ -6063,6 +6108,12 @@ public Builder setIdeal(SessionCreateParams.PaymentMethodOptions.Ideal ideal) { return this; } + /** contains details about the Kakao Pay payment method options. */ + public Builder setKakaoPay(SessionCreateParams.PaymentMethodOptions.KakaoPay kakaoPay) { + this.kakaoPay = kakaoPay; + return this; + } + /** contains details about the Klarna payment method options. */ public Builder setKlarna(SessionCreateParams.PaymentMethodOptions.Klarna klarna) { this.klarna = klarna; @@ -6075,6 +6126,12 @@ public Builder setKonbini(SessionCreateParams.PaymentMethodOptions.Konbini konbi return this; } + /** contains details about the Korean card payment method options. */ + public Builder setKrCard(SessionCreateParams.PaymentMethodOptions.KrCard krCard) { + this.krCard = krCard; + return this; + } + /** contains details about the Link payment method options. */ public Builder setLink(SessionCreateParams.PaymentMethodOptions.Link link) { this.link = link; @@ -6093,6 +6150,12 @@ public Builder setMultibanco(SessionCreateParams.PaymentMethodOptions.Multibanco return this; } + /** contains details about the Kakao Pay payment method options. */ + public Builder setNaverPay(SessionCreateParams.PaymentMethodOptions.NaverPay naverPay) { + this.naverPay = naverPay; + return this; + } + /** contains details about the OXXO payment method options. */ public Builder setOxxo(SessionCreateParams.PaymentMethodOptions.Oxxo oxxo) { this.oxxo = oxxo; @@ -6105,6 +6168,12 @@ public Builder setP24(SessionCreateParams.PaymentMethodOptions.P24 p24) { return this; } + /** contains details about the PAYCO payment method options. */ + public Builder setPayco(SessionCreateParams.PaymentMethodOptions.Payco payco) { + this.payco = payco; + return this; + } + /** contains details about the PayNow payment method options. */ public Builder setPaynow(SessionCreateParams.PaymentMethodOptions.Paynow paynow) { this.paynow = paynow; @@ -6135,6 +6204,12 @@ public Builder setRevolutPay(SessionCreateParams.PaymentMethodOptions.RevolutPay return this; } + /** contains details about the Samsung Pay payment method options. */ + public Builder setSamsungPay(SessionCreateParams.PaymentMethodOptions.SamsungPay samsungPay) { + this.samsungPay = samsungPay; + return this; + } + /** contains details about the Sepa Debit payment method options. */ public Builder setSepaDebit(SessionCreateParams.PaymentMethodOptions.SepaDebit sepaDebit) { this.sepaDebit = sepaDebit; @@ -9180,6 +9255,130 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { } } + @Getter + public static class KakaoPay { + /** + * 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. + */ + @SerializedName("setup_future_usage") + SetupFutureUsage setupFutureUsage; + + private KakaoPay(Map extraParams, SetupFutureUsage setupFutureUsage) { + this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private SetupFutureUsage setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionCreateParams.PaymentMethodOptions.KakaoPay build() { + return new SessionCreateParams.PaymentMethodOptions.KakaoPay( + this.extraParams, this.setupFutureUsage); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionCreateParams.PaymentMethodOptions.KakaoPay#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionCreateParams.PaymentMethodOptions.KakaoPay#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. + */ + public Builder setSetupFutureUsage( + SessionCreateParams.PaymentMethodOptions.KakaoPay.SetupFutureUsage setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), + + @SerializedName("off_session") + OFF_SESSION("off_session"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + @Getter public static class Klarna { /** @@ -9448,6 +9647,130 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { } } + @Getter + public static class KrCard { + /** + * 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. + */ + @SerializedName("setup_future_usage") + SetupFutureUsage setupFutureUsage; + + private KrCard(Map extraParams, SetupFutureUsage setupFutureUsage) { + this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private SetupFutureUsage setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionCreateParams.PaymentMethodOptions.KrCard build() { + return new SessionCreateParams.PaymentMethodOptions.KrCard( + this.extraParams, this.setupFutureUsage); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionCreateParams.PaymentMethodOptions.KrCard#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionCreateParams.PaymentMethodOptions.KrCard#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. + */ + public Builder setSetupFutureUsage( + SessionCreateParams.PaymentMethodOptions.KrCard.SetupFutureUsage setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), + + @SerializedName("off_session") + OFF_SESSION("off_session"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + @Getter public static class Link { /** @@ -9814,6 +10137,130 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { } } + @Getter + public static class NaverPay { + /** + * 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. + */ + @SerializedName("setup_future_usage") + SetupFutureUsage setupFutureUsage; + + private NaverPay(Map extraParams, SetupFutureUsage setupFutureUsage) { + this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private SetupFutureUsage setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionCreateParams.PaymentMethodOptions.NaverPay build() { + return new SessionCreateParams.PaymentMethodOptions.NaverPay( + this.extraParams, this.setupFutureUsage); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionCreateParams.PaymentMethodOptions.NaverPay#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionCreateParams.PaymentMethodOptions.NaverPay#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. + */ + public Builder setSetupFutureUsage( + SessionCreateParams.PaymentMethodOptions.NaverPay.SetupFutureUsage setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), + + @SerializedName("off_session") + OFF_SESSION("off_session"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + @Getter public static class Oxxo { /** @@ -10096,6 +10543,63 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { } } + @Getter + public static class Payco { + /** + * 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 Payco(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionCreateParams.PaymentMethodOptions.Payco build() { + return new SessionCreateParams.PaymentMethodOptions.Payco(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionCreateParams.PaymentMethodOptions.Payco#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionCreateParams.PaymentMethodOptions.Payco#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 Paynow { /** @@ -11247,6 +11751,63 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { } } + @Getter + public static class SamsungPay { + /** + * 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 SamsungPay(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionCreateParams.PaymentMethodOptions.SamsungPay build() { + return new SessionCreateParams.PaymentMethodOptions.SamsungPay(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionCreateParams.PaymentMethodOptions.SamsungPay#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionCreateParams.PaymentMethodOptions.SamsungPay#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 SepaDebit { /** diff --git a/src/main/java/com/stripe/param/v2/core/EventDestinationCreateParams.java b/src/main/java/com/stripe/param/v2/core/EventDestinationCreateParams.java new file mode 100644 index 00000000000..a9bee21ce51 --- /dev/null +++ b/src/main/java/com/stripe/param/v2/core/EventDestinationCreateParams.java @@ -0,0 +1,527 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.core; + +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 EventDestinationCreateParams extends ApiRequestParams { + /** Amazon EventBridge configuration. */ + @SerializedName("amazon_eventbridge") + AmazonEventbridge amazonEventbridge; + + /** An optional description of what the event destination is used for. */ + @SerializedName("description") + String description; + + /** Required. The list of events to enable for this endpoint. */ + @SerializedName("enabled_events") + List enabledEvents; + + /** Required. Payload type of events being subscribed to. */ + @SerializedName("event_payload") + EventPayload eventPayload; + + /** Where events should be routed from. */ + @SerializedName("events_from") + List eventsFrom; + + /** + * 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; + + /** Additional fields to include in the response. */ + @SerializedName("include") + List include; + + /** Metadata. */ + @SerializedName("metadata") + Map metadata; + + /** Required. Event destination name. */ + @SerializedName("name") + String name; + + /** If using the snapshot event payload, the API version events are rendered as. */ + @SerializedName("snapshot_api_version") + String snapshotApiVersion; + + /** Required. Event destination type. */ + @SerializedName("type") + Type type; + + /** Webhook endpoint configuration. */ + @SerializedName("webhook_endpoint") + WebhookEndpoint webhookEndpoint; + + private EventDestinationCreateParams( + AmazonEventbridge amazonEventbridge, + String description, + List enabledEvents, + EventPayload eventPayload, + List eventsFrom, + Map extraParams, + List include, + Map metadata, + String name, + String snapshotApiVersion, + Type type, + WebhookEndpoint webhookEndpoint) { + this.amazonEventbridge = amazonEventbridge; + this.description = description; + this.enabledEvents = enabledEvents; + this.eventPayload = eventPayload; + this.eventsFrom = eventsFrom; + this.extraParams = extraParams; + this.include = include; + this.metadata = metadata; + this.name = name; + this.snapshotApiVersion = snapshotApiVersion; + this.type = type; + this.webhookEndpoint = webhookEndpoint; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private AmazonEventbridge amazonEventbridge; + + private String description; + + private List enabledEvents; + + private EventPayload eventPayload; + + private List eventsFrom; + + private Map extraParams; + + private List include; + + private Map metadata; + + private String name; + + private String snapshotApiVersion; + + private Type type; + + private WebhookEndpoint webhookEndpoint; + + /** Finalize and obtain parameter instance from this builder. */ + public EventDestinationCreateParams build() { + return new EventDestinationCreateParams( + this.amazonEventbridge, + this.description, + this.enabledEvents, + this.eventPayload, + this.eventsFrom, + this.extraParams, + this.include, + this.metadata, + this.name, + this.snapshotApiVersion, + this.type, + this.webhookEndpoint); + } + + /** Amazon EventBridge configuration. */ + public Builder setAmazonEventbridge( + EventDestinationCreateParams.AmazonEventbridge amazonEventbridge) { + this.amazonEventbridge = amazonEventbridge; + return this; + } + + /** An optional description of what the event destination is used for. */ + public Builder setDescription(String description) { + this.description = description; + return this; + } + + /** + * Add an element to `enabledEvents` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * EventDestinationCreateParams#enabledEvents} for the field documentation. + */ + public Builder addEnabledEvent(String element) { + if (this.enabledEvents == null) { + this.enabledEvents = new ArrayList<>(); + } + this.enabledEvents.add(element); + return this; + } + + /** + * Add all elements to `enabledEvents` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * EventDestinationCreateParams#enabledEvents} for the field documentation. + */ + public Builder addAllEnabledEvent(List elements) { + if (this.enabledEvents == null) { + this.enabledEvents = new ArrayList<>(); + } + this.enabledEvents.addAll(elements); + return this; + } + + /** Required. Payload type of events being subscribed to. */ + public Builder setEventPayload(EventDestinationCreateParams.EventPayload eventPayload) { + this.eventPayload = eventPayload; + return this; + } + + /** + * Add an element to `eventsFrom` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * EventDestinationCreateParams#eventsFrom} for the field documentation. + */ + public Builder addEventsFrom(EventDestinationCreateParams.EventsFrom element) { + if (this.eventsFrom == null) { + this.eventsFrom = new ArrayList<>(); + } + this.eventsFrom.add(element); + return this; + } + + /** + * Add all elements to `eventsFrom` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * EventDestinationCreateParams#eventsFrom} for the field documentation. + */ + public Builder addAllEventsFrom(List elements) { + if (this.eventsFrom == null) { + this.eventsFrom = new ArrayList<>(); + } + this.eventsFrom.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 + * EventDestinationCreateParams#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 EventDestinationCreateParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `include` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * EventDestinationCreateParams#include} for the field documentation. + */ + public Builder addInclude(EventDestinationCreateParams.Include element) { + if (this.include == null) { + this.include = new ArrayList<>(); + } + this.include.add(element); + return this; + } + + /** + * Add all elements to `include` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * EventDestinationCreateParams#include} for the field documentation. + */ + public Builder addAllInclude(List elements) { + if (this.include == null) { + this.include = new ArrayList<>(); + } + this.include.addAll(elements); + return this; + } + + /** + * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` call, + * and subsequent calls add additional key/value pairs to the original map. See {@link + * EventDestinationCreateParams#metadata} for the field documentation. + */ + public Builder putMetadata(String key, String value) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `metadata` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link EventDestinationCreateParams#metadata} for the field documentation. + */ + public Builder putAllMetadata(Map map) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.putAll(map); + return this; + } + + /** Required. Event destination name. */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** If using the snapshot event payload, the API version events are rendered as. */ + public Builder setSnapshotApiVersion(String snapshotApiVersion) { + this.snapshotApiVersion = snapshotApiVersion; + return this; + } + + /** Required. Event destination type. */ + public Builder setType(EventDestinationCreateParams.Type type) { + this.type = type; + return this; + } + + /** Webhook endpoint configuration. */ + public Builder setWebhookEndpoint( + EventDestinationCreateParams.WebhookEndpoint webhookEndpoint) { + this.webhookEndpoint = webhookEndpoint; + return this; + } + } + + @Getter + public static class AmazonEventbridge { + /** Required. The AWS account ID. */ + @SerializedName("aws_account_id") + String awsAccountId; + + /** Required. The region of the AWS event source. */ + @SerializedName("aws_region") + String awsRegion; + + /** + * 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 AmazonEventbridge( + String awsAccountId, String awsRegion, Map extraParams) { + this.awsAccountId = awsAccountId; + this.awsRegion = awsRegion; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String awsAccountId; + + private String awsRegion; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public EventDestinationCreateParams.AmazonEventbridge build() { + return new EventDestinationCreateParams.AmazonEventbridge( + this.awsAccountId, this.awsRegion, this.extraParams); + } + + /** Required. The AWS account ID. */ + public Builder setAwsAccountId(String awsAccountId) { + this.awsAccountId = awsAccountId; + return this; + } + + /** Required. The region of the AWS event source. */ + public Builder setAwsRegion(String awsRegion) { + this.awsRegion = awsRegion; + 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 + * EventDestinationCreateParams.AmazonEventbridge#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 EventDestinationCreateParams.AmazonEventbridge#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 WebhookEndpoint { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. The URL of the webhook endpoint. */ + @SerializedName("url") + String url; + + private WebhookEndpoint(Map extraParams, String url) { + this.extraParams = extraParams; + this.url = url; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String url; + + /** Finalize and obtain parameter instance from this builder. */ + public EventDestinationCreateParams.WebhookEndpoint build() { + return new EventDestinationCreateParams.WebhookEndpoint(this.extraParams, this.url); + } + + /** + * 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 + * EventDestinationCreateParams.WebhookEndpoint#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 EventDestinationCreateParams.WebhookEndpoint#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Required. The URL of the webhook endpoint. */ + public Builder setUrl(String url) { + this.url = url; + return this; + } + } + } + + public enum EventPayload implements ApiRequestParams.EnumParam { + @SerializedName("snapshot") + SNAPSHOT("snapshot"), + + @SerializedName("thin") + THIN("thin"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + EventPayload(String value) { + this.value = value; + } + } + + public enum EventsFrom implements ApiRequestParams.EnumParam { + @SerializedName("other_accounts") + OTHER_ACCOUNTS("other_accounts"), + + @SerializedName("self") + SELF("self"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + EventsFrom(String value) { + this.value = value; + } + } + + public enum Include implements ApiRequestParams.EnumParam { + @SerializedName("webhook_endpoint.signing_secret") + WEBHOOK_ENDPOINT__SIGNING_SECRET("webhook_endpoint.signing_secret"), + + @SerializedName("webhook_endpoint.url") + WEBHOOK_ENDPOINT__URL("webhook_endpoint.url"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Include(String value) { + this.value = value; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("amazon_eventbridge") + AMAZON_EVENTBRIDGE("amazon_eventbridge"), + + @SerializedName("webhook_endpoint") + WEBHOOK_ENDPOINT("webhook_endpoint"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } +} diff --git a/src/main/java/com/stripe/param/v2/core/EventDestinationListParams.java b/src/main/java/com/stripe/param/v2/core/EventDestinationListParams.java new file mode 100644 index 00000000000..c3e52fe99e5 --- /dev/null +++ b/src/main/java/com/stripe/param/v2/core/EventDestinationListParams.java @@ -0,0 +1,142 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.core; + +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 EventDestinationListParams extends ApiRequestParams { + /** + * 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; + + /** + * Additional fields to include in the response. Currently supports {@code webhook_endpoint.url}. + */ + @SerializedName("include") + List include; + + /** The page size. */ + @SerializedName("limit") + Integer limit; + + /** The requested page. */ + @SerializedName("page") + String page; + + private EventDestinationListParams( + Map extraParams, + List include, + Integer limit, + String page) { + this.extraParams = extraParams; + this.include = include; + this.limit = limit; + this.page = page; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List include; + + private Integer limit; + + private String page; + + /** Finalize and obtain parameter instance from this builder. */ + public EventDestinationListParams build() { + return new EventDestinationListParams(this.extraParams, this.include, this.limit, this.page); + } + + /** + * 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 + * EventDestinationListParams#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 EventDestinationListParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `include` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * EventDestinationListParams#include} for the field documentation. + */ + public Builder addInclude(EventDestinationListParams.Include element) { + if (this.include == null) { + this.include = new ArrayList<>(); + } + this.include.add(element); + return this; + } + + /** + * Add all elements to `include` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * EventDestinationListParams#include} for the field documentation. + */ + public Builder addAllInclude(List elements) { + if (this.include == null) { + this.include = new ArrayList<>(); + } + this.include.addAll(elements); + return this; + } + + /** The page size. */ + public Builder setLimit(Integer limit) { + this.limit = limit; + return this; + } + + /** The requested page. */ + public Builder setPage(String page) { + this.page = page; + return this; + } + } + + public enum Include implements ApiRequestParams.EnumParam { + @SerializedName("webhook_endpoint.url") + WEBHOOK_ENDPOINT__URL("webhook_endpoint.url"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Include(String value) { + this.value = value; + } + } +} diff --git a/src/main/java/com/stripe/param/v2/core/EventDestinationRetrieveParams.java b/src/main/java/com/stripe/param/v2/core/EventDestinationRetrieveParams.java new file mode 100644 index 00000000000..36436d82614 --- /dev/null +++ b/src/main/java/com/stripe/param/v2/core/EventDestinationRetrieveParams.java @@ -0,0 +1,111 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.core; + +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 EventDestinationRetrieveParams extends ApiRequestParams { + /** + * 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; + + /** Additional fields to include in the response. */ + @SerializedName("include") + List include; + + private EventDestinationRetrieveParams( + Map extraParams, List include) { + this.extraParams = extraParams; + this.include = include; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List include; + + /** Finalize and obtain parameter instance from this builder. */ + public EventDestinationRetrieveParams build() { + return new EventDestinationRetrieveParams(this.extraParams, this.include); + } + + /** + * 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 + * EventDestinationRetrieveParams#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 EventDestinationRetrieveParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `include` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * EventDestinationRetrieveParams#include} for the field documentation. + */ + public Builder addInclude(EventDestinationRetrieveParams.Include element) { + if (this.include == null) { + this.include = new ArrayList<>(); + } + this.include.add(element); + return this; + } + + /** + * Add all elements to `include` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * EventDestinationRetrieveParams#include} for the field documentation. + */ + public Builder addAllInclude(List elements) { + if (this.include == null) { + this.include = new ArrayList<>(); + } + this.include.addAll(elements); + return this; + } + } + + public enum Include implements ApiRequestParams.EnumParam { + @SerializedName("webhook_endpoint.url") + WEBHOOK_ENDPOINT__URL("webhook_endpoint.url"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Include(String value) { + this.value = value; + } + } +} diff --git a/src/main/java/com/stripe/param/v2/core/EventDestinationUpdateParams.java b/src/main/java/com/stripe/param/v2/core/EventDestinationUpdateParams.java new file mode 100644 index 00000000000..8e0856a7a7f --- /dev/null +++ b/src/main/java/com/stripe/param/v2/core/EventDestinationUpdateParams.java @@ -0,0 +1,338 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.core; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import com.stripe.param.common.EmptyParam; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import lombok.Getter; + +@Getter +public class EventDestinationUpdateParams extends ApiRequestParams { + /** An optional description of what the event destination is used for. */ + @SerializedName("description") + Object description; + + /** The list of events to enable for this endpoint. */ + @SerializedName("enabled_events") + List enabledEvents; + + /** + * 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; + + /** + * Additional fields to include in the response. Currently supports {@code webhook_endpoint.url}. + */ + @SerializedName("include") + List include; + + /** Metadata. */ + @SerializedName("metadata") + Map metadata; + + /** Event destination name. */ + @SerializedName("name") + Object name; + + /** Webhook endpoint configuration. */ + @SerializedName("webhook_endpoint") + WebhookEndpoint webhookEndpoint; + + private EventDestinationUpdateParams( + Object description, + List enabledEvents, + Map extraParams, + List include, + Map metadata, + Object name, + WebhookEndpoint webhookEndpoint) { + this.description = description; + this.enabledEvents = enabledEvents; + this.extraParams = extraParams; + this.include = include; + this.metadata = metadata; + this.name = name; + this.webhookEndpoint = webhookEndpoint; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object description; + + private List enabledEvents; + + private Map extraParams; + + private List include; + + private Map metadata; + + private Object name; + + private WebhookEndpoint webhookEndpoint; + + /** Finalize and obtain parameter instance from this builder. */ + public EventDestinationUpdateParams build() { + return new EventDestinationUpdateParams( + this.description, + this.enabledEvents, + this.extraParams, + this.include, + this.metadata, + this.name, + this.webhookEndpoint); + } + + /** An optional description of what the event destination is used for. */ + public Builder setDescription(String description) { + this.description = description; + return this; + } + + /** An optional description of what the event destination is used for. */ + public Builder setDescription(EmptyParam description) { + this.description = description; + return this; + } + + /** + * Add an element to `enabledEvents` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * EventDestinationUpdateParams#enabledEvents} for the field documentation. + */ + public Builder addEnabledEvent(String element) { + if (this.enabledEvents == null) { + this.enabledEvents = new ArrayList<>(); + } + this.enabledEvents.add(element); + return this; + } + + /** + * Add all elements to `enabledEvents` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * EventDestinationUpdateParams#enabledEvents} for the field documentation. + */ + public Builder addAllEnabledEvent(List elements) { + if (this.enabledEvents == null) { + this.enabledEvents = new ArrayList<>(); + } + this.enabledEvents.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 + * EventDestinationUpdateParams#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 EventDestinationUpdateParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `include` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * EventDestinationUpdateParams#include} for the field documentation. + */ + public Builder addInclude(EventDestinationUpdateParams.Include element) { + if (this.include == null) { + this.include = new ArrayList<>(); + } + this.include.add(element); + return this; + } + + /** + * Add all elements to `include` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * EventDestinationUpdateParams#include} for the field documentation. + */ + public Builder addAllInclude(List elements) { + if (this.include == null) { + this.include = new ArrayList<>(); + } + this.include.addAll(elements); + return this; + } + + /** + * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` call, + * and subsequent calls add additional key/value pairs to the original map. See {@link + * EventDestinationUpdateParams#metadata} for the field documentation. + */ + public Builder putMetadata(String key, String value) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, value); + return this; + } + + /** + * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` call, + * and subsequent calls add additional key/value pairs to the original map. See {@link + * EventDestinationUpdateParams#metadata} for the field documentation. + */ + public Builder putMetadata(String key, EmptyParam value) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `metadata` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * Map values can only be one of the following types: `String`, `EmptyParam`. See {@link + * EventDestinationUpdateParams#metadata} for the field documentation. + */ + public Builder putAllMetadata(Map map) { + if (!map.values().stream().allMatch(v -> v instanceof String || v instanceof EmptyParam)) { + throw new IllegalArgumentException( + "All map values must one of the following types: String, EmptyParam"); + } + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.putAll(map); + return this; + } + + /** Event destination name. */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** Event destination name. */ + public Builder setName(EmptyParam name) { + this.name = name; + return this; + } + + /** Webhook endpoint configuration. */ + public Builder setWebhookEndpoint( + EventDestinationUpdateParams.WebhookEndpoint webhookEndpoint) { + this.webhookEndpoint = webhookEndpoint; + return this; + } + } + + @Getter + public static class WebhookEndpoint { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. The URL of the webhook endpoint. */ + @SerializedName("url") + Object url; + + private WebhookEndpoint(Map extraParams, Object url) { + this.extraParams = extraParams; + this.url = url; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object url; + + /** Finalize and obtain parameter instance from this builder. */ + public EventDestinationUpdateParams.WebhookEndpoint build() { + return new EventDestinationUpdateParams.WebhookEndpoint(this.extraParams, this.url); + } + + /** + * 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 + * EventDestinationUpdateParams.WebhookEndpoint#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 EventDestinationUpdateParams.WebhookEndpoint#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Required. The URL of the webhook endpoint. */ + public Builder setUrl(String url) { + this.url = url; + return this; + } + + /** Required. The URL of the webhook endpoint. */ + public Builder setUrl(EmptyParam url) { + this.url = url; + return this; + } + } + } + + public enum Include implements ApiRequestParams.EnumParam { + @SerializedName("webhook_endpoint.url") + WEBHOOK_ENDPOINT__URL("webhook_endpoint.url"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Include(String value) { + this.value = value; + } + } +} diff --git a/src/main/java/com/stripe/param/v2/core/EventListParams.java b/src/main/java/com/stripe/param/v2/core/EventListParams.java index 46aa46a383b..a5c9f901bd4 100644 --- a/src/main/java/com/stripe/param/v2/core/EventListParams.java +++ b/src/main/java/com/stripe/param/v2/core/EventListParams.java @@ -26,7 +26,7 @@ public class EventListParams extends ApiRequestParams { @SerializedName("object_id") String objectId; - /** The requested page number. */ + /** The requested page. */ @SerializedName("page") String page; @@ -94,7 +94,7 @@ public Builder setObjectId(String objectId) { return this; } - /** The requested page number. */ + /** The requested page. */ public Builder setPage(String page) { this.page = page; return this; diff --git a/src/main/java/com/stripe/service/AccountLoginLinkService.java b/src/main/java/com/stripe/service/AccountLoginLinkService.java index 2b1d2bfe693..eea8e580341 100644 --- a/src/main/java/com/stripe/service/AccountLoginLinkService.java +++ b/src/main/java/com/stripe/service/AccountLoginLinkService.java @@ -18,7 +18,7 @@ public AccountLoginLinkService(StripeResponseGetter responseGetter) { } /** - * Creates a single-use login link for a connected account to access the Express Dashboard. + * Creates a login link for a connected account to access the Express Dashboard. * *

You can only create login links for accounts that use the Express Dashboard and are connected to @@ -29,7 +29,7 @@ public LoginLink create(String account, AccountLoginLinkCreateParams params) return create(account, params, (RequestOptions) null); } /** - * Creates a single-use login link for a connected account to access the Express Dashboard. + * Creates a login link for a connected account to access the Express Dashboard. * *

You can only create login links for accounts that use the Express Dashboard and are connected to @@ -39,7 +39,7 @@ public LoginLink create(String account, RequestOptions options) throws StripeExc return create(account, (AccountLoginLinkCreateParams) null, options); } /** - * Creates a single-use login link for a connected account to access the Express Dashboard. + * Creates a login link for a connected account to access the Express Dashboard. * *

You can only create login links for accounts that use the Express Dashboard and are connected to @@ -49,7 +49,7 @@ public LoginLink create(String account) throws StripeException { return create(account, (AccountLoginLinkCreateParams) null, (RequestOptions) null); } /** - * Creates a single-use login link for a connected account to access the Express Dashboard. + * Creates a login link for a connected account to access the Express Dashboard. * *

You can only create login links for accounts that use the Express Dashboard and are connected to 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); + } } diff --git a/src/main/java/com/stripe/service/v2/CoreService.java b/src/main/java/com/stripe/service/v2/CoreService.java index 313e025c51c..773df5e38ee 100644 --- a/src/main/java/com/stripe/service/v2/CoreService.java +++ b/src/main/java/com/stripe/service/v2/CoreService.java @@ -9,6 +9,10 @@ public CoreService(StripeResponseGetter responseGetter) { super(responseGetter); } + public com.stripe.service.v2.core.EventDestinationService eventDestinations() { + return new com.stripe.service.v2.core.EventDestinationService(this.getResponseGetter()); + } + public com.stripe.service.v2.core.EventService events() { return new com.stripe.service.v2.core.EventService(this.getResponseGetter()); } diff --git a/src/main/java/com/stripe/service/v2/core/EventDestinationService.java b/src/main/java/com/stripe/service/v2/core/EventDestinationService.java new file mode 100644 index 00000000000..fd421f81a09 --- /dev/null +++ b/src/main/java/com/stripe/service/v2/core/EventDestinationService.java @@ -0,0 +1,169 @@ +// File generated from our OpenAPI spec +package com.stripe.service.v2.core; + +import com.google.gson.reflect.TypeToken; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.Event; +import com.stripe.model.v2.EventDestination; +import com.stripe.model.v2.StripeCollection; +import com.stripe.net.ApiRequest; +import com.stripe.net.ApiRequestParams; +import com.stripe.net.ApiResource; +import com.stripe.net.ApiService; +import com.stripe.net.BaseAddress; +import com.stripe.net.RequestOptions; +import com.stripe.net.StripeResponseGetter; +import com.stripe.param.v2.core.EventDestinationCreateParams; +import com.stripe.param.v2.core.EventDestinationListParams; +import com.stripe.param.v2.core.EventDestinationRetrieveParams; +import com.stripe.param.v2.core.EventDestinationUpdateParams; + +public final class EventDestinationService extends ApiService { + public EventDestinationService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + /** Create a new event destination. */ + public EventDestination create(EventDestinationCreateParams params) throws StripeException { + return create(params, (RequestOptions) null); + } + /** Create a new event destination. */ + public EventDestination create(EventDestinationCreateParams params, RequestOptions options) + throws StripeException { + String path = "/v2/core/event_destinations"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, EventDestination.class); + } + /** Delete an event destination. */ + public EventDestination delete(String id) throws StripeException { + return delete(id, (RequestOptions) null); + } + /** Delete an event destination. */ + public EventDestination delete(String id, RequestOptions options) throws StripeException { + String path = String.format("/v2/core/event_destinations/%s", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.DELETE, path, null, options); + return this.request(request, EventDestination.class); + } + /** Disable an event destination. */ + public EventDestination disable(String id) throws StripeException { + return disable(id, (RequestOptions) null); + } + /** Disable an event destination. */ + public EventDestination disable(String id, RequestOptions options) throws StripeException { + String path = + String.format("/v2/core/event_destinations/%s/disable", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, null, options); + return this.request(request, EventDestination.class); + } + /** Enable an event destination. */ + public EventDestination enable(String id) throws StripeException { + return enable(id, (RequestOptions) null); + } + /** Enable an event destination. */ + public EventDestination enable(String id, RequestOptions options) throws StripeException { + String path = + String.format("/v2/core/event_destinations/%s/enable", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, null, options); + return this.request(request, EventDestination.class); + } + /** Lists all event destinations. */ + public StripeCollection list(EventDestinationListParams params) + throws StripeException { + return list(params, (RequestOptions) null); + } + /** Lists all event destinations. */ + public StripeCollection list(RequestOptions options) throws StripeException { + return list((EventDestinationListParams) null, options); + } + /** Lists all event destinations. */ + public StripeCollection list() throws StripeException { + return list((EventDestinationListParams) null, (RequestOptions) null); + } + /** Lists all event destinations. */ + public StripeCollection list( + EventDestinationListParams params, RequestOptions options) throws StripeException { + String path = "/v2/core/event_destinations"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, new TypeToken>() {}.getType()); + } + /** Send a {@code ping} event to an event destination. */ + public Event ping(String id) throws StripeException { + return ping(id, (RequestOptions) null); + } + /** Send a {@code ping} event to an event destination. */ + public Event ping(String id, RequestOptions options) throws StripeException { + String path = String.format("/v2/core/event_destinations/%s/ping", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, null, options); + return this.request(request, Event.class); + } + /** Retrieves the details of an event destination. */ + public EventDestination retrieve(String id, EventDestinationRetrieveParams params) + throws StripeException { + return retrieve(id, params, (RequestOptions) null); + } + /** Retrieves the details of an event destination. */ + public EventDestination retrieve(String id, RequestOptions options) throws StripeException { + return retrieve(id, (EventDestinationRetrieveParams) null, options); + } + /** Retrieves the details of an event destination. */ + public EventDestination retrieve(String id) throws StripeException { + return retrieve(id, (EventDestinationRetrieveParams) null, (RequestOptions) null); + } + /** Retrieves the details of an event destination. */ + public EventDestination retrieve( + String id, EventDestinationRetrieveParams params, RequestOptions options) + throws StripeException { + String path = String.format("/v2/core/event_destinations/%s", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, EventDestination.class); + } + /** Update the details of an event destination. */ + public EventDestination update(String id, EventDestinationUpdateParams params) + throws StripeException { + return update(id, params, (RequestOptions) null); + } + /** Update the details of an event destination. */ + public EventDestination update(String id, RequestOptions options) throws StripeException { + return update(id, (EventDestinationUpdateParams) null, options); + } + /** Update the details of an event destination. */ + public EventDestination update(String id) throws StripeException { + return update(id, (EventDestinationUpdateParams) null, (RequestOptions) null); + } + /** Update the details of an event destination. */ + public EventDestination update( + String id, EventDestinationUpdateParams params, RequestOptions options) + throws StripeException { + String path = String.format("/v2/core/event_destinations/%s", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, EventDestination.class); + } +} diff --git a/src/test/java/com/stripe/exception/StripeExceptionTest.java b/src/test/java/com/stripe/exception/StripeExceptionTest.java new file mode 100644 index 00000000000..75730cb74d5 --- /dev/null +++ b/src/test/java/com/stripe/exception/StripeExceptionTest.java @@ -0,0 +1,61 @@ +package com.stripe.exception; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + +import com.google.gson.JsonObject; +import com.stripe.BaseStripeTest; +import com.stripe.model.StripeError; +import com.stripe.net.ApiMode; +import com.stripe.net.ApiResource; +import java.io.IOException; +import org.junit.jupiter.api.Test; + +public class StripeExceptionTest extends BaseStripeTest { + + @Test + public void testSetStripeError() throws IOException { + final String data = getResourceAsString("/api_fixtures/error_invalid_request.json"); + final JsonObject jsonObject = + ApiResource.GSON.fromJson(data, JsonObject.class).getAsJsonObject("error"); + final StripeError error = ApiResource.GSON.fromJson(jsonObject, StripeError.class); + error.setUserMessage("it broke"); + + StripeException exception = + new StripeException(error.getMessage(), "1234", error.getCode(), 400) {}; + + exception.setStripeError(error); + + assertNotNull(exception.getStripeError()); + assertEquals(ApiMode.V1, exception.getStripeErrorApiMode()); + + assertEquals("parameter_unknown", exception.getCode()); + assertEquals( + "Received unknown parameter: foo; code: parameter_unknown; request-id: 1234", + exception.getMessage()); + assertEquals(error.getMessage(), exception.getUserMessage()); + } + + @Test + public void testSetStripeV2Error() throws IOException { + final String data = getResourceAsString("/api_fixtures/error_invalid_request.json"); + final JsonObject jsonObject = + ApiResource.GSON.fromJson(data, JsonObject.class).getAsJsonObject("error"); + final StripeError error = ApiResource.GSON.fromJson(jsonObject, StripeError.class); + StripeException exception = + new StripeException(error.getMessage(), "1234", error.getCode(), 400) {}; + error.setUserMessage("it broke"); + + exception.setStripeV2Error(error); + + assertNotNull(exception.getStripeError()); + assertEquals(ApiMode.V2, exception.getStripeErrorApiMode()); + + assertNotNull(error); + assertEquals("parameter_unknown", exception.getCode()); + assertEquals( + "Received unknown parameter: foo; code: parameter_unknown; request-id: 1234; user-message: it broke", + exception.getMessage()); + assertEquals("it broke", exception.getUserMessage()); + } +} diff --git a/src/test/java/com/stripe/net/HttpClientTest.java b/src/test/java/com/stripe/net/HttpClientTest.java index be97783af65..a7e679b17eb 100644 --- a/src/test/java/com/stripe/net/HttpClientTest.java +++ b/src/test/java/com/stripe/net/HttpClientTest.java @@ -9,6 +9,7 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.stripe.BaseStripeTest; +import com.stripe.Stripe; import com.stripe.exception.ApiConnectionException; import com.stripe.exception.StripeException; import java.net.ConnectException; @@ -180,4 +181,34 @@ public void testRequestWithRetriesConflictInternalServerError() throws StripeExc assertEquals(200, response.code()); assertEquals(1, response.numRetries()); } + + @Test + public void testV1RequestSetsCorrectUserAgent() throws StripeException { + StripeRequest request = + StripeRequest.create( + ApiResource.RequestMethod.GET, + "http://example.com/get", + null, + RequestOptions.builder().setApiKey("sk_test_123").setMaxNetworkRetries(2).build(), + ApiMode.V1); + + assertEquals( + HttpClient.buildUserAgentString(request), + String.format("Stripe/v1 JavaBindings/%s", Stripe.VERSION)); + } + + @Test + public void testV2RequestSetsCorrectUserAgent() throws StripeException { + StripeRequest request = + StripeRequest.create( + ApiResource.RequestMethod.GET, + "http://example.com/get", + null, + RequestOptions.builder().setApiKey("sk_test_123").setMaxNetworkRetries(2).build(), + ApiMode.V2); + + assertEquals( + HttpClient.buildUserAgentString(request), + String.format("Stripe/v2 JavaBindings/%s", Stripe.VERSION)); + } }