com.stripe.param.PaymentIntentUpdateParams Maven / Gradle / Ivy
// Generated by delombok at Fri Nov 19 19:06:03 EST 2021
// File generated from our OpenAPI spec
package com.stripe.param;
import com.google.gson.annotations.SerializedName;
import com.stripe.net.ApiRequestParams;
import com.stripe.net.ApiRequestParams.EnumParam;
import com.stripe.param.common.EmptyParam;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class PaymentIntentUpdateParams extends ApiRequestParams {
/**
* Amount intended to be collected by this PaymentIntent. A positive integer representing how much
* to charge in the smallest currency
* unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The
* minimum amount is $0.50 US or equivalent in
* charge currency. The amount value supports up to eight digits (e.g., a value of 99999999
* for a USD charge of $999,999.99).
*/
@SerializedName("amount")
Long amount;
/**
* The amount of the application fee (if any) that will be requested to be applied to the payment
* and transferred to the application owner's Stripe account. The amount of the application fee
* collected will be capped at the total payment amount. For more information, see the
* PaymentIntents use case for
* connected accounts.
*/
@SerializedName("application_fee_amount")
Object applicationFeeAmount;
/**
* Three-letter ISO currency code,
* in lowercase. Must be a supported currency.
*/
@SerializedName("currency")
Object currency;
/**
* ID of the Customer this PaymentIntent belongs to, if one exists.
*
* Payment methods attached to other Customers cannot be used with this PaymentIntent.
*
*
If present in combination with setup_future_usage,
* this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent
* has been confirmed and any required actions from the user are complete.
*/
@SerializedName("customer")
Object customer;
/**
* An arbitrary string attached to the object. Often useful for displaying to users.
*/
@SerializedName("description")
Object description;
/**
* 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;
/**
* Set of key-value pairs that you can attach
* to an object. This can be useful for storing additional information about the object in a
* structured format. Individual keys can be unset by posting an empty value to them. All keys can
* be unset by posting an empty value to {@code metadata}.
*/
@SerializedName("metadata")
Object metadata;
/**
* ID of the payment method (a PaymentMethod, Card, or compatible
* Source object) to attach to this PaymentIntent.
*/
@SerializedName("payment_method")
Object paymentMethod;
/**
* If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will
* appear in the payment_method
* property on the PaymentIntent.
*/
@SerializedName("payment_method_data")
PaymentMethodData paymentMethodData;
/**
* Payment-method-specific configuration for this PaymentIntent.
*/
@SerializedName("payment_method_options")
PaymentMethodOptions paymentMethodOptions;
/**
* The list of payment method types (e.g. card) that this PaymentIntent is allowed to use.
*/
@SerializedName("payment_method_types")
List paymentMethodTypes;
/**
* Email address that the receipt for the resulting payment will be sent to. If {@code
* receipt_email} is specified for a payment in live mode, a receipt will be sent regardless of
* your email settings.
*/
@SerializedName("receipt_email")
Object receiptEmail;
/**
* Indicates that you intend to make future payments with this PaymentIntent's payment method.
*
* Providing this parameter will attach the payment method to
* the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required
* actions from the user are complete. If no Customer was provided, the payment method can still
* be attached to a Customer
* after the transaction completes.
*
*
When processing card payments, Stripe also uses {@code setup_future_usage} to dynamically
* optimize your payment flow and comply with regional legislation and network rules, such as SCA.
*
*
If {@code setup_future_usage} is already set and you are performing a request using a
* publishable key, you may only update the value from {@code on_session} to {@code off_session}.
*/
@SerializedName("setup_future_usage")
EnumParam setupFutureUsage;
/**
* Shipping information for this PaymentIntent.
*/
@SerializedName("shipping")
Object shipping;
/**
* For non-card charges, you can use this value as the complete description that appears on your
* customers’ statements. Must contain at least one letter, maximum 22 characters.
*/
@SerializedName("statement_descriptor")
Object statementDescriptor;
/**
* Provides information about a card payment that customers see on their statements. Concatenated
* with the prefix (shortened descriptor) or statement descriptor that’s set on the account to
* form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor.
*/
@SerializedName("statement_descriptor_suffix")
Object statementDescriptorSuffix;
/**
* The parameters used to automatically create a Transfer when the payment succeeds. For more
* information, see the PaymentIntents use case for connected accounts.
*/
@SerializedName("transfer_data")
TransferData transferData;
/**
* A string that identifies the resulting payment as part of a group. {@code transfer_group} may
* only be provided if it has not been set. See the PaymentIntents use case for connected accounts
* for details.
*/
@SerializedName("transfer_group")
Object transferGroup;
private PaymentIntentUpdateParams(Long amount, Object applicationFeeAmount, Object currency, Object customer, Object description, List expand, Map extraParams, Object metadata, Object paymentMethod, PaymentMethodData paymentMethodData, PaymentMethodOptions paymentMethodOptions, List paymentMethodTypes, Object receiptEmail, EnumParam setupFutureUsage, Object shipping, Object statementDescriptor, Object statementDescriptorSuffix, TransferData transferData, Object transferGroup) {
this.amount = amount;
this.applicationFeeAmount = applicationFeeAmount;
this.currency = currency;
this.customer = customer;
this.description = description;
this.expand = expand;
this.extraParams = extraParams;
this.metadata = metadata;
this.paymentMethod = paymentMethod;
this.paymentMethodData = paymentMethodData;
this.paymentMethodOptions = paymentMethodOptions;
this.paymentMethodTypes = paymentMethodTypes;
this.receiptEmail = receiptEmail;
this.setupFutureUsage = setupFutureUsage;
this.shipping = shipping;
this.statementDescriptor = statementDescriptor;
this.statementDescriptorSuffix = statementDescriptorSuffix;
this.transferData = transferData;
this.transferGroup = transferGroup;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Long amount;
private Object applicationFeeAmount;
private Object currency;
private Object customer;
private Object description;
private List expand;
private Map extraParams;
private Object metadata;
private Object paymentMethod;
private PaymentMethodData paymentMethodData;
private PaymentMethodOptions paymentMethodOptions;
private List paymentMethodTypes;
private Object receiptEmail;
private EnumParam setupFutureUsage;
private Object shipping;
private Object statementDescriptor;
private Object statementDescriptorSuffix;
private TransferData transferData;
private Object transferGroup;
/**
* Finalize and obtain parameter instance from this builder.
*/
public PaymentIntentUpdateParams build() {
return new PaymentIntentUpdateParams(this.amount, this.applicationFeeAmount, this.currency, this.customer, this.description, this.expand, this.extraParams, this.metadata, this.paymentMethod, this.paymentMethodData, this.paymentMethodOptions, this.paymentMethodTypes, this.receiptEmail, this.setupFutureUsage, this.shipping, this.statementDescriptor, this.statementDescriptorSuffix, this.transferData, this.transferGroup);
}
/**
* Amount intended to be collected by this PaymentIntent. A positive integer representing how
* much to charge in the smallest
* currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal
* currency). The minimum amount is $0.50 US or equivalent in
* charge currency. The amount value supports up to eight digits (e.g., a value of 99999999
* for a USD charge of $999,999.99).
*/
public Builder setAmount(Long amount) {
this.amount = amount;
return this;
}
/**
* The amount of the application fee (if any) that will be requested to be applied to the
* payment and transferred to the application owner's Stripe account. The amount of the
* application fee collected will be capped at the total payment amount. For more information,
* see the PaymentIntents use case
* for connected accounts.
*/
public Builder setApplicationFeeAmount(Long applicationFeeAmount) {
this.applicationFeeAmount = applicationFeeAmount;
return this;
}
/**
* The amount of the application fee (if any) that will be requested to be applied to the
* payment and transferred to the application owner's Stripe account. The amount of the
* application fee collected will be capped at the total payment amount. For more information,
* see the PaymentIntents use case
* for connected accounts.
*/
public Builder setApplicationFeeAmount(EmptyParam applicationFeeAmount) {
this.applicationFeeAmount = applicationFeeAmount;
return this;
}
/**
* Three-letter ISO currency
* code, in lowercase. Must be a supported
* currency.
*/
public Builder setCurrency(String currency) {
this.currency = currency;
return this;
}
/**
* Three-letter ISO currency
* code, in lowercase. Must be a supported
* currency.
*/
public Builder setCurrency(EmptyParam currency) {
this.currency = currency;
return this;
}
/**
* ID of the Customer this PaymentIntent belongs to, if one exists.
*
* Payment methods attached to other Customers cannot be used with this PaymentIntent.
*
*
If present in combination with setup_future_usage,
* this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent
* has been confirmed and any required actions from the user are complete.
*/
public Builder setCustomer(String customer) {
this.customer = customer;
return this;
}
/**
* ID of the Customer this PaymentIntent belongs to, if one exists.
*
*
Payment methods attached to other Customers cannot be used with this PaymentIntent.
*
*
If present in combination with setup_future_usage,
* this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent
* has been confirmed and any required actions from the user are complete.
*/
public Builder setCustomer(EmptyParam customer) {
this.customer = customer;
return this;
}
/**
* An arbitrary string attached to the object. Often useful for displaying to users.
*/
public Builder setDescription(String description) {
this.description = description;
return this;
}
/**
* An arbitrary string attached to the object. Often useful for displaying to users.
*/
public Builder setDescription(EmptyParam description) {
this.description = description;
return this;
}
/**
* 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
* PaymentIntentUpdateParams#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
* PaymentIntentUpdateParams#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
* PaymentIntentUpdateParams#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#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 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
* PaymentIntentUpdateParams#metadata} for the field documentation.
*/
@SuppressWarnings("unchecked")
public Builder putMetadata(String key, String value) {
if (this.metadata == null || this.metadata instanceof EmptyParam) {
this.metadata = new HashMap();
}
((Map) 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 PaymentIntentUpdateParams#metadata} for the field documentation.
*/
@SuppressWarnings("unchecked")
public Builder putAllMetadata(Map map) {
if (this.metadata == null || this.metadata instanceof EmptyParam) {
this.metadata = new HashMap();
}
((Map) this.metadata).putAll(map);
return this;
}
/**
* Set of key-value pairs that you can attach
* to an object. This can be useful for storing additional information about the object in a
* structured format. Individual keys can be unset by posting an empty value to them. All keys
* can be unset by posting an empty value to {@code metadata}.
*/
public Builder setMetadata(EmptyParam metadata) {
this.metadata = metadata;
return this;
}
/**
* Set of key-value pairs that you can attach
* to an object. This can be useful for storing additional information about the object in a
* structured format. Individual keys can be unset by posting an empty value to them. All keys
* can be unset by posting an empty value to {@code metadata}.
*/
public Builder setMetadata(Map metadata) {
this.metadata = metadata;
return this;
}
/**
* ID of the payment method (a PaymentMethod, Card, or compatible
* Source object) to attach to this PaymentIntent.
*/
public Builder setPaymentMethod(String paymentMethod) {
this.paymentMethod = paymentMethod;
return this;
}
/**
* ID of the payment method (a PaymentMethod, Card, or compatible
* Source object) to attach to this PaymentIntent.
*/
public Builder setPaymentMethod(EmptyParam paymentMethod) {
this.paymentMethod = paymentMethod;
return this;
}
/**
* If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will
* appear in the payment_method
* property on the PaymentIntent.
*/
public Builder setPaymentMethodData(PaymentMethodData paymentMethodData) {
this.paymentMethodData = paymentMethodData;
return this;
}
/**
* Payment-method-specific configuration for this PaymentIntent.
*/
public Builder setPaymentMethodOptions(PaymentMethodOptions paymentMethodOptions) {
this.paymentMethodOptions = paymentMethodOptions;
return this;
}
/**
* Add an element to `paymentMethodTypes` list. A list is initialized for the first `add/addAll`
* call, and subsequent calls adds additional elements to the original list. See {@link
* PaymentIntentUpdateParams#paymentMethodTypes} for the field documentation.
*/
public Builder addPaymentMethodType(String element) {
if (this.paymentMethodTypes == null) {
this.paymentMethodTypes = new ArrayList<>();
}
this.paymentMethodTypes.add(element);
return this;
}
/**
* Add all elements to `paymentMethodTypes` list. A list is initialized for the first
* `add/addAll` call, and subsequent calls adds additional elements to the original list. See
* {@link PaymentIntentUpdateParams#paymentMethodTypes} for the field documentation.
*/
public Builder addAllPaymentMethodType(List elements) {
if (this.paymentMethodTypes == null) {
this.paymentMethodTypes = new ArrayList<>();
}
this.paymentMethodTypes.addAll(elements);
return this;
}
/**
* Email address that the receipt for the resulting payment will be sent to. If {@code
* receipt_email} is specified for a payment in live mode, a receipt will be sent regardless of
* your email settings.
*/
public Builder setReceiptEmail(String receiptEmail) {
this.receiptEmail = receiptEmail;
return this;
}
/**
* Email address that the receipt for the resulting payment will be sent to. If {@code
* receipt_email} is specified for a payment in live mode, a receipt will be sent regardless of
* your email settings.
*/
public Builder setReceiptEmail(EmptyParam receiptEmail) {
this.receiptEmail = receiptEmail;
return this;
}
/**
* Indicates that you intend to make future payments with this PaymentIntent's payment method.
*
* Providing this parameter will attach the payment method to
* the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any
* required actions from the user are complete. If no Customer was provided, the payment method
* can still be attached to a
* Customer after the transaction completes.
*
*
When processing card payments, Stripe also uses {@code setup_future_usage} to dynamically
* optimize your payment flow and comply with regional legislation and network rules, such as SCA.
*
*
If {@code setup_future_usage} is already set and you are performing a request using a
* publishable key, you may only update the value from {@code on_session} to {@code
* off_session}.
*/
public Builder setSetupFutureUsage(SetupFutureUsage setupFutureUsage) {
this.setupFutureUsage = setupFutureUsage;
return this;
}
/**
* Indicates that you intend to make future payments with this PaymentIntent's payment method.
*
*
Providing this parameter will attach the payment method to
* the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any
* required actions from the user are complete. If no Customer was provided, the payment method
* can still be attached to a
* Customer after the transaction completes.
*
*
When processing card payments, Stripe also uses {@code setup_future_usage} to dynamically
* optimize your payment flow and comply with regional legislation and network rules, such as SCA.
*
*
If {@code setup_future_usage} is already set and you are performing a request using a
* publishable key, you may only update the value from {@code on_session} to {@code
* off_session}.
*/
public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) {
this.setupFutureUsage = setupFutureUsage;
return this;
}
/**
* Shipping information for this PaymentIntent.
*/
public Builder setShipping(Shipping shipping) {
this.shipping = shipping;
return this;
}
/**
* Shipping information for this PaymentIntent.
*/
public Builder setShipping(EmptyParam shipping) {
this.shipping = shipping;
return this;
}
/**
* For non-card charges, you can use this value as the complete description that appears on your
* customers’ statements. Must contain at least one letter, maximum 22 characters.
*/
public Builder setStatementDescriptor(String statementDescriptor) {
this.statementDescriptor = statementDescriptor;
return this;
}
/**
* For non-card charges, you can use this value as the complete description that appears on your
* customers’ statements. Must contain at least one letter, maximum 22 characters.
*/
public Builder setStatementDescriptor(EmptyParam statementDescriptor) {
this.statementDescriptor = statementDescriptor;
return this;
}
/**
* Provides information about a card payment that customers see on their statements.
* Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the
* account to form the complete statement descriptor. Maximum 22 characters for the concatenated
* descriptor.
*/
public Builder setStatementDescriptorSuffix(String statementDescriptorSuffix) {
this.statementDescriptorSuffix = statementDescriptorSuffix;
return this;
}
/**
* Provides information about a card payment that customers see on their statements.
* Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the
* account to form the complete statement descriptor. Maximum 22 characters for the concatenated
* descriptor.
*/
public Builder setStatementDescriptorSuffix(EmptyParam statementDescriptorSuffix) {
this.statementDescriptorSuffix = statementDescriptorSuffix;
return this;
}
/**
* The parameters used to automatically create a Transfer when the payment succeeds. For more
* information, see the PaymentIntents use case for connected
* accounts.
*/
public Builder setTransferData(TransferData transferData) {
this.transferData = transferData;
return this;
}
/**
* A string that identifies the resulting payment as part of a group. {@code transfer_group} may
* only be provided if it has not been set. See the PaymentIntents use case for connected
* accounts for details.
*/
public Builder setTransferGroup(String transferGroup) {
this.transferGroup = transferGroup;
return this;
}
/**
* A string that identifies the resulting payment as part of a group. {@code transfer_group} may
* only be provided if it has not been set. See the PaymentIntents use case for connected
* accounts for details.
*/
public Builder setTransferGroup(EmptyParam transferGroup) {
this.transferGroup = transferGroup;
return this;
}
}
public static class PaymentMethodData {
/**
* If this is an {@code acss_debit} PaymentMethod, this hash contains details about the ACSS
* Debit payment method.
*/
@SerializedName("acss_debit")
AcssDebit acssDebit;
/**
* If this is an {@code AfterpayClearpay} PaymentMethod, this hash contains details about the
* AfterpayClearpay payment method.
*/
@SerializedName("afterpay_clearpay")
AfterpayClearpay afterpayClearpay;
/**
* If this is an {@code Alipay} PaymentMethod, this hash contains details about the Alipay
* payment method.
*/
@SerializedName("alipay")
Alipay alipay;
/**
* If this is an {@code au_becs_debit} PaymentMethod, this hash contains details about the bank
* account.
*/
@SerializedName("au_becs_debit")
AuBecsDebit auBecsDebit;
/**
* If this is a {@code bacs_debit} PaymentMethod, this hash contains details about the Bacs
* Direct Debit bank account.
*/
@SerializedName("bacs_debit")
BacsDebit bacsDebit;
/**
* If this is a {@code bancontact} PaymentMethod, this hash contains details about the
* Bancontact payment method.
*/
@SerializedName("bancontact")
Bancontact bancontact;
/**
* Billing information associated with the PaymentMethod that may be used or required by
* particular types of payment methods.
*/
@SerializedName("billing_details")
BillingDetails billingDetails;
/**
* If this is a {@code boleto} PaymentMethod, this hash contains details about the Boleto
* payment method.
*/
@SerializedName("boleto")
Boleto boleto;
/**
* If this is an {@code eps} PaymentMethod, this hash contains details about the EPS payment
* method.
*/
@SerializedName("eps")
Eps eps;
/**
* 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;
/**
* If this is an {@code fpx} PaymentMethod, this hash contains details about the FPX payment
* method.
*/
@SerializedName("fpx")
Fpx fpx;
/**
* If this is a {@code giropay} PaymentMethod, this hash contains details about the Giropay
* payment method.
*/
@SerializedName("giropay")
Giropay giropay;
/**
* If this is a {@code grabpay} PaymentMethod, this hash contains details about the GrabPay
* payment method.
*/
@SerializedName("grabpay")
Grabpay grabpay;
/**
* If this is an {@code ideal} PaymentMethod, this hash contains details about the iDEAL payment
* method.
*/
@SerializedName("ideal")
Ideal ideal;
/**
* If this is an {@code interac_present} PaymentMethod, this hash contains details about the
* Interac Present payment method.
*/
@SerializedName("interac_present")
InteracPresent interacPresent;
/**
* If this is a {@code klarna} PaymentMethod, this hash contains details about the Klarna
* payment method.
*/
@SerializedName("klarna")
Klarna klarna;
/**
* Set of key-value pairs that you can attach
* to an object. This can be useful for storing additional information about the object in a
* structured format. Individual keys can be unset by posting an empty value to them. All keys
* can be unset by posting an empty value to {@code metadata}.
*/
@SerializedName("metadata")
Map metadata;
/**
* If this is an {@code oxxo} PaymentMethod, this hash contains details about the OXXO payment
* method.
*/
@SerializedName("oxxo")
Oxxo oxxo;
/**
* If this is a {@code p24} PaymentMethod, this hash contains details about the P24 payment
* method.
*/
@SerializedName("p24")
P24 p24;
/**
* If this is a {@code sepa_debit} PaymentMethod, this hash contains details about the SEPA
* debit bank account.
*/
@SerializedName("sepa_debit")
SepaDebit sepaDebit;
/**
* If this is a {@code sofort} PaymentMethod, this hash contains details about the SOFORT
* payment method.
*/
@SerializedName("sofort")
Sofort sofort;
/**
* The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a
* name matching this value. It contains additional information specific to the PaymentMethod
* type.
*/
@SerializedName("type")
Type type;
/**
* If this is an {@code wechat_pay} PaymentMethod, this hash contains details about the
* wechat_pay payment method.
*/
@SerializedName("wechat_pay")
WechatPay wechatPay;
private PaymentMethodData(AcssDebit acssDebit, AfterpayClearpay afterpayClearpay, Alipay alipay, AuBecsDebit auBecsDebit, BacsDebit bacsDebit, Bancontact bancontact, BillingDetails billingDetails, Boleto boleto, Eps eps, Map extraParams, Fpx fpx, Giropay giropay, Grabpay grabpay, Ideal ideal, InteracPresent interacPresent, Klarna klarna, Map metadata, Oxxo oxxo, P24 p24, SepaDebit sepaDebit, Sofort sofort, Type type, WechatPay wechatPay) {
this.acssDebit = acssDebit;
this.afterpayClearpay = afterpayClearpay;
this.alipay = alipay;
this.auBecsDebit = auBecsDebit;
this.bacsDebit = bacsDebit;
this.bancontact = bancontact;
this.billingDetails = billingDetails;
this.boleto = boleto;
this.eps = eps;
this.extraParams = extraParams;
this.fpx = fpx;
this.giropay = giropay;
this.grabpay = grabpay;
this.ideal = ideal;
this.interacPresent = interacPresent;
this.klarna = klarna;
this.metadata = metadata;
this.oxxo = oxxo;
this.p24 = p24;
this.sepaDebit = sepaDebit;
this.sofort = sofort;
this.type = type;
this.wechatPay = wechatPay;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private AcssDebit acssDebit;
private AfterpayClearpay afterpayClearpay;
private Alipay alipay;
private AuBecsDebit auBecsDebit;
private BacsDebit bacsDebit;
private Bancontact bancontact;
private BillingDetails billingDetails;
private Boleto boleto;
private Eps eps;
private Map extraParams;
private Fpx fpx;
private Giropay giropay;
private Grabpay grabpay;
private Ideal ideal;
private InteracPresent interacPresent;
private Klarna klarna;
private Map metadata;
private Oxxo oxxo;
private P24 p24;
private SepaDebit sepaDebit;
private Sofort sofort;
private Type type;
private WechatPay wechatPay;
/**
* Finalize and obtain parameter instance from this builder.
*/
public PaymentMethodData build() {
return new PaymentMethodData(this.acssDebit, this.afterpayClearpay, this.alipay, this.auBecsDebit, this.bacsDebit, this.bancontact, this.billingDetails, this.boleto, this.eps, this.extraParams, this.fpx, this.giropay, this.grabpay, this.ideal, this.interacPresent, this.klarna, this.metadata, this.oxxo, this.p24, this.sepaDebit, this.sofort, this.type, this.wechatPay);
}
/**
* If this is an {@code acss_debit} PaymentMethod, this hash contains details about the ACSS
* Debit payment method.
*/
public Builder setAcssDebit(AcssDebit acssDebit) {
this.acssDebit = acssDebit;
return this;
}
/**
* If this is an {@code AfterpayClearpay} PaymentMethod, this hash contains details about the
* AfterpayClearpay payment method.
*/
public Builder setAfterpayClearpay(AfterpayClearpay afterpayClearpay) {
this.afterpayClearpay = afterpayClearpay;
return this;
}
/**
* If this is an {@code Alipay} PaymentMethod, this hash contains details about the Alipay
* payment method.
*/
public Builder setAlipay(Alipay alipay) {
this.alipay = alipay;
return this;
}
/**
* If this is an {@code au_becs_debit} PaymentMethod, this hash contains details about the
* bank account.
*/
public Builder setAuBecsDebit(AuBecsDebit auBecsDebit) {
this.auBecsDebit = auBecsDebit;
return this;
}
/**
* If this is a {@code bacs_debit} PaymentMethod, this hash contains details about the Bacs
* Direct Debit bank account.
*/
public Builder setBacsDebit(BacsDebit bacsDebit) {
this.bacsDebit = bacsDebit;
return this;
}
/**
* If this is a {@code bancontact} PaymentMethod, this hash contains details about the
* Bancontact payment method.
*/
public Builder setBancontact(Bancontact bancontact) {
this.bancontact = bancontact;
return this;
}
/**
* Billing information associated with the PaymentMethod that may be used or required by
* particular types of payment methods.
*/
public Builder setBillingDetails(BillingDetails billingDetails) {
this.billingDetails = billingDetails;
return this;
}
/**
* If this is a {@code boleto} PaymentMethod, this hash contains details about the Boleto
* payment method.
*/
public Builder setBoleto(Boleto boleto) {
this.boleto = boleto;
return this;
}
/**
* If this is an {@code eps} PaymentMethod, this hash contains details about the EPS payment
* method.
*/
public Builder setEps(Eps eps) {
this.eps = eps;
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#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#extraParams} for the field
* documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
/**
* If this is an {@code fpx} PaymentMethod, this hash contains details about the FPX payment
* method.
*/
public Builder setFpx(Fpx fpx) {
this.fpx = fpx;
return this;
}
/**
* If this is a {@code giropay} PaymentMethod, this hash contains details about the Giropay
* payment method.
*/
public Builder setGiropay(Giropay giropay) {
this.giropay = giropay;
return this;
}
/**
* If this is a {@code grabpay} PaymentMethod, this hash contains details about the GrabPay
* payment method.
*/
public Builder setGrabpay(Grabpay grabpay) {
this.grabpay = grabpay;
return this;
}
/**
* If this is an {@code ideal} PaymentMethod, this hash contains details about the iDEAL
* payment method.
*/
public Builder setIdeal(Ideal ideal) {
this.ideal = ideal;
return this;
}
/**
* If this is an {@code interac_present} PaymentMethod, this hash contains details about the
* Interac Present payment method.
*/
public Builder setInteracPresent(InteracPresent interacPresent) {
this.interacPresent = interacPresent;
return this;
}
/**
* If this is a {@code klarna} PaymentMethod, this hash contains details about the Klarna
* payment method.
*/
public Builder setKlarna(Klarna klarna) {
this.klarna = klarna;
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
* PaymentIntentUpdateParams.PaymentMethodData#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 PaymentIntentUpdateParams.PaymentMethodData#metadata} for the field
* documentation.
*/
public Builder putAllMetadata(Map map) {
if (this.metadata == null) {
this.metadata = new HashMap<>();
}
this.metadata.putAll(map);
return this;
}
/**
* If this is an {@code oxxo} PaymentMethod, this hash contains details about the OXXO payment
* method.
*/
public Builder setOxxo(Oxxo oxxo) {
this.oxxo = oxxo;
return this;
}
/**
* If this is a {@code p24} PaymentMethod, this hash contains details about the P24 payment
* method.
*/
public Builder setP24(P24 p24) {
this.p24 = p24;
return this;
}
/**
* If this is a {@code sepa_debit} PaymentMethod, this hash contains details about the SEPA
* debit bank account.
*/
public Builder setSepaDebit(SepaDebit sepaDebit) {
this.sepaDebit = sepaDebit;
return this;
}
/**
* If this is a {@code sofort} PaymentMethod, this hash contains details about the SOFORT
* payment method.
*/
public Builder setSofort(Sofort sofort) {
this.sofort = sofort;
return this;
}
/**
* The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a
* name matching this value. It contains additional information specific to the PaymentMethod
* type.
*/
public Builder setType(Type type) {
this.type = type;
return this;
}
/**
* If this is an {@code wechat_pay} PaymentMethod, this hash contains details about the
* wechat_pay payment method.
*/
public Builder setWechatPay(WechatPay wechatPay) {
this.wechatPay = wechatPay;
return this;
}
}
public static class AcssDebit {
/**
* Customer's bank account number.
*/
@SerializedName("account_number")
Object accountNumber;
/**
* 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;
/**
* Institution number of the customer's bank.
*/
@SerializedName("institution_number")
Object institutionNumber;
/**
* Transit number of the customer's bank.
*/
@SerializedName("transit_number")
Object transitNumber;
private AcssDebit(Object accountNumber, Map extraParams, Object institutionNumber, Object transitNumber) {
this.accountNumber = accountNumber;
this.extraParams = extraParams;
this.institutionNumber = institutionNumber;
this.transitNumber = transitNumber;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Object accountNumber;
private Map extraParams;
private Object institutionNumber;
private Object transitNumber;
/** Finalize and obtain parameter instance from this builder. */
public AcssDebit build() {
return new AcssDebit(this.accountNumber, this.extraParams, this.institutionNumber, this.transitNumber);
}
/** Customer's bank account number. */
public Builder setAccountNumber(String accountNumber) {
this.accountNumber = accountNumber;
return this;
}
/** Customer's bank account number. */
public Builder setAccountNumber(EmptyParam accountNumber) {
this.accountNumber = accountNumber;
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.AcssDebit#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.AcssDebit#extraParams} for
* the field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
/** Institution number of the customer's bank. */
public Builder setInstitutionNumber(String institutionNumber) {
this.institutionNumber = institutionNumber;
return this;
}
/** Institution number of the customer's bank. */
public Builder setInstitutionNumber(EmptyParam institutionNumber) {
this.institutionNumber = institutionNumber;
return this;
}
/** Transit number of the customer's bank. */
public Builder setTransitNumber(String transitNumber) {
this.transitNumber = transitNumber;
return this;
}
public Builder setTransitNumber(EmptyParam transitNumber) {
this.transitNumber = transitNumber;
return this;
}
}
/**
* Customer's bank account number.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Object getAccountNumber() {
return this.accountNumber;
}
/**
* 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.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Map getExtraParams() {
return this.extraParams;
}
/**
* Institution number of the customer's bank.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Object getInstitutionNumber() {
return this.institutionNumber;
}
/**
* Transit number of the customer's bank.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Object getTransitNumber() {
return this.transitNumber;
}
}
/**
* Transit number of the customer's bank.
*/
public static class AfterpayClearpay {
/**
* 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 AfterpayClearpay(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 AfterpayClearpay build() {
return new AfterpayClearpay(this.extraParams);
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentUpdateParams.PaymentMethodData.AfterpayClearpay#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;
}
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
}
/**
* 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.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Map getExtraParams() {
return this.extraParams;
}
}
/**
* Add all map key/value pairs to `extraParams` map. 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.AfterpayClearpay#extraParams}
* for the field documentation.
*/
public static class Alipay {
/**
* 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 Alipay(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 Alipay build() {
return new Alipay(this.extraParams);
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Alipay#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;
}
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
}
/**
* 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.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Map getExtraParams() {
return this.extraParams;
}
}
/**
* Add all map key/value pairs to `extraParams` map. 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.Alipay#extraParams} for the
* field documentation.
*/
public static class AuBecsDebit {
/**
* The account number for the bank account.
*/
@SerializedName("account_number")
Object accountNumber;
/**
* Bank-State-Branch number of the bank account.
*/
@SerializedName("bsb_number")
Object bsbNumber;
/**
* 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 AuBecsDebit(Object accountNumber, Object bsbNumber, Map extraParams) {
this.accountNumber = accountNumber;
this.bsbNumber = bsbNumber;
this.extraParams = extraParams;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Object accountNumber;
private Object bsbNumber;
private Map extraParams;
/** Finalize and obtain parameter instance from this builder. */
public AuBecsDebit build() {
return new AuBecsDebit(this.accountNumber, this.bsbNumber, this.extraParams);
}
/** The account number for the bank account. */
public Builder setAccountNumber(String accountNumber) {
this.accountNumber = accountNumber;
return this;
}
/** The account number for the bank account. */
public Builder setAccountNumber(EmptyParam accountNumber) {
this.accountNumber = accountNumber;
return this;
}
/** Bank-State-Branch number of the bank account. */
public Builder setBsbNumber(String bsbNumber) {
this.bsbNumber = bsbNumber;
return this;
}
/** Bank-State-Branch number of the bank account. */
public Builder setBsbNumber(EmptyParam bsbNumber) {
this.bsbNumber = bsbNumber;
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.AuBecsDebit#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;
}
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
}
/**
* The account number for the bank account.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Object getAccountNumber() {
return this.accountNumber;
}
/**
* Bank-State-Branch number of the bank account.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Object getBsbNumber() {
return this.bsbNumber;
}
/**
* 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.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Map getExtraParams() {
return this.extraParams;
}
}
/**
* Add all map key/value pairs to `extraParams` map. 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.AuBecsDebit#extraParams} for
* the field documentation.
*/
public static class BacsDebit {
/**
* Account number of the bank account that the funds will be debited from.
*/
@SerializedName("account_number")
Object accountNumber;
/**
* 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;
/**
* Sort code of the bank account. (e.g., {@code 10-20-30})
*/
@SerializedName("sort_code")
Object sortCode;
private BacsDebit(Object accountNumber, Map extraParams, Object sortCode) {
this.accountNumber = accountNumber;
this.extraParams = extraParams;
this.sortCode = sortCode;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Object accountNumber;
private Map extraParams;
private Object sortCode;
/** Finalize and obtain parameter instance from this builder. */
public BacsDebit build() {
return new BacsDebit(this.accountNumber, this.extraParams, this.sortCode);
}
/** Account number of the bank account that the funds will be debited from. */
public Builder setAccountNumber(String accountNumber) {
this.accountNumber = accountNumber;
return this;
}
/** Account number of the bank account that the funds will be debited from. */
public Builder setAccountNumber(EmptyParam accountNumber) {
this.accountNumber = accountNumber;
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.BacsDebit#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.BacsDebit#extraParams} for
* the field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
/** Sort code of the bank account. (e.g., {@code 10-20-30}) */
public Builder setSortCode(String sortCode) {
this.sortCode = sortCode;
return this;
}
public Builder setSortCode(EmptyParam sortCode) {
this.sortCode = sortCode;
return this;
}
}
/**
* Account number of the bank account that the funds will be debited from.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Object getAccountNumber() {
return this.accountNumber;
}
/**
* 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.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Map getExtraParams() {
return this.extraParams;
}
/**
* Sort code of the bank account. (e.g., {@code 10-20-30})
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Object getSortCode() {
return this.sortCode;
}
}
/**
* Sort code of the bank account. (e.g., {@code 10-20-30})
*/
public static class Bancontact {
/**
* 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 Bancontact(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 Bancontact build() {
return new Bancontact(this.extraParams);
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Bancontact#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;
}
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
}
/**
* 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.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Map getExtraParams() {
return this.extraParams;
}
}
/**
* Add all map key/value pairs to `extraParams` map. 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.Bancontact#extraParams} for
* the field documentation.
*/
public static class BillingDetails {
/**
* Billing address.
*/
@SerializedName("address")
Object address;
/**
* Email address.
*/
@SerializedName("email")
Object email;
/**
* 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;
/**
* Full name.
*/
@SerializedName("name")
Object name;
/**
* Billing phone number (including extension).
*/
@SerializedName("phone")
Object phone;
private BillingDetails(Object address, Object email, Map extraParams, Object name, Object phone) {
this.address = address;
this.email = email;
this.extraParams = extraParams;
this.name = name;
this.phone = phone;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Object address;
private Object email;
private Map extraParams;
private Object name;
private Object phone;
/**
* Finalize and obtain parameter instance from this builder.
*/
public BillingDetails build() {
return new BillingDetails(this.address, this.email, this.extraParams, this.name, this.phone);
}
/**
* Billing address.
*/
public Builder setAddress(Address address) {
this.address = address;
return this;
}
/**
* Billing address.
*/
public Builder setAddress(EmptyParam address) {
this.address = address;
return this;
}
/**
* Email address.
*/
public Builder setEmail(String email) {
this.email = email;
return this;
}
/**
* Email address.
*/
public Builder setEmail(EmptyParam email) {
this.email = email;
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.BillingDetails#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.BillingDetails#extraParams}
* for the field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
/**
* Full name.
*/
public Builder setName(String name) {
this.name = name;
return this;
}
/**
* Full name.
*/
public Builder setName(EmptyParam name) {
this.name = name;
return this;
}
/**
* Billing phone number (including extension).
*/
public Builder setPhone(String phone) {
this.phone = phone;
return this;
}
/**
* Billing phone number (including extension).
*/
public Builder setPhone(EmptyParam phone) {
this.phone = phone;
return this;
}
}
public static class Address {
/** City, district, suburb, town, or village. */
@SerializedName("city")
Object city;
/**
* Two-letter country code (ISO
* 3166-1 alpha-2).
*/
@SerializedName("country")
Object country;
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
* Instead, each key/value pair is serialized as if the key is a root-level field
* (serialized) name in this param object. Effectively, this map is flattened to its parent
* instance.
*/
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
/** Address line 1 (e.g., street, PO Box, or company name). */
@SerializedName("line1")
Object line1;
/** Address line 2 (e.g., apartment, suite, unit, or building). */
@SerializedName("line2")
Object line2;
/** ZIP or postal code. */
@SerializedName("postal_code")
Object postalCode;
/** State, county, province, or region. */
@SerializedName("state")
Object state;
private Address(Object city, Object country, Map extraParams, Object line1, Object line2, Object postalCode, Object state) {
this.city = city;
this.country = country;
this.extraParams = extraParams;
this.line1 = line1;
this.line2 = line2;
this.postalCode = postalCode;
this.state = state;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Object city;
private Object country;
private Map extraParams;
private Object line1;
private Object line2;
private Object postalCode;
private Object state;
/** Finalize and obtain parameter instance from this builder. */
public Address build() {
return new Address(this.city, this.country, this.extraParams, this.line1, this.line2, this.postalCode, this.state);
}
/** City, district, suburb, town, or village. */
public Builder setCity(String city) {
this.city = city;
return this;
}
/** City, district, suburb, town, or village. */
public Builder setCity(EmptyParam city) {
this.city = city;
return this;
}
/**
* Two-letter country code (ISO
* 3166-1 alpha-2).
*/
public Builder setCountry(String country) {
this.country = country;
return this;
}
/**
* Two-letter country code (ISO
* 3166-1 alpha-2).
*/
public Builder setCountry(EmptyParam country) {
this.country = country;
return this;
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link
* PaymentIntentUpdateParams.PaymentMethodData.BillingDetails.Address#extraParams} for the
* field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link
* PaymentIntentUpdateParams.PaymentMethodData.BillingDetails.Address#extraParams} for the
* field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
/** Address line 1 (e.g., street, PO Box, or company name). */
public Builder setLine1(String line1) {
this.line1 = line1;
return this;
}
/** Address line 1 (e.g., street, PO Box, or company name). */
public Builder setLine1(EmptyParam line1) {
this.line1 = line1;
return this;
}
/** Address line 2 (e.g., apartment, suite, unit, or building). */
public Builder setLine2(String line2) {
this.line2 = line2;
return this;
}
/** Address line 2 (e.g., apartment, suite, unit, or building). */
public Builder setLine2(EmptyParam line2) {
this.line2 = line2;
return this;
}
/** ZIP or postal code. */
public Builder setPostalCode(String postalCode) {
this.postalCode = postalCode;
return this;
}
/** ZIP or postal code. */
public Builder setPostalCode(EmptyParam postalCode) {
this.postalCode = postalCode;
return this;
}
/** State, county, province, or region. */
public Builder setState(String state) {
this.state = state;
return this;
}
public Builder setState(EmptyParam state) {
this.state = state;
return this;
}
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Object getCity() {
return this.city;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Object getCountry() {
return this.country;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Map getExtraParams() {
return this.extraParams;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Object getLine1() {
return this.line1;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Object getLine2() {
return this.line2;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Object getPostalCode() {
return this.postalCode;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Object getState() {
return this.state;
}
}
/**
* Billing address.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Object getAddress() {
return this.address;
}
/**
* Email address.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Object getEmail() {
return this.email;
}
/**
* 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.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Map getExtraParams() {
return this.extraParams;
}
/**
* Full name.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Object getName() {
return this.name;
}
/**
* Billing phone number (including extension).
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Object getPhone() {
return this.phone;
}
}
/**
* State, county, province, or region.
*/
public static class Boleto {
/**
* 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 tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers).
*/
@SerializedName("tax_id")
Object taxId;
private Boleto(Map extraParams, Object taxId) {
this.extraParams = extraParams;
this.taxId = taxId;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Map extraParams;
private Object taxId;
/** Finalize and obtain parameter instance from this builder. */
public Boleto build() {
return new Boleto(this.extraParams, this.taxId);
}
/**
* Add a key/value pair to `extraParams` map. 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.Boleto#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.Boleto#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 tax ID of the customer (CPF for individual consumers or CNPJ for businesses
* consumers).
*/
public Builder setTaxId(String taxId) {
this.taxId = taxId;
return this;
}
public Builder setTaxId(EmptyParam taxId) {
this.taxId = taxId;
return this;
}
}
/**
* 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.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Map getExtraParams() {
return this.extraParams;
}
/**
* The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers).
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Object getTaxId() {
return this.taxId;
}
}
/**
* The tax ID of the customer (CPF for individual consumers or CNPJ for businesses
* consumers).
*/
public static class Eps {
/**
* The customer's bank.
*/
@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 Eps(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 Eps build() {
return new Eps(this.bank, this.extraParams);
}
/**
* The customer's bank.
*/
public Builder setBank(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.Eps#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.Eps#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("arzte_und_apotheker_bank")
ARZTE_UND_APOTHEKER_BANK("arzte_und_apotheker_bank"), @SerializedName("austrian_anadi_bank_ag")
AUSTRIAN_ANADI_BANK_AG("austrian_anadi_bank_ag"), @SerializedName("bank_austria")
BANK_AUSTRIA("bank_austria"), @SerializedName("bankhaus_carl_spangler")
BANKHAUS_CARL_SPANGLER("bankhaus_carl_spangler"), @SerializedName("bankhaus_schelhammer_und_schattera_ag")
BANKHAUS_SCHELHAMMER_UND_SCHATTERA_AG("bankhaus_schelhammer_und_schattera_ag"), @SerializedName("bawag_psk_ag")
BAWAG_PSK_AG("bawag_psk_ag"), @SerializedName("bks_bank_ag")
BKS_BANK_AG("bks_bank_ag"), @SerializedName("brull_kallmus_bank_ag")
BRULL_KALLMUS_BANK_AG("brull_kallmus_bank_ag"), @SerializedName("btv_vier_lander_bank")
BTV_VIER_LANDER_BANK("btv_vier_lander_bank"), @SerializedName("capital_bank_grawe_gruppe_ag")
CAPITAL_BANK_GRAWE_GRUPPE_AG("capital_bank_grawe_gruppe_ag"), @SerializedName("dolomitenbank")
DOLOMITENBANK("dolomitenbank"), @SerializedName("easybank_ag")
EASYBANK_AG("easybank_ag"), @SerializedName("erste_bank_und_sparkassen")
ERSTE_BANK_UND_SPARKASSEN("erste_bank_und_sparkassen"), @SerializedName("hypo_alpeadriabank_international_ag")
HYPO_ALPEADRIABANK_INTERNATIONAL_AG("hypo_alpeadriabank_international_ag"), @SerializedName("hypo_bank_burgenland_aktiengesellschaft")
HYPO_BANK_BURGENLAND_AKTIENGESELLSCHAFT("hypo_bank_burgenland_aktiengesellschaft"), @SerializedName("hypo_noe_lb_fur_niederosterreich_u_wien")
HYPO_NOE_LB_FUR_NIEDEROSTERREICH_U_WIEN("hypo_noe_lb_fur_niederosterreich_u_wien"), @SerializedName("hypo_oberosterreich_salzburg_steiermark")
HYPO_OBEROSTERREICH_SALZBURG_STEIERMARK("hypo_oberosterreich_salzburg_steiermark"), @SerializedName("hypo_tirol_bank_ag")
HYPO_TIROL_BANK_AG("hypo_tirol_bank_ag"), @SerializedName("hypo_vorarlberg_bank_ag")
HYPO_VORARLBERG_BANK_AG("hypo_vorarlberg_bank_ag"), @SerializedName("marchfelder_bank")
MARCHFELDER_BANK("marchfelder_bank"), @SerializedName("oberbank_ag")
OBERBANK_AG("oberbank_ag"), @SerializedName("raiffeisen_bankengruppe_osterreich")
RAIFFEISEN_BANKENGRUPPE_OSTERREICH("raiffeisen_bankengruppe_osterreich"), @SerializedName("schoellerbank_ag")
SCHOELLERBANK_AG("schoellerbank_ag"), @SerializedName("sparda_bank_wien")
SPARDA_BANK_WIEN("sparda_bank_wien"), @SerializedName("volksbank_gruppe")
VOLKSBANK_GRUPPE("volksbank_gruppe"), @SerializedName("volkskreditbank_ag")
VOLKSKREDITBANK_AG("volkskreditbank_ag"), @SerializedName("vr_bank_braunau")
VR_BANK_BRAUNAU("vr_bank_braunau");
private final String value;
Bank(String value) {
this.value = value;
}
@Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public String getValue() {
return this.value;
}
}
/**
* The customer's bank.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Bank getBank() {
return this.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.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Map getExtraParams() {
return this.extraParams;
}
}
public static class Fpx {
/**
* Account holder type for FPX transaction.
*/
@SerializedName("account_holder_type")
AccountHolderType accountHolderType;
/**
* The customer's bank.
*/
@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 Fpx(AccountHolderType accountHolderType, Bank bank, Map extraParams) {
this.accountHolderType = accountHolderType;
this.bank = bank;
this.extraParams = extraParams;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private AccountHolderType accountHolderType;
private Bank bank;
private Map extraParams;
/**
* Finalize and obtain parameter instance from this builder.
*/
public Fpx build() {
return new Fpx(this.accountHolderType, this.bank, this.extraParams);
}
/**
* Account holder type for FPX transaction.
*/
public Builder setAccountHolderType(AccountHolderType accountHolderType) {
this.accountHolderType = accountHolderType;
return this;
}
/**
* The customer's bank.
*/
public Builder setBank(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.Fpx#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.Fpx#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 AccountHolderType implements ApiRequestParams.EnumParam {
@SerializedName("company")
COMPANY("company"), @SerializedName("individual")
INDIVIDUAL("individual");
private final String value;
AccountHolderType(String value) {
this.value = value;
}
@Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public String getValue() {
return this.value;
}
}
public enum Bank implements ApiRequestParams.EnumParam {
@SerializedName("affin_bank")
AFFIN_BANK("affin_bank"), @SerializedName("agrobank")
AGROBANK("agrobank"), @SerializedName("alliance_bank")
ALLIANCE_BANK("alliance_bank"), @SerializedName("ambank")
AMBANK("ambank"), @SerializedName("bank_islam")
BANK_ISLAM("bank_islam"), @SerializedName("bank_muamalat")
BANK_MUAMALAT("bank_muamalat"), @SerializedName("bank_rakyat")
BANK_RAKYAT("bank_rakyat"), @SerializedName("bsn")
BSN("bsn"), @SerializedName("cimb")
CIMB("cimb"), @SerializedName("deutsche_bank")
DEUTSCHE_BANK("deutsche_bank"), @SerializedName("hong_leong_bank")
HONG_LEONG_BANK("hong_leong_bank"), @SerializedName("hsbc")
HSBC("hsbc"), @SerializedName("kfh")
KFH("kfh"), @SerializedName("maybank2e")
MAYBANK2E("maybank2e"), @SerializedName("maybank2u")
MAYBANK2U("maybank2u"), @SerializedName("ocbc")
OCBC("ocbc"), @SerializedName("pb_enterprise")
PB_ENTERPRISE("pb_enterprise"), @SerializedName("public_bank")
PUBLIC_BANK("public_bank"), @SerializedName("rhb")
RHB("rhb"), @SerializedName("standard_chartered")
STANDARD_CHARTERED("standard_chartered"), @SerializedName("uob")
UOB("uob");
private final String value;
Bank(String value) {
this.value = value;
}
@Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public String getValue() {
return this.value;
}
}
/**
* Account holder type for FPX transaction.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public AccountHolderType getAccountHolderType() {
return this.accountHolderType;
}
/**
* The customer's bank.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Bank getBank() {
return this.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.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Map getExtraParams() {
return this.extraParams;
}
}
public static class Giropay {
/**
* 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 Giropay(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 Giropay build() {
return new Giropay(this.extraParams);
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Giropay#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;
}
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
}
/**
* 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.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Map getExtraParams() {
return this.extraParams;
}
}
/**
* Add all map key/value pairs to `extraParams` map. 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.Giropay#extraParams} for the
* field documentation.
*/
public static class Grabpay {
/**
* 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 Grabpay(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 Grabpay build() {
return new Grabpay(this.extraParams);
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Grabpay#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;
}
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
}
/**
* 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.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Map getExtraParams() {
return this.extraParams;
}
}
/**
* Add all map key/value pairs to `extraParams` map. 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.Grabpay#extraParams} for the
* field documentation.
*/
public static class Ideal {
/**
* The customer's bank.
*/
@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 Ideal(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 Ideal build() {
return new Ideal(this.bank, this.extraParams);
}
/**
* The customer's bank.
*/
public Builder setBank(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.Ideal#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.Ideal#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("abn_amro")
ABN_AMRO("abn_amro"), @SerializedName("asn_bank")
ASN_BANK("asn_bank"), @SerializedName("bunq")
BUNQ("bunq"), @SerializedName("handelsbanken")
HANDELSBANKEN("handelsbanken"), @SerializedName("ing")
ING("ing"), @SerializedName("knab")
KNAB("knab"), @SerializedName("moneyou")
MONEYOU("moneyou"), @SerializedName("rabobank")
RABOBANK("rabobank"), @SerializedName("regiobank")
REGIOBANK("regiobank"), @SerializedName("revolut")
REVOLUT("revolut"), @SerializedName("sns_bank")
SNS_BANK("sns_bank"), @SerializedName("triodos_bank")
TRIODOS_BANK("triodos_bank"), @SerializedName("van_lanschot")
VAN_LANSCHOT("van_lanschot");
private final String value;
Bank(String value) {
this.value = value;
}
@Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public String getValue() {
return this.value;
}
}
/**
* The customer's bank.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Bank getBank() {
return this.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.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Map getExtraParams() {
return this.extraParams;
}
}
public static class InteracPresent {
/**
* 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 InteracPresent(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 InteracPresent build() {
return new InteracPresent(this.extraParams);
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentUpdateParams.PaymentMethodData.InteracPresent#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;
}
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
}
/**
* 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.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Map getExtraParams() {
return this.extraParams;
}
}
/**
* Add all map key/value pairs to `extraParams` map. 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.InteracPresent#extraParams}
* for the field documentation.
*/
public static class Klarna {
/**
* Customer's date of birth.
*/
@SerializedName("dob")
Dob dob;
/**
* 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 Klarna(Dob dob, Map extraParams) {
this.dob = dob;
this.extraParams = extraParams;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Dob dob;
private Map extraParams;
/**
* Finalize and obtain parameter instance from this builder.
*/
public Klarna build() {
return new Klarna(this.dob, this.extraParams);
}
/**
* Customer's date of birth.
*/
public Builder setDob(Dob dob) {
this.dob = dob;
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.Klarna#extraParams} for the
* field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Klarna#extraParams} for the
* field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
}
public static class Dob {
/** The day of birth, between 1 and 31. */
@SerializedName("day")
Long day;
/**
* 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 month of birth, between 1 and 12. */
@SerializedName("month")
Long month;
/** The four-digit year of birth. */
@SerializedName("year")
Long year;
private Dob(Long day, Map extraParams, Long month, Long year) {
this.day = day;
this.extraParams = extraParams;
this.month = month;
this.year = year;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Long day;
private Map extraParams;
private Long month;
private Long year;
/** Finalize and obtain parameter instance from this builder. */
public Dob build() {
return new Dob(this.day, this.extraParams, this.month, this.year);
}
/** The day of birth, between 1 and 31. */
public Builder setDay(Long day) {
this.day = day;
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.Klarna.Dob#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.Klarna.Dob#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 month of birth, between 1 and 12. */
public Builder setMonth(Long month) {
this.month = month;
return this;
}
public Builder setYear(Long year) {
this.year = year;
return this;
}
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Long getDay() {
return this.day;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Map getExtraParams() {
return this.extraParams;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Long getMonth() {
return this.month;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Long getYear() {
return this.year;
}
}
/**
* Customer's date of birth.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Dob getDob() {
return this.dob;
}
/**
* 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.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Map getExtraParams() {
return this.extraParams;
}
}
/**
* The four-digit year of birth.
*/
public static class Oxxo {
/**
* 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(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 Oxxo build() {
return new Oxxo(this.extraParams);
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentUpdateParams.PaymentMethodData.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;
}
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
}
/**
* 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.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Map getExtraParams() {
return this.extraParams;
}
}
/**
* Add all map key/value pairs to `extraParams` map. 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.Oxxo#extraParams} for the
* field documentation.
*/
public static class P24 {
/**
* The customer's bank.
*/
@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 P24(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 P24 build() {
return new P24(this.bank, this.extraParams);
}
/**
* The customer's bank.
*/
public Builder setBank(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.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 PaymentIntentUpdateParams.PaymentMethodData.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;
}
}
public enum Bank implements ApiRequestParams.EnumParam {
@SerializedName("alior_bank")
ALIOR_BANK("alior_bank"), @SerializedName("bank_millennium")
BANK_MILLENNIUM("bank_millennium"), @SerializedName("bank_nowy_bfg_sa")
BANK_NOWY_BFG_SA("bank_nowy_bfg_sa"), @SerializedName("bank_pekao_sa")
BANK_PEKAO_SA("bank_pekao_sa"), @SerializedName("banki_spbdzielcze")
BANKI_SPBDZIELCZE("banki_spbdzielcze"), @SerializedName("blik")
BLIK("blik"), @SerializedName("bnp_paribas")
BNP_PARIBAS("bnp_paribas"), @SerializedName("boz")
BOZ("boz"), @SerializedName("citi_handlowy")
CITI_HANDLOWY("citi_handlowy"), @SerializedName("credit_agricole")
CREDIT_AGRICOLE("credit_agricole"), @SerializedName("envelobank")
ENVELOBANK("envelobank"), @SerializedName("etransfer_pocztowy24")
ETRANSFER_POCZTOWY24("etransfer_pocztowy24"), @SerializedName("getin_bank")
GETIN_BANK("getin_bank"), @SerializedName("ideabank")
IDEABANK("ideabank"), @SerializedName("ing")
ING("ing"), @SerializedName("inteligo")
INTELIGO("inteligo"), @SerializedName("mbank_mtransfer")
MBANK_MTRANSFER("mbank_mtransfer"), @SerializedName("nest_przelew")
NEST_PRZELEW("nest_przelew"), @SerializedName("noble_pay")
NOBLE_PAY("noble_pay"), @SerializedName("pbac_z_ipko")
PBAC_Z_IPKO("pbac_z_ipko"), @SerializedName("plus_bank")
PLUS_BANK("plus_bank"), @SerializedName("santander_przelew24")
SANTANDER_PRZELEW24("santander_przelew24"), @SerializedName("tmobile_usbugi_bankowe")
TMOBILE_USBUGI_BANKOWE("tmobile_usbugi_bankowe"), @SerializedName("toyota_bank")
TOYOTA_BANK("toyota_bank"), @SerializedName("volkswagen_bank")
VOLKSWAGEN_BANK("volkswagen_bank");
private final String value;
Bank(String value) {
this.value = value;
}
@Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public String getValue() {
return this.value;
}
}
/**
* The customer's bank.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Bank getBank() {
return this.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.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Map getExtraParams() {
return this.extraParams;
}
}
public static class SepaDebit {
/**
* 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;
/**
* IBAN of the bank account.
*/
@SerializedName("iban")
Object iban;
private SepaDebit(Map extraParams, Object iban) {
this.extraParams = extraParams;
this.iban = iban;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Map extraParams;
private Object iban;
/** Finalize and obtain parameter instance from this builder. */
public SepaDebit build() {
return new SepaDebit(this.extraParams, this.iban);
}
/**
* Add a key/value pair to `extraParams` map. 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.SepaDebit#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.SepaDebit#extraParams} for
* the field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
/** IBAN of the bank account. */
public Builder setIban(String iban) {
this.iban = iban;
return this;
}
public Builder setIban(EmptyParam iban) {
this.iban = iban;
return this;
}
}
/**
* 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.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Map getExtraParams() {
return this.extraParams;
}
/**
* IBAN of the bank account.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Object getIban() {
return this.iban;
}
}
/**
* IBAN of the bank account.
*/
public static class Sofort {
/**
* Two-letter ISO code representing the country the bank account is located in.
*/
@SerializedName("country")
Country country;
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
* Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
* name in this param object. Effectively, this map is flattened to its parent instance.
*/
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
private Sofort(Country country, Map extraParams) {
this.country = country;
this.extraParams = extraParams;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Country country;
private Map extraParams;
/**
* Finalize and obtain parameter instance from this builder.
*/
public Sofort build() {
return new Sofort(this.country, this.extraParams);
}
/**
* Two-letter ISO code representing the country the bank account is located in.
*/
public Builder setCountry(Country country) {
this.country = country;
return this;
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Sofort#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.Sofort#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 Country implements ApiRequestParams.EnumParam {
@SerializedName("AT")
AT("AT"), @SerializedName("BE")
BE("BE"), @SerializedName("DE")
DE("DE"), @SerializedName("ES")
ES("ES"), @SerializedName("IT")
IT("IT"), @SerializedName("NL")
NL("NL");
private final String value;
Country(String value) {
this.value = value;
}
@Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public String getValue() {
return this.value;
}
}
/**
* Two-letter ISO code representing the country the bank account is located in.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Country getCountry() {
return this.country;
}
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
* Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
* name in this param object. Effectively, this map is flattened to its parent instance.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Map getExtraParams() {
return this.extraParams;
}
}
public static class WechatPay {
/**
* 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 WechatPay(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 WechatPay build() {
return new WechatPay(this.extraParams);
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentUpdateParams.PaymentMethodData.WechatPay#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;
}
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
}
/**
* 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.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Map getExtraParams() {
return this.extraParams;
}
}
/**
* Add all map key/value pairs to `extraParams` map. 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.WechatPay#extraParams} for
* the field documentation.
*/
public enum Type implements ApiRequestParams.EnumParam {
@SerializedName("acss_debit")
ACSS_DEBIT("acss_debit"), @SerializedName("afterpay_clearpay")
AFTERPAY_CLEARPAY("afterpay_clearpay"), @SerializedName("alipay")
ALIPAY("alipay"), @SerializedName("au_becs_debit")
AU_BECS_DEBIT("au_becs_debit"), @SerializedName("bacs_debit")
BACS_DEBIT("bacs_debit"), @SerializedName("bancontact")
BANCONTACT("bancontact"), @SerializedName("boleto")
BOLETO("boleto"), @SerializedName("eps")
EPS("eps"), @SerializedName("fpx")
FPX("fpx"), @SerializedName("giropay")
GIROPAY("giropay"), @SerializedName("grabpay")
GRABPAY("grabpay"), @SerializedName("ideal")
IDEAL("ideal"), @SerializedName("klarna")
KLARNA("klarna"), @SerializedName("oxxo")
OXXO("oxxo"), @SerializedName("p24")
P24("p24"), @SerializedName("sepa_debit")
SEPA_DEBIT("sepa_debit"), @SerializedName("sofort")
SOFORT("sofort"), @SerializedName("wechat_pay")
WECHAT_PAY("wechat_pay");
private final String value;
Type(String value) {
this.value = value;
}
@Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public String getValue() {
return this.value;
}
}
/**
* If this is an {@code acss_debit} PaymentMethod, this hash contains details about the ACSS
* Debit payment method.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public AcssDebit getAcssDebit() {
return this.acssDebit;
}
/**
* If this is an {@code AfterpayClearpay} PaymentMethod, this hash contains details about the
* AfterpayClearpay payment method.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public AfterpayClearpay getAfterpayClearpay() {
return this.afterpayClearpay;
}
/**
* If this is an {@code Alipay} PaymentMethod, this hash contains details about the Alipay
* payment method.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Alipay getAlipay() {
return this.alipay;
}
/**
* If this is an {@code au_becs_debit} PaymentMethod, this hash contains details about the bank
* account.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public AuBecsDebit getAuBecsDebit() {
return this.auBecsDebit;
}
/**
* If this is a {@code bacs_debit} PaymentMethod, this hash contains details about the Bacs
* Direct Debit bank account.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public BacsDebit getBacsDebit() {
return this.bacsDebit;
}
/**
* If this is a {@code bancontact} PaymentMethod, this hash contains details about the
* Bancontact payment method.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Bancontact getBancontact() {
return this.bancontact;
}
/**
* Billing information associated with the PaymentMethod that may be used or required by
* particular types of payment methods.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public BillingDetails getBillingDetails() {
return this.billingDetails;
}
/**
* If this is a {@code boleto} PaymentMethod, this hash contains details about the Boleto
* payment method.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Boleto getBoleto() {
return this.boleto;
}
/**
* If this is an {@code eps} PaymentMethod, this hash contains details about the EPS payment
* method.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Eps getEps() {
return this.eps;
}
/**
* 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.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Map getExtraParams() {
return this.extraParams;
}
/**
* If this is an {@code fpx} PaymentMethod, this hash contains details about the FPX payment
* method.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Fpx getFpx() {
return this.fpx;
}
/**
* If this is a {@code giropay} PaymentMethod, this hash contains details about the Giropay
* payment method.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Giropay getGiropay() {
return this.giropay;
}
/**
* If this is a {@code grabpay} PaymentMethod, this hash contains details about the GrabPay
* payment method.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Grabpay getGrabpay() {
return this.grabpay;
}
/**
* If this is an {@code ideal} PaymentMethod, this hash contains details about the iDEAL payment
* method.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Ideal getIdeal() {
return this.ideal;
}
/**
* If this is an {@code interac_present} PaymentMethod, this hash contains details about the
* Interac Present payment method.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public InteracPresent getInteracPresent() {
return this.interacPresent;
}
/**
* If this is a {@code klarna} PaymentMethod, this hash contains details about the Klarna
* payment method.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Klarna getKlarna() {
return this.klarna;
}
/**
* Set of key-value pairs that you can attach
* to an object. This can be useful for storing additional information about the object in a
* structured format. Individual keys can be unset by posting an empty value to them. All keys
* can be unset by posting an empty value to {@code metadata}.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Map getMetadata() {
return this.metadata;
}
/**
* If this is an {@code oxxo} PaymentMethod, this hash contains details about the OXXO payment
* method.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Oxxo getOxxo() {
return this.oxxo;
}
/**
* If this is a {@code p24} PaymentMethod, this hash contains details about the P24 payment
* method.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public P24 getP24() {
return this.p24;
}
/**
* If this is a {@code sepa_debit} PaymentMethod, this hash contains details about the SEPA
* debit bank account.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public SepaDebit getSepaDebit() {
return this.sepaDebit;
}
/**
* If this is a {@code sofort} PaymentMethod, this hash contains details about the SOFORT
* payment method.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Sofort getSofort() {
return this.sofort;
}
/**
* The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a
* name matching this value. It contains additional information specific to the PaymentMethod
* type.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Type getType() {
return this.type;
}
/**
* If this is an {@code wechat_pay} PaymentMethod, this hash contains details about the
* wechat_pay payment method.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public WechatPay getWechatPay() {
return this.wechatPay;
}
}
public static class PaymentMethodOptions {
/**
* If this is a {@code acss_debit} PaymentMethod, this sub-hash contains details about the ACSS
* Debit payment method options.
*/
@SerializedName("acss_debit")
Object acssDebit;
/**
* If this is a {@code afterpay_clearpay} PaymentMethod, this sub-hash contains details about
* the Afterpay Clearpay payment method options.
*/
@SerializedName("afterpay_clearpay")
Object afterpayClearpay;
/**
* If this is a {@code alipay} PaymentMethod, this sub-hash contains details about the Alipay
* payment method options.
*/
@SerializedName("alipay")
Object alipay;
/**
* If this is a {@code bancontact} PaymentMethod, this sub-hash contains details about the
* Bancontact payment method options.
*/
@SerializedName("bancontact")
Object bancontact;
/**
* If this is a {@code boleto} PaymentMethod, this sub-hash contains details about the Boleto
* payment method options.
*/
@SerializedName("boleto")
Object boleto;
/**
* Configuration for any card payments attempted on this PaymentIntent.
*/
@SerializedName("card")
Object card;
/**
* If this is a {@code card_present} PaymentMethod, this sub-hash contains details about the
* Card Present payment method options.
*/
@SerializedName("card_present")
Object cardPresent;
/**
* 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;
/**
* If this is a {@code ideal} PaymentMethod, this sub-hash contains details about the Ideal
* payment method options.
*/
@SerializedName("ideal")
Object ideal;
/**
* If this is a {@code interac_present} PaymentMethod, this sub-hash contains details about the
* Card Present payment method options.
*/
@SerializedName("interac_present")
Object interacPresent;
/**
* If this is a {@code klarna} PaymentMethod, this sub-hash contains details about the Klarna
* payment method options.
*/
@SerializedName("klarna")
Object klarna;
/**
* If this is a {@code oxxo} PaymentMethod, this sub-hash contains details about the OXXO
* payment method options.
*/
@SerializedName("oxxo")
Object oxxo;
/**
* If this is a {@code p24} PaymentMethod, this sub-hash contains details about the Przelewy24
* payment method options.
*/
@SerializedName("p24")
Object p24;
/**
* If this is a {@code sepa_debit} PaymentIntent, this sub-hash contains details about the SEPA
* Debit payment method options.
*/
@SerializedName("sepa_debit")
Object sepaDebit;
/**
* If this is a {@code sofort} PaymentMethod, this sub-hash contains details about the SOFORT
* payment method options.
*/
@SerializedName("sofort")
Object sofort;
/**
* If this is a {@code wechat_pay} PaymentMethod, this sub-hash contains details about the
* WeChat Pay payment method options.
*/
@SerializedName("wechat_pay")
Object wechatPay;
private PaymentMethodOptions(Object acssDebit, Object afterpayClearpay, Object alipay, Object bancontact, Object boleto, Object card, Object cardPresent, Map extraParams, Object ideal, Object interacPresent, Object klarna, Object oxxo, Object p24, Object sepaDebit, Object sofort, Object wechatPay) {
this.acssDebit = acssDebit;
this.afterpayClearpay = afterpayClearpay;
this.alipay = alipay;
this.bancontact = bancontact;
this.boleto = boleto;
this.card = card;
this.cardPresent = cardPresent;
this.extraParams = extraParams;
this.ideal = ideal;
this.interacPresent = interacPresent;
this.klarna = klarna;
this.oxxo = oxxo;
this.p24 = p24;
this.sepaDebit = sepaDebit;
this.sofort = sofort;
this.wechatPay = wechatPay;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Object acssDebit;
private Object afterpayClearpay;
private Object alipay;
private Object bancontact;
private Object boleto;
private Object card;
private Object cardPresent;
private Map extraParams;
private Object ideal;
private Object interacPresent;
private Object klarna;
private Object oxxo;
private Object p24;
private Object sepaDebit;
private Object sofort;
private Object wechatPay;
/**
* Finalize and obtain parameter instance from this builder.
*/
public PaymentMethodOptions build() {
return new PaymentMethodOptions(this.acssDebit, this.afterpayClearpay, this.alipay, this.bancontact, this.boleto, this.card, this.cardPresent, this.extraParams, this.ideal, this.interacPresent, this.klarna, this.oxxo, this.p24, this.sepaDebit, this.sofort, this.wechatPay);
}
/**
* If this is a {@code acss_debit} PaymentMethod, this sub-hash contains details about the
* ACSS Debit payment method options.
*/
public Builder setAcssDebit(AcssDebit acssDebit) {
this.acssDebit = acssDebit;
return this;
}
/**
* If this is a {@code acss_debit} PaymentMethod, this sub-hash contains details about the
* ACSS Debit payment method options.
*/
public Builder setAcssDebit(EmptyParam acssDebit) {
this.acssDebit = acssDebit;
return this;
}
/**
* If this is a {@code afterpay_clearpay} PaymentMethod, this sub-hash contains details about
* the Afterpay Clearpay payment method options.
*/
public Builder setAfterpayClearpay(AfterpayClearpay afterpayClearpay) {
this.afterpayClearpay = afterpayClearpay;
return this;
}
/**
* If this is a {@code afterpay_clearpay} PaymentMethod, this sub-hash contains details about
* the Afterpay Clearpay payment method options.
*/
public Builder setAfterpayClearpay(EmptyParam afterpayClearpay) {
this.afterpayClearpay = afterpayClearpay;
return this;
}
/**
* If this is a {@code alipay} PaymentMethod, this sub-hash contains details about the Alipay
* payment method options.
*/
public Builder setAlipay(Alipay alipay) {
this.alipay = alipay;
return this;
}
/**
* If this is a {@code alipay} PaymentMethod, this sub-hash contains details about the Alipay
* payment method options.
*/
public Builder setAlipay(EmptyParam alipay) {
this.alipay = alipay;
return this;
}
/**
* If this is a {@code bancontact} PaymentMethod, this sub-hash contains details about the
* Bancontact payment method options.
*/
public Builder setBancontact(Bancontact bancontact) {
this.bancontact = bancontact;
return this;
}
/**
* If this is a {@code bancontact} PaymentMethod, this sub-hash contains details about the
* Bancontact payment method options.
*/
public Builder setBancontact(EmptyParam bancontact) {
this.bancontact = bancontact;
return this;
}
/**
* If this is a {@code boleto} PaymentMethod, this sub-hash contains details about the Boleto
* payment method options.
*/
public Builder setBoleto(Boleto boleto) {
this.boleto = boleto;
return this;
}
/**
* If this is a {@code boleto} PaymentMethod, this sub-hash contains details about the Boleto
* payment method options.
*/
public Builder setBoleto(EmptyParam boleto) {
this.boleto = boleto;
return this;
}
/**
* Configuration for any card payments attempted on this PaymentIntent.
*/
public Builder setCard(Card card) {
this.card = card;
return this;
}
/**
* Configuration for any card payments attempted on this PaymentIntent.
*/
public Builder setCard(EmptyParam card) {
this.card = card;
return this;
}
/**
* If this is a {@code card_present} PaymentMethod, this sub-hash contains details about the
* Card Present payment method options.
*/
public Builder setCardPresent(CardPresent cardPresent) {
this.cardPresent = cardPresent;
return this;
}
/**
* If this is a {@code card_present} PaymentMethod, this sub-hash contains details about the
* Card Present payment method options.
*/
public Builder setCardPresent(EmptyParam cardPresent) {
this.cardPresent = cardPresent;
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#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#extraParams} for the field
* documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
/**
* If this is a {@code ideal} PaymentMethod, this sub-hash contains details about the Ideal
* payment method options.
*/
public Builder setIdeal(Ideal ideal) {
this.ideal = ideal;
return this;
}
/**
* If this is a {@code ideal} PaymentMethod, this sub-hash contains details about the Ideal
* payment method options.
*/
public Builder setIdeal(EmptyParam ideal) {
this.ideal = ideal;
return this;
}
/**
* If this is a {@code interac_present} PaymentMethod, this sub-hash contains details about
* the Card Present payment method options.
*/
public Builder setInteracPresent(InteracPresent interacPresent) {
this.interacPresent = interacPresent;
return this;
}
/**
* If this is a {@code interac_present} PaymentMethod, this sub-hash contains details about
* the Card Present payment method options.
*/
public Builder setInteracPresent(EmptyParam interacPresent) {
this.interacPresent = interacPresent;
return this;
}
/**
* If this is a {@code klarna} PaymentMethod, this sub-hash contains details about the Klarna
* payment method options.
*/
public Builder setKlarna(Klarna klarna) {
this.klarna = klarna;
return this;
}
/**
* If this is a {@code klarna} PaymentMethod, this sub-hash contains details about the Klarna
* payment method options.
*/
public Builder setKlarna(EmptyParam klarna) {
this.klarna = klarna;
return this;
}
/**
* If this is a {@code oxxo} PaymentMethod, this sub-hash contains details about the OXXO
* payment method options.
*/
public Builder setOxxo(Oxxo oxxo) {
this.oxxo = oxxo;
return this;
}
/**
* If this is a {@code oxxo} PaymentMethod, this sub-hash contains details about the OXXO
* payment method options.
*/
public Builder setOxxo(EmptyParam oxxo) {
this.oxxo = oxxo;
return this;
}
/**
* If this is a {@code p24} PaymentMethod, this sub-hash contains details about the Przelewy24
* payment method options.
*/
public Builder setP24(P24 p24) {
this.p24 = p24;
return this;
}
/**
* If this is a {@code p24} PaymentMethod, this sub-hash contains details about the Przelewy24
* payment method options.
*/
public Builder setP24(EmptyParam p24) {
this.p24 = p24;
return this;
}
/**
* If this is a {@code sepa_debit} PaymentIntent, this sub-hash contains details about the
* SEPA Debit payment method options.
*/
public Builder setSepaDebit(SepaDebit sepaDebit) {
this.sepaDebit = sepaDebit;
return this;
}
/**
* If this is a {@code sepa_debit} PaymentIntent, this sub-hash contains details about the
* SEPA Debit payment method options.
*/
public Builder setSepaDebit(EmptyParam sepaDebit) {
this.sepaDebit = sepaDebit;
return this;
}
/**
* If this is a {@code sofort} PaymentMethod, this sub-hash contains details about the SOFORT
* payment method options.
*/
public Builder setSofort(Sofort sofort) {
this.sofort = sofort;
return this;
}
/**
* If this is a {@code sofort} PaymentMethod, this sub-hash contains details about the SOFORT
* payment method options.
*/
public Builder setSofort(EmptyParam sofort) {
this.sofort = sofort;
return this;
}
/**
* If this is a {@code wechat_pay} PaymentMethod, this sub-hash contains details about the
* WeChat Pay payment method options.
*/
public Builder setWechatPay(WechatPay wechatPay) {
this.wechatPay = wechatPay;
return this;
}
/**
* If this is a {@code wechat_pay} PaymentMethod, this sub-hash contains details about the
* WeChat Pay payment method options.
*/
public Builder setWechatPay(EmptyParam wechatPay) {
this.wechatPay = wechatPay;
return this;
}
}
public static class AcssDebit {
/**
* 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 for Mandate creation.
*/
@SerializedName("mandate_options")
MandateOptions mandateOptions;
/**
* Verification method for the intent.
*/
@SerializedName("verification_method")
VerificationMethod verificationMethod;
private AcssDebit(Map extraParams, MandateOptions mandateOptions, VerificationMethod verificationMethod) {
this.extraParams = extraParams;
this.mandateOptions = mandateOptions;
this.verificationMethod = verificationMethod;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Map extraParams;
private MandateOptions mandateOptions;
private VerificationMethod verificationMethod;
/**
* Finalize and obtain parameter instance from this builder.
*/
public AcssDebit build() {
return new AcssDebit(this.extraParams, this.mandateOptions, this.verificationMethod);
}
/**
* Add a key/value pair to `extraParams` map. 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.AcssDebit#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.AcssDebit#extraParams} for
* the field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
/**
* Additional fields for Mandate creation.
*/
public Builder setMandateOptions(MandateOptions mandateOptions) {
this.mandateOptions = mandateOptions;
return this;
}
/**
* Verification method for the intent.
*/
public Builder setVerificationMethod(VerificationMethod verificationMethod) {
this.verificationMethod = verificationMethod;
return this;
}
}
public static class MandateOptions {
/**
* A URL for custom mandate text to render during confirmation step. The URL will be
* rendered with additional GET parameters {@code payment_intent} and {@code
* payment_intent_client_secret} when confirming a Payment Intent, or {@code setup_intent}
* and {@code setup_intent_client_secret} when confirming a Setup Intent.
*/
@SerializedName("custom_mandate_url")
Object customMandateUrl;
/**
* 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;
/**
* Description of the mandate interval. Only required if 'payment_schedule' parameter is
* 'interval' or 'combined'.
*/
@SerializedName("interval_description")
Object intervalDescription;
/**
* Payment schedule for the mandate.
*/
@SerializedName("payment_schedule")
PaymentSchedule paymentSchedule;
/**
* Transaction type of the mandate.
*/
@SerializedName("transaction_type")
TransactionType transactionType;
private MandateOptions(Object customMandateUrl, Map extraParams, Object intervalDescription, PaymentSchedule paymentSchedule, TransactionType transactionType) {
this.customMandateUrl = customMandateUrl;
this.extraParams = extraParams;
this.intervalDescription = intervalDescription;
this.paymentSchedule = paymentSchedule;
this.transactionType = transactionType;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Object customMandateUrl;
private Map extraParams;
private Object intervalDescription;
private PaymentSchedule paymentSchedule;
private TransactionType transactionType;
/**
* Finalize and obtain parameter instance from this builder.
*/
public MandateOptions build() {
return new MandateOptions(this.customMandateUrl, this.extraParams, this.intervalDescription, this.paymentSchedule, this.transactionType);
}
/**
* A URL for custom mandate text to render during confirmation step. The URL will be
* rendered with additional GET parameters {@code payment_intent} and {@code
* payment_intent_client_secret} when confirming a Payment Intent, or {@code setup_intent}
* and {@code setup_intent_client_secret} when confirming a Setup Intent.
*/
public Builder setCustomMandateUrl(String customMandateUrl) {
this.customMandateUrl = customMandateUrl;
return this;
}
/**
* A URL for custom mandate text to render during confirmation step. The URL will be
* rendered with additional GET parameters {@code payment_intent} and {@code
* payment_intent_client_secret} when confirming a Payment Intent, or {@code setup_intent}
* and {@code setup_intent_client_secret} when confirming a Setup Intent.
*/
public Builder setCustomMandateUrl(EmptyParam customMandateUrl) {
this.customMandateUrl = customMandateUrl;
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.AcssDebit.MandateOptions#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.AcssDebit.MandateOptions#extraParams}
* for the field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
/**
* Description of the mandate interval. Only required if 'payment_schedule' parameter is
* 'interval' or 'combined'.
*/
public Builder setIntervalDescription(String intervalDescription) {
this.intervalDescription = intervalDescription;
return this;
}
/**
* Description of the mandate interval. Only required if 'payment_schedule' parameter is
* 'interval' or 'combined'.
*/
public Builder setIntervalDescription(EmptyParam intervalDescription) {
this.intervalDescription = intervalDescription;
return this;
}
/**
* Payment schedule for the mandate.
*/
public Builder setPaymentSchedule(PaymentSchedule paymentSchedule) {
this.paymentSchedule = paymentSchedule;
return this;
}
/**
* Transaction type of the mandate.
*/
public Builder setTransactionType(TransactionType transactionType) {
this.transactionType = transactionType;
return this;
}
}
public enum PaymentSchedule implements ApiRequestParams.EnumParam {
@SerializedName("combined")
COMBINED("combined"), @SerializedName("interval")
INTERVAL("interval"), @SerializedName("sporadic")
SPORADIC("sporadic");
private final String value;
PaymentSchedule(String value) {
this.value = value;
}
@Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public String getValue() {
return this.value;
}
}
public enum TransactionType implements ApiRequestParams.EnumParam {
@SerializedName("business")
BUSINESS("business"), @SerializedName("personal")
PERSONAL("personal");
private final String value;
TransactionType(String value) {
this.value = value;
}
@Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public String getValue() {
return this.value;
}
}
/**
* A URL for custom mandate text to render during confirmation step. The URL will be
* rendered with additional GET parameters {@code payment_intent} and {@code
* payment_intent_client_secret} when confirming a Payment Intent, or {@code setup_intent}
* and {@code setup_intent_client_secret} when confirming a Setup Intent.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Object getCustomMandateUrl() {
return this.customMandateUrl;
}
/**
* 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.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Map getExtraParams() {
return this.extraParams;
}
/**
* Description of the mandate interval. Only required if 'payment_schedule' parameter is
* 'interval' or 'combined'.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Object getIntervalDescription() {
return this.intervalDescription;
}
/**
* Payment schedule for the mandate.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public PaymentSchedule getPaymentSchedule() {
return this.paymentSchedule;
}
/**
* Transaction type of the mandate.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public TransactionType getTransactionType() {
return this.transactionType;
}
}
public enum VerificationMethod implements ApiRequestParams.EnumParam {
@SerializedName("automatic")
AUTOMATIC("automatic"), @SerializedName("instant")
INSTANT("instant"), @SerializedName("microdeposits")
MICRODEPOSITS("microdeposits");
private final String value;
VerificationMethod(String value) {
this.value = value;
}
@Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public String getValue() {
return this.value;
}
}
/**
* 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.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Map getExtraParams() {
return this.extraParams;
}
/**
* Additional fields for Mandate creation.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public MandateOptions getMandateOptions() {
return this.mandateOptions;
}
/**
* Verification method for the intent.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public VerificationMethod getVerificationMethod() {
return this.verificationMethod;
}
}
public static class AfterpayClearpay {
/**
* 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;
/**
* Order identifier shown to the customer in Afterpay’s online portal. We recommend using a
* value that helps you answer any questions a customer might have about the payment. The
* identifier is limited to 128 characters and may contain only letters, digits, underscores,
* backslashes and dashes.
*/
@SerializedName("reference")
Object reference;
private AfterpayClearpay(Map extraParams, Object reference) {
this.extraParams = extraParams;
this.reference = reference;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Map extraParams;
private Object reference;
/** Finalize and obtain parameter instance from this builder. */
public AfterpayClearpay build() {
return new AfterpayClearpay(this.extraParams, this.reference);
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link
* PaymentIntentUpdateParams.PaymentMethodOptions.AfterpayClearpay#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.AfterpayClearpay#extraParams} for the
* field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
/**
* Order identifier shown to the customer in Afterpay’s online portal. We recommend using a
* value that helps you answer any questions a customer might have about the payment. The
* identifier is limited to 128 characters and may contain only letters, digits,
* underscores, backslashes and dashes.
*/
public Builder setReference(String reference) {
this.reference = reference;
return this;
}
public Builder setReference(EmptyParam reference) {
this.reference = reference;
return this;
}
}
/**
* 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.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Map getExtraParams() {
return this.extraParams;
}
/**
* Order identifier shown to the customer in Afterpay’s online portal. We recommend using a
* value that helps you answer any questions a customer might have about the payment. The
* identifier is limited to 128 characters and may contain only letters, digits, underscores,
* backslashes and dashes.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Object getReference() {
return this.reference;
}
}
/**
* Order identifier shown to the customer in Afterpay’s online portal. We recommend using a
* value that helps you answer any questions a customer might have about the payment. The
* identifier is limited to 128 characters and may contain only letters, digits,
* underscores, backslashes and dashes.
*/
public static class Alipay {
/**
* 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 Alipay(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 Alipay build() {
return new Alipay(this.extraParams);
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Alipay#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;
}
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
}
/**
* 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.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Map getExtraParams() {
return this.extraParams;
}
}
/**
* Add all map key/value pairs to `extraParams` map. 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.Alipay#extraParams} for
* the field documentation.
*/
public static class Bancontact {
/**
* 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;
/**
* Preferred language of the Bancontact authorization page that the customer is redirected to.
*/
@SerializedName("preferred_language")
PreferredLanguage preferredLanguage;
private Bancontact(Map extraParams, PreferredLanguage preferredLanguage) {
this.extraParams = extraParams;
this.preferredLanguage = preferredLanguage;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Map extraParams;
private PreferredLanguage preferredLanguage;
/**
* Finalize and obtain parameter instance from this builder.
*/
public Bancontact build() {
return new Bancontact(this.extraParams, this.preferredLanguage);
}
/**
* Add a key/value pair to `extraParams` map. 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.Bancontact#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.Bancontact#extraParams}
* for the field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
/**
* Preferred language of the Bancontact authorization page that the customer is redirected
* to.
*/
public Builder setPreferredLanguage(PreferredLanguage preferredLanguage) {
this.preferredLanguage = preferredLanguage;
return this;
}
}
public enum PreferredLanguage implements ApiRequestParams.EnumParam {
@SerializedName("de")
DE("de"), @SerializedName("en")
EN("en"), @SerializedName("fr")
FR("fr"), @SerializedName("nl")
NL("nl");
private final String value;
PreferredLanguage(String value) {
this.value = value;
}
@Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public String getValue() {
return this.value;
}
}
/**
* 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.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Map getExtraParams() {
return this.extraParams;
}
/**
* Preferred language of the Bancontact authorization page that the customer is redirected to.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public PreferredLanguage getPreferredLanguage() {
return this.preferredLanguage;
}
}
public static class Boleto {
/**
* The number of calendar days before a Boleto voucher expires. For example, if you create a
* Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will
* expire on Wednesday at 23:59 America/Sao_Paulo time.
*/
@SerializedName("expires_after_days")
Long expiresAfterDays;
/**
* 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 Boleto(Long expiresAfterDays, Map extraParams) {
this.expiresAfterDays = expiresAfterDays;
this.extraParams = extraParams;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Long expiresAfterDays;
private Map extraParams;
/** Finalize and obtain parameter instance from this builder. */
public Boleto build() {
return new Boleto(this.expiresAfterDays, this.extraParams);
}
/**
* The number of calendar days before a Boleto voucher expires. For example, if you create a
* Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will
* expire on Wednesday at 23:59 America/Sao_Paulo time.
*/
public Builder setExpiresAfterDays(Long expiresAfterDays) {
this.expiresAfterDays = expiresAfterDays;
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.Boleto#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;
}
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
}
/**
* The number of calendar days before a Boleto voucher expires. For example, if you create a
* Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will
* expire on Wednesday at 23:59 America/Sao_Paulo time.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Long getExpiresAfterDays() {
return this.expiresAfterDays;
}
/**
* 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.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Map getExtraParams() {
return this.extraParams;
}
}
/**
* Add all map key/value pairs to `extraParams` map. 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.Boleto#extraParams} for
* the field documentation.
*/
public static class Card {
/**
* A single-use {@code cvc_update} Token that represents a card CVC value. When provided, the
* CVC value will be verified during the card payment attempt. This parameter can only be
* provided during confirmation.
*/
@SerializedName("cvc_token")
Object cvcToken;
/**
* 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;
/**
* Installment configuration for payments attempted on this PaymentIntent (Mexico Only).
*
* For more information, see the installments integration guide.
*/
@SerializedName("installments")
Installments installments;
/**
* When specified, this parameter indicates that a transaction will be marked as MOTO (Mail
* Order Telephone Order) and thus out of scope for SCA. This parameter can only be provided
* during confirmation.
*/
@SerializedName("moto")
Boolean moto;
/**
* Selected network to process this PaymentIntent on. Depends on the available networks of the
* card attached to the PaymentIntent. Can be only set confirm-time.
*/
@SerializedName("network")
Network network;
/**
* We strongly recommend that you rely on our SCA Engine to automatically prompt your
* customers for authentication based on risk level and other requirements.
* However, if you wish to request 3D Secure based on logic from your own fraud engine,
* provide this option. Permitted values include: {@code automatic} or {@code any}. If not
* provided, defaults to {@code automatic}. Read our guide on manually requesting 3D
* Secure for more information on how this configuration interacts with Radar and our SCA
* Engine.
*/
@SerializedName("request_three_d_secure")
RequestThreeDSecure requestThreeDSecure;
private Card(Object cvcToken, Map extraParams, Installments installments, Boolean moto, Network network, RequestThreeDSecure requestThreeDSecure) {
this.cvcToken = cvcToken;
this.extraParams = extraParams;
this.installments = installments;
this.moto = moto;
this.network = network;
this.requestThreeDSecure = requestThreeDSecure;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Object cvcToken;
private Map extraParams;
private Installments installments;
private Boolean moto;
private Network network;
private RequestThreeDSecure requestThreeDSecure;
/**
* Finalize and obtain parameter instance from this builder.
*/
public Card build() {
return new Card(this.cvcToken, this.extraParams, this.installments, this.moto, this.network, this.requestThreeDSecure);
}
/**
* A single-use {@code cvc_update} Token that represents a card CVC value. When provided,
* the CVC value will be verified during the card payment attempt. This parameter can only
* be provided during confirmation.
*/
public Builder setCvcToken(String cvcToken) {
this.cvcToken = cvcToken;
return this;
}
/**
* A single-use {@code cvc_update} Token that represents a card CVC value. When provided,
* the CVC value will be verified during the card payment attempt. This parameter can only
* be provided during confirmation.
*/
public Builder setCvcToken(EmptyParam cvcToken) {
this.cvcToken = cvcToken;
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.Card#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.Card#extraParams} for the
* field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
/**
* Installment configuration for payments attempted on this PaymentIntent (Mexico Only).
*
* For more information, see the installments integration guide.
*/
public Builder setInstallments(Installments installments) {
this.installments = installments;
return this;
}
/**
* When specified, this parameter indicates that a transaction will be marked as MOTO (Mail
* Order Telephone Order) and thus out of scope for SCA. This parameter can only be provided
* during confirmation.
*/
public Builder setMoto(Boolean moto) {
this.moto = moto;
return this;
}
/**
* Selected network to process this PaymentIntent on. Depends on the available networks of
* the card attached to the PaymentIntent. Can be only set confirm-time.
*/
public Builder setNetwork(Network network) {
this.network = network;
return this;
}
/**
* We strongly recommend that you rely on our SCA Engine to automatically prompt your
* customers for authentication based on risk level and other requirements.
* However, if you wish to request 3D Secure based on logic from your own fraud engine,
* provide this option. Permitted values include: {@code automatic} or {@code any}. If not
* provided, defaults to {@code automatic}. Read our guide on manually requesting 3D
* Secure for more information on how this configuration interacts with Radar and our
* SCA Engine.
*/
public Builder setRequestThreeDSecure(RequestThreeDSecure requestThreeDSecure) {
this.requestThreeDSecure = requestThreeDSecure;
return this;
}
}
public static class Installments {
/**
* Setting to true enables installments for this PaymentIntent. This will cause the response
* to contain a list of available installment plans. Setting to false will prevent any
* selected plan from applying to a charge.
*/
@SerializedName("enabled")
Boolean enabled;
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
* Instead, each key/value pair is serialized as if the key is a root-level field
* (serialized) name in this param object. Effectively, this map is flattened to its parent
* instance.
*/
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
/**
* The selected installment plan to use for this payment attempt. This parameter can only be
* provided during confirmation.
*/
@SerializedName("plan")
Object plan;
private Installments(Boolean enabled, Map extraParams, Object plan) {
this.enabled = enabled;
this.extraParams = extraParams;
this.plan = plan;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Boolean enabled;
private Map extraParams;
private Object plan;
/**
* Finalize and obtain parameter instance from this builder.
*/
public Installments build() {
return new Installments(this.enabled, this.extraParams, this.plan);
}
/**
* Setting to true enables installments for this PaymentIntent. This will cause the
* response to contain a list of available installment plans. Setting to false will
* prevent any selected plan from applying to a charge.
*/
public Builder setEnabled(Boolean enabled) {
this.enabled = enabled;
return this;
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link
* PaymentIntentUpdateParams.PaymentMethodOptions.Card.Installments#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.Card.Installments#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 selected installment plan to use for this payment attempt. This parameter can only
* be provided during confirmation.
*/
public Builder setPlan(Plan plan) {
this.plan = plan;
return this;
}
/**
* The selected installment plan to use for this payment attempt. This parameter can only
* be provided during confirmation.
*/
public Builder setPlan(EmptyParam plan) {
this.plan = plan;
return this;
}
}
public static class Plan {
/**
* For {@code fixed_count} installment plans, this is the number of installment payments
* your customer will make to their credit card.
*/
@SerializedName("count")
Long count;
/**
* 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;
/**
* For {@code fixed_count} installment plans, this is the interval between installment
* payments your customer will make to their credit card. One of {@code month}.
*/
@SerializedName("interval")
Interval interval;
/** Type of installment plan, one of {@code fixed_count}. */
@SerializedName("type")
Type type;
private Plan(Long count, Map extraParams, Interval interval, Type type) {
this.count = count;
this.extraParams = extraParams;
this.interval = interval;
this.type = type;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Long count;
private Map extraParams;
private Interval interval;
private Type type;
/** Finalize and obtain parameter instance from this builder. */
public Plan build() {
return new Plan(this.count, this.extraParams, this.interval, this.type);
}
/**
* For {@code fixed_count} installment plans, this is the number of installment payments
* your customer will make to their credit card.
*/
public Builder setCount(Long count) {
this.count = count;
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.Card.Installments.Plan#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.Card.Installments.Plan#extraParams}
* for the field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
/**
* For {@code fixed_count} installment plans, this is the interval between installment
* payments your customer will make to their credit card. One of {@code month}.
*/
public Builder setInterval(Interval interval) {
this.interval = interval;
return this;
}
public Builder setType(Type type) {
this.type = type;
return this;
}
}
public enum Interval implements ApiRequestParams.EnumParam {
@SerializedName("month")
MONTH("month");
private final String value;
Interval(String value) {
this.value = value;
}
@Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public String getValue() {
return this.value;
}
}
public enum Type implements ApiRequestParams.EnumParam {
@SerializedName("fixed_count")
FIXED_COUNT("fixed_count");
private final String value;
Type(String value) {
this.value = value;
}
@Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public String getValue() {
return this.value;
}
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Long getCount() {
return this.count;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Map getExtraParams() {
return this.extraParams;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Interval getInterval() {
return this.interval;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Type getType() {
return this.type;
}
}
/**
* Setting to true enables installments for this PaymentIntent. This will cause the response
* to contain a list of available installment plans. Setting to false will prevent any
* selected plan from applying to a charge.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Boolean getEnabled() {
return this.enabled;
}
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
* Instead, each key/value pair is serialized as if the key is a root-level field
* (serialized) name in this param object. Effectively, this map is flattened to its parent
* instance.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Map getExtraParams() {
return this.extraParams;
}
/**
* The selected installment plan to use for this payment attempt. This parameter can only be
* provided during confirmation.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Object getPlan() {
return this.plan;
}
}
/**
* Type of installment plan, one of {@code fixed_count}.
*/
public enum Network implements ApiRequestParams.EnumParam {
@SerializedName("amex")
AMEX("amex"), @SerializedName("cartes_bancaires")
CARTES_BANCAIRES("cartes_bancaires"), @SerializedName("diners")
DINERS("diners"), @SerializedName("discover")
DISCOVER("discover"), @SerializedName("interac")
INTERAC("interac"), @SerializedName("jcb")
JCB("jcb"), @SerializedName("mastercard")
MASTERCARD("mastercard"), @SerializedName("unionpay")
UNIONPAY("unionpay"), @SerializedName("unknown")
UNKNOWN("unknown"), @SerializedName("visa")
VISA("visa");
private final String value;
Network(String value) {
this.value = value;
}
@Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public String getValue() {
return this.value;
}
}
public enum RequestThreeDSecure implements ApiRequestParams.EnumParam {
@SerializedName("any")
ANY("any"), @SerializedName("automatic")
AUTOMATIC("automatic");
private final String value;
RequestThreeDSecure(String value) {
this.value = value;
}
@Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public String getValue() {
return this.value;
}
}
/**
* A single-use {@code cvc_update} Token that represents a card CVC value. When provided, the
* CVC value will be verified during the card payment attempt. This parameter can only be
* provided during confirmation.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Object getCvcToken() {
return this.cvcToken;
}
/**
* 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.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Map getExtraParams() {
return this.extraParams;
}
/**
* Installment configuration for payments attempted on this PaymentIntent (Mexico Only).
*
* For more information, see the installments integration guide.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Installments getInstallments() {
return this.installments;
}
/**
* When specified, this parameter indicates that a transaction will be marked as MOTO (Mail
* Order Telephone Order) and thus out of scope for SCA. This parameter can only be provided
* during confirmation.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Boolean getMoto() {
return this.moto;
}
/**
* Selected network to process this PaymentIntent on. Depends on the available networks of the
* card attached to the PaymentIntent. Can be only set confirm-time.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Network getNetwork() {
return this.network;
}
/**
* We strongly recommend that you rely on our SCA Engine to automatically prompt your
* customers for authentication based on risk level and other requirements.
* However, if you wish to request 3D Secure based on logic from your own fraud engine,
* provide this option. Permitted values include: {@code automatic} or {@code any}. If not
* provided, defaults to {@code automatic}. Read our guide on manually requesting 3D
* Secure for more information on how this configuration interacts with Radar and our SCA
* Engine.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public RequestThreeDSecure getRequestThreeDSecure() {
return this.requestThreeDSecure;
}
}
public static class CardPresent {
/**
* 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 CardPresent(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 CardPresent build() {
return new CardPresent(this.extraParams);
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.CardPresent#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;
}
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
}
/**
* 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.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Map getExtraParams() {
return this.extraParams;
}
}
/**
* Add all map key/value pairs to `extraParams` map. 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.CardPresent#extraParams}
* for the field documentation.
*/
public static class Ideal {
/**
* 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 Ideal(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 Ideal build() {
return new Ideal(this.extraParams);
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Ideal#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;
}
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
}
/**
* 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.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Map getExtraParams() {
return this.extraParams;
}
}
/**
* Add all map key/value pairs to `extraParams` map. 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.Ideal#extraParams} for the
* field documentation.
*/
public static class InteracPresent {
/**
* 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 InteracPresent(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 InteracPresent build() {
return new InteracPresent(this.extraParams);
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link
* PaymentIntentUpdateParams.PaymentMethodOptions.InteracPresent#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;
}
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
}
/**
* 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.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Map getExtraParams() {
return this.extraParams;
}
}
/**
* Add all map key/value pairs to `extraParams` map. 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.InteracPresent#extraParams} for the field
* documentation.
*/
public static class Klarna {
/**
* 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;
/**
* Preferred language of the Klarna authorization page that the customer is redirected to.
*/
@SerializedName("preferred_locale")
PreferredLocale preferredLocale;
private Klarna(Map extraParams, PreferredLocale preferredLocale) {
this.extraParams = extraParams;
this.preferredLocale = preferredLocale;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Map extraParams;
private PreferredLocale preferredLocale;
/**
* Finalize and obtain parameter instance from this builder.
*/
public Klarna build() {
return new Klarna(this.extraParams, this.preferredLocale);
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Klarna#extraParams} for
* the field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Klarna#extraParams} for
* the field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
/**
* Preferred language of the Klarna authorization page that the customer is redirected to.
*/
public Builder setPreferredLocale(PreferredLocale preferredLocale) {
this.preferredLocale = preferredLocale;
return this;
}
}
public enum PreferredLocale implements ApiRequestParams.EnumParam {
@SerializedName("da-DK")
DA_DK("da-DK"), @SerializedName("de-AT")
DE_AT("de-AT"), @SerializedName("de-DE")
DE_DE("de-DE"), @SerializedName("en-AT")
EN_AT("en-AT"), @SerializedName("en-BE")
EN_BE("en-BE"), @SerializedName("en-DE")
EN_DE("en-DE"), @SerializedName("en-DK")
EN_DK("en-DK"), @SerializedName("en-ES")
EN_ES("en-ES"), @SerializedName("en-FI")
EN_FI("en-FI"), @SerializedName("en-GB")
EN_GB("en-GB"), @SerializedName("en-IT")
EN_IT("en-IT"), @SerializedName("en-NL")
EN_NL("en-NL"), @SerializedName("en-NO")
EN_NO("en-NO"), @SerializedName("en-SE")
EN_SE("en-SE"), @SerializedName("en-US")
EN_US("en-US"), @SerializedName("es-ES")
ES_ES("es-ES"), @SerializedName("fi-FI")
FI_FI("fi-FI"), @SerializedName("fr-BE")
FR_BE("fr-BE"), @SerializedName("it-IT")
IT_IT("it-IT"), @SerializedName("nb-NO")
NB_NO("nb-NO"), @SerializedName("nl-BE")
NL_BE("nl-BE"), @SerializedName("nl-NL")
NL_NL("nl-NL"), @SerializedName("sv-FI")
SV_FI("sv-FI"), @SerializedName("sv-SE")
SV_SE("sv-SE");
private final String value;
PreferredLocale(String value) {
this.value = value;
}
@Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public String getValue() {
return this.value;
}
}
/**
* 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.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Map getExtraParams() {
return this.extraParams;
}
/**
* Preferred language of the Klarna authorization page that the customer is redirected to.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public PreferredLocale getPreferredLocale() {
return this.preferredLocale;
}
}
public static class Oxxo {
/**
* The number of calendar days before an OXXO voucher expires. For example, if you create an
* OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on
* Wednesday at 23:59 America/Mexico_City time.
*/
@SerializedName("expires_after_days")
Long expiresAfterDays;
/**
* 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(Long expiresAfterDays, Map extraParams) {
this.expiresAfterDays = expiresAfterDays;
this.extraParams = extraParams;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Long expiresAfterDays;
private Map extraParams;
/** Finalize and obtain parameter instance from this builder. */
public Oxxo build() {
return new Oxxo(this.expiresAfterDays, this.extraParams);
}
/**
* The number of calendar days before an OXXO voucher expires. For example, if you create an
* OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire
* on Wednesday at 23:59 America/Mexico_City time.
*/
public Builder setExpiresAfterDays(Long expiresAfterDays) {
this.expiresAfterDays = expiresAfterDays;
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.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;
}
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
}
/**
* The number of calendar days before an OXXO voucher expires. For example, if you create an
* OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on
* Wednesday at 23:59 America/Mexico_City time.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Long getExpiresAfterDays() {
return this.expiresAfterDays;
}
/**
* 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.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Map getExtraParams() {
return this.extraParams;
}
}
/**
* Add all map key/value pairs to `extraParams` map. 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.Oxxo#extraParams} for the
* field documentation.
*/
public static class P24 {
/**
* 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;
/**
* Confirm that the payer has accepted the P24 terms and conditions.
*/
@SerializedName("tos_shown_and_accepted")
Boolean tosShownAndAccepted;
private P24(Map extraParams, Boolean tosShownAndAccepted) {
this.extraParams = extraParams;
this.tosShownAndAccepted = tosShownAndAccepted;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Map extraParams;
private Boolean tosShownAndAccepted;
/** Finalize and obtain parameter instance from this builder. */
public P24 build() {
return new P24(this.extraParams, this.tosShownAndAccepted);
}
/**
* Add a key/value pair to `extraParams` map. 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.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 PaymentIntentUpdateParams.PaymentMethodOptions.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;
}
public Builder setTosShownAndAccepted(Boolean tosShownAndAccepted) {
this.tosShownAndAccepted = tosShownAndAccepted;
return this;
}
}
/**
* 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.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Map getExtraParams() {
return this.extraParams;
}
/**
* Confirm that the payer has accepted the P24 terms and conditions.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Boolean getTosShownAndAccepted() {
return this.tosShownAndAccepted;
}
}
/**
* Confirm that the payer has accepted the P24 terms and conditions.
*/
public static class SepaDebit {
/**
* 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 for Mandate creation.
*/
@SerializedName("mandate_options")
MandateOptions mandateOptions;
private SepaDebit(Map extraParams, MandateOptions mandateOptions) {
this.extraParams = extraParams;
this.mandateOptions = mandateOptions;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Map extraParams;
private MandateOptions mandateOptions;
/**
* Finalize and obtain parameter instance from this builder.
*/
public SepaDebit build() {
return new SepaDebit(this.extraParams, this.mandateOptions);
}
/**
* Add a key/value pair to `extraParams` map. 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.SepaDebit#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.SepaDebit#extraParams} for
* the field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
/**
* Additional fields for Mandate creation.
*/
public Builder setMandateOptions(MandateOptions mandateOptions) {
this.mandateOptions = mandateOptions;
return this;
}
}
public static class MandateOptions {
/**
* 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 MandateOptions(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 MandateOptions build() {
return new MandateOptions(this.extraParams);
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link
* PaymentIntentUpdateParams.PaymentMethodOptions.SepaDebit.MandateOptions#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;
}
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Map getExtraParams() {
return this.extraParams;
}
}
/**
* 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.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Map getExtraParams() {
return this.extraParams;
}
/**
* Additional fields for Mandate creation.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public MandateOptions getMandateOptions() {
return this.mandateOptions;
}
}
/**
* Add all map key/value pairs to `extraParams` map. 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.SepaDebit.MandateOptions#extraParams}
* for the field documentation.
*/
public static class Sofort {
/**
* 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;
/**
* Language shown to the payer on redirect.
*/
@SerializedName("preferred_language")
EnumParam preferredLanguage;
private Sofort(Map extraParams, EnumParam preferredLanguage) {
this.extraParams = extraParams;
this.preferredLanguage = preferredLanguage;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Map extraParams;
private EnumParam preferredLanguage;
/**
* Finalize and obtain parameter instance from this builder.
*/
public Sofort build() {
return new Sofort(this.extraParams, this.preferredLanguage);
}
/**
* Add a key/value pair to `extraParams` map. 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.Sofort#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.Sofort#extraParams} for
* the field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
/**
* Language shown to the payer on redirect.
*/
public Builder setPreferredLanguage(PreferredLanguage preferredLanguage) {
this.preferredLanguage = preferredLanguage;
return this;
}
/**
* Language shown to the payer on redirect.
*/
public Builder setPreferredLanguage(EmptyParam preferredLanguage) {
this.preferredLanguage = preferredLanguage;
return this;
}
}
public enum PreferredLanguage implements ApiRequestParams.EnumParam {
@SerializedName("de")
DE("de"), @SerializedName("en")
EN("en"), @SerializedName("es")
ES("es"), @SerializedName("fr")
FR("fr"), @SerializedName("it")
IT("it"), @SerializedName("nl")
NL("nl"), @SerializedName("pl")
PL("pl");
private final String value;
PreferredLanguage(String value) {
this.value = value;
}
@Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public String getValue() {
return this.value;
}
}
/**
* 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.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Map getExtraParams() {
return this.extraParams;
}
/**
* Language shown to the payer on redirect.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public EnumParam getPreferredLanguage() {
return this.preferredLanguage;
}
}
public static class WechatPay {
/** The app ID registered with WeChat Pay. Only required when client is ios or android. */
@SerializedName("app_id")
Object appId;
/** The client type that the end customer will pay from. */
@SerializedName("client")
Client client;
/**
* 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 WechatPay(Object appId, Client client, Map extraParams) {
this.appId = appId;
this.client = client;
this.extraParams = extraParams;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Object appId;
private Client client;
private Map extraParams;
/** Finalize and obtain parameter instance from this builder. */
public WechatPay build() {
return new WechatPay(this.appId, this.client, this.extraParams);
}
/** The app ID registered with WeChat Pay. Only required when client is ios or android. */
public Builder setAppId(String appId) {
this.appId = appId;
return this;
}
/** The app ID registered with WeChat Pay. Only required when client is ios or android. */
public Builder setAppId(EmptyParam appId) {
this.appId = appId;
return this;
}
/** The client type that the end customer will pay from. */
public Builder setClient(Client client) {
this.client = client;
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.WechatPay#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;
}
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
}
public enum Client implements ApiRequestParams.EnumParam {
@SerializedName("android")
ANDROID("android"), @SerializedName("ios")
IOS("ios"), @SerializedName("web")
WEB("web");
private final String value;
Client(String value) {
this.value = value;
}
@Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public String getValue() {
return this.value;
}
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Object getAppId() {
return this.appId;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Client getClient() {
return this.client;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Map getExtraParams() {
return this.extraParams;
}
}
/**
* If this is a {@code acss_debit} PaymentMethod, this sub-hash contains details about the ACSS
* Debit payment method options.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Object getAcssDebit() {
return this.acssDebit;
}
/**
* If this is a {@code afterpay_clearpay} PaymentMethod, this sub-hash contains details about
* the Afterpay Clearpay payment method options.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Object getAfterpayClearpay() {
return this.afterpayClearpay;
}
/**
* If this is a {@code alipay} PaymentMethod, this sub-hash contains details about the Alipay
* payment method options.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Object getAlipay() {
return this.alipay;
}
/**
* If this is a {@code bancontact} PaymentMethod, this sub-hash contains details about the
* Bancontact payment method options.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Object getBancontact() {
return this.bancontact;
}
/**
* If this is a {@code boleto} PaymentMethod, this sub-hash contains details about the Boleto
* payment method options.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Object getBoleto() {
return this.boleto;
}
/**
* Configuration for any card payments attempted on this PaymentIntent.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Object getCard() {
return this.card;
}
/**
* If this is a {@code card_present} PaymentMethod, this sub-hash contains details about the
* Card Present payment method options.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Object getCardPresent() {
return this.cardPresent;
}
/**
* 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.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Map getExtraParams() {
return this.extraParams;
}
/**
* If this is a {@code ideal} PaymentMethod, this sub-hash contains details about the Ideal
* payment method options.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Object getIdeal() {
return this.ideal;
}
/**
* If this is a {@code interac_present} PaymentMethod, this sub-hash contains details about the
* Card Present payment method options.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Object getInteracPresent() {
return this.interacPresent;
}
/**
* If this is a {@code klarna} PaymentMethod, this sub-hash contains details about the Klarna
* payment method options.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Object getKlarna() {
return this.klarna;
}
/**
* If this is a {@code oxxo} PaymentMethod, this sub-hash contains details about the OXXO
* payment method options.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Object getOxxo() {
return this.oxxo;
}
/**
* If this is a {@code p24} PaymentMethod, this sub-hash contains details about the Przelewy24
* payment method options.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Object getP24() {
return this.p24;
}
/**
* If this is a {@code sepa_debit} PaymentIntent, this sub-hash contains details about the SEPA
* Debit payment method options.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Object getSepaDebit() {
return this.sepaDebit;
}
/**
* If this is a {@code sofort} PaymentMethod, this sub-hash contains details about the SOFORT
* payment method options.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Object getSofort() {
return this.sofort;
}
/**
* If this is a {@code wechat_pay} PaymentMethod, this sub-hash contains details about the
* WeChat Pay payment method options.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Object getWechatPay() {
return this.wechatPay;
}
}
/**
* Add all map key/value pairs to `extraParams` map. 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.WechatPay#extraParams} for
* the field documentation.
*/
public static class Shipping {
/**
* Shipping address.
*/
@SerializedName("address")
Address address;
/**
* The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
*/
@SerializedName("carrier")
Object carrier;
/**
* 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;
/**
* Recipient name.
*/
@SerializedName("name")
Object name;
/**
* Recipient phone (including extension).
*/
@SerializedName("phone")
Object phone;
/**
* The tracking number for a physical product, obtained from the delivery service. If multiple
* tracking numbers were generated for this purchase, please separate them with commas.
*/
@SerializedName("tracking_number")
Object trackingNumber;
private Shipping(Address address, Object carrier, Map extraParams, Object name, Object phone, Object trackingNumber) {
this.address = address;
this.carrier = carrier;
this.extraParams = extraParams;
this.name = name;
this.phone = phone;
this.trackingNumber = trackingNumber;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Address address;
private Object carrier;
private Map extraParams;
private Object name;
private Object phone;
private Object trackingNumber;
/**
* Finalize and obtain parameter instance from this builder.
*/
public Shipping build() {
return new Shipping(this.address, this.carrier, this.extraParams, this.name, this.phone, this.trackingNumber);
}
/**
* Shipping address.
*/
public Builder setAddress(Address address) {
this.address = address;
return this;
}
/**
* The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
*/
public Builder setCarrier(String carrier) {
this.carrier = carrier;
return this;
}
/**
* The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
*/
public Builder setCarrier(EmptyParam carrier) {
this.carrier = carrier;
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.Shipping#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.Shipping#extraParams} for the field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
/**
* Recipient name.
*/
public Builder setName(String name) {
this.name = name;
return this;
}
/**
* Recipient name.
*/
public Builder setName(EmptyParam name) {
this.name = name;
return this;
}
/**
* Recipient phone (including extension).
*/
public Builder setPhone(String phone) {
this.phone = phone;
return this;
}
/**
* Recipient phone (including extension).
*/
public Builder setPhone(EmptyParam phone) {
this.phone = phone;
return this;
}
/**
* The tracking number for a physical product, obtained from the delivery service. If multiple
* tracking numbers were generated for this purchase, please separate them with commas.
*/
public Builder setTrackingNumber(String trackingNumber) {
this.trackingNumber = trackingNumber;
return this;
}
/**
* The tracking number for a physical product, obtained from the delivery service. If multiple
* tracking numbers were generated for this purchase, please separate them with commas.
*/
public Builder setTrackingNumber(EmptyParam trackingNumber) {
this.trackingNumber = trackingNumber;
return this;
}
}
public static class Address {
/** City, district, suburb, town, or village. */
@SerializedName("city")
Object city;
/**
* Two-letter country code (ISO
* 3166-1 alpha-2).
*/
@SerializedName("country")
Object country;
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
* Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
* name in this param object. Effectively, this map is flattened to its parent instance.
*/
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
/** Address line 1 (e.g., street, PO Box, or company name). */
@SerializedName("line1")
Object line1;
/** Address line 2 (e.g., apartment, suite, unit, or building). */
@SerializedName("line2")
Object line2;
/** ZIP or postal code. */
@SerializedName("postal_code")
Object postalCode;
/** State, county, province, or region. */
@SerializedName("state")
Object state;
private Address(Object city, Object country, Map