com.stripe.param.PaymentIntentConfirmParams Maven / Gradle / Ivy
// File generated from our OpenAPI spec
package com.stripe.param;
import com.google.gson.annotations.SerializedName;
import com.stripe.net.ApiRequestParams;
import com.stripe.param.common.EmptyParam;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import lombok.Getter;
@Getter
public class PaymentIntentConfirmParams extends ApiRequestParams {
/** Controls when the funds will be captured from the customer's account. */
@SerializedName("capture_method")
CaptureMethod captureMethod;
/**
* ID of the ConfirmationToken used to confirm this PaymentIntent.
*
* If the provided ConfirmationToken contains properties that are also being provided in this
* request, such as {@code payment_method}, then the values in this request will take precedence.
*/
@SerializedName("confirmation_token")
String confirmationToken;
/**
* Set to {@code true} to fail the payment attempt if the PaymentIntent transitions into {@code
* requires_action}. This parameter is intended for simpler integrations that do not handle
* customer actions, like saving cards without
* authentication.
*/
@SerializedName("error_on_requires_action")
Boolean errorOnRequiresAction;
/** 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;
/** ID of the mandate that's used for this payment. */
@SerializedName("mandate")
String mandate;
@SerializedName("mandate_data")
Object mandateData;
/**
* Set to {@code true} to indicate that the customer isn't in your checkout flow during this
* payment attempt and can't authenticate. Use this parameter in scenarios where you collect card
* details and charge them
* later.
*/
@SerializedName("off_session")
Object offSession;
/**
* ID of the payment method (a PaymentMethod, Card, or compatible
* Source object) to attach to this PaymentIntent.
*/
@SerializedName("payment_method")
String 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 (for example, a card) that this PaymentIntent can use. Use
* {@code automatic_payment_methods} to manage payment methods from the Stripe Dashboard.
*/
@SerializedName("payment_method_types")
List paymentMethodTypes;
/**
* Options to configure Radar. Learn more about Radar Sessions.
*/
@SerializedName("radar_options")
RadarOptions radarOptions;
/**
* 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;
/**
* The URL to redirect your customer back to after they authenticate or cancel their payment on
* the payment method's app or site. If you'd prefer to redirect to a mobile application, you can
* alternatively supply an application URI scheme. This parameter is only used for cards and other
* redirect-based payment methods.
*/
@SerializedName("return_url")
String returnUrl;
/**
* Indicates that you intend to make future payments with this PaymentIntent's payment method.
*
* If you provide a Customer with the PaymentIntent, you can use this parameter to attach the payment method to the
* Customer after the PaymentIntent is confirmed and the customer completes any required actions.
* If you don't provide a Customer, you can still attach the payment method to a
* Customer after the transaction completes.
*
*
If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates and
* attaches a generated_card
* payment method representing the card to the Customer instead.
*
*
When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
* with regional legislation and network rules, such as SCA.
*
*
If you've already set {@code setup_future_usage} and you're performing a request using a
* publishable key, you can only update the value from {@code on_session} to {@code off_session}.
*/
@SerializedName("setup_future_usage")
ApiRequestParams.EnumParam setupFutureUsage;
/** Shipping information for this PaymentIntent. */
@SerializedName("shipping")
Object shipping;
/**
* Set to {@code true} when confirming server-side and using Stripe.js, iOS, or Android
* client-side SDKs to handle the next actions.
*/
@SerializedName("use_stripe_sdk")
Boolean useStripeSdk;
private PaymentIntentConfirmParams(
CaptureMethod captureMethod,
String confirmationToken,
Boolean errorOnRequiresAction,
List expand,
Map extraParams,
String mandate,
Object mandateData,
Object offSession,
String paymentMethod,
PaymentMethodData paymentMethodData,
PaymentMethodOptions paymentMethodOptions,
List paymentMethodTypes,
RadarOptions radarOptions,
Object receiptEmail,
String returnUrl,
ApiRequestParams.EnumParam setupFutureUsage,
Object shipping,
Boolean useStripeSdk) {
this.captureMethod = captureMethod;
this.confirmationToken = confirmationToken;
this.errorOnRequiresAction = errorOnRequiresAction;
this.expand = expand;
this.extraParams = extraParams;
this.mandate = mandate;
this.mandateData = mandateData;
this.offSession = offSession;
this.paymentMethod = paymentMethod;
this.paymentMethodData = paymentMethodData;
this.paymentMethodOptions = paymentMethodOptions;
this.paymentMethodTypes = paymentMethodTypes;
this.radarOptions = radarOptions;
this.receiptEmail = receiptEmail;
this.returnUrl = returnUrl;
this.setupFutureUsage = setupFutureUsage;
this.shipping = shipping;
this.useStripeSdk = useStripeSdk;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private CaptureMethod captureMethod;
private String confirmationToken;
private Boolean errorOnRequiresAction;
private List expand;
private Map extraParams;
private String mandate;
private Object mandateData;
private Object offSession;
private String paymentMethod;
private PaymentMethodData paymentMethodData;
private PaymentMethodOptions paymentMethodOptions;
private List paymentMethodTypes;
private RadarOptions radarOptions;
private Object receiptEmail;
private String returnUrl;
private ApiRequestParams.EnumParam setupFutureUsage;
private Object shipping;
private Boolean useStripeSdk;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams build() {
return new PaymentIntentConfirmParams(
this.captureMethod,
this.confirmationToken,
this.errorOnRequiresAction,
this.expand,
this.extraParams,
this.mandate,
this.mandateData,
this.offSession,
this.paymentMethod,
this.paymentMethodData,
this.paymentMethodOptions,
this.paymentMethodTypes,
this.radarOptions,
this.receiptEmail,
this.returnUrl,
this.setupFutureUsage,
this.shipping,
this.useStripeSdk);
}
/** Controls when the funds will be captured from the customer's account. */
public Builder setCaptureMethod(PaymentIntentConfirmParams.CaptureMethod captureMethod) {
this.captureMethod = captureMethod;
return this;
}
/**
* ID of the ConfirmationToken used to confirm this PaymentIntent.
*
* If the provided ConfirmationToken contains properties that are also being provided in this
* request, such as {@code payment_method}, then the values in this request will take
* precedence.
*/
public Builder setConfirmationToken(String confirmationToken) {
this.confirmationToken = confirmationToken;
return this;
}
/**
* Set to {@code true} to fail the payment attempt if the PaymentIntent transitions into {@code
* requires_action}. This parameter is intended for simpler integrations that do not handle
* customer actions, like saving cards without
* authentication.
*/
public Builder setErrorOnRequiresAction(Boolean errorOnRequiresAction) {
this.errorOnRequiresAction = errorOnRequiresAction;
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
* PaymentIntentConfirmParams#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
* PaymentIntentConfirmParams#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
* PaymentIntentConfirmParams#extraParams} for the field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
* See {@link PaymentIntentConfirmParams#extraParams} for the field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
/** ID of the mandate that's used for this payment. */
public Builder setMandate(String mandate) {
this.mandate = mandate;
return this;
}
public Builder setMandateData(PaymentIntentConfirmParams.MandateData mandateData) {
this.mandateData = mandateData;
return this;
}
public Builder setMandateData(EmptyParam mandateData) {
this.mandateData = mandateData;
return this;
}
/**
* Set to {@code true} to indicate that the customer isn't in your checkout flow during this
* payment attempt and can't authenticate. Use this parameter in scenarios where you collect
* card details and charge
* them later.
*/
public Builder setOffSession(Boolean offSession) {
this.offSession = offSession;
return this;
}
/**
* Set to {@code true} to indicate that the customer isn't in your checkout flow during this
* payment attempt and can't authenticate. Use this parameter in scenarios where you collect
* card details and charge
* them later.
*/
public Builder setOffSession(PaymentIntentConfirmParams.OffSession offSession) {
this.offSession = offSession;
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;
}
/**
* 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(
PaymentIntentConfirmParams.PaymentMethodData paymentMethodData) {
this.paymentMethodData = paymentMethodData;
return this;
}
/** Payment method-specific configuration for this PaymentIntent. */
public Builder setPaymentMethodOptions(
PaymentIntentConfirmParams.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
* PaymentIntentConfirmParams#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 PaymentIntentConfirmParams#paymentMethodTypes} for the field documentation.
*/
public Builder addAllPaymentMethodType(List elements) {
if (this.paymentMethodTypes == null) {
this.paymentMethodTypes = new ArrayList<>();
}
this.paymentMethodTypes.addAll(elements);
return this;
}
/**
* Options to configure Radar. Learn more about Radar Sessions.
*/
public Builder setRadarOptions(PaymentIntentConfirmParams.RadarOptions radarOptions) {
this.radarOptions = radarOptions;
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;
}
/**
* The URL to redirect your customer back to after they authenticate or cancel their payment on
* the payment method's app or site. If you'd prefer to redirect to a mobile application, you
* can alternatively supply an application URI scheme. This parameter is only used for cards and
* other redirect-based payment methods.
*/
public Builder setReturnUrl(String returnUrl) {
this.returnUrl = returnUrl;
return this;
}
/**
* Indicates that you intend to make future payments with this PaymentIntent's payment method.
*
* If you provide a Customer with the PaymentIntent, you can use this parameter to attach the payment method to the
* Customer after the PaymentIntent is confirmed and the customer completes any required
* actions. If you don't provide a Customer, you can still attach the payment method to a
* Customer after the transaction completes.
*
*
If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
* and attaches a generated_card
* payment method representing the card to the Customer instead.
*
*
When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
* with regional legislation and network rules, such as SCA.
*
*
If you've already set {@code setup_future_usage} and you're performing a request using a
* publishable key, you can only update the value from {@code on_session} to {@code
* off_session}.
*/
public Builder setSetupFutureUsage(
PaymentIntentConfirmParams.SetupFutureUsage setupFutureUsage) {
this.setupFutureUsage = setupFutureUsage;
return this;
}
/**
* Indicates that you intend to make future payments with this PaymentIntent's payment method.
*
*
If you provide a Customer with the PaymentIntent, you can use this parameter to attach the payment method to the
* Customer after the PaymentIntent is confirmed and the customer completes any required
* actions. If you don't provide a Customer, you can still attach the payment method to a
* Customer after the transaction completes.
*
*
If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
* and attaches a generated_card
* payment method representing the card to the Customer instead.
*
*
When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
* with regional legislation and network rules, such as SCA.
*
*
If you've already set {@code setup_future_usage} and you're performing a request using a
* publishable key, you can only update the value from {@code on_session} to {@code
* off_session}.
*/
public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) {
this.setupFutureUsage = setupFutureUsage;
return this;
}
/** Shipping information for this PaymentIntent. */
public Builder setShipping(PaymentIntentConfirmParams.Shipping shipping) {
this.shipping = shipping;
return this;
}
/** Shipping information for this PaymentIntent. */
public Builder setShipping(EmptyParam shipping) {
this.shipping = shipping;
return this;
}
/**
* Set to {@code true} when confirming server-side and using Stripe.js, iOS, or Android
* client-side SDKs to handle the next actions.
*/
public Builder setUseStripeSdk(Boolean useStripeSdk) {
this.useStripeSdk = useStripeSdk;
return this;
}
}
@Getter
public static class MandateData {
/** This hash contains details about the customer acceptance of the Mandate. */
@SerializedName("customer_acceptance")
CustomerAcceptance customerAcceptance;
/**
* 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 MandateData(CustomerAcceptance customerAcceptance, Map extraParams) {
this.customerAcceptance = customerAcceptance;
this.extraParams = extraParams;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private CustomerAcceptance customerAcceptance;
private Map extraParams;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.MandateData build() {
return new PaymentIntentConfirmParams.MandateData(
this.customerAcceptance, this.extraParams);
}
/** This hash contains details about the customer acceptance of the Mandate. */
public Builder setCustomerAcceptance(
PaymentIntentConfirmParams.MandateData.CustomerAcceptance customerAcceptance) {
this.customerAcceptance = customerAcceptance;
return this;
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
* call, and subsequent calls add additional key/value pairs to the original map. See {@link
* PaymentIntentConfirmParams.MandateData#extraParams} for the field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
* See {@link PaymentIntentConfirmParams.MandateData#extraParams} for the field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
}
@Getter
public static class CustomerAcceptance {
/** The time at which the customer accepted the Mandate. */
@SerializedName("accepted_at")
Long acceptedAt;
/**
* 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 Mandate accepted offline, this hash contains details about the offline
* acceptance.
*/
@SerializedName("offline")
Offline offline;
/**
* If this is a Mandate accepted online, this hash contains details about the online
* acceptance.
*/
@SerializedName("online")
Online online;
/**
* Required. The type of customer acceptance information included with the
* Mandate. One of {@code online} or {@code offline}.
*/
@SerializedName("type")
Type type;
private CustomerAcceptance(
Long acceptedAt,
Map extraParams,
Offline offline,
Online online,
Type type) {
this.acceptedAt = acceptedAt;
this.extraParams = extraParams;
this.offline = offline;
this.online = online;
this.type = type;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Long acceptedAt;
private Map extraParams;
private Offline offline;
private Online online;
private Type type;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.MandateData.CustomerAcceptance build() {
return new PaymentIntentConfirmParams.MandateData.CustomerAcceptance(
this.acceptedAt, this.extraParams, this.offline, this.online, this.type);
}
/** The time at which the customer accepted the Mandate. */
public Builder setAcceptedAt(Long acceptedAt) {
this.acceptedAt = acceptedAt;
return this;
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.MandateData.CustomerAcceptance#extraParams}
* for the field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.MandateData.CustomerAcceptance#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 Mandate accepted offline, this hash contains details about the offline
* acceptance.
*/
public Builder setOffline(
PaymentIntentConfirmParams.MandateData.CustomerAcceptance.Offline offline) {
this.offline = offline;
return this;
}
/**
* If this is a Mandate accepted online, this hash contains details about the online
* acceptance.
*/
public Builder setOnline(
PaymentIntentConfirmParams.MandateData.CustomerAcceptance.Online online) {
this.online = online;
return this;
}
/**
* Required. The type of customer acceptance information included with the
* Mandate. One of {@code online} or {@code offline}.
*/
public Builder setType(
PaymentIntentConfirmParams.MandateData.CustomerAcceptance.Type type) {
this.type = type;
return this;
}
}
@Getter
public static class Offline {
/**
* 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 Offline(Map extraParams) {
this.extraParams = extraParams;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Map extraParams;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.MandateData.CustomerAcceptance.Offline build() {
return new PaymentIntentConfirmParams.MandateData.CustomerAcceptance.Offline(
this.extraParams);
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link
* PaymentIntentConfirmParams.MandateData.CustomerAcceptance.Offline#extraParams} for the
* field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link
* PaymentIntentConfirmParams.MandateData.CustomerAcceptance.Offline#extraParams} for the
* field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
}
}
@Getter
public static class Online {
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
* Instead, each key/value pair is serialized as if the key is a root-level field
* (serialized) name in this param object. Effectively, this map is flattened to its parent
* instance.
*/
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
/** The IP address from which the Mandate was accepted by the customer. */
@SerializedName("ip_address")
String ipAddress;
/** The user agent of the browser from which the Mandate was accepted by the customer. */
@SerializedName("user_agent")
String userAgent;
private Online(Map extraParams, String ipAddress, String userAgent) {
this.extraParams = extraParams;
this.ipAddress = ipAddress;
this.userAgent = userAgent;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Map extraParams;
private String ipAddress;
private String userAgent;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.MandateData.CustomerAcceptance.Online build() {
return new PaymentIntentConfirmParams.MandateData.CustomerAcceptance.Online(
this.extraParams, this.ipAddress, this.userAgent);
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link
* PaymentIntentConfirmParams.MandateData.CustomerAcceptance.Online#extraParams} for the
* field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link
* PaymentIntentConfirmParams.MandateData.CustomerAcceptance.Online#extraParams} for the
* field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
/** The IP address from which the Mandate was accepted by the customer. */
public Builder setIpAddress(String ipAddress) {
this.ipAddress = ipAddress;
return this;
}
/** The user agent of the browser from which the Mandate was accepted by the customer. */
public Builder setUserAgent(String userAgent) {
this.userAgent = userAgent;
return this;
}
}
}
public enum Type implements ApiRequestParams.EnumParam {
@SerializedName("offline")
OFFLINE("offline"),
@SerializedName("online")
ONLINE("online");
@Getter(onMethod_ = {@Override})
private final String value;
Type(String value) {
this.value = value;
}
}
}
}
@Getter
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 affirm} PaymentMethod, this hash contains details about the Affirm
* payment method.
*/
@SerializedName("affirm")
Affirm affirm;
/**
* 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;
/**
* This field indicates whether this payment method can be shown again to its customer in a
* checkout flow. Stripe products such as Checkout and Elements use this field to determine
* whether a payment method can be shown as a saved payment method in a checkout flow. The field
* defaults to {@code unspecified}.
*/
@SerializedName("allow_redisplay")
AllowRedisplay allowRedisplay;
/**
* If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment
* method.
*/
@SerializedName("amazon_pay")
AmazonPay amazonPay;
/**
* 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 blik} PaymentMethod, this hash contains details about the BLIK payment
* method.
*/
@SerializedName("blik")
Blik blik;
/**
* If this is a {@code boleto} PaymentMethod, this hash contains details about the Boleto
* payment method.
*/
@SerializedName("boleto")
Boleto boleto;
/**
* If this is a {@code cashapp} PaymentMethod, this hash contains details about the Cash App Pay
* payment method.
*/
@SerializedName("cashapp")
Cashapp cashapp;
/**
* If this is a {@code customer_balance} PaymentMethod, this hash contains details about the
* CustomerBalance payment method.
*/
@SerializedName("customer_balance")
CustomerBalance customerBalance;
/**
* 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;
/**
* If this is a {@code konbini} PaymentMethod, this hash contains details about the Konbini
* payment method.
*/
@SerializedName("konbini")
Konbini konbini;
/**
* If this is an {@code Link} PaymentMethod, this hash contains details about the Link payment
* method.
*/
@SerializedName("link")
Link link;
/**
* 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 a {@code mobilepay} PaymentMethod, this hash contains details about the MobilePay
* payment method.
*/
@SerializedName("mobilepay")
Mobilepay mobilepay;
/**
* If this is a {@code multibanco} PaymentMethod, this hash contains details about the
* Multibanco payment method.
*/
@SerializedName("multibanco")
Multibanco multibanco;
/**
* 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 paynow} PaymentMethod, this hash contains details about the PayNow
* payment method.
*/
@SerializedName("paynow")
Paynow paynow;
/**
* If this is a {@code paypal} PaymentMethod, this hash contains details about the PayPal
* payment method.
*/
@SerializedName("paypal")
Paypal paypal;
/**
* If this is a {@code pix} PaymentMethod, this hash contains details about the Pix payment
* method.
*/
@SerializedName("pix")
Pix pix;
/**
* If this is a {@code promptpay} PaymentMethod, this hash contains details about the PromptPay
* payment method.
*/
@SerializedName("promptpay")
Promptpay promptpay;
/**
* Options to configure Radar. See Radar
* Session for more information.
*/
@SerializedName("radar_options")
RadarOptions radarOptions;
/**
* If this is a {@code Revolut Pay} PaymentMethod, this hash contains details about the Revolut
* Pay payment method.
*/
@SerializedName("revolut_pay")
RevolutPay revolutPay;
/**
* 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;
/**
* If this is a {@code swish} PaymentMethod, this hash contains details about the Swish payment
* method.
*/
@SerializedName("swish")
Swish swish;
/**
* If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method.
*/
@SerializedName("twint")
Twint twint;
/**
* Required. 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 us_bank_account} PaymentMethod, this hash contains details about the US
* bank account payment method.
*/
@SerializedName("us_bank_account")
UsBankAccount usBankAccount;
/**
* If this is an {@code wechat_pay} PaymentMethod, this hash contains details about the
* wechat_pay payment method.
*/
@SerializedName("wechat_pay")
WechatPay wechatPay;
/**
* If this is a {@code zip} PaymentMethod, this hash contains details about the Zip payment
* method.
*/
@SerializedName("zip")
Zip zip;
private PaymentMethodData(
AcssDebit acssDebit,
Affirm affirm,
AfterpayClearpay afterpayClearpay,
Alipay alipay,
AllowRedisplay allowRedisplay,
AmazonPay amazonPay,
AuBecsDebit auBecsDebit,
BacsDebit bacsDebit,
Bancontact bancontact,
BillingDetails billingDetails,
Blik blik,
Boleto boleto,
Cashapp cashapp,
CustomerBalance customerBalance,
Eps eps,
Map extraParams,
Fpx fpx,
Giropay giropay,
Grabpay grabpay,
Ideal ideal,
InteracPresent interacPresent,
Klarna klarna,
Konbini konbini,
Link link,
Map metadata,
Mobilepay mobilepay,
Multibanco multibanco,
Oxxo oxxo,
P24 p24,
Paynow paynow,
Paypal paypal,
Pix pix,
Promptpay promptpay,
RadarOptions radarOptions,
RevolutPay revolutPay,
SepaDebit sepaDebit,
Sofort sofort,
Swish swish,
Twint twint,
Type type,
UsBankAccount usBankAccount,
WechatPay wechatPay,
Zip zip) {
this.acssDebit = acssDebit;
this.affirm = affirm;
this.afterpayClearpay = afterpayClearpay;
this.alipay = alipay;
this.allowRedisplay = allowRedisplay;
this.amazonPay = amazonPay;
this.auBecsDebit = auBecsDebit;
this.bacsDebit = bacsDebit;
this.bancontact = bancontact;
this.billingDetails = billingDetails;
this.blik = blik;
this.boleto = boleto;
this.cashapp = cashapp;
this.customerBalance = customerBalance;
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.konbini = konbini;
this.link = link;
this.metadata = metadata;
this.mobilepay = mobilepay;
this.multibanco = multibanco;
this.oxxo = oxxo;
this.p24 = p24;
this.paynow = paynow;
this.paypal = paypal;
this.pix = pix;
this.promptpay = promptpay;
this.radarOptions = radarOptions;
this.revolutPay = revolutPay;
this.sepaDebit = sepaDebit;
this.sofort = sofort;
this.swish = swish;
this.twint = twint;
this.type = type;
this.usBankAccount = usBankAccount;
this.wechatPay = wechatPay;
this.zip = zip;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private AcssDebit acssDebit;
private Affirm affirm;
private AfterpayClearpay afterpayClearpay;
private Alipay alipay;
private AllowRedisplay allowRedisplay;
private AmazonPay amazonPay;
private AuBecsDebit auBecsDebit;
private BacsDebit bacsDebit;
private Bancontact bancontact;
private BillingDetails billingDetails;
private Blik blik;
private Boleto boleto;
private Cashapp cashapp;
private CustomerBalance customerBalance;
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 Konbini konbini;
private Link link;
private Map metadata;
private Mobilepay mobilepay;
private Multibanco multibanco;
private Oxxo oxxo;
private P24 p24;
private Paynow paynow;
private Paypal paypal;
private Pix pix;
private Promptpay promptpay;
private RadarOptions radarOptions;
private RevolutPay revolutPay;
private SepaDebit sepaDebit;
private Sofort sofort;
private Swish swish;
private Twint twint;
private Type type;
private UsBankAccount usBankAccount;
private WechatPay wechatPay;
private Zip zip;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentMethodData build() {
return new PaymentIntentConfirmParams.PaymentMethodData(
this.acssDebit,
this.affirm,
this.afterpayClearpay,
this.alipay,
this.allowRedisplay,
this.amazonPay,
this.auBecsDebit,
this.bacsDebit,
this.bancontact,
this.billingDetails,
this.blik,
this.boleto,
this.cashapp,
this.customerBalance,
this.eps,
this.extraParams,
this.fpx,
this.giropay,
this.grabpay,
this.ideal,
this.interacPresent,
this.klarna,
this.konbini,
this.link,
this.metadata,
this.mobilepay,
this.multibanco,
this.oxxo,
this.p24,
this.paynow,
this.paypal,
this.pix,
this.promptpay,
this.radarOptions,
this.revolutPay,
this.sepaDebit,
this.sofort,
this.swish,
this.twint,
this.type,
this.usBankAccount,
this.wechatPay,
this.zip);
}
/**
* If this is an {@code acss_debit} PaymentMethod, this hash contains details about the ACSS
* Debit payment method.
*/
public Builder setAcssDebit(
PaymentIntentConfirmParams.PaymentMethodData.AcssDebit acssDebit) {
this.acssDebit = acssDebit;
return this;
}
/**
* If this is an {@code affirm} PaymentMethod, this hash contains details about the Affirm
* payment method.
*/
public Builder setAffirm(PaymentIntentConfirmParams.PaymentMethodData.Affirm affirm) {
this.affirm = affirm;
return this;
}
/**
* If this is an {@code AfterpayClearpay} PaymentMethod, this hash contains details about the
* AfterpayClearpay payment method.
*/
public Builder setAfterpayClearpay(
PaymentIntentConfirmParams.PaymentMethodData.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(PaymentIntentConfirmParams.PaymentMethodData.Alipay alipay) {
this.alipay = alipay;
return this;
}
/**
* This field indicates whether this payment method can be shown again to its customer in a
* checkout flow. Stripe products such as Checkout and Elements use this field to determine
* whether a payment method can be shown as a saved payment method in a checkout flow. The
* field defaults to {@code unspecified}.
*/
public Builder setAllowRedisplay(
PaymentIntentConfirmParams.PaymentMethodData.AllowRedisplay allowRedisplay) {
this.allowRedisplay = allowRedisplay;
return this;
}
/**
* If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay
* payment method.
*/
public Builder setAmazonPay(
PaymentIntentConfirmParams.PaymentMethodData.AmazonPay amazonPay) {
this.amazonPay = amazonPay;
return this;
}
/**
* If this is an {@code au_becs_debit} PaymentMethod, this hash contains details about the
* bank account.
*/
public Builder setAuBecsDebit(
PaymentIntentConfirmParams.PaymentMethodData.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(
PaymentIntentConfirmParams.PaymentMethodData.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(
PaymentIntentConfirmParams.PaymentMethodData.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(
PaymentIntentConfirmParams.PaymentMethodData.BillingDetails billingDetails) {
this.billingDetails = billingDetails;
return this;
}
/**
* If this is a {@code blik} PaymentMethod, this hash contains details about the BLIK payment
* method.
*/
public Builder setBlik(PaymentIntentConfirmParams.PaymentMethodData.Blik blik) {
this.blik = blik;
return this;
}
/**
* If this is a {@code boleto} PaymentMethod, this hash contains details about the Boleto
* payment method.
*/
public Builder setBoleto(PaymentIntentConfirmParams.PaymentMethodData.Boleto boleto) {
this.boleto = boleto;
return this;
}
/**
* If this is a {@code cashapp} PaymentMethod, this hash contains details about the Cash App
* Pay payment method.
*/
public Builder setCashapp(PaymentIntentConfirmParams.PaymentMethodData.Cashapp cashapp) {
this.cashapp = cashapp;
return this;
}
/**
* If this is a {@code customer_balance} PaymentMethod, this hash contains details about the
* CustomerBalance payment method.
*/
public Builder setCustomerBalance(
PaymentIntentConfirmParams.PaymentMethodData.CustomerBalance customerBalance) {
this.customerBalance = customerBalance;
return this;
}
/**
* If this is an {@code eps} PaymentMethod, this hash contains details about the EPS payment
* method.
*/
public Builder setEps(PaymentIntentConfirmParams.PaymentMethodData.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
* PaymentIntentConfirmParams.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 PaymentIntentConfirmParams.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(PaymentIntentConfirmParams.PaymentMethodData.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(PaymentIntentConfirmParams.PaymentMethodData.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(PaymentIntentConfirmParams.PaymentMethodData.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(PaymentIntentConfirmParams.PaymentMethodData.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(
PaymentIntentConfirmParams.PaymentMethodData.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(PaymentIntentConfirmParams.PaymentMethodData.Klarna klarna) {
this.klarna = klarna;
return this;
}
/**
* If this is a {@code konbini} PaymentMethod, this hash contains details about the Konbini
* payment method.
*/
public Builder setKonbini(PaymentIntentConfirmParams.PaymentMethodData.Konbini konbini) {
this.konbini = konbini;
return this;
}
/**
* If this is an {@code Link} PaymentMethod, this hash contains details about the Link payment
* method.
*/
public Builder setLink(PaymentIntentConfirmParams.PaymentMethodData.Link link) {
this.link = link;
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
* PaymentIntentConfirmParams.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 PaymentIntentConfirmParams.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 a {@code mobilepay} PaymentMethod, this hash contains details about the
* MobilePay payment method.
*/
public Builder setMobilepay(
PaymentIntentConfirmParams.PaymentMethodData.Mobilepay mobilepay) {
this.mobilepay = mobilepay;
return this;
}
/**
* If this is a {@code multibanco} PaymentMethod, this hash contains details about the
* Multibanco payment method.
*/
public Builder setMultibanco(
PaymentIntentConfirmParams.PaymentMethodData.Multibanco multibanco) {
this.multibanco = multibanco;
return this;
}
/**
* If this is an {@code oxxo} PaymentMethod, this hash contains details about the OXXO payment
* method.
*/
public Builder setOxxo(PaymentIntentConfirmParams.PaymentMethodData.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(PaymentIntentConfirmParams.PaymentMethodData.P24 p24) {
this.p24 = p24;
return this;
}
/**
* If this is a {@code paynow} PaymentMethod, this hash contains details about the PayNow
* payment method.
*/
public Builder setPaynow(PaymentIntentConfirmParams.PaymentMethodData.Paynow paynow) {
this.paynow = paynow;
return this;
}
/**
* If this is a {@code paypal} PaymentMethod, this hash contains details about the PayPal
* payment method.
*/
public Builder setPaypal(PaymentIntentConfirmParams.PaymentMethodData.Paypal paypal) {
this.paypal = paypal;
return this;
}
/**
* If this is a {@code pix} PaymentMethod, this hash contains details about the Pix payment
* method.
*/
public Builder setPix(PaymentIntentConfirmParams.PaymentMethodData.Pix pix) {
this.pix = pix;
return this;
}
/**
* If this is a {@code promptpay} PaymentMethod, this hash contains details about the
* PromptPay payment method.
*/
public Builder setPromptpay(
PaymentIntentConfirmParams.PaymentMethodData.Promptpay promptpay) {
this.promptpay = promptpay;
return this;
}
/**
* Options to configure Radar. See Radar
* Session for more information.
*/
public Builder setRadarOptions(
PaymentIntentConfirmParams.PaymentMethodData.RadarOptions radarOptions) {
this.radarOptions = radarOptions;
return this;
}
/**
* If this is a {@code Revolut Pay} PaymentMethod, this hash contains details about the
* Revolut Pay payment method.
*/
public Builder setRevolutPay(
PaymentIntentConfirmParams.PaymentMethodData.RevolutPay revolutPay) {
this.revolutPay = revolutPay;
return this;
}
/**
* If this is a {@code sepa_debit} PaymentMethod, this hash contains details about the SEPA
* debit bank account.
*/
public Builder setSepaDebit(
PaymentIntentConfirmParams.PaymentMethodData.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(PaymentIntentConfirmParams.PaymentMethodData.Sofort sofort) {
this.sofort = sofort;
return this;
}
/**
* If this is a {@code swish} PaymentMethod, this hash contains details about the Swish
* payment method.
*/
public Builder setSwish(PaymentIntentConfirmParams.PaymentMethodData.Swish swish) {
this.swish = swish;
return this;
}
/**
* If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment
* method.
*/
public Builder setTwint(PaymentIntentConfirmParams.PaymentMethodData.Twint twint) {
this.twint = twint;
return this;
}
/**
* Required. 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(PaymentIntentConfirmParams.PaymentMethodData.Type type) {
this.type = type;
return this;
}
/**
* If this is an {@code us_bank_account} PaymentMethod, this hash contains details about the
* US bank account payment method.
*/
public Builder setUsBankAccount(
PaymentIntentConfirmParams.PaymentMethodData.UsBankAccount usBankAccount) {
this.usBankAccount = usBankAccount;
return this;
}
/**
* If this is an {@code wechat_pay} PaymentMethod, this hash contains details about the
* wechat_pay payment method.
*/
public Builder setWechatPay(
PaymentIntentConfirmParams.PaymentMethodData.WechatPay wechatPay) {
this.wechatPay = wechatPay;
return this;
}
/**
* If this is a {@code zip} PaymentMethod, this hash contains details about the Zip payment
* method.
*/
public Builder setZip(PaymentIntentConfirmParams.PaymentMethodData.Zip zip) {
this.zip = zip;
return this;
}
}
@Getter
public static class AcssDebit {
/** Required. Customer's bank account number. */
@SerializedName("account_number")
String 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;
/** Required. Institution number of the customer's bank. */
@SerializedName("institution_number")
String institutionNumber;
/** Required. Transit number of the customer's bank. */
@SerializedName("transit_number")
String transitNumber;
private AcssDebit(
String accountNumber,
Map extraParams,
String institutionNumber,
String 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 String accountNumber;
private Map extraParams;
private String institutionNumber;
private String transitNumber;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentMethodData.AcssDebit build() {
return new PaymentIntentConfirmParams.PaymentMethodData.AcssDebit(
this.accountNumber, this.extraParams, this.institutionNumber, this.transitNumber);
}
/** Required. Customer's bank account number. */
public Builder setAccountNumber(String 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 PaymentIntentConfirmParams.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 PaymentIntentConfirmParams.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;
}
/** Required. Institution number of the customer's bank. */
public Builder setInstitutionNumber(String institutionNumber) {
this.institutionNumber = institutionNumber;
return this;
}
/** Required. Transit number of the customer's bank. */
public Builder setTransitNumber(String transitNumber) {
this.transitNumber = transitNumber;
return this;
}
}
}
@Getter
public static class Affirm {
/**
* 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 Affirm(Map extraParams) {
this.extraParams = extraParams;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Map extraParams;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentMethodData.Affirm build() {
return new PaymentIntentConfirmParams.PaymentMethodData.Affirm(this.extraParams);
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Affirm#extraParams} for the
* field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Affirm#extraParams} for the
* field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
}
}
@Getter
public static class 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 PaymentIntentConfirmParams.PaymentMethodData.AfterpayClearpay build() {
return new PaymentIntentConfirmParams.PaymentMethodData.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
* PaymentIntentConfirmParams.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;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link
* PaymentIntentConfirmParams.PaymentMethodData.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;
}
}
}
@Getter
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 PaymentIntentConfirmParams.PaymentMethodData.Alipay build() {
return new PaymentIntentConfirmParams.PaymentMethodData.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 PaymentIntentConfirmParams.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;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Alipay#extraParams} for the
* field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
}
}
@Getter
public static class AmazonPay {
/**
* 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 AmazonPay(Map extraParams) {
this.extraParams = extraParams;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Map extraParams;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentMethodData.AmazonPay build() {
return new PaymentIntentConfirmParams.PaymentMethodData.AmazonPay(this.extraParams);
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.AmazonPay#extraParams} for
* the field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.AmazonPay#extraParams} for
* the field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
}
}
@Getter
public static class AuBecsDebit {
/** Required. The account number for the bank account. */
@SerializedName("account_number")
String accountNumber;
/** Required. Bank-State-Branch number of the bank account. */
@SerializedName("bsb_number")
String 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(String accountNumber, String bsbNumber, Map extraParams) {
this.accountNumber = accountNumber;
this.bsbNumber = bsbNumber;
this.extraParams = extraParams;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private String accountNumber;
private String bsbNumber;
private Map extraParams;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentMethodData.AuBecsDebit build() {
return new PaymentIntentConfirmParams.PaymentMethodData.AuBecsDebit(
this.accountNumber, this.bsbNumber, this.extraParams);
}
/** Required. The account number for the bank account. */
public Builder setAccountNumber(String accountNumber) {
this.accountNumber = accountNumber;
return this;
}
/** Required. Bank-State-Branch number of the bank account. */
public Builder setBsbNumber(String 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 PaymentIntentConfirmParams.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;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.AuBecsDebit#extraParams} for
* the field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
}
}
@Getter
public static class BacsDebit {
/** Account number of the bank account that the funds will be debited from. */
@SerializedName("account_number")
String 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")
String sortCode;
private BacsDebit(String accountNumber, Map extraParams, String sortCode) {
this.accountNumber = accountNumber;
this.extraParams = extraParams;
this.sortCode = sortCode;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private String accountNumber;
private Map extraParams;
private String sortCode;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentMethodData.BacsDebit build() {
return new PaymentIntentConfirmParams.PaymentMethodData.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;
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.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 PaymentIntentConfirmParams.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;
}
}
}
@Getter
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 PaymentIntentConfirmParams.PaymentMethodData.Bancontact build() {
return new PaymentIntentConfirmParams.PaymentMethodData.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 PaymentIntentConfirmParams.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;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.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;
}
}
}
@Getter
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 PaymentIntentConfirmParams.PaymentMethodData.BillingDetails build() {
return new PaymentIntentConfirmParams.PaymentMethodData.BillingDetails(
this.address, this.email, this.extraParams, this.name, this.phone);
}
/** Billing address. */
public Builder setAddress(
PaymentIntentConfirmParams.PaymentMethodData.BillingDetails.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 PaymentIntentConfirmParams.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 PaymentIntentConfirmParams.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;
}
}
@Getter
public static class Address {
/** City, district, suburb, town, or village. */
@SerializedName("city")
String city;
/**
* Two-letter country code (ISO
* 3166-1 alpha-2).
*/
@SerializedName("country")
String 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")
String line1;
/** Address line 2 (e.g., apartment, suite, unit, or building). */
@SerializedName("line2")
String line2;
/** ZIP or postal code. */
@SerializedName("postal_code")
String postalCode;
/** State, county, province, or region. */
@SerializedName("state")
String state;
private Address(
String city,
String country,
Map extraParams,
String line1,
String line2,
String postalCode,
String 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 String city;
private String country;
private Map extraParams;
private String line1;
private String line2;
private String postalCode;
private String state;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentMethodData.BillingDetails.Address build() {
return new PaymentIntentConfirmParams.PaymentMethodData.BillingDetails.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;
}
/**
* Two-letter country code (ISO
* 3166-1 alpha-2).
*/
public Builder setCountry(String 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
* PaymentIntentConfirmParams.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
* PaymentIntentConfirmParams.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 2 (e.g., apartment, suite, unit, or building). */
public Builder setLine2(String line2) {
this.line2 = line2;
return this;
}
/** ZIP or postal code. */
public Builder setPostalCode(String postalCode) {
this.postalCode = postalCode;
return this;
}
/** State, county, province, or region. */
public Builder setState(String state) {
this.state = state;
return this;
}
}
}
}
@Getter
public static class Blik {
/**
* 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 Blik(Map extraParams) {
this.extraParams = extraParams;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Map extraParams;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentMethodData.Blik build() {
return new PaymentIntentConfirmParams.PaymentMethodData.Blik(this.extraParams);
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Blik#extraParams} for the
* field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Blik#extraParams} for the
* field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
}
}
@Getter
public static class 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;
/**
* Required. The tax ID of the customer (CPF for individual consumers or CNPJ
* for businesses consumers)
*/
@SerializedName("tax_id")
String taxId;
private Boleto(Map extraParams, String taxId) {
this.extraParams = extraParams;
this.taxId = taxId;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Map extraParams;
private String taxId;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentMethodData.Boleto build() {
return new PaymentIntentConfirmParams.PaymentMethodData.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 PaymentIntentConfirmParams.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 PaymentIntentConfirmParams.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;
}
/**
* Required. 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;
}
}
}
@Getter
public static class Cashapp {
/**
* 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 Cashapp(Map extraParams) {
this.extraParams = extraParams;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Map extraParams;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentMethodData.Cashapp build() {
return new PaymentIntentConfirmParams.PaymentMethodData.Cashapp(this.extraParams);
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Cashapp#extraParams} for the
* field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Cashapp#extraParams} for the
* field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
}
}
@Getter
public static class CustomerBalance {
/**
* 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 CustomerBalance(Map extraParams) {
this.extraParams = extraParams;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Map extraParams;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentMethodData.CustomerBalance build() {
return new PaymentIntentConfirmParams.PaymentMethodData.CustomerBalance(this.extraParams);
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.CustomerBalance#extraParams}
* for the field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.CustomerBalance#extraParams}
* for the field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
}
}
@Getter
public static class 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 PaymentIntentConfirmParams.PaymentMethodData.Eps build() {
return new PaymentIntentConfirmParams.PaymentMethodData.Eps(this.bank, this.extraParams);
}
/** The customer's bank. */
public Builder setBank(PaymentIntentConfirmParams.PaymentMethodData.Eps.Bank bank) {
this.bank = bank;
return this;
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.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 PaymentIntentConfirmParams.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("deutsche_bank_ag")
DEUTSCHE_BANK_AG("deutsche_bank_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");
@Getter(onMethod_ = {@Override})
private final String value;
Bank(String value) {
this.value = value;
}
}
}
@Getter
public static class Fpx {
/** Account holder type for FPX transaction. */
@SerializedName("account_holder_type")
AccountHolderType accountHolderType;
/** Required. 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 PaymentIntentConfirmParams.PaymentMethodData.Fpx build() {
return new PaymentIntentConfirmParams.PaymentMethodData.Fpx(
this.accountHolderType, this.bank, this.extraParams);
}
/** Account holder type for FPX transaction. */
public Builder setAccountHolderType(
PaymentIntentConfirmParams.PaymentMethodData.Fpx.AccountHolderType accountHolderType) {
this.accountHolderType = accountHolderType;
return this;
}
/** Required. The customer's bank. */
public Builder setBank(PaymentIntentConfirmParams.PaymentMethodData.Fpx.Bank bank) {
this.bank = bank;
return this;
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.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 PaymentIntentConfirmParams.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");
@Getter(onMethod_ = {@Override})
private final String value;
AccountHolderType(String value) {
this.value = 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_of_china")
BANK_OF_CHINA("bank_of_china"),
@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");
@Getter(onMethod_ = {@Override})
private final String value;
Bank(String value) {
this.value = value;
}
}
}
@Getter
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 PaymentIntentConfirmParams.PaymentMethodData.Giropay build() {
return new PaymentIntentConfirmParams.PaymentMethodData.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 PaymentIntentConfirmParams.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;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Giropay#extraParams} for the
* field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
}
}
@Getter
public static class 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 PaymentIntentConfirmParams.PaymentMethodData.Grabpay build() {
return new PaymentIntentConfirmParams.PaymentMethodData.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 PaymentIntentConfirmParams.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;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Grabpay#extraParams} for the
* field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
}
}
@Getter
public static class 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 PaymentIntentConfirmParams.PaymentMethodData.Ideal build() {
return new PaymentIntentConfirmParams.PaymentMethodData.Ideal(
this.bank, this.extraParams);
}
/** The customer's bank. */
public Builder setBank(PaymentIntentConfirmParams.PaymentMethodData.Ideal.Bank bank) {
this.bank = bank;
return this;
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.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 PaymentIntentConfirmParams.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("n26")
N26("n26"),
@SerializedName("nn")
NN("nn"),
@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"),
@SerializedName("yoursafe")
YOURSAFE("yoursafe");
@Getter(onMethod_ = {@Override})
private final String value;
Bank(String value) {
this.value = value;
}
}
}
@Getter
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 PaymentIntentConfirmParams.PaymentMethodData.InteracPresent build() {
return new PaymentIntentConfirmParams.PaymentMethodData.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 PaymentIntentConfirmParams.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;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.InteracPresent#extraParams}
* for the field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
}
}
@Getter
public static class 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 PaymentIntentConfirmParams.PaymentMethodData.Klarna build() {
return new PaymentIntentConfirmParams.PaymentMethodData.Klarna(
this.dob, this.extraParams);
}
/** Customer's date of birth. */
public Builder setDob(PaymentIntentConfirmParams.PaymentMethodData.Klarna.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 PaymentIntentConfirmParams.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 PaymentIntentConfirmParams.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;
}
}
@Getter
public static class Dob {
/** Required. 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;
/** Required. The month of birth, between 1 and 12. */
@SerializedName("month")
Long month;
/** Required. 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 PaymentIntentConfirmParams.PaymentMethodData.Klarna.Dob build() {
return new PaymentIntentConfirmParams.PaymentMethodData.Klarna.Dob(
this.day, this.extraParams, this.month, this.year);
}
/** Required. 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 PaymentIntentConfirmParams.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 PaymentIntentConfirmParams.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;
}
/** Required. The month of birth, between 1 and 12. */
public Builder setMonth(Long month) {
this.month = month;
return this;
}
/** Required. The four-digit year of birth. */
public Builder setYear(Long year) {
this.year = year;
return this;
}
}
}
}
@Getter
public static class Konbini {
/**
* 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 Konbini(Map extraParams) {
this.extraParams = extraParams;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Map extraParams;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentMethodData.Konbini build() {
return new PaymentIntentConfirmParams.PaymentMethodData.Konbini(this.extraParams);
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Konbini#extraParams} for the
* field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Konbini#extraParams} for the
* field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
}
}
@Getter
public static class Link {
/**
* 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 Link(Map extraParams) {
this.extraParams = extraParams;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Map extraParams;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentMethodData.Link build() {
return new PaymentIntentConfirmParams.PaymentMethodData.Link(this.extraParams);
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Link#extraParams} for the
* field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Link#extraParams} for the
* field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
}
}
@Getter
public static class Mobilepay {
/**
* 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 Mobilepay(Map extraParams) {
this.extraParams = extraParams;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Map extraParams;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentMethodData.Mobilepay build() {
return new PaymentIntentConfirmParams.PaymentMethodData.Mobilepay(this.extraParams);
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Mobilepay#extraParams} for
* the field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Mobilepay#extraParams} for
* the field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
}
}
@Getter
public static class Multibanco {
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
* Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
* name in this param object. Effectively, this map is flattened to its parent instance.
*/
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
private Multibanco(Map extraParams) {
this.extraParams = extraParams;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Map extraParams;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentMethodData.Multibanco build() {
return new PaymentIntentConfirmParams.PaymentMethodData.Multibanco(this.extraParams);
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Multibanco#extraParams} for
* the field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Multibanco#extraParams} for
* the field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
}
}
@Getter
public static class 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 PaymentIntentConfirmParams.PaymentMethodData.Oxxo build() {
return new PaymentIntentConfirmParams.PaymentMethodData.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 PaymentIntentConfirmParams.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;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Oxxo#extraParams} for the
* field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
}
}
@Getter
public static class 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 PaymentIntentConfirmParams.PaymentMethodData.P24 build() {
return new PaymentIntentConfirmParams.PaymentMethodData.P24(this.bank, this.extraParams);
}
/** The customer's bank. */
public Builder setBank(PaymentIntentConfirmParams.PaymentMethodData.P24.Bank bank) {
this.bank = bank;
return this;
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.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 PaymentIntentConfirmParams.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("velobank")
VELOBANK("velobank"),
@SerializedName("volkswagen_bank")
VOLKSWAGEN_BANK("volkswagen_bank");
@Getter(onMethod_ = {@Override})
private final String value;
Bank(String value) {
this.value = value;
}
}
}
@Getter
public static class Paynow {
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
* Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
* name in this param object. Effectively, this map is flattened to its parent instance.
*/
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
private Paynow(Map extraParams) {
this.extraParams = extraParams;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Map extraParams;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentMethodData.Paynow build() {
return new PaymentIntentConfirmParams.PaymentMethodData.Paynow(this.extraParams);
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Paynow#extraParams} for the
* field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Paynow#extraParams} for the
* field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
}
}
@Getter
public static class Paypal {
/**
* 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 Paypal(Map extraParams) {
this.extraParams = extraParams;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Map extraParams;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentMethodData.Paypal build() {
return new PaymentIntentConfirmParams.PaymentMethodData.Paypal(this.extraParams);
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Paypal#extraParams} for the
* field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Paypal#extraParams} for the
* field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
}
}
@Getter
public static class Pix {
/**
* 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 Pix(Map extraParams) {
this.extraParams = extraParams;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Map extraParams;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentMethodData.Pix build() {
return new PaymentIntentConfirmParams.PaymentMethodData.Pix(this.extraParams);
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Pix#extraParams} for the
* field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Pix#extraParams} for the
* field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
}
}
@Getter
public static class Promptpay {
/**
* 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 Promptpay(Map extraParams) {
this.extraParams = extraParams;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Map extraParams;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentMethodData.Promptpay build() {
return new PaymentIntentConfirmParams.PaymentMethodData.Promptpay(this.extraParams);
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Promptpay#extraParams} for
* the field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Promptpay#extraParams} for
* the field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
}
}
@Getter
public static class RadarOptions {
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
* Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
* name in this param object. Effectively, this map is flattened to its parent instance.
*/
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
/**
* A Radar Session is a snapshot of
* the browser metadata and device details that help Radar make more accurate predictions on
* your payments.
*/
@SerializedName("session")
String session;
private RadarOptions(Map extraParams, String session) {
this.extraParams = extraParams;
this.session = session;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Map extraParams;
private String session;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentMethodData.RadarOptions build() {
return new PaymentIntentConfirmParams.PaymentMethodData.RadarOptions(
this.extraParams, this.session);
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.RadarOptions#extraParams}
* for the field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.RadarOptions#extraParams}
* for the field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
/**
* A Radar Session is a snapshot
* of the browser metadata and device details that help Radar make more accurate predictions
* on your payments.
*/
public Builder setSession(String session) {
this.session = session;
return this;
}
}
}
@Getter
public static class RevolutPay {
/**
* 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 RevolutPay(Map extraParams) {
this.extraParams = extraParams;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Map extraParams;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentMethodData.RevolutPay build() {
return new PaymentIntentConfirmParams.PaymentMethodData.RevolutPay(this.extraParams);
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.RevolutPay#extraParams} for
* the field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.RevolutPay#extraParams} for
* the field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
}
}
@Getter
public static class SepaDebit {
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
* Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
* name in this param object. Effectively, this map is flattened to its parent instance.
*/
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
/** Required. IBAN of the bank account. */
@SerializedName("iban")
String iban;
private SepaDebit(Map extraParams, String iban) {
this.extraParams = extraParams;
this.iban = iban;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Map extraParams;
private String iban;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentMethodData.SepaDebit build() {
return new PaymentIntentConfirmParams.PaymentMethodData.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 PaymentIntentConfirmParams.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 PaymentIntentConfirmParams.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;
}
/** Required. IBAN of the bank account. */
public Builder setIban(String iban) {
this.iban = iban;
return this;
}
}
}
@Getter
public static class Sofort {
/**
* Required. 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 PaymentIntentConfirmParams.PaymentMethodData.Sofort build() {
return new PaymentIntentConfirmParams.PaymentMethodData.Sofort(
this.country, this.extraParams);
}
/**
* Required. Two-letter ISO code representing the country the bank account
* is located in.
*/
public Builder setCountry(
PaymentIntentConfirmParams.PaymentMethodData.Sofort.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 PaymentIntentConfirmParams.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 PaymentIntentConfirmParams.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");
@Getter(onMethod_ = {@Override})
private final String value;
Country(String value) {
this.value = value;
}
}
}
@Getter
public static class Swish {
/**
* 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 Swish(Map extraParams) {
this.extraParams = extraParams;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Map extraParams;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentMethodData.Swish build() {
return new PaymentIntentConfirmParams.PaymentMethodData.Swish(this.extraParams);
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Swish#extraParams} for the
* field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Swish#extraParams} for the
* field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
}
}
@Getter
public static class Twint {
/**
* 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 Twint(Map extraParams) {
this.extraParams = extraParams;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Map extraParams;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentMethodData.Twint build() {
return new PaymentIntentConfirmParams.PaymentMethodData.Twint(this.extraParams);
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Twint#extraParams} for the
* field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Twint#extraParams} for the
* field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
}
}
@Getter
public static class UsBankAccount {
/** Account holder type: individual or company. */
@SerializedName("account_holder_type")
AccountHolderType accountHolderType;
/** Account number of the bank account. */
@SerializedName("account_number")
String accountNumber;
/** Account type: checkings or savings. Defaults to checking if omitted. */
@SerializedName("account_type")
AccountType accountType;
/**
* 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 ID of a Financial Connections Account to use as a payment method. */
@SerializedName("financial_connections_account")
String financialConnectionsAccount;
/** Routing number of the bank account. */
@SerializedName("routing_number")
String routingNumber;
private UsBankAccount(
AccountHolderType accountHolderType,
String accountNumber,
AccountType accountType,
Map extraParams,
String financialConnectionsAccount,
String routingNumber) {
this.accountHolderType = accountHolderType;
this.accountNumber = accountNumber;
this.accountType = accountType;
this.extraParams = extraParams;
this.financialConnectionsAccount = financialConnectionsAccount;
this.routingNumber = routingNumber;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private AccountHolderType accountHolderType;
private String accountNumber;
private AccountType accountType;
private Map extraParams;
private String financialConnectionsAccount;
private String routingNumber;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentMethodData.UsBankAccount build() {
return new PaymentIntentConfirmParams.PaymentMethodData.UsBankAccount(
this.accountHolderType,
this.accountNumber,
this.accountType,
this.extraParams,
this.financialConnectionsAccount,
this.routingNumber);
}
/** Account holder type: individual or company. */
public Builder setAccountHolderType(
PaymentIntentConfirmParams.PaymentMethodData.UsBankAccount.AccountHolderType
accountHolderType) {
this.accountHolderType = accountHolderType;
return this;
}
/** Account number of the bank account. */
public Builder setAccountNumber(String accountNumber) {
this.accountNumber = accountNumber;
return this;
}
/** Account type: checkings or savings. Defaults to checking if omitted. */
public Builder setAccountType(
PaymentIntentConfirmParams.PaymentMethodData.UsBankAccount.AccountType accountType) {
this.accountType = accountType;
return this;
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.UsBankAccount#extraParams}
* for the field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.UsBankAccount#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 ID of a Financial Connections Account to use as a payment method. */
public Builder setFinancialConnectionsAccount(String financialConnectionsAccount) {
this.financialConnectionsAccount = financialConnectionsAccount;
return this;
}
/** Routing number of the bank account. */
public Builder setRoutingNumber(String routingNumber) {
this.routingNumber = routingNumber;
return this;
}
}
public enum AccountHolderType implements ApiRequestParams.EnumParam {
@SerializedName("company")
COMPANY("company"),
@SerializedName("individual")
INDIVIDUAL("individual");
@Getter(onMethod_ = {@Override})
private final String value;
AccountHolderType(String value) {
this.value = value;
}
}
public enum AccountType implements ApiRequestParams.EnumParam {
@SerializedName("checking")
CHECKING("checking"),
@SerializedName("savings")
SAVINGS("savings");
@Getter(onMethod_ = {@Override})
private final String value;
AccountType(String value) {
this.value = value;
}
}
}
@Getter
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 PaymentIntentConfirmParams.PaymentMethodData.WechatPay build() {
return new PaymentIntentConfirmParams.PaymentMethodData.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 PaymentIntentConfirmParams.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;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.WechatPay#extraParams} for
* the field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
}
}
@Getter
public static class Zip {
/**
* 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 Zip(Map extraParams) {
this.extraParams = extraParams;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Map extraParams;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentMethodData.Zip build() {
return new PaymentIntentConfirmParams.PaymentMethodData.Zip(this.extraParams);
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Zip#extraParams} for the
* field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Zip#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 AllowRedisplay implements ApiRequestParams.EnumParam {
@SerializedName("always")
ALWAYS("always"),
@SerializedName("limited")
LIMITED("limited"),
@SerializedName("unspecified")
UNSPECIFIED("unspecified");
@Getter(onMethod_ = {@Override})
private final String value;
AllowRedisplay(String value) {
this.value = value;
}
}
public enum Type implements ApiRequestParams.EnumParam {
@SerializedName("acss_debit")
ACSS_DEBIT("acss_debit"),
@SerializedName("affirm")
AFFIRM("affirm"),
@SerializedName("afterpay_clearpay")
AFTERPAY_CLEARPAY("afterpay_clearpay"),
@SerializedName("alipay")
ALIPAY("alipay"),
@SerializedName("amazon_pay")
AMAZON_PAY("amazon_pay"),
@SerializedName("au_becs_debit")
AU_BECS_DEBIT("au_becs_debit"),
@SerializedName("bacs_debit")
BACS_DEBIT("bacs_debit"),
@SerializedName("bancontact")
BANCONTACT("bancontact"),
@SerializedName("blik")
BLIK("blik"),
@SerializedName("boleto")
BOLETO("boleto"),
@SerializedName("cashapp")
CASHAPP("cashapp"),
@SerializedName("customer_balance")
CUSTOMER_BALANCE("customer_balance"),
@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("konbini")
KONBINI("konbini"),
@SerializedName("link")
LINK("link"),
@SerializedName("mobilepay")
MOBILEPAY("mobilepay"),
@SerializedName("multibanco")
MULTIBANCO("multibanco"),
@SerializedName("oxxo")
OXXO("oxxo"),
@SerializedName("p24")
P24("p24"),
@SerializedName("paynow")
PAYNOW("paynow"),
@SerializedName("paypal")
PAYPAL("paypal"),
@SerializedName("pix")
PIX("pix"),
@SerializedName("promptpay")
PROMPTPAY("promptpay"),
@SerializedName("revolut_pay")
REVOLUT_PAY("revolut_pay"),
@SerializedName("sepa_debit")
SEPA_DEBIT("sepa_debit"),
@SerializedName("sofort")
SOFORT("sofort"),
@SerializedName("swish")
SWISH("swish"),
@SerializedName("twint")
TWINT("twint"),
@SerializedName("us_bank_account")
US_BANK_ACCOUNT("us_bank_account"),
@SerializedName("wechat_pay")
WECHAT_PAY("wechat_pay"),
@SerializedName("zip")
ZIP("zip");
@Getter(onMethod_ = {@Override})
private final String value;
Type(String value) {
this.value = value;
}
}
}
@Getter
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 an {@code affirm} PaymentMethod, this sub-hash contains details about the Affirm
* payment method options.
*/
@SerializedName("affirm")
Object affirm;
/**
* 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 amazon_pay} PaymentMethod, this sub-hash contains details about the
* Amazon Pay payment method options.
*/
@SerializedName("amazon_pay")
Object amazonPay;
/**
* If this is a {@code au_becs_debit} PaymentMethod, this sub-hash contains details about the AU
* BECS Direct Debit payment method options.
*/
@SerializedName("au_becs_debit")
Object auBecsDebit;
/**
* If this is a {@code bacs_debit} PaymentMethod, this sub-hash contains details about the BACS
* Debit payment method options.
*/
@SerializedName("bacs_debit")
Object bacsDebit;
/**
* 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 blik} PaymentMethod, this sub-hash contains details about the BLIK
* payment method options.
*/
@SerializedName("blik")
Object blik;
/**
* 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;
/**
* If this is a {@code cashapp} PaymentMethod, this sub-hash contains details about the Cash App
* Pay payment method options.
*/
@SerializedName("cashapp")
Object cashapp;
/**
* If this is a {@code customer balance} PaymentMethod, this sub-hash contains details about the
* customer balance payment method options.
*/
@SerializedName("customer_balance")
Object customerBalance;
/**
* If this is a {@code eps} PaymentMethod, this sub-hash contains details about the EPS payment
* method options.
*/
@SerializedName("eps")
Object 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 a {@code fpx} PaymentMethod, this sub-hash contains details about the FPX payment
* method options.
*/
@SerializedName("fpx")
Object fpx;
/**
* If this is a {@code giropay} PaymentMethod, this sub-hash contains details about the Giropay
* payment method options.
*/
@SerializedName("giropay")
Object giropay;
/**
* If this is a {@code grabpay} PaymentMethod, this sub-hash contains details about the Grabpay
* payment method options.
*/
@SerializedName("grabpay")
Object grabpay;
/**
* 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 konbini} PaymentMethod, this sub-hash contains details about the Konbini
* payment method options.
*/
@SerializedName("konbini")
Object konbini;
/**
* If this is a {@code link} PaymentMethod, this sub-hash contains details about the Link
* payment method options.
*/
@SerializedName("link")
Object link;
/**
* If this is a {@code MobilePay} PaymentMethod, this sub-hash contains details about the
* MobilePay payment method options.
*/
@SerializedName("mobilepay")
Object mobilepay;
/**
* If this is a {@code multibanco} PaymentMethod, this sub-hash contains details about the
* Multibanco payment method options.
*/
@SerializedName("multibanco")
Object multibanco;
/**
* 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 paynow} PaymentMethod, this sub-hash contains details about the PayNow
* payment method options.
*/
@SerializedName("paynow")
Object paynow;
/**
* If this is a {@code paypal} PaymentMethod, this sub-hash contains details about the PayPal
* payment method options.
*/
@SerializedName("paypal")
Object paypal;
/**
* If this is a {@code pix} PaymentMethod, this sub-hash contains details about the Pix payment
* method options.
*/
@SerializedName("pix")
Object pix;
/**
* If this is a {@code promptpay} PaymentMethod, this sub-hash contains details about the
* PromptPay payment method options.
*/
@SerializedName("promptpay")
Object promptpay;
/**
* If this is a {@code revolut_pay} PaymentMethod, this sub-hash contains details about the
* Revolut Pay payment method options.
*/
@SerializedName("revolut_pay")
Object revolutPay;
/**
* 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 Swish} PaymentMethod, this sub-hash contains details about the Swish
* payment method options.
*/
@SerializedName("swish")
Object swish;
/**
* If this is a {@code twint} PaymentMethod, this sub-hash contains details about the TWINT
* payment method options.
*/
@SerializedName("twint")
Object twint;
/**
* If this is a {@code us_bank_account} PaymentMethod, this sub-hash contains details about the
* US bank account payment method options.
*/
@SerializedName("us_bank_account")
Object usBankAccount;
/**
* 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;
/**
* If this is a {@code zip} PaymentMethod, this sub-hash contains details about the Zip payment
* method options.
*/
@SerializedName("zip")
Object zip;
private PaymentMethodOptions(
Object acssDebit,
Object affirm,
Object afterpayClearpay,
Object alipay,
Object amazonPay,
Object auBecsDebit,
Object bacsDebit,
Object bancontact,
Object blik,
Object boleto,
Object card,
Object cardPresent,
Object cashapp,
Object customerBalance,
Object eps,
Map extraParams,
Object fpx,
Object giropay,
Object grabpay,
Object ideal,
Object interacPresent,
Object klarna,
Object konbini,
Object link,
Object mobilepay,
Object multibanco,
Object oxxo,
Object p24,
Object paynow,
Object paypal,
Object pix,
Object promptpay,
Object revolutPay,
Object sepaDebit,
Object sofort,
Object swish,
Object twint,
Object usBankAccount,
Object wechatPay,
Object zip) {
this.acssDebit = acssDebit;
this.affirm = affirm;
this.afterpayClearpay = afterpayClearpay;
this.alipay = alipay;
this.amazonPay = amazonPay;
this.auBecsDebit = auBecsDebit;
this.bacsDebit = bacsDebit;
this.bancontact = bancontact;
this.blik = blik;
this.boleto = boleto;
this.card = card;
this.cardPresent = cardPresent;
this.cashapp = cashapp;
this.customerBalance = customerBalance;
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.konbini = konbini;
this.link = link;
this.mobilepay = mobilepay;
this.multibanco = multibanco;
this.oxxo = oxxo;
this.p24 = p24;
this.paynow = paynow;
this.paypal = paypal;
this.pix = pix;
this.promptpay = promptpay;
this.revolutPay = revolutPay;
this.sepaDebit = sepaDebit;
this.sofort = sofort;
this.swish = swish;
this.twint = twint;
this.usBankAccount = usBankAccount;
this.wechatPay = wechatPay;
this.zip = zip;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Object acssDebit;
private Object affirm;
private Object afterpayClearpay;
private Object alipay;
private Object amazonPay;
private Object auBecsDebit;
private Object bacsDebit;
private Object bancontact;
private Object blik;
private Object boleto;
private Object card;
private Object cardPresent;
private Object cashapp;
private Object customerBalance;
private Object eps;
private Map extraParams;
private Object fpx;
private Object giropay;
private Object grabpay;
private Object ideal;
private Object interacPresent;
private Object klarna;
private Object konbini;
private Object link;
private Object mobilepay;
private Object multibanco;
private Object oxxo;
private Object p24;
private Object paynow;
private Object paypal;
private Object pix;
private Object promptpay;
private Object revolutPay;
private Object sepaDebit;
private Object sofort;
private Object swish;
private Object twint;
private Object usBankAccount;
private Object wechatPay;
private Object zip;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentMethodOptions build() {
return new PaymentIntentConfirmParams.PaymentMethodOptions(
this.acssDebit,
this.affirm,
this.afterpayClearpay,
this.alipay,
this.amazonPay,
this.auBecsDebit,
this.bacsDebit,
this.bancontact,
this.blik,
this.boleto,
this.card,
this.cardPresent,
this.cashapp,
this.customerBalance,
this.eps,
this.extraParams,
this.fpx,
this.giropay,
this.grabpay,
this.ideal,
this.interacPresent,
this.klarna,
this.konbini,
this.link,
this.mobilepay,
this.multibanco,
this.oxxo,
this.p24,
this.paynow,
this.paypal,
this.pix,
this.promptpay,
this.revolutPay,
this.sepaDebit,
this.sofort,
this.swish,
this.twint,
this.usBankAccount,
this.wechatPay,
this.zip);
}
/**
* If this is a {@code acss_debit} PaymentMethod, this sub-hash contains details about the
* ACSS Debit payment method options.
*/
public Builder setAcssDebit(
PaymentIntentConfirmParams.PaymentMethodOptions.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 an {@code affirm} PaymentMethod, this sub-hash contains details about the Affirm
* payment method options.
*/
public Builder setAffirm(PaymentIntentConfirmParams.PaymentMethodOptions.Affirm affirm) {
this.affirm = affirm;
return this;
}
/**
* If this is an {@code affirm} PaymentMethod, this sub-hash contains details about the Affirm
* payment method options.
*/
public Builder setAffirm(EmptyParam affirm) {
this.affirm = affirm;
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(
PaymentIntentConfirmParams.PaymentMethodOptions.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(PaymentIntentConfirmParams.PaymentMethodOptions.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 amazon_pay} PaymentMethod, this sub-hash contains details about the
* Amazon Pay payment method options.
*/
public Builder setAmazonPay(
PaymentIntentConfirmParams.PaymentMethodOptions.AmazonPay amazonPay) {
this.amazonPay = amazonPay;
return this;
}
/**
* If this is a {@code amazon_pay} PaymentMethod, this sub-hash contains details about the
* Amazon Pay payment method options.
*/
public Builder setAmazonPay(EmptyParam amazonPay) {
this.amazonPay = amazonPay;
return this;
}
/**
* If this is a {@code au_becs_debit} PaymentMethod, this sub-hash contains details about the
* AU BECS Direct Debit payment method options.
*/
public Builder setAuBecsDebit(
PaymentIntentConfirmParams.PaymentMethodOptions.AuBecsDebit auBecsDebit) {
this.auBecsDebit = auBecsDebit;
return this;
}
/**
* If this is a {@code au_becs_debit} PaymentMethod, this sub-hash contains details about the
* AU BECS Direct Debit payment method options.
*/
public Builder setAuBecsDebit(EmptyParam auBecsDebit) {
this.auBecsDebit = auBecsDebit;
return this;
}
/**
* If this is a {@code bacs_debit} PaymentMethod, this sub-hash contains details about the
* BACS Debit payment method options.
*/
public Builder setBacsDebit(
PaymentIntentConfirmParams.PaymentMethodOptions.BacsDebit bacsDebit) {
this.bacsDebit = bacsDebit;
return this;
}
/**
* If this is a {@code bacs_debit} PaymentMethod, this sub-hash contains details about the
* BACS Debit payment method options.
*/
public Builder setBacsDebit(EmptyParam bacsDebit) {
this.bacsDebit = bacsDebit;
return this;
}
/**
* If this is a {@code bancontact} PaymentMethod, this sub-hash contains details about the
* Bancontact payment method options.
*/
public Builder setBancontact(
PaymentIntentConfirmParams.PaymentMethodOptions.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 blik} PaymentMethod, this sub-hash contains details about the BLIK
* payment method options.
*/
public Builder setBlik(PaymentIntentConfirmParams.PaymentMethodOptions.Blik blik) {
this.blik = blik;
return this;
}
/**
* If this is a {@code blik} PaymentMethod, this sub-hash contains details about the BLIK
* payment method options.
*/
public Builder setBlik(EmptyParam blik) {
this.blik = blik;
return this;
}
/**
* If this is a {@code boleto} PaymentMethod, this sub-hash contains details about the Boleto
* payment method options.
*/
public Builder setBoleto(PaymentIntentConfirmParams.PaymentMethodOptions.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(PaymentIntentConfirmParams.PaymentMethodOptions.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(
PaymentIntentConfirmParams.PaymentMethodOptions.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;
}
/**
* If this is a {@code cashapp} PaymentMethod, this sub-hash contains details about the Cash
* App Pay payment method options.
*/
public Builder setCashapp(PaymentIntentConfirmParams.PaymentMethodOptions.Cashapp cashapp) {
this.cashapp = cashapp;
return this;
}
/**
* If this is a {@code cashapp} PaymentMethod, this sub-hash contains details about the Cash
* App Pay payment method options.
*/
public Builder setCashapp(EmptyParam cashapp) {
this.cashapp = cashapp;
return this;
}
/**
* If this is a {@code customer balance} PaymentMethod, this sub-hash contains details about
* the customer balance payment method options.
*/
public Builder setCustomerBalance(
PaymentIntentConfirmParams.PaymentMethodOptions.CustomerBalance customerBalance) {
this.customerBalance = customerBalance;
return this;
}
/**
* If this is a {@code customer balance} PaymentMethod, this sub-hash contains details about
* the customer balance payment method options.
*/
public Builder setCustomerBalance(EmptyParam customerBalance) {
this.customerBalance = customerBalance;
return this;
}
/**
* If this is a {@code eps} PaymentMethod, this sub-hash contains details about the EPS
* payment method options.
*/
public Builder setEps(PaymentIntentConfirmParams.PaymentMethodOptions.Eps eps) {
this.eps = eps;
return this;
}
/**
* If this is a {@code eps} PaymentMethod, this sub-hash contains details about the EPS
* payment method options.
*/
public Builder setEps(EmptyParam 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
* PaymentIntentConfirmParams.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 PaymentIntentConfirmParams.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 fpx} PaymentMethod, this sub-hash contains details about the FPX
* payment method options.
*/
public Builder setFpx(PaymentIntentConfirmParams.PaymentMethodOptions.Fpx fpx) {
this.fpx = fpx;
return this;
}
/**
* If this is a {@code fpx} PaymentMethod, this sub-hash contains details about the FPX
* payment method options.
*/
public Builder setFpx(EmptyParam fpx) {
this.fpx = fpx;
return this;
}
/**
* If this is a {@code giropay} PaymentMethod, this sub-hash contains details about the
* Giropay payment method options.
*/
public Builder setGiropay(PaymentIntentConfirmParams.PaymentMethodOptions.Giropay giropay) {
this.giropay = giropay;
return this;
}
/**
* If this is a {@code giropay} PaymentMethod, this sub-hash contains details about the
* Giropay payment method options.
*/
public Builder setGiropay(EmptyParam giropay) {
this.giropay = giropay;
return this;
}
/**
* If this is a {@code grabpay} PaymentMethod, this sub-hash contains details about the
* Grabpay payment method options.
*/
public Builder setGrabpay(PaymentIntentConfirmParams.PaymentMethodOptions.Grabpay grabpay) {
this.grabpay = grabpay;
return this;
}
/**
* If this is a {@code grabpay} PaymentMethod, this sub-hash contains details about the
* Grabpay payment method options.
*/
public Builder setGrabpay(EmptyParam grabpay) {
this.grabpay = grabpay;
return this;
}
/**
* If this is a {@code ideal} PaymentMethod, this sub-hash contains details about the Ideal
* payment method options.
*/
public Builder setIdeal(PaymentIntentConfirmParams.PaymentMethodOptions.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(
PaymentIntentConfirmParams.PaymentMethodOptions.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(PaymentIntentConfirmParams.PaymentMethodOptions.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 konbini} PaymentMethod, this sub-hash contains details about the
* Konbini payment method options.
*/
public Builder setKonbini(PaymentIntentConfirmParams.PaymentMethodOptions.Konbini konbini) {
this.konbini = konbini;
return this;
}
/**
* If this is a {@code konbini} PaymentMethod, this sub-hash contains details about the
* Konbini payment method options.
*/
public Builder setKonbini(EmptyParam konbini) {
this.konbini = konbini;
return this;
}
/**
* If this is a {@code link} PaymentMethod, this sub-hash contains details about the Link
* payment method options.
*/
public Builder setLink(PaymentIntentConfirmParams.PaymentMethodOptions.Link link) {
this.link = link;
return this;
}
/**
* If this is a {@code link} PaymentMethod, this sub-hash contains details about the Link
* payment method options.
*/
public Builder setLink(EmptyParam link) {
this.link = link;
return this;
}
/**
* If this is a {@code MobilePay} PaymentMethod, this sub-hash contains details about the
* MobilePay payment method options.
*/
public Builder setMobilepay(
PaymentIntentConfirmParams.PaymentMethodOptions.Mobilepay mobilepay) {
this.mobilepay = mobilepay;
return this;
}
/**
* If this is a {@code MobilePay} PaymentMethod, this sub-hash contains details about the
* MobilePay payment method options.
*/
public Builder setMobilepay(EmptyParam mobilepay) {
this.mobilepay = mobilepay;
return this;
}
/**
* If this is a {@code multibanco} PaymentMethod, this sub-hash contains details about the
* Multibanco payment method options.
*/
public Builder setMultibanco(
PaymentIntentConfirmParams.PaymentMethodOptions.Multibanco multibanco) {
this.multibanco = multibanco;
return this;
}
/**
* If this is a {@code multibanco} PaymentMethod, this sub-hash contains details about the
* Multibanco payment method options.
*/
public Builder setMultibanco(EmptyParam multibanco) {
this.multibanco = multibanco;
return this;
}
/**
* If this is a {@code oxxo} PaymentMethod, this sub-hash contains details about the OXXO
* payment method options.
*/
public Builder setOxxo(PaymentIntentConfirmParams.PaymentMethodOptions.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(PaymentIntentConfirmParams.PaymentMethodOptions.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 paynow} PaymentMethod, this sub-hash contains details about the PayNow
* payment method options.
*/
public Builder setPaynow(PaymentIntentConfirmParams.PaymentMethodOptions.Paynow paynow) {
this.paynow = paynow;
return this;
}
/**
* If this is a {@code paynow} PaymentMethod, this sub-hash contains details about the PayNow
* payment method options.
*/
public Builder setPaynow(EmptyParam paynow) {
this.paynow = paynow;
return this;
}
/**
* If this is a {@code paypal} PaymentMethod, this sub-hash contains details about the PayPal
* payment method options.
*/
public Builder setPaypal(PaymentIntentConfirmParams.PaymentMethodOptions.Paypal paypal) {
this.paypal = paypal;
return this;
}
/**
* If this is a {@code paypal} PaymentMethod, this sub-hash contains details about the PayPal
* payment method options.
*/
public Builder setPaypal(EmptyParam paypal) {
this.paypal = paypal;
return this;
}
/**
* If this is a {@code pix} PaymentMethod, this sub-hash contains details about the Pix
* payment method options.
*/
public Builder setPix(PaymentIntentConfirmParams.PaymentMethodOptions.Pix pix) {
this.pix = pix;
return this;
}
/**
* If this is a {@code pix} PaymentMethod, this sub-hash contains details about the Pix
* payment method options.
*/
public Builder setPix(EmptyParam pix) {
this.pix = pix;
return this;
}
/**
* If this is a {@code promptpay} PaymentMethod, this sub-hash contains details about the
* PromptPay payment method options.
*/
public Builder setPromptpay(
PaymentIntentConfirmParams.PaymentMethodOptions.Promptpay promptpay) {
this.promptpay = promptpay;
return this;
}
/**
* If this is a {@code promptpay} PaymentMethod, this sub-hash contains details about the
* PromptPay payment method options.
*/
public Builder setPromptpay(EmptyParam promptpay) {
this.promptpay = promptpay;
return this;
}
/**
* If this is a {@code revolut_pay} PaymentMethod, this sub-hash contains details about the
* Revolut Pay payment method options.
*/
public Builder setRevolutPay(
PaymentIntentConfirmParams.PaymentMethodOptions.RevolutPay revolutPay) {
this.revolutPay = revolutPay;
return this;
}
/**
* If this is a {@code revolut_pay} PaymentMethod, this sub-hash contains details about the
* Revolut Pay payment method options.
*/
public Builder setRevolutPay(EmptyParam revolutPay) {
this.revolutPay = revolutPay;
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(
PaymentIntentConfirmParams.PaymentMethodOptions.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(PaymentIntentConfirmParams.PaymentMethodOptions.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 Swish} PaymentMethod, this sub-hash contains details about the Swish
* payment method options.
*/
public Builder setSwish(PaymentIntentConfirmParams.PaymentMethodOptions.Swish swish) {
this.swish = swish;
return this;
}
/**
* If this is a {@code Swish} PaymentMethod, this sub-hash contains details about the Swish
* payment method options.
*/
public Builder setSwish(EmptyParam swish) {
this.swish = swish;
return this;
}
/**
* If this is a {@code twint} PaymentMethod, this sub-hash contains details about the TWINT
* payment method options.
*/
public Builder setTwint(PaymentIntentConfirmParams.PaymentMethodOptions.Twint twint) {
this.twint = twint;
return this;
}
/**
* If this is a {@code twint} PaymentMethod, this sub-hash contains details about the TWINT
* payment method options.
*/
public Builder setTwint(EmptyParam twint) {
this.twint = twint;
return this;
}
/**
* If this is a {@code us_bank_account} PaymentMethod, this sub-hash contains details about
* the US bank account payment method options.
*/
public Builder setUsBankAccount(
PaymentIntentConfirmParams.PaymentMethodOptions.UsBankAccount usBankAccount) {
this.usBankAccount = usBankAccount;
return this;
}
/**
* If this is a {@code us_bank_account} PaymentMethod, this sub-hash contains details about
* the US bank account payment method options.
*/
public Builder setUsBankAccount(EmptyParam usBankAccount) {
this.usBankAccount = usBankAccount;
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(
PaymentIntentConfirmParams.PaymentMethodOptions.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;
}
/**
* If this is a {@code zip} PaymentMethod, this sub-hash contains details about the Zip
* payment method options.
*/
public Builder setZip(PaymentIntentConfirmParams.PaymentMethodOptions.Zip zip) {
this.zip = zip;
return this;
}
/**
* If this is a {@code zip} PaymentMethod, this sub-hash contains details about the Zip
* payment method options.
*/
public Builder setZip(EmptyParam zip) {
this.zip = zip;
return this;
}
}
@Getter
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;
/**
* Indicates that you intend to make future payments with this PaymentIntent's payment method.
*
* If you provide a Customer with the PaymentIntent, you can use this parameter to attach the payment method to the
* Customer after the PaymentIntent is confirmed and the customer completes any required
* actions. If you don't provide a Customer, you can still attach the payment method to a
* Customer after the transaction completes.
*
*
If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
* and attaches a generated_card
* payment method representing the card to the Customer instead.
*
*
When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
* with regional legislation and network rules, such as SCA.
*
*
If you've already set {@code setup_future_usage} and you're performing a request using a
* publishable key, you can only update the value from {@code on_session} to {@code
* off_session}.
*/
@SerializedName("setup_future_usage")
ApiRequestParams.EnumParam setupFutureUsage;
/** Bank account verification method. */
@SerializedName("verification_method")
VerificationMethod verificationMethod;
private AcssDebit(
Map extraParams,
MandateOptions mandateOptions,
ApiRequestParams.EnumParam setupFutureUsage,
VerificationMethod verificationMethod) {
this.extraParams = extraParams;
this.mandateOptions = mandateOptions;
this.setupFutureUsage = setupFutureUsage;
this.verificationMethod = verificationMethod;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Map extraParams;
private MandateOptions mandateOptions;
private ApiRequestParams.EnumParam setupFutureUsage;
private VerificationMethod verificationMethod;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentMethodOptions.AcssDebit build() {
return new PaymentIntentConfirmParams.PaymentMethodOptions.AcssDebit(
this.extraParams,
this.mandateOptions,
this.setupFutureUsage,
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 PaymentIntentConfirmParams.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 PaymentIntentConfirmParams.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(
PaymentIntentConfirmParams.PaymentMethodOptions.AcssDebit.MandateOptions
mandateOptions) {
this.mandateOptions = mandateOptions;
return this;
}
/**
* Indicates that you intend to make future payments with this PaymentIntent's payment
* method.
*
* If you provide a Customer with the PaymentIntent, you can use this parameter to attach the payment method to
* the Customer after the PaymentIntent is confirmed and the customer completes any required
* actions. If you don't provide a Customer, you can still attach the payment method to a
* Customer after the transaction completes.
*
*
If the payment method is {@code card_present} and isn't a digital wallet, Stripe
* creates and attaches a generated_card
* payment method representing the card to the Customer instead.
*
*
When processing card payments, Stripe uses {@code setup_future_usage} to help you
* comply with regional legislation and network rules, such as SCA.
*
*
If you've already set {@code setup_future_usage} and you're performing a request using
* a publishable key, you can only update the value from {@code on_session} to {@code
* off_session}.
*/
public Builder setSetupFutureUsage(
PaymentIntentConfirmParams.PaymentMethodOptions.AcssDebit.SetupFutureUsage
setupFutureUsage) {
this.setupFutureUsage = setupFutureUsage;
return this;
}
/**
* Indicates that you intend to make future payments with this PaymentIntent's payment
* method.
*
*
If you provide a Customer with the PaymentIntent, you can use this parameter to attach the payment method to
* the Customer after the PaymentIntent is confirmed and the customer completes any required
* actions. If you don't provide a Customer, you can still attach the payment method to a
* Customer after the transaction completes.
*
*
If the payment method is {@code card_present} and isn't a digital wallet, Stripe
* creates and attaches a generated_card
* payment method representing the card to the Customer instead.
*
*
When processing card payments, Stripe uses {@code setup_future_usage} to help you
* comply with regional legislation and network rules, such as SCA.
*
*
If you've already set {@code setup_future_usage} and you're performing a request using
* a publishable key, you can only update the value from {@code on_session} to {@code
* off_session}.
*/
public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) {
this.setupFutureUsage = setupFutureUsage;
return this;
}
/** Bank account verification method. */
public Builder setVerificationMethod(
PaymentIntentConfirmParams.PaymentMethodOptions.AcssDebit.VerificationMethod
verificationMethod) {
this.verificationMethod = verificationMethod;
return this;
}
}
@Getter
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")
String 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,
String 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 String intervalDescription;
private PaymentSchedule paymentSchedule;
private TransactionType transactionType;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentMethodOptions.AcssDebit.MandateOptions build() {
return new PaymentIntentConfirmParams.PaymentMethodOptions.AcssDebit.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
* PaymentIntentConfirmParams.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
* PaymentIntentConfirmParams.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;
}
/** Payment schedule for the mandate. */
public Builder setPaymentSchedule(
PaymentIntentConfirmParams.PaymentMethodOptions.AcssDebit.MandateOptions
.PaymentSchedule
paymentSchedule) {
this.paymentSchedule = paymentSchedule;
return this;
}
/** Transaction type of the mandate. */
public Builder setTransactionType(
PaymentIntentConfirmParams.PaymentMethodOptions.AcssDebit.MandateOptions
.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");
@Getter(onMethod_ = {@Override})
private final String value;
PaymentSchedule(String value) {
this.value = value;
}
}
public enum TransactionType implements ApiRequestParams.EnumParam {
@SerializedName("business")
BUSINESS("business"),
@SerializedName("personal")
PERSONAL("personal");
@Getter(onMethod_ = {@Override})
private final String value;
TransactionType(String value) {
this.value = value;
}
}
}
public enum SetupFutureUsage implements ApiRequestParams.EnumParam {
@SerializedName("none")
NONE("none"),
@SerializedName("off_session")
OFF_SESSION("off_session"),
@SerializedName("on_session")
ON_SESSION("on_session");
@Getter(onMethod_ = {@Override})
private final String value;
SetupFutureUsage(String value) {
this.value = value;
}
}
public enum VerificationMethod implements ApiRequestParams.EnumParam {
@SerializedName("automatic")
AUTOMATIC("automatic"),
@SerializedName("instant")
INSTANT("instant"),
@SerializedName("microdeposits")
MICRODEPOSITS("microdeposits");
@Getter(onMethod_ = {@Override})
private final String value;
VerificationMethod(String value) {
this.value = value;
}
}
}
@Getter
public static class Affirm {
/**
* Controls when the funds are captured from the customer's account.
*
* If provided, this parameter overrides the behavior of the top-level capture_method
* for this payment method type when finalizing the payment with this payment method type.
*
*
If {@code capture_method} is already set on the PaymentIntent, providing an empty value
* for this parameter unsets the stored value for this payment method type.
*/
@SerializedName("capture_method")
ApiRequestParams.EnumParam captureMethod;
/**
* 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 Affirm authorization page that the customer is redirected to. */
@SerializedName("preferred_locale")
String preferredLocale;
/**
* Indicates that you intend to make future payments with this PaymentIntent's payment method.
*
* If you provide a Customer with the PaymentIntent, you can use this parameter to attach the payment method to the
* Customer after the PaymentIntent is confirmed and the customer completes any required
* actions. If you don't provide a Customer, you can still attach the payment method to a
* Customer after the transaction completes.
*
*
If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
* and attaches a generated_card
* payment method representing the card to the Customer instead.
*
*
When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
* with regional legislation and network rules, such as SCA.
*
*
If you've already set {@code setup_future_usage} and you're performing a request using a
* publishable key, you can only update the value from {@code on_session} to {@code
* off_session}.
*/
@SerializedName("setup_future_usage")
SetupFutureUsage setupFutureUsage;
private Affirm(
ApiRequestParams.EnumParam captureMethod,
Map extraParams,
String preferredLocale,
SetupFutureUsage setupFutureUsage) {
this.captureMethod = captureMethod;
this.extraParams = extraParams;
this.preferredLocale = preferredLocale;
this.setupFutureUsage = setupFutureUsage;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private ApiRequestParams.EnumParam captureMethod;
private Map extraParams;
private String preferredLocale;
private SetupFutureUsage setupFutureUsage;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentMethodOptions.Affirm build() {
return new PaymentIntentConfirmParams.PaymentMethodOptions.Affirm(
this.captureMethod, this.extraParams, this.preferredLocale, this.setupFutureUsage);
}
/**
* Controls when the funds are captured from the customer's account.
*
* If provided, this parameter overrides the behavior of the top-level capture_method
* for this payment method type when finalizing the payment with this payment method type.
*
*
If {@code capture_method} is already set on the PaymentIntent, providing an empty
* value for this parameter unsets the stored value for this payment method type.
*/
public Builder setCaptureMethod(
PaymentIntentConfirmParams.PaymentMethodOptions.Affirm.CaptureMethod captureMethod) {
this.captureMethod = captureMethod;
return this;
}
/**
* Controls when the funds are captured from the customer's account.
*
*
If provided, this parameter overrides the behavior of the top-level capture_method
* for this payment method type when finalizing the payment with this payment method type.
*
*
If {@code capture_method} is already set on the PaymentIntent, providing an empty
* value for this parameter unsets the stored value for this payment method type.
*/
public Builder setCaptureMethod(EmptyParam captureMethod) {
this.captureMethod = captureMethod;
return this;
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Affirm#extraParams} for
* the field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Affirm#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 Affirm authorization page that the customer is redirected to.
*/
public Builder setPreferredLocale(String preferredLocale) {
this.preferredLocale = preferredLocale;
return this;
}
/**
* Indicates that you intend to make future payments with this PaymentIntent's payment
* method.
*
* If you provide a Customer with the PaymentIntent, you can use this parameter to attach the payment method to
* the Customer after the PaymentIntent is confirmed and the customer completes any required
* actions. If you don't provide a Customer, you can still attach the payment method to a
* Customer after the transaction completes.
*
*
If the payment method is {@code card_present} and isn't a digital wallet, Stripe
* creates and attaches a generated_card
* payment method representing the card to the Customer instead.
*
*
When processing card payments, Stripe uses {@code setup_future_usage} to help you
* comply with regional legislation and network rules, such as SCA.
*
*
If you've already set {@code setup_future_usage} and you're performing a request using
* a publishable key, you can only update the value from {@code on_session} to {@code
* off_session}.
*/
public Builder setSetupFutureUsage(
PaymentIntentConfirmParams.PaymentMethodOptions.Affirm.SetupFutureUsage
setupFutureUsage) {
this.setupFutureUsage = setupFutureUsage;
return this;
}
}
public enum CaptureMethod implements ApiRequestParams.EnumParam {
@SerializedName("manual")
MANUAL("manual");
@Getter(onMethod_ = {@Override})
private final String value;
CaptureMethod(String value) {
this.value = value;
}
}
public enum SetupFutureUsage implements ApiRequestParams.EnumParam {
@SerializedName("none")
NONE("none");
@Getter(onMethod_ = {@Override})
private final String value;
SetupFutureUsage(String value) {
this.value = value;
}
}
}
@Getter
public static class AfterpayClearpay {
/**
* Controls when the funds are captured from the customer's account.
*
*
If provided, this parameter overrides the behavior of the top-level capture_method
* for this payment method type when finalizing the payment with this payment method type.
*
*
If {@code capture_method} is already set on the PaymentIntent, providing an empty value
* for this parameter unsets the stored value for this payment method type.
*/
@SerializedName("capture_method")
ApiRequestParams.EnumParam captureMethod;
/**
* 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;
/**
* An internal identifier or reference that this payment corresponds to. You must limit the
* identifier to 128 characters, and it can only contain letters, numbers, underscores,
* backslashes, and dashes. This field differs from the statement descriptor and item name.
*/
@SerializedName("reference")
String reference;
/**
* Indicates that you intend to make future payments with this PaymentIntent's payment method.
*
* If you provide a Customer with the PaymentIntent, you can use this parameter to attach the payment method to the
* Customer after the PaymentIntent is confirmed and the customer completes any required
* actions. If you don't provide a Customer, you can still attach the payment method to a
* Customer after the transaction completes.
*
*
If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
* and attaches a generated_card
* payment method representing the card to the Customer instead.
*
*
When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
* with regional legislation and network rules, such as SCA.
*
*
If you've already set {@code setup_future_usage} and you're performing a request using a
* publishable key, you can only update the value from {@code on_session} to {@code
* off_session}.
*/
@SerializedName("setup_future_usage")
SetupFutureUsage setupFutureUsage;
private AfterpayClearpay(
ApiRequestParams.EnumParam captureMethod,
Map extraParams,
String reference,
SetupFutureUsage setupFutureUsage) {
this.captureMethod = captureMethod;
this.extraParams = extraParams;
this.reference = reference;
this.setupFutureUsage = setupFutureUsage;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private ApiRequestParams.EnumParam captureMethod;
private Map extraParams;
private String reference;
private SetupFutureUsage setupFutureUsage;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentMethodOptions.AfterpayClearpay build() {
return new PaymentIntentConfirmParams.PaymentMethodOptions.AfterpayClearpay(
this.captureMethod, this.extraParams, this.reference, this.setupFutureUsage);
}
/**
* Controls when the funds are captured from the customer's account.
*
* If provided, this parameter overrides the behavior of the top-level capture_method
* for this payment method type when finalizing the payment with this payment method type.
*
*
If {@code capture_method} is already set on the PaymentIntent, providing an empty
* value for this parameter unsets the stored value for this payment method type.
*/
public Builder setCaptureMethod(
PaymentIntentConfirmParams.PaymentMethodOptions.AfterpayClearpay.CaptureMethod
captureMethod) {
this.captureMethod = captureMethod;
return this;
}
/**
* Controls when the funds are captured from the customer's account.
*
*
If provided, this parameter overrides the behavior of the top-level capture_method
* for this payment method type when finalizing the payment with this payment method type.
*
*
If {@code capture_method} is already set on the PaymentIntent, providing an empty
* value for this parameter unsets the stored value for this payment method type.
*/
public Builder setCaptureMethod(EmptyParam captureMethod) {
this.captureMethod = captureMethod;
return this;
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link
* PaymentIntentConfirmParams.PaymentMethodOptions.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
* PaymentIntentConfirmParams.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;
}
/**
* An internal identifier or reference that this payment corresponds to. You must limit the
* identifier to 128 characters, and it can only contain letters, numbers, underscores,
* backslashes, and dashes. This field differs from the statement descriptor and item name.
*/
public Builder setReference(String reference) {
this.reference = reference;
return this;
}
/**
* Indicates that you intend to make future payments with this PaymentIntent's payment
* method.
*
* If you provide a Customer with the PaymentIntent, you can use this parameter to attach the payment method to
* the Customer after the PaymentIntent is confirmed and the customer completes any required
* actions. If you don't provide a Customer, you can still attach the payment method to a
* Customer after the transaction completes.
*
*
If the payment method is {@code card_present} and isn't a digital wallet, Stripe
* creates and attaches a generated_card
* payment method representing the card to the Customer instead.
*
*
When processing card payments, Stripe uses {@code setup_future_usage} to help you
* comply with regional legislation and network rules, such as SCA.
*
*
If you've already set {@code setup_future_usage} and you're performing a request using
* a publishable key, you can only update the value from {@code on_session} to {@code
* off_session}.
*/
public Builder setSetupFutureUsage(
PaymentIntentConfirmParams.PaymentMethodOptions.AfterpayClearpay.SetupFutureUsage
setupFutureUsage) {
this.setupFutureUsage = setupFutureUsage;
return this;
}
}
public enum CaptureMethod implements ApiRequestParams.EnumParam {
@SerializedName("manual")
MANUAL("manual");
@Getter(onMethod_ = {@Override})
private final String value;
CaptureMethod(String value) {
this.value = value;
}
}
public enum SetupFutureUsage implements ApiRequestParams.EnumParam {
@SerializedName("none")
NONE("none");
@Getter(onMethod_ = {@Override})
private final String value;
SetupFutureUsage(String value) {
this.value = value;
}
}
}
@Getter
public static class 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;
/**
* Indicates that you intend to make future payments with this PaymentIntent's payment method.
*
* If you provide a Customer with the PaymentIntent, you can use this parameter to attach the payment method to the
* Customer after the PaymentIntent is confirmed and the customer completes any required
* actions. If you don't provide a Customer, you can still attach the payment method to a
* Customer after the transaction completes.
*
*
If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
* and attaches a generated_card
* payment method representing the card to the Customer instead.
*
*
When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
* with regional legislation and network rules, such as SCA.
*
*
If you've already set {@code setup_future_usage} and you're performing a request using a
* publishable key, you can only update the value from {@code on_session} to {@code
* off_session}.
*/
@SerializedName("setup_future_usage")
ApiRequestParams.EnumParam setupFutureUsage;
private Alipay(Map extraParams, ApiRequestParams.EnumParam setupFutureUsage) {
this.extraParams = extraParams;
this.setupFutureUsage = setupFutureUsage;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Map extraParams;
private ApiRequestParams.EnumParam setupFutureUsage;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentMethodOptions.Alipay build() {
return new PaymentIntentConfirmParams.PaymentMethodOptions.Alipay(
this.extraParams, this.setupFutureUsage);
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.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;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Alipay#extraParams} for
* the field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
/**
* Indicates that you intend to make future payments with this PaymentIntent's payment
* method.
*
* If you provide a Customer with the PaymentIntent, you can use this parameter to attach the payment method to
* the Customer after the PaymentIntent is confirmed and the customer completes any required
* actions. If you don't provide a Customer, you can still attach the payment method to a
* Customer after the transaction completes.
*
*
If the payment method is {@code card_present} and isn't a digital wallet, Stripe
* creates and attaches a generated_card
* payment method representing the card to the Customer instead.
*
*
When processing card payments, Stripe uses {@code setup_future_usage} to help you
* comply with regional legislation and network rules, such as SCA.
*
*
If you've already set {@code setup_future_usage} and you're performing a request using
* a publishable key, you can only update the value from {@code on_session} to {@code
* off_session}.
*/
public Builder setSetupFutureUsage(
PaymentIntentConfirmParams.PaymentMethodOptions.Alipay.SetupFutureUsage
setupFutureUsage) {
this.setupFutureUsage = setupFutureUsage;
return this;
}
/**
* Indicates that you intend to make future payments with this PaymentIntent's payment
* method.
*
*
If you provide a Customer with the PaymentIntent, you can use this parameter to attach the payment method to
* the Customer after the PaymentIntent is confirmed and the customer completes any required
* actions. If you don't provide a Customer, you can still attach the payment method to a
* Customer after the transaction completes.
*
*
If the payment method is {@code card_present} and isn't a digital wallet, Stripe
* creates and attaches a generated_card
* payment method representing the card to the Customer instead.
*
*
When processing card payments, Stripe uses {@code setup_future_usage} to help you
* comply with regional legislation and network rules, such as SCA.
*
*
If you've already set {@code setup_future_usage} and you're performing a request using
* a publishable key, you can only update the value from {@code on_session} to {@code
* off_session}.
*/
public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) {
this.setupFutureUsage = setupFutureUsage;
return this;
}
}
public enum SetupFutureUsage implements ApiRequestParams.EnumParam {
@SerializedName("none")
NONE("none"),
@SerializedName("off_session")
OFF_SESSION("off_session");
@Getter(onMethod_ = {@Override})
private final String value;
SetupFutureUsage(String value) {
this.value = value;
}
}
}
@Getter
public static class AmazonPay {
/**
* Controls when the funds are captured from the customer's account.
*
*
If provided, this parameter overrides the behavior of the top-level capture_method
* for this payment method type when finalizing the payment with this payment method type.
*
*
If {@code capture_method} is already set on the PaymentIntent, providing an empty value
* for this parameter unsets the stored value for this payment method type.
*/
@SerializedName("capture_method")
ApiRequestParams.EnumParam captureMethod;
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
* Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
* name in this param object. Effectively, this map is flattened to its parent instance.
*/
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
/**
* Indicates that you intend to make future payments with this PaymentIntent's payment method.
*
* If you provide a Customer with the PaymentIntent, you can use this parameter to attach the payment method to the
* Customer after the PaymentIntent is confirmed and the customer completes any required
* actions. If you don't provide a Customer, you can still attach the payment method to a
* Customer after the transaction completes.
*
*
If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
* and attaches a generated_card
* payment method representing the card to the Customer instead.
*
*
When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
* with regional legislation and network rules, such as SCA.
*/
@SerializedName("setup_future_usage")
ApiRequestParams.EnumParam setupFutureUsage;
private AmazonPay(
ApiRequestParams.EnumParam captureMethod,
Map extraParams,
ApiRequestParams.EnumParam setupFutureUsage) {
this.captureMethod = captureMethod;
this.extraParams = extraParams;
this.setupFutureUsage = setupFutureUsage;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private ApiRequestParams.EnumParam captureMethod;
private Map extraParams;
private ApiRequestParams.EnumParam setupFutureUsage;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentMethodOptions.AmazonPay build() {
return new PaymentIntentConfirmParams.PaymentMethodOptions.AmazonPay(
this.captureMethod, this.extraParams, this.setupFutureUsage);
}
/**
* Controls when the funds are captured from the customer's account.
*
* If provided, this parameter overrides the behavior of the top-level capture_method
* for this payment method type when finalizing the payment with this payment method type.
*
*
If {@code capture_method} is already set on the PaymentIntent, providing an empty
* value for this parameter unsets the stored value for this payment method type.
*/
public Builder setCaptureMethod(
PaymentIntentConfirmParams.PaymentMethodOptions.AmazonPay.CaptureMethod captureMethod) {
this.captureMethod = captureMethod;
return this;
}
/**
* Controls when the funds are captured from the customer's account.
*
*
If provided, this parameter overrides the behavior of the top-level capture_method
* for this payment method type when finalizing the payment with this payment method type.
*
*
If {@code capture_method} is already set on the PaymentIntent, providing an empty
* value for this parameter unsets the stored value for this payment method type.
*/
public Builder setCaptureMethod(EmptyParam captureMethod) {
this.captureMethod = captureMethod;
return this;
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.AmazonPay#extraParams}
* for the field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.AmazonPay#extraParams}
* for the field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
/**
* Indicates that you intend to make future payments with this PaymentIntent's payment
* method.
*
* If you provide a Customer with the PaymentIntent, you can use this parameter to attach the payment method to
* the Customer after the PaymentIntent is confirmed and the customer completes any required
* actions. If you don't provide a Customer, you can still attach the payment method to a
* Customer after the transaction completes.
*
*
If the payment method is {@code card_present} and isn't a digital wallet, Stripe
* creates and attaches a generated_card
* payment method representing the card to the Customer instead.
*
*
When processing card payments, Stripe uses {@code setup_future_usage} to help you
* comply with regional legislation and network rules, such as SCA.
*/
public Builder setSetupFutureUsage(
PaymentIntentConfirmParams.PaymentMethodOptions.AmazonPay.SetupFutureUsage
setupFutureUsage) {
this.setupFutureUsage = setupFutureUsage;
return this;
}
/**
* Indicates that you intend to make future payments with this PaymentIntent's payment
* method.
*
*
If you provide a Customer with the PaymentIntent, you can use this parameter to attach the payment method to
* the Customer after the PaymentIntent is confirmed and the customer completes any required
* actions. If you don't provide a Customer, you can still attach the payment method to a
* Customer after the transaction completes.
*
*
If the payment method is {@code card_present} and isn't a digital wallet, Stripe
* creates and attaches a generated_card
* payment method representing the card to the Customer instead.
*
*
When processing card payments, Stripe uses {@code setup_future_usage} to help you
* comply with regional legislation and network rules, such as SCA.
*/
public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) {
this.setupFutureUsage = setupFutureUsage;
return this;
}
}
public enum CaptureMethod implements ApiRequestParams.EnumParam {
@SerializedName("manual")
MANUAL("manual");
@Getter(onMethod_ = {@Override})
private final String value;
CaptureMethod(String value) {
this.value = value;
}
}
public enum SetupFutureUsage implements ApiRequestParams.EnumParam {
@SerializedName("none")
NONE("none"),
@SerializedName("off_session")
OFF_SESSION("off_session");
@Getter(onMethod_ = {@Override})
private final String value;
SetupFutureUsage(String value) {
this.value = value;
}
}
}
@Getter
public static class AuBecsDebit {
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
* Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
* name in this param object. Effectively, this map is flattened to its parent instance.
*/
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
/**
* Indicates that you intend to make future payments with this PaymentIntent's payment method.
*
* If you provide a Customer with the PaymentIntent, you can use this parameter to attach the payment method to the
* Customer after the PaymentIntent is confirmed and the customer completes any required
* actions. If you don't provide a Customer, you can still attach the payment method to a
* Customer after the transaction completes.
*
*
If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
* and attaches a generated_card
* payment method representing the card to the Customer instead.
*
*
When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
* with regional legislation and network rules, such as SCA.
*
*
If you've already set {@code setup_future_usage} and you're performing a request using a
* publishable key, you can only update the value from {@code on_session} to {@code
* off_session}.
*/
@SerializedName("setup_future_usage")
ApiRequestParams.EnumParam setupFutureUsage;
private AuBecsDebit(
Map extraParams, ApiRequestParams.EnumParam setupFutureUsage) {
this.extraParams = extraParams;
this.setupFutureUsage = setupFutureUsage;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Map extraParams;
private ApiRequestParams.EnumParam setupFutureUsage;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentMethodOptions.AuBecsDebit build() {
return new PaymentIntentConfirmParams.PaymentMethodOptions.AuBecsDebit(
this.extraParams, this.setupFutureUsage);
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.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;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.AuBecsDebit#extraParams}
* for the field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
/**
* Indicates that you intend to make future payments with this PaymentIntent's payment
* method.
*
*