All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.stripe.param.SetupIntentCreateParams Maven / Gradle / Ivy

There is a newer version: 28.1.0-beta.3
Show newest version
// 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 SetupIntentCreateParams extends ApiRequestParams {
  /**
   * If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.
   *
   * 

It can only be used for this Stripe Account’s own money movement flows like InboundTransfer * and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, * and defaults to false when attaching a PaymentMethod to a Customer. */ @SerializedName("attach_to_self") Boolean attachToSelf; /** * When you enable this parameter, this SetupIntent accepts payment methods that you enable in the * Dashboard and that are compatible with its other parameters. */ @SerializedName("automatic_payment_methods") AutomaticPaymentMethods automaticPaymentMethods; /** * Set to {@code true} to attempt to confirm this SetupIntent immediately. This parameter defaults * to {@code false}. If a card is the attached payment method, you can provide a {@code * return_url} in case further authentication is necessary. */ @SerializedName("confirm") Boolean confirm; /** * ID of the ConfirmationToken used to confirm this SetupIntent. * *

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; /** * ID of the Customer this SetupIntent belongs to, if one exists. * *

If present, the SetupIntent's payment method will be attached to the Customer on successful * setup. Payment methods attached to other Customers cannot be used with this SetupIntent. */ @SerializedName("customer") String customer; /** An arbitrary string attached to the object. Often useful for displaying to users. */ @SerializedName("description") String description; /** Specifies which fields in the response should be expanded. */ @SerializedName("expand") List expand; /** * Map of extra parameters for custom features not available in this client library. The content * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each * key/value pair is serialized as if the key is a root-level field (serialized) name in this * param object. Effectively, this map is flattened to its parent instance. */ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; /** * Indicates the directions of money movement for which this payment method is intended to be * used. * *

Include {@code inbound} if you intend to use the payment method as the origin to pull funds * from. Include {@code outbound} if you intend to use the payment method as the destination to * send funds to. You can include both if you intend to use the payment method for both purposes. */ @SerializedName("flow_directions") List flowDirections; /** * This hash contains details about the mandate to create. This parameter can only be used with {@code * confirm=true}. */ @SerializedName("mandate_data") Object mandateData; /** * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. */ @SerializedName("metadata") Map metadata; /** The Stripe account ID created for this SetupIntent. */ @SerializedName("on_behalf_of") String onBehalfOf; /** * ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this * SetupIntent. */ @SerializedName("payment_method") String paymentMethod; /** The ID of the payment method configuration to use with this SetupIntent. */ @SerializedName("payment_method_configuration") String paymentMethodConfiguration; /** * When included, this hash creates a PaymentMethod that is set as the {@code * payment_method} value in the SetupIntent. */ @SerializedName("payment_method_data") PaymentMethodData paymentMethodData; /** Payment method-specific configuration for this SetupIntent. */ @SerializedName("payment_method_options") PaymentMethodOptions paymentMethodOptions; /** * The list of payment method types (for example, card) that this SetupIntent can use. If you * don't provide this, it defaults to ["card"]. */ @SerializedName("payment_method_types") List paymentMethodTypes; /** * The URL to redirect your customer back to after they authenticate or cancel their payment on * the payment method's app or site. To redirect to a mobile application, you can alternatively * supply an application URI scheme. This parameter can only be used with {@code * confirm=true}. */ @SerializedName("return_url") String returnUrl; /** * If you populate this hash, this SetupIntent generates a {@code single_use} mandate after * successful completion. */ @SerializedName("single_use") SingleUse singleUse; /** * Indicates how the payment method is intended to be used in the future. If not provided, this * value defaults to {@code off_session}. */ @SerializedName("usage") Usage usage; /** * 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 SetupIntentCreateParams( Boolean attachToSelf, AutomaticPaymentMethods automaticPaymentMethods, Boolean confirm, String confirmationToken, String customer, String description, List expand, Map extraParams, List flowDirections, Object mandateData, Map metadata, String onBehalfOf, String paymentMethod, String paymentMethodConfiguration, PaymentMethodData paymentMethodData, PaymentMethodOptions paymentMethodOptions, List paymentMethodTypes, String returnUrl, SingleUse singleUse, Usage usage, Boolean useStripeSdk) { this.attachToSelf = attachToSelf; this.automaticPaymentMethods = automaticPaymentMethods; this.confirm = confirm; this.confirmationToken = confirmationToken; this.customer = customer; this.description = description; this.expand = expand; this.extraParams = extraParams; this.flowDirections = flowDirections; this.mandateData = mandateData; this.metadata = metadata; this.onBehalfOf = onBehalfOf; this.paymentMethod = paymentMethod; this.paymentMethodConfiguration = paymentMethodConfiguration; this.paymentMethodData = paymentMethodData; this.paymentMethodOptions = paymentMethodOptions; this.paymentMethodTypes = paymentMethodTypes; this.returnUrl = returnUrl; this.singleUse = singleUse; this.usage = usage; this.useStripeSdk = useStripeSdk; } public static Builder builder() { return new Builder(); } public static class Builder { private Boolean attachToSelf; private AutomaticPaymentMethods automaticPaymentMethods; private Boolean confirm; private String confirmationToken; private String customer; private String description; private List expand; private Map extraParams; private List flowDirections; private Object mandateData; private Map metadata; private String onBehalfOf; private String paymentMethod; private String paymentMethodConfiguration; private PaymentMethodData paymentMethodData; private PaymentMethodOptions paymentMethodOptions; private List paymentMethodTypes; private String returnUrl; private SingleUse singleUse; private Usage usage; private Boolean useStripeSdk; /** Finalize and obtain parameter instance from this builder. */ public SetupIntentCreateParams build() { return new SetupIntentCreateParams( this.attachToSelf, this.automaticPaymentMethods, this.confirm, this.confirmationToken, this.customer, this.description, this.expand, this.extraParams, this.flowDirections, this.mandateData, this.metadata, this.onBehalfOf, this.paymentMethod, this.paymentMethodConfiguration, this.paymentMethodData, this.paymentMethodOptions, this.paymentMethodTypes, this.returnUrl, this.singleUse, this.usage, this.useStripeSdk); } /** * If present, the SetupIntent's payment method will be attached to the in-context Stripe * Account. * *

It can only be used for this Stripe Account’s own money movement flows like * InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a * PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a * Customer. */ public Builder setAttachToSelf(Boolean attachToSelf) { this.attachToSelf = attachToSelf; return this; } /** * When you enable this parameter, this SetupIntent accepts payment methods that you enable in * the Dashboard and that are compatible with its other parameters. */ public Builder setAutomaticPaymentMethods( SetupIntentCreateParams.AutomaticPaymentMethods automaticPaymentMethods) { this.automaticPaymentMethods = automaticPaymentMethods; return this; } /** * Set to {@code true} to attempt to confirm this SetupIntent immediately. This parameter * defaults to {@code false}. If a card is the attached payment method, you can provide a {@code * return_url} in case further authentication is necessary. */ public Builder setConfirm(Boolean confirm) { this.confirm = confirm; return this; } /** * ID of the ConfirmationToken used to confirm this SetupIntent. * *

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; } /** * ID of the Customer this SetupIntent belongs to, if one exists. * *

If present, the SetupIntent's payment method will be attached to the Customer on * successful setup. Payment methods attached to other Customers cannot be used with this * SetupIntent. */ public Builder setCustomer(String customer) { this.customer = customer; return this; } /** An arbitrary string attached to the object. Often useful for displaying to users. */ public Builder setDescription(String description) { this.description = description; return this; } /** * 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 * SetupIntentCreateParams#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 * SetupIntentCreateParams#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 * SetupIntentCreateParams#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { this.extraParams = new HashMap<>(); } this.extraParams.put(key, value); return this; } /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. * See {@link SetupIntentCreateParams#extraParams} for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { this.extraParams = new HashMap<>(); } this.extraParams.putAll(map); return this; } /** * Add an element to `flowDirections` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link * SetupIntentCreateParams#flowDirections} for the field documentation. */ public Builder addFlowDirection(SetupIntentCreateParams.FlowDirection element) { if (this.flowDirections == null) { this.flowDirections = new ArrayList<>(); } this.flowDirections.add(element); return this; } /** * Add all elements to `flowDirections` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link * SetupIntentCreateParams#flowDirections} for the field documentation. */ public Builder addAllFlowDirection(List elements) { if (this.flowDirections == null) { this.flowDirections = new ArrayList<>(); } this.flowDirections.addAll(elements); return this; } /** * This hash contains details about the mandate to create. This parameter can only be used with * {@code * confirm=true}. */ public Builder setMandateData(SetupIntentCreateParams.MandateData mandateData) { this.mandateData = mandateData; return this; } /** * This hash contains details about the mandate to create. This parameter can only be used with * {@code * confirm=true}. */ public Builder setMandateData(EmptyParam mandateData) { this.mandateData = mandateData; 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 * SetupIntentCreateParams#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 SetupIntentCreateParams#metadata} for the field documentation. */ public Builder putAllMetadata(Map map) { if (this.metadata == null) { this.metadata = new HashMap<>(); } this.metadata.putAll(map); return this; } /** The Stripe account ID created for this SetupIntent. */ public Builder setOnBehalfOf(String onBehalfOf) { this.onBehalfOf = onBehalfOf; return this; } /** * ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this * SetupIntent. */ public Builder setPaymentMethod(String paymentMethod) { this.paymentMethod = paymentMethod; return this; } /** The ID of the payment method configuration to use with this SetupIntent. */ public Builder setPaymentMethodConfiguration(String paymentMethodConfiguration) { this.paymentMethodConfiguration = paymentMethodConfiguration; return this; } /** * When included, this hash creates a PaymentMethod that is set as the {@code * payment_method} value in the SetupIntent. */ public Builder setPaymentMethodData( SetupIntentCreateParams.PaymentMethodData paymentMethodData) { this.paymentMethodData = paymentMethodData; return this; } /** Payment method-specific configuration for this SetupIntent. */ public Builder setPaymentMethodOptions( SetupIntentCreateParams.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 * SetupIntentCreateParams#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 SetupIntentCreateParams#paymentMethodTypes} for the field documentation. */ public Builder addAllPaymentMethodType(List elements) { if (this.paymentMethodTypes == null) { this.paymentMethodTypes = new ArrayList<>(); } this.paymentMethodTypes.addAll(elements); 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. To redirect to a mobile application, you can alternatively * supply an application URI scheme. This parameter can only be used with {@code * confirm=true}. */ public Builder setReturnUrl(String returnUrl) { this.returnUrl = returnUrl; return this; } /** * If you populate this hash, this SetupIntent generates a {@code single_use} mandate after * successful completion. */ public Builder setSingleUse(SetupIntentCreateParams.SingleUse singleUse) { this.singleUse = singleUse; return this; } /** * Indicates how the payment method is intended to be used in the future. If not provided, this * value defaults to {@code off_session}. */ public Builder setUsage(SetupIntentCreateParams.Usage usage) { this.usage = usage; 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 AutomaticPaymentMethods { /** * Controls whether this SetupIntent will accept redirect-based payment methods. * *

Redirect-based payment methods may require your customer to be redirected to a payment * method's app or site for authentication or additional steps. To confirm this SetupIntent, you * may be required to provide a {@code return_url} to redirect customers back to your site after * they authenticate or complete the setup. */ @SerializedName("allow_redirects") AllowRedirects allowRedirects; /** Required. Whether this feature is enabled. */ @SerializedName("enabled") Boolean enabled; /** * Map of extra parameters for custom features not available in this client library. The content * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each * key/value pair is serialized as if the key is a root-level field (serialized) name in this * param object. Effectively, this map is flattened to its parent instance. */ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; private AutomaticPaymentMethods( AllowRedirects allowRedirects, Boolean enabled, Map extraParams) { this.allowRedirects = allowRedirects; this.enabled = enabled; this.extraParams = extraParams; } public static Builder builder() { return new Builder(); } public static class Builder { private AllowRedirects allowRedirects; private Boolean enabled; private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ public SetupIntentCreateParams.AutomaticPaymentMethods build() { return new SetupIntentCreateParams.AutomaticPaymentMethods( this.allowRedirects, this.enabled, this.extraParams); } /** * Controls whether this SetupIntent will accept redirect-based payment methods. * *

Redirect-based payment methods may require your customer to be redirected to a payment * method's app or site for authentication or additional steps. To confirm this SetupIntent, you * may be required to provide a {@code return_url} to redirect customers back to your site * after they authenticate or complete the setup. */ public Builder setAllowRedirects( SetupIntentCreateParams.AutomaticPaymentMethods.AllowRedirects allowRedirects) { this.allowRedirects = allowRedirects; return this; } /** Required. Whether this feature is enabled. */ public Builder setEnabled(Boolean enabled) { this.enabled = enabled; return this; } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` * call, and subsequent calls add additional key/value pairs to the original map. See {@link * SetupIntentCreateParams.AutomaticPaymentMethods#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { this.extraParams = new HashMap<>(); } this.extraParams.put(key, value); return this; } /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. * See {@link SetupIntentCreateParams.AutomaticPaymentMethods#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 AllowRedirects implements ApiRequestParams.EnumParam { @SerializedName("always") ALWAYS("always"), @SerializedName("never") NEVER("never"); @Getter(onMethod_ = {@Override}) private final String value; AllowRedirects(String value) { this.value = value; } } } @Getter public static class MandateData { /** * Required. 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 SetupIntentCreateParams.MandateData build() { return new SetupIntentCreateParams.MandateData(this.customerAcceptance, this.extraParams); } /** * Required. This hash contains details about the customer acceptance of the * Mandate. */ public Builder setCustomerAcceptance( SetupIntentCreateParams.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 * SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.MandateData.CustomerAcceptance build() { return new SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.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( SetupIntentCreateParams.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( SetupIntentCreateParams.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(SetupIntentCreateParams.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 SetupIntentCreateParams.MandateData.CustomerAcceptance.Offline build() { return new SetupIntentCreateParams.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 * SetupIntentCreateParams.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 * SetupIntentCreateParams.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; /** * Required. The IP address from which the Mandate was accepted by the * customer. */ @SerializedName("ip_address") String ipAddress; /** * Required. 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 SetupIntentCreateParams.MandateData.CustomerAcceptance.Online build() { return new SetupIntentCreateParams.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 * SetupIntentCreateParams.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 * SetupIntentCreateParams.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; } /** * Required. The IP address from which the Mandate was accepted by the * customer. */ public Builder setIpAddress(String ipAddress) { this.ipAddress = ipAddress; return this; } /** * Required. 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; /** * If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment * method. */ @SerializedName("mb_way") MbWay mbWay; /** * 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 payto} PaymentMethod, this hash contains details about the PayTo payment * method. */ @SerializedName("payto") Payto payto; /** * 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 rechnung} PaymentMethod, this hash contains details about the Rechnung * payment method. */ @SerializedName("rechnung") Rechnung rechnung; /** * 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, MbWay mbWay, Map metadata, Mobilepay mobilepay, Multibanco multibanco, Oxxo oxxo, P24 p24, Paynow paynow, Paypal paypal, Payto payto, Pix pix, Promptpay promptpay, RadarOptions radarOptions, Rechnung rechnung, 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.mbWay = mbWay; this.metadata = metadata; this.mobilepay = mobilepay; this.multibanco = multibanco; this.oxxo = oxxo; this.p24 = p24; this.paynow = paynow; this.paypal = paypal; this.payto = payto; this.pix = pix; this.promptpay = promptpay; this.radarOptions = radarOptions; this.rechnung = rechnung; 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 MbWay mbWay; private Map metadata; private Mobilepay mobilepay; private Multibanco multibanco; private Oxxo oxxo; private P24 p24; private Paynow paynow; private Paypal paypal; private Payto payto; private Pix pix; private Promptpay promptpay; private RadarOptions radarOptions; private Rechnung rechnung; 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 SetupIntentCreateParams.PaymentMethodData build() { return new SetupIntentCreateParams.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.mbWay, this.metadata, this.mobilepay, this.multibanco, this.oxxo, this.p24, this.paynow, this.paypal, this.payto, this.pix, this.promptpay, this.radarOptions, this.rechnung, 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(SetupIntentCreateParams.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(SetupIntentCreateParams.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( SetupIntentCreateParams.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(SetupIntentCreateParams.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( SetupIntentCreateParams.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(SetupIntentCreateParams.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( SetupIntentCreateParams.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(SetupIntentCreateParams.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( SetupIntentCreateParams.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( SetupIntentCreateParams.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(SetupIntentCreateParams.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(SetupIntentCreateParams.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(SetupIntentCreateParams.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( SetupIntentCreateParams.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(SetupIntentCreateParams.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 * SetupIntentCreateParams.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 SetupIntentCreateParams.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(SetupIntentCreateParams.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(SetupIntentCreateParams.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(SetupIntentCreateParams.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(SetupIntentCreateParams.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( SetupIntentCreateParams.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(SetupIntentCreateParams.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(SetupIntentCreateParams.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(SetupIntentCreateParams.PaymentMethodData.Link link) { this.link = link; return this; } /** * If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment * method. */ public Builder setMbWay(SetupIntentCreateParams.PaymentMethodData.MbWay mbWay) { this.mbWay = mbWay; 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 * SetupIntentCreateParams.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 SetupIntentCreateParams.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(SetupIntentCreateParams.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( SetupIntentCreateParams.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(SetupIntentCreateParams.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(SetupIntentCreateParams.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(SetupIntentCreateParams.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(SetupIntentCreateParams.PaymentMethodData.Paypal paypal) { this.paypal = paypal; return this; } /** * If this is a {@code payto} PaymentMethod, this hash contains details about the PayTo * payment method. */ public Builder setPayto(SetupIntentCreateParams.PaymentMethodData.Payto payto) { this.payto = payto; return this; } /** * If this is a {@code pix} PaymentMethod, this hash contains details about the Pix payment * method. */ public Builder setPix(SetupIntentCreateParams.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(SetupIntentCreateParams.PaymentMethodData.Promptpay promptpay) { this.promptpay = promptpay; return this; } /** * Options to configure Radar. See Radar * Session for more information. */ public Builder setRadarOptions( SetupIntentCreateParams.PaymentMethodData.RadarOptions radarOptions) { this.radarOptions = radarOptions; return this; } /** * If this is a {@code rechnung} PaymentMethod, this hash contains details about the Rechnung * payment method. */ public Builder setRechnung(SetupIntentCreateParams.PaymentMethodData.Rechnung rechnung) { this.rechnung = rechnung; return this; } /** * If this is a {@code Revolut Pay} PaymentMethod, this hash contains details about the * Revolut Pay payment method. */ public Builder setRevolutPay( SetupIntentCreateParams.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(SetupIntentCreateParams.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(SetupIntentCreateParams.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(SetupIntentCreateParams.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(SetupIntentCreateParams.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(SetupIntentCreateParams.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( SetupIntentCreateParams.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(SetupIntentCreateParams.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(SetupIntentCreateParams.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 SetupIntentCreateParams.PaymentMethodData.AcssDebit build() { return new SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.PaymentMethodData.Affirm build() { return new SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.PaymentMethodData.AfterpayClearpay build() { return new SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.PaymentMethodData.Alipay build() { return new SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.PaymentMethodData.AmazonPay build() { return new SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.PaymentMethodData.AuBecsDebit build() { return new SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.PaymentMethodData.BacsDebit build() { return new SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.PaymentMethodData.Bancontact build() { return new SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.PaymentMethodData.BillingDetails build() { return new SetupIntentCreateParams.PaymentMethodData.BillingDetails( this.address, this.email, this.extraParams, this.name, this.phone); } /** Billing address. */ public Builder setAddress( SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.PaymentMethodData.BillingDetails.Address build() { return new SetupIntentCreateParams.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 * SetupIntentCreateParams.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 * SetupIntentCreateParams.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 SetupIntentCreateParams.PaymentMethodData.Blik build() { return new SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.PaymentMethodData.Boleto build() { return new SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.PaymentMethodData.Cashapp build() { return new SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.PaymentMethodData.CustomerBalance build() { return new SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.PaymentMethodData.Eps build() { return new SetupIntentCreateParams.PaymentMethodData.Eps(this.bank, this.extraParams); } /** The customer's bank. */ public Builder setBank(SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.PaymentMethodData.Fpx build() { return new SetupIntentCreateParams.PaymentMethodData.Fpx( this.accountHolderType, this.bank, this.extraParams); } /** Account holder type for FPX transaction. */ public Builder setAccountHolderType( SetupIntentCreateParams.PaymentMethodData.Fpx.AccountHolderType accountHolderType) { this.accountHolderType = accountHolderType; return this; } /** Required. The customer's bank. */ public Builder setBank(SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.PaymentMethodData.Giropay build() { return new SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.PaymentMethodData.Grabpay build() { return new SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.PaymentMethodData.Ideal build() { return new SetupIntentCreateParams.PaymentMethodData.Ideal(this.bank, this.extraParams); } /** The customer's bank. */ public Builder setBank(SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.PaymentMethodData.InteracPresent build() { return new SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.PaymentMethodData.Klarna build() { return new SetupIntentCreateParams.PaymentMethodData.Klarna(this.dob, this.extraParams); } /** Customer's date of birth. */ public Builder setDob(SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.PaymentMethodData.Klarna.Dob build() { return new SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.PaymentMethodData.Konbini build() { return new SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.PaymentMethodData.Link build() { return new SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.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 MbWay { /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. * Instead, each key/value pair is serialized 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 MbWay(Map extraParams) { this.extraParams = extraParams; } public static Builder builder() { return new Builder(); } public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ public SetupIntentCreateParams.PaymentMethodData.MbWay build() { return new SetupIntentCreateParams.PaymentMethodData.MbWay(this.extraParams); } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link SetupIntentCreateParams.PaymentMethodData.MbWay#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { this.extraParams = new HashMap<>(); } this.extraParams.put(key, value); return this; } /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link SetupIntentCreateParams.PaymentMethodData.MbWay#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 SetupIntentCreateParams.PaymentMethodData.Mobilepay build() { return new SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.PaymentMethodData.Multibanco build() { return new SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.PaymentMethodData.Oxxo build() { return new SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.PaymentMethodData.P24 build() { return new SetupIntentCreateParams.PaymentMethodData.P24(this.bank, this.extraParams); } /** The customer's bank. */ public Builder setBank(SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.PaymentMethodData.Paynow build() { return new SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.PaymentMethodData.Paypal build() { return new SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.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 Payto { /** The account number for the bank account. */ @SerializedName("account_number") String accountNumber; /** 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; /** The PayID alias for the bank account. */ @SerializedName("pay_id") String payId; private Payto( String accountNumber, String bsbNumber, Map extraParams, String payId) { this.accountNumber = accountNumber; this.bsbNumber = bsbNumber; this.extraParams = extraParams; this.payId = payId; } public static Builder builder() { return new Builder(); } public static class Builder { private String accountNumber; private String bsbNumber; private Map extraParams; private String payId; /** Finalize and obtain parameter instance from this builder. */ public SetupIntentCreateParams.PaymentMethodData.Payto build() { return new SetupIntentCreateParams.PaymentMethodData.Payto( this.accountNumber, this.bsbNumber, this.extraParams, this.payId); } /** The account number for the bank account. */ public Builder setAccountNumber(String accountNumber) { this.accountNumber = accountNumber; return this; } /** 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 SetupIntentCreateParams.PaymentMethodData.Payto#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { this.extraParams = new HashMap<>(); } this.extraParams.put(key, value); return this; } /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link SetupIntentCreateParams.PaymentMethodData.Payto#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 PayID alias for the bank account. */ public Builder setPayId(String payId) { this.payId = payId; 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 SetupIntentCreateParams.PaymentMethodData.Pix build() { return new SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.PaymentMethodData.Promptpay build() { return new SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.PaymentMethodData.RadarOptions build() { return new SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.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 Rechnung { /** Required. 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 Rechnung(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 SetupIntentCreateParams.PaymentMethodData.Rechnung build() { return new SetupIntentCreateParams.PaymentMethodData.Rechnung(this.dob, this.extraParams); } /** Required. Customer's date of birth */ public Builder setDob(SetupIntentCreateParams.PaymentMethodData.Rechnung.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 SetupIntentCreateParams.PaymentMethodData.Rechnung#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { this.extraParams = new HashMap<>(); } this.extraParams.put(key, value); return this; } /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link SetupIntentCreateParams.PaymentMethodData.Rechnung#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 SetupIntentCreateParams.PaymentMethodData.Rechnung.Dob build() { return new SetupIntentCreateParams.PaymentMethodData.Rechnung.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 SetupIntentCreateParams.PaymentMethodData.Rechnung.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 SetupIntentCreateParams.PaymentMethodData.Rechnung.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 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 SetupIntentCreateParams.PaymentMethodData.RevolutPay build() { return new SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.PaymentMethodData.SepaDebit build() { return new SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.PaymentMethodData.Sofort build() { return new SetupIntentCreateParams.PaymentMethodData.Sofort( this.country, this.extraParams); } /** * Required. Two-letter ISO code representing the country the bank account * is located in. */ public Builder setCountry( SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.PaymentMethodData.Swish build() { return new SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.PaymentMethodData.Twint build() { return new SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.PaymentMethodData.UsBankAccount build() { return new SetupIntentCreateParams.PaymentMethodData.UsBankAccount( this.accountHolderType, this.accountNumber, this.accountType, this.extraParams, this.financialConnectionsAccount, this.routingNumber); } /** Account holder type: individual or company. */ public Builder setAccountHolderType( SetupIntentCreateParams.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( SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.PaymentMethodData.WechatPay build() { return new SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.PaymentMethodData.Zip build() { return new SetupIntentCreateParams.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 SetupIntentCreateParams.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 SetupIntentCreateParams.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("mb_way") MB_WAY("mb_way"), @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("payto") PAYTO("payto"), @SerializedName("pix") PIX("pix"), @SerializedName("promptpay") PROMPTPAY("promptpay"), @SerializedName("rechnung") RECHNUNG("rechnung"), @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} SetupIntent, this sub-hash contains details about the ACSS * Debit payment method options. */ @SerializedName("acss_debit") AcssDebit acssDebit; /** * If this is a {@code amazon_pay} SetupIntent, this sub-hash contains details about the * AmazonPay payment method options. */ @SerializedName("amazon_pay") AmazonPay amazonPay; /** * If this is a {@code bacs_debit} SetupIntent, this sub-hash contains details about the Bacs * Debit payment method options. */ @SerializedName("bacs_debit") BacsDebit bacsDebit; /** Configuration for any card setup attempted on this SetupIntent. */ @SerializedName("card") Card card; /** * If this is a {@code card_present} PaymentMethod, this sub-hash contains details about the * card-present payment method options. */ @SerializedName("card_present") CardPresent cardPresent; /** * Map of extra parameters for custom features not available in this client library. The content * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each * key/value pair is serialized as if the key is a root-level field (serialized) name in this * param object. Effectively, this map is flattened to its parent instance. */ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; /** * If this is a {@code link} PaymentMethod, this sub-hash contains details about the Link * payment method options. */ @SerializedName("link") Link link; /** * If this is a {@code paypal} PaymentMethod, this sub-hash contains details about the PayPal * payment method options. */ @SerializedName("paypal") Paypal paypal; /** * If this is a {@code payto} SetupIntent, this sub-hash contains details about the PayTo * payment method options. */ @SerializedName("payto") Payto payto; /** * If this is a {@code sepa_debit} SetupIntent, this sub-hash contains details about the SEPA * Debit payment method options. */ @SerializedName("sepa_debit") SepaDebit sepaDebit; /** * If this is a {@code us_bank_account} SetupIntent, this sub-hash contains details about the US * bank account payment method options. */ @SerializedName("us_bank_account") UsBankAccount usBankAccount; private PaymentMethodOptions( AcssDebit acssDebit, AmazonPay amazonPay, BacsDebit bacsDebit, Card card, CardPresent cardPresent, Map extraParams, Link link, Paypal paypal, Payto payto, SepaDebit sepaDebit, UsBankAccount usBankAccount) { this.acssDebit = acssDebit; this.amazonPay = amazonPay; this.bacsDebit = bacsDebit; this.card = card; this.cardPresent = cardPresent; this.extraParams = extraParams; this.link = link; this.paypal = paypal; this.payto = payto; this.sepaDebit = sepaDebit; this.usBankAccount = usBankAccount; } public static Builder builder() { return new Builder(); } public static class Builder { private AcssDebit acssDebit; private AmazonPay amazonPay; private BacsDebit bacsDebit; private Card card; private CardPresent cardPresent; private Map extraParams; private Link link; private Paypal paypal; private Payto payto; private SepaDebit sepaDebit; private UsBankAccount usBankAccount; /** Finalize and obtain parameter instance from this builder. */ public SetupIntentCreateParams.PaymentMethodOptions build() { return new SetupIntentCreateParams.PaymentMethodOptions( this.acssDebit, this.amazonPay, this.bacsDebit, this.card, this.cardPresent, this.extraParams, this.link, this.paypal, this.payto, this.sepaDebit, this.usBankAccount); } /** * If this is a {@code acss_debit} SetupIntent, this sub-hash contains details about the ACSS * Debit payment method options. */ public Builder setAcssDebit( SetupIntentCreateParams.PaymentMethodOptions.AcssDebit acssDebit) { this.acssDebit = acssDebit; return this; } /** * If this is a {@code amazon_pay} SetupIntent, this sub-hash contains details about the * AmazonPay payment method options. */ public Builder setAmazonPay( SetupIntentCreateParams.PaymentMethodOptions.AmazonPay amazonPay) { this.amazonPay = amazonPay; return this; } /** * If this is a {@code bacs_debit} SetupIntent, this sub-hash contains details about the Bacs * Debit payment method options. */ public Builder setBacsDebit( SetupIntentCreateParams.PaymentMethodOptions.BacsDebit bacsDebit) { this.bacsDebit = bacsDebit; return this; } /** Configuration for any card setup attempted on this SetupIntent. */ public Builder setCard(SetupIntentCreateParams.PaymentMethodOptions.Card 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( SetupIntentCreateParams.PaymentMethodOptions.CardPresent cardPresent) { this.cardPresent = cardPresent; return this; } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` * call, and subsequent calls add additional key/value pairs to the original map. See {@link * SetupIntentCreateParams.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 SetupIntentCreateParams.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 link} PaymentMethod, this sub-hash contains details about the Link * payment method options. */ public Builder setLink(SetupIntentCreateParams.PaymentMethodOptions.Link link) { this.link = link; return this; } /** * If this is a {@code paypal} PaymentMethod, this sub-hash contains details about the PayPal * payment method options. */ public Builder setPaypal(SetupIntentCreateParams.PaymentMethodOptions.Paypal paypal) { this.paypal = paypal; return this; } /** * If this is a {@code payto} SetupIntent, this sub-hash contains details about the PayTo * payment method options. */ public Builder setPayto(SetupIntentCreateParams.PaymentMethodOptions.Payto payto) { this.payto = payto; return this; } /** * If this is a {@code sepa_debit} SetupIntent, this sub-hash contains details about the SEPA * Debit payment method options. */ public Builder setSepaDebit( SetupIntentCreateParams.PaymentMethodOptions.SepaDebit sepaDebit) { this.sepaDebit = sepaDebit; return this; } /** * If this is a {@code us_bank_account} SetupIntent, this sub-hash contains details about the * US bank account payment method options. */ public Builder setUsBankAccount( SetupIntentCreateParams.PaymentMethodOptions.UsBankAccount usBankAccount) { this.usBankAccount = usBankAccount; return this; } } @Getter public static class AcssDebit { /** * Three-letter ISO currency * code, in lowercase. Must be a supported * currency. */ @SerializedName("currency") Currency currency; /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. * Instead, each key/value pair is serialized 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; /** Bank account verification method. */ @SerializedName("verification_method") VerificationMethod verificationMethod; private AcssDebit( Currency currency, Map extraParams, MandateOptions mandateOptions, VerificationMethod verificationMethod) { this.currency = currency; this.extraParams = extraParams; this.mandateOptions = mandateOptions; this.verificationMethod = verificationMethod; } public static Builder builder() { return new Builder(); } public static class Builder { private Currency currency; private Map extraParams; private MandateOptions mandateOptions; private VerificationMethod verificationMethod; /** Finalize and obtain parameter instance from this builder. */ public SetupIntentCreateParams.PaymentMethodOptions.AcssDebit build() { return new SetupIntentCreateParams.PaymentMethodOptions.AcssDebit( this.currency, this.extraParams, this.mandateOptions, this.verificationMethod); } /** * Three-letter ISO currency * code, in lowercase. Must be a supported * currency. */ public Builder setCurrency( SetupIntentCreateParams.PaymentMethodOptions.AcssDebit.Currency currency) { this.currency = currency; return this; } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link SetupIntentCreateParams.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 SetupIntentCreateParams.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( SetupIntentCreateParams.PaymentMethodOptions.AcssDebit.MandateOptions mandateOptions) { this.mandateOptions = mandateOptions; return this; } /** Bank account verification method. */ public Builder setVerificationMethod( SetupIntentCreateParams.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; /** List of Stripe products where this mandate can be selected automatically. */ @SerializedName("default_for") List defaultFor; /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. * Instead, each key/value pair is serialized 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, List defaultFor, Map extraParams, String intervalDescription, PaymentSchedule paymentSchedule, TransactionType transactionType) { this.customMandateUrl = customMandateUrl; this.defaultFor = defaultFor; 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 List< SetupIntentCreateParams.PaymentMethodOptions.AcssDebit.MandateOptions.DefaultFor> defaultFor; private Map extraParams; private String intervalDescription; private PaymentSchedule paymentSchedule; private TransactionType transactionType; /** Finalize and obtain parameter instance from this builder. */ public SetupIntentCreateParams.PaymentMethodOptions.AcssDebit.MandateOptions build() { return new SetupIntentCreateParams.PaymentMethodOptions.AcssDebit.MandateOptions( this.customMandateUrl, this.defaultFor, 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 an element to `defaultFor` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link * SetupIntentCreateParams.PaymentMethodOptions.AcssDebit.MandateOptions#defaultFor} for * the field documentation. */ public Builder addDefaultFor( SetupIntentCreateParams.PaymentMethodOptions.AcssDebit.MandateOptions.DefaultFor element) { if (this.defaultFor == null) { this.defaultFor = new ArrayList<>(); } this.defaultFor.add(element); return this; } /** * Add all elements to `defaultFor` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link * SetupIntentCreateParams.PaymentMethodOptions.AcssDebit.MandateOptions#defaultFor} for * the field documentation. */ public Builder addAllDefaultFor( List elements) { if (this.defaultFor == null) { this.defaultFor = new ArrayList<>(); } this.defaultFor.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 * SetupIntentCreateParams.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 * SetupIntentCreateParams.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( SetupIntentCreateParams.PaymentMethodOptions.AcssDebit.MandateOptions.PaymentSchedule paymentSchedule) { this.paymentSchedule = paymentSchedule; return this; } /** Transaction type of the mandate. */ public Builder setTransactionType( SetupIntentCreateParams.PaymentMethodOptions.AcssDebit.MandateOptions.TransactionType transactionType) { this.transactionType = transactionType; return this; } } public enum DefaultFor implements ApiRequestParams.EnumParam { @SerializedName("invoice") INVOICE("invoice"), @SerializedName("subscription") SUBSCRIPTION("subscription"); @Getter(onMethod_ = {@Override}) private final String value; DefaultFor(String value) { this.value = value; } } 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 Currency implements ApiRequestParams.EnumParam { @SerializedName("cad") CAD("cad"), @SerializedName("usd") USD("usd"); @Getter(onMethod_ = {@Override}) private final String value; Currency(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 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 SetupIntentCreateParams.PaymentMethodOptions.AmazonPay build() { return new SetupIntentCreateParams.PaymentMethodOptions.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 SetupIntentCreateParams.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 SetupIntentCreateParams.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; } } } @Getter public static class BacsDebit { /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) * name in this param object. Effectively, this map is flattened to its parent instance. */ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; /** Additional fields for Mandate creation. */ @SerializedName("mandate_options") MandateOptions mandateOptions; private BacsDebit(Map extraParams, MandateOptions mandateOptions) { this.extraParams = extraParams; this.mandateOptions = mandateOptions; } public static Builder builder() { return new Builder(); } public static class Builder { private Map extraParams; private MandateOptions mandateOptions; /** Finalize and obtain parameter instance from this builder. */ public SetupIntentCreateParams.PaymentMethodOptions.BacsDebit build() { return new SetupIntentCreateParams.PaymentMethodOptions.BacsDebit( this.extraParams, this.mandateOptions); } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link SetupIntentCreateParams.PaymentMethodOptions.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 SetupIntentCreateParams.PaymentMethodOptions.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; } /** Additional fields for Mandate creation. */ public Builder setMandateOptions( SetupIntentCreateParams.PaymentMethodOptions.BacsDebit.MandateOptions mandateOptions) { this.mandateOptions = mandateOptions; return this; } } @Getter public static class MandateOptions { /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. * Instead, each key/value pair is serialized as if the key is a root-level field * (serialized) name in this param object. Effectively, this map is flattened to its parent * instance. */ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; private MandateOptions(Map extraParams) { this.extraParams = extraParams; } public static Builder builder() { return new Builder(); } public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ public SetupIntentCreateParams.PaymentMethodOptions.BacsDebit.MandateOptions build() { return new SetupIntentCreateParams.PaymentMethodOptions.BacsDebit.MandateOptions( this.extraParams); } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link * SetupIntentCreateParams.PaymentMethodOptions.BacsDebit.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 * SetupIntentCreateParams.PaymentMethodOptions.BacsDebit.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; } } } } @Getter public static class Card { /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. * Instead, each key/value pair is serialized 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; /** Configuration options for setting up an eMandate for cards issued in India. */ @SerializedName("mandate_options") MandateOptions mandateOptions; /** * When specified, this parameter signals that a card has been collected as MOTO (Mail Order * Telephone Order) and thus out of scope for SCA. This parameter can only be provided during * confirmation. */ @SerializedName("moto") Boolean moto; /** * Selected network to process this SetupIntent on. Depends on the available networks of the * card attached to the SetupIntent. Can be only set confirm-time. */ @SerializedName("network") Network network; /** * We strongly recommend that you rely on our SCA Engine to automatically prompt your * customers for authentication based on risk level and other requirements. * However, if you wish to request 3D Secure based on logic from your own fraud engine, * provide this option. If not provided, this value defaults to {@code automatic}. Read our * guide on manually * requesting 3D Secure for more information on how this configuration interacts with * Radar and our SCA Engine. */ @SerializedName("request_three_d_secure") RequestThreeDSecure requestThreeDSecure; /** * If 3D Secure authentication was performed with a third-party provider, the authentication * details to use for this setup. */ @SerializedName("three_d_secure") ThreeDSecure threeDSecure; private Card( Map extraParams, MandateOptions mandateOptions, Boolean moto, Network network, RequestThreeDSecure requestThreeDSecure, ThreeDSecure threeDSecure) { this.extraParams = extraParams; this.mandateOptions = mandateOptions; this.moto = moto; this.network = network; this.requestThreeDSecure = requestThreeDSecure; this.threeDSecure = threeDSecure; } public static Builder builder() { return new Builder(); } public static class Builder { private Map extraParams; private MandateOptions mandateOptions; private Boolean moto; private Network network; private RequestThreeDSecure requestThreeDSecure; private ThreeDSecure threeDSecure; /** Finalize and obtain parameter instance from this builder. */ public SetupIntentCreateParams.PaymentMethodOptions.Card build() { return new SetupIntentCreateParams.PaymentMethodOptions.Card( this.extraParams, this.mandateOptions, this.moto, this.network, this.requestThreeDSecure, this.threeDSecure); } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link SetupIntentCreateParams.PaymentMethodOptions.Card#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { this.extraParams = new HashMap<>(); } this.extraParams.put(key, value); return this; } /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link SetupIntentCreateParams.PaymentMethodOptions.Card#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { this.extraParams = new HashMap<>(); } this.extraParams.putAll(map); return this; } /** Configuration options for setting up an eMandate for cards issued in India. */ public Builder setMandateOptions( SetupIntentCreateParams.PaymentMethodOptions.Card.MandateOptions mandateOptions) { this.mandateOptions = mandateOptions; return this; } /** * When specified, this parameter signals that a card has been collected as MOTO (Mail Order * Telephone Order) and thus out of scope for SCA. This parameter can only be provided * during confirmation. */ public Builder setMoto(Boolean moto) { this.moto = moto; return this; } /** * Selected network to process this SetupIntent on. Depends on the available networks of the * card attached to the SetupIntent. Can be only set confirm-time. */ public Builder setNetwork( SetupIntentCreateParams.PaymentMethodOptions.Card.Network network) { this.network = network; return this; } /** * We strongly recommend that you rely on our SCA Engine to automatically prompt your * customers for authentication based on risk level and other requirements. * However, if you wish to request 3D Secure based on logic from your own fraud engine, * provide this option. If not provided, this value defaults to {@code automatic}. Read our * guide on manually * requesting 3D Secure for more information on how this configuration interacts with * Radar and our SCA Engine. */ public Builder setRequestThreeDSecure( SetupIntentCreateParams.PaymentMethodOptions.Card.RequestThreeDSecure requestThreeDSecure) { this.requestThreeDSecure = requestThreeDSecure; return this; } /** * If 3D Secure authentication was performed with a third-party provider, the authentication * details to use for this setup. */ public Builder setThreeDSecure( SetupIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure threeDSecure) { this.threeDSecure = threeDSecure; return this; } } @Getter public static class MandateOptions { /** Required. Amount to be charged for future payments. */ @SerializedName("amount") Long amount; /** * Required. One of {@code fixed} or {@code maximum}. If {@code fixed}, the * {@code amount} param refers to the exact amount to be charged in future payments. If * {@code maximum}, the amount charged can be up to the value passed for the {@code amount} * param. */ @SerializedName("amount_type") AmountType amountType; /** * Required. Currency in which future payments will be charged. * Three-letter ISO currency * code, in lowercase. Must be a supported * currency. */ @SerializedName("currency") String currency; /** * A description of the mandate or subscription that is meant to be displayed to the * customer. */ @SerializedName("description") String description; /** * End date of the mandate or subscription. If not provided, the mandate will be active * until canceled. If provided, end date should be after start date. */ @SerializedName("end_date") Long endDate; /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. * Instead, each key/value pair is serialized 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. Specifies payment frequency. One of {@code day}, {@code week}, * {@code month}, {@code year}, or {@code sporadic}. */ @SerializedName("interval") Interval interval; /** * The number of intervals between payments. For example, {@code interval=month} and {@code * interval_count=3} indicates one payment every three months. Maximum of one year interval * allowed (1 year, 12 months, or 52 weeks). This parameter is optional when {@code * interval=sporadic}. */ @SerializedName("interval_count") Long intervalCount; /** Required. Unique identifier for the mandate or subscription. */ @SerializedName("reference") String reference; /** * Required. Start date of the mandate or subscription. Start date should * not be lesser than yesterday. */ @SerializedName("start_date") Long startDate; /** Specifies the type of mandates supported. Possible values are {@code india}. */ @SerializedName("supported_types") List supportedTypes; private MandateOptions( Long amount, AmountType amountType, String currency, String description, Long endDate, Map extraParams, Interval interval, Long intervalCount, String reference, Long startDate, List supportedTypes) { this.amount = amount; this.amountType = amountType; this.currency = currency; this.description = description; this.endDate = endDate; this.extraParams = extraParams; this.interval = interval; this.intervalCount = intervalCount; this.reference = reference; this.startDate = startDate; this.supportedTypes = supportedTypes; } public static Builder builder() { return new Builder(); } public static class Builder { private Long amount; private AmountType amountType; private String currency; private String description; private Long endDate; private Map extraParams; private Interval interval; private Long intervalCount; private String reference; private Long startDate; private List< SetupIntentCreateParams.PaymentMethodOptions.Card.MandateOptions.SupportedType> supportedTypes; /** Finalize and obtain parameter instance from this builder. */ public SetupIntentCreateParams.PaymentMethodOptions.Card.MandateOptions build() { return new SetupIntentCreateParams.PaymentMethodOptions.Card.MandateOptions( this.amount, this.amountType, this.currency, this.description, this.endDate, this.extraParams, this.interval, this.intervalCount, this.reference, this.startDate, this.supportedTypes); } /** Required. Amount to be charged for future payments. */ public Builder setAmount(Long amount) { this.amount = amount; return this; } /** * Required. One of {@code fixed} or {@code maximum}. If {@code fixed}, * the {@code amount} param refers to the exact amount to be charged in future payments. * If {@code maximum}, the amount charged can be up to the value passed for the {@code * amount} param. */ public Builder setAmountType( SetupIntentCreateParams.PaymentMethodOptions.Card.MandateOptions.AmountType amountType) { this.amountType = amountType; return this; } /** * Required. Currency in which future payments will be charged. * Three-letter ISO currency * code, in lowercase. Must be a supported currency. */ public Builder setCurrency(String currency) { this.currency = currency; return this; } /** * A description of the mandate or subscription that is meant to be displayed to the * customer. */ public Builder setDescription(String description) { this.description = description; return this; } /** * End date of the mandate or subscription. If not provided, the mandate will be active * until canceled. If provided, end date should be after start date. */ public Builder setEndDate(Long endDate) { this.endDate = endDate; return this; } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link * SetupIntentCreateParams.PaymentMethodOptions.Card.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 * SetupIntentCreateParams.PaymentMethodOptions.Card.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; } /** * Required. Specifies payment frequency. One of {@code day}, {@code * week}, {@code month}, {@code year}, or {@code sporadic}. */ public Builder setInterval( SetupIntentCreateParams.PaymentMethodOptions.Card.MandateOptions.Interval interval) { this.interval = interval; return this; } /** * The number of intervals between payments. For example, {@code interval=month} and * {@code interval_count=3} indicates one payment every three months. Maximum of one year * interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when * {@code interval=sporadic}. */ public Builder setIntervalCount(Long intervalCount) { this.intervalCount = intervalCount; return this; } /** Required. Unique identifier for the mandate or subscription. */ public Builder setReference(String reference) { this.reference = reference; return this; } /** * Required. Start date of the mandate or subscription. Start date should * not be lesser than yesterday. */ public Builder setStartDate(Long startDate) { this.startDate = startDate; return this; } /** * Add an element to `supportedTypes` list. A list is initialized for the first * `add/addAll` call, and subsequent calls adds additional elements to the original list. * See {@link * SetupIntentCreateParams.PaymentMethodOptions.Card.MandateOptions#supportedTypes} for * the field documentation. */ public Builder addSupportedType( SetupIntentCreateParams.PaymentMethodOptions.Card.MandateOptions.SupportedType element) { if (this.supportedTypes == null) { this.supportedTypes = new ArrayList<>(); } this.supportedTypes.add(element); return this; } /** * Add all elements to `supportedTypes` list. A list is initialized for the first * `add/addAll` call, and subsequent calls adds additional elements to the original list. * See {@link * SetupIntentCreateParams.PaymentMethodOptions.Card.MandateOptions#supportedTypes} for * the field documentation. */ public Builder addAllSupportedType( List elements) { if (this.supportedTypes == null) { this.supportedTypes = new ArrayList<>(); } this.supportedTypes.addAll(elements); return this; } } public enum AmountType implements ApiRequestParams.EnumParam { @SerializedName("fixed") FIXED("fixed"), @SerializedName("maximum") MAXIMUM("maximum"); @Getter(onMethod_ = {@Override}) private final String value; AmountType(String value) { this.value = value; } } public enum Interval implements ApiRequestParams.EnumParam { @SerializedName("day") DAY("day"), @SerializedName("month") MONTH("month"), @SerializedName("sporadic") SPORADIC("sporadic"), @SerializedName("week") WEEK("week"), @SerializedName("year") YEAR("year"); @Getter(onMethod_ = {@Override}) private final String value; Interval(String value) { this.value = value; } } public enum SupportedType implements ApiRequestParams.EnumParam { @SerializedName("india") INDIA("india"); @Getter(onMethod_ = {@Override}) private final String value; SupportedType(String value) { this.value = value; } } } @Getter public static class ThreeDSecure { /** The {@code transStatus} returned from the card Issuer’s ACS in the ARes. */ @SerializedName("ares_trans_status") AresTransStatus aresTransStatus; /** * The cryptogram, also known as the "authentication value" (AAV, CAVV or AEVV). * This value is 20 bytes, base64-encoded into a 28-character string. (Most 3D Secure * providers will return the base64-encoded version, which is what you should specify here.) */ @SerializedName("cryptogram") String cryptogram; /** * The Electronic Commerce Indicator (ECI) is returned by your 3D Secure provider and * indicates what degree of authentication was performed. */ @SerializedName("electronic_commerce_indicator") ElectronicCommerceIndicator electronicCommerceIndicator; /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. * Instead, each key/value pair is serialized 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; /** * Network specific 3DS fields. Network specific arguments require an explicit card brand * choice. The parameter `payment_method_options.card.network`` must be populated * accordingly */ @SerializedName("network_options") NetworkOptions networkOptions; /** * The challenge indicator ({@code threeDSRequestorChallengeInd}) which was requested in the * AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. */ @SerializedName("requestor_challenge_indicator") String requestorChallengeIndicator; /** * For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server Transaction ID * (dsTransID). */ @SerializedName("transaction_id") String transactionId; /** The version of 3D Secure that was performed. */ @SerializedName("version") Version version; private ThreeDSecure( AresTransStatus aresTransStatus, String cryptogram, ElectronicCommerceIndicator electronicCommerceIndicator, Map extraParams, NetworkOptions networkOptions, String requestorChallengeIndicator, String transactionId, Version version) { this.aresTransStatus = aresTransStatus; this.cryptogram = cryptogram; this.electronicCommerceIndicator = electronicCommerceIndicator; this.extraParams = extraParams; this.networkOptions = networkOptions; this.requestorChallengeIndicator = requestorChallengeIndicator; this.transactionId = transactionId; this.version = version; } public static Builder builder() { return new Builder(); } public static class Builder { private AresTransStatus aresTransStatus; private String cryptogram; private ElectronicCommerceIndicator electronicCommerceIndicator; private Map extraParams; private NetworkOptions networkOptions; private String requestorChallengeIndicator; private String transactionId; private Version version; /** Finalize and obtain parameter instance from this builder. */ public SetupIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure build() { return new SetupIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure( this.aresTransStatus, this.cryptogram, this.electronicCommerceIndicator, this.extraParams, this.networkOptions, this.requestorChallengeIndicator, this.transactionId, this.version); } /** The {@code transStatus} returned from the card Issuer’s ACS in the ARes. */ public Builder setAresTransStatus( SetupIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure.AresTransStatus aresTransStatus) { this.aresTransStatus = aresTransStatus; return this; } /** * The cryptogram, also known as the "authentication value" (AAV, CAVV or AEVV). * This value is 20 bytes, base64-encoded into a 28-character string. (Most 3D Secure * providers will return the base64-encoded version, which is what you should specify * here.) */ public Builder setCryptogram(String cryptogram) { this.cryptogram = cryptogram; return this; } /** * The Electronic Commerce Indicator (ECI) is returned by your 3D Secure provider and * indicates what degree of authentication was performed. */ public Builder setElectronicCommerceIndicator( SetupIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure .ElectronicCommerceIndicator electronicCommerceIndicator) { this.electronicCommerceIndicator = electronicCommerceIndicator; return this; } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link * SetupIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { this.extraParams = new HashMap<>(); } this.extraParams.put(key, value); return this; } /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link * SetupIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { this.extraParams = new HashMap<>(); } this.extraParams.putAll(map); return this; } /** * Network specific 3DS fields. Network specific arguments require an explicit card brand * choice. The parameter `payment_method_options.card.network`` must be populated * accordingly */ public Builder setNetworkOptions( SetupIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions networkOptions) { this.networkOptions = networkOptions; return this; } /** * The challenge indicator ({@code threeDSRequestorChallengeInd}) which was requested in * the AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. */ public Builder setRequestorChallengeIndicator(String requestorChallengeIndicator) { this.requestorChallengeIndicator = requestorChallengeIndicator; return this; } /** * For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server Transaction ID * (dsTransID). */ public Builder setTransactionId(String transactionId) { this.transactionId = transactionId; return this; } /** The version of 3D Secure that was performed. */ public Builder setVersion( SetupIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure.Version version) { this.version = version; return this; } } @Getter public static class NetworkOptions { /** Cartes Bancaires-specific 3DS fields. */ @SerializedName("cartes_bancaires") CartesBancaires cartesBancaires; /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. * Instead, each key/value pair is serialized 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 NetworkOptions(CartesBancaires cartesBancaires, Map extraParams) { this.cartesBancaires = cartesBancaires; this.extraParams = extraParams; } public static Builder builder() { return new Builder(); } public static class Builder { private CartesBancaires cartesBancaires; private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ public SetupIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions build() { return new SetupIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure .NetworkOptions(this.cartesBancaires, this.extraParams); } /** Cartes Bancaires-specific 3DS fields. */ public Builder setCartesBancaires( SetupIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions .CartesBancaires cartesBancaires) { this.cartesBancaires = cartesBancaires; return this; } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link * SetupIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { this.extraParams = new HashMap<>(); } this.extraParams.put(key, value); return this; } /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link * SetupIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions#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 CartesBancaires { /** * Required. The cryptogram calculation algorithm used by the card * Issuer's ACS to calculate the Authentication cryptogram. Also known as {@code * cavvAlgorithm}. messageExtension: CB-AVALGO */ @SerializedName("cb_avalgo") CbAvalgo cbAvalgo; /** * The exemption indicator returned from Cartes Bancaires in the ARes. message * extension: CB-EXEMPTION; string (4 characters) This is a 3 byte bitmap (low * significant byte first and most significant bit first) that has been Base64 encoded */ @SerializedName("cb_exemption") String cbExemption; /** * The risk score returned from Cartes Bancaires in the ARes. message extension: * CB-SCORE; numeric value 0-99 */ @SerializedName("cb_score") Long cbScore; /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} * value. Instead, each key/value pair is serialized 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 CartesBancaires( CbAvalgo cbAvalgo, String cbExemption, Long cbScore, Map extraParams) { this.cbAvalgo = cbAvalgo; this.cbExemption = cbExemption; this.cbScore = cbScore; this.extraParams = extraParams; } public static Builder builder() { return new Builder(); } public static class Builder { private CbAvalgo cbAvalgo; private String cbExemption; private Long cbScore; private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ public SetupIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions .CartesBancaires build() { return new SetupIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure .NetworkOptions.CartesBancaires( this.cbAvalgo, this.cbExemption, this.cbScore, this.extraParams); } /** * Required. The cryptogram calculation algorithm used by the card * Issuer's ACS to calculate the Authentication cryptogram. Also known as {@code * cavvAlgorithm}. messageExtension: CB-AVALGO */ public Builder setCbAvalgo( SetupIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions .CartesBancaires.CbAvalgo cbAvalgo) { this.cbAvalgo = cbAvalgo; return this; } /** * The exemption indicator returned from Cartes Bancaires in the ARes. message * extension: CB-EXEMPTION; string (4 characters) This is a 3 byte bitmap (low * significant byte first and most significant bit first) that has been Base64 encoded */ public Builder setCbExemption(String cbExemption) { this.cbExemption = cbExemption; return this; } /** * The risk score returned from Cartes Bancaires in the ARes. message extension: * CB-SCORE; numeric value 0-99 */ public Builder setCbScore(Long cbScore) { this.cbScore = cbScore; return this; } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link * SetupIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions.CartesBancaires#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { this.extraParams = new HashMap<>(); } this.extraParams.put(key, value); return this; } /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the * first `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link * SetupIntentCreateParams.PaymentMethodOptions.Card.ThreeDSecure.NetworkOptions.CartesBancaires#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 CbAvalgo implements ApiRequestParams.EnumParam { @SerializedName("0") N0("0"), @SerializedName("1") N1("1"), @SerializedName("2") N2("2"), @SerializedName("3") N3("3"), @SerializedName("4") N4("4"), @SerializedName("A") A("A"); @Getter(onMethod_ = {@Override}) private final String value; CbAvalgo(String value) { this.value = value; } } } } public enum AresTransStatus implements ApiRequestParams.EnumParam { @SerializedName("A") A("A"), @SerializedName("C") C("C"), @SerializedName("I") I("I"), @SerializedName("N") N("N"), @SerializedName("R") R("R"), @SerializedName("U") U("U"), @SerializedName("Y") Y("Y"); @Getter(onMethod_ = {@Override}) private final String value; AresTransStatus(String value) { this.value = value; } } public enum ElectronicCommerceIndicator implements ApiRequestParams.EnumParam { @SerializedName("01") N01("01"), @SerializedName("02") N02("02"), @SerializedName("05") N05("05"), @SerializedName("06") N06("06"), @SerializedName("07") N07("07"); @Getter(onMethod_ = {@Override}) private final String value; ElectronicCommerceIndicator(String value) { this.value = value; } } public enum Version implements ApiRequestParams.EnumParam { @SerializedName("1.0.2") N1__0__2("1.0.2"), @SerializedName("2.1.0") N2__1__0("2.1.0"), @SerializedName("2.2.0") N2__2__0("2.2.0"); @Getter(onMethod_ = {@Override}) private final String value; Version(String value) { this.value = value; } } } public enum Network implements ApiRequestParams.EnumParam { @SerializedName("amex") AMEX("amex"), @SerializedName("cartes_bancaires") CARTES_BANCAIRES("cartes_bancaires"), @SerializedName("diners") DINERS("diners"), @SerializedName("discover") DISCOVER("discover"), @SerializedName("eftpos_au") EFTPOS_AU("eftpos_au"), @SerializedName("girocard") GIROCARD("girocard"), @SerializedName("interac") INTERAC("interac"), @SerializedName("jcb") JCB("jcb"), @SerializedName("mastercard") MASTERCARD("mastercard"), @SerializedName("unionpay") UNIONPAY("unionpay"), @SerializedName("unknown") UNKNOWN("unknown"), @SerializedName("visa") VISA("visa"); @Getter(onMethod_ = {@Override}) private final String value; Network(String value) { this.value = value; } } public enum RequestThreeDSecure implements ApiRequestParams.EnumParam { @SerializedName("any") ANY("any"), @SerializedName("automatic") AUTOMATIC("automatic"), @SerializedName("challenge") CHALLENGE("challenge"); @Getter(onMethod_ = {@Override}) private final String value; RequestThreeDSecure(String value) { this.value = value; } } } @Getter public static class CardPresent { /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) * name in this param object. Effectively, this map is flattened to its parent instance. */ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; private CardPresent(Map extraParams) { this.extraParams = extraParams; } public static Builder builder() { return new Builder(); } public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ public SetupIntentCreateParams.PaymentMethodOptions.CardPresent build() { return new SetupIntentCreateParams.PaymentMethodOptions.CardPresent(this.extraParams); } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link SetupIntentCreateParams.PaymentMethodOptions.CardPresent#extraParams} for * the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { this.extraParams = new HashMap<>(); } this.extraParams.put(key, value); return this; } /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link SetupIntentCreateParams.PaymentMethodOptions.CardPresent#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; /** [Deprecated] This is a legacy parameter that no longer has any function. */ @SerializedName("persistent_token") @Deprecated String persistentToken; private Link(Map extraParams, String persistentToken) { this.extraParams = extraParams; this.persistentToken = persistentToken; } public static Builder builder() { return new Builder(); } public static class Builder { private Map extraParams; private String persistentToken; /** Finalize and obtain parameter instance from this builder. */ public SetupIntentCreateParams.PaymentMethodOptions.Link build() { return new SetupIntentCreateParams.PaymentMethodOptions.Link( this.extraParams, this.persistentToken); } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link SetupIntentCreateParams.PaymentMethodOptions.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 SetupIntentCreateParams.PaymentMethodOptions.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; } /** [Deprecated] This is a legacy parameter that no longer has any function. */ @Deprecated public Builder setPersistentToken(String persistentToken) { this.persistentToken = persistentToken; return this; } } } @Getter public static class Paypal { /** * The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents * the mandate between the merchant and the customer. */ @SerializedName("billing_agreement_id") String billingAgreementId; @SerializedName("currency") String currency; /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. * Instead, each key/value pair is serialized 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 Stripe connected account IDs of the sellers on the platform for this transaction * (optional). Only allowed when separate charges and * transfers are used. */ @SerializedName("subsellers") List subsellers; private Paypal( String billingAgreementId, String currency, Map extraParams, List subsellers) { this.billingAgreementId = billingAgreementId; this.currency = currency; this.extraParams = extraParams; this.subsellers = subsellers; } public static Builder builder() { return new Builder(); } public static class Builder { private String billingAgreementId; private String currency; private Map extraParams; private List subsellers; /** Finalize and obtain parameter instance from this builder. */ public SetupIntentCreateParams.PaymentMethodOptions.Paypal build() { return new SetupIntentCreateParams.PaymentMethodOptions.Paypal( this.billingAgreementId, this.currency, this.extraParams, this.subsellers); } /** * The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which * represents the mandate between the merchant and the customer. */ public Builder setBillingAgreementId(String billingAgreementId) { this.billingAgreementId = billingAgreementId; return this; } public Builder setCurrency(String currency) { this.currency = currency; return this; } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link SetupIntentCreateParams.PaymentMethodOptions.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 SetupIntentCreateParams.PaymentMethodOptions.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; } /** * Add an element to `subsellers` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link * SetupIntentCreateParams.PaymentMethodOptions.Paypal#subsellers} for the field * documentation. */ public Builder addSubseller(String element) { if (this.subsellers == null) { this.subsellers = new ArrayList<>(); } this.subsellers.add(element); return this; } /** * Add all elements to `subsellers` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link * SetupIntentCreateParams.PaymentMethodOptions.Paypal#subsellers} for the field * documentation. */ public Builder addAllSubseller(List elements) { if (this.subsellers == null) { this.subsellers = new ArrayList<>(); } this.subsellers.addAll(elements); return this; } } } @Getter public static class Payto { /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) * name in this param object. Effectively, this map is flattened to its parent instance. */ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; /** Additional fields for Mandate creation. */ @SerializedName("mandate_options") MandateOptions mandateOptions; private Payto(Map extraParams, MandateOptions mandateOptions) { this.extraParams = extraParams; this.mandateOptions = mandateOptions; } public static Builder builder() { return new Builder(); } public static class Builder { private Map extraParams; private MandateOptions mandateOptions; /** Finalize and obtain parameter instance from this builder. */ public SetupIntentCreateParams.PaymentMethodOptions.Payto build() { return new SetupIntentCreateParams.PaymentMethodOptions.Payto( this.extraParams, this.mandateOptions); } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link SetupIntentCreateParams.PaymentMethodOptions.Payto#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { this.extraParams = new HashMap<>(); } this.extraParams.put(key, value); return this; } /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link SetupIntentCreateParams.PaymentMethodOptions.Payto#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( SetupIntentCreateParams.PaymentMethodOptions.Payto.MandateOptions mandateOptions) { this.mandateOptions = mandateOptions; return this; } } @Getter public static class MandateOptions { /** * Amount that will be collected. It is required when {@code amount_type} is {@code fixed}. */ @SerializedName("amount") Long amount; /** * The type of amount that will be collected. The amount charged must be exact or up to the * value of {@code amount} param for {@code fixed} or {@code maximum} type respectively. */ @SerializedName("amount_type") AmountType amountType; /** * Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no * end date. */ @SerializedName("end_date") String endDate; /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. * Instead, each key/value pair is serialized 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 periodicity at which payments will be collected. */ @SerializedName("payment_schedule") PaymentSchedule paymentSchedule; /** * The number of payments that will be made during a payment period. Defaults to 1 except * for when {@code payment_schedule} is {@code adhoc}. In that case, it defaults to no * limit. */ @SerializedName("payments_per_period") Long paymentsPerPeriod; /** The purpose for which payments are made. Defaults to retail. */ @SerializedName("purpose") Purpose purpose; /** * Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to * confirmation time. */ @SerializedName("start_date") String startDate; private MandateOptions( Long amount, AmountType amountType, String endDate, Map extraParams, PaymentSchedule paymentSchedule, Long paymentsPerPeriod, Purpose purpose, String startDate) { this.amount = amount; this.amountType = amountType; this.endDate = endDate; this.extraParams = extraParams; this.paymentSchedule = paymentSchedule; this.paymentsPerPeriod = paymentsPerPeriod; this.purpose = purpose; this.startDate = startDate; } public static Builder builder() { return new Builder(); } public static class Builder { private Long amount; private AmountType amountType; private String endDate; private Map extraParams; private PaymentSchedule paymentSchedule; private Long paymentsPerPeriod; private Purpose purpose; private String startDate; /** Finalize and obtain parameter instance from this builder. */ public SetupIntentCreateParams.PaymentMethodOptions.Payto.MandateOptions build() { return new SetupIntentCreateParams.PaymentMethodOptions.Payto.MandateOptions( this.amount, this.amountType, this.endDate, this.extraParams, this.paymentSchedule, this.paymentsPerPeriod, this.purpose, this.startDate); } /** * Amount that will be collected. It is required when {@code amount_type} is {@code * fixed}. */ public Builder setAmount(Long amount) { this.amount = amount; return this; } /** * The type of amount that will be collected. The amount charged must be exact or up to * the value of {@code amount} param for {@code fixed} or {@code maximum} type * respectively. */ public Builder setAmountType( SetupIntentCreateParams.PaymentMethodOptions.Payto.MandateOptions.AmountType amountType) { this.amountType = amountType; return this; } /** * Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no * end date. */ public Builder setEndDate(String endDate) { this.endDate = endDate; return this; } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link * SetupIntentCreateParams.PaymentMethodOptions.Payto.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 * SetupIntentCreateParams.PaymentMethodOptions.Payto.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; } /** The periodicity at which payments will be collected. */ public Builder setPaymentSchedule( SetupIntentCreateParams.PaymentMethodOptions.Payto.MandateOptions.PaymentSchedule paymentSchedule) { this.paymentSchedule = paymentSchedule; return this; } /** * The number of payments that will be made during a payment period. Defaults to 1 except * for when {@code payment_schedule} is {@code adhoc}. In that case, it defaults to no * limit. */ public Builder setPaymentsPerPeriod(Long paymentsPerPeriod) { this.paymentsPerPeriod = paymentsPerPeriod; return this; } /** The purpose for which payments are made. Defaults to retail. */ public Builder setPurpose( SetupIntentCreateParams.PaymentMethodOptions.Payto.MandateOptions.Purpose purpose) { this.purpose = purpose; return this; } /** * Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to * confirmation time. */ public Builder setStartDate(String startDate) { this.startDate = startDate; return this; } } public enum AmountType implements ApiRequestParams.EnumParam { @SerializedName("fixed") FIXED("fixed"), @SerializedName("maximum") MAXIMUM("maximum"); @Getter(onMethod_ = {@Override}) private final String value; AmountType(String value) { this.value = value; } } public enum PaymentSchedule implements ApiRequestParams.EnumParam { @SerializedName("adhoc") ADHOC("adhoc"), @SerializedName("annual") ANNUAL("annual"), @SerializedName("daily") DAILY("daily"), @SerializedName("fortnightly") FORTNIGHTLY("fortnightly"), @SerializedName("monthly") MONTHLY("monthly"), @SerializedName("quarterly") QUARTERLY("quarterly"), @SerializedName("semi_annual") SEMI_ANNUAL("semi_annual"), @SerializedName("weekly") WEEKLY("weekly"); @Getter(onMethod_ = {@Override}) private final String value; PaymentSchedule(String value) { this.value = value; } } public enum Purpose implements ApiRequestParams.EnumParam { @SerializedName("dependant_support") DEPENDANT_SUPPORT("dependant_support"), @SerializedName("government") GOVERNMENT("government"), @SerializedName("loan") LOAN("loan"), @SerializedName("mortgage") MORTGAGE("mortgage"), @SerializedName("other") OTHER("other"), @SerializedName("pension") PENSION("pension"), @SerializedName("personal") PERSONAL("personal"), @SerializedName("retail") RETAIL("retail"), @SerializedName("salary") SALARY("salary"), @SerializedName("tax") TAX("tax"), @SerializedName("utility") UTILITY("utility"); @Getter(onMethod_ = {@Override}) private final String value; Purpose(String value) { this.value = value; } } } } @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; /** Additional fields for Mandate creation. */ @SerializedName("mandate_options") MandateOptions mandateOptions; private SepaDebit(Map extraParams, MandateOptions mandateOptions) { this.extraParams = extraParams; this.mandateOptions = mandateOptions; } public static Builder builder() { return new Builder(); } public static class Builder { private Map extraParams; private MandateOptions mandateOptions; /** Finalize and obtain parameter instance from this builder. */ public SetupIntentCreateParams.PaymentMethodOptions.SepaDebit build() { return new SetupIntentCreateParams.PaymentMethodOptions.SepaDebit( this.extraParams, this.mandateOptions); } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link SetupIntentCreateParams.PaymentMethodOptions.SepaDebit#extraParams} for * the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { this.extraParams = new HashMap<>(); } this.extraParams.put(key, value); return this; } /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link SetupIntentCreateParams.PaymentMethodOptions.SepaDebit#extraParams} for * the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { this.extraParams = new HashMap<>(); } this.extraParams.putAll(map); return this; } /** Additional fields for Mandate creation. */ public Builder setMandateOptions( SetupIntentCreateParams.PaymentMethodOptions.SepaDebit.MandateOptions mandateOptions) { this.mandateOptions = mandateOptions; return this; } } @Getter public static class MandateOptions { /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. * Instead, each key/value pair is serialized as if the key is a root-level field * (serialized) name in this param object. Effectively, this map is flattened to its parent * instance. */ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; private MandateOptions(Map extraParams) { this.extraParams = extraParams; } public static Builder builder() { return new Builder(); } public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ public SetupIntentCreateParams.PaymentMethodOptions.SepaDebit.MandateOptions build() { return new SetupIntentCreateParams.PaymentMethodOptions.SepaDebit.MandateOptions( this.extraParams); } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link * SetupIntentCreateParams.PaymentMethodOptions.SepaDebit.MandateOptions#extraParams} for * the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { this.extraParams = new HashMap<>(); } this.extraParams.put(key, value); return this; } /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link * SetupIntentCreateParams.PaymentMethodOptions.SepaDebit.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; } } } } @Getter public static class UsBankAccount { /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. * Instead, each key/value pair is serialized 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 Financial Connections Session creation. */ @SerializedName("financial_connections") FinancialConnections financialConnections; /** Additional fields for Mandate creation. */ @SerializedName("mandate_options") MandateOptions mandateOptions; /** Additional fields for network related functions. */ @SerializedName("networks") Networks networks; /** Bank account verification method. */ @SerializedName("verification_method") VerificationMethod verificationMethod; private UsBankAccount( Map extraParams, FinancialConnections financialConnections, MandateOptions mandateOptions, Networks networks, VerificationMethod verificationMethod) { this.extraParams = extraParams; this.financialConnections = financialConnections; this.mandateOptions = mandateOptions; this.networks = networks; this.verificationMethod = verificationMethod; } public static Builder builder() { return new Builder(); } public static class Builder { private Map extraParams; private FinancialConnections financialConnections; private MandateOptions mandateOptions; private Networks networks; private VerificationMethod verificationMethod; /** Finalize and obtain parameter instance from this builder. */ public SetupIntentCreateParams.PaymentMethodOptions.UsBankAccount build() { return new SetupIntentCreateParams.PaymentMethodOptions.UsBankAccount( this.extraParams, this.financialConnections, this.mandateOptions, this.networks, 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 SetupIntentCreateParams.PaymentMethodOptions.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 SetupIntentCreateParams.PaymentMethodOptions.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; } /** Additional fields for Financial Connections Session creation. */ public Builder setFinancialConnections( SetupIntentCreateParams.PaymentMethodOptions.UsBankAccount.FinancialConnections financialConnections) { this.financialConnections = financialConnections; return this; } /** Additional fields for Mandate creation. */ public Builder setMandateOptions( SetupIntentCreateParams.PaymentMethodOptions.UsBankAccount.MandateOptions mandateOptions) { this.mandateOptions = mandateOptions; return this; } /** Additional fields for network related functions. */ public Builder setNetworks( SetupIntentCreateParams.PaymentMethodOptions.UsBankAccount.Networks networks) { this.networks = networks; return this; } /** Bank account verification method. */ public Builder setVerificationMethod( SetupIntentCreateParams.PaymentMethodOptions.UsBankAccount.VerificationMethod verificationMethod) { this.verificationMethod = verificationMethod; return this; } } @Getter public static class FinancialConnections { /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. * Instead, each key/value pair is serialized 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; /** * Provide filters for the linked accounts that the customer can select for the payment * method. */ @SerializedName("filters") Filters filters; /** Customize manual entry behavior. */ @SerializedName("manual_entry") ManualEntry manualEntry; /** * The list of permissions to request. If this parameter is passed, the {@code * payment_method} permission must be included. Valid permissions include: {@code balances}, * {@code ownership}, {@code payment_method}, and {@code transactions}. */ @SerializedName("permissions") List< SetupIntentCreateParams.PaymentMethodOptions.UsBankAccount.FinancialConnections .Permission> permissions; /** List of data features that you would like to retrieve upon account creation. */ @SerializedName("prefetch") List< SetupIntentCreateParams.PaymentMethodOptions.UsBankAccount.FinancialConnections .Prefetch> prefetch; /** * For webview integrations only. Upon completing OAuth login in the native browser, the * user will be redirected to this URL to return to your app. */ @SerializedName("return_url") String returnUrl; private FinancialConnections( Map extraParams, Filters filters, ManualEntry manualEntry, List< SetupIntentCreateParams.PaymentMethodOptions.UsBankAccount.FinancialConnections .Permission> permissions, List< SetupIntentCreateParams.PaymentMethodOptions.UsBankAccount.FinancialConnections .Prefetch> prefetch, String returnUrl) { this.extraParams = extraParams; this.filters = filters; this.manualEntry = manualEntry; this.permissions = permissions; this.prefetch = prefetch; this.returnUrl = returnUrl; } public static Builder builder() { return new Builder(); } public static class Builder { private Map extraParams; private Filters filters; private ManualEntry manualEntry; private List< SetupIntentCreateParams.PaymentMethodOptions.UsBankAccount.FinancialConnections .Permission> permissions; private List< SetupIntentCreateParams.PaymentMethodOptions.UsBankAccount.FinancialConnections .Prefetch> prefetch; private String returnUrl; /** Finalize and obtain parameter instance from this builder. */ public SetupIntentCreateParams.PaymentMethodOptions.UsBankAccount.FinancialConnections build() { return new SetupIntentCreateParams.PaymentMethodOptions.UsBankAccount .FinancialConnections( this.extraParams, this.filters, this.manualEntry, this.permissions, this.prefetch, this.returnUrl); } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link * SetupIntentCreateParams.PaymentMethodOptions.UsBankAccount.FinancialConnections#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { this.extraParams = new HashMap<>(); } this.extraParams.put(key, value); return this; } /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link * SetupIntentCreateParams.PaymentMethodOptions.UsBankAccount.FinancialConnections#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { this.extraParams = new HashMap<>(); } this.extraParams.putAll(map); return this; } /** * Provide filters for the linked accounts that the customer can select for the payment * method. */ public Builder setFilters( SetupIntentCreateParams.PaymentMethodOptions.UsBankAccount.FinancialConnections .Filters filters) { this.filters = filters; return this; } /** Customize manual entry behavior. */ public Builder setManualEntry( SetupIntentCreateParams.PaymentMethodOptions.UsBankAccount.FinancialConnections .ManualEntry manualEntry) { this.manualEntry = manualEntry; return this; } /** * Add an element to `permissions` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link * SetupIntentCreateParams.PaymentMethodOptions.UsBankAccount.FinancialConnections#permissions} * for the field documentation. */ public Builder addPermission( SetupIntentCreateParams.PaymentMethodOptions.UsBankAccount.FinancialConnections .Permission element) { if (this.permissions == null) { this.permissions = new ArrayList<>(); } this.permissions.add(element); return this; } /** * Add all elements to `permissions` list. A list is initialized for the first * `add/addAll` call, and subsequent calls adds additional elements to the original list. * See {@link * SetupIntentCreateParams.PaymentMethodOptions.UsBankAccount.FinancialConnections#permissions} * for the field documentation. */ public Builder addAllPermission( List< SetupIntentCreateParams.PaymentMethodOptions.UsBankAccount .FinancialConnections.Permission> elements) { if (this.permissions == null) { this.permissions = new ArrayList<>(); } this.permissions.addAll(elements); return this; } /** * Add an element to `prefetch` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link * SetupIntentCreateParams.PaymentMethodOptions.UsBankAccount.FinancialConnections#prefetch} * for the field documentation. */ public Builder addPrefetch( SetupIntentCreateParams.PaymentMethodOptions.UsBankAccount.FinancialConnections .Prefetch element) { if (this.prefetch == null) { this.prefetch = new ArrayList<>(); } this.prefetch.add(element); return this; } /** * Add all elements to `prefetch` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link * SetupIntentCreateParams.PaymentMethodOptions.UsBankAccount.FinancialConnections#prefetch} * for the field documentation. */ public Builder addAllPrefetch( List< SetupIntentCreateParams.PaymentMethodOptions.UsBankAccount .FinancialConnections.Prefetch> elements) { if (this.prefetch == null) { this.prefetch = new ArrayList<>(); } this.prefetch.addAll(elements); return this; } /** * For webview integrations only. Upon completing OAuth login in the native browser, the * user will be redirected to this URL to return to your app. */ public Builder setReturnUrl(String returnUrl) { this.returnUrl = returnUrl; return this; } } @Getter public static class Filters { /** * The account subcategories to use to filter for selectable accounts. Valid subcategories * are {@code checking} and {@code savings}. */ @SerializedName("account_subcategories") List< SetupIntentCreateParams.PaymentMethodOptions.UsBankAccount.FinancialConnections .Filters.AccountSubcategory> accountSubcategories; /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. * Instead, each key/value pair is serialized 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 institution to use to filter for selectable accounts. */ @SerializedName("institution") String institution; private Filters( List< SetupIntentCreateParams.PaymentMethodOptions.UsBankAccount .FinancialConnections.Filters.AccountSubcategory> accountSubcategories, Map extraParams, String institution) { this.accountSubcategories = accountSubcategories; this.extraParams = extraParams; this.institution = institution; } public static Builder builder() { return new Builder(); } public static class Builder { private List< SetupIntentCreateParams.PaymentMethodOptions.UsBankAccount.FinancialConnections .Filters.AccountSubcategory> accountSubcategories; private Map extraParams; private String institution; /** Finalize and obtain parameter instance from this builder. */ public SetupIntentCreateParams.PaymentMethodOptions.UsBankAccount.FinancialConnections .Filters build() { return new SetupIntentCreateParams.PaymentMethodOptions.UsBankAccount .FinancialConnections.Filters( this.accountSubcategories, this.extraParams, this.institution); } /** * Add an element to `accountSubcategories` list. A list is initialized for the first * `add/addAll` call, and subsequent calls adds additional elements to the original * list. See {@link * SetupIntentCreateParams.PaymentMethodOptions.UsBankAccount.FinancialConnections.Filters#accountSubcategories} * for the field documentation. */ public Builder addAccountSubcategory( SetupIntentCreateParams.PaymentMethodOptions.UsBankAccount.FinancialConnections .Filters.AccountSubcategory element) { if (this.accountSubcategories == null) { this.accountSubcategories = new ArrayList<>(); } this.accountSubcategories.add(element); return this; } /** * Add all elements to `accountSubcategories` list. A list is initialized for the first * `add/addAll` call, and subsequent calls adds additional elements to the original * list. See {@link * SetupIntentCreateParams.PaymentMethodOptions.UsBankAccount.FinancialConnections.Filters#accountSubcategories} * for the field documentation. */ public Builder addAllAccountSubcategory( List< SetupIntentCreateParams.PaymentMethodOptions.UsBankAccount .FinancialConnections.Filters.AccountSubcategory> elements) { if (this.accountSubcategories == null) { this.accountSubcategories = new ArrayList<>(); } this.accountSubcategories.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 * SetupIntentCreateParams.PaymentMethodOptions.UsBankAccount.FinancialConnections.Filters#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { this.extraParams = new HashMap<>(); } this.extraParams.put(key, value); return this; } /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link * SetupIntentCreateParams.PaymentMethodOptions.UsBankAccount.FinancialConnections.Filters#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 institution to use to filter for selectable accounts. */ public Builder setInstitution(String institution) { this.institution = institution; return this; } } public enum AccountSubcategory implements ApiRequestParams.EnumParam { @SerializedName("checking") CHECKING("checking"), @SerializedName("savings") SAVINGS("savings"); @Getter(onMethod_ = {@Override}) private final String value; AccountSubcategory(String value) { this.value = value; } } } @Getter public static class ManualEntry { /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. * Instead, each key/value pair is serialized 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. Settings for configuring manual entry of account details. */ @SerializedName("mode") Mode mode; private ManualEntry(Map extraParams, Mode mode) { this.extraParams = extraParams; this.mode = mode; } public static Builder builder() { return new Builder(); } public static class Builder { private Map extraParams; private Mode mode; /** Finalize and obtain parameter instance from this builder. */ public SetupIntentCreateParams.PaymentMethodOptions.UsBankAccount.FinancialConnections .ManualEntry build() { return new SetupIntentCreateParams.PaymentMethodOptions.UsBankAccount .FinancialConnections.ManualEntry(this.extraParams, this.mode); } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link * SetupIntentCreateParams.PaymentMethodOptions.UsBankAccount.FinancialConnections.ManualEntry#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { this.extraParams = new HashMap<>(); } this.extraParams.put(key, value); return this; } /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link * SetupIntentCreateParams.PaymentMethodOptions.UsBankAccount.FinancialConnections.ManualEntry#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. Settings for configuring manual entry of account details. */ public Builder setMode( SetupIntentCreateParams.PaymentMethodOptions.UsBankAccount.FinancialConnections .ManualEntry.Mode mode) { this.mode = mode; return this; } } public enum Mode implements ApiRequestParams.EnumParam { @SerializedName("automatic") AUTOMATIC("automatic"), @SerializedName("custom") CUSTOM("custom"); @Getter(onMethod_ = {@Override}) private final String value; Mode(String value) { this.value = value; } } } public enum Permission implements ApiRequestParams.EnumParam { @SerializedName("balances") BALANCES("balances"), @SerializedName("ownership") OWNERSHIP("ownership"), @SerializedName("payment_method") PAYMENT_METHOD("payment_method"), @SerializedName("transactions") TRANSACTIONS("transactions"); @Getter(onMethod_ = {@Override}) private final String value; Permission(String value) { this.value = value; } } public enum Prefetch implements ApiRequestParams.EnumParam { @SerializedName("balances") BALANCES("balances"), @SerializedName("inferred_balances") INFERRED_BALANCES("inferred_balances"), @SerializedName("ownership") OWNERSHIP("ownership"), @SerializedName("transactions") TRANSACTIONS("transactions"); @Getter(onMethod_ = {@Override}) private final String value; Prefetch(String value) { this.value = value; } } } @Getter public static class MandateOptions { /** The method used to collect offline mandate customer acceptance. */ @SerializedName("collection_method") ApiRequestParams.EnumParam collectionMethod; /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. * Instead, each key/value pair is serialized as if the key is a root-level field * (serialized) name in this param object. Effectively, this map is flattened to its parent * instance. */ @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; private MandateOptions( ApiRequestParams.EnumParam collectionMethod, Map extraParams) { this.collectionMethod = collectionMethod; this.extraParams = extraParams; } public static Builder builder() { return new Builder(); } public static class Builder { private ApiRequestParams.EnumParam collectionMethod; private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ public SetupIntentCreateParams.PaymentMethodOptions.UsBankAccount.MandateOptions build() { return new SetupIntentCreateParams.PaymentMethodOptions.UsBankAccount.MandateOptions( this.collectionMethod, this.extraParams); } /** The method used to collect offline mandate customer acceptance. */ public Builder setCollectionMethod( SetupIntentCreateParams.PaymentMethodOptions.UsBankAccount.MandateOptions .CollectionMethod collectionMethod) { this.collectionMethod = collectionMethod; return this; } /** The method used to collect offline mandate customer acceptance. */ public Builder setCollectionMethod(EmptyParam collectionMethod) { this.collectionMethod = collectionMethod; return this; } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link * SetupIntentCreateParams.PaymentMethodOptions.UsBankAccount.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 * SetupIntentCreateParams.PaymentMethodOptions.UsBankAccount.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; } } public enum CollectionMethod implements ApiRequestParams.EnumParam { @SerializedName("paper") PAPER("paper"); @Getter(onMethod_ = {@Override}) private final String value; CollectionMethod(String value) { this.value = value; } } } @Getter public static class Networks { /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. * Instead, each key/value pair is serialized 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; /** Triggers validations to run across the selected networks. */ @SerializedName("requested") List requested; private Networks( Map extraParams, List requested) { this.extraParams = extraParams; this.requested = requested; } public static Builder builder() { return new Builder(); } public static class Builder { private Map extraParams; private List< SetupIntentCreateParams.PaymentMethodOptions.UsBankAccount.Networks.Requested> requested; /** Finalize and obtain parameter instance from this builder. */ public SetupIntentCreateParams.PaymentMethodOptions.UsBankAccount.Networks build() { return new SetupIntentCreateParams.PaymentMethodOptions.UsBankAccount.Networks( this.extraParams, this.requested); } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link * SetupIntentCreateParams.PaymentMethodOptions.UsBankAccount.Networks#extraParams} for * the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { this.extraParams = new HashMap<>(); } this.extraParams.put(key, value); return this; } /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link * SetupIntentCreateParams.PaymentMethodOptions.UsBankAccount.Networks#extraParams} for * the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { this.extraParams = new HashMap<>(); } this.extraParams.putAll(map); return this; } /** * Add an element to `requested` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link * SetupIntentCreateParams.PaymentMethodOptions.UsBankAccount.Networks#requested} for the * field documentation. */ public Builder addRequested( SetupIntentCreateParams.PaymentMethodOptions.UsBankAccount.Networks.Requested element) { if (this.requested == null) { this.requested = new ArrayList<>(); } this.requested.add(element); return this; } /** * Add all elements to `requested` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link * SetupIntentCreateParams.PaymentMethodOptions.UsBankAccount.Networks#requested} for the * field documentation. */ public Builder addAllRequested( List elements) { if (this.requested == null) { this.requested = new ArrayList<>(); } this.requested.addAll(elements); return this; } } public enum Requested implements ApiRequestParams.EnumParam { @SerializedName("ach") ACH("ach"), @SerializedName("us_domestic_wire") US_DOMESTIC_WIRE("us_domestic_wire"); @Getter(onMethod_ = {@Override}) private final String value; Requested(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 SingleUse { /** * Required. Amount the customer is granting permission to collect later. A * positive integer representing how much to charge in the smallest currency unit (e.g., 100 * cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is * $0.50 US or equivalent in * charge currency. The amount value supports up to eight digits (e.g., a value of 99999999 * for a USD charge of $999,999.99). */ @SerializedName("amount") Long amount; /** * Required. Three-letter ISO currency code, in lowercase. * Must be a supported currency. */ @SerializedName("currency") String currency; /** * Map of extra parameters for custom features not available in this client library. The content * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each * key/value pair is serialized 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 SingleUse(Long amount, String currency, Map extraParams) { this.amount = amount; this.currency = currency; this.extraParams = extraParams; } public static Builder builder() { return new Builder(); } public static class Builder { private Long amount; private String currency; private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ public SetupIntentCreateParams.SingleUse build() { return new SetupIntentCreateParams.SingleUse(this.amount, this.currency, this.extraParams); } /** * Required. Amount the customer is granting permission to collect later. A * positive integer representing how much to charge in the smallest currency unit (e.g., * 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum * amount is $0.50 US or equivalent in * charge currency. The amount value supports up to eight digits (e.g., a value of * 99999999 for a USD charge of $999,999.99). */ public Builder setAmount(Long amount) { this.amount = amount; return this; } /** * Required. Three-letter ISO currency code, in * lowercase. Must be a supported currency. */ public Builder setCurrency(String currency) { this.currency = currency; return this; } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` * call, and subsequent calls add additional key/value pairs to the original map. See {@link * SetupIntentCreateParams.SingleUse#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { this.extraParams = new HashMap<>(); } this.extraParams.put(key, value); return this; } /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. * See {@link SetupIntentCreateParams.SingleUse#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 FlowDirection implements ApiRequestParams.EnumParam { @SerializedName("inbound") INBOUND("inbound"), @SerializedName("outbound") OUTBOUND("outbound"); @Getter(onMethod_ = {@Override}) private final String value; FlowDirection(String value) { this.value = value; } } public enum Usage implements ApiRequestParams.EnumParam { @SerializedName("off_session") OFF_SESSION("off_session"), @SerializedName("on_session") ON_SESSION("on_session"); @Getter(onMethod_ = {@Override}) private final String value; Usage(String value) { this.value = value; } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy