com.stripe.param.PaymentIntentConfirmParams Maven / Gradle / Ivy
// File generated from our OpenAPI spec
package com.stripe.param;
import com.google.gson.annotations.SerializedName;
import com.stripe.net.ApiRequestParams;
import com.stripe.param.common.EmptyParam;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import lombok.Getter;
@Getter
public class PaymentIntentConfirmParams extends ApiRequestParams {
/**
* The amount of the application fee (if any) that will be requested to be applied to the payment
* and transferred to the application owner's Stripe account. The amount of the application fee
* collected will be capped at the total payment amount. For more information, see the
* PaymentIntents use case for
* connected accounts.
*/
@SerializedName("application_fee_amount")
Object applicationFeeAmount;
/** Automations to be run during the PaymentIntent lifecycle. */
@SerializedName("async_workflows")
AsyncWorkflows asyncWorkflows;
/** Controls when the funds will be captured from the customer's account. */
@SerializedName("capture_method")
CaptureMethod captureMethod;
/**
* ID of the ConfirmationToken used to confirm this PaymentIntent.
*
* If the provided ConfirmationToken contains properties that are also being provided in this
* request, such as {@code payment_method}, then the values in this request will take precedence.
*/
@SerializedName("confirmation_token")
String confirmationToken;
/**
* Set to {@code true} to fail the payment attempt if the PaymentIntent transitions into {@code
* requires_action}. This parameter is intended for simpler integrations that do not handle
* customer actions, like saving cards without
* authentication.
*/
@SerializedName("error_on_requires_action")
Boolean errorOnRequiresAction;
/** Specifies which fields in the response should be expanded. */
@SerializedName("expand")
List expand;
/**
* Map of extra parameters for custom features not available in this client library. The content
* in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
* key/value pair is serialized as if the key is a root-level field (serialized) name in this
* param object. Effectively, this map is flattened to its parent instance.
*/
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
/** ID of the mandate that's used for this payment. */
@SerializedName("mandate")
String mandate;
@SerializedName("mandate_data")
Object mandateData;
/**
* Set to {@code true} to indicate that the customer isn't in your checkout flow during this
* payment attempt and can't authenticate. Use this parameter in scenarios where you collect card
* details and charge them
* later.
*/
@SerializedName("off_session")
Object offSession;
/** Provides industry-specific information about the charge. */
@SerializedName("payment_details")
Object paymentDetails;
/**
* ID of the payment method (a PaymentMethod, Card, or compatible
* Source object) to attach to this PaymentIntent.
*/
@SerializedName("payment_method")
String paymentMethod;
/**
* If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will
* appear in the payment_method
* property on the PaymentIntent.
*/
@SerializedName("payment_method_data")
PaymentMethodData paymentMethodData;
/** Payment method-specific configuration for this PaymentIntent. */
@SerializedName("payment_method_options")
PaymentMethodOptions paymentMethodOptions;
/**
* The list of payment method types (for example, a card) that this PaymentIntent can use. Use
* {@code automatic_payment_methods} to manage payment methods from the Stripe Dashboard.
*/
@SerializedName("payment_method_types")
List paymentMethodTypes;
/**
* Options to configure Radar. Learn more about Radar Sessions.
*/
@SerializedName("radar_options")
RadarOptions radarOptions;
/**
* Email address that the receipt for the resulting payment will be sent to. If {@code
* receipt_email} is specified for a payment in live mode, a receipt will be sent regardless of
* your email settings.
*/
@SerializedName("receipt_email")
Object receiptEmail;
/**
* The URL to redirect your customer back to after they authenticate or cancel their payment on
* the payment method's app or site. If you'd prefer to redirect to a mobile application, you can
* alternatively supply an application URI scheme. This parameter is only used for cards and other
* redirect-based payment methods.
*/
@SerializedName("return_url")
String returnUrl;
/**
* Indicates that you intend to make future payments with this PaymentIntent's payment method.
*
* If you provide a Customer with the PaymentIntent, you can use this parameter to attach the payment method to the
* Customer after the PaymentIntent is confirmed and the customer completes any required actions.
* If you don't provide a Customer, you can still attach the payment method to a
* Customer after the transaction completes.
*
*
If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates and
* attaches a generated_card
* payment method representing the card to the Customer instead.
*
*
When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
* with regional legislation and network rules, such as SCA.
*
*
If you've already set {@code setup_future_usage} and you're performing a request using a
* publishable key, you can only update the value from {@code on_session} to {@code off_session}.
*/
@SerializedName("setup_future_usage")
ApiRequestParams.EnumParam setupFutureUsage;
/** Shipping information for this PaymentIntent. */
@SerializedName("shipping")
Object shipping;
/**
* Set to {@code true} when confirming server-side and using Stripe.js, iOS, or Android
* client-side SDKs to handle the next actions.
*/
@SerializedName("use_stripe_sdk")
Boolean useStripeSdk;
private PaymentIntentConfirmParams(
Object applicationFeeAmount,
AsyncWorkflows asyncWorkflows,
CaptureMethod captureMethod,
String confirmationToken,
Boolean errorOnRequiresAction,
List expand,
Map extraParams,
String mandate,
Object mandateData,
Object offSession,
Object paymentDetails,
String paymentMethod,
PaymentMethodData paymentMethodData,
PaymentMethodOptions paymentMethodOptions,
List paymentMethodTypes,
RadarOptions radarOptions,
Object receiptEmail,
String returnUrl,
ApiRequestParams.EnumParam setupFutureUsage,
Object shipping,
Boolean useStripeSdk) {
this.applicationFeeAmount = applicationFeeAmount;
this.asyncWorkflows = asyncWorkflows;
this.captureMethod = captureMethod;
this.confirmationToken = confirmationToken;
this.errorOnRequiresAction = errorOnRequiresAction;
this.expand = expand;
this.extraParams = extraParams;
this.mandate = mandate;
this.mandateData = mandateData;
this.offSession = offSession;
this.paymentDetails = paymentDetails;
this.paymentMethod = paymentMethod;
this.paymentMethodData = paymentMethodData;
this.paymentMethodOptions = paymentMethodOptions;
this.paymentMethodTypes = paymentMethodTypes;
this.radarOptions = radarOptions;
this.receiptEmail = receiptEmail;
this.returnUrl = returnUrl;
this.setupFutureUsage = setupFutureUsage;
this.shipping = shipping;
this.useStripeSdk = useStripeSdk;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Object applicationFeeAmount;
private AsyncWorkflows asyncWorkflows;
private CaptureMethod captureMethod;
private String confirmationToken;
private Boolean errorOnRequiresAction;
private List expand;
private Map extraParams;
private String mandate;
private Object mandateData;
private Object offSession;
private Object paymentDetails;
private String paymentMethod;
private PaymentMethodData paymentMethodData;
private PaymentMethodOptions paymentMethodOptions;
private List paymentMethodTypes;
private RadarOptions radarOptions;
private Object receiptEmail;
private String returnUrl;
private ApiRequestParams.EnumParam setupFutureUsage;
private Object shipping;
private Boolean useStripeSdk;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams build() {
return new PaymentIntentConfirmParams(
this.applicationFeeAmount,
this.asyncWorkflows,
this.captureMethod,
this.confirmationToken,
this.errorOnRequiresAction,
this.expand,
this.extraParams,
this.mandate,
this.mandateData,
this.offSession,
this.paymentDetails,
this.paymentMethod,
this.paymentMethodData,
this.paymentMethodOptions,
this.paymentMethodTypes,
this.radarOptions,
this.receiptEmail,
this.returnUrl,
this.setupFutureUsage,
this.shipping,
this.useStripeSdk);
}
/**
* The amount of the application fee (if any) that will be requested to be applied to the
* payment and transferred to the application owner's Stripe account. The amount of the
* application fee collected will be capped at the total payment amount. For more information,
* see the PaymentIntents use case
* for connected accounts.
*/
public Builder setApplicationFeeAmount(Long applicationFeeAmount) {
this.applicationFeeAmount = applicationFeeAmount;
return this;
}
/**
* The amount of the application fee (if any) that will be requested to be applied to the
* payment and transferred to the application owner's Stripe account. The amount of the
* application fee collected will be capped at the total payment amount. For more information,
* see the PaymentIntents use case
* for connected accounts.
*/
public Builder setApplicationFeeAmount(EmptyParam applicationFeeAmount) {
this.applicationFeeAmount = applicationFeeAmount;
return this;
}
/** Automations to be run during the PaymentIntent lifecycle. */
public Builder setAsyncWorkflows(PaymentIntentConfirmParams.AsyncWorkflows asyncWorkflows) {
this.asyncWorkflows = asyncWorkflows;
return this;
}
/** Controls when the funds will be captured from the customer's account. */
public Builder setCaptureMethod(PaymentIntentConfirmParams.CaptureMethod captureMethod) {
this.captureMethod = captureMethod;
return this;
}
/**
* ID of the ConfirmationToken used to confirm this PaymentIntent.
*
* If the provided ConfirmationToken contains properties that are also being provided in this
* request, such as {@code payment_method}, then the values in this request will take
* precedence.
*/
public Builder setConfirmationToken(String confirmationToken) {
this.confirmationToken = confirmationToken;
return this;
}
/**
* Set to {@code true} to fail the payment attempt if the PaymentIntent transitions into {@code
* requires_action}. This parameter is intended for simpler integrations that do not handle
* customer actions, like saving cards without
* authentication.
*/
public Builder setErrorOnRequiresAction(Boolean errorOnRequiresAction) {
this.errorOnRequiresAction = errorOnRequiresAction;
return this;
}
/**
* Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and
* subsequent calls adds additional elements to the original list. See {@link
* PaymentIntentConfirmParams#expand} for the field documentation.
*/
public Builder addExpand(String element) {
if (this.expand == null) {
this.expand = new ArrayList<>();
}
this.expand.add(element);
return this;
}
/**
* Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and
* subsequent calls adds additional elements to the original list. See {@link
* PaymentIntentConfirmParams#expand} for the field documentation.
*/
public Builder addAllExpand(List elements) {
if (this.expand == null) {
this.expand = new ArrayList<>();
}
this.expand.addAll(elements);
return this;
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
* call, and subsequent calls add additional key/value pairs to the original map. See {@link
* PaymentIntentConfirmParams#extraParams} for the field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
* See {@link PaymentIntentConfirmParams#extraParams} for the field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
/** ID of the mandate that's used for this payment. */
public Builder setMandate(String mandate) {
this.mandate = mandate;
return this;
}
public Builder setMandateData(PaymentIntentConfirmParams.MandateData mandateData) {
this.mandateData = mandateData;
return this;
}
public Builder setMandateData(EmptyParam mandateData) {
this.mandateData = mandateData;
return this;
}
/**
* Set to {@code true} to indicate that the customer isn't in your checkout flow during this
* payment attempt and can't authenticate. Use this parameter in scenarios where you collect
* card details and charge
* them later.
*/
public Builder setOffSession(Boolean offSession) {
this.offSession = offSession;
return this;
}
/**
* Set to {@code true} to indicate that the customer isn't in your checkout flow during this
* payment attempt and can't authenticate. Use this parameter in scenarios where you collect
* card details and charge
* them later.
*/
public Builder setOffSession(PaymentIntentConfirmParams.OffSession offSession) {
this.offSession = offSession;
return this;
}
/** Provides industry-specific information about the charge. */
public Builder setPaymentDetails(PaymentIntentConfirmParams.PaymentDetails paymentDetails) {
this.paymentDetails = paymentDetails;
return this;
}
/** Provides industry-specific information about the charge. */
public Builder setPaymentDetails(EmptyParam paymentDetails) {
this.paymentDetails = paymentDetails;
return this;
}
/**
* ID of the payment method (a PaymentMethod, Card, or compatible
* Source object) to attach to this PaymentIntent.
*/
public Builder setPaymentMethod(String paymentMethod) {
this.paymentMethod = paymentMethod;
return this;
}
/**
* If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will
* appear in the payment_method
* property on the PaymentIntent.
*/
public Builder setPaymentMethodData(
PaymentIntentConfirmParams.PaymentMethodData paymentMethodData) {
this.paymentMethodData = paymentMethodData;
return this;
}
/** Payment method-specific configuration for this PaymentIntent. */
public Builder setPaymentMethodOptions(
PaymentIntentConfirmParams.PaymentMethodOptions paymentMethodOptions) {
this.paymentMethodOptions = paymentMethodOptions;
return this;
}
/**
* Add an element to `paymentMethodTypes` list. A list is initialized for the first `add/addAll`
* call, and subsequent calls adds additional elements to the original list. See {@link
* PaymentIntentConfirmParams#paymentMethodTypes} for the field documentation.
*/
public Builder addPaymentMethodType(String element) {
if (this.paymentMethodTypes == null) {
this.paymentMethodTypes = new ArrayList<>();
}
this.paymentMethodTypes.add(element);
return this;
}
/**
* Add all elements to `paymentMethodTypes` list. A list is initialized for the first
* `add/addAll` call, and subsequent calls adds additional elements to the original list. See
* {@link PaymentIntentConfirmParams#paymentMethodTypes} for the field documentation.
*/
public Builder addAllPaymentMethodType(List elements) {
if (this.paymentMethodTypes == null) {
this.paymentMethodTypes = new ArrayList<>();
}
this.paymentMethodTypes.addAll(elements);
return this;
}
/**
* Options to configure Radar. Learn more about Radar Sessions.
*/
public Builder setRadarOptions(PaymentIntentConfirmParams.RadarOptions radarOptions) {
this.radarOptions = radarOptions;
return this;
}
/**
* Email address that the receipt for the resulting payment will be sent to. If {@code
* receipt_email} is specified for a payment in live mode, a receipt will be sent regardless of
* your email settings.
*/
public Builder setReceiptEmail(String receiptEmail) {
this.receiptEmail = receiptEmail;
return this;
}
/**
* Email address that the receipt for the resulting payment will be sent to. If {@code
* receipt_email} is specified for a payment in live mode, a receipt will be sent regardless of
* your email settings.
*/
public Builder setReceiptEmail(EmptyParam receiptEmail) {
this.receiptEmail = receiptEmail;
return this;
}
/**
* The URL to redirect your customer back to after they authenticate or cancel their payment on
* the payment method's app or site. If you'd prefer to redirect to a mobile application, you
* can alternatively supply an application URI scheme. This parameter is only used for cards and
* other redirect-based payment methods.
*/
public Builder setReturnUrl(String returnUrl) {
this.returnUrl = returnUrl;
return this;
}
/**
* Indicates that you intend to make future payments with this PaymentIntent's payment method.
*
* If you provide a Customer with the PaymentIntent, you can use this parameter to attach the payment method to the
* Customer after the PaymentIntent is confirmed and the customer completes any required
* actions. If you don't provide a Customer, you can still attach the payment method to a
* Customer after the transaction completes.
*
*
If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
* and attaches a generated_card
* payment method representing the card to the Customer instead.
*
*
When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
* with regional legislation and network rules, such as SCA.
*
*
If you've already set {@code setup_future_usage} and you're performing a request using a
* publishable key, you can only update the value from {@code on_session} to {@code
* off_session}.
*/
public Builder setSetupFutureUsage(
PaymentIntentConfirmParams.SetupFutureUsage setupFutureUsage) {
this.setupFutureUsage = setupFutureUsage;
return this;
}
/**
* Indicates that you intend to make future payments with this PaymentIntent's payment method.
*
*
If you provide a Customer with the PaymentIntent, you can use this parameter to attach the payment method to the
* Customer after the PaymentIntent is confirmed and the customer completes any required
* actions. If you don't provide a Customer, you can still attach the payment method to a
* Customer after the transaction completes.
*
*
If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates
* and attaches a generated_card
* payment method representing the card to the Customer instead.
*
*
When processing card payments, Stripe uses {@code setup_future_usage} to help you comply
* with regional legislation and network rules, such as SCA.
*
*
If you've already set {@code setup_future_usage} and you're performing a request using a
* publishable key, you can only update the value from {@code on_session} to {@code
* off_session}.
*/
public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) {
this.setupFutureUsage = setupFutureUsage;
return this;
}
/** Shipping information for this PaymentIntent. */
public Builder setShipping(PaymentIntentConfirmParams.Shipping shipping) {
this.shipping = shipping;
return this;
}
/** Shipping information for this PaymentIntent. */
public Builder setShipping(EmptyParam shipping) {
this.shipping = shipping;
return this;
}
/**
* Set to {@code true} when confirming server-side and using Stripe.js, iOS, or Android
* client-side SDKs to handle the next actions.
*/
public Builder setUseStripeSdk(Boolean useStripeSdk) {
this.useStripeSdk = useStripeSdk;
return this;
}
}
@Getter
public static class AsyncWorkflows {
/**
* Map of extra parameters for custom features not available in this client library. The content
* in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
* key/value pair is serialized 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;
/** Arguments passed in automations. */
@SerializedName("inputs")
Inputs inputs;
private AsyncWorkflows(Map extraParams, Inputs inputs) {
this.extraParams = extraParams;
this.inputs = inputs;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Map extraParams;
private Inputs inputs;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.AsyncWorkflows build() {
return new PaymentIntentConfirmParams.AsyncWorkflows(this.extraParams, this.inputs);
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
* call, and subsequent calls add additional key/value pairs to the original map. See {@link
* PaymentIntentConfirmParams.AsyncWorkflows#extraParams} for the field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
* See {@link PaymentIntentConfirmParams.AsyncWorkflows#extraParams} for the field
* documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
/** Arguments passed in automations. */
public Builder setInputs(PaymentIntentConfirmParams.AsyncWorkflows.Inputs inputs) {
this.inputs = inputs;
return this;
}
}
@Getter
public static class Inputs {
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
* Instead, each key/value pair is serialized 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;
/** Tax arguments for automations. */
@SerializedName("tax")
Tax tax;
private Inputs(Map extraParams, Tax tax) {
this.extraParams = extraParams;
this.tax = tax;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Map extraParams;
private Tax tax;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.AsyncWorkflows.Inputs build() {
return new PaymentIntentConfirmParams.AsyncWorkflows.Inputs(this.extraParams, this.tax);
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.AsyncWorkflows.Inputs#extraParams} for the
* field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.AsyncWorkflows.Inputs#extraParams} for the
* field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
/** Tax arguments for automations. */
public Builder setTax(PaymentIntentConfirmParams.AsyncWorkflows.Inputs.Tax tax) {
this.tax = tax;
return this;
}
}
@Getter
public static class Tax {
/**
* Required. The TaxCalculation id
*/
@SerializedName("calculation")
Object calculation;
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
* Instead, each key/value pair is serialized 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 Tax(Object calculation, Map extraParams) {
this.calculation = calculation;
this.extraParams = extraParams;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Object calculation;
private Map extraParams;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.AsyncWorkflows.Inputs.Tax build() {
return new PaymentIntentConfirmParams.AsyncWorkflows.Inputs.Tax(
this.calculation, this.extraParams);
}
/**
* Required. The TaxCalculation id
*/
public Builder setCalculation(String calculation) {
this.calculation = calculation;
return this;
}
/**
* Required. The TaxCalculation id
*/
public Builder setCalculation(EmptyParam calculation) {
this.calculation = calculation;
return this;
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.AsyncWorkflows.Inputs.Tax#extraParams} for
* the field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.AsyncWorkflows.Inputs.Tax#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 MandateData {
/** This hash contains details about the customer acceptance of the Mandate. */
@SerializedName("customer_acceptance")
CustomerAcceptance customerAcceptance;
/**
* Map of extra parameters for custom features not available in this client library. The content
* in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
* key/value pair is serialized as if the key is a root-level field (serialized) name in this
* param object. Effectively, this map is flattened to its parent instance.
*/
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
private MandateData(CustomerAcceptance customerAcceptance, Map extraParams) {
this.customerAcceptance = customerAcceptance;
this.extraParams = extraParams;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private CustomerAcceptance customerAcceptance;
private Map extraParams;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.MandateData build() {
return new PaymentIntentConfirmParams.MandateData(
this.customerAcceptance, this.extraParams);
}
/** This hash contains details about the customer acceptance of the Mandate. */
public Builder setCustomerAcceptance(
PaymentIntentConfirmParams.MandateData.CustomerAcceptance customerAcceptance) {
this.customerAcceptance = customerAcceptance;
return this;
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
* call, and subsequent calls add additional key/value pairs to the original map. See {@link
* PaymentIntentConfirmParams.MandateData#extraParams} for the field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
* See {@link PaymentIntentConfirmParams.MandateData#extraParams} for the field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
}
@Getter
public static class CustomerAcceptance {
/** The time at which the customer accepted the Mandate. */
@SerializedName("accepted_at")
Long acceptedAt;
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
* Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
* name in this param object. Effectively, this map is flattened to its parent instance.
*/
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
/**
* If this is a Mandate accepted offline, this hash contains details about the offline
* acceptance.
*/
@SerializedName("offline")
Offline offline;
/**
* If this is a Mandate accepted online, this hash contains details about the online
* acceptance.
*/
@SerializedName("online")
Online online;
/**
* Required. The type of customer acceptance information included with the
* Mandate. One of {@code online} or {@code offline}.
*/
@SerializedName("type")
Type type;
private CustomerAcceptance(
Long acceptedAt,
Map extraParams,
Offline offline,
Online online,
Type type) {
this.acceptedAt = acceptedAt;
this.extraParams = extraParams;
this.offline = offline;
this.online = online;
this.type = type;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Long acceptedAt;
private Map extraParams;
private Offline offline;
private Online online;
private Type type;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.MandateData.CustomerAcceptance build() {
return new PaymentIntentConfirmParams.MandateData.CustomerAcceptance(
this.acceptedAt, this.extraParams, this.offline, this.online, this.type);
}
/** The time at which the customer accepted the Mandate. */
public Builder setAcceptedAt(Long acceptedAt) {
this.acceptedAt = acceptedAt;
return this;
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.MandateData.CustomerAcceptance#extraParams}
* for the field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.MandateData.CustomerAcceptance#extraParams}
* for the field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
/**
* If this is a Mandate accepted offline, this hash contains details about the offline
* acceptance.
*/
public Builder setOffline(
PaymentIntentConfirmParams.MandateData.CustomerAcceptance.Offline offline) {
this.offline = offline;
return this;
}
/**
* If this is a Mandate accepted online, this hash contains details about the online
* acceptance.
*/
public Builder setOnline(
PaymentIntentConfirmParams.MandateData.CustomerAcceptance.Online online) {
this.online = online;
return this;
}
/**
* Required. The type of customer acceptance information included with the
* Mandate. One of {@code online} or {@code offline}.
*/
public Builder setType(
PaymentIntentConfirmParams.MandateData.CustomerAcceptance.Type type) {
this.type = type;
return this;
}
}
@Getter
public static class Offline {
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
* Instead, each key/value pair is serialized as if the key is a root-level field
* (serialized) name in this param object. Effectively, this map is flattened to its parent
* instance.
*/
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
private Offline(Map extraParams) {
this.extraParams = extraParams;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Map extraParams;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.MandateData.CustomerAcceptance.Offline build() {
return new PaymentIntentConfirmParams.MandateData.CustomerAcceptance.Offline(
this.extraParams);
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link
* PaymentIntentConfirmParams.MandateData.CustomerAcceptance.Offline#extraParams} for the
* field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link
* PaymentIntentConfirmParams.MandateData.CustomerAcceptance.Offline#extraParams} for the
* field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
}
}
@Getter
public static class Online {
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
* Instead, each key/value pair is serialized as if the key is a root-level field
* (serialized) name in this param object. Effectively, this map is flattened to its parent
* instance.
*/
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
/** The IP address from which the Mandate was accepted by the customer. */
@SerializedName("ip_address")
String ipAddress;
/** The user agent of the browser from which the Mandate was accepted by the customer. */
@SerializedName("user_agent")
String userAgent;
private Online(Map extraParams, String ipAddress, String userAgent) {
this.extraParams = extraParams;
this.ipAddress = ipAddress;
this.userAgent = userAgent;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Map extraParams;
private String ipAddress;
private String userAgent;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.MandateData.CustomerAcceptance.Online build() {
return new PaymentIntentConfirmParams.MandateData.CustomerAcceptance.Online(
this.extraParams, this.ipAddress, this.userAgent);
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link
* PaymentIntentConfirmParams.MandateData.CustomerAcceptance.Online#extraParams} for the
* field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link
* PaymentIntentConfirmParams.MandateData.CustomerAcceptance.Online#extraParams} for the
* field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
/** The IP address from which the Mandate was accepted by the customer. */
public Builder setIpAddress(String ipAddress) {
this.ipAddress = ipAddress;
return this;
}
/** The user agent of the browser from which the Mandate was accepted by the customer. */
public Builder setUserAgent(String userAgent) {
this.userAgent = userAgent;
return this;
}
}
}
public enum Type implements ApiRequestParams.EnumParam {
@SerializedName("offline")
OFFLINE("offline"),
@SerializedName("online")
ONLINE("online");
@Getter(onMethod_ = {@Override})
private final String value;
Type(String value) {
this.value = value;
}
}
}
}
@Getter
public static class PaymentDetails {
/** Car rental details for this PaymentIntent. */
@SerializedName("car_rental")
CarRental carRental;
/** Event details for this PaymentIntent. */
@SerializedName("event_details")
EventDetails eventDetails;
/**
* Map of extra parameters for custom features not available in this client library. The content
* in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
* key/value pair is serialized 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;
/** Flight reservation details for this PaymentIntent. */
@SerializedName("flight")
Flight flight;
/** Lodging reservation details for this PaymentIntent. */
@SerializedName("lodging")
Lodging lodging;
/** Subscription details for this PaymentIntent. */
@SerializedName("subscription")
Subscription subscription;
private PaymentDetails(
CarRental carRental,
EventDetails eventDetails,
Map extraParams,
Flight flight,
Lodging lodging,
Subscription subscription) {
this.carRental = carRental;
this.eventDetails = eventDetails;
this.extraParams = extraParams;
this.flight = flight;
this.lodging = lodging;
this.subscription = subscription;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private CarRental carRental;
private EventDetails eventDetails;
private Map extraParams;
private Flight flight;
private Lodging lodging;
private Subscription subscription;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentDetails build() {
return new PaymentIntentConfirmParams.PaymentDetails(
this.carRental,
this.eventDetails,
this.extraParams,
this.flight,
this.lodging,
this.subscription);
}
/** Car rental details for this PaymentIntent. */
public Builder setCarRental(PaymentIntentConfirmParams.PaymentDetails.CarRental carRental) {
this.carRental = carRental;
return this;
}
/** Event details for this PaymentIntent. */
public Builder setEventDetails(
PaymentIntentConfirmParams.PaymentDetails.EventDetails eventDetails) {
this.eventDetails = eventDetails;
return this;
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
* call, and subsequent calls add additional key/value pairs to the original map. See {@link
* PaymentIntentConfirmParams.PaymentDetails#extraParams} for the field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
* See {@link PaymentIntentConfirmParams.PaymentDetails#extraParams} for the field
* documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
/** Flight reservation details for this PaymentIntent. */
public Builder setFlight(PaymentIntentConfirmParams.PaymentDetails.Flight flight) {
this.flight = flight;
return this;
}
/** Lodging reservation details for this PaymentIntent. */
public Builder setLodging(PaymentIntentConfirmParams.PaymentDetails.Lodging lodging) {
this.lodging = lodging;
return this;
}
/** Subscription details for this PaymentIntent. */
public Builder setSubscription(
PaymentIntentConfirmParams.PaymentDetails.Subscription subscription) {
this.subscription = subscription;
return this;
}
}
@Getter
public static class CarRental {
/** Affiliate details for this purchase. */
@SerializedName("affiliate")
Affiliate affiliate;
/** Required. The booking number associated with the car rental. */
@SerializedName("booking_number")
String bookingNumber;
/** Class code of the car. */
@SerializedName("car_class_code")
String carClassCode;
/** Make of the car. */
@SerializedName("car_make")
String carMake;
/** Model of the car. */
@SerializedName("car_model")
String carModel;
/** The name of the rental car company. */
@SerializedName("company")
String company;
/** The customer service phone number of the car rental company. */
@SerializedName("customer_service_phone_number")
String customerServicePhoneNumber;
/** Required. Number of days the car is being rented. */
@SerializedName("days_rented")
Long daysRented;
/** Delivery details for this purchase. */
@SerializedName("delivery")
Delivery delivery;
/** The details of the passengers in the travel reservation. */
@SerializedName("drivers")
List drivers;
/** List of additional charges being billed. */
@SerializedName("extra_charges")
List extraCharges;
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
* Instead, each key/value pair is serialized 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 if the customer did not keep nor cancel their booking. */
@SerializedName("no_show")
Boolean noShow;
/** Car pick-up address. */
@SerializedName("pickup_address")
PickupAddress pickupAddress;
/** Required. Car pick-up time. Measured in seconds since the Unix epoch. */
@SerializedName("pickup_at")
Long pickupAt;
/** Rental rate. */
@SerializedName("rate_amount")
Long rateAmount;
/**
* The frequency at which the rate amount is applied. One of {@code day}, {@code week} or
* {@code month}
*/
@SerializedName("rate_interval")
RateInterval rateInterval;
/** The name of the person or entity renting the car. */
@SerializedName("renter_name")
String renterName;
/** Car return address. */
@SerializedName("return_address")
ReturnAddress returnAddress;
/** Required. Car return time. Measured in seconds since the Unix epoch. */
@SerializedName("return_at")
Long returnAt;
/** Indicates whether the goods or services are tax-exempt or tax is not collected. */
@SerializedName("tax_exempt")
Boolean taxExempt;
private CarRental(
Affiliate affiliate,
String bookingNumber,
String carClassCode,
String carMake,
String carModel,
String company,
String customerServicePhoneNumber,
Long daysRented,
Delivery delivery,
List drivers,
List extraCharges,
Map extraParams,
Boolean noShow,
PickupAddress pickupAddress,
Long pickupAt,
Long rateAmount,
RateInterval rateInterval,
String renterName,
ReturnAddress returnAddress,
Long returnAt,
Boolean taxExempt) {
this.affiliate = affiliate;
this.bookingNumber = bookingNumber;
this.carClassCode = carClassCode;
this.carMake = carMake;
this.carModel = carModel;
this.company = company;
this.customerServicePhoneNumber = customerServicePhoneNumber;
this.daysRented = daysRented;
this.delivery = delivery;
this.drivers = drivers;
this.extraCharges = extraCharges;
this.extraParams = extraParams;
this.noShow = noShow;
this.pickupAddress = pickupAddress;
this.pickupAt = pickupAt;
this.rateAmount = rateAmount;
this.rateInterval = rateInterval;
this.renterName = renterName;
this.returnAddress = returnAddress;
this.returnAt = returnAt;
this.taxExempt = taxExempt;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Affiliate affiliate;
private String bookingNumber;
private String carClassCode;
private String carMake;
private String carModel;
private String company;
private String customerServicePhoneNumber;
private Long daysRented;
private Delivery delivery;
private List drivers;
private List extraCharges;
private Map extraParams;
private Boolean noShow;
private PickupAddress pickupAddress;
private Long pickupAt;
private Long rateAmount;
private RateInterval rateInterval;
private String renterName;
private ReturnAddress returnAddress;
private Long returnAt;
private Boolean taxExempt;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentDetails.CarRental build() {
return new PaymentIntentConfirmParams.PaymentDetails.CarRental(
this.affiliate,
this.bookingNumber,
this.carClassCode,
this.carMake,
this.carModel,
this.company,
this.customerServicePhoneNumber,
this.daysRented,
this.delivery,
this.drivers,
this.extraCharges,
this.extraParams,
this.noShow,
this.pickupAddress,
this.pickupAt,
this.rateAmount,
this.rateInterval,
this.renterName,
this.returnAddress,
this.returnAt,
this.taxExempt);
}
/** Affiliate details for this purchase. */
public Builder setAffiliate(
PaymentIntentConfirmParams.PaymentDetails.CarRental.Affiliate affiliate) {
this.affiliate = affiliate;
return this;
}
/** Required. The booking number associated with the car rental. */
public Builder setBookingNumber(String bookingNumber) {
this.bookingNumber = bookingNumber;
return this;
}
/** Class code of the car. */
public Builder setCarClassCode(String carClassCode) {
this.carClassCode = carClassCode;
return this;
}
/** Make of the car. */
public Builder setCarMake(String carMake) {
this.carMake = carMake;
return this;
}
/** Model of the car. */
public Builder setCarModel(String carModel) {
this.carModel = carModel;
return this;
}
/** The name of the rental car company. */
public Builder setCompany(String company) {
this.company = company;
return this;
}
/** The customer service phone number of the car rental company. */
public Builder setCustomerServicePhoneNumber(String customerServicePhoneNumber) {
this.customerServicePhoneNumber = customerServicePhoneNumber;
return this;
}
/** Required. Number of days the car is being rented. */
public Builder setDaysRented(Long daysRented) {
this.daysRented = daysRented;
return this;
}
/** Delivery details for this purchase. */
public Builder setDelivery(
PaymentIntentConfirmParams.PaymentDetails.CarRental.Delivery delivery) {
this.delivery = delivery;
return this;
}
/**
* Add an element to `drivers` list. A list is initialized for the first `add/addAll` call,
* and subsequent calls adds additional elements to the original list. See {@link
* PaymentIntentConfirmParams.PaymentDetails.CarRental#drivers} for the field documentation.
*/
public Builder addDriver(
PaymentIntentConfirmParams.PaymentDetails.CarRental.Driver element) {
if (this.drivers == null) {
this.drivers = new ArrayList<>();
}
this.drivers.add(element);
return this;
}
/**
* Add all elements to `drivers` list. A list is initialized for the first `add/addAll`
* call, and subsequent calls adds additional elements to the original list. See {@link
* PaymentIntentConfirmParams.PaymentDetails.CarRental#drivers} for the field documentation.
*/
public Builder addAllDriver(
List elements) {
if (this.drivers == null) {
this.drivers = new ArrayList<>();
}
this.drivers.addAll(elements);
return this;
}
/**
* Add an element to `extraCharges` list. A list is initialized for the first `add/addAll`
* call, and subsequent calls adds additional elements to the original list. See {@link
* PaymentIntentConfirmParams.PaymentDetails.CarRental#extraCharges} for the field
* documentation.
*/
public Builder addExtraCharge(
PaymentIntentConfirmParams.PaymentDetails.CarRental.ExtraCharge element) {
if (this.extraCharges == null) {
this.extraCharges = new ArrayList<>();
}
this.extraCharges.add(element);
return this;
}
/**
* Add all elements to `extraCharges` list. A list is initialized for the first `add/addAll`
* call, and subsequent calls adds additional elements to the original list. See {@link
* PaymentIntentConfirmParams.PaymentDetails.CarRental#extraCharges} for the field
* documentation.
*/
public Builder addAllExtraCharge(
List elements) {
if (this.extraCharges == null) {
this.extraCharges = new ArrayList<>();
}
this.extraCharges.addAll(elements);
return this;
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentDetails.CarRental#extraParams} for the
* field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentDetails.CarRental#extraParams} for the
* field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
/** Indicates if the customer did not keep nor cancel their booking. */
public Builder setNoShow(Boolean noShow) {
this.noShow = noShow;
return this;
}
/** Car pick-up address. */
public Builder setPickupAddress(
PaymentIntentConfirmParams.PaymentDetails.CarRental.PickupAddress pickupAddress) {
this.pickupAddress = pickupAddress;
return this;
}
/**
* Required. Car pick-up time. Measured in seconds since the Unix epoch.
*/
public Builder setPickupAt(Long pickupAt) {
this.pickupAt = pickupAt;
return this;
}
/** Rental rate. */
public Builder setRateAmount(Long rateAmount) {
this.rateAmount = rateAmount;
return this;
}
/**
* The frequency at which the rate amount is applied. One of {@code day}, {@code week} or
* {@code month}
*/
public Builder setRateInterval(
PaymentIntentConfirmParams.PaymentDetails.CarRental.RateInterval rateInterval) {
this.rateInterval = rateInterval;
return this;
}
/** The name of the person or entity renting the car. */
public Builder setRenterName(String renterName) {
this.renterName = renterName;
return this;
}
/** Car return address. */
public Builder setReturnAddress(
PaymentIntentConfirmParams.PaymentDetails.CarRental.ReturnAddress returnAddress) {
this.returnAddress = returnAddress;
return this;
}
/** Required. Car return time. Measured in seconds since the Unix epoch. */
public Builder setReturnAt(Long returnAt) {
this.returnAt = returnAt;
return this;
}
/** Indicates whether the goods or services are tax-exempt or tax is not collected. */
public Builder setTaxExempt(Boolean taxExempt) {
this.taxExempt = taxExempt;
return this;
}
}
@Getter
public static class Affiliate {
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
* Instead, each key/value pair is serialized 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 name of the affiliate that originated the purchase. */
@SerializedName("name")
String name;
private Affiliate(Map extraParams, String name) {
this.extraParams = extraParams;
this.name = name;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Map extraParams;
private String name;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentDetails.CarRental.Affiliate build() {
return new PaymentIntentConfirmParams.PaymentDetails.CarRental.Affiliate(
this.extraParams, this.name);
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link
* PaymentIntentConfirmParams.PaymentDetails.CarRental.Affiliate#extraParams} for the
* field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link
* PaymentIntentConfirmParams.PaymentDetails.CarRental.Affiliate#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 name of the affiliate that originated the purchase. */
public Builder setName(String name) {
this.name = name;
return this;
}
}
}
@Getter
public static class Delivery {
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
* Instead, each key/value pair is serialized 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 delivery method for the payment. */
@SerializedName("mode")
Mode mode;
/** Details of the recipient. */
@SerializedName("recipient")
Recipient recipient;
private Delivery(Map extraParams, Mode mode, Recipient recipient) {
this.extraParams = extraParams;
this.mode = mode;
this.recipient = recipient;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Map extraParams;
private Mode mode;
private Recipient recipient;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentDetails.CarRental.Delivery build() {
return new PaymentIntentConfirmParams.PaymentDetails.CarRental.Delivery(
this.extraParams, this.mode, this.recipient);
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link
* PaymentIntentConfirmParams.PaymentDetails.CarRental.Delivery#extraParams} for the field
* documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link
* PaymentIntentConfirmParams.PaymentDetails.CarRental.Delivery#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 delivery method for the payment. */
public Builder setMode(
PaymentIntentConfirmParams.PaymentDetails.CarRental.Delivery.Mode mode) {
this.mode = mode;
return this;
}
/** Details of the recipient. */
public Builder setRecipient(
PaymentIntentConfirmParams.PaymentDetails.CarRental.Delivery.Recipient recipient) {
this.recipient = recipient;
return this;
}
}
@Getter
public static class Recipient {
/** The email of the recipient the ticket is delivered to. */
@SerializedName("email")
String 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;
/** The name of the recipient the ticket is delivered to. */
@SerializedName("name")
String name;
/** The phone number of the recipient the ticket is delivered to. */
@SerializedName("phone")
String phone;
private Recipient(
String email, Map extraParams, String name, String phone) {
this.email = email;
this.extraParams = extraParams;
this.name = name;
this.phone = phone;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private String email;
private Map extraParams;
private String name;
private String phone;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentDetails.CarRental.Delivery.Recipient build() {
return new PaymentIntentConfirmParams.PaymentDetails.CarRental.Delivery.Recipient(
this.email, this.extraParams, this.name, this.phone);
}
/** The email of the recipient the ticket is delivered to. */
public Builder setEmail(String email) {
this.email = email;
return this;
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the
* original map. See {@link
* PaymentIntentConfirmParams.PaymentDetails.CarRental.Delivery.Recipient#extraParams}
* for the field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the
* original map. See {@link
* PaymentIntentConfirmParams.PaymentDetails.CarRental.Delivery.Recipient#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 name of the recipient the ticket is delivered to. */
public Builder setName(String name) {
this.name = name;
return this;
}
/** The phone number of the recipient the ticket is delivered to. */
public Builder setPhone(String phone) {
this.phone = phone;
return this;
}
}
}
public enum Mode implements ApiRequestParams.EnumParam {
@SerializedName("email")
EMAIL("email"),
@SerializedName("phone")
PHONE("phone"),
@SerializedName("pickup")
PICKUP("pickup"),
@SerializedName("post")
POST("post");
@Getter(onMethod_ = {@Override})
private final String value;
Mode(String value) {
this.value = value;
}
}
}
@Getter
public static class Driver {
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
* Instead, each key/value pair is serialized 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. Full name of the person or entity on the car reservation. */
@SerializedName("name")
String name;
private Driver(Map extraParams, String name) {
this.extraParams = extraParams;
this.name = name;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Map extraParams;
private String name;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentDetails.CarRental.Driver build() {
return new PaymentIntentConfirmParams.PaymentDetails.CarRental.Driver(
this.extraParams, this.name);
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentDetails.CarRental.Driver#extraParams}
* for the field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentDetails.CarRental.Driver#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. Full name of the person or entity on the car reservation.
*/
public Builder setName(String name) {
this.name = name;
return this;
}
}
}
@Getter
public static class PickupAddress {
/** 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 PickupAddress(
String city,
String country,
Map extraParams,
String line1,
String line2,
String postalCode,
String state) {
this.city = city;
this.country = country;
this.extraParams = extraParams;
this.line1 = line1;
this.line2 = line2;
this.postalCode = postalCode;
this.state = state;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private String city;
private String country;
private Map extraParams;
private String line1;
private String line2;
private String postalCode;
private String state;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentDetails.CarRental.PickupAddress build() {
return new PaymentIntentConfirmParams.PaymentDetails.CarRental.PickupAddress(
this.city,
this.country,
this.extraParams,
this.line1,
this.line2,
this.postalCode,
this.state);
}
/** City, district, suburb, town, or village. */
public Builder setCity(String city) {
this.city = city;
return this;
}
/**
* Two-letter country code (ISO
* 3166-1 alpha-2).
*/
public Builder setCountry(String country) {
this.country = country;
return this;
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link
* PaymentIntentConfirmParams.PaymentDetails.CarRental.PickupAddress#extraParams} for the
* field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link
* PaymentIntentConfirmParams.PaymentDetails.CarRental.PickupAddress#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 ReturnAddress {
/** 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 ReturnAddress(
String city,
String country,
Map extraParams,
String line1,
String line2,
String postalCode,
String state) {
this.city = city;
this.country = country;
this.extraParams = extraParams;
this.line1 = line1;
this.line2 = line2;
this.postalCode = postalCode;
this.state = state;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private String city;
private String country;
private Map extraParams;
private String line1;
private String line2;
private String postalCode;
private String state;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentDetails.CarRental.ReturnAddress build() {
return new PaymentIntentConfirmParams.PaymentDetails.CarRental.ReturnAddress(
this.city,
this.country,
this.extraParams,
this.line1,
this.line2,
this.postalCode,
this.state);
}
/** City, district, suburb, town, or village. */
public Builder setCity(String city) {
this.city = city;
return this;
}
/**
* Two-letter country code (ISO
* 3166-1 alpha-2).
*/
public Builder setCountry(String country) {
this.country = country;
return this;
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link
* PaymentIntentConfirmParams.PaymentDetails.CarRental.ReturnAddress#extraParams} for the
* field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link
* PaymentIntentConfirmParams.PaymentDetails.CarRental.ReturnAddress#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;
}
}
}
public enum ExtraCharge implements ApiRequestParams.EnumParam {
@SerializedName("extra_mileage")
EXTRA_MILEAGE("extra_mileage"),
@SerializedName("gas")
GAS("gas"),
@SerializedName("late_return")
LATE_RETURN("late_return"),
@SerializedName("one_way_service")
ONE_WAY_SERVICE("one_way_service"),
@SerializedName("parking_violation")
PARKING_VIOLATION("parking_violation");
@Getter(onMethod_ = {@Override})
private final String value;
ExtraCharge(String value) {
this.value = value;
}
}
public enum RateInterval implements ApiRequestParams.EnumParam {
@SerializedName("day")
DAY("day"),
@SerializedName("month")
MONTH("month"),
@SerializedName("week")
WEEK("week");
@Getter(onMethod_ = {@Override})
private final String value;
RateInterval(String value) {
this.value = value;
}
}
}
@Getter
public static class EventDetails {
/** Indicates if the tickets are digitally checked when entering the venue. */
@SerializedName("access_controlled_venue")
Boolean accessControlledVenue;
/** The event location's address. */
@SerializedName("address")
Address address;
/** Affiliate details for this purchase. */
@SerializedName("affiliate")
Affiliate affiliate;
/** The name of the company. */
@SerializedName("company")
String company;
/** Delivery details for this purchase. */
@SerializedName("delivery")
Delivery delivery;
/** Event end time. Measured in seconds since the Unix epoch. */
@SerializedName("ends_at")
Long endsAt;
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
* Instead, each key/value pair is serialized 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;
/** Type of the event entertainment (concert, sports event etc). */
@SerializedName("genre")
String genre;
/** Required. The name of the event. */
@SerializedName("name")
String name;
/** Event start time. Measured in seconds since the Unix epoch. */
@SerializedName("starts_at")
Long startsAt;
private EventDetails(
Boolean accessControlledVenue,
Address address,
Affiliate affiliate,
String company,
Delivery delivery,
Long endsAt,
Map extraParams,
String genre,
String name,
Long startsAt) {
this.accessControlledVenue = accessControlledVenue;
this.address = address;
this.affiliate = affiliate;
this.company = company;
this.delivery = delivery;
this.endsAt = endsAt;
this.extraParams = extraParams;
this.genre = genre;
this.name = name;
this.startsAt = startsAt;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Boolean accessControlledVenue;
private Address address;
private Affiliate affiliate;
private String company;
private Delivery delivery;
private Long endsAt;
private Map extraParams;
private String genre;
private String name;
private Long startsAt;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentDetails.EventDetails build() {
return new PaymentIntentConfirmParams.PaymentDetails.EventDetails(
this.accessControlledVenue,
this.address,
this.affiliate,
this.company,
this.delivery,
this.endsAt,
this.extraParams,
this.genre,
this.name,
this.startsAt);
}
/** Indicates if the tickets are digitally checked when entering the venue. */
public Builder setAccessControlledVenue(Boolean accessControlledVenue) {
this.accessControlledVenue = accessControlledVenue;
return this;
}
/** The event location's address. */
public Builder setAddress(
PaymentIntentConfirmParams.PaymentDetails.EventDetails.Address address) {
this.address = address;
return this;
}
/** Affiliate details for this purchase. */
public Builder setAffiliate(
PaymentIntentConfirmParams.PaymentDetails.EventDetails.Affiliate affiliate) {
this.affiliate = affiliate;
return this;
}
/** The name of the company. */
public Builder setCompany(String company) {
this.company = company;
return this;
}
/** Delivery details for this purchase. */
public Builder setDelivery(
PaymentIntentConfirmParams.PaymentDetails.EventDetails.Delivery delivery) {
this.delivery = delivery;
return this;
}
/** Event end time. Measured in seconds since the Unix epoch. */
public Builder setEndsAt(Long endsAt) {
this.endsAt = endsAt;
return this;
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentDetails.EventDetails#extraParams} for
* the field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentDetails.EventDetails#extraParams} for
* the field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
/** Type of the event entertainment (concert, sports event etc). */
public Builder setGenre(String genre) {
this.genre = genre;
return this;
}
/** Required. The name of the event. */
public Builder setName(String name) {
this.name = name;
return this;
}
/** Event start time. Measured in seconds since the Unix epoch. */
public Builder setStartsAt(Long startsAt) {
this.startsAt = startsAt;
return this;
}
}
@Getter
public static class Address {
/** City, district, suburb, town, or village. */
@SerializedName("city")
String city;
/**
* Two-letter country code (ISO
* 3166-1 alpha-2).
*/
@SerializedName("country")
String country;
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
* Instead, each key/value pair is serialized as if the key is a root-level field
* (serialized) name in this param object. Effectively, this map is flattened to its parent
* instance.
*/
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
/** Address line 1 (e.g., street, PO Box, or company name). */
@SerializedName("line1")
String line1;
/** Address line 2 (e.g., apartment, suite, unit, or building). */
@SerializedName("line2")
String line2;
/** ZIP or postal code. */
@SerializedName("postal_code")
String postalCode;
/** State, county, province, or region. */
@SerializedName("state")
String state;
private Address(
String city,
String country,
Map extraParams,
String line1,
String line2,
String postalCode,
String state) {
this.city = city;
this.country = country;
this.extraParams = extraParams;
this.line1 = line1;
this.line2 = line2;
this.postalCode = postalCode;
this.state = state;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private String city;
private String country;
private Map extraParams;
private String line1;
private String line2;
private String postalCode;
private String state;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentDetails.EventDetails.Address build() {
return new PaymentIntentConfirmParams.PaymentDetails.EventDetails.Address(
this.city,
this.country,
this.extraParams,
this.line1,
this.line2,
this.postalCode,
this.state);
}
/** City, district, suburb, town, or village. */
public Builder setCity(String city) {
this.city = city;
return this;
}
/**
* Two-letter country code (ISO
* 3166-1 alpha-2).
*/
public Builder setCountry(String country) {
this.country = country;
return this;
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link
* PaymentIntentConfirmParams.PaymentDetails.EventDetails.Address#extraParams} for the
* field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link
* PaymentIntentConfirmParams.PaymentDetails.EventDetails.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 Affiliate {
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
* Instead, each key/value pair is serialized 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 name of the affiliate that originated the purchase. */
@SerializedName("name")
String name;
private Affiliate(Map extraParams, String name) {
this.extraParams = extraParams;
this.name = name;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Map extraParams;
private String name;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentDetails.EventDetails.Affiliate build() {
return new PaymentIntentConfirmParams.PaymentDetails.EventDetails.Affiliate(
this.extraParams, this.name);
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link
* PaymentIntentConfirmParams.PaymentDetails.EventDetails.Affiliate#extraParams} for the
* field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link
* PaymentIntentConfirmParams.PaymentDetails.EventDetails.Affiliate#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 name of the affiliate that originated the purchase. */
public Builder setName(String name) {
this.name = name;
return this;
}
}
}
@Getter
public static class Delivery {
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
* Instead, each key/value pair is serialized 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 delivery method for the payment. */
@SerializedName("mode")
Mode mode;
/** Details of the recipient. */
@SerializedName("recipient")
Recipient recipient;
private Delivery(Map extraParams, Mode mode, Recipient recipient) {
this.extraParams = extraParams;
this.mode = mode;
this.recipient = recipient;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Map extraParams;
private Mode mode;
private Recipient recipient;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentDetails.EventDetails.Delivery build() {
return new PaymentIntentConfirmParams.PaymentDetails.EventDetails.Delivery(
this.extraParams, this.mode, this.recipient);
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link
* PaymentIntentConfirmParams.PaymentDetails.EventDetails.Delivery#extraParams} for the
* field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link
* PaymentIntentConfirmParams.PaymentDetails.EventDetails.Delivery#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 delivery method for the payment. */
public Builder setMode(
PaymentIntentConfirmParams.PaymentDetails.EventDetails.Delivery.Mode mode) {
this.mode = mode;
return this;
}
/** Details of the recipient. */
public Builder setRecipient(
PaymentIntentConfirmParams.PaymentDetails.EventDetails.Delivery.Recipient recipient) {
this.recipient = recipient;
return this;
}
}
@Getter
public static class Recipient {
/** The email of the recipient the ticket is delivered to. */
@SerializedName("email")
String 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;
/** The name of the recipient the ticket is delivered to. */
@SerializedName("name")
String name;
/** The phone number of the recipient the ticket is delivered to. */
@SerializedName("phone")
String phone;
private Recipient(
String email, Map extraParams, String name, String phone) {
this.email = email;
this.extraParams = extraParams;
this.name = name;
this.phone = phone;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private String email;
private Map extraParams;
private String name;
private String phone;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentDetails.EventDetails.Delivery.Recipient
build() {
return new PaymentIntentConfirmParams.PaymentDetails.EventDetails.Delivery.Recipient(
this.email, this.extraParams, this.name, this.phone);
}
/** The email of the recipient the ticket is delivered to. */
public Builder setEmail(String email) {
this.email = email;
return this;
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the
* original map. See {@link
* PaymentIntentConfirmParams.PaymentDetails.EventDetails.Delivery.Recipient#extraParams}
* for the field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the
* original map. See {@link
* PaymentIntentConfirmParams.PaymentDetails.EventDetails.Delivery.Recipient#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 name of the recipient the ticket is delivered to. */
public Builder setName(String name) {
this.name = name;
return this;
}
/** The phone number of the recipient the ticket is delivered to. */
public Builder setPhone(String phone) {
this.phone = phone;
return this;
}
}
}
public enum Mode implements ApiRequestParams.EnumParam {
@SerializedName("email")
EMAIL("email"),
@SerializedName("phone")
PHONE("phone"),
@SerializedName("pickup")
PICKUP("pickup"),
@SerializedName("post")
POST("post");
@Getter(onMethod_ = {@Override})
private final String value;
Mode(String value) {
this.value = value;
}
}
}
}
@Getter
public static class Flight {
/** Affiliate details for this purchase. */
@SerializedName("affiliate")
Affiliate affiliate;
/**
* The agency number (i.e. International Air Transport Association (IATA) agency number) of
* the travel agency that made the booking.
*/
@SerializedName("agency_number")
String agencyNumber;
/**
* The International Air Transport Association (IATA) carrier code of the carrier that issued
* the ticket.
*/
@SerializedName("carrier")
String carrier;
/** Delivery details for this purchase. */
@SerializedName("delivery")
Delivery delivery;
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
* Instead, each key/value pair is serialized 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 name of the person or entity on the reservation. */
@SerializedName("passenger_name")
String passengerName;
/** The details of the passengers in the travel reservation. */
@SerializedName("passengers")
List passengers;
/** Required. The individual flight segments associated with the trip. */
@SerializedName("segments")
List segments;
/** The ticket number associated with the travel reservation. */
@SerializedName("ticket_number")
String ticketNumber;
private Flight(
Affiliate affiliate,
String agencyNumber,
String carrier,
Delivery delivery,
Map extraParams,
String passengerName,
List passengers,
List segments,
String ticketNumber) {
this.affiliate = affiliate;
this.agencyNumber = agencyNumber;
this.carrier = carrier;
this.delivery = delivery;
this.extraParams = extraParams;
this.passengerName = passengerName;
this.passengers = passengers;
this.segments = segments;
this.ticketNumber = ticketNumber;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Affiliate affiliate;
private String agencyNumber;
private String carrier;
private Delivery delivery;
private Map extraParams;
private String passengerName;
private List passengers;
private List segments;
private String ticketNumber;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentDetails.Flight build() {
return new PaymentIntentConfirmParams.PaymentDetails.Flight(
this.affiliate,
this.agencyNumber,
this.carrier,
this.delivery,
this.extraParams,
this.passengerName,
this.passengers,
this.segments,
this.ticketNumber);
}
/** Affiliate details for this purchase. */
public Builder setAffiliate(
PaymentIntentConfirmParams.PaymentDetails.Flight.Affiliate affiliate) {
this.affiliate = affiliate;
return this;
}
/**
* The agency number (i.e. International Air Transport Association (IATA) agency number) of
* the travel agency that made the booking.
*/
public Builder setAgencyNumber(String agencyNumber) {
this.agencyNumber = agencyNumber;
return this;
}
/**
* The International Air Transport Association (IATA) carrier code of the carrier that
* issued the ticket.
*/
public Builder setCarrier(String carrier) {
this.carrier = carrier;
return this;
}
/** Delivery details for this purchase. */
public Builder setDelivery(
PaymentIntentConfirmParams.PaymentDetails.Flight.Delivery delivery) {
this.delivery = delivery;
return this;
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentDetails.Flight#extraParams} for the
* field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentDetails.Flight#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 name of the person or entity on the reservation. */
public Builder setPassengerName(String passengerName) {
this.passengerName = passengerName;
return this;
}
/**
* Add an element to `passengers` list. A list is initialized for the first `add/addAll`
* call, and subsequent calls adds additional elements to the original list. See {@link
* PaymentIntentConfirmParams.PaymentDetails.Flight#passengers} for the field documentation.
*/
public Builder addPassenger(
PaymentIntentConfirmParams.PaymentDetails.Flight.Passenger element) {
if (this.passengers == null) {
this.passengers = new ArrayList<>();
}
this.passengers.add(element);
return this;
}
/**
* Add all elements to `passengers` list. A list is initialized for the first `add/addAll`
* call, and subsequent calls adds additional elements to the original list. See {@link
* PaymentIntentConfirmParams.PaymentDetails.Flight#passengers} for the field documentation.
*/
public Builder addAllPassenger(
List elements) {
if (this.passengers == null) {
this.passengers = new ArrayList<>();
}
this.passengers.addAll(elements);
return this;
}
/**
* Add an element to `segments` list. A list is initialized for the first `add/addAll` call,
* and subsequent calls adds additional elements to the original list. See {@link
* PaymentIntentConfirmParams.PaymentDetails.Flight#segments} for the field documentation.
*/
public Builder addSegment(
PaymentIntentConfirmParams.PaymentDetails.Flight.Segment element) {
if (this.segments == null) {
this.segments = new ArrayList<>();
}
this.segments.add(element);
return this;
}
/**
* Add all elements to `segments` list. A list is initialized for the first `add/addAll`
* call, and subsequent calls adds additional elements to the original list. See {@link
* PaymentIntentConfirmParams.PaymentDetails.Flight#segments} for the field documentation.
*/
public Builder addAllSegment(
List elements) {
if (this.segments == null) {
this.segments = new ArrayList<>();
}
this.segments.addAll(elements);
return this;
}
/** The ticket number associated with the travel reservation. */
public Builder setTicketNumber(String ticketNumber) {
this.ticketNumber = ticketNumber;
return this;
}
}
@Getter
public static class Affiliate {
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
* Instead, each key/value pair is serialized 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 name of the affiliate that originated the purchase. */
@SerializedName("name")
String name;
private Affiliate(Map extraParams, String name) {
this.extraParams = extraParams;
this.name = name;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Map extraParams;
private String name;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentDetails.Flight.Affiliate build() {
return new PaymentIntentConfirmParams.PaymentDetails.Flight.Affiliate(
this.extraParams, this.name);
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentDetails.Flight.Affiliate#extraParams}
* for the field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentDetails.Flight.Affiliate#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 name of the affiliate that originated the purchase. */
public Builder setName(String name) {
this.name = name;
return this;
}
}
}
@Getter
public static class Delivery {
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
* Instead, each key/value pair is serialized 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 delivery method for the payment. */
@SerializedName("mode")
Mode mode;
/** Details of the recipient. */
@SerializedName("recipient")
Recipient recipient;
private Delivery(Map extraParams, Mode mode, Recipient recipient) {
this.extraParams = extraParams;
this.mode = mode;
this.recipient = recipient;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Map extraParams;
private Mode mode;
private Recipient recipient;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentDetails.Flight.Delivery build() {
return new PaymentIntentConfirmParams.PaymentDetails.Flight.Delivery(
this.extraParams, this.mode, this.recipient);
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentDetails.Flight.Delivery#extraParams}
* for the field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentDetails.Flight.Delivery#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 delivery method for the payment. */
public Builder setMode(
PaymentIntentConfirmParams.PaymentDetails.Flight.Delivery.Mode mode) {
this.mode = mode;
return this;
}
/** Details of the recipient. */
public Builder setRecipient(
PaymentIntentConfirmParams.PaymentDetails.Flight.Delivery.Recipient recipient) {
this.recipient = recipient;
return this;
}
}
@Getter
public static class Recipient {
/** The email of the recipient the ticket is delivered to. */
@SerializedName("email")
String 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;
/** The name of the recipient the ticket is delivered to. */
@SerializedName("name")
String name;
/** The phone number of the recipient the ticket is delivered to. */
@SerializedName("phone")
String phone;
private Recipient(
String email, Map extraParams, String name, String phone) {
this.email = email;
this.extraParams = extraParams;
this.name = name;
this.phone = phone;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private String email;
private Map extraParams;
private String name;
private String phone;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentDetails.Flight.Delivery.Recipient build() {
return new PaymentIntentConfirmParams.PaymentDetails.Flight.Delivery.Recipient(
this.email, this.extraParams, this.name, this.phone);
}
/** The email of the recipient the ticket is delivered to. */
public Builder setEmail(String email) {
this.email = email;
return this;
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the
* original map. See {@link
* PaymentIntentConfirmParams.PaymentDetails.Flight.Delivery.Recipient#extraParams} for
* the field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the
* original map. See {@link
* PaymentIntentConfirmParams.PaymentDetails.Flight.Delivery.Recipient#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 name of the recipient the ticket is delivered to. */
public Builder setName(String name) {
this.name = name;
return this;
}
/** The phone number of the recipient the ticket is delivered to. */
public Builder setPhone(String phone) {
this.phone = phone;
return this;
}
}
}
public enum Mode implements ApiRequestParams.EnumParam {
@SerializedName("email")
EMAIL("email"),
@SerializedName("phone")
PHONE("phone"),
@SerializedName("pickup")
PICKUP("pickup"),
@SerializedName("post")
POST("post");
@Getter(onMethod_ = {@Override})
private final String value;
Mode(String value) {
this.value = value;
}
}
}
@Getter
public static class Passenger {
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
* Instead, each key/value pair is serialized 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. Full name of the person or entity on the flight reservation.
*/
@SerializedName("name")
String name;
private Passenger(Map extraParams, String name) {
this.extraParams = extraParams;
this.name = name;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Map extraParams;
private String name;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentDetails.Flight.Passenger build() {
return new PaymentIntentConfirmParams.PaymentDetails.Flight.Passenger(
this.extraParams, this.name);
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentDetails.Flight.Passenger#extraParams}
* for the field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentDetails.Flight.Passenger#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. Full name of the person or entity on the flight reservation.
*/
public Builder setName(String name) {
this.name = name;
return this;
}
}
}
@Getter
public static class Segment {
/** The flight segment amount. */
@SerializedName("amount")
Long amount;
/**
* The International Air Transport Association (IATA) airport code for the arrival airport.
*/
@SerializedName("arrival_airport")
String arrivalAirport;
/** The arrival time for the flight segment. Measured in seconds since the Unix epoch. */
@SerializedName("arrives_at")
Long arrivesAt;
/**
* The International Air Transport Association (IATA) carrier code of the carrier operating
* the flight segment.
*/
@SerializedName("carrier")
String carrier;
/**
* Required. The departure time for the flight segment. Measured in seconds
* since the Unix epoch.
*/
@SerializedName("departs_at")
Long departsAt;
/**
* The International Air Transport Association (IATA) airport code for the departure
* airport.
*/
@SerializedName("departure_airport")
String departureAirport;
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
* Instead, each key/value pair is serialized 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 flight number associated with the segment. */
@SerializedName("flight_number")
String flightNumber;
/** The fare class for the segment. */
@SerializedName("service_class")
ServiceClass serviceClass;
private Segment(
Long amount,
String arrivalAirport,
Long arrivesAt,
String carrier,
Long departsAt,
String departureAirport,
Map extraParams,
String flightNumber,
ServiceClass serviceClass) {
this.amount = amount;
this.arrivalAirport = arrivalAirport;
this.arrivesAt = arrivesAt;
this.carrier = carrier;
this.departsAt = departsAt;
this.departureAirport = departureAirport;
this.extraParams = extraParams;
this.flightNumber = flightNumber;
this.serviceClass = serviceClass;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Long amount;
private String arrivalAirport;
private Long arrivesAt;
private String carrier;
private Long departsAt;
private String departureAirport;
private Map extraParams;
private String flightNumber;
private ServiceClass serviceClass;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentDetails.Flight.Segment build() {
return new PaymentIntentConfirmParams.PaymentDetails.Flight.Segment(
this.amount,
this.arrivalAirport,
this.arrivesAt,
this.carrier,
this.departsAt,
this.departureAirport,
this.extraParams,
this.flightNumber,
this.serviceClass);
}
/** The flight segment amount. */
public Builder setAmount(Long amount) {
this.amount = amount;
return this;
}
/**
* The International Air Transport Association (IATA) airport code for the arrival
* airport.
*/
public Builder setArrivalAirport(String arrivalAirport) {
this.arrivalAirport = arrivalAirport;
return this;
}
/** The arrival time for the flight segment. Measured in seconds since the Unix epoch. */
public Builder setArrivesAt(Long arrivesAt) {
this.arrivesAt = arrivesAt;
return this;
}
/**
* The International Air Transport Association (IATA) carrier code of the carrier
* operating the flight segment.
*/
public Builder setCarrier(String carrier) {
this.carrier = carrier;
return this;
}
/**
* Required. The departure time for the flight segment. Measured in
* seconds since the Unix epoch.
*/
public Builder setDepartsAt(Long departsAt) {
this.departsAt = departsAt;
return this;
}
/**
* The International Air Transport Association (IATA) airport code for the departure
* airport.
*/
public Builder setDepartureAirport(String departureAirport) {
this.departureAirport = departureAirport;
return this;
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentDetails.Flight.Segment#extraParams}
* for the field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentDetails.Flight.Segment#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 flight number associated with the segment. */
public Builder setFlightNumber(String flightNumber) {
this.flightNumber = flightNumber;
return this;
}
/** The fare class for the segment. */
public Builder setServiceClass(
PaymentIntentConfirmParams.PaymentDetails.Flight.Segment.ServiceClass serviceClass) {
this.serviceClass = serviceClass;
return this;
}
}
public enum ServiceClass implements ApiRequestParams.EnumParam {
@SerializedName("business")
BUSINESS("business"),
@SerializedName("economy")
ECONOMY("economy"),
@SerializedName("first")
FIRST("first"),
@SerializedName("premium_economy")
PREMIUM_ECONOMY("premium_economy");
@Getter(onMethod_ = {@Override})
private final String value;
ServiceClass(String value) {
this.value = value;
}
}
}
}
@Getter
public static class Lodging {
/** The lodging location's address. */
@SerializedName("address")
Address address;
/** The number of adults on the booking. */
@SerializedName("adults")
Long adults;
/** Affiliate details for this purchase. */
@SerializedName("affiliate")
Affiliate affiliate;
/** The booking number associated with the lodging reservation. */
@SerializedName("booking_number")
String bookingNumber;
/** The lodging category. */
@SerializedName("category")
Category category;
/**
* Required. Loding check-in time. Measured in seconds since the Unix epoch.
*/
@SerializedName("checkin_at")
Long checkinAt;
/**
* Required. Lodging check-out time. Measured in seconds since the Unix
* epoch.
*/
@SerializedName("checkout_at")
Long checkoutAt;
/** The customer service phone number of the lodging company. */
@SerializedName("customer_service_phone_number")
String customerServicePhoneNumber;
/** The daily lodging room rate. */
@SerializedName("daily_room_rate_amount")
Long dailyRoomRateAmount;
/** Delivery details for this purchase. */
@SerializedName("delivery")
Delivery delivery;
/** List of additional charges being billed. */
@SerializedName("extra_charges")
List extraCharges;
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
* Instead, each key/value pair is serialized 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 whether the lodging location is compliant with the Fire Safety Act. */
@SerializedName("fire_safety_act_compliance")
Boolean fireSafetyActCompliance;
/** The name of the lodging location. */
@SerializedName("name")
String name;
/**
* Indicates if the customer did not keep their booking while failing to cancel the
* reservation.
*/
@SerializedName("no_show")
Boolean noShow;
/** The number of rooms on the booking. */
@SerializedName("number_of_rooms")
Long numberOfRooms;
/** The details of the passengers in the travel reservation. */
@SerializedName("passengers")
List passengers;
/** The phone number of the lodging location. */
@SerializedName("property_phone_number")
String propertyPhoneNumber;
/** The room class for this purchase. */
@SerializedName("room_class")
String roomClass;
/** The number of room nights. */
@SerializedName("room_nights")
Long roomNights;
/** The total tax amount associating with the room reservation. */
@SerializedName("total_room_tax_amount")
Long totalRoomTaxAmount;
/** The total tax amount. */
@SerializedName("total_tax_amount")
Long totalTaxAmount;
private Lodging(
Address address,
Long adults,
Affiliate affiliate,
String bookingNumber,
Category category,
Long checkinAt,
Long checkoutAt,
String customerServicePhoneNumber,
Long dailyRoomRateAmount,
Delivery delivery,
List extraCharges,
Map extraParams,
Boolean fireSafetyActCompliance,
String name,
Boolean noShow,
Long numberOfRooms,
List passengers,
String propertyPhoneNumber,
String roomClass,
Long roomNights,
Long totalRoomTaxAmount,
Long totalTaxAmount) {
this.address = address;
this.adults = adults;
this.affiliate = affiliate;
this.bookingNumber = bookingNumber;
this.category = category;
this.checkinAt = checkinAt;
this.checkoutAt = checkoutAt;
this.customerServicePhoneNumber = customerServicePhoneNumber;
this.dailyRoomRateAmount = dailyRoomRateAmount;
this.delivery = delivery;
this.extraCharges = extraCharges;
this.extraParams = extraParams;
this.fireSafetyActCompliance = fireSafetyActCompliance;
this.name = name;
this.noShow = noShow;
this.numberOfRooms = numberOfRooms;
this.passengers = passengers;
this.propertyPhoneNumber = propertyPhoneNumber;
this.roomClass = roomClass;
this.roomNights = roomNights;
this.totalRoomTaxAmount = totalRoomTaxAmount;
this.totalTaxAmount = totalTaxAmount;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Address address;
private Long adults;
private Affiliate affiliate;
private String bookingNumber;
private Category category;
private Long checkinAt;
private Long checkoutAt;
private String customerServicePhoneNumber;
private Long dailyRoomRateAmount;
private Delivery delivery;
private List extraCharges;
private Map extraParams;
private Boolean fireSafetyActCompliance;
private String name;
private Boolean noShow;
private Long numberOfRooms;
private List passengers;
private String propertyPhoneNumber;
private String roomClass;
private Long roomNights;
private Long totalRoomTaxAmount;
private Long totalTaxAmount;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentDetails.Lodging build() {
return new PaymentIntentConfirmParams.PaymentDetails.Lodging(
this.address,
this.adults,
this.affiliate,
this.bookingNumber,
this.category,
this.checkinAt,
this.checkoutAt,
this.customerServicePhoneNumber,
this.dailyRoomRateAmount,
this.delivery,
this.extraCharges,
this.extraParams,
this.fireSafetyActCompliance,
this.name,
this.noShow,
this.numberOfRooms,
this.passengers,
this.propertyPhoneNumber,
this.roomClass,
this.roomNights,
this.totalRoomTaxAmount,
this.totalTaxAmount);
}
/** The lodging location's address. */
public Builder setAddress(
PaymentIntentConfirmParams.PaymentDetails.Lodging.Address address) {
this.address = address;
return this;
}
/** The number of adults on the booking. */
public Builder setAdults(Long adults) {
this.adults = adults;
return this;
}
/** Affiliate details for this purchase. */
public Builder setAffiliate(
PaymentIntentConfirmParams.PaymentDetails.Lodging.Affiliate affiliate) {
this.affiliate = affiliate;
return this;
}
/** The booking number associated with the lodging reservation. */
public Builder setBookingNumber(String bookingNumber) {
this.bookingNumber = bookingNumber;
return this;
}
/** The lodging category. */
public Builder setCategory(
PaymentIntentConfirmParams.PaymentDetails.Lodging.Category category) {
this.category = category;
return this;
}
/**
* Required. Loding check-in time. Measured in seconds since the Unix
* epoch.
*/
public Builder setCheckinAt(Long checkinAt) {
this.checkinAt = checkinAt;
return this;
}
/**
* Required. Lodging check-out time. Measured in seconds since the Unix
* epoch.
*/
public Builder setCheckoutAt(Long checkoutAt) {
this.checkoutAt = checkoutAt;
return this;
}
/** The customer service phone number of the lodging company. */
public Builder setCustomerServicePhoneNumber(String customerServicePhoneNumber) {
this.customerServicePhoneNumber = customerServicePhoneNumber;
return this;
}
/** The daily lodging room rate. */
public Builder setDailyRoomRateAmount(Long dailyRoomRateAmount) {
this.dailyRoomRateAmount = dailyRoomRateAmount;
return this;
}
/** Delivery details for this purchase. */
public Builder setDelivery(
PaymentIntentConfirmParams.PaymentDetails.Lodging.Delivery delivery) {
this.delivery = delivery;
return this;
}
/**
* Add an element to `extraCharges` list. A list is initialized for the first `add/addAll`
* call, and subsequent calls adds additional elements to the original list. See {@link
* PaymentIntentConfirmParams.PaymentDetails.Lodging#extraCharges} for the field
* documentation.
*/
public Builder addExtraCharge(
PaymentIntentConfirmParams.PaymentDetails.Lodging.ExtraCharge element) {
if (this.extraCharges == null) {
this.extraCharges = new ArrayList<>();
}
this.extraCharges.add(element);
return this;
}
/**
* Add all elements to `extraCharges` list. A list is initialized for the first `add/addAll`
* call, and subsequent calls adds additional elements to the original list. See {@link
* PaymentIntentConfirmParams.PaymentDetails.Lodging#extraCharges} for the field
* documentation.
*/
public Builder addAllExtraCharge(
List elements) {
if (this.extraCharges == null) {
this.extraCharges = new ArrayList<>();
}
this.extraCharges.addAll(elements);
return this;
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentDetails.Lodging#extraParams} for the
* field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentDetails.Lodging#extraParams} for the
* field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
/** Indicates whether the lodging location is compliant with the Fire Safety Act. */
public Builder setFireSafetyActCompliance(Boolean fireSafetyActCompliance) {
this.fireSafetyActCompliance = fireSafetyActCompliance;
return this;
}
/** The name of the lodging location. */
public Builder setName(String name) {
this.name = name;
return this;
}
/**
* Indicates if the customer did not keep their booking while failing to cancel the
* reservation.
*/
public Builder setNoShow(Boolean noShow) {
this.noShow = noShow;
return this;
}
/** The number of rooms on the booking. */
public Builder setNumberOfRooms(Long numberOfRooms) {
this.numberOfRooms = numberOfRooms;
return this;
}
/**
* Add an element to `passengers` list. A list is initialized for the first `add/addAll`
* call, and subsequent calls adds additional elements to the original list. See {@link
* PaymentIntentConfirmParams.PaymentDetails.Lodging#passengers} for the field
* documentation.
*/
public Builder addPassenger(
PaymentIntentConfirmParams.PaymentDetails.Lodging.Passenger element) {
if (this.passengers == null) {
this.passengers = new ArrayList<>();
}
this.passengers.add(element);
return this;
}
/**
* Add all elements to `passengers` list. A list is initialized for the first `add/addAll`
* call, and subsequent calls adds additional elements to the original list. See {@link
* PaymentIntentConfirmParams.PaymentDetails.Lodging#passengers} for the field
* documentation.
*/
public Builder addAllPassenger(
List elements) {
if (this.passengers == null) {
this.passengers = new ArrayList<>();
}
this.passengers.addAll(elements);
return this;
}
/** The phone number of the lodging location. */
public Builder setPropertyPhoneNumber(String propertyPhoneNumber) {
this.propertyPhoneNumber = propertyPhoneNumber;
return this;
}
/** The room class for this purchase. */
public Builder setRoomClass(String roomClass) {
this.roomClass = roomClass;
return this;
}
/** The number of room nights. */
public Builder setRoomNights(Long roomNights) {
this.roomNights = roomNights;
return this;
}
/** The total tax amount associating with the room reservation. */
public Builder setTotalRoomTaxAmount(Long totalRoomTaxAmount) {
this.totalRoomTaxAmount = totalRoomTaxAmount;
return this;
}
/** The total tax amount. */
public Builder setTotalTaxAmount(Long totalTaxAmount) {
this.totalTaxAmount = totalTaxAmount;
return this;
}
}
@Getter
public static class Address {
/** City, district, suburb, town, or village. */
@SerializedName("city")
String city;
/**
* Two-letter country code (ISO
* 3166-1 alpha-2).
*/
@SerializedName("country")
String country;
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
* Instead, each key/value pair is serialized as if the key is a root-level field
* (serialized) name in this param object. Effectively, this map is flattened to its parent
* instance.
*/
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
/** Address line 1 (e.g., street, PO Box, or company name). */
@SerializedName("line1")
String line1;
/** Address line 2 (e.g., apartment, suite, unit, or building). */
@SerializedName("line2")
String line2;
/** ZIP or postal code. */
@SerializedName("postal_code")
String postalCode;
/** State, county, province, or region. */
@SerializedName("state")
String state;
private Address(
String city,
String country,
Map extraParams,
String line1,
String line2,
String postalCode,
String state) {
this.city = city;
this.country = country;
this.extraParams = extraParams;
this.line1 = line1;
this.line2 = line2;
this.postalCode = postalCode;
this.state = state;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private String city;
private String country;
private Map extraParams;
private String line1;
private String line2;
private String postalCode;
private String state;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentDetails.Lodging.Address build() {
return new PaymentIntentConfirmParams.PaymentDetails.Lodging.Address(
this.city,
this.country,
this.extraParams,
this.line1,
this.line2,
this.postalCode,
this.state);
}
/** City, district, suburb, town, or village. */
public Builder setCity(String city) {
this.city = city;
return this;
}
/**
* Two-letter country code (ISO
* 3166-1 alpha-2).
*/
public Builder setCountry(String country) {
this.country = country;
return this;
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentDetails.Lodging.Address#extraParams}
* for the field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentDetails.Lodging.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 Affiliate {
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
* Instead, each key/value pair is serialized 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 name of the affiliate that originated the purchase. */
@SerializedName("name")
String name;
private Affiliate(Map extraParams, String name) {
this.extraParams = extraParams;
this.name = name;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Map extraParams;
private String name;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentDetails.Lodging.Affiliate build() {
return new PaymentIntentConfirmParams.PaymentDetails.Lodging.Affiliate(
this.extraParams, this.name);
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link
* PaymentIntentConfirmParams.PaymentDetails.Lodging.Affiliate#extraParams} for the field
* documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link
* PaymentIntentConfirmParams.PaymentDetails.Lodging.Affiliate#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 name of the affiliate that originated the purchase. */
public Builder setName(String name) {
this.name = name;
return this;
}
}
}
@Getter
public static class Delivery {
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
* Instead, each key/value pair is serialized 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 delivery method for the payment. */
@SerializedName("mode")
Mode mode;
/** Details of the recipient. */
@SerializedName("recipient")
Recipient recipient;
private Delivery(Map extraParams, Mode mode, Recipient recipient) {
this.extraParams = extraParams;
this.mode = mode;
this.recipient = recipient;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Map extraParams;
private Mode mode;
private Recipient recipient;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentDetails.Lodging.Delivery build() {
return new PaymentIntentConfirmParams.PaymentDetails.Lodging.Delivery(
this.extraParams, this.mode, this.recipient);
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentDetails.Lodging.Delivery#extraParams}
* for the field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentDetails.Lodging.Delivery#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 delivery method for the payment. */
public Builder setMode(
PaymentIntentConfirmParams.PaymentDetails.Lodging.Delivery.Mode mode) {
this.mode = mode;
return this;
}
/** Details of the recipient. */
public Builder setRecipient(
PaymentIntentConfirmParams.PaymentDetails.Lodging.Delivery.Recipient recipient) {
this.recipient = recipient;
return this;
}
}
@Getter
public static class Recipient {
/** The email of the recipient the ticket is delivered to. */
@SerializedName("email")
String 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;
/** The name of the recipient the ticket is delivered to. */
@SerializedName("name")
String name;
/** The phone number of the recipient the ticket is delivered to. */
@SerializedName("phone")
String phone;
private Recipient(
String email, Map extraParams, String name, String phone) {
this.email = email;
this.extraParams = extraParams;
this.name = name;
this.phone = phone;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private String email;
private Map extraParams;
private String name;
private String phone;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentDetails.Lodging.Delivery.Recipient build() {
return new PaymentIntentConfirmParams.PaymentDetails.Lodging.Delivery.Recipient(
this.email, this.extraParams, this.name, this.phone);
}
/** The email of the recipient the ticket is delivered to. */
public Builder setEmail(String email) {
this.email = email;
return this;
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the
* original map. See {@link
* PaymentIntentConfirmParams.PaymentDetails.Lodging.Delivery.Recipient#extraParams} for
* the field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the
* original map. See {@link
* PaymentIntentConfirmParams.PaymentDetails.Lodging.Delivery.Recipient#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 name of the recipient the ticket is delivered to. */
public Builder setName(String name) {
this.name = name;
return this;
}
/** The phone number of the recipient the ticket is delivered to. */
public Builder setPhone(String phone) {
this.phone = phone;
return this;
}
}
}
public enum Mode implements ApiRequestParams.EnumParam {
@SerializedName("email")
EMAIL("email"),
@SerializedName("phone")
PHONE("phone"),
@SerializedName("pickup")
PICKUP("pickup"),
@SerializedName("post")
POST("post");
@Getter(onMethod_ = {@Override})
private final String value;
Mode(String value) {
this.value = value;
}
}
}
@Getter
public static class Passenger {
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
* Instead, each key/value pair is serialized 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. Full name of the person or entity on the lodging reservation.
*/
@SerializedName("name")
String name;
private Passenger(Map extraParams, String name) {
this.extraParams = extraParams;
this.name = name;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Map extraParams;
private String name;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentDetails.Lodging.Passenger build() {
return new PaymentIntentConfirmParams.PaymentDetails.Lodging.Passenger(
this.extraParams, this.name);
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link
* PaymentIntentConfirmParams.PaymentDetails.Lodging.Passenger#extraParams} for the field
* documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link
* PaymentIntentConfirmParams.PaymentDetails.Lodging.Passenger#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. Full name of the person or entity on the lodging
* reservation.
*/
public Builder setName(String name) {
this.name = name;
return this;
}
}
}
public enum Category implements ApiRequestParams.EnumParam {
@SerializedName("hotel")
HOTEL("hotel"),
@SerializedName("vacation_rental")
VACATION_RENTAL("vacation_rental");
@Getter(onMethod_ = {@Override})
private final String value;
Category(String value) {
this.value = value;
}
}
public enum ExtraCharge implements ApiRequestParams.EnumParam {
@SerializedName("gift_shop")
GIFT_SHOP("gift_shop"),
@SerializedName("laundry")
LAUNDRY("laundry"),
@SerializedName("mini_bar")
MINI_BAR("mini_bar"),
@SerializedName("other")
OTHER("other"),
@SerializedName("restaurant")
RESTAURANT("restaurant"),
@SerializedName("telephone")
TELEPHONE("telephone");
@Getter(onMethod_ = {@Override})
private final String value;
ExtraCharge(String value) {
this.value = value;
}
}
}
@Getter
public static class Subscription {
/** Affiliate details for this purchase. */
@SerializedName("affiliate")
Affiliate affiliate;
/** Info whether the subscription will be auto renewed upon expiry. */
@SerializedName("auto_renewal")
Boolean autoRenewal;
/** Subscription billing details for this purchase. */
@SerializedName("billing_interval")
BillingInterval billingInterval;
/** Subscription end time. Measured in seconds since the Unix epoch. */
@SerializedName("ends_at")
Long endsAt;
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
* Instead, each key/value pair is serialized 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. Name of the product on subscription. e.g. Apple Music
* Subscription
*/
@SerializedName("name")
String name;
/** Subscription start time. Measured in seconds since the Unix epoch. */
@SerializedName("starts_at")
Long startsAt;
private Subscription(
Affiliate affiliate,
Boolean autoRenewal,
BillingInterval billingInterval,
Long endsAt,
Map extraParams,
String name,
Long startsAt) {
this.affiliate = affiliate;
this.autoRenewal = autoRenewal;
this.billingInterval = billingInterval;
this.endsAt = endsAt;
this.extraParams = extraParams;
this.name = name;
this.startsAt = startsAt;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Affiliate affiliate;
private Boolean autoRenewal;
private BillingInterval billingInterval;
private Long endsAt;
private Map extraParams;
private String name;
private Long startsAt;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentDetails.Subscription build() {
return new PaymentIntentConfirmParams.PaymentDetails.Subscription(
this.affiliate,
this.autoRenewal,
this.billingInterval,
this.endsAt,
this.extraParams,
this.name,
this.startsAt);
}
/** Affiliate details for this purchase. */
public Builder setAffiliate(
PaymentIntentConfirmParams.PaymentDetails.Subscription.Affiliate affiliate) {
this.affiliate = affiliate;
return this;
}
/** Info whether the subscription will be auto renewed upon expiry. */
public Builder setAutoRenewal(Boolean autoRenewal) {
this.autoRenewal = autoRenewal;
return this;
}
/** Subscription billing details for this purchase. */
public Builder setBillingInterval(
PaymentIntentConfirmParams.PaymentDetails.Subscription.BillingInterval
billingInterval) {
this.billingInterval = billingInterval;
return this;
}
/** Subscription end time. Measured in seconds since the Unix epoch. */
public Builder setEndsAt(Long endsAt) {
this.endsAt = endsAt;
return this;
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentDetails.Subscription#extraParams} for
* the field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentDetails.Subscription#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. Name of the product on subscription. e.g. Apple Music
* Subscription
*/
public Builder setName(String name) {
this.name = name;
return this;
}
/** Subscription start time. Measured in seconds since the Unix epoch. */
public Builder setStartsAt(Long startsAt) {
this.startsAt = startsAt;
return this;
}
}
@Getter
public static class Affiliate {
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
* Instead, each key/value pair is serialized 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 name of the affiliate that originated the purchase. */
@SerializedName("name")
String name;
private Affiliate(Map extraParams, String name) {
this.extraParams = extraParams;
this.name = name;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Map extraParams;
private String name;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentDetails.Subscription.Affiliate build() {
return new PaymentIntentConfirmParams.PaymentDetails.Subscription.Affiliate(
this.extraParams, this.name);
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link
* PaymentIntentConfirmParams.PaymentDetails.Subscription.Affiliate#extraParams} for the
* field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link
* PaymentIntentConfirmParams.PaymentDetails.Subscription.Affiliate#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 name of the affiliate that originated the purchase. */
public Builder setName(String name) {
this.name = name;
return this;
}
}
}
@Getter
public static class BillingInterval {
/**
* Required. The number of intervals, as an whole number greater than 0.
* Stripe multiplies this by the interval type to get the overall duration.
*/
@SerializedName("count")
Long count;
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
* Instead, each key/value pair is serialized as if the key is a root-level field
* (serialized) name in this param object. Effectively, this map is flattened to its parent
* instance.
*/
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
/**
* Required. Specifies a type of interval unit. Either {@code day}, {@code
* week}, {@code month} or {@code year}.
*/
@SerializedName("interval")
Interval interval;
private BillingInterval(Long count, Map extraParams, Interval interval) {
this.count = count;
this.extraParams = extraParams;
this.interval = interval;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Long count;
private Map extraParams;
private Interval interval;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentDetails.Subscription.BillingInterval build() {
return new PaymentIntentConfirmParams.PaymentDetails.Subscription.BillingInterval(
this.count, this.extraParams, this.interval);
}
/**
* Required. The number of intervals, as an whole number greater than 0.
* Stripe multiplies this by the interval type to get the overall duration.
*/
public Builder setCount(Long count) {
this.count = count;
return this;
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link
* PaymentIntentConfirmParams.PaymentDetails.Subscription.BillingInterval#extraParams} for
* the field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link
* PaymentIntentConfirmParams.PaymentDetails.Subscription.BillingInterval#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 a type of interval unit. Either {@code day},
* {@code week}, {@code month} or {@code year}.
*/
public Builder setInterval(
PaymentIntentConfirmParams.PaymentDetails.Subscription.BillingInterval.Interval
interval) {
this.interval = interval;
return this;
}
}
public enum Interval implements ApiRequestParams.EnumParam {
@SerializedName("day")
DAY("day"),
@SerializedName("month")
MONTH("month"),
@SerializedName("week")
WEEK("week"),
@SerializedName("year")
YEAR("year");
@Getter(onMethod_ = {@Override})
private final String value;
Interval(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 PaymentIntentConfirmParams.PaymentMethodData build() {
return new PaymentIntentConfirmParams.PaymentMethodData(
this.acssDebit,
this.affirm,
this.afterpayClearpay,
this.alipay,
this.allowRedisplay,
this.amazonPay,
this.auBecsDebit,
this.bacsDebit,
this.bancontact,
this.billingDetails,
this.blik,
this.boleto,
this.cashapp,
this.customerBalance,
this.eps,
this.extraParams,
this.fpx,
this.giropay,
this.grabpay,
this.ideal,
this.interacPresent,
this.klarna,
this.konbini,
this.link,
this.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(
PaymentIntentConfirmParams.PaymentMethodData.AcssDebit acssDebit) {
this.acssDebit = acssDebit;
return this;
}
/**
* If this is an {@code affirm} PaymentMethod, this hash contains details about the Affirm
* payment method.
*/
public Builder setAffirm(PaymentIntentConfirmParams.PaymentMethodData.Affirm affirm) {
this.affirm = affirm;
return this;
}
/**
* If this is an {@code AfterpayClearpay} PaymentMethod, this hash contains details about the
* AfterpayClearpay payment method.
*/
public Builder setAfterpayClearpay(
PaymentIntentConfirmParams.PaymentMethodData.AfterpayClearpay afterpayClearpay) {
this.afterpayClearpay = afterpayClearpay;
return this;
}
/**
* If this is an {@code Alipay} PaymentMethod, this hash contains details about the Alipay
* payment method.
*/
public Builder setAlipay(PaymentIntentConfirmParams.PaymentMethodData.Alipay alipay) {
this.alipay = alipay;
return this;
}
/**
* This field indicates whether this payment method can be shown again to its customer in a
* checkout flow. Stripe products such as Checkout and Elements use this field to determine
* whether a payment method can be shown as a saved payment method in a checkout flow. The
* field defaults to {@code unspecified}.
*/
public Builder setAllowRedisplay(
PaymentIntentConfirmParams.PaymentMethodData.AllowRedisplay allowRedisplay) {
this.allowRedisplay = allowRedisplay;
return this;
}
/**
* If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay
* payment method.
*/
public Builder setAmazonPay(
PaymentIntentConfirmParams.PaymentMethodData.AmazonPay amazonPay) {
this.amazonPay = amazonPay;
return this;
}
/**
* If this is an {@code au_becs_debit} PaymentMethod, this hash contains details about the
* bank account.
*/
public Builder setAuBecsDebit(
PaymentIntentConfirmParams.PaymentMethodData.AuBecsDebit auBecsDebit) {
this.auBecsDebit = auBecsDebit;
return this;
}
/**
* If this is a {@code bacs_debit} PaymentMethod, this hash contains details about the Bacs
* Direct Debit bank account.
*/
public Builder setBacsDebit(
PaymentIntentConfirmParams.PaymentMethodData.BacsDebit bacsDebit) {
this.bacsDebit = bacsDebit;
return this;
}
/**
* If this is a {@code bancontact} PaymentMethod, this hash contains details about the
* Bancontact payment method.
*/
public Builder setBancontact(
PaymentIntentConfirmParams.PaymentMethodData.Bancontact bancontact) {
this.bancontact = bancontact;
return this;
}
/**
* Billing information associated with the PaymentMethod that may be used or required by
* particular types of payment methods.
*/
public Builder setBillingDetails(
PaymentIntentConfirmParams.PaymentMethodData.BillingDetails billingDetails) {
this.billingDetails = billingDetails;
return this;
}
/**
* If this is a {@code blik} PaymentMethod, this hash contains details about the BLIK payment
* method.
*/
public Builder setBlik(PaymentIntentConfirmParams.PaymentMethodData.Blik blik) {
this.blik = blik;
return this;
}
/**
* If this is a {@code boleto} PaymentMethod, this hash contains details about the Boleto
* payment method.
*/
public Builder setBoleto(PaymentIntentConfirmParams.PaymentMethodData.Boleto boleto) {
this.boleto = boleto;
return this;
}
/**
* If this is a {@code cashapp} PaymentMethod, this hash contains details about the Cash App
* Pay payment method.
*/
public Builder setCashapp(PaymentIntentConfirmParams.PaymentMethodData.Cashapp cashapp) {
this.cashapp = cashapp;
return this;
}
/**
* If this is a {@code customer_balance} PaymentMethod, this hash contains details about the
* CustomerBalance payment method.
*/
public Builder setCustomerBalance(
PaymentIntentConfirmParams.PaymentMethodData.CustomerBalance customerBalance) {
this.customerBalance = customerBalance;
return this;
}
/**
* If this is an {@code eps} PaymentMethod, this hash contains details about the EPS payment
* method.
*/
public Builder setEps(PaymentIntentConfirmParams.PaymentMethodData.Eps eps) {
this.eps = eps;
return this;
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
* call, and subsequent calls add additional key/value pairs to the original map. See {@link
* PaymentIntentConfirmParams.PaymentMethodData#extraParams} for the field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
* See {@link PaymentIntentConfirmParams.PaymentMethodData#extraParams} for the field
* documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
/**
* If this is an {@code fpx} PaymentMethod, this hash contains details about the FPX payment
* method.
*/
public Builder setFpx(PaymentIntentConfirmParams.PaymentMethodData.Fpx fpx) {
this.fpx = fpx;
return this;
}
/**
* If this is a {@code giropay} PaymentMethod, this hash contains details about the Giropay
* payment method.
*/
public Builder setGiropay(PaymentIntentConfirmParams.PaymentMethodData.Giropay giropay) {
this.giropay = giropay;
return this;
}
/**
* If this is a {@code grabpay} PaymentMethod, this hash contains details about the GrabPay
* payment method.
*/
public Builder setGrabpay(PaymentIntentConfirmParams.PaymentMethodData.Grabpay grabpay) {
this.grabpay = grabpay;
return this;
}
/**
* If this is an {@code ideal} PaymentMethod, this hash contains details about the iDEAL
* payment method.
*/
public Builder setIdeal(PaymentIntentConfirmParams.PaymentMethodData.Ideal ideal) {
this.ideal = ideal;
return this;
}
/**
* If this is an {@code interac_present} PaymentMethod, this hash contains details about the
* Interac Present payment method.
*/
public Builder setInteracPresent(
PaymentIntentConfirmParams.PaymentMethodData.InteracPresent interacPresent) {
this.interacPresent = interacPresent;
return this;
}
/**
* If this is a {@code klarna} PaymentMethod, this hash contains details about the Klarna
* payment method.
*/
public Builder setKlarna(PaymentIntentConfirmParams.PaymentMethodData.Klarna klarna) {
this.klarna = klarna;
return this;
}
/**
* If this is a {@code konbini} PaymentMethod, this hash contains details about the Konbini
* payment method.
*/
public Builder setKonbini(PaymentIntentConfirmParams.PaymentMethodData.Konbini konbini) {
this.konbini = konbini;
return this;
}
/**
* If this is an {@code Link} PaymentMethod, this hash contains details about the Link payment
* method.
*/
public Builder setLink(PaymentIntentConfirmParams.PaymentMethodData.Link link) {
this.link = link;
return this;
}
/**
* If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment
* method.
*/
public Builder setMbWay(PaymentIntentConfirmParams.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
* PaymentIntentConfirmParams.PaymentMethodData#metadata} for the field documentation.
*/
public Builder putMetadata(String key, String value) {
if (this.metadata == null) {
this.metadata = new HashMap<>();
}
this.metadata.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `metadata` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
* See {@link PaymentIntentConfirmParams.PaymentMethodData#metadata} for the field
* documentation.
*/
public Builder putAllMetadata(Map map) {
if (this.metadata == null) {
this.metadata = new HashMap<>();
}
this.metadata.putAll(map);
return this;
}
/**
* If this is a {@code mobilepay} PaymentMethod, this hash contains details about the
* MobilePay payment method.
*/
public Builder setMobilepay(
PaymentIntentConfirmParams.PaymentMethodData.Mobilepay mobilepay) {
this.mobilepay = mobilepay;
return this;
}
/**
* If this is a {@code multibanco} PaymentMethod, this hash contains details about the
* Multibanco payment method.
*/
public Builder setMultibanco(
PaymentIntentConfirmParams.PaymentMethodData.Multibanco multibanco) {
this.multibanco = multibanco;
return this;
}
/**
* If this is an {@code oxxo} PaymentMethod, this hash contains details about the OXXO payment
* method.
*/
public Builder setOxxo(PaymentIntentConfirmParams.PaymentMethodData.Oxxo oxxo) {
this.oxxo = oxxo;
return this;
}
/**
* If this is a {@code p24} PaymentMethod, this hash contains details about the P24 payment
* method.
*/
public Builder setP24(PaymentIntentConfirmParams.PaymentMethodData.P24 p24) {
this.p24 = p24;
return this;
}
/**
* If this is a {@code paynow} PaymentMethod, this hash contains details about the PayNow
* payment method.
*/
public Builder setPaynow(PaymentIntentConfirmParams.PaymentMethodData.Paynow paynow) {
this.paynow = paynow;
return this;
}
/**
* If this is a {@code paypal} PaymentMethod, this hash contains details about the PayPal
* payment method.
*/
public Builder setPaypal(PaymentIntentConfirmParams.PaymentMethodData.Paypal paypal) {
this.paypal = paypal;
return this;
}
/**
* If this is a {@code payto} PaymentMethod, this hash contains details about the PayTo
* payment method.
*/
public Builder setPayto(PaymentIntentConfirmParams.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(PaymentIntentConfirmParams.PaymentMethodData.Pix pix) {
this.pix = pix;
return this;
}
/**
* If this is a {@code promptpay} PaymentMethod, this hash contains details about the
* PromptPay payment method.
*/
public Builder setPromptpay(
PaymentIntentConfirmParams.PaymentMethodData.Promptpay promptpay) {
this.promptpay = promptpay;
return this;
}
/**
* Options to configure Radar. See Radar
* Session for more information.
*/
public Builder setRadarOptions(
PaymentIntentConfirmParams.PaymentMethodData.RadarOptions radarOptions) {
this.radarOptions = radarOptions;
return this;
}
/**
* If this is a {@code rechnung} PaymentMethod, this hash contains details about the Rechnung
* payment method.
*/
public Builder setRechnung(PaymentIntentConfirmParams.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(
PaymentIntentConfirmParams.PaymentMethodData.RevolutPay revolutPay) {
this.revolutPay = revolutPay;
return this;
}
/**
* If this is a {@code sepa_debit} PaymentMethod, this hash contains details about the SEPA
* debit bank account.
*/
public Builder setSepaDebit(
PaymentIntentConfirmParams.PaymentMethodData.SepaDebit sepaDebit) {
this.sepaDebit = sepaDebit;
return this;
}
/**
* If this is a {@code sofort} PaymentMethod, this hash contains details about the SOFORT
* payment method.
*/
public Builder setSofort(PaymentIntentConfirmParams.PaymentMethodData.Sofort sofort) {
this.sofort = sofort;
return this;
}
/**
* If this is a {@code swish} PaymentMethod, this hash contains details about the Swish
* payment method.
*/
public Builder setSwish(PaymentIntentConfirmParams.PaymentMethodData.Swish swish) {
this.swish = swish;
return this;
}
/**
* If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment
* method.
*/
public Builder setTwint(PaymentIntentConfirmParams.PaymentMethodData.Twint twint) {
this.twint = twint;
return this;
}
/**
* Required. The type of the PaymentMethod. An additional hash is included on
* the PaymentMethod with a name matching this value. It contains additional information
* specific to the PaymentMethod type.
*/
public Builder setType(PaymentIntentConfirmParams.PaymentMethodData.Type type) {
this.type = type;
return this;
}
/**
* If this is an {@code us_bank_account} PaymentMethod, this hash contains details about the
* US bank account payment method.
*/
public Builder setUsBankAccount(
PaymentIntentConfirmParams.PaymentMethodData.UsBankAccount usBankAccount) {
this.usBankAccount = usBankAccount;
return this;
}
/**
* If this is an {@code wechat_pay} PaymentMethod, this hash contains details about the
* wechat_pay payment method.
*/
public Builder setWechatPay(
PaymentIntentConfirmParams.PaymentMethodData.WechatPay wechatPay) {
this.wechatPay = wechatPay;
return this;
}
/**
* If this is a {@code zip} PaymentMethod, this hash contains details about the Zip payment
* method.
*/
public Builder setZip(PaymentIntentConfirmParams.PaymentMethodData.Zip zip) {
this.zip = zip;
return this;
}
}
@Getter
public static class AcssDebit {
/** Required. Customer's bank account number. */
@SerializedName("account_number")
String accountNumber;
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
* Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
* name in this param object. Effectively, this map is flattened to its parent instance.
*/
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
/** Required. Institution number of the customer's bank. */
@SerializedName("institution_number")
String institutionNumber;
/** Required. Transit number of the customer's bank. */
@SerializedName("transit_number")
String transitNumber;
private AcssDebit(
String accountNumber,
Map extraParams,
String institutionNumber,
String transitNumber) {
this.accountNumber = accountNumber;
this.extraParams = extraParams;
this.institutionNumber = institutionNumber;
this.transitNumber = transitNumber;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private String accountNumber;
private Map extraParams;
private String institutionNumber;
private String transitNumber;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentMethodData.AcssDebit build() {
return new PaymentIntentConfirmParams.PaymentMethodData.AcssDebit(
this.accountNumber, this.extraParams, this.institutionNumber, this.transitNumber);
}
/** Required. Customer's bank account number. */
public Builder setAccountNumber(String accountNumber) {
this.accountNumber = accountNumber;
return this;
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.AcssDebit#extraParams} for
* the field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.AcssDebit#extraParams} for
* the field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
/** Required. Institution number of the customer's bank. */
public Builder setInstitutionNumber(String institutionNumber) {
this.institutionNumber = institutionNumber;
return this;
}
/** Required. Transit number of the customer's bank. */
public Builder setTransitNumber(String transitNumber) {
this.transitNumber = transitNumber;
return this;
}
}
}
@Getter
public static class Affirm {
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
* Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
* name in this param object. Effectively, this map is flattened to its parent instance.
*/
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
private Affirm(Map extraParams) {
this.extraParams = extraParams;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Map extraParams;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentMethodData.Affirm build() {
return new PaymentIntentConfirmParams.PaymentMethodData.Affirm(this.extraParams);
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Affirm#extraParams} for the
* field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Affirm#extraParams} for the
* field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
}
}
@Getter
public static class AfterpayClearpay {
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
* Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
* name in this param object. Effectively, this map is flattened to its parent instance.
*/
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
private AfterpayClearpay(Map extraParams) {
this.extraParams = extraParams;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Map extraParams;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentMethodData.AfterpayClearpay build() {
return new PaymentIntentConfirmParams.PaymentMethodData.AfterpayClearpay(
this.extraParams);
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link
* PaymentIntentConfirmParams.PaymentMethodData.AfterpayClearpay#extraParams} for the field
* documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link
* PaymentIntentConfirmParams.PaymentMethodData.AfterpayClearpay#extraParams} for the field
* documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
}
}
@Getter
public static class Alipay {
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
* Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
* name in this param object. Effectively, this map is flattened to its parent instance.
*/
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
private Alipay(Map extraParams) {
this.extraParams = extraParams;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Map extraParams;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentMethodData.Alipay build() {
return new PaymentIntentConfirmParams.PaymentMethodData.Alipay(this.extraParams);
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Alipay#extraParams} for the
* field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Alipay#extraParams} for the
* field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
}
}
@Getter
public static class AmazonPay {
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
* Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
* name in this param object. Effectively, this map is flattened to its parent instance.
*/
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
private AmazonPay(Map extraParams) {
this.extraParams = extraParams;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Map extraParams;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentMethodData.AmazonPay build() {
return new PaymentIntentConfirmParams.PaymentMethodData.AmazonPay(this.extraParams);
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.AmazonPay#extraParams} for
* the field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.AmazonPay#extraParams} for
* the field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
}
}
@Getter
public static class AuBecsDebit {
/** Required. The account number for the bank account. */
@SerializedName("account_number")
String accountNumber;
/** Required. Bank-State-Branch number of the bank account. */
@SerializedName("bsb_number")
String bsbNumber;
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
* Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
* name in this param object. Effectively, this map is flattened to its parent instance.
*/
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
private AuBecsDebit(String accountNumber, String bsbNumber, Map extraParams) {
this.accountNumber = accountNumber;
this.bsbNumber = bsbNumber;
this.extraParams = extraParams;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private String accountNumber;
private String bsbNumber;
private Map extraParams;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentMethodData.AuBecsDebit build() {
return new PaymentIntentConfirmParams.PaymentMethodData.AuBecsDebit(
this.accountNumber, this.bsbNumber, this.extraParams);
}
/** Required. The account number for the bank account. */
public Builder setAccountNumber(String accountNumber) {
this.accountNumber = accountNumber;
return this;
}
/** Required. Bank-State-Branch number of the bank account. */
public Builder setBsbNumber(String bsbNumber) {
this.bsbNumber = bsbNumber;
return this;
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.AuBecsDebit#extraParams} for
* the field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.AuBecsDebit#extraParams} for
* the field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
}
}
@Getter
public static class BacsDebit {
/** Account number of the bank account that the funds will be debited from. */
@SerializedName("account_number")
String accountNumber;
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
* Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
* name in this param object. Effectively, this map is flattened to its parent instance.
*/
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
/** Sort code of the bank account. (e.g., {@code 10-20-30}) */
@SerializedName("sort_code")
String sortCode;
private BacsDebit(String accountNumber, Map extraParams, String sortCode) {
this.accountNumber = accountNumber;
this.extraParams = extraParams;
this.sortCode = sortCode;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private String accountNumber;
private Map extraParams;
private String sortCode;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentMethodData.BacsDebit build() {
return new PaymentIntentConfirmParams.PaymentMethodData.BacsDebit(
this.accountNumber, this.extraParams, this.sortCode);
}
/** Account number of the bank account that the funds will be debited from. */
public Builder setAccountNumber(String accountNumber) {
this.accountNumber = accountNumber;
return this;
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.BacsDebit#extraParams} for
* the field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.BacsDebit#extraParams} for
* the field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
/** Sort code of the bank account. (e.g., {@code 10-20-30}) */
public Builder setSortCode(String sortCode) {
this.sortCode = sortCode;
return this;
}
}
}
@Getter
public static class Bancontact {
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
* Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
* name in this param object. Effectively, this map is flattened to its parent instance.
*/
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
private Bancontact(Map extraParams) {
this.extraParams = extraParams;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Map extraParams;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentMethodData.Bancontact build() {
return new PaymentIntentConfirmParams.PaymentMethodData.Bancontact(this.extraParams);
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Bancontact#extraParams} for
* the field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Bancontact#extraParams} for
* the field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
}
}
@Getter
public static class BillingDetails {
/** Billing address. */
@SerializedName("address")
Object address;
/** Email address. */
@SerializedName("email")
Object email;
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
* Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
* name in this param object. Effectively, this map is flattened to its parent instance.
*/
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
/** Full name. */
@SerializedName("name")
Object name;
/** Billing phone number (including extension). */
@SerializedName("phone")
Object phone;
private BillingDetails(
Object address,
Object email,
Map extraParams,
Object name,
Object phone) {
this.address = address;
this.email = email;
this.extraParams = extraParams;
this.name = name;
this.phone = phone;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Object address;
private Object email;
private Map extraParams;
private Object name;
private Object phone;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentMethodData.BillingDetails build() {
return new PaymentIntentConfirmParams.PaymentMethodData.BillingDetails(
this.address, this.email, this.extraParams, this.name, this.phone);
}
/** Billing address. */
public Builder setAddress(
PaymentIntentConfirmParams.PaymentMethodData.BillingDetails.Address address) {
this.address = address;
return this;
}
/** Billing address. */
public Builder setAddress(EmptyParam address) {
this.address = address;
return this;
}
/** Email address. */
public Builder setEmail(String email) {
this.email = email;
return this;
}
/** Email address. */
public Builder setEmail(EmptyParam email) {
this.email = email;
return this;
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.BillingDetails#extraParams}
* for the field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.BillingDetails#extraParams}
* for the field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
/** Full name. */
public Builder setName(String name) {
this.name = name;
return this;
}
/** Full name. */
public Builder setName(EmptyParam name) {
this.name = name;
return this;
}
/** Billing phone number (including extension). */
public Builder setPhone(String phone) {
this.phone = phone;
return this;
}
/** Billing phone number (including extension). */
public Builder setPhone(EmptyParam phone) {
this.phone = phone;
return this;
}
}
@Getter
public static class Address {
/** City, district, suburb, town, or village. */
@SerializedName("city")
String city;
/**
* Two-letter country code (ISO
* 3166-1 alpha-2).
*/
@SerializedName("country")
String country;
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
* Instead, each key/value pair is serialized as if the key is a root-level field
* (serialized) name in this param object. Effectively, this map is flattened to its parent
* instance.
*/
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
/** Address line 1 (e.g., street, PO Box, or company name). */
@SerializedName("line1")
String line1;
/** Address line 2 (e.g., apartment, suite, unit, or building). */
@SerializedName("line2")
String line2;
/** ZIP or postal code. */
@SerializedName("postal_code")
String postalCode;
/** State, county, province, or region. */
@SerializedName("state")
String state;
private Address(
String city,
String country,
Map extraParams,
String line1,
String line2,
String postalCode,
String state) {
this.city = city;
this.country = country;
this.extraParams = extraParams;
this.line1 = line1;
this.line2 = line2;
this.postalCode = postalCode;
this.state = state;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private String city;
private String country;
private Map extraParams;
private String line1;
private String line2;
private String postalCode;
private String state;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentMethodData.BillingDetails.Address build() {
return new PaymentIntentConfirmParams.PaymentMethodData.BillingDetails.Address(
this.city,
this.country,
this.extraParams,
this.line1,
this.line2,
this.postalCode,
this.state);
}
/** City, district, suburb, town, or village. */
public Builder setCity(String city) {
this.city = city;
return this;
}
/**
* Two-letter country code (ISO
* 3166-1 alpha-2).
*/
public Builder setCountry(String country) {
this.country = country;
return this;
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link
* PaymentIntentConfirmParams.PaymentMethodData.BillingDetails.Address#extraParams} for
* the field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link
* PaymentIntentConfirmParams.PaymentMethodData.BillingDetails.Address#extraParams} for
* the field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
/** Address line 1 (e.g., street, PO Box, or company name). */
public Builder setLine1(String line1) {
this.line1 = line1;
return this;
}
/** Address line 2 (e.g., apartment, suite, unit, or building). */
public Builder setLine2(String line2) {
this.line2 = line2;
return this;
}
/** ZIP or postal code. */
public Builder setPostalCode(String postalCode) {
this.postalCode = postalCode;
return this;
}
/** State, county, province, or region. */
public Builder setState(String state) {
this.state = state;
return this;
}
}
}
}
@Getter
public static class Blik {
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
* Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
* name in this param object. Effectively, this map is flattened to its parent instance.
*/
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
private Blik(Map extraParams) {
this.extraParams = extraParams;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Map extraParams;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentMethodData.Blik build() {
return new PaymentIntentConfirmParams.PaymentMethodData.Blik(this.extraParams);
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Blik#extraParams} for the
* field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Blik#extraParams} for the
* field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
}
}
@Getter
public static class Boleto {
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
* Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
* name in this param object. Effectively, this map is flattened to its parent instance.
*/
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
/**
* Required. The tax ID of the customer (CPF for individual consumers or CNPJ
* for businesses consumers)
*/
@SerializedName("tax_id")
String taxId;
private Boleto(Map extraParams, String taxId) {
this.extraParams = extraParams;
this.taxId = taxId;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Map extraParams;
private String taxId;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentMethodData.Boleto build() {
return new PaymentIntentConfirmParams.PaymentMethodData.Boleto(
this.extraParams, this.taxId);
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Boleto#extraParams} for the
* field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Boleto#extraParams} for the
* field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
/**
* Required. The tax ID of the customer (CPF for individual consumers or
* CNPJ for businesses consumers)
*/
public Builder setTaxId(String taxId) {
this.taxId = taxId;
return this;
}
}
}
@Getter
public static class Cashapp {
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
* Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
* name in this param object. Effectively, this map is flattened to its parent instance.
*/
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
private Cashapp(Map extraParams) {
this.extraParams = extraParams;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Map extraParams;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentMethodData.Cashapp build() {
return new PaymentIntentConfirmParams.PaymentMethodData.Cashapp(this.extraParams);
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Cashapp#extraParams} for the
* field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Cashapp#extraParams} for the
* field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
}
}
@Getter
public static class CustomerBalance {
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
* Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
* name in this param object. Effectively, this map is flattened to its parent instance.
*/
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
private CustomerBalance(Map extraParams) {
this.extraParams = extraParams;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Map extraParams;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentMethodData.CustomerBalance build() {
return new PaymentIntentConfirmParams.PaymentMethodData.CustomerBalance(this.extraParams);
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.CustomerBalance#extraParams}
* for the field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.CustomerBalance#extraParams}
* for the field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
}
}
@Getter
public static class Eps {
/** The customer's bank. */
@SerializedName("bank")
Bank bank;
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
* Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
* name in this param object. Effectively, this map is flattened to its parent instance.
*/
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
private Eps(Bank bank, Map extraParams) {
this.bank = bank;
this.extraParams = extraParams;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Bank bank;
private Map extraParams;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentMethodData.Eps build() {
return new PaymentIntentConfirmParams.PaymentMethodData.Eps(this.bank, this.extraParams);
}
/** The customer's bank. */
public Builder setBank(PaymentIntentConfirmParams.PaymentMethodData.Eps.Bank bank) {
this.bank = bank;
return this;
}
/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Eps#extraParams} for the
* field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}
/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Eps#extraParams} for the
* field documentation.
*/
public Builder putAllExtraParam(Map map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
}
public enum Bank implements ApiRequestParams.EnumParam {
@SerializedName("arzte_und_apotheker_bank")
ARZTE_UND_APOTHEKER_BANK("arzte_und_apotheker_bank"),
@SerializedName("austrian_anadi_bank_ag")
AUSTRIAN_ANADI_BANK_AG("austrian_anadi_bank_ag"),
@SerializedName("bank_austria")
BANK_AUSTRIA("bank_austria"),
@SerializedName("bankhaus_carl_spangler")
BANKHAUS_CARL_SPANGLER("bankhaus_carl_spangler"),
@SerializedName("bankhaus_schelhammer_und_schattera_ag")
BANKHAUS_SCHELHAMMER_UND_SCHATTERA_AG("bankhaus_schelhammer_und_schattera_ag"),
@SerializedName("bawag_psk_ag")
BAWAG_PSK_AG("bawag_psk_ag"),
@SerializedName("bks_bank_ag")
BKS_BANK_AG("bks_bank_ag"),
@SerializedName("brull_kallmus_bank_ag")
BRULL_KALLMUS_BANK_AG("brull_kallmus_bank_ag"),
@SerializedName("btv_vier_lander_bank")
BTV_VIER_LANDER_BANK("btv_vier_lander_bank"),
@SerializedName("capital_bank_grawe_gruppe_ag")
CAPITAL_BANK_GRAWE_GRUPPE_AG("capital_bank_grawe_gruppe_ag"),
@SerializedName("deutsche_bank_ag")
DEUTSCHE_BANK_AG("deutsche_bank_ag"),
@SerializedName("dolomitenbank")
DOLOMITENBANK("dolomitenbank"),
@SerializedName("easybank_ag")
EASYBANK_AG("easybank_ag"),
@SerializedName("erste_bank_und_sparkassen")
ERSTE_BANK_UND_SPARKASSEN("erste_bank_und_sparkassen"),
@SerializedName("hypo_alpeadriabank_international_ag")
HYPO_ALPEADRIABANK_INTERNATIONAL_AG("hypo_alpeadriabank_international_ag"),
@SerializedName("hypo_bank_burgenland_aktiengesellschaft")
HYPO_BANK_BURGENLAND_AKTIENGESELLSCHAFT("hypo_bank_burgenland_aktiengesellschaft"),
@SerializedName("hypo_noe_lb_fur_niederosterreich_u_wien")
HYPO_NOE_LB_FUR_NIEDEROSTERREICH_U_WIEN("hypo_noe_lb_fur_niederosterreich_u_wien"),
@SerializedName("hypo_oberosterreich_salzburg_steiermark")
HYPO_OBEROSTERREICH_SALZBURG_STEIERMARK("hypo_oberosterreich_salzburg_steiermark"),
@SerializedName("hypo_tirol_bank_ag")
HYPO_TIROL_BANK_AG("hypo_tirol_bank_ag"),
@SerializedName("hypo_vorarlberg_bank_ag")
HYPO_VORARLBERG_BANK_AG("hypo_vorarlberg_bank_ag"),
@SerializedName("marchfelder_bank")
MARCHFELDER_BANK("marchfelder_bank"),
@SerializedName("oberbank_ag")
OBERBANK_AG("oberbank_ag"),
@SerializedName("raiffeisen_bankengruppe_osterreich")
RAIFFEISEN_BANKENGRUPPE_OSTERREICH("raiffeisen_bankengruppe_osterreich"),
@SerializedName("schoellerbank_ag")
SCHOELLERBANK_AG("schoellerbank_ag"),
@SerializedName("sparda_bank_wien")
SPARDA_BANK_WIEN("sparda_bank_wien"),
@SerializedName("volksbank_gruppe")
VOLKSBANK_GRUPPE("volksbank_gruppe"),
@SerializedName("volkskreditbank_ag")
VOLKSKREDITBANK_AG("volkskreditbank_ag"),
@SerializedName("vr_bank_braunau")
VR_BANK_BRAUNAU("vr_bank_braunau");
@Getter(onMethod_ = {@Override})
private final String value;
Bank(String value) {
this.value = value;
}
}
}
@Getter
public static class Fpx {
/** Account holder type for FPX transaction. */
@SerializedName("account_holder_type")
AccountHolderType accountHolderType;
/** Required. The customer's bank. */
@SerializedName("bank")
Bank bank;
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
* Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
* name in this param object. Effectively, this map is flattened to its parent instance.
*/
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
private Fpx(AccountHolderType accountHolderType, Bank bank, Map extraParams) {
this.accountHolderType = accountHolderType;
this.bank = bank;
this.extraParams = extraParams;
}
public static Builder builder() {
return new Builder();
}
public static class Builder {
private AccountHolderType accountHolderType;
private Bank bank;
private Map extraParams;
/** Finalize and obtain parameter instance from this builder. */
public PaymentIntentConfirmParams.PaymentMethodData.Fpx build() {
return new PaymentIntentConfirmParams.PaymentMethodData.Fpx(
this.accountHolderType, this.bank, this.extraParams);
}
/** Account holder type for FPX transaction. */
public Builder setAccountHolderType(
PaymentIntentConfirmParams.PaymentMethodData.Fpx.AccountHolderType accountHolderType) {
this.accountHolderType = accountHolderType;
return this;
}
/**